/* ============================================================
   SignalOne Mobile View Mode – Elite Design System
   Brand: #F47C20  |  Dark + Light adaptive
   Scope: body.so-mobile-view-mode only
   Philosophy: Apple / Audi / Google restraint & precision
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
body.so-mobile-view-mode {
  --so-orange:       #F47C20;
  --so-orange-dim:   rgba(244, 124, 32, 0.65);
  --so-orange-glow:  rgba(244, 124, 32, 0.22);
  --so-bg:           #0a0908;
  --so-surface:      #1a1611;
  --so-surface-hi:   #221c14;
  --so-border:       rgba(255, 255, 255, 0.07);
  --so-border-hi:    rgba(255, 255, 255, 0.12);
  --so-text-1:       #ffffff;
  --so-text-2:       rgba(255, 255, 255, 0.58);
  --so-text-3:       rgba(255, 255, 255, 0.32);
  --so-shadow-sm:    0 2px 8px  rgba(0,0,0,0.45);
  --so-shadow-md:    0 6px 24px rgba(0,0,0,0.55);
  --so-shadow-lg:    0 12px 40px rgba(0,0,0,0.65);
  --so-radius-sm:    12px;
  --so-radius-md:    18px;
  --so-radius-lg:    22px;
  --so-live:         #34d399;
  --so-live-glow:    rgba(52, 211, 153, 0.22);
  --so-danger:       #f87171;
}

/* Dark brand always — consistent identity across all system settings */

@media (max-width: 768px) {

  /* ── Base resets ──────────────────────────────────────────── */
  html {
    height: auto !important;
    overflow-y: auto !important;
    position: static !important;
  }

  body.so-mobile-view-mode {
    height: auto !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    touch-action: auto !important;
    position: static !important;
    background-color: var(--so-bg) !important;
    background-image:
      radial-gradient(ellipse 85% 40% at 50% -8%,
        rgba(244, 124, 32, 0.16), transparent 60%) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
      'Segoe UI', sans-serif;
    color: var(--so-text-1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body.so-mobile-view-mode .app-shell {
    display: block !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    position: static !important;
  }

  body.so-mobile-view-mode .topbar,
  body.so-mobile-view-mode .so-legal-footer,
  body.so-mobile-view-mode .app-shell > .sidebar,
  body.so-mobile-view-mode .soMobileNav-backdrop,
  body.so-mobile-view-mode #soInstallLayer-fab {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }

  body.so-mobile-view-mode .main-content {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 14px !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    box-sizing: border-box;
    background: transparent;
  }

  body.so-mobile-view-mode .main-container {
    height: auto !important;
    overflow: visible !important;
  }

  body.so-mobile-view-mode .main-content > .view[data-mobile-hidden="1"] {
    display: none !important;
  }

  /* ── Root container ───────────────────────────────────────── */
  #soMobileModeRoot {
    position: relative;
    z-index: 10;
    pointer-events: auto;
  }

  .soMobileMode-root {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0 40px;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
  }

  /* ══════════════════════════════════════════════════════════
     HEADER — The crown jewel. Dark always, brand immersive.
     ══════════════════════════════════════════════════════════ */
  .soMobile-header {
    border-radius: var(--so-radius-lg);
    padding: 22px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
    /* Header stays dark regardless of color scheme – brand identity */
    background: linear-gradient(160deg, #221c12 0%, #14100a 55%, #0e0b07 100%);
    border: 1px solid rgba(244, 124, 32, 0.22);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.06) inset,
      var(--so-shadow-lg),
      0 0 0 1px rgba(244, 124, 32, 0.08) inset;
  }

  /* Top accent line – the Audi signature touch */
  .soMobile-header::before {
    content: '';
    position: absolute;
    top: 0; left: 18px; right: 18px;
    height: 2px;
    background: linear-gradient(90deg,
      transparent 0%,
      rgba(244, 124, 32, 0.60) 30%,
      var(--so-orange) 50%,
      rgba(244, 124, 32, 0.60) 70%,
      transparent 100%);
    border-radius: 0 0 2px 2px;
  }

  /* Ambient glow from top – live state only */
  .soMobile-header.is-live::after {
    content: '';
    position: absolute;
    top: -1px; left: 0; right: 0;
    height: 80px;
    background: radial-gradient(ellipse 60% 100% at 50% 0%,
      rgba(244, 124, 32, 0.14), transparent 70%);
    pointer-events: none;
  }

  .soMobile-header.is-offline {
    border-color: rgba(248, 113, 113, 0.18);
  }

  .soMobile-header.is-offline::before {
    background: linear-gradient(90deg,
      transparent 0%,
      rgba(248, 113, 113, 0.45) 30%,
      var(--so-danger) 50%,
      rgba(248, 113, 113, 0.45) 70%,
      transparent 100%);
  }

  /* ── Logo row – centered, precise ────────────────────────── */
  .soMobile-logoRow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .soMobile-logo {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: block;
    filter: drop-shadow(0 0 10px rgba(244, 124, 32, 0.55));
  }

  .soMobile-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #ffffff;
    line-height: 1;
  }

  /* ── Mode badge row ───────────────────────────────────────── */
  .soMobile-modeBadgeRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
  }

  .soMobile-modeBadge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.80);
  }

  .mode-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
  }

  .soMobile-modeBadge.is-live {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.40);
    color: #34d399;
  }

  .soMobile-modeBadge.is-live .mode-dot {
    background: #34d399;
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.70);
    animation: liveBlink 1.4s ease-in-out infinite;
  }

  .soMobile-modeBadge.is-offline {
    background: rgba(248, 113, 113, 0.10);
    border-color: rgba(248, 113, 113, 0.38);
    color: var(--so-danger);
  }

  .soMobile-modeBadge.is-offline .mode-dot {
    background: var(--so-danger);
    animation: offlinePulse 2s ease-in-out infinite;
  }

  /* ── Platform chips ───────────────────────────────────────── */
  .platforms {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.80);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: transform 150ms ease;
  }

  .platform-chip:active { transform: scale(0.95); }

  .platform-chip-icon {
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }

  .platform-chip-icon svg { width: 13px; height: 13px; display: block; }
  .platform-chip-name { line-height: 1; }

  .platform-chip--meta {
    background: rgba(24, 119, 242, 0.14);
    border-color: rgba(24, 119, 242, 0.40);
    color: #90b8ff;
  }

  .platform-chip--google {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
  }

  .platform-chip--tiktok {
    background: rgba(0, 242, 234, 0.10);
    border-color: rgba(0, 242, 234, 0.35);
    color: #67e8f9;
  }

  /* ── Scope grid ───────────────────────────────────────────── */
  .soMobile-scopeGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .soMobile-scopeItem {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .soMobile-scopeItem.is-offline {
    opacity: 0.38;
    pointer-events: none;
  }

  .soMobile-scopeLabel {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: rgba(244, 124, 32, 0.80);
  }

  .soMobile-scopeSelect {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    padding: 7px 20px 7px 9px;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23F47C20' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 7px center;
    background-size: 8px;
  }

  .soMobile-scopeSelect:focus {
    border-color: var(--so-orange);
    box-shadow: 0 0 0 2px rgba(244, 124, 32, 0.20);
  }

  .soMobile-scopeSelect option {
    background: #1a1208;
    color: #ffffff;
  }

  .soMobile-scopeLocked {
    width: 100%;
    border-radius: 10px;
    padding: 7px 9px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.28);
    font-size: 11px;
    text-align: center;
    cursor: not-allowed;
  }

  /* ── Hero scope context row ───────────────────────────────── */
  .soMobile-heroScope {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--so-border);
  }

  .soMobile-scopeAccount,
  .soMobile-scopeCampaign {
    font-size: 11px;
    font-weight: 500;
    color: var(--so-text-3);
    line-height: 1.3;
  }

  .soMobile-scopeDivider {
    font-size: 11px;
    color: var(--so-text-3);
    margin: 0 6px;
    opacity: 0.5;
  }

  /* ── 3-Signal chip row ────────────────────────────────────── */
  .soMobile-signalRow {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .soMobile-signalChip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px;
    border-radius: var(--so-radius-sm);
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.10);
    min-width: 0;
    overflow: hidden;
    transition: border-color 0.3s ease;
  }

  .soMobile-signalDot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.30);
  }

  .soMobile-signalInfo {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
  }

  .soMobile-signalLabel {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    line-height: 1;
  }

  .soMobile-signalValue {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s ease;
  }

  .soMobile-signalValue.is-fading { opacity: 0; }

  /* Orange: SENSEI chip */
  .soMobile-signalChip.is-orange {
    background: rgba(244, 124, 32, 0.10);
    border-color: rgba(244, 124, 32, 0.28);
  }
  .soMobile-signalChip.is-orange .soMobile-signalDot {
    background: var(--so-orange);
    box-shadow: 0 0 6px rgba(244, 124, 32, 0.70);
    animation: liveBlink 1.6s ease-in-out infinite;
  }
  .soMobile-signalChip.is-orange .soMobile-signalLabel { color: rgba(244, 124, 32, 0.60); }

  /* Green: SIGNAL chip */
  .soMobile-signalChip.is-green {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.24);
  }
  .soMobile-signalChip.is-green .soMobile-signalDot {
    background: #34d399;
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.60);
    animation: liveBlink 2s ease-in-out infinite;
  }
  .soMobile-signalChip.is-green .soMobile-signalLabel { color: rgba(52, 211, 153, 0.55); }

  /* Neutral fallback (unused in live — keep for safety) */
  .soMobile-signalChip.is-neutral .soMobile-signalDot {
    background: rgba(255, 255, 255, 0.38);
  }

  /* Cyan: SYSTEM chip */
  .soMobile-signalChip.is-cyan {
    background: rgba(56, 189, 248, 0.07);
    border-color: rgba(56, 189, 248, 0.22);
  }
  .soMobile-signalChip.is-cyan .soMobile-signalDot {
    background: #38bdf8;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.55);
    animation: liveBlink 2.4s ease-in-out infinite;
  }
  .soMobile-signalChip.is-cyan .soMobile-signalLabel { color: rgba(56, 189, 248, 0.55); }

  /* Offline override */
  .soMobile-signalChip.is-offline {
    opacity: 0.40;
  }
  .soMobile-signalChip.is-offline .soMobile-signalDot {
    background: var(--so-danger);
    box-shadow: none;
    animation: offlinePulse 2s ease-in-out infinite;
  }

  /* ══════════════════════════════════════════════════════════
     TAB BAR — Precision pill navigation
     ══════════════════════════════════════════════════════════ */
  .soMobileMode-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 4px;
    border-radius: var(--so-radius-md);
    background: var(--so-surface);
    border: 1px solid var(--so-border);
    box-shadow: var(--so-shadow-sm);
  }

  .soMobileMode-tab {
    flex: 1;
    padding: 10px 4px;
    border-radius: 13px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--so-text-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    cursor: pointer;
    transition: all 160ms ease;
    white-space: nowrap;
  }

  .soMobileMode-tab:active { transform: scale(0.94); }

  .soMobileMode-tab.is-active {
    background: var(--so-surface-hi);
    border-color: rgba(244, 124, 32, 0.45);
    color: var(--so-orange);
    box-shadow: 0 0 14px rgba(244, 124, 32, 0.18);
  }

  /* ══════════════════════════════════════════════════════════
     PANELS & CARDS
     ══════════════════════════════════════════════════════════ */
  .soMobileMode-panel { display: none; }

  .soMobileMode-panel.is-active {
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: panelIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .soMobileMode-panelTitle {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--so-text-3);
    padding: 0 2px;
    margin-bottom: 2px;
  }

  /* Section title (h2) used in all panels */
  .soMobileMode-sectionTitle {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(244, 124, 32, 0.70);
    margin: 0 0 4px;
    padding: 0 2px;
  }

  /* ── KPI stack ────────────────────────────────────────────── */
  .soMobileMode-kpiStack {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  /* Base card — clean elevation, NO orange border */
  .soMobileMode-kpiCard,
  .soMobile-kpiCard,
  .soMobile-card {
    background: var(--so-surface);
    border-radius: var(--so-radius-md);
    border: 1px solid var(--so-border);
    box-shadow:
      0 1px 0 var(--so-border-hi) inset,
      var(--so-shadow-md);
    padding: 18px 18px 16px;
    animation: cardReveal 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
    transition: transform 160ms ease;
    position: relative;
    overflow: hidden;
  }

  .soMobileMode-kpiCard:active,
  .soMobile-kpiCard:active { transform: scale(0.985); }

  /* Hero card — THE orange statement piece */
  .soMobile-hero {
    background: linear-gradient(160deg, var(--so-surface-hi) 0%, var(--so-surface) 100%);
    border-color: rgba(244, 124, 32, 0.35);
    box-shadow:
      0 1px 0 rgba(244, 124, 32, 0.12) inset,
      var(--so-shadow-lg),
      0 0 32px var(--so-orange-glow);
    animation: heroBreath 4s ease-in-out infinite alternate,
               cardReveal 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  /* Hero top accent line */
  .soMobile-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 20px; right: 20px;
    height: 1px;
    background: linear-gradient(90deg,
      transparent, var(--so-orange), transparent);
    opacity: 0.65;
  }

  .soMobileMode-kpiLabel,
  .soMobile-kpiLabel {
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--so-text-3);
  }

  /* Hero label gets the orange */
  .soMobile-hero .soMobileMode-kpiLabel,
  .soMobile-hero .soMobile-kpiLabel {
    color: var(--so-orange-dim);
  }

  .soMobileMode-kpiValue,
  .soMobile-kpiValue {
    margin: 7px 0 0;
    color: var(--so-text-1);
    font-size: clamp(28px, 8vw, 36px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* ── Sensei panel cards ───────────────────────────────────── */
  .soMobileMode-card {
    background: var(--so-surface);
    border-radius: var(--so-radius-sm);
    border: 1px solid var(--so-border);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    box-shadow: var(--so-shadow-sm);
  }

  .soMobileMode-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--so-text-1);
  }

  .soMobileMode-meta,
  .soMobileMode-alertText {
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
    color: var(--so-text-2);
  }

  /* ── Alert cards ──────────────────────────────────────────── */
  .soMobileMode-alertCard {
    background: var(--so-surface);
    border-radius: var(--so-radius-sm);
    border: 1px solid var(--so-border);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    animation: cardReveal 260ms ease both;
    box-shadow: var(--so-shadow-sm);
  }

  .soMobileMode-alertTitle {
    font-size: 13px;
    font-weight: 700;
    color: var(--so-text-1);
    margin: 0;
  }

  /* ── Alert stack ──────────────────────────────────────────── */
  .soMobileMode-alertStack {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  /* ── Settings panel ───────────────────────────────────────── */
  .soMobileMode-settingsList {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  .soMobileMode-settingsStack {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .soMobile-settingsItem,
  .soMobileMode-settingsRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--so-surface);
    border-radius: var(--so-radius-sm);
    padding: 14px 16px;
    border: 1px solid var(--so-border);
    box-shadow: var(--so-shadow-sm);
    animation: cardReveal 260ms ease both;
  }

  .soMobileMode-settingsInfo {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
  }

  .soMobileMode-settingsProvider {
    font-size: 14px;
    font-weight: 600;
    color: var(--so-text-1);
    margin: 0;
    line-height: 1.2;
  }

  .soMobileMode-settingsHint {
    font-size: 11px;
    color: var(--so-text-3);
    margin: 0;
    line-height: 1.3;
  }

  .soMobileMode-settingsBadge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
  }

  .soMobileMode-settingsBadge.is-connected {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.32);
    color: #34d399;
  }

  .soMobileMode-settingsBadge.is-disconnected {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--so-text-3);
  }

  /* ── Mode state / fallback ────────────────────────────────── */
  .soMobileMode-modeCard {
    background: var(--so-surface);
    border-radius: var(--so-radius-sm);
    border: 1px solid var(--so-border);
    padding: 14px 16px;
    animation: cardReveal 260ms ease both;
  }

  .soMobileMode-modeState {
    font-size: 12px;
    color: var(--so-text-2);
    margin: 0;
  }

  .soMobileMode-empty,
  .soMobileMode-offline {
    padding: 32px 20px;
    text-align: center;
    border-radius: var(--so-radius-md);
    background: var(--so-surface);
    border: 1px solid var(--so-border);
    color: var(--so-text-3);
    font-size: 13px;
    line-height: 1.55;
  }

  /* ══════════════════════════════════════════════════════════
     ANIMATIONS
     ══════════════════════════════════════════════════════════ */
  @keyframes liveBlink {
    0%, 100% { opacity: 1;    box-shadow: 0 0 6px rgba(52, 211, 153, 0.70); }
    50%       { opacity: 0.50; box-shadow: 0 0 2px rgba(52, 211, 153, 0.25); }
  }

  @keyframes offlinePulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.40; }
  }

  @keyframes senseiRipple {
    0%   { transform: scale(1);   opacity: 0.75; }
    65%  { transform: scale(2.6); opacity: 0; }
    100% { transform: scale(2.6); opacity: 0; }
  }

  @keyframes heroBreath {
    from { box-shadow: 0 1px 0 rgba(244,124,32,0.10) inset, 0 6px 24px rgba(0,0,0,0.55), 0 0 22px rgba(244,124,32,0.14); }
    to   { box-shadow: 0 1px 0 rgba(244,124,32,0.18) inset, 0 6px 24px rgba(0,0,0,0.55), 0 0 48px rgba(244,124,32,0.30); }
  }

  @keyframes cardReveal {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
  }

  @keyframes panelIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes platformsFadeIn {
    from { opacity: 0; transform: translateX(6px); }
    to   { opacity: 1; transform: translateX(0); }
  }

}

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE DASHBOARD OVERRIDES — applies on any mobile viewport
   regardless of mobile view mode — ensures the desktop dashboard is usable
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Hide sidebar, expand main */
  .sidebar { display: none !important; }
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 12px !important;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Topbar — compressed */
  .topbar {
    padding: 8px 12px !important;
    gap: 8px !important;
  }
  .topbar-left { overflow-x: auto; }
  .topbar-scope { gap: 6px !important; }
  .topbar-select-wrap { min-width: 0; }
  .topbar-select { max-width: 110px; font-size: 11px !important; }
  .topbar-right { gap: 6px !important; }

  /* Hero — stacked */
  .dlHero {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 18px 16px 16px !important;
  }
  .dlHero__right { display: none !important; }
  .dlHero__title { font-size: 26px !important; }
  .dlHero__center {
    flex-direction: row !important;
    gap: 12px !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
  }
  .dlHero__scoreNum { font-size: 38px !important; }

  /* Decision cards — single column */
  .dlCards {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }
  .dlCard { padding: 16px !important; }
  .dlCard__cta { min-height: 44px !important; font-size: 13px !important; }

  /* KPI grid — 2 col then 1 col */
  .soKpiFocus__grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .soKpiFocus__card--primary {
    grid-column: 1 / -1 !important;
  }
  .soKpiFocus__cardSparkline,
  .soKpiFocus__cardSparkline svg,
  .soKpiFocus__cardSparkline .soChartPrimitive,
  .soKpiFocus__sparklineInner,
  .soKpiFocus__sparklineChart,
  .soKpiFocus__sparklineChart svg { height: 80px !important; }

  /* Sensei status block */
  .soSenseiStatus { padding: 14px 14px !important; }
  .soSenseiStatus__grid { grid-template-columns: 1fr !important; }

  /* Buttons — larger tap targets */
  button, .dlCard__cta, .dlHero__connectCta {
    min-height: 44px;
    min-width: 44px;
  }
}
