/* ═══════════════════════════════════════════════════════════════
   TradeForge — Tablet Jobsite Optimization Layer
   Landscape tablet layout, quick actions, field tools, and
   touch-optimized navigation for jobsite use.
   ═══════════════════════════════════════════════════════════════ */

/* ── Tablet Detection (landscape tablets: 768px–1194px) ── */
@media(min-width:768px) and (max-width:1194px){
  /* Show tablet-specific elements */
  .tj-tablet-only{display:block!important}
  .tj-desktop-only{display:none!important}

  /* Larger workspace padding for touch */
  .pe-workspace{padding:0 20px}

  /* Bigger touch targets on tabs */
  .pe-tab{padding:12px 18px;font-size:14px;min-height:44px}
  .pe-tab svg{width:18px;height:18px}

  /* Enlarge stat cards for gloved taps */
  .pe-stat{padding:18px;min-height:80px}
  .pe-stat-val{font-size:28px}
  .pe-stat-label{font-size:12px;margin-top:8px}

  /* Cards: bigger touch padding */
  .pe-card{padding:22px}
  .pe-card-head h3{font-size:16px}

  /* Buttons: minimum touch target 44px */
  .btn{min-height:44px;min-width:44px;padding:10px 18px;font-size:14px}

  /* Feed items: bigger touch targets */
  .pe-feed-item{padding:14px 0}
  .pe-feed-icon{width:40px;height:40px}

  /* Document items */
  .pe-doc-item{padding:14px 16px;min-height:54px}

  /* Task items */
  .pe-task{padding:14px 0}
  .pe-task-check{width:24px;height:24px}
  .pe-task-title{font-size:14px}

  /* Input fields: bigger for glove use */
  .input,select.input,textarea.input{
    min-height:44px;font-size:14px;padding:10px 14px
  }

  /* Grid layouts optimized for landscape tablet */
  .pe-grid-2{grid-template-columns:1fr 1fr;gap:16px}
  .pe-grid-3{grid-template-columns:1fr 1fr 1fr;gap:16px}
  .cc-grid{grid-template-columns:1fr 1fr;gap:16px}
  .cc-info-grid{grid-template-columns:1fr 1fr;gap:10px 20px}

  /* Photo grid: bigger thumbnails for touch */
  .pe-photos{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}

  /* Collab list: bigger touch */
  .pe-collab-item{padding:14px 0}
  .pe-collab-avatar{width:42px;height:42px;font-size:15px}

  /* Summary grid: 3-up on landscape tablet */
  .pe-summary{grid-template-columns:repeat(3,1fr)}

  /* Pipeline steps: bigger touch */
  .ps-step-dot{width:42px;height:42px}
  .ps-step-label{font-size:12px}

  /* Header: condensed for tablet real estate */
  .pe-header{padding:16px 0 14px}
  .pe-header h1{font-size:24px}

  /* Hide desktop top nav, use tablet nav */
  .nav .menu{display:none}
  .nav .cta{display:none}

  /* Footer: hide on tablet to save space */
  .footer{display:none}

  /* Make body accommodate bottom nav */
  body{padding-bottom:140px}
}

/* ── Jobsite Quick Actions Bar ── */
.tj-quick-actions{
  display:none;position:fixed;bottom:68px;left:0;right:0;z-index:95;
  background:rgba(28,30,33,.97);backdrop-filter:blur(12px);
  border-top:1px solid rgba(140,106,62,.25);
  padding:10px 12px calc(4px + env(safe-area-inset-bottom,0px));
  transition:transform .2s
}
.tj-quick-actions-scroll{
  display:flex;gap:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;
  scrollbar-width:none;padding:0 4px
}
.tj-quick-actions-scroll::-webkit-scrollbar{display:none}
.tj-quick-action{
  display:flex;flex-direction:column;align-items:center;gap:4px;
  padding:10px 14px;border-radius:12px;
  background:rgba(46,49,54,.7);border:1px solid rgba(181,183,185,.1);
  color:var(--ash);font-size:11px;font-weight:650;
  cursor:pointer;white-space:nowrap;min-width:76px;
  transition:all .15s;text-decoration:none;
  -webkit-tap-highlight-color:transparent
}
.tj-quick-action svg{width:22px;height:22px;color:var(--bronze);flex-shrink:0}
.tj-quick-action:active{transform:scale(.95);background:rgba(140,106,62,.15)}
.tj-quick-action:hover{border-color:rgba(140,106,62,.4);color:#fff}
.tj-quick-action.tj-qa-highlight{
  background:rgba(140,106,62,.12);border-color:rgba(140,106,62,.35);color:#fff
}

/* Show quick actions on tablets and mobile */
@media(max-width:1194px){
  .tj-quick-actions{display:block}
}

/* ── Tablet Bottom Navigation ── */
.tj-bottom-nav{
  display:none;position:fixed;bottom:0;left:0;right:0;z-index:100;
  background:rgba(20,22,25,.98);backdrop-filter:blur(14px);
  border-top:1px solid rgba(140,106,62,.25);
  padding:4px 6px calc(4px + env(safe-area-inset-bottom,0px))
}
.tj-bottom-nav-inner{
  display:flex;justify-content:space-around;align-items:center;gap:2px;
  max-width:900px;margin:0 auto
}
.tj-bottom-nav a{
  display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:8px 4px;border-radius:10px;font-size:11px;font-weight:650;
  color:var(--muted);text-decoration:none;flex:1;text-align:center;
  transition:color .15s;min-height:44px;justify-content:center;
  -webkit-tap-highlight-color:transparent
}
.tj-bottom-nav a svg{width:22px;height:22px;flex-shrink:0}
.tj-bottom-nav a.active{color:var(--bronze)}
.tj-bottom-nav a:active{background:rgba(140,106,62,.1)}

/* Show tablet nav, hide old mobile nav */
@media(min-width:768px) and (max-width:1194px){
  .tj-bottom-nav{display:block}
  .pe-mobile-nav{display:none!important}
  .pe-photo-fab{display:none!important}
}
@media(max-width:767px){
  .tj-bottom-nav{display:block}
  .pe-mobile-nav{display:none!important}
  .pe-photo-fab{display:none!important}
  body{padding-bottom:140px}
}

/* ── Field Photo Capture Modal ── */
.tj-photo-capture-overlay{
  display:none;position:fixed;inset:0;z-index:1200;
  background:rgba(0,0,0,.65);backdrop-filter:blur(4px);
  align-items:center;justify-content:center
}
.tj-photo-capture-overlay.open{display:flex}
.tj-photo-capture{
  background:var(--graphite);border:1px solid rgba(140,106,62,.3);
  border-radius:18px;width:94%;max-width:520px;max-height:90vh;
  overflow-y:auto;box-shadow:0 20px 48px rgba(0,0,0,.5);
  animation:peSlideUp .25s ease-out
}
.tj-photo-capture-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 20px;border-bottom:1px solid rgba(181,183,185,.08)
}
.tj-photo-capture-head h3{
  font-size:17px;font-weight:700;color:#fff;margin:0;
  display:flex;align-items:center;gap:8px
}
.tj-photo-capture-head h3 svg{width:22px;height:22px;color:var(--bronze)}
.tj-photo-capture-close{
  background:none;border:none;color:var(--muted);font-size:28px;
  cursor:pointer;padding:4px 8px;line-height:1;min-width:44px;min-height:44px;
  display:flex;align-items:center;justify-content:center
}
.tj-photo-capture-close:hover{color:#fff}
.tj-photo-capture-body{padding:16px 20px}
.tj-photo-capture-zone{
  display:flex;flex-direction:column;align-items:center;
  padding:32px 16px;border:2px dashed rgba(140,106,62,.35);
  border-radius:14px;cursor:pointer;transition:all .2s;text-align:center
}
.tj-photo-capture-zone:hover,.tj-photo-capture-zone.drag-over{
  border-color:var(--bronze);background:rgba(140,106,62,.06)
}
.tj-photo-capture-zone svg{
  width:44px;height:44px;color:var(--bronze);margin:0 0 10px
}
.tj-photo-capture-zone .tj-zone-title{
  font-size:15px;font-weight:650;color:var(--ash)
}
.tj-photo-capture-zone .tj-zone-hint{
  font-size:12px;color:var(--muted);margin-top:4px
}
.tj-photo-previews{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.tj-photo-previews:empty{display:none}
.tj-photo-thumb{
  position:relative;width:80px;height:80px;border-radius:10px;
  overflow:hidden;border:1px solid rgba(181,183,185,.12)
}
.tj-photo-thumb img{width:100%;height:100%;object-fit:cover}
.tj-photo-thumb-remove{
  position:absolute;top:3px;right:3px;width:24px;height:24px;
  border-radius:50%;background:rgba(0,0,0,.75);color:#fff;
  border:none;font-size:16px;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  min-width:24px;min-height:24px
}
.tj-photo-form-row{margin-top:14px}
.tj-photo-form-row label{
  font-size:12px;font-weight:650;color:var(--muted);
  display:block;margin:0 0 5px;text-transform:uppercase;letter-spacing:.03em
}
.tj-photo-form-row .input{width:100%;box-sizing:border-box}
.tj-photo-capture-actions{
  display:flex;gap:10px;justify-content:flex-end;
  padding:14px 20px 20px;border-top:1px solid rgba(181,183,185,.08)
}
.tj-photo-capture-actions .btn{min-height:48px;font-size:14px}
.tj-photo-status{
  text-align:center;padding:10px;font-size:13px;font-weight:600;
  border-radius:10px;margin-top:10px
}
.tj-photo-status.success{background:rgba(106,191,105,.12);color:#6abf69}
.tj-photo-status.error{background:rgba(239,68,68,.12);color:#ef4444}

/* ── Field Note Modal ── */
.tj-field-note-overlay{
  display:none;position:fixed;inset:0;z-index:1200;
  background:rgba(0,0,0,.65);backdrop-filter:blur(4px);
  align-items:center;justify-content:center
}
.tj-field-note-overlay.open{display:flex}
.tj-field-note{
  background:var(--graphite);border:1px solid rgba(140,106,62,.3);
  border-radius:18px;width:94%;max-width:520px;max-height:90vh;
  overflow-y:auto;box-shadow:0 20px 48px rgba(0,0,0,.5);
  animation:peSlideUp .25s ease-out
}
.tj-field-note-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 20px;border-bottom:1px solid rgba(181,183,185,.08)
}
.tj-field-note-head h3{
  font-size:17px;font-weight:700;color:#fff;margin:0;
  display:flex;align-items:center;gap:8px
}
.tj-field-note-head h3 svg{width:22px;height:22px;color:var(--bronze)}
.tj-field-note-close{
  background:none;border:none;color:var(--muted);font-size:28px;
  cursor:pointer;padding:4px 8px;line-height:1;min-width:44px;min-height:44px;
  display:flex;align-items:center;justify-content:center
}
.tj-field-note-body{padding:16px 20px}
.tj-field-note-body textarea{
  width:100%;min-height:120px;box-sizing:border-box;
  resize:vertical;font-size:14px
}
.tj-field-note-actions{
  display:flex;gap:10px;justify-content:flex-end;
  padding:14px 20px 20px;border-top:1px solid rgba(181,183,185,.08)
}
.tj-field-note-actions .btn{min-height:48px;font-size:14px}

/* ── Inspection Report Modal ── */
.tj-inspection-overlay{
  display:none;position:fixed;inset:0;z-index:1200;
  background:rgba(0,0,0,.65);backdrop-filter:blur(4px);
  align-items:center;justify-content:center
}
.tj-inspection-overlay.open{display:flex}
.tj-inspection{
  background:var(--graphite);border:1px solid rgba(140,106,62,.3);
  border-radius:18px;width:94%;max-width:560px;max-height:90vh;
  overflow-y:auto;box-shadow:0 20px 48px rgba(0,0,0,.5);
  animation:peSlideUp .25s ease-out
}
.tj-inspection-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 20px;border-bottom:1px solid rgba(181,183,185,.08)
}
.tj-inspection-head h3{
  font-size:17px;font-weight:700;color:#fff;margin:0;
  display:flex;align-items:center;gap:8px
}
.tj-inspection-head h3 svg{width:22px;height:22px;color:var(--bronze)}
.tj-inspection-close{
  background:none;border:none;color:var(--muted);font-size:28px;
  cursor:pointer;padding:4px 8px;line-height:1;min-width:44px;min-height:44px;
  display:flex;align-items:center;justify-content:center
}
.tj-inspection-body{padding:16px 20px}
.tj-inspection-body .tj-form-group{margin-bottom:14px}
.tj-inspection-body .tj-form-group label{
  font-size:12px;font-weight:650;color:var(--muted);
  display:block;margin:0 0 5px;text-transform:uppercase;letter-spacing:.03em
}
.tj-inspection-body .input{width:100%;box-sizing:border-box}
.tj-inspection-body textarea.input{
  min-height:90px;resize:vertical;font-size:14px
}
.tj-result-options{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:4px}
.tj-result-opt{
  display:flex;align-items:center;gap:8px;padding:12px 14px;
  border-radius:10px;background:rgba(46,49,54,.5);
  border:2px solid rgba(181,183,185,.08);cursor:pointer;
  transition:all .15s;min-height:48px;
  -webkit-tap-highlight-color:transparent
}
.tj-result-opt:active{transform:scale(.97)}
.tj-result-opt:hover{border-color:rgba(140,106,62,.3)}
.tj-result-opt.selected{border-color:var(--bronze);background:rgba(140,106,62,.1)}
.tj-result-opt-icon{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.tj-result-opt-icon.pass{background:#6abf69}
.tj-result-opt-icon.fail{background:#ef4444}
.tj-result-opt-icon.partial{background:#f59e0b}
.tj-result-opt-icon.na{background:var(--muted)}
.tj-result-opt-label{font-size:13px;font-weight:650;color:var(--ash)}
.tj-inspection-photos{margin-top:14px}
.tj-inspection-photos-zone{
  display:flex;align-items:center;gap:10px;
  padding:14px 16px;border:2px dashed rgba(140,106,62,.25);
  border-radius:10px;cursor:pointer;transition:all .15s
}
.tj-inspection-photos-zone:hover{
  border-color:var(--bronze);background:rgba(140,106,62,.04)
}
.tj-inspection-photos-zone svg{width:22px;height:22px;color:var(--bronze);flex-shrink:0}
.tj-inspection-photos-zone span{font-size:13px;color:var(--ash);font-weight:600}
.tj-inspection-thumbs{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.tj-inspection-actions{
  display:flex;gap:10px;justify-content:flex-end;
  padding:14px 20px 20px;border-top:1px solid rgba(181,183,185,.08)
}
.tj-inspection-actions .btn{min-height:48px;font-size:14px}

/* ── QR Scanner Modal ── */
.tj-qr-overlay{
  display:none;position:fixed;inset:0;z-index:1200;
  background:rgba(0,0,0,.8);backdrop-filter:blur(6px);
  align-items:center;justify-content:center
}
.tj-qr-overlay.open{display:flex}
.tj-qr-modal{
  background:var(--graphite);border:1px solid rgba(140,106,62,.3);
  border-radius:18px;width:94%;max-width:440px;max-height:90vh;
  overflow-y:auto;box-shadow:0 20px 48px rgba(0,0,0,.5);
  animation:peSlideUp .25s ease-out;text-align:center
}
.tj-qr-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 20px;border-bottom:1px solid rgba(181,183,185,.08)
}
.tj-qr-head h3{
  font-size:17px;font-weight:700;color:#fff;margin:0;
  display:flex;align-items:center;gap:8px
}
.tj-qr-head h3 svg{width:22px;height:22px;color:var(--bronze)}
.tj-qr-close{
  background:none;border:none;color:var(--muted);font-size:28px;
  cursor:pointer;padding:4px 8px;line-height:1;min-width:44px;min-height:44px;
  display:flex;align-items:center;justify-content:center
}
.tj-qr-body{padding:24px 20px}
.tj-qr-viewfinder{
  width:220px;height:220px;margin:0 auto 18px;
  border:3px solid rgba(140,106,62,.5);border-radius:16px;
  background:rgba(28,30,33,.6);display:flex;align-items:center;
  justify-content:center;position:relative;overflow:hidden
}
.tj-qr-viewfinder video{
  width:100%;height:100%;object-fit:cover;border-radius:13px
}
.tj-qr-viewfinder .tj-qr-placeholder{
  color:var(--muted);text-align:center;font-size:13px
}
.tj-qr-viewfinder .tj-qr-placeholder svg{
  width:48px;height:48px;color:var(--bronze);margin:0 0 8px;display:block;margin:0 auto 8px
}
.tj-qr-instructions{font-size:13px;color:var(--ash);margin:0 0 18px}
.tj-qr-manual{margin-top:14px;padding-top:14px;border-top:1px solid rgba(181,183,185,.08)}
.tj-qr-manual label{
  font-size:12px;font-weight:650;color:var(--muted);display:block;
  margin:0 0 6px;text-transform:uppercase;letter-spacing:.03em
}
.tj-qr-manual .input{width:100%;box-sizing:border-box;text-align:center}
.tj-qr-manual-btn{
  margin-top:10px;width:100%
}
.tj-qr-result{
  margin-top:14px;padding:14px;border-radius:12px;
  background:rgba(46,49,54,.5);border:1px solid rgba(181,183,185,.1);
  display:none
}
.tj-qr-result.visible{display:block}
.tj-qr-result-name{font-size:15px;font-weight:700;color:#fff;margin:0 0 4px}
.tj-qr-result-company{font-size:13px;color:var(--ash);margin:0 0 8px}
.tj-qr-result-badges{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
.tj-qr-badge{
  display:inline-flex;align-items:center;gap:4px;padding:4px 10px;
  border-radius:6px;font-size:11px;font-weight:700;
  text-transform:uppercase;letter-spacing:.03em
}
.tj-qr-badge.verified{background:rgba(106,191,105,.12);color:#6abf69}
.tj-qr-badge.expired{background:rgba(239,68,68,.12);color:#ef4444}
.tj-qr-badge.pending{background:rgba(245,158,11,.12);color:#f59e0b}
.tj-qr-actions{
  display:flex;gap:10px;padding:14px 20px 20px;
  border-top:1px solid rgba(181,183,185,.08)
}
.tj-qr-actions .btn{flex:1;min-height:48px;font-size:14px}

/* ── Delivery Confirmation Modal ── */
.tj-delivery-overlay{
  display:none;position:fixed;inset:0;z-index:1200;
  background:rgba(0,0,0,.65);backdrop-filter:blur(4px);
  align-items:center;justify-content:center
}
.tj-delivery-overlay.open{display:flex}
.tj-delivery{
  background:var(--graphite);border:1px solid rgba(140,106,62,.3);
  border-radius:18px;width:94%;max-width:520px;max-height:90vh;
  overflow-y:auto;box-shadow:0 20px 48px rgba(0,0,0,.5);
  animation:peSlideUp .25s ease-out
}
.tj-delivery-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 20px;border-bottom:1px solid rgba(181,183,185,.08)
}
.tj-delivery-head h3{
  font-size:17px;font-weight:700;color:#fff;margin:0;
  display:flex;align-items:center;gap:8px
}
.tj-delivery-head h3 svg{width:22px;height:22px;color:var(--bronze)}
.tj-delivery-close{
  background:none;border:none;color:var(--muted);font-size:28px;
  cursor:pointer;padding:4px 8px;line-height:1;min-width:44px;min-height:44px;
  display:flex;align-items:center;justify-content:center
}
.tj-delivery-body{padding:16px 20px}
.tj-delivery-body .tj-form-group{margin-bottom:14px}
.tj-delivery-body .tj-form-group label{
  font-size:12px;font-weight:650;color:var(--muted);
  display:block;margin:0 0 5px;text-transform:uppercase;letter-spacing:.03em
}
.tj-delivery-body .input{width:100%;box-sizing:border-box}
.tj-delivery-condition{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.tj-delivery-condition-opt{
  display:flex;align-items:center;justify-content:center;gap:6px;
  padding:12px;border-radius:10px;background:rgba(46,49,54,.5);
  border:2px solid rgba(181,183,185,.08);cursor:pointer;
  font-size:13px;font-weight:650;color:var(--ash);
  transition:all .15s;min-height:48px
}
.tj-delivery-condition-opt:active{transform:scale(.97)}
.tj-delivery-condition-opt.selected{border-color:var(--bronze);background:rgba(140,106,62,.1);color:#fff}
.tj-delivery-actions{
  display:flex;gap:10px;justify-content:flex-end;
  padding:14px 20px 20px;border-top:1px solid rgba(181,183,185,.08)
}
.tj-delivery-actions .btn{min-height:48px;font-size:14px}

/* ── Confirmation Toast ── */
.tj-toast{
  position:fixed;top:20px;left:50%;transform:translateX(-50%) translateY(-20px);
  z-index:1300;padding:14px 24px;border-radius:12px;font-size:14px;
  font-weight:650;color:#fff;opacity:0;pointer-events:none;
  transition:all .3s ease;max-width:90%;text-align:center;
  box-shadow:0 8px 24px rgba(0,0,0,.4)
}
.tj-toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}
.tj-toast.success{background:rgba(34,80,34,.95);border:1px solid rgba(106,191,105,.4)}
.tj-toast.error{background:rgba(80,20,20,.95);border:1px solid rgba(239,68,68,.4)}
.tj-toast.info{background:rgba(30,50,80,.95);border:1px solid rgba(99,179,237,.4)}

/* ── Landscape phone / small tablet adjustments ── */
@media(max-width:767px){
  .tj-quick-action{min-width:68px;padding:8px 10px}
  .tj-quick-action svg{width:20px;height:20px}
  .tj-quick-action{font-size:10px}
  .tj-quick-actions{bottom:64px;padding:8px 8px}
}

/* ── Large tablet landscape (iPad Pro, etc.) ── */
@media(min-width:1024px) and (max-width:1194px){
  .pe-summary{grid-template-columns:repeat(4,1fr)}
  .tj-quick-action{min-width:84px;padding:12px 16px}
}

/* ═══════════════════════════════════════════════════════════════
   Unified Command — Tablet Optimizations
   Covers company-workspace, trade-dashboard, and portal dashboard
   ═══════════════════════════════════════════════════════════════ */

@media(min-width:768px) and (max-width:1194px){

  /* ── Unified Command Nav: touch-optimized tabs ── */
  .ucmd-tab{padding:14px 18px;font-size:14px;min-height:48px}
  .ucmd-tab svg{width:18px;height:18px}
  .ucmd-action-btn{padding:10px 16px;font-size:13px;min-height:44px}
  .ucmd-action-btn svg{width:16px;height:16px}

  /* ── Unified Command: hide top nav on tablet, use bottom nav ── */
  .ucmd-nav .ucmd-tabs{display:none}
  .ucmd-nav .ucmd-actions{display:none}

  /* ── Unified Command Metrics: larger for touch ── */
  .ucmd-metric{padding:18px;min-height:80px}
  .ucmd-metric-value{font-size:30px}
  .ucmd-metric-label{font-size:12px}

  /* ── Unified Command Sections: bigger padding ── */
  .ucmd-section{padding:22px;border-radius:14px}
  .ucmd-section-title{font-size:16px}

  /* ── Unified Command Grid: 2-col for landscape tablet ── */
  .ucmd-grid-2{grid-template-columns:1fr 1fr;gap:16px}
  .ucmd-grid-3{grid-template-columns:1fr 1fr;gap:16px}
  .ucmd-grid-main{grid-template-columns:1fr;gap:16px}

  /* ── Unified Command Feed: bigger touch targets ── */
  .ucmd-feed-item{padding:14px;min-height:54px}
  .ucmd-feed-icon{width:38px;height:38px}
  .ucmd-feed-title{font-size:14px}

  /* ── Unified Command Quick Actions: bigger for gloves ── */
  .ucmd-quick-actions{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}
  .ucmd-quick-action{padding:16px;min-height:60px}
  .ucmd-quick-action-icon{width:42px;height:42px}
  .ucmd-quick-action-icon svg{width:20px;height:20px}
  .ucmd-quick-action-label{font-size:14px}

  /* ── Table: bigger rows for touch ── */
  .ucmd-table td,.ucmd-table th{padding:12px}
  .ucmd-table td{font-size:14px}

  /* ── Health Row: 2x2 on tablet ── */
  .ucmd-health-row{grid-template-columns:repeat(2,1fr);gap:12px}
  .ucmd-health-count{font-size:28px}

  /* ── Badges: larger for readability ── */
  .ucmd-badge{padding:4px 12px;font-size:12px}

  /* ── Portal Dashboard: touch-friendly cards ── */
  .dash-summary{grid-template-columns:repeat(3,1fr)!important;gap:14px}
  .dash-card{padding:18px;min-height:80px}
  .dash-card-value{font-size:28px}
  .dash-card-label{font-size:13px}

  /* ── Portal Dashboard Feed: bigger items ── */
  .dash-feed-item{padding:14px 0;min-height:54px}
  .dash-feed-icon{width:38px;height:38px}
  .dash-feed-icon svg{width:20px;height:20px}
  .dash-feed-title{font-size:14px}
  .dash-feed-meta{font-size:13px}

  /* ── Portal Module Nav: scroll horizontally with bigger targets ── */
  .portal-module-nav{-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .portal-module-nav::-webkit-scrollbar{display:none}
  .portal-module-link{padding:12px 16px;font-size:13px;min-height:44px;white-space:nowrap}
  .portal-module-link svg{width:18px;height:18px}

  /* ── Portal Page Header: condensed ── */
  .portal-page-header h1{font-size:26px}

  /* ── Dashboard Sections: bigger touch ── */
  .dash-section{padding:20px;border-radius:14px}
  .dash-section-title{font-size:16px}
  .dash-section-link{font-size:13px;min-height:44px;display:inline-flex;align-items:center}

  /* ── Portal Nav: hide desktop, show tablet bottom ── */
  .has-portal-nav .nav .menu{display:none}
  .has-portal-nav .nav .cta{display:none}

  /* ── All forms: bigger for jobsite use ── */
  input,textarea,select{font-size:16px!important}
  .input,textarea,select{min-height:48px;padding:12px 14px}

  /* ── Modal buttons: bigger touch targets ── */
  .btn.primary,.btn.ghost{min-height:48px;padding:12px 22px;font-size:14px}

  /* ── Container: use full width on tablet ── */
  .container{padding:0 20px}

  /* ── Dashboard Mini Timeline: touch-friendly ── */
  .dash-mini-item{padding:12px 14px;min-height:48px}
  .dash-mini-title{font-size:14px}

  /* ── Body padding for bottom nav ── */
  .ucmd-env{padding-bottom:140px}
  .has-portal-nav{padding-bottom:140px}
}

/* ── Unified Command Tablet Nav (Tabs at bottom) ── */
.tj-ucmd-tabs{
  display:none;position:fixed;bottom:68px;left:0;right:0;z-index:96;
  background:rgba(28,30,33,.97);backdrop-filter:blur(12px);
  border-top:1px solid rgba(140,106,62,.20);
  padding:6px 8px;overflow-x:auto;-webkit-overflow-scrolling:touch;
  scrollbar-width:none
}
.tj-ucmd-tabs::-webkit-scrollbar{display:none}
.tj-ucmd-tabs-inner{
  display:flex;gap:4px;justify-content:center;
  max-width:900px;margin:0 auto
}
.tj-ucmd-tab-btn{
  display:flex;flex-direction:column;align-items:center;gap:3px;
  padding:8px 12px;border-radius:10px;font-size:10px;font-weight:650;
  color:var(--muted);background:none;border:none;cursor:pointer;
  white-space:nowrap;min-height:44px;min-width:60px;justify-content:center;
  transition:color .15s;-webkit-tap-highlight-color:transparent
}
.tj-ucmd-tab-btn svg{width:20px;height:20px;flex-shrink:0}
.tj-ucmd-tab-btn.active{color:var(--bronze)}
.tj-ucmd-tab-btn:active{background:rgba(140,106,62,.1)}

@media(max-width:1194px){
  .tj-ucmd-tabs{display:block}
}

/* ── Portal Quick Actions (dashboard-specific) ── */
.tj-portal-quick-grid{
  display:none;position:fixed;bottom:68px;left:0;right:0;z-index:96;
  background:rgba(28,30,33,.97);backdrop-filter:blur(12px);
  border-top:1px solid rgba(140,106,62,.20);
  padding:8px 12px;overflow-x:auto;-webkit-overflow-scrolling:touch;
  scrollbar-width:none
}
.tj-portal-quick-grid::-webkit-scrollbar{display:none}
.tj-portal-quick-inner{
  display:flex;gap:8px;
  max-width:900px;margin:0 auto
}

@media(max-width:1194px){
  .tj-portal-quick-grid{display:block}
  /* Hide desktop portal module nav on tablet */
  .portal-module-nav{display:none!important}
}
