/* ============================================================
   TradeForge Mobile OS — Unified Mobile Design System
   A purpose-built mobile experience for construction operators.
   Lead → Scope → Estimate → Project → Field → Closeout → Trust
   ============================================================ */

/* ----------------------------------------------------------
   1. MOBILE TOKENS
   ---------------------------------------------------------- */
:root {
  --mos-nav-h: 56px;
  --mos-bottom-h: 60px;
  --mos-safe-b: env(safe-area-inset-bottom, 0px);
  --mos-safe-t: env(safe-area-inset-top, 0px);
  --mos-pad: 16px;
  --mos-pad-sm: 12px;
  --mos-pad-xs: 8px;
  --mos-gap: 12px;
  --mos-gap-sm: 8px;
  --mos-radius: 12px;
  --mos-radius-sm: 8px;
  --mos-radius-lg: 16px;
  --mos-touch-min: 44px;
  --mos-card-bg: linear-gradient(180deg, rgba(46,49,54,.96), rgba(46,49,54,.82));
  --mos-card-border: rgba(181,183,185,.10);
  --mos-surface: rgba(28,30,33,.97);
  --mos-overlay: rgba(15,17,20,.85);
  --mos-bronze: #8C6A3E;
  --mos-bronze-subtle: rgba(140,106,62,.12);
  --mos-bronze-border: rgba(140,106,62,.25);
  --mos-text: #e8edf2;
  --mos-text-secondary: rgba(181,183,185,.72);
  --mos-text-muted: rgba(181,183,185,.48);
  --mos-danger: #d56666;
  --mos-success: #6abf69;
  --mos-warning: #f59e0b;
  --mos-info: #5b9bd5;
}

/* ----------------------------------------------------------
   2. MOBILE TYPOGRAPHY SCALE
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-h1, .mos-page-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--mos-text);
    margin: 0;
  }
  .mos-h2, .mos-section-title {
    font-size: 16px;
    font-weight: 650;
    line-height: 1.3;
    color: var(--mos-text);
    margin: 0;
  }
  .mos-h3, .mos-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--mos-text);
    margin: 0;
  }
  .mos-body {
    font-size: 14px;
    line-height: 1.5;
    color: var(--mos-text-secondary);
  }
  .mos-caption {
    font-size: 12px;
    line-height: 1.4;
    color: var(--mos-text-muted);
  }
  .mos-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mos-text-muted);
  }
  .mos-metric {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: var(--mos-text);
  }
  .mos-metric-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--mos-text-muted);
    margin-top: 2px;
  }
}

/* ----------------------------------------------------------
   3. MOBILE SHELL — Header
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-header {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--mos-nav-h);
    padding: 0 var(--mos-pad);
    padding-top: var(--mos-safe-t);
    background: var(--mos-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--mos-bronze-border);
  }
  .mos-header-brand {
    font-size: 15px;
    font-weight: 700;
    color: var(--mos-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    text-decoration: none;
  }
  .mos-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .mos-header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--mos-text-secondary);
    cursor: pointer;
    transition: background .15s, border-color .15s;
    position: relative;
  }
  .mos-header-btn:active {
    background: var(--mos-bronze-subtle);
    border-color: var(--mos-bronze-border);
  }
  .mos-header-btn svg {
    width: 20px;
    height: 20px;
  }
  .mos-header-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mos-danger);
    border: 2px solid var(--mos-surface);
  }
}

/* ----------------------------------------------------------
   4. MOBILE SHELL — Bottom Navigation
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: calc(var(--mos-bottom-h) + var(--mos-safe-b));
    padding-bottom: var(--mos-safe-b);
    background: var(--mos-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--mos-bronze-border);
  }
  .mos-bottom-nav a,
  .mos-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-height: var(--mos-touch-min);
    padding: 6px 2px;
    font-size: 10px;
    font-weight: 600;
    color: var(--mos-text-muted);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    transition: color .15s;
    -webkit-tap-highlight-color: transparent;
  }
  .mos-bottom-nav a svg,
  .mos-bottom-nav button svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }
  .mos-bottom-nav a.active,
  .mos-bottom-nav button.active {
    color: var(--mos-bronze);
  }
  .mos-bottom-nav a:active,
  .mos-bottom-nav button:active {
    color: var(--mos-bronze);
    opacity: .8;
  }

  /* Body padding for bottom nav */
  body.mos-shell {
    padding-bottom: calc(var(--mos-bottom-h) + var(--mos-safe-b) + 8px);
  }
}

/* ----------------------------------------------------------
   5. MOBILE CARDS
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-card {
    background: var(--mos-card-bg);
    border: 1px solid var(--mos-card-border);
    border-radius: var(--mos-radius);
    padding: var(--mos-pad);
    transition: border-color .15s;
  }
  .mos-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--mos-gap-sm);
  }
  .mos-card-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .mos-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--mos-bronze-subtle);
    color: var(--mos-bronze);
    flex-shrink: 0;
  }
  .mos-card-icon svg {
    width: 16px;
    height: 16px;
  }
  .mos-card-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--mos-text-muted);
    background: rgba(140,106,62,.08);
    padding: 2px 8px;
    border-radius: 10px;
  }
  .mos-card-body {
    display: flex;
    flex-direction: column;
    gap: var(--mos-gap-sm);
  }
  .mos-card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: var(--mos-gap-sm);
    padding: 10px;
    border-radius: var(--mos-radius-sm);
    border: 1px solid var(--mos-bronze-border);
    background: transparent;
    color: var(--mos-bronze);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    min-height: var(--mos-touch-min);
    transition: background .15s;
    width: 100%;
    text-align: center;
  }
  .mos-card-action:active {
    background: var(--mos-bronze-subtle);
  }

  /* Compact card variant */
  .mos-card-compact {
    padding: var(--mos-pad-sm);
  }

  /* Actionable card - entire card is tappable */
  .mos-card-tap {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mos-card-tap:active {
    border-color: var(--mos-bronze-border);
    transform: scale(.985);
  }
}

/* ----------------------------------------------------------
   6. MOBILE BUTTONS
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--mos-touch-min);
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .mos-btn:active {
    transform: scale(.97);
  }
  .mos-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }
  .mos-btn-primary {
    background: var(--mos-bronze);
    color: var(--ink, #0f1114);
    border-color: rgba(140,106,62,.65);
  }
  .mos-btn-secondary {
    background: transparent;
    color: var(--mos-text);
    border-color: var(--mos-bronze-border);
  }
  .mos-btn-secondary:active {
    background: var(--mos-bronze-subtle);
  }
  .mos-btn-ghost {
    background: transparent;
    color: var(--mos-bronze);
    border-color: transparent;
    padding: 10px 12px;
  }
  .mos-btn-danger {
    background: rgba(213,102,102,.12);
    color: var(--mos-danger);
    border-color: rgba(213,102,102,.25);
  }
  .mos-btn-block {
    width: 100%;
  }
  .mos-action-bar {
    padding: var(--mos-gap-sm) 0;
  }
  .mos-btn-sm {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 13px;
  }
  .mos-btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
  }
}

/* ----------------------------------------------------------
   7. STATUS TAGS
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
  }
  .mos-tag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .mos-tag-active {
    background: rgba(106,191,105,.10);
    color: var(--mos-success);
  }
  .mos-tag-active .mos-tag-dot { background: var(--mos-success); }
  .mos-tag-urgent {
    background: rgba(213,102,102,.10);
    color: var(--mos-danger);
  }
  .mos-tag-urgent .mos-tag-dot { background: var(--mos-danger); }
  .mos-tag-warning {
    background: rgba(245,158,11,.10);
    color: var(--mos-warning);
  }
  .mos-tag-warning .mos-tag-dot { background: var(--mos-warning); }
  .mos-tag-info {
    background: rgba(91,155,213,.10);
    color: var(--mos-info);
  }
  .mos-tag-info .mos-tag-dot { background: var(--mos-info); }
  .mos-tag-neutral {
    background: rgba(181,183,185,.08);
    color: var(--mos-text-secondary);
  }
  .mos-tag-neutral .mos-tag-dot { background: var(--mos-text-secondary); }
  .mos-tag-bronze {
    background: var(--mos-bronze-subtle);
    color: var(--mos-bronze);
  }
  .mos-tag-bronze .mos-tag-dot { background: var(--mos-bronze); }
}

/* ----------------------------------------------------------
   8. MOBILE LISTS / ACTIVITY ITEMS
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: rgba(181,183,185,.04);
    border-radius: var(--mos-radius);
    overflow: hidden;
  }
  .mos-list-item {
    display: flex;
    align-items: center;
    gap: var(--mos-gap);
    padding: var(--mos-pad-sm) var(--mos-pad);
    background: rgba(46,49,54,.6);
    min-height: var(--mos-touch-min);
    text-decoration: none;
    color: var(--mos-text);
    transition: background .12s;
    -webkit-tap-highlight-color: transparent;
  }
  .mos-list-item:active {
    background: rgba(140,106,62,.08);
  }
  .mos-list-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--mos-bronze-subtle);
    color: var(--mos-bronze);
    flex-shrink: 0;
  }
  .mos-list-item-icon svg {
    width: 18px;
    height: 18px;
  }
  .mos-list-item-content {
    flex: 1;
    min-width: 0;
  }
  .mos-list-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--mos-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mos-list-item-sub {
    font-size: 12px;
    color: var(--mos-text-muted);
    margin-top: 1px;
  }
  .mos-list-item-trail {
    font-size: 11px;
    color: var(--mos-text-muted);
    flex-shrink: 0;
    text-align: right;
  }
  .mos-list-item-arrow {
    color: var(--mos-text-muted);
    flex-shrink: 0;
  }
  .mos-list-item-arrow svg {
    width: 16px;
    height: 16px;
  }
}

/* ----------------------------------------------------------
   9. EMPTY STATES
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-empty,
  .mos-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--mos-gap);
    padding: 32px var(--mos-pad);
    text-align: center;
    border: 1px dashed rgba(181,183,185,.12);
    border-radius: var(--mos-radius);
    background: rgba(46,49,54,.3);
  }
  .mos-empty-icon {
    width: 40px;
    height: 40px;
    color: var(--mos-text-muted);
    opacity: .5;
  }
  .mos-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--mos-text-secondary);
  }
  .mos-empty-desc,
  .mos-empty-state-text {
    font-size: 13px;
    color: var(--mos-text-muted);
    max-width: 260px;
    line-height: 1.5;
  }

  /* Mobile loading state normalization */
  .mos-shell .tf-loading-state {
    padding: 24px var(--mos-pad);
    min-height: 60px;
    font-size: 13px;
  }
  .mos-shell .tf-loading-spinner {
    width: 14px;
    height: 14px;
  }

  /* Mobile error state normalization */
  .mos-shell .tf-error-state {
    padding: 24px var(--mos-pad);
    min-height: 80px;
    border-radius: var(--mos-radius);
  }

  /* Mobile empty state icon guard */
  .mos-empty-icon svg,
  .mos-empty svg {
    width: 32px;
    height: 32px;
    max-width: 40px;
    max-height: 40px;
  }

  /* Prevent giant symbols in mobile cards */
  .mos-card svg,
  .mos-list-item svg {
    max-width: 24px;
    max-height: 24px;
  }
}

/* ----------------------------------------------------------
   10. ALERTS / BANNERS
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--mos-gap);
    padding: var(--mos-pad-sm) var(--mos-pad);
    border-radius: var(--mos-radius-sm);
    border-left: 3px solid;
  }
  .mos-alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
  }
  .mos-alert-content {
    flex: 1;
    min-width: 0;
  }
  .mos-alert-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
  }
  .mos-alert-body {
    font-size: 12px;
    line-height: 1.4;
    color: var(--mos-text-secondary);
  }
  .mos-alert-urgent {
    background: rgba(213,102,102,.06);
    border-left-color: var(--mos-danger);
  }
  .mos-alert-urgent .mos-alert-title,
  .mos-alert-urgent .mos-alert-icon { color: var(--mos-danger); }
  .mos-alert-warning {
    background: rgba(245,158,11,.06);
    border-left-color: var(--mos-warning);
  }
  .mos-alert-warning .mos-alert-title,
  .mos-alert-warning .mos-alert-icon { color: var(--mos-warning); }
  .mos-alert-success {
    background: rgba(106,191,105,.06);
    border-left-color: var(--mos-success);
  }
  .mos-alert-success .mos-alert-title,
  .mos-alert-success .mos-alert-icon { color: var(--mos-success); }
  .mos-alert-info {
    background: rgba(91,155,213,.06);
    border-left-color: var(--mos-info);
  }
  .mos-alert-info .mos-alert-title,
  .mos-alert-info .mos-alert-icon { color: var(--mos-info); }
}

/* ----------------------------------------------------------
   11. BOTTOM SHEETS / DRAWERS
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: var(--mos-overlay);
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
  }
  .mos-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
  .mos-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 301;
    max-height: 85vh;
    background: rgba(38,40,44,.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--mos-radius-lg) var(--mos-radius-lg) 0 0;
    border-top: 1px solid var(--mos-bronze-border);
    transform: translateY(100%);
    transition: transform .25s ease-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: var(--mos-safe-b);
  }
  .mos-sheet.active {
    transform: translateY(0);
  }
  .mos-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 10px;
    flex-shrink: 0;
  }
  .mos-sheet-handle::after {
    content: '';
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(181,183,185,.25);
  }
  .mos-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--mos-pad) var(--mos-pad-sm);
    flex-shrink: 0;
  }
  .mos-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 var(--mos-pad) var(--mos-pad);
    -webkit-overflow-scrolling: touch;
  }
  .mos-sheet-actions {
    display: flex;
    gap: var(--mos-gap-sm);
    padding: var(--mos-pad);
    border-top: 1px solid rgba(181,183,185,.06);
    flex-shrink: 0;
  }
}

/* ----------------------------------------------------------
   12. FORM CONTROLS (MOBILE)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-input {
    display: block;
    width: 100%;
    min-height: var(--mos-touch-min);
    padding: 10px 14px;
    font-size: 16px; /* prevents iOS zoom */
    font-weight: 500;
    color: var(--mos-text);
    background: rgba(46,49,54,.6);
    border: 1px solid rgba(181,183,185,.10);
    border-radius: var(--mos-radius-sm);
    transition: border-color .15s;
    -webkit-appearance: none;
    appearance: none;
  }
  .mos-input:focus {
    outline: none;
    border-color: var(--mos-bronze);
    box-shadow: 0 0 0 3px rgba(140,106,62,.15);
  }
  .mos-input::placeholder {
    color: var(--mos-text-muted);
  }
  .mos-textarea {
    min-height: 80px;
    resize: vertical;
  }
  .mos-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B5B7B9' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
  }
  .mos-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .mos-form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--mos-text-secondary);
  }
  .mos-form-hint {
    font-size: 12px;
    color: var(--mos-text-muted);
  }
  .mos-form-row {
    display: flex;
    flex-direction: column;
    gap: var(--mos-gap);
  }
}

/* ----------------------------------------------------------
   13. PROJECT CARDS (MOBILE)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-project-card {
    background: var(--mos-card-bg);
    border: 1px solid var(--mos-card-border);
    border-radius: var(--mos-radius);
    padding: var(--mos-pad);
    display: flex;
    flex-direction: column;
    gap: var(--mos-gap-sm);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color .12s, transform .1s;
  }
  .mos-project-card:active {
    border-color: var(--mos-bronze-border);
    transform: scale(.985);
  }
  .mos-project-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--mos-gap-sm);
  }
  .mos-project-card-name {
    font-size: 15px;
    font-weight: 650;
    color: var(--mos-text);
    line-height: 1.3;
  }
  .mos-project-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }
  .mos-project-card-meta span {
    font-size: 12px;
    color: var(--mos-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .mos-project-card-meta svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
  .mos-project-card-progress {
    height: 3px;
    border-radius: 2px;
    background: rgba(181,183,185,.08);
    overflow: hidden;
  }
  .mos-project-card-progress-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--mos-bronze);
    transition: width .3s;
  }
  .mos-project-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}

/* ----------------------------------------------------------
   14. TRUST INDICATORS
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-trust {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .mos-trust-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(181,183,185,.08);
    overflow: hidden;
  }
  .mos-trust-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--mos-bronze);
    transition: width .3s;
  }
  .mos-trust-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--mos-text-muted);
    min-width: 32px;
    text-align: right;
  }
  .mos-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--mos-success);
  }
  .mos-verified svg {
    width: 14px;
    height: 14px;
  }
}

/* ----------------------------------------------------------
   15. SECTION HEADERS (MOBILE)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-section {
    display: flex;
    flex-direction: column;
    gap: var(--mos-gap);
  }
  .mos-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--mos-gap-sm);
  }
  .mos-section-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .mos-section-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--mos-bronze);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ----------------------------------------------------------
   16. MOBILE GRIDS
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--mos-gap);
  }
  .mos-grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--mos-gap);
  }
  .mos-stack {
    display: flex;
    flex-direction: column;
    gap: var(--mos-gap);
  }
  .mos-stack-sm {
    gap: var(--mos-gap-sm);
  }
  .mos-stack-lg {
    gap: 20px;
  }
  .mos-row {
    display: flex;
    align-items: center;
    gap: var(--mos-gap);
  }
  .mos-scroll-h {
    display: flex;
    gap: var(--mos-gap);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }
  .mos-scroll-h::-webkit-scrollbar { display: none; }
  .mos-scroll-h > * {
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

/* ----------------------------------------------------------
   17. MOBILE PAGE LAYOUT
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-page {
    padding: var(--mos-pad);
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
    overflow-x: hidden;
  }
  .mos-page-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .mos-page-subtitle {
    font-size: 13px;
    color: var(--mos-text-muted);
  }

  /* System flow bar - compact on mobile */
  .mos-flow-bar {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
  }
  .mos-flow-bar::-webkit-scrollbar { display: none; }
  .mos-flow-step {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--mos-text-muted);
    background: rgba(46,49,54,.6);
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    min-height: 28px;
  }
  .mos-flow-step.active {
    background: var(--mos-bronze-subtle);
    color: var(--mos-bronze);
  }
  .mos-flow-arrow {
    color: var(--mos-text-muted);
    font-size: 10px;
    flex-shrink: 0;
    opacity: .4;
  }
}

/* ----------------------------------------------------------
   18. QUICK ACTIONS STRIP
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-quick-actions {
    display: flex;
    gap: var(--mos-gap-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0;
  }
  .mos-quick-actions::-webkit-scrollbar { display: none; }
  .mos-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    min-width: 72px;
    border-radius: var(--mos-radius-sm);
    border: 1px solid rgba(181,183,185,.08);
    background: rgba(46,49,54,.5);
    color: var(--mos-text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    transition: background .12s, border-color .12s;
    -webkit-tap-highlight-color: transparent;
  }
  .mos-quick-action:active {
    background: var(--mos-bronze-subtle);
    border-color: var(--mos-bronze-border);
  }
  .mos-quick-action svg {
    width: 20px;
    height: 20px;
    color: var(--mos-bronze);
  }
}

/* ----------------------------------------------------------
   19. METRIC CARDS
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-metric-card {
    background: var(--mos-card-bg);
    border: 1px solid var(--mos-card-border);
    border-radius: var(--mos-radius);
    padding: var(--mos-pad-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 72px;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color .12s;
  }
  .mos-metric-card:active {
    border-color: var(--mos-bronze-border);
  }
}

/* ----------------------------------------------------------
   20. NOTIFICATION ITEMS
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-notif {
    display: flex;
    align-items: flex-start;
    gap: var(--mos-gap);
    padding: var(--mos-pad-sm) var(--mos-pad);
    border-bottom: 1px solid rgba(181,183,185,.04);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s;
  }
  .mos-notif:active {
    background: rgba(140,106,62,.06);
  }
  .mos-notif-unread {
    background: rgba(140,106,62,.03);
  }
  .mos-notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mos-bronze);
    flex-shrink: 0;
    margin-top: 5px;
  }
  .mos-notif-content {
    flex: 1;
    min-width: 0;
  }
  .mos-notif-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--mos-text);
    line-height: 1.35;
  }
  .mos-notif-body {
    font-size: 13px;
    color: var(--mos-text-muted);
    margin-top: 2px;
    line-height: 1.4;
  }
  .mos-notif-time {
    font-size: 11px;
    color: var(--mos-text-muted);
    margin-top: 4px;
  }
}

/* ----------------------------------------------------------
   21. FIELD MODE STYLES
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-field-card {
    background: var(--mos-card-bg);
    border: 1px solid var(--mos-card-border);
    border-radius: var(--mos-radius);
    overflow: hidden;
  }
  .mos-field-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--mos-pad-sm) var(--mos-pad);
    border-bottom: 1px solid rgba(181,183,185,.06);
  }
  .mos-field-card-body {
    padding: var(--mos-pad);
  }
  .mos-task-item {
    display: flex;
    align-items: center;
    gap: var(--mos-gap);
    padding: var(--mos-pad-sm) 0;
    border-bottom: 1px solid rgba(181,183,185,.04);
    min-height: var(--mos-touch-min);
  }
  .mos-task-item:last-child { border-bottom: none; }
  .mos-task-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid var(--mos-bronze-border);
    background: transparent;
    color: transparent;
    flex-shrink: 0;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
  }
  .mos-task-check.done {
    background: var(--mos-bronze);
    border-color: var(--mos-bronze);
    color: var(--ink, #0f1114);
  }
  .mos-task-check svg {
    width: 16px;
    height: 16px;
  }
  .mos-task-content {
    flex: 1;
    min-width: 0;
  }
  .mos-task-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--mos-text);
  }
  .mos-task-name.done {
    text-decoration: line-through;
    opacity: .5;
  }
  .mos-task-detail {
    font-size: 12px;
    color: var(--mos-text-muted);
    margin-top: 1px;
  }

  /* Shift status bar */
  .mos-shift-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--mos-pad);
    background: var(--mos-card-bg);
    border: 1px solid var(--mos-card-border);
    border-radius: var(--mos-radius);
  }
  .mos-shift-timer {
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--mos-text);
  }
  .mos-shift-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
  }
  .mos-shift-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: mos-pulse 2s ease-in-out infinite;
  }
  @keyframes mos-pulse {
    0%, 100% { opacity: .4; }
    50% { opacity: 1; }
  }

  /* Photo upload grid */
  .mos-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--mos-gap-sm);
  }
  .mos-photo-thumb {
    aspect-ratio: 1;
    border-radius: var(--mos-radius-sm);
    overflow: hidden;
    background: rgba(46,49,54,.6);
    border: 1px solid rgba(181,183,185,.06);
  }
  .mos-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .mos-photo-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    aspect-ratio: 1;
    border-radius: var(--mos-radius-sm);
    border: 1px dashed var(--mos-bronze-border);
    background: var(--mos-bronze-subtle);
    color: var(--mos-bronze);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
  }
  .mos-photo-add svg {
    width: 24px;
    height: 24px;
  }
}

/* ----------------------------------------------------------
   22. GLOBAL MOBILE OVERRIDES
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  /* Hide desktop-only elements */
  .mos-desktop-only,
  .crew-hide-mobile {
    display: none !important;
  }

  /* Show mobile-only elements */
  .mos-mobile-only {
    display: block;
  }

  /* Fix common desktop leftovers */
  body {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
  }

  /* Ensure no horizontal overflow */
  html, body {
    overflow-x: hidden;
  }

  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
  }

  /* Hide existing conflicting nav elements when shell is active */
  body.mos-shell .nav {
    display: none;
  }
  body.mos-shell .portal-module-nav {
    display: none;
  }
  body.mos-shell .tf-system-route {
    display: none;
  }
  body.mos-shell .tf-system-flow {
    display: none;
  }
  body.mos-shell .footer {
    display: none;
  }

  /* Ensure existing mobile navs are hidden when shell is active */
  body.mos-shell .cc-mobile-nav,
  body.mos-shell .pe-mobile-nav,
  body.mos-shell .tj-bottom-nav,
  body.mos-shell .portal-mobile-nav,
  body.mos-shell .ph-mobile-bar {
    display: none !important;
  }

  /* Override command center top strip */
  body.mos-shell .cc-top-strip {
    display: none;
  }

  /* Fix container padding */
  body.mos-shell .container {
    padding-left: 0;
    padding-right: 0;
  }

  /* Consistent page padding */
  body.mos-shell .cc-page,
  body.mos-shell .pe-workspace,
  body.mos-shell .mp-workspace {
    padding: 0;
    max-width: 100%;
  }

  /* Consistent card sizing - no oversized anything */
  body.mos-shell svg {
    max-width: 24px;
    max-height: 24px;
  }
  body.mos-shell .mos-card-icon svg,
  body.mos-shell .mos-list-item-icon svg,
  body.mos-shell .mos-bottom-nav svg,
  body.mos-shell .mos-header-btn svg,
  body.mos-shell .mos-quick-action svg,
  body.mos-shell .mos-photo-add svg {
    max-width: none;
    max-height: none;
  }
  body.mos-shell h1 {
    font-size: 22px;
  }
  body.mos-shell h2 {
    font-size: 17px;
  }
  body.mos-shell h3 {
    font-size: 15px;
  }
}

/* Hide on desktop */
@media (min-width: 769px) {
  .mos-mobile-only,
  .mos-header,
  .mos-bottom-nav {
    display: none !important;
  }
}

/* ----------------------------------------------------------
   23. ANIMATIONS
   ---------------------------------------------------------- */
@keyframes mos-slide-up {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes mos-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (max-width: 768px) {
  .mos-animate-up {
    animation: mos-slide-up .25s ease-out;
  }
  .mos-animate-fade {
    animation: mos-fade-in .2s ease-out;
  }
}

/* ----------------------------------------------------------
   24. OPPORTUNITY CARDS (MOBILE)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-opp-card {
    background: var(--mos-card-bg);
    border: 1px solid var(--mos-card-border);
    border-radius: var(--mos-radius);
    padding: var(--mos-pad);
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color .12s;
  }
  .mos-opp-card:active {
    border-color: var(--mos-bronze-border);
  }
  .mos-opp-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
  }
  .mos-opp-card-title {
    font-size: 15px;
    font-weight: 650;
    color: var(--mos-text);
    line-height: 1.3;
  }
  .mos-opp-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .mos-opp-card-detail {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--mos-text-muted);
  }
  .mos-opp-card-detail svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--mos-text-muted);
  }
  .mos-opp-card-trades {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .mos-opp-card-trade {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--mos-bronze-subtle);
    color: var(--mos-bronze);
  }
  .mos-opp-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
  }
  .mos-opp-card-actions .mos-btn {
    flex: 1;
  }
}

/* ----------------------------------------------------------
   25. DOCUMENT LIST (MOBILE)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-doc-item {
    display: flex;
    align-items: center;
    gap: var(--mos-gap);
    padding: var(--mos-pad-sm) 0;
    border-bottom: 1px solid rgba(181,183,185,.04);
    min-height: var(--mos-touch-min);
  }
  .mos-doc-item:last-child { border-bottom: none; }
  .mos-doc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
  }
  .mos-doc-icon-pdf {
    background: rgba(213,102,102,.12);
    color: var(--mos-danger);
  }
  .mos-doc-icon-img {
    background: rgba(91,155,213,.12);
    color: var(--mos-info);
  }
  .mos-doc-icon-doc {
    background: rgba(106,191,105,.12);
    color: var(--mos-success);
  }
  .mos-doc-icon-default {
    background: rgba(181,183,185,.08);
    color: var(--mos-text-muted);
  }
  .mos-doc-info {
    flex: 1;
    min-width: 0;
  }
  .mos-doc-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--mos-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mos-doc-meta {
    font-size: 12px;
    color: var(--mos-text-muted);
    margin-top: 1px;
  }
}

/* ----------------------------------------------------------
   26. PROFILE CARD (MOBILE)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--mos-gap);
    padding: 24px var(--mos-pad);
    background: var(--mos-card-bg);
    border: 1px solid var(--mos-card-border);
    border-radius: var(--mos-radius);
    text-align: center;
  }
  .mos-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--mos-bronze-subtle);
    color: var(--mos-bronze);
    font-weight: 700;
    text-transform: uppercase;
  }
  .mos-avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 22px;
  }
  .mos-avatar-md {
    width: 40px;
    height: 40px;
    font-size: 15px;
  }
  .mos-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  .mos-profile-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--mos-text);
  }
  .mos-profile-role {
    font-size: 13px;
    color: var(--mos-text-muted);
  }
  .mos-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }
}

/* ----------------------------------------------------------
   26b. SEARCH BAR (MOBILE)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-search,
  .mos-search-bar {
    padding: 0 0 var(--mos-gap-sm);
  }
  .mos-search-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(181,183,185,.12);
    background: rgba(46,49,54,.5);
    color: var(--mos-text, #e8edf2);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
  }
  .mos-search-input:focus {
    border-color: var(--mos-bronze-border, rgba(140,106,62,.4));
  }
  .mos-search-input::placeholder {
    color: var(--mos-text-secondary, rgba(181,183,185,.6));
  }
}

/* ----------------------------------------------------------
   27. FILTER BAR (MOBILE)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-filter-bar,
  .mos-filter-chips,
  .mos-chip-bar {
    display: flex;
    gap: var(--mos-gap-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0;
  }
  .mos-filter-bar::-webkit-scrollbar,
  .mos-filter-chips::-webkit-scrollbar,
  .mos-chip-bar::-webkit-scrollbar { display: none; }
  .mos-filter-chip,
  .mos-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid rgba(181,183,185,.12);
    background: rgba(46,49,54,.5);
    color: var(--mos-text-secondary);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s, border-color .12s;
  }
  .mos-filter-chip:active,
  .mos-filter-chip.active,
  .mos-chip:active,
  .mos-chip.mos-chip-active {
    background: var(--mos-bronze-subtle);
    border-color: var(--mos-bronze-border);
    color: var(--mos-bronze);
  }
  .mos-filter-chip svg,
  .mos-chip svg {
    width: 14px;
    height: 14px;
  }
}

/* ----------------------------------------------------------
   28. TAB BAR (MOBILE)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mos-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid rgba(181,183,185,.06);
  }
  .mos-tabs::-webkit-scrollbar { display: none; }
  .mos-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mos-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color .12s, border-color .12s;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    min-height: var(--mos-touch-min);
  }
  .mos-tab.active {
    color: var(--mos-bronze);
    border-bottom-color: var(--mos-bronze);
  }
  .mos-tab:active {
    color: var(--mos-bronze);
  }
  .mos-tab svg {
    width: 16px;
    height: 16px;
  }
}

/* ----------------------------------------------------------
   29. DESKTOP CLEANUP — Hide desktop-only patterns on mobile
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  /* Hide all existing desktop navs when mobile shell is active */
  body.mos-shell .nav-toggle {
    display: none;
  }
  body.mos-shell .hero,
  body.mos-shell .portal-hero,
  body.mos-shell .cta-band {
    display: none;
  }
  body.mos-shell .portal-nav-grid,
  body.mos-shell .portal-control-card,
  body.mos-shell .ecosystem-links {
    display: none;
  }

  /* Fix oversized headings and icons that leak from desktop */
  body.mos-shell .section h2 {
    font-size: 17px;
    line-height: 1.3;
  }
  body.mos-shell .section h3 {
    font-size: 15px;
  }
  body.mos-shell .card {
    padding: 14px;
  }
  body.mos-shell .grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  body.mos-shell .grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Command center page adjustments */
  body.mos-shell .cc-page {
    padding: 0;
  }
  body.mos-shell .cc-section {
    padding: 0 16px;
  }
  body.mos-shell .cc-bottom-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  body.mos-shell .cc-metrics-bar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  body.mos-shell .cc-module-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  /* Project workspace mobile fixes */
  body.mos-shell .pe-header-row {
    flex-direction: column;
    gap: 8px;
  }
  body.mos-shell .pe-grid-2,
  body.mos-shell .pe-grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  body.mos-shell .tf-quick-actions-strip {
    display: none;
  }

  /* Marketplace mobile fixes */
  body.mos-shell .mp-hero {
    display: none;
  }
  body.mos-shell .mp-filters {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  body.mos-shell .mp-search-row {
    flex-direction: column;
    gap: 8px;
  }
  body.mos-shell .mp-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  body.mos-shell .mp-card {
    padding: 14px;
  }

  /* Profile page mobile fixes */
  body.mos-shell .ph-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  body.mos-shell .ph-side-col {
    order: -1;
  }
  body.mos-shell .ph-banner {
    display: none;
  }
  body.mos-shell .ph-id-card {
    flex-direction: column;
    text-align: center;
  }
  body.mos-shell .ph-stats-strip {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  body.mos-shell .ph-quick-actions {
    display: none;
  }

  /* Remove all FAQ / marketing sections on mobile */
  body.mos-shell .portal-faq,
  body.mos-shell .ops-support,
  body.mos-shell .operating-flow {
    display: none;
  }

  /* Fix footer to not show on mobile with shell */
  body.mos-shell footer,
  body.mos-shell .footer {
    display: none !important;
  }

  /* Ensure body scroll works properly */
  body.mos-shell {
    min-height: 100vh;
    min-height: 100dvh;
  }

  /* Fix container widths */
  body.mos-shell .container {
    max-width: 100%;
    padding: 0 16px;
  }

  /* Consistent icon sizing - prevent oversized SVGs */
  body.mos-shell .card svg,
  body.mos-shell .section svg,
  body.mos-shell .cc-card svg {
    max-width: 20px;
    max-height: 20px;
  }

  /* Field execution mobile cleanup */
  body.mos-shell .field-header {
    display: none;
  }

  /* Command strip cards should stack on mobile */
  body.mos-shell .cmd-strip {
    flex-direction: column;
    gap: 8px;
  }
  body.mos-shell .cmd-strip-card {
    width: 100%;
  }

  /* Quick dropdown positioning fix */
  body.mos-shell .cc-quick-dropdown,
  body.mos-shell .cc-notif-dropdown {
    display: none;
  }

  /* Activity layer mobile cleanup */
  body.mos-shell .operations-activity-layer {
    padding: 0 16px;
  }

  /* Remove workflow engine bottom sections */
  body.mos-shell .wf-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------
   30. PRINT — Hide mobile shell when printing
   ---------------------------------------------------------- */
@media print {
  .mos-header,
  .mos-bottom-nav,
  .mos-sheet-overlay,
  .mos-sheet,
  .mos-mobile-only {
    display: none !important;
  }
}
