/* ══════════════════════════════════════════════════════════════════════
   AGENTYX OS | Command Center  |  Premium Dark OS Design System v2
   ══════════════════════════════════════════════════════════════════════ */

/* ── 1. RESET & ROOT ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.os-app {
  /* ── Dark palette ── */
  --os-bg:           #080e1a;
  --os-surface:      #0e1928;
  --os-surface-2:    #131f33;
  --os-surface-3:    #18263e;
  --os-surface-4:    #1d2d48;
  --os-surface-raised: #162035;

  --os-text:         #e8eef8;
  --os-text-dim:     #8fa3bf;
  --os-muted:        #4d6480;

  --os-border:       rgba(255,255,255,0.055);
  --os-border-med:   rgba(255,255,255,0.09);
  --os-border-strong:rgba(255,255,255,0.16);

  /* ── Accent (gold) ── */
  --os-accent:       #c49a42;
  --os-accent-hi:    #e0b86a;
  --os-accent-soft:  rgba(196,154,66,0.10);
  --os-accent-glow:  rgba(196,154,66,0.22);
  --os-accent-glow2: rgba(196,154,66,0.08);

  /* ── Team colors ── */
  --os-blue:         #3b82f6;
  --os-blue-hi:      #6ba3f8;
  --os-blue-soft:    rgba(59,130,246,0.10);
  --os-blue-glow:    rgba(59,130,246,0.20);

  --os-green:        #22c55e;
  --os-green-hi:     #4ade80;
  --os-green-soft:   rgba(34,197,94,0.10);
  --os-green-glow:   rgba(34,197,94,0.20);

  --os-amber:        #f59e0b;
  --os-amber-hi:     #fbbf24;
  --os-amber-soft:   rgba(245,158,11,0.10);
  --os-amber-glow:   rgba(245,158,11,0.20);

  --os-red:          #ef4444;
  --os-red-hi:       #f87171;
  --os-red-soft:     rgba(239,68,68,0.10);
  --os-red-glow:     rgba(239,68,68,0.20);

  --os-purple:       #a855f7;
  --os-purple-soft:  rgba(168,85,247,0.12);
  --os-cyan:         #06b6d4;
  --os-cyan-soft:    rgba(6,182,212,0.12);
  --os-orange:       #f97316;
  --os-orange-soft:  rgba(249,115,22,0.12);

  /* ── Shadows ── */
  --os-shadow:       0 2px 16px rgba(0,0,0,0.45);
  --os-shadow-lg:    0 6px 40px rgba(0,0,0,0.6);
  --os-shadow-card:  0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.25);
  --os-shadow-card-hover: 0 4px 20px rgba(0,0,0,0.4), 0 8px 32px rgba(0,0,0,0.3);
  --os-glow-accent:  0 0 0 1px var(--os-accent-glow), 0 4px 24px rgba(196,154,66,0.12);
  --os-glow-blue:    0 0 0 1px var(--os-blue-glow), 0 4px 24px rgba(59,130,246,0.10);

  /* ── Glass ── */
  --os-glass-bg:     rgba(14,25,40,0.65);
  --os-glass-border: rgba(255,255,255,0.08);
  --os-glass-blur:   12px;

  /* ── Layout ── */
  --os-radius:       12px;
  --os-radius-lg:    16px;
  --os-radius-xl:    20px;
  --os-topbar-h:     56px;
  --os-sidebar-w:    240px;
  --os-gap:          16px;
  --os-transition:   0.22s cubic-bezier(0.4, 0, 0.2, 1);

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--os-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;

  /* ── Dot grid background ── */
  background-color: var(--os-bg);
  background-image: radial-gradient(rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ── Light theme overrides ── */
html[data-theme="light"] .os-app {
  --os-bg:             #f0f4fb;
  --os-surface:        #ffffff;
  --os-surface-2:      #f6f8fc;
  --os-surface-3:      #edf1f8;
  --os-surface-4:      #e3eaf6;
  --os-surface-raised: #fafbfd;
  --os-text:           #0d1829;
  --os-text-dim:       #425570;
  --os-muted:          #8fa3bf;
  --os-border:         rgba(15,23,42,0.07);
  --os-border-med:     rgba(15,23,42,0.11);
  --os-border-strong:  rgba(15,23,42,0.18);
  --os-accent-soft:    rgba(196,154,66,0.08);
  --os-accent-glow:    rgba(196,154,66,0.14);
  --os-blue-soft:      rgba(59,130,246,0.08);
  --os-green-soft:     rgba(34,197,94,0.08);
  --os-amber-soft:     rgba(245,158,11,0.08);
  --os-red-soft:       rgba(239,68,68,0.08);
  --os-shadow:         0 2px 12px rgba(15,23,42,0.08);
  --os-shadow-lg:      0 4px 28px rgba(15,23,42,0.12);
  --os-shadow-card:    0 1px 3px rgba(15,23,42,0.06), 0 4px 12px rgba(15,23,42,0.06);
  --os-shadow-card-hover: 0 4px 16px rgba(15,23,42,0.1), 0 8px 24px rgba(15,23,42,0.08);
  --os-glass-bg:       rgba(255,255,255,0.72);
  --os-glass-border:   rgba(15,23,42,0.08);
  background-image: radial-gradient(rgba(0,0,0,0.025) 1px, transparent 1px);
}

/* ── 2. TOP BAR ──────────────────────────────────────────────────────── */
.os-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--os-topbar-h);
  background: var(--os-glass-bg);
  backdrop-filter: blur(var(--os-glass-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--os-glass-blur)) saturate(1.4);
  border-bottom: 1px solid var(--os-glass-border);
  display: flex;
  align-items: center;
  z-index: 200;
  box-shadow: 0 1px 0 var(--os-border), 0 4px 24px rgba(0,0,0,0.25);
}

/* Gold-to-blue gradient accent line across bottom of topbar */
.os-topbar::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--os-accent) 15%,
    var(--os-blue) 50%,
    var(--os-accent) 85%,
    transparent 100%
  );
  opacity: 0.45;
}

.os-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  width: var(--os-sidebar-w);
  padding: 0 14px 0 18px;
  flex-shrink: 0;
  border-right: 1px solid var(--os-border);
}

.os-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.9;
  transition: opacity 0.15s;
}
.os-logo-link:hover { opacity: 1; }

.os-topbar-title {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 1px;
}

.os-topbar-product {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: linear-gradient(90deg, var(--os-accent-hi), var(--os-blue-hi));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.os-topbar-clock {
  font-size: 11px;
  font-weight: 600;
  color: var(--os-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.os-topbar-center {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 20px;
  overflow: hidden;
  flex-wrap: nowrap;
}

.os-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  flex-shrink: 0;
}

/* ── Health pills (topbar) ── */
.os-topbar-center .os-health-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 7px;
  border-radius: 999px;
  border: 1px solid var(--os-border-med);
  background: var(--os-surface-2);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--os-text-dim);
  transition: all var(--os-transition);
  cursor: default;
}

.os-topbar-center .os-health-pill:hover {
  border-color: var(--os-border-strong);
  background: var(--os-surface-3);
  color: var(--os-text);
}

/* Hide the ONLINE/OFFLINE label in pills - dot + name is enough */
.os-topbar-center .os-health-pill strong { display: none; }

/* When offline, tint the pill */
.os-topbar-center .os-health-pill:has(.os-dot.risk) {
  border-color: rgba(239,68,68,0.25);
  background: rgba(239,68,68,0.06);
}

/* ── Status dots ── */
.os-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--os-muted);
  flex-shrink: 0;
  display: inline-block;
}

.os-dot.ok {
  background: var(--os-green);
  box-shadow: 0 0 0 2px rgba(34,197,94,0.18), 0 0 10px rgba(34,197,94,0.5);
  animation: dot-pulse 2.8s ease-in-out infinite;
}

.os-dot.warn {
  background: var(--os-amber);
  box-shadow: 0 0 0 2px rgba(245,158,11,0.18), 0 0 8px rgba(245,158,11,0.4);
  animation: dot-warn 3.5s ease-in-out infinite;
}

.os-dot.risk {
  background: var(--os-red);
  box-shadow: 0 0 0 2px rgba(239,68,68,0.22), 0 0 10px rgba(239,68,68,0.55);
  animation: dot-danger 1.4s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 2px rgba(34,197,94,0.18), 0 0 10px rgba(34,197,94,0.5); }
  50%       { opacity: 0.6; box-shadow: 0 0 0 3px rgba(34,197,94,0.08), 0 0 4px rgba(34,197,94,0.2); }
}

@keyframes dot-warn {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes dot-danger {
  0%, 100% { box-shadow: 0 0 0 2px rgba(239,68,68,0.22), 0 0 10px rgba(239,68,68,0.55); }
  50%       { box-shadow: 0 0 0 4px rgba(239,68,68,0.12), 0 0 18px rgba(239,68,68,0.7); }
}

/* ── Topbar buttons ── */
.os-topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--os-border-med);
  background: var(--os-surface-2);
  color: var(--os-text-dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--os-transition);
  white-space: nowrap;
  font-family: inherit;
}

.os-topbar-btn:hover {
  background: var(--os-surface-3);
  border-color: var(--os-border-strong);
  color: var(--os-text);
}

.os-refresh-btn:hover {
  border-color: rgba(59,130,246,0.4);
  color: var(--os-blue-hi);
  background: var(--os-blue-soft);
}

.os-topbar-btn-outline {
  background: transparent;
  color: var(--os-muted);
  font-size: 11px;
}

/* SVG sun/moon toggle via CSS */
html[data-theme="dark"]  .os-icon-sun  { display: block; }
html[data-theme="dark"]  .os-icon-moon { display: none; }
html[data-theme="light"] .os-icon-sun  { display: none; }
html[data-theme="light"] .os-icon-moon { display: block; }

/* ── 3. APP BODY ─────────────────────────────────────────────────────── */
.os-body {
  display: flex;
  padding-top: var(--os-topbar-h);
  min-height: 100vh;
}

/* ── 4. SIDEBAR ──────────────────────────────────────────────────────── */
.os-sidebar {
  position: fixed;
  top: var(--os-topbar-h);
  left: 0;
  width: var(--os-sidebar-w);
  height: calc(100vh - var(--os-topbar-h));
  background: var(--os-glass-bg);
  backdrop-filter: blur(var(--os-glass-blur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--os-glass-blur)) saturate(1.3);
  border-right: 1px solid var(--os-glass-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: var(--os-surface-4) transparent;
}

.os-sidebar::-webkit-scrollbar { width: 4px; }
.os-sidebar::-webkit-scrollbar-thumb { background: var(--os-surface-4); border-radius: 4px; }
.os-sidebar::-webkit-scrollbar-track { background: transparent; }

.os-sidebar-section { padding: 14px 10px; }
.os-sidebar-section + .os-sidebar-section { border-top: 1px solid var(--os-border); }
.os-sidebar-links-section { flex: 1; }

.os-sidebar-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--os-muted);
  padding: 0 8px;
  margin-bottom: 8px;
}

/* ── Module nav ── */
.os-nav { display: flex; flex-direction: column; gap: 2px; }

.os-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--os-radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--os-text-dim);
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  font-family: inherit;
}

.os-nav-item:hover {
  background: var(--os-surface-2);
  color: var(--os-text);
  transform: translateX(2px);
}

.os-nav-item.active {
  background: linear-gradient(135deg, var(--os-surface-3) 0%, var(--os-surface-2) 100%);
  border-color: var(--os-accent-glow);
  color: var(--os-text);
  box-shadow: inset 3px 0 0 0 var(--os-accent), 0 2px 12px rgba(0,0,0,0.2), 0 0 20px var(--os-accent-glow2);
  transform: translateX(0);
}

/* Active badge: glow behind it */
.os-nav-item.active .os-nav-badge {
  box-shadow: 0 0 12px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
  transform: scale(1.05);
}

/* Module icon inside badge */
.os-nav-badge .os-mod-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.9;
}
.os-nav-item.active .os-nav-badge .os-mod-icon {
  opacity: 1;
}

/* ── Module badges ── */
.os-nav-badge {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  transition: all var(--os-transition);
}

/* Dim state (not active) */
.os-nav-badge[data-mod="overview"]  { background: rgba(196,154,66,0.14); color: var(--os-accent); }
.os-nav-badge[data-mod="sales"]     { background: rgba(59,130,246,0.14); color: var(--os-blue-hi); }
.os-nav-badge[data-mod="finance"]   { background: rgba(34,197,94,0.12);  color: var(--os-green-hi); }
.os-nav-badge[data-mod="marketing"] { background: rgba(168,85,247,0.12); color: var(--os-purple); }
.os-nav-badge[data-mod="databridge"]{ background: rgba(6,182,212,0.12);  color: var(--os-cyan); }
.os-nav-badge[data-mod="inbox"]     { background: rgba(249,115,22,0.12); color: var(--os-orange); }
.os-nav-badge[data-mod="callbot"]   { background: rgba(236,72,153,0.12); color: #f472b6; }
.os-nav-badge[data-mod="documind"] { background: rgba(6,182,212,0.12);  color: var(--os-cyan); }
.os-nav-badge[data-mod="searchiq"]  { background: rgba(239,68,68,0.10);  color: var(--os-red-hi); }

/* Active state: solid color badge with glow */
.os-nav-item.active .os-nav-badge[data-mod="overview"]  { background: var(--os-accent);  color: #fff; box-shadow: 0 4px 12px rgba(196,154,66,0.45); }
.os-nav-item.active .os-nav-badge[data-mod="sales"]     { background: var(--os-blue);    color: #fff; box-shadow: 0 4px 12px rgba(59,130,246,0.45); }
.os-nav-item.active .os-nav-badge[data-mod="finance"]   { background: var(--os-green);   color: #fff; box-shadow: 0 4px 12px rgba(34,197,94,0.45); }
.os-nav-item.active .os-nav-badge[data-mod="marketing"] { background: var(--os-purple);  color: #fff; box-shadow: 0 4px 12px rgba(168,85,247,0.45); }
.os-nav-item.active .os-nav-badge[data-mod="databridge"]{ background: var(--os-cyan);    color: #fff; box-shadow: 0 4px 12px rgba(6,182,212,0.45); }
.os-nav-item.active .os-nav-badge[data-mod="inbox"]     { background: var(--os-orange);  color: #fff; box-shadow: 0 4px 12px rgba(249,115,22,0.45); }
.os-nav-item.active .os-nav-badge[data-mod="callbot"]   { background: #ec4899;           color: #fff; box-shadow: 0 4px 12px rgba(236,72,153,0.45); }
.os-nav-item.active .os-nav-badge[data-mod="documind"] { background: var(--os-cyan);    color: #fff; box-shadow: 0 4px 12px rgba(6,182,212,0.45); }
.os-nav-item.active .os-nav-badge[data-mod="searchiq"]  { background: var(--os-red);     color: #fff; box-shadow: 0 4px 12px rgba(239,68,68,0.45); }

.os-nav-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
  min-width: 0;
}

.os-nav-text strong {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.os-nav-text small {
  font-size: 10px;
  color: var(--os-muted);
  white-space: nowrap;
}

/* Quick links */
.os-sidebar-links-section .os-link-row { display: flex; flex-direction: column; gap: 1px; }

.os-sidebar-links-section .os-link-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--os-muted);
  font-size: 12px;
  transition: all 0.12s;
}

.os-sidebar-links-section .os-link-item:hover {
  background: var(--os-surface-2);
  color: var(--os-text-dim);
}

.os-sidebar-links-section .os-link-item a {
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  display: block;
}

.os-sidebar-links-section .os-link-item a:hover { color: var(--os-accent-hi); }
.os-sidebar-links-section .os-link-item span { display: none; }

.os-sidebar-decision-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.os-sidebar-decision-section .os-approvals {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.os-sidebar-decision-section .os-list-item {
  padding: 12px 12px 10px;
}

.os-sidebar-decision-section .os-item-title {
  font-size: 12px;
}

.os-sidebar-decision-section .os-item-copy {
  font-size: 11px;
}

.os-sidebar-decision-section .os-action-btn {
  width: 100%;
  justify-content: center;
}

/* ── 5. MAIN CONTENT ─────────────────────────────────────────────────── */
.os-main {
  margin-left: var(--os-sidebar-w);
  flex: 1;
  min-width: 0;
  padding: 20px 22px 56px;
  overflow-x: hidden;
}

/* ── 6. KPI STRIP ────────────────────────────────────────────────────── */
.os-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--os-gap);
  margin-bottom: 14px;
}

.os-kpi-card {
  background: var(--os-glass-bg);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  border: 1px solid var(--os-glass-border);
  border-radius: var(--os-radius-lg);
  padding: 18px 20px 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--os-shadow-card);
  cursor: default;
}

.os-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--os-accent) 0%, var(--os-blue) 60%, var(--os-purple) 100%);
  opacity: 0.7;
  transition: opacity 0.3s, height 0.3s;
}

/* Subtle radial glow from top */
.os-kpi-card::after {
  content: '';
  position: absolute;
  top: -40px; left: 50%;
  transform: translateX(-50%);
  width: 160px; height: 100px;
  background: radial-gradient(ellipse at center, rgba(196,154,66,0.06) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity 0.3s;
}

.os-kpi-card:hover {
  border-color: var(--os-accent-glow);
  transform: translateY(-4px);
  box-shadow: var(--os-shadow-card-hover), 0 0 0 1px var(--os-accent-glow), 0 12px 40px rgba(196,154,66,0.12);
}

.os-kpi-card:hover::before { opacity: 1; height: 4px; }
.os-kpi-card:hover::after { opacity: 1.5; }

.os-kpi-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--os-muted);
  margin-bottom: 8px;
}

.os-kpi-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--os-accent-hi) 0%, var(--os-blue-hi) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  min-height: 30px;
}

.os-kpi-delta {
  font-size: 11px;
  color: var(--os-muted);
  line-height: 1.3;
}

/* ── 7. CONTENT GRID ─────────────────────────────────────────────────── */
.os-content-grid {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: var(--os-gap);
  margin-bottom: var(--os-gap);
  align-items: start;
}

/* ── 8. MODULE PANEL (left) ──────────────────────────────────────────── */
.os-module-panel {
  background: var(--os-glass-bg);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  border: 1px solid var(--os-glass-border);
  border-radius: var(--os-radius-lg);
  overflow: hidden;
  box-shadow: var(--os-shadow-card);
  transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.os-module-panel.is-switching {
  opacity: 0;
  transform: translateY(6px) scale(0.99);
}

.os-module-header {
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--os-border);
  background: linear-gradient(135deg, var(--os-surface) 0%, var(--os-surface-2) 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative corner glow on module header */
.os-module-header::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(196,154,66,0.08) 0%, transparent 65%);
  pointer-events: none;
}

.os-module-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--os-text);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.os-module-summary {
  font-size: 12px;
  color: var(--os-muted);
  line-height: 1.6;
}

.os-panel-section {
  padding: 14px 20px;
  border-bottom: 1px solid var(--os-border);
}

.os-panel-section--last { border-bottom: none; }

.os-section-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--os-muted);
  margin-bottom: 10px;
}

.os-section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.os-section-header-row .os-section-label { margin-bottom: 0; }

/* ── List grids ── */
.os-module-list,
.os-feed,
.os-approvals,
.os-tasks {
  display: grid;
  gap: 6px;
}

/* ── List items (base) ── */
.os-list-item {
  border: 1px solid var(--os-border);
  background: var(--os-surface-2);
  border-radius: var(--os-radius);
  padding: 10px 14px;
  transition: all var(--os-transition);
  position: relative;
  overflow: hidden;
}

.os-list-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--os-muted);
  opacity: 0.3;
  transition: opacity var(--os-transition);
}

/* Status-coded left border */
.os-list-item[data-status="ok"]::before,
.os-list-item[data-tag="ok"]::before {
  background: var(--os-green);
  opacity: 0.8;
}
.os-list-item[data-status="warn"]::before,
.os-list-item[data-tag="warn"]::before {
  background: var(--os-amber);
  opacity: 0.8;
}
.os-list-item[data-status="risk"]::before,
.os-list-item[data-tag="risk"]::before {
  background: var(--os-red);
  opacity: 0.9;
}

.os-list-item:hover {
  border-color: var(--os-border-strong);
  background: var(--os-surface-3);
  transform: translateX(1px);
}

.os-list-item:hover::before { opacity: 1; }

.os-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.os-item-title {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--os-text);
  line-height: 1.35;
}

.os-item-copy {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--os-muted);
  line-height: 1.55;
}

.os-item-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Feed-specific: slide-in animation ── */
@keyframes feed-slide-in {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.os-feed .os-list-item {
  animation: feed-slide-in 0.28s ease-out both;
}

.os-feed .os-list-item:nth-child(1) { animation-delay: 0.00s; }
.os-feed .os-list-item:nth-child(2) { animation-delay: 0.05s; }
.os-feed .os-list-item:nth-child(3) { animation-delay: 0.10s; }
.os-feed .os-list-item:nth-child(4) { animation-delay: 0.15s; }
.os-feed .os-list-item:nth-child(5) { animation-delay: 0.18s; }
.os-feed .os-list-item:nth-child(6) { animation-delay: 0.21s; }

/* ── Status pills ── */
.os-pill {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
  border-width: 1px;
  border-style: solid;
}

.os-pill.ok   {
  color: var(--os-green-hi);
  background: var(--os-green-soft);
  border-color: rgba(34,197,94,0.22);
  box-shadow: 0 0 8px rgba(34,197,94,0.12);
}
.os-pill.warn {
  color: var(--os-amber-hi);
  background: var(--os-amber-soft);
  border-color: rgba(245,158,11,0.22);
}
.os-pill.risk {
  color: var(--os-red-hi);
  background: var(--os-red-soft);
  border-color: rgba(239,68,68,0.22);
  box-shadow: 0 0 8px rgba(239,68,68,0.12);
}
.os-pill.pending {
  color: var(--os-amber-hi);
  background: var(--os-amber-soft);
  border-color: rgba(245,158,11,0.22);
}
.os-pill.high {
  color: var(--os-red-hi);
  background: var(--os-red-soft);
  border-color: rgba(239,68,68,0.22);
  box-shadow: 0 0 6px rgba(239,68,68,0.15);
}
.os-pill.normal {
  color: var(--os-green-hi);
  background: var(--os-green-soft);
  border-color: rgba(34,197,94,0.22);
}
.os-pill.low {
  color: var(--os-blue-hi);
  background: var(--os-blue-soft);
  border-color: rgba(59,130,246,0.22);
}

/* ── Action buttons ── */
.os-action-btn {
  border: 1px solid var(--os-border-med);
  background: var(--os-surface-3);
  color: var(--os-text-dim);
  border-radius: 6px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.os-action-btn.primary {
  border-color: rgba(34,197,94,0.3);
  background: rgba(34,197,94,0.08);
  color: var(--os-green-hi);
}

.os-action-btn.primary:hover  { background: rgba(34,197,94,0.18); border-color: rgba(34,197,94,0.5); box-shadow: 0 0 12px rgba(34,197,94,0.15); }
.os-action-btn.danger         { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); color: var(--os-red-hi); }
.os-action-btn.danger:hover   { background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.5); }
.os-action-btn:hover:not(.primary):not(.danger) { background: var(--os-surface-4); color: var(--os-text); }
.os-action-btn:disabled       { opacity: 0.4; cursor: not-allowed; }

.os-mini-btn {
  border: 1px solid var(--os-accent-glow);
  background: var(--os-accent-soft);
  color: var(--os-accent-hi);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
  font-family: inherit;
}

.os-mini-btn:hover { background: rgba(196,154,66,0.18); box-shadow: 0 0 12px rgba(196,154,66,0.15); }
.os-mini-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Impact bars ── */
.os-progress-row {
  display: grid;
  grid-template-columns: 1fr 1fr 36px;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.os-progress-row:last-child { margin-bottom: 0; }

.os-progress-row > span:first-child {
  font-size: 12px;
  color: var(--os-text-dim);
  font-weight: 500;
}

.os-progress-row > span:last-child {
  font-size: 12px;
  font-weight: 800;
  color: var(--os-accent-hi);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.os-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--os-surface-3);
  overflow: hidden;
  position: relative;
}

/* Subtle sheen on bar track */
.os-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%);
}

.os-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--os-blue) 0%, var(--os-accent) 70%, var(--os-accent-hi) 100%);
  box-shadow: 0 0 10px rgba(196,154,66,0.35), 0 0 4px rgba(59,130,246,0.2);
  transition: width 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

/* Animated shimmer on bar fill */
.os-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  animation: bar-shimmer 2.4s ease-in-out infinite;
}

@keyframes bar-shimmer {
  0%   { left: -100%; }
  60%  { left: 100%; }
  100% { left: 100%; }
}

/* ── Module fade-in animation ── */
@keyframes module-fade-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.os-module-panel .os-panel-section {
  animation: module-fade-in 0.3s ease-out both;
}

.os-module-panel .os-panel-section:nth-child(1) { animation-delay: 0.00s; }
.os-module-panel .os-panel-section:nth-child(2) { animation-delay: 0.04s; }
.os-module-panel .os-panel-section:nth-child(3) { animation-delay: 0.08s; }

/* ── 9. RIGHT PANEL ──────────────────────────────────────────────────── */
.os-right-panel {
  background: var(--os-glass-bg);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  border: 1px solid var(--os-glass-border);
  border-radius: var(--os-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 620px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--os-surface-4) transparent;
  box-shadow: var(--os-shadow-card);
}

.os-right-panel::-webkit-scrollbar { width: 3px; }
.os-right-panel::-webkit-scrollbar-thumb { background: var(--os-surface-4); border-radius: 4px; }

/* ── 10. WORKSPACE SECTION ───────────────────────────────────────────── */
.os-ops-section {
  background: var(--os-glass-bg);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  border: 1px solid var(--os-glass-border);
  border-radius: var(--os-radius-xl);
  overflow: hidden;
  margin-bottom: var(--os-gap);
  box-shadow: var(--os-shadow-card);
}

.os-ops-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 24px 16px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(196,154,66,0.06), transparent 40%),
    radial-gradient(circle at top right, rgba(59,130,246,0.06), transparent 32%),
    linear-gradient(135deg, var(--os-surface) 0%, var(--os-surface-2) 100%);
}

.os-ops-header-text {
  max-width: 680px;
}

/* Section label inside ops header gets gold accent */
.os-ops-header .os-section-label {
  color: var(--os-accent);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.os-ops-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--os-text);
  margin-bottom: 4px;
}

.os-ops-summary {
  font-size: 13px;
  color: var(--os-text-dim);
  max-width: 780px;
  line-height: 1.6;
}

/* ── Ops Nav Bar (tab groups in a horizontal strip below header) ── */
.os-ops-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 24px;
  border-top: 1px solid var(--os-border);
  border-bottom: 1px solid var(--os-border);
  background: var(--os-surface);
  overflow-x: auto;
  scrollbar-width: none;
}
.os-ops-nav::-webkit-scrollbar { display: none; }

.os-ops-nav-divider {
  width: 1px;
  height: 28px;
  flex-shrink: 0;
  background: var(--os-border-med);
  margin: 0 4px;
}

.os-ops-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.os-ops-group-label {
  margin: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--os-muted);
  white-space: nowrap;
  padding-right: 2px;
}

.os-ops-tabs {
  display: flex;
  gap: 2px;
  flex-wrap: nowrap;
}

.os-ops-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--os-text-dim);
  font-weight: 600;
  font-size: 12.5px;
  padding: 11px 12px;
  cursor: pointer;
  transition: all var(--os-transition);
  font-family: inherit;
  white-space: nowrap;
  position: relative;
}

.os-ops-tab-icon {
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity var(--os-transition);
}

.os-ops-tab:hover {
  color: var(--os-text);
  background: rgba(255,255,255,0.03);
}
.os-ops-tab:hover .os-ops-tab-icon { opacity: 0.8; }

.os-ops-tab.active {
  color: var(--os-accent-hi);
  background: transparent;
}
.os-ops-tab.active .os-ops-tab-icon { opacity: 1; }

/* Active underline indicator */
.os-ops-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 8px; right: 8px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--os-accent), var(--os-accent-hi));
  box-shadow: 0 0 8px rgba(196,154,66,0.3);
}

.os-ops-stage {
  padding: 20px 24px 24px;
  animation: os-fade-in 0.25s ease-out;
}

@keyframes os-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.os-ops-notice {
  border: 1px solid var(--os-border-med);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background:
    radial-gradient(circle at top right, rgba(196,154,66,0.12), transparent 30%),
    linear-gradient(135deg, var(--os-surface-2) 0%, var(--os-surface) 100%);
  box-shadow: var(--os-shadow-card);
}

.os-ops-notice.is-ok {
  border-color: rgba(196,154,66,0.45);
}

.os-ops-notice-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--os-text);
  margin-bottom: 4px;
}

.os-ops-notice-copy {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--os-text-dim);
}

.os-ops-grid {
  display: grid;
  gap: var(--os-gap);
}

.os-ops-grid.two {
  grid-template-columns: 290px minmax(0, 1fr);
}

/* Dominant-left layout: main content fills, sidebar fixed 320px */
.os-ops-grid.two-wide {
  display: grid;
  gap: var(--os-gap);
  grid-template-columns: minmax(0, 1fr) 320px;
}

.os-ops-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.os-ops-card {
  background: var(--os-surface-2);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-lg);
  padding: 18px;
  box-shadow: var(--os-shadow-card);
  transition: box-shadow var(--os-transition), border-color var(--os-transition);
}

.os-ops-card:hover {
  box-shadow: var(--os-shadow-card-hover);
}

.os-ops-card.accent {
  background:
    radial-gradient(circle at top right, rgba(196,154,66,0.08), transparent 34%),
    linear-gradient(180deg, var(--os-surface-2) 0%, var(--os-surface) 100%);
  border-color: rgba(196,154,66,0.12);
}

.os-ops-card.accent:hover {
  border-color: rgba(196,154,66,0.22);
}

.os-ops-card h4,
.os-ops-card h5 {
  color: var(--os-text);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.os-ops-card h4 {
  font-size: 18px;
}

.os-ops-card h5 {
  font-size: 15px;
}

.os-ops-muted {
  color: var(--os-text-dim);
  font-size: 13.5px;
  line-height: 1.6;
}

.os-ops-stack {
  display: grid;
  gap: 10px;
}

.os-ops-list {
  display: grid;
  gap: 8px;
}

.os-ops-list-item {
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  padding: 12px;
  cursor: pointer;
  transition: all var(--os-transition);
}

.os-ops-list-item:hover {
  border-color: var(--os-border-strong);
  background: var(--os-surface-3);
}

.os-ops-list-item.active {
  border-color: var(--os-accent-glow);
  box-shadow: var(--os-glow-accent);
}

.os-ops-list-button {
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--os-transition);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
}

.os-ops-list-button:hover {
  border-color: var(--os-border-strong);
  background: var(--os-surface-3);
}

.os-ops-list-button.active {
  border-color: var(--os-accent-glow);
  box-shadow: var(--os-glow-accent);
}

.os-ops-list-item-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--os-text);
  margin-bottom: 4px;
}

.os-ops-list-item-copy {
  font-size: 13.5px;
  color: var(--os-text-dim);
  line-height: 1.55;
}

.os-ops-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.os-ops-chip {
  border: 1px solid var(--os-border);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11.5px;
  color: var(--os-text-dim);
  background: var(--os-surface-2);
}

.os-ops-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.os-ops-kv div {
  min-width: 0;
}

.os-ops-kv label,
.os-ops-field label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--os-muted);
  margin-bottom: 6px;
}

.os-ops-value {
  color: var(--os-text);
  font-size: 14px;
  line-height: 1.5;
}

.os-ops-timeline {
  display: grid;
  gap: 10px;
}

.os-ops-timeline-item {
  border-left: 2px solid var(--os-accent);
  padding-left: 12px;
}

.os-ops-timeline-when {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--os-muted);
}

.os-ops-timeline-title {
  color: var(--os-text);
  font-weight: 700;
  font-size: 14px;
  margin: 3px 0;
}

.os-ops-timeline-copy {
  color: var(--os-text-dim);
  font-size: 13.5px;
  line-height: 1.55;
}

.os-ops-form {
  display: grid;
  gap: 10px;
}

.os-ops-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.os-ops-field input,
.os-ops-field select,
.os-ops-field textarea {
  width: 100%;
  border: 1px solid var(--os-border-med);
  background: var(--os-surface);
  color: var(--os-text);
  border-radius: 10px;
  padding: 10px 11px;
  font: inherit;
  outline: none;
}

.os-ops-field textarea {
  min-height: 96px;
  resize: vertical;
}

.os-ops-field input:focus,
.os-ops-field select:focus,
.os-ops-field textarea:focus {
  border-color: var(--os-accent-glow);
  box-shadow: 0 0 0 1px var(--os-accent-glow);
}

.os-ops-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.os-ops-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--os-border-med);
  background: var(--os-surface-3);
  color: var(--os-text);
  border-radius: 10px;
  padding: 9px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--os-transition);
}

.os-ops-button svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.os-ops-button.primary {
  background: linear-gradient(135deg, rgba(196,154,66,0.20), rgba(59,130,246,0.14));
  border-color: var(--os-accent-glow);
  color: var(--os-accent-hi);
}

.os-ops-button.primary svg {
  opacity: 0.9;
}

.os-ops-button:hover {
  border-color: var(--os-border-strong);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.os-ops-button.primary:hover {
  background: linear-gradient(135deg, rgba(196,154,66,0.26), rgba(59,130,246,0.18));
  box-shadow: 0 2px 12px rgba(196,154,66,0.15);
}

.os-ops-empty {
  padding: 20px;
  border: 1px dashed var(--os-border-med);
  border-radius: 12px;
  color: var(--os-text-dim);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(255,255,255,0.008) 8px,
    rgba(255,255,255,0.008) 16px
  );
}

.os-ops-action-hint {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--os-text-dim);
}

.os-ops-disclosure {
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  padding: 12px;
}

.os-ops-disclosure summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--os-text);
  list-style: none;
}

.os-ops-disclosure summary::-webkit-details-marker {
  display: none;
}

.os-ops-disclosure[open] summary {
  margin-bottom: 12px;
}

.os-ops-disclosure-gap {
  height: 12px;
}

.os-ops-language-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.os-ops-language-card {
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface);
  padding: 10px;
}

.os-ops-language-card strong {
  display: block;
  font-size: 11px;
  color: var(--os-accent-hi);
  margin-bottom: 6px;
}

.os-ops-language-card p {
  font-size: 11px;
  color: var(--os-text-dim);
  line-height: 1.5;
}

.os-ops-markdown-preview {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--os-border);
  background: rgba(7, 18, 42, 0.5);
  color: var(--os-text);
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 340px;
  overflow: auto;
}

/* ─── Prep Pack ─────────────────────────────────────────────── */

.os-prep-empty {
  border: 1px dashed var(--os-border-strong);
  border-radius: var(--os-radius-lg);
  padding: 32px 24px;
  text-align: center;
  color: var(--os-text-dim);
}

.os-prep-empty-icon {
  margin-bottom: 12px;
  color: var(--os-accent-hi);
  opacity: 0.5;
}

.os-prep-empty h4 {
  font-size: 17px;
  color: var(--os-text);
  margin-bottom: 8px;
}

.os-prep-empty p {
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto 16px;
}

.os-prep-empty-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.os-prep-empty-features span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--os-border);
  background: var(--os-surface-2);
  color: var(--os-accent-hi);
}

/* Main container */
.os-prep-pack {
  background:
    radial-gradient(ellipse at top right, rgba(196,154,66,0.07), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(59,130,246,0.04), transparent 50%),
    linear-gradient(180deg, var(--os-surface-2) 0%, var(--os-surface) 100%);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--os-shadow-card);
}

/* Header */
.os-prep-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--os-border);
  background: linear-gradient(135deg, rgba(196,154,66,0.06), transparent 60%);
}

.os-prep-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.os-prep-header h4 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--os-text);
  margin: 0;
  background: linear-gradient(135deg, var(--os-gold, #c49a42), var(--os-accent-hi, #c49a42));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.os-prep-subtitle {
  font-size: 14px;
  color: var(--os-text-dim);
  margin: 6px 0 12px;
}

.os-prep-version-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.os-prep-version-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--os-text-dim);
  font-size: 12px;
  line-height: 1;
}

.os-prep-archetype-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
}

.os-prep-archetype label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--os-muted);
  margin-bottom: 3px;
}

.os-prep-archetype strong {
  color: var(--os-accent-hi);
  font-size: 14px;
}

.os-prep-archetype span {
  color: var(--os-text-dim);
  font-size: 13px;
  line-height: 1.5;
}

/* Phase labels */
.os-prep-phase {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--os-surface-3);
  border-top: 1px solid var(--os-border);
  border-bottom: 1px solid var(--os-border);
}

.os-prep-phase-icon {
  font-size: 16px;
}

.os-prep-phase-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--os-accent-hi);
}

/* Sections */
.os-prep-section {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.os-prep-section:last-of-type {
  border-bottom: none;
}

.os-prep-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.os-prep-section-head h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--os-text);
  margin: 0;
}

.os-prep-body {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--os-text-dim);
}

/* Copy button */
.os-prep-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--os-border);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--os-text-dim);
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s;
}

.os-prep-copy:hover {
  border-color: var(--os-accent-hi);
  color: var(--os-accent-hi);
}

.os-prep-copy.copied {
  border-color: #34d399;
  color: #34d399;
}

/* Tool stack grid */
.os-prep-stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.os-prep-stack-card {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color var(--os-transition);
}

.os-prep-stack-card:hover {
  border-color: var(--os-accent-glow);
}

.os-prep-stack-cat {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--os-accent-hi);
  margin-bottom: 4px;
}

.os-prep-stack-tool {
  font-size: 13px;
  font-weight: 700;
  color: var(--os-text);
  margin-bottom: 4px;
}

.os-prep-stack-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--os-text-dim);
}

.os-prep-stack-meta {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.os-prep-verified {
  font-size: 10px;
  color: #34d399;
  font-weight: 700;
}

.os-prep-time-saved {
  font-size: 10px;
  color: var(--os-accent-hi);
  font-weight: 600;
}

/* LLM table */
.os-prep-table {
  border: 1px solid var(--os-border);
  border-radius: 10px;
  overflow: hidden;
}

.os-prep-table-head {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 0.8fr 1.2fr;
  gap: 8px;
  padding: 8px 12px;
  background: var(--os-surface-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--os-muted);
}

.os-prep-table-row {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 0.8fr 1.2fr;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 12.5px;
  color: var(--os-text-dim);
  line-height: 1.5;
}

.os-prep-table-row strong {
  color: var(--os-text);
  font-weight: 600;
}

/* Agenda */
.os-prep-agenda {
  list-style: decimal;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.os-prep-agenda li {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--os-text-dim);
}

/* Checklist */
.os-prep-checklist {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}

.os-prep-checklist li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--os-text-dim);
}

.os-prep-check {
  color: var(--os-accent-hi);
  margin-right: 6px;
}

/* Numbered steps */
.os-prep-steps {
  display: grid;
  gap: 10px;
}

.os-prep-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.os-prep-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(196,154,66,0.2), rgba(59,130,246,0.15));
  border: 1px solid var(--os-accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--os-accent-hi);
}

.os-prep-step strong {
  font-size: 13.5px;
  color: var(--os-text);
  display: block;
  margin-bottom: 2px;
}

.os-prep-step p {
  font-size: 12.5px;
  color: var(--os-text-dim);
  line-height: 1.5;
  margin: 0;
}

/* Prompt pack */
.os-prep-prompt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

.os-prep-prompt-card {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.os-prep-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--os-text);
}

.os-prep-difficulty {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.os-prep-difficulty.beginner {
  background: rgba(52,211,153,0.12);
  color: #34d399;
}

.os-prep-difficulty.intermediate {
  background: rgba(251,191,36,0.12);
  color: #fbbf24;
}

.os-prep-difficulty.advanced {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
}

.os-prep-prompt-text {
  font-size: 12px;
  line-height: 1.55;
  color: var(--os-text-dim);
  flex: 1;
}

.os-prep-copy-prompt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--os-border);
  border-radius: 6px;
  padding: 3px 8px;
  color: var(--os-text-dim);
  cursor: pointer;
  font-size: 10px;
  align-self: flex-start;
  transition: all 0.2s;
}

.os-prep-copy-prompt:hover {
  border-color: var(--os-accent-hi);
  color: var(--os-accent-hi);
}

.os-prep-copy-prompt.copied {
  border-color: #34d399;
  color: #34d399;
}

/* Workflow grid */
.os-prep-workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.os-prep-workflow-card {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 10px;
  padding: 12px;
}

.os-prep-workflow-card strong {
  font-size: 13px;
  color: var(--os-text);
  display: block;
  margin-bottom: 4px;
}

.os-prep-workflow-card p {
  font-size: 12px;
  color: var(--os-text-dim);
  line-height: 1.5;
  margin: 0 0 8px;
}

.os-prep-workflow-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.os-prep-workflow-tools {
  font-size: 10px;
  color: var(--os-muted);
}

/* Follow-up timeline */
.os-prep-followup-timeline {
  display: grid;
  gap: 0;
  border-left: 2px solid var(--os-accent-glow);
  margin-left: 8px;
}

.os-prep-followup-item {
  padding: 8px 0 8px 16px;
  position: relative;
}

.os-prep-followup-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--os-accent-hi);
  border: 2px solid var(--os-surface-2);
}

.os-prep-followup-when {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--os-accent-hi);
  margin-bottom: 3px;
}

.os-prep-followup-what {
  font-size: 13px;
  color: var(--os-text-dim);
  line-height: 1.55;
}

/* Email cards */
.os-prep-email-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.os-prep-email-card {
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  border-radius: 10px;
  padding: 12px;
}

.os-prep-email-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--os-accent-hi);
  margin-bottom: 6px;
}

.os-prep-email-subject {
  font-size: 13px;
  font-weight: 700;
  color: var(--os-text);
  margin-bottom: 6px;
}

.os-prep-email-body {
  font-size: 12px;
  line-height: 1.6;
  color: var(--os-text-dim);
  white-space: pre-line;
}

/* Upsell */
.os-prep-upsell {
  background: linear-gradient(90deg, rgba(196,154,66,0.08), transparent 70%);
  border-left: 3px solid var(--os-accent-hi);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 12px;
}

/* Tags */
.os-prep-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* Export */
.os-prep-export {
  margin: 0;
  border-top: 1px solid var(--os-border);
  padding: 12px 20px;
}

.os-prep-export summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--os-text-dim);
  list-style: none;
}

.os-prep-export summary::-webkit-details-marker {
  display: none;
}

.os-prep-export[open] summary {
  margin-bottom: 10px;
}

/* Light theme overrides */
[data-theme="light"] .os-prep-pack {
  background:
    radial-gradient(ellipse at top right, rgba(196,154,66,0.06), transparent 50%),
    linear-gradient(180deg, #fff 0%, #f8f9fc 100%);
}

[data-theme="light"] .os-prep-header {
  background: linear-gradient(135deg, rgba(196,154,66,0.04), transparent 60%);
}

[data-theme="light"] .os-prep-table-row {
  border-top-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .os-prep-section {
  border-bottom-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .os-prep-phase {
  border-color: rgba(0,0,0,0.08);
}

/* Responsive */
@media (max-width: 800px) {
  .os-prep-stack-grid,
  .os-prep-prompt-grid,
  .os-prep-workflow-grid,
  .os-prep-email-cards {
    grid-template-columns: 1fr;
  }
  .os-prep-table-head,
  .os-prep-table-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .os-prep-table-head {
    display: none;
  }
  .os-prep-archetype-row {
    grid-template-columns: 1fr;
  }
}

/* ─── End Prep Pack ──────────────────────────────────────────── */

.os-workspace-section {
  background: var(--os-glass-bg);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  border: 1px solid var(--os-glass-border);
  border-radius: var(--os-radius-xl);
  overflow: hidden;
  margin-bottom: var(--os-gap);
  box-shadow: var(--os-shadow-card);
}

.os-workspace-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--os-border);
  background: linear-gradient(90deg, var(--os-surface) 0%, var(--os-surface-2) 100%);
}

.os-workspace-tabs-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.os-workspace-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--os-muted);
  white-space: nowrap;
}

.os-workspace-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}

.os-workspace-tab {
  border: 1px solid var(--os-border);
  border-radius: 7px;
  background: transparent;
  color: var(--os-text-dim);
  font-weight: 600;
  font-size: 11.5px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all var(--os-transition);
  font-family: inherit;
}

.os-workspace-tab:hover {
  color: var(--os-text);
  background: var(--os-surface-2);
  border-color: var(--os-border-med);
}

.os-workspace-tab.active {
  background: var(--os-accent-soft);
  border-color: var(--os-accent-glow);
  color: var(--os-accent-hi);
  box-shadow: 0 0 0 1px var(--os-accent-glow);
  font-weight: 700;
}

.os-workspace-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.os-workspace-meta-text {
  font-size: 11.5px;
  color: var(--os-muted);
  flex: 1;
  line-height: 1.4;
}

.os-workspace-frame-wrap {
  background: #050b15;
  line-height: 0;
  border-top: 1px solid var(--os-border);
  position: relative;
}

/* Inner glow at top of iframe wrap */
.os-workspace-frame-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(196,154,66,0.04), transparent);
  pointer-events: none;
  z-index: 1;
}

#os-workspace-frame {
  width: 100%;
  min-height: 760px;
  border: 0;
  background: #050b15;
  display: block;
}

/* ── 11. HEALTH MATRIX ───────────────────────────────────────────────── */
.os-health-section {
  background: var(--os-glass-bg);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  border: 1px solid var(--os-glass-border);
  border-radius: var(--os-radius-lg);
  padding: 18px 20px;
  box-shadow: var(--os-shadow-card);
}

.os-health-section .os-section-label { margin-bottom: 14px; }

.os-team-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.os-team-row {
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
  padding: 11px 14px;
  background: var(--os-surface-2);
  transition: all var(--os-transition);
  position: relative;
  overflow: hidden;
}

/* Left border by service status */
.os-team-row[data-status="online"]  { border-left: 3px solid var(--os-green); }
.os-team-row[data-status="offline"] { border-left: 3px solid var(--os-red); }
.os-team-row[data-status="degraded"]{ border-left: 3px solid var(--os-amber); }

.os-team-row:hover {
  border-color: var(--os-border-strong);
  background: var(--os-surface-3);
  transform: translateY(-2px);
  box-shadow: var(--os-shadow-card-hover);
}

.os-team-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.os-team-name {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--os-text);
}

.os-team-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.os-team-meta:last-child { margin-bottom: 0; }

.os-meta-chip {
  font-size: 10.5px;
  color: var(--os-muted);
  border: 1px solid var(--os-border);
  border-radius: 999px;
  padding: 2px 7px;
  text-decoration: none;
  transition: all 0.12s;
  background: var(--os-surface);
}

a.os-meta-chip:hover {
  border-color: var(--os-accent-glow);
  color: var(--os-accent-hi);
  background: var(--os-accent-soft);
}

/* ── 12. LEGACY CLASSES ─────────────────────────────────────────────── */
.os-link-row   { display: flex; flex-direction: column; gap: 1px; }
.os-link-item  { display: flex; align-items: center; gap: 6px; }
.os-link-item a { font-weight: 500; color: var(--os-text-dim); text-decoration: none; font-size: 11.5px; }
.os-link-item span { color: var(--os-muted); font-size: 10px; }

/* - 12b. UX polish widgets ------------------------------------------------- */
.os-language-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--os-border-med);
  border-radius: 8px;
  background: var(--os-surface-2);
  color: var(--os-text-dim);
  font-size: 12px;
  font-weight: 600;
}

.os-language-select {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 6px 0;
  outline: none;
}

.os-visitor-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: var(--os-gap);
  border: 1px solid var(--os-accent-glow);
  border-radius: var(--os-radius-xl);
  background:
    radial-gradient(ellipse at 10% 50%, rgba(196,154,66,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 50%, rgba(59,130,246,0.08) 0%, transparent 50%),
    linear-gradient(135deg, var(--os-surface) 0%, var(--os-surface-2) 100%);
  box-shadow: var(--os-shadow-card), 0 0 30px rgba(196,154,66,0.05);
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Decorative shimmer stripe */
.os-visitor-strip::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--os-accent), var(--os-blue), transparent);
  opacity: 0.5;
}

.os-visitor-copy h3 {
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--os-text);
  font-weight: 700;
}

.os-visitor-copy p {
  color: var(--os-text-dim);
  font-size: 13px;
  line-height: 1.55;
}

.os-visitor-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.os-visitor-actions .os-topbar-btn {
  padding: 9px 18px;
  font-size: 13px;
  border-radius: var(--os-radius);
}

.os-visitor-actions .os-topbar-btn:not(.os-topbar-btn-outline) {
  background: linear-gradient(135deg, var(--os-accent) 0%, #b8892e 100%);
  color: #fff;
  border-color: rgba(196,154,66,0.4);
  box-shadow: 0 2px 12px rgba(196,154,66,0.25);
}
.os-visitor-actions .os-topbar-btn:not(.os-topbar-btn-outline):hover {
  box-shadow: 0 4px 20px rgba(196,154,66,0.35);
  transform: translateY(-1px);
}

.os-lang-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: modal-bg-in 0.3s ease-out;
}

@keyframes modal-bg-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.os-lang-modal[hidden] { display: none; }

.os-lang-modal-card {
  width: min(520px, 100%);
  background: var(--os-glass-bg);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--os-accent-glow);
  border-radius: var(--os-radius-xl);
  box-shadow: var(--os-shadow-lg), 0 0 60px rgba(196,154,66,0.08);
  padding: 28px;
  animation: modal-card-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-card-in {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.os-lang-modal-card h3 {
  font-size: 22px;
  margin-bottom: 8px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--os-accent-hi), var(--os-text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.os-lang-modal-card p {
  color: var(--os-text-dim);
  margin-bottom: 18px;
  line-height: 1.6;
}

.os-lang-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.os-lang-modal-actions .os-topbar-btn {
  flex: 1;
  justify-content: center;
  padding: 10px 16px;
  font-size: 13px;
  border-radius: var(--os-radius);
}

/* Tour backdrop overlay */
.os-tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 510;
  animation: tour-backdrop-in 0.3s ease-out;
}
.os-tour-backdrop[hidden] { display: none; }

@keyframes tour-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.os-tour-card {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(400px, calc(100vw - 48px));
  border: 1px solid var(--os-accent-glow);
  border-radius: var(--os-radius-xl);
  background: var(--os-glass-bg);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--os-shadow-lg), 0 0 40px rgba(196,154,66,0.1);
  padding: 20px 22px;
  z-index: 520;
  animation: tour-card-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tour-card-in {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.os-tour-card[hidden] { display: none; }

.os-tour-step {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--os-accent);
}

/* Tour progress bar */
.os-tour-progress {
  height: 3px;
  border-radius: 3px;
  background: var(--os-surface-3);
  margin-top: 6px;
  margin-bottom: 12px;
  overflow: hidden;
}
.os-tour-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--os-accent), var(--os-blue));
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.os-tour-card h4 {
  margin-top: 6px;
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 700;
}

.os-tour-card p {
  color: var(--os-text-dim);
  line-height: 1.6;
  font-size: 13.5px;
}

.os-tour-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.os-tour-actions .os-topbar-btn {
  padding: 8px 16px;
  font-size: 13px;
}

/* ── 13. RESPONSIVE ──────────────────────────────────────────────────── */
/* ── 14. WELCOME OVERLAY ────────────────────────────────────────────── */
.os-welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(8,14,26,0.85);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: welcome-bg-in 0.5s ease-out;
}

.os-welcome-overlay[hidden] { display: none; }

@keyframes welcome-bg-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.os-welcome-card {
  width: min(580px, 100%);
  background: var(--os-glass-bg);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid var(--os-accent-glow);
  border-radius: 24px;
  padding: 40px 36px 32px;
  box-shadow: 0 8px 60px rgba(0,0,0,0.5), 0 0 80px rgba(196,154,66,0.08);
  text-align: center;
  animation: welcome-card-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
  position: relative;
  overflow: hidden;
}

/* Decorative gradient accent at top */
.os-welcome-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--os-accent), var(--os-blue), var(--os-purple), var(--os-accent));
  background-size: 300% 100%;
  animation: welcome-gradient 4s linear infinite;
}

@keyframes welcome-gradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@keyframes welcome-card-in {
  from { opacity: 0; transform: scale(0.9) translateY(24px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.os-welcome-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--os-accent), var(--os-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(196,154,66,0.3);
}

.os-welcome-logo img {
  width: 32px;
  height: 32px;
  filter: brightness(2);
}

.os-welcome-card h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--os-accent-hi), var(--os-text), var(--os-blue-hi));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.os-welcome-card .os-welcome-subtitle {
  font-size: 15px;
  color: var(--os-text-dim);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.os-welcome-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
  text-align: left;
}

.os-welcome-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
  transition: all 0.2s;
}

.os-welcome-feature:hover {
  border-color: var(--os-accent-glow);
  background: rgba(196,154,66,0.04);
}

.os-welcome-feature-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.os-welcome-feature-text strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 2px;
}

.os-welcome-feature-text span {
  font-size: 11.5px;
  color: var(--os-muted);
  line-height: 1.4;
}

.os-welcome-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.os-welcome-actions .os-welcome-start {
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--os-radius-lg);
  border: none;
  background: linear-gradient(135deg, var(--os-accent), #b8892e);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(196,154,66,0.3);
  transition: all 0.25s;
  font-family: inherit;
}

.os-welcome-actions .os-welcome-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(196,154,66,0.4);
}

.os-welcome-actions .os-welcome-tour-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--os-radius-lg);
  border: 1px solid var(--os-border-strong);
  background: transparent;
  color: var(--os-text-dim);
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
}

.os-welcome-actions .os-welcome-tour-btn:hover {
  background: var(--os-surface-2);
  color: var(--os-text);
  border-color: var(--os-accent-glow);
}

/* ── 15. GLOBAL SCROLLBAR ───────────────────────────────────────────── */
.os-app ::-webkit-scrollbar { width: 6px; height: 6px; }
.os-app ::-webkit-scrollbar-track { background: transparent; }
.os-app ::-webkit-scrollbar-thumb {
  background: var(--os-surface-4);
  border-radius: 6px;
}
.os-app ::-webkit-scrollbar-thumb:hover {
  background: var(--os-muted);
}

/* ── 16. FOCUS RINGS ────────────────────────────────────────────────── */
.os-app *:focus-visible {
  outline: 2px solid var(--os-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.os-app button:focus-visible,
.os-app a:focus-visible {
  outline-offset: 2px;
}

/* ── 17. SMOOTH SECTION REVEALS ─────────────────────────────────────── */
@keyframes section-reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.os-kpi-strip {
  animation: section-reveal 0.4s ease-out 0.1s both;
}

.os-visitor-strip {
  animation: section-reveal 0.4s ease-out 0.2s both;
}

.os-content-grid {
  animation: section-reveal 0.4s ease-out 0.3s both;
}

.os-ops-section {
  animation: section-reveal 0.4s ease-out 0.4s both;
}

.os-workspace-section {
  animation: section-reveal 0.4s ease-out 0.5s both;
}

.os-health-section {
  animation: section-reveal 0.4s ease-out 0.6s both;
}

/* ── 18. TOPBAR SECONDARY ACTIONS MENU ──────────────────────────────── */
.os-topbar-secondary {
  position: relative;
}

.os-topbar-more-btn {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--os-border-med);
  background: var(--os-surface-2);
  color: var(--os-text-dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--os-transition);
  font-family: inherit;
}

.os-topbar-more-btn:hover {
  background: var(--os-surface-3);
  color: var(--os-text);
}

/* ── 19. RESPONSIVE ─────────────────────────────────────────────────── */
.os-sidebar-label { font-size: 13px; }
.os-nav-badge { font-size: 14px; }
.os-nav-text strong { font-size: 16.5px; }
.os-nav-text small { font-size: 14px; }
.os-sidebar-links-section .os-link-item { font-size: 16px; }
.os-sidebar-links-section .os-link-item a { font-size: 15.5px; }
.os-topbar-title { font-size: 18px; }
.os-topbar-product { font-size: 11.5px; }
.os-topbar-clock { font-size: 13px; }
.os-topbar-center .os-health-pill { font-size: 13px; }
.os-topbar-btn,
.os-topbar-pill,
.os-topbar-more-btn,
.os-mode-toggle,
.os-language-select { font-size: 16px; }
.os-kpi-label { font-size: 13px; }
.os-kpi-value { font-size: 34px; min-height: 34px; }
.os-kpi-delta { font-size: 15px; }
.os-module-title { font-size: 19px; }
.os-module-summary { font-size: 16px; }
.os-section-label { font-size: 13px; }
.os-item-title { font-size: 16.5px; }
.os-item-copy { font-size: 15.5px; }
.os-pill { font-size: 14px; }
.os-action-btn { font-size: 16px; }
.os-mini-btn { font-size: 16px; }
.os-visitor-copy h3 { font-size: 21px; }
.os-visitor-copy p { font-size: 17px; }
.os-ops-card h4 { font-size: 20px; }
.os-ops-card h5 { font-size: 17px; }
.os-ops-muted,
.os-ops-value,
.os-ops-list-item-copy,
.os-ops-timeline-copy,
.os-prep-body,
.os-prep-email-body,
.os-prep-stack-desc,
.os-prep-workflow-card p { font-size: 15.5px; }
.os-ops-chip,
.os-lifecycle-step,
.os-prep-version-pill,
.os-prep-verified,
.os-prep-time-saved,
.os-prep-email-label,
.os-prep-difficulty { font-size: 13.5px; }
.os-ops-list-item-title,
.os-prep-stack-tool,
.os-prep-table-row strong,
.os-prep-prompt-head,
.os-prep-workflow-card strong { font-size: 16px; }

.os-command-card {
  background:
    radial-gradient(circle at top right, rgba(196,154,66,0.08), transparent 30%),
    linear-gradient(180deg, var(--os-surface-2) 0%, var(--os-surface) 100%);
}

.os-command-card .os-item-actions {
  margin-top: 12px;
}

.os-lifecycle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.os-lifecycle-step {
  border: 1px solid var(--os-border);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--os-surface);
  color: var(--os-text-dim);
  font-size: 13.5px;
  font-weight: 700;
}

.os-lifecycle-step.active {
  border-color: var(--os-accent-glow);
  background: linear-gradient(90deg, rgba(196,154,66,0.14), rgba(59,130,246,0.12));
  color: var(--os-text);
  box-shadow: 0 0 0 1px rgba(196,154,66,0.12);
}

/* ─── Output Kit ─────────────────────────────────────────────── */

/* Empty state */
.os-output-empty {
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-lg);
  background:
    radial-gradient(ellipse at top right, rgba(34,197,94,0.05), transparent 50%),
    linear-gradient(180deg, var(--os-surface-2) 0%, var(--os-surface) 100%);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--os-shadow-card);
}

.os-output-empty-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(59,130,246,0.08));
  color: var(--os-green);
  margin: 0 auto 14px;
}

.os-output-empty h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--os-text);
  margin: 0 0 6px;
}

.os-output-empty p {
  color: var(--os-text-dim);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0 0 14px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.os-output-empty-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.os-output-empty-features span {
  border: 1px solid var(--os-border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--os-text-dim);
  background: var(--os-surface);
  transition: border-color var(--os-transition);
}

.os-output-empty-features span:hover {
  border-color: var(--os-accent-glow);
}

/* Main kit container */
.os-output-kit {
  background:
    radial-gradient(ellipse at top right, rgba(34,197,94,0.06), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(59,130,246,0.04), transparent 50%),
    linear-gradient(180deg, var(--os-surface-2) 0%, var(--os-surface) 100%);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--os-shadow-card);
}

/* Header */
.os-output-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--os-border);
  background: linear-gradient(135deg, rgba(34,197,94,0.05), transparent 60%);
}

.os-output-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.os-output-header h4 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  background: linear-gradient(135deg, var(--os-green, #22c55e), var(--os-accent-hi, #c49a42));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.os-output-subtitle {
  font-size: 14px;
  color: var(--os-text-dim);
  margin: 6px 0 0;
}

/* Phase labels */
.os-output-phase {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--os-surface-3);
  border-top: 1px solid var(--os-border);
  border-bottom: 1px solid var(--os-border);
}

.os-output-phase-icon {
  font-size: 16px;
}

.os-output-phase-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--os-green-hi);
}

/* Sections */
.os-output-section {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.os-output-section:last-of-type {
  border-bottom: none;
}

.os-output-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.os-output-section-head h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--os-text);
  margin: 0;
}

.os-output-summary {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--os-text-dim);
  margin: 0;
}

/* Tool pills */
.os-output-tool-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.os-output-tool-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--os-accent-glow);
  background: var(--os-accent-soft);
  color: var(--os-accent-hi);
  font-size: 12px;
  font-weight: 600;
}

/* Topics */
.os-output-topics {
  display: grid;
  gap: 6px;
}

.os-output-topic-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--os-text-dim);
  line-height: 1.5;
}

/* 30-day timeline grid */
.os-output-timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.os-output-week-card {
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
  padding: 14px 16px;
  background: var(--os-surface);
  transition: border-color var(--os-transition), box-shadow var(--os-transition);
}

.os-output-week-card:hover {
  border-color: var(--os-accent-glow);
  box-shadow: 0 0 0 1px rgba(196,154,66,0.08);
}

.os-output-week-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.os-output-week-num {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--os-accent-soft), rgba(59,130,246,0.08));
  color: var(--os-accent-hi);
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.os-output-week-head strong {
  font-size: 13px;
  color: var(--os-text);
}

.os-output-week-title {
  display: block;
  font-size: 12px;
  color: var(--os-text-dim);
  margin-top: 2px;
}

.os-output-week-card ul {
  margin: 0 0 10px 16px;
  padding: 0;
}

.os-output-week-card li {
  color: var(--os-text-dim);
  font-size: 13px;
  line-height: 1.6;
}

.os-output-week-metric {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--os-green);
  padding-top: 8px;
  border-top: 1px solid var(--os-border);
}

/* Artifact grid */
.os-output-artifact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.os-output-artifact-card {
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
  padding: 12px 14px;
  background: var(--os-surface);
  transition: border-color var(--os-transition);
}

.os-output-artifact-card:hover {
  border-color: var(--os-accent-glow);
}

.os-output-artifact-card strong {
  font-size: 13px;
  color: var(--os-text);
  display: block;
  margin-bottom: 4px;
}

.os-output-artifact-card p {
  font-size: 12px;
  color: var(--os-text-dim);
  line-height: 1.5;
  margin: 0 0 8px;
}

.os-output-artifact-status {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.os-output-artifact-status.ready {
  background: var(--os-green-soft);
  color: var(--os-green-hi);
  border: 1px solid var(--os-green-glow);
}

.os-output-artifact-status.pending {
  background: var(--os-amber-soft);
  color: var(--os-amber-hi);
  border: 1px solid var(--os-amber-glow);
}

/* Report card */
.os-output-report-checklist {
  display: grid;
  gap: 8px;
}

.os-output-report-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--os-text-dim);
  line-height: 1.5;
}

.os-output-report-check {
  color: var(--os-muted);
  font-size: 16px;
  flex-shrink: 0;
}

/* Email cards */
.os-output-email-grid {
  display: grid;
  gap: 10px;
}

.os-output-email-card {
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
  padding: 14px 16px;
  background: var(--os-surface);
  transition: border-color var(--os-transition);
}

.os-output-email-card:hover {
  border-color: var(--os-accent-glow);
}

.os-output-email-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.os-output-email-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--os-accent-hi);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--os-accent-soft);
  border: 1px solid var(--os-accent-glow);
}

.os-output-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--os-border);
  border-radius: 8px;
  padding: 4px 10px;
  color: var(--os-text-dim);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s;
}

.os-output-copy-btn:hover {
  border-color: var(--os-accent-hi);
  color: var(--os-accent-hi);
}

.os-output-copy-btn.copied {
  border-color: #34d399;
  color: #34d399;
}

.os-output-email-body {
  font-size: 13px;
  line-height: 1.65;
  color: var(--os-text-dim);
  white-space: pre-wrap;
}

/* Upsell section */
.os-output-upsell-section {
  border-left: 3px solid var(--os-accent);
  background: linear-gradient(90deg, var(--os-accent-soft), transparent 40%);
}

.os-output-upsell-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--os-text-dim);
  margin: 0 0 10px;
}

.os-output-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.os-output-summary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.os-output-mailbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--os-text-dim);
  font-size: 12px;
  font-weight: 700;
}

.os-output-mailbox select {
  min-width: 220px;
  border-radius: 10px;
  border: 1px solid var(--os-border);
  background: var(--os-surface);
  color: var(--os-text);
  padding: 8px 12px;
  font-size: 13px;
}

.os-output-followup-queue {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.os-output-followup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
  background: var(--os-surface);
}

.os-output-followup-item strong {
  display: block;
  color: var(--os-text);
  font-size: 13px;
  margin-bottom: 4px;
}

.os-output-followup-item p {
  margin: 0;
  color: var(--os-text-dim);
  font-size: 12px;
}

.os-output-followup-item.is-sent {
  border-color: rgba(52, 211, 153, 0.26);
  background: rgba(52, 211, 153, 0.06);
}

.os-output-followup-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.os-client-search-wrap {
  display: grid;
  gap: 10px;
}

.os-client-search-tools {
  display: flex;
  justify-content: flex-end;
}

.os-client-search-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.os-client-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.os-client-filter-chip {
  border: 1px solid var(--os-border);
  background: var(--os-surface);
  color: var(--os-text-dim);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--os-transition), color var(--os-transition), background var(--os-transition);
}

.os-client-filter-chip:hover,
.os-client-filter-chip.active {
  border-color: var(--os-accent-glow);
  background: linear-gradient(90deg, rgba(196,154,66,0.14), rgba(59,130,246,0.10));
  color: var(--os-text);
}

.os-client-search-field input {
  font-size: 15px;
}

.os-client-search-meta {
  margin: 0;
  color: var(--os-text-dim);
  font-size: 13.5px;
  line-height: 1.5;
}

/* ─── Challenge Packs ────────────────────────────────────────── */

/* Catalog container */
.os-challenge-catalog {
  overflow: visible;
}

.os-challenge-catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

/* Filter */
.os-challenge-filter-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.os-challenge-filter-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--os-muted);
}

.os-challenge-filter {
  min-width: 180px;
  border-radius: 10px;
  border: 1px solid var(--os-border);
  background: var(--os-surface);
  color: var(--os-text);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--os-transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238fa3bf' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.os-challenge-filter:hover,
.os-challenge-filter:focus {
  border-color: var(--os-accent-glow);
  outline: none;
}

/* Empty state */
.os-challenge-empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--os-muted);
}

.os-challenge-empty p {
  margin: 10px 0 0;
  font-size: 13px;
}

/* Card grid */
.os-challenge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* Individual card */
.os-challenge-card {
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-lg);
  padding: 18px;
  background:
    radial-gradient(ellipse at top right, rgba(196,154,66,0.04), transparent 50%),
    linear-gradient(180deg, var(--os-surface-2) 0%, var(--os-surface) 100%);
  transition: border-color var(--os-transition), box-shadow var(--os-transition), transform 0.2s;
  display: flex;
  flex-direction: column;
}

.os-challenge-card:hover {
  border-color: var(--os-accent-glow);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15), 0 0 0 1px rgba(196,154,66,0.08);
  transform: translateY(-1px);
}

.os-challenge-card-head {
  margin-bottom: 12px;
}

.os-challenge-card-head h5 {
  font-size: 15px;
  font-weight: 800;
  color: var(--os-text);
  margin: 0 0 4px;
}

.os-challenge-subtitle {
  font-size: 13px;
  color: var(--os-text-dim);
  line-height: 1.5;
  margin: 0;
}

/* Meta badges */
.os-challenge-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.os-challenge-diff {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.os-challenge-diff.beginner {
  background: var(--os-green-soft);
  color: var(--os-green-hi);
  border: 1px solid var(--os-green-glow);
}

.os-challenge-diff.intermediate {
  background: var(--os-amber-soft);
  color: var(--os-amber-hi);
  border: 1px solid var(--os-amber-glow);
}

.os-challenge-diff.advanced {
  background: var(--os-red-soft);
  color: var(--os-red-hi);
  border: 1px solid rgba(239,68,68,0.20);
}

.os-challenge-duration {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--os-text-dim);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--os-border);
  background: var(--os-surface);
}

.os-challenge-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--os-accent-hi);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--os-accent-glow);
  background: var(--os-accent-soft);
}

/* Ideal client */
.os-challenge-ideal-wrap {
  margin-bottom: 12px;
}

.os-challenge-ideal-label,
.os-challenge-artifacts-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--os-muted);
  margin-bottom: 4px;
}

.os-challenge-ideal {
  font-size: 13px;
  color: var(--os-text-dim);
  line-height: 1.5;
  margin: 0;
}

.os-challenge-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.os-challenge-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--os-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--os-text-dim);
  font-size: 11px;
  font-weight: 700;
}

.os-challenge-metric strong {
  color: var(--os-text);
  font-size: 12px;
}

/* Artifact items */
.os-challenge-artifacts {
  margin-bottom: 14px;
  flex: 1;
}

.os-challenge-artifact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--os-text-dim);
  padding: 3px 0;
}

/* Use button */
.os-challenge-use-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--os-accent-glow);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--os-accent-soft), rgba(59,130,246,0.06));
  color: var(--os-accent-hi);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: auto;
}

.os-challenge-use-btn:hover {
  background: linear-gradient(135deg, rgba(196,154,66,0.22), rgba(59,130,246,0.12));
  border-color: var(--os-accent);
  box-shadow: 0 0 12px rgba(196,154,66,0.15);
}

/* Info card benefits */
.os-challenge-info {
  display: flex;
  flex-direction: column;
}

.os-challenge-performance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.os-challenge-performance-card {
  padding: 14px 16px;
  border-radius: var(--os-radius);
  border: 1px solid var(--os-border);
  background: var(--os-surface);
}

.os-challenge-performance-card span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--os-muted);
  margin-bottom: 8px;
}

.os-challenge-performance-card strong {
  display: block;
  color: var(--os-text);
  font-size: 24px;
  margin-bottom: 8px;
}

.os-challenge-performance-card p {
  margin: 0;
  color: var(--os-text-dim);
  font-size: 13px;
  line-height: 1.5;
}

.os-challenge-leaderboard {
  display: grid;
  gap: 10px;
}

.os-challenge-leaderboard h5 {
  margin: 0;
  color: var(--os-text);
  font-size: 15px;
}

.os-challenge-leader {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--os-radius);
  border: 1px solid var(--os-border);
  background: var(--os-surface);
  color: var(--os-text-dim);
  font-size: 13px;
}

.os-challenge-leader strong {
  color: var(--os-accent-hi);
}

.os-challenge-benefits {
  display: grid;
  gap: 16px;
  flex: 1;
}

.os-challenge-benefit {
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 12px;
}

.os-challenge-benefit-icon {
  grid-row: 1 / -1;
  font-size: 20px;
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}

.os-challenge-benefit strong {
  font-size: 14px;
  color: var(--os-text);
}

.os-challenge-benefit p {
  font-size: 13px;
  color: var(--os-text-dim);
  line-height: 1.5;
  margin: 0;
}

/* ─── Session Flow ───────────────────────────────────────────── */

.os-session-flow-card {
  overflow: visible;
}

.os-session-flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.os-session-flow-header h4 {
  margin: 0;
}

/* Empty state */
.os-session-flow-empty {
  text-align: center;
  padding: 28px 20px;
}

.os-session-flow-empty-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(196,154,66,0.10), rgba(59,130,246,0.06));
  color: var(--os-accent);
  margin: 0 auto 14px;
}

.os-session-flow-empty h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--os-text);
  margin: 0 0 6px;
}

.os-session-flow-empty p {
  font-size: 13.5px;
  color: var(--os-text-dim);
  line-height: 1.6;
  margin: 0;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* Tabs */
.os-session-flow-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--os-surface);
  border: 1px solid var(--os-border);
  margin: 10px 0 16px;
}

.os-session-flow-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--os-text-dim);
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.os-session-flow-tab:hover {
  color: var(--os-text);
  background: rgba(255,255,255,0.04);
}

.os-session-flow-tab.active {
  border-color: var(--os-accent-glow);
  background: linear-gradient(135deg, rgba(196,154,66,0.16), rgba(59,130,246,0.10));
  color: var(--os-text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.os-session-flow-tab-icon {
  font-size: 14px;
}

/* Flow body */
.os-session-flow-body {
  display: grid;
  gap: 14px;
}

/* Sections inside flow */
.os-session-flow-section {
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
  padding: 16px 18px;
  background: var(--os-surface);
}

.os-session-flow-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.os-session-flow-section-head h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--os-text);
  margin: 0;
}

/* Action buttons */
.os-session-flow-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.os-session-flow-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--os-accent-glow);
  background: linear-gradient(135deg, var(--os-accent-soft), rgba(59,130,246,0.06));
  color: var(--os-accent-hi);
}

.os-session-flow-btn:hover {
  background: linear-gradient(135deg, rgba(196,154,66,0.22), rgba(59,130,246,0.12));
  box-shadow: 0 0 8px rgba(196,154,66,0.12);
}

.os-session-flow-btn.outline {
  background: transparent;
  border-color: var(--os-border);
  color: var(--os-text-dim);
}

.os-session-flow-btn.outline:hover {
  border-color: var(--os-accent-glow);
  color: var(--os-accent-hi);
  background: var(--os-accent-soft);
}

/* Facts grid */
.os-session-flow-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.os-session-flow-fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--os-border);
  background: var(--os-surface-2);
}

.os-session-flow-fact-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--os-muted);
}

.os-session-flow-fact-value {
  font-size: 13px;
  color: var(--os-text);
  font-weight: 600;
}

/* Checklist */
.os-session-flow-checklist {
  display: grid;
  gap: 6px;
}

/* Live blocks */
.os-session-flow-blocks {
  display: grid;
  gap: 6px;
}

.os-session-flow-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--os-border);
  background: var(--os-surface-2);
  font-size: 13.5px;
  color: var(--os-text-dim);
  transition: border-color var(--os-transition);
}

.os-session-flow-block:hover {
  border-color: var(--os-accent-glow);
}

.os-session-flow-block-num {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--os-accent-soft), rgba(59,130,246,0.08));
  color: var(--os-accent-hi);
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Artifact list */
.os-session-flow-artifact-list {
  display: grid;
  gap: 4px;
}

.os-session-flow-artifact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--os-text-dim);
  padding: 4px 0;
}

/* ─── UX Communication - Hints, Guides, States ─────────────── */

/* Contextual hint text below section heads */
.os-session-flow-hint {
  font-size: 13px;
  line-height: 1.55;
  color: var(--os-text-dim);
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(59,130,246,0.04), rgba(196,154,66,0.03));
  border-left: 3px solid var(--os-accent-glow);
}

/* Guide text below session title (replaces "Current status") */
.os-session-flow-guide {
  font-size: 13px;
  line-height: 1.5;
  color: var(--os-text-dim);
  margin: 4px 0 0;
}

/* Done state for status buttons */
.os-session-flow-btn.is-done {
  border-color: rgba(52, 211, 153, 0.30);
  background: rgba(52, 211, 153, 0.08);
  color: #56d39b;
  cursor: default;
}

.os-session-flow-btn.is-done:hover {
  background: rgba(52, 211, 153, 0.12);
  box-shadow: none;
}

/* Active timer pulse */
.os-session-live-timer.is-active {
  border-color: rgba(52, 211, 153, 0.30);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.06), transparent);
}

.os-session-live-timer.is-active strong {
  color: #56d39b;
}

/* Done state for live checklist blocks */
.os-session-flow-block.is-done {
  border-color: rgba(52, 211, 153, 0.24);
  background: rgba(52, 211, 153, 0.04);
}

.os-session-flow-block.is-done .os-session-flow-block-num {
  background: rgba(52, 211, 153, 0.14);
  color: #56d39b;
}

.os-session-flow-block.is-done .os-session-flow-block-copy {
  text-decoration: line-through;
  text-decoration-color: rgba(52, 211, 153, 0.4);
  color: var(--os-muted);
}

/* Checkbox inside live blocks */
.os-session-flow-block input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #56d39b;
  cursor: pointer;
  flex-shrink: 0;
}

/* Export group visual separator */
.os-session-flow-export-group {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--os-border);
  background: var(--os-surface-2);
  margin-bottom: 6px;
}

.os-session-flow-export-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--os-muted);
  margin-bottom: 8px;
}

/* Pipeline step visual connectors */
.os-session-pipeline {
  position: relative;
}

.os-session-pipeline::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--os-border);
  z-index: 0;
}

.os-session-pipeline-step {
  position: relative;
  z-index: 1;
}

/* B2C Analytics header spacing */
.os-b2c-analytics-header {
  margin-bottom: 4px;
}

.os-b2c-analytics-header h4 {
  margin: 0 0 6px;
}

.os-b2c-analytics-header .os-ops-muted {
  margin: 0 0 12px;
}

/* Session flow tab icon alignment fix */
.os-session-flow-tab-icon {
  display: inline-flex;
  align-items: center;
}

.os-session-flow-tab-icon svg {
  display: block;
}

/* ─── Light Theme - New UX Elements ────────────────────────── */

[data-theme="light"] .os-session-flow-hint {
  background: linear-gradient(135deg, rgba(59,130,246,0.04), rgba(196,154,66,0.02));
  border-left-color: rgba(196,154,66,0.40);
}

[data-theme="light"] .os-session-flow-btn.is-done {
  border-color: rgba(16, 185, 129, 0.30);
  background: rgba(16, 185, 129, 0.06);
  color: #059669;
}

[data-theme="light"] .os-session-live-timer.is-active {
  border-color: rgba(16, 185, 129, 0.30);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.04), transparent);
}

[data-theme="light"] .os-session-live-timer.is-active strong {
  color: #059669;
}

[data-theme="light"] .os-session-flow-block.is-done {
  border-color: rgba(16, 185, 129, 0.20);
  background: rgba(16, 185, 129, 0.03);
}

[data-theme="light"] .os-session-flow-export-group {
  background: #f8f9fc;
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .os-session-pipeline::before {
  background: rgba(0,0,0,0.08);
}

/* ─── Light Theme Overrides - Output Kit ────────────────────── */
[data-theme="light"] .os-output-kit {
  background:
    radial-gradient(ellipse at top right, rgba(34,197,94,0.05), transparent 50%),
    linear-gradient(180deg, #fff 0%, #f8f9fc 100%);
}

[data-theme="light"] .os-output-header {
  background: linear-gradient(135deg, rgba(34,197,94,0.04), transparent 60%);
}

[data-theme="light"] .os-output-section {
  border-bottom-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .os-output-phase {
  border-color: rgba(0,0,0,0.08);
  background: #f1f5f9;
}

[data-theme="light"] .os-output-week-card,
[data-theme="light"] .os-output-artifact-card,
[data-theme="light"] .os-output-email-card {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .os-output-upsell-section {
  background: linear-gradient(90deg, rgba(196,154,66,0.06), transparent 40%);
}

[data-theme="light"] .os-output-empty {
  background: linear-gradient(180deg, #fff 0%, #f8f9fc 100%);
}

/* ─── Light Theme Overrides - Challenge Packs ──────────────── */
[data-theme="light"] .os-challenge-card {
  background: linear-gradient(180deg, #fff 0%, #f8f9fc 100%);
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .os-challenge-card:hover {
  border-color: rgba(196,154,66,0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06), 0 0 0 1px rgba(196,154,66,0.08);
}

[data-theme="light"] .os-challenge-filter {
  background: #fff;
  border-color: rgba(0,0,0,0.12);
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%234d6480' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
}

[data-theme="light"] .os-challenge-use-btn {
  background: linear-gradient(135deg, rgba(196,154,66,0.08), rgba(59,130,246,0.04));
}

[data-theme="light"] .os-challenge-use-btn:hover {
  background: linear-gradient(135deg, rgba(196,154,66,0.16), rgba(59,130,246,0.08));
}

/* ─── Light Theme Overrides - Session Flow ─────────────────── */
[data-theme="light"] .os-session-flow-tabs {
  background: #f1f5f9;
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .os-session-flow-tab:hover {
  background: rgba(0,0,0,0.04);
}

[data-theme="light"] .os-session-flow-tab.active {
  background: linear-gradient(135deg, rgba(196,154,66,0.12), rgba(59,130,246,0.08));
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

[data-theme="light"] .os-session-flow-section {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .os-session-flow-fact {
  background: #f8f9fc;
  border-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .os-session-flow-block {
  background: #f8f9fc;
  border-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .os-session-flow-btn {
  background: linear-gradient(135deg, rgba(196,154,66,0.08), rgba(59,130,246,0.04));
}

[data-theme="light"] .os-session-flow-btn.outline {
  background: transparent;
  border-color: rgba(0,0,0,0.12);
}

/* ─── End Light Theme ───────────────────────────────────────── */

@media (max-width: 1280px) {
  .os-app { --os-sidebar-w: 220px; }
  .os-content-grid { grid-template-columns: 1fr 330px; }
  .os-kpi-value { font-size: 26px; }
  .os-ops-grid.two,
  .os-ops-grid.two-wide { grid-template-columns: 1fr; }
  .os-ops-grid.three { grid-template-columns: 1fr 1fr; }
  .os-ops-language-grid { grid-template-columns: 1fr 1fr; }
  .os-challenge-grid { grid-template-columns: 1fr; }
  .os-output-timeline { grid-template-columns: 1fr; }
  .os-ops-groups { width: 100%; align-items: flex-start; }
  .os-ops-group-label { text-align: left; }
}

@media (max-width: 1060px) {
  .os-kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .os-content-grid { grid-template-columns: 1fr; }
  .os-right-panel { max-height: none; }
  .os-ops-header { flex-direction: column; }
  .os-ops-groups { width: 100%; align-items: flex-start; }
  .os-ops-group-label { text-align: left; }
  .os-ops-tabs { justify-content: flex-start; }
}

@media (max-width: 800px) {
  .os-sidebar { display: none; }
  .os-main { margin-left: 0; padding: 14px 14px 40px; }
  .os-topbar-left { width: auto; border-right: none; }
  .os-topbar-center { display: none; }
  .os-visitor-strip { grid-template-columns: 1fr; }
  .os-visitor-actions { justify-content: flex-start; flex-wrap: wrap; }
  .os-ops-form-grid,
  .os-ops-kv,
  .os-ops-grid.three,
  .os-ops-language-grid,
  .os-output-timeline,
  .os-challenge-grid,
  .os-output-artifact-grid { grid-template-columns: 1fr; }
  .os-session-flow-facts { grid-template-columns: 1fr; }
  .os-session-flow-actions { width: 100%; }
  .os-session-flow-btn { flex: 1; justify-content: center; }
  .os-challenge-catalog-header { flex-direction: column; }
  .os-challenge-filter-wrap { width: 100%; }
  .os-challenge-filter { width: 100%; }
  .os-output-email-grid { grid-template-columns: 1fr; }
  .os-output-followup-item { flex-direction: column; align-items: flex-start; }
  .os-output-mailbox { width: 100%; align-items: flex-start; flex-direction: column; }
  .os-output-mailbox select { width: 100%; min-width: 0; }
  .os-challenge-performance { grid-template-columns: 1fr; }
  .os-b2c-analytics-grid,
  .os-b2c-analytics-grid.compact { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .os-kpi-strip { grid-template-columns: 1fr; }
  .os-main { padding: 10px 10px 32px; }
  .os-welcome-features { grid-template-columns: 1fr; }
  .os-welcome-card { padding: 28px 20px 24px; }
  .os-welcome-card h2 { font-size: 22px; }
  .os-session-flow-tab { font-size: 12px; padding: 7px 10px; }
  .os-output-header-top { flex-direction: column; align-items: flex-start; }
  .os-challenge-card { padding: 14px; }
}

.os-ops-chip-ok {
  color: #56d39b;
  border-color: rgba(47, 199, 139, 0.28);
  background: rgba(47, 199, 139, 0.08);
}

.os-ops-chip-warn {
  color: #e3bb63;
  border-color: rgba(227, 187, 99, 0.28);
  background: rgba(227, 187, 99, 0.08);
}

.os-ops-chip-muted {
  color: var(--os-text-dim);
}

.os-ops-chip-accent {
  color: var(--os-accent-hi);
  border-color: rgba(196, 154, 66, 0.28);
  background: rgba(196, 154, 66, 0.08);
}

.os-session-flow-status-copy {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--os-text-dim);
}

.os-session-pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0 16px;
}

.os-session-pipeline-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--os-border);
  background: var(--os-surface);
}

.os-session-pipeline-step.is-current {
  border-color: var(--os-accent-glow);
  box-shadow: inset 0 0 0 1px rgba(196, 154, 66, 0.12);
}

.os-session-pipeline-step.is-complete {
  border-color: rgba(47, 199, 139, 0.24);
  background: rgba(47, 199, 139, 0.06);
}

.os-session-pipeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.os-session-pipeline-step.is-current .os-session-pipeline-dot {
  background: var(--os-accent-hi);
}

.os-session-pipeline-step.is-complete .os-session-pipeline-dot {
  background: #56d39b;
}

.os-session-pipeline-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--os-text-dim);
  white-space: nowrap;
}

.os-session-live-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.os-session-live-timer {
  border: 1px solid var(--os-border);
  border-radius: 12px;
  background: var(--os-surface-2);
  padding: 12px 14px;
}

.os-session-live-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--os-muted);
  margin-bottom: 4px;
}

.os-session-live-timer strong {
  font-size: 19px;
  color: var(--os-text);
}

.os-session-flow-block {
  align-items: flex-start;
  cursor: pointer;
}

.os-session-flow-block input {
  margin-top: 3px;
  accent-color: var(--os-accent-hi);
}

.os-session-flow-block-copy {
  flex: 1;
  line-height: 1.45;
}

.os-session-flow-block.is-done {
  border-color: rgba(47, 199, 139, 0.28);
  background: rgba(47, 199, 139, 0.06);
}

.os-session-flow-block.is-done .os-session-flow-block-copy {
  color: var(--os-text);
  text-decoration: line-through;
  text-decoration-color: rgba(47, 199, 139, 0.55);
}

.os-session-notes {
  width: 100%;
  min-height: 140px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--os-border);
  background: var(--os-surface-2);
  color: var(--os-text);
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}

.os-session-notes:focus {
  outline: none;
  border-color: var(--os-accent-glow);
  box-shadow: 0 0 0 3px rgba(196, 154, 66, 0.12);
}

@media (max-width: 1100px) {
  .os-session-pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.os-b2c-analytics-card {
  display: grid;
  gap: 16px;
}

.os-b2c-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.os-b2c-analytics-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.os-b2c-analytics-metric {
  padding: 16px 18px;
  border-radius: var(--os-radius);
  border: 1px solid var(--os-border);
  background: var(--os-surface);
}

.os-b2c-analytics-metric span {
  display: block;
  color: var(--os-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.os-b2c-analytics-metric strong {
  display: block;
  color: var(--os-text);
  font-size: 24px;
  margin-bottom: 8px;
}

.os-b2c-analytics-metric p {
  margin: 0;
  color: var(--os-text-dim);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 800px) {
  .os-session-pipeline,
  .os-session-live-meta {
    grid-template-columns: 1fr;
  }
}

/* Light theme: ops nav bar */
[data-theme="light"] .os-ops-nav {
  background: #fafbfd;
  border-top-color: rgba(0,0,0,0.06);
  border-bottom-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .os-ops-nav-divider {
  background: rgba(0,0,0,0.08);
}

[data-theme="light"] .os-ops-tab:hover {
  background: rgba(0,0,0,0.03);
}

[data-theme="light"] .os-ops-tab.active {
  color: var(--os-accent);
}

[data-theme="light"] .os-session-pipeline-step {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .os-session-pipeline-step.is-current {
  box-shadow: inset 0 0 0 1px rgba(196,154,66,0.16);
}

[data-theme="light"] .os-session-flow-block.is-done {
  background: rgba(47, 199, 139, 0.08);
}

[data-theme="light"] .os-session-notes,
[data-theme="light"] .os-session-live-timer {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}

/* ─── B2C Home Styles ──────────────────────────────────────── */

/* Quick stats strip */
.os-b2c-stats-strip {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  border-radius: var(--os-radius);
  overflow: hidden;
}

.os-b2c-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 12px 12px;
  background: var(--os-surface-2);
  border: 1px solid var(--os-border);
  transition: background var(--os-transition);
}
.os-b2c-stat:first-child { border-radius: var(--os-radius) 0 0 var(--os-radius); }
.os-b2c-stat:last-child  { border-radius: 0 var(--os-radius) var(--os-radius) 0; }

.os-b2c-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--os-text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.os-b2c-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--os-muted);
}

/* 2x2 Home card grid */
.os-b2c-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--os-gap);
}

.os-b2c-card-wide {
  grid-column: 1 / -1;
}

/* Card header with icon */
.os-b2c-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.os-b2c-card-header h4 {
  margin-bottom: 2px;
}

.os-b2c-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Card hover elevation */
.os-b2c-card {
  transition: transform var(--os-transition), box-shadow var(--os-transition);
}
.os-b2c-card:hover {
  box-shadow: var(--os-shadow-card-hover);
}

/* Next up - horizontal row layout */
.os-b2c-next-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.os-b2c-next-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--os-surface);
  border: 1px solid var(--os-border);
}

.os-b2c-next-label {
  display: block;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--os-muted);
  margin-bottom: 6px;
}

.os-b2c-next-value {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--os-text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.os-b2c-next-detail {
  display: block;
  font-size: 12px;
  color: var(--os-text-dim);
  line-height: 1.45;
}

/* Attention dot */
.os-b2c-attention-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--os-amber);
  flex-shrink: 0;
  margin-top: 6px;
  box-shadow: 0 0 6px rgba(245,158,11,0.4);
}

/* Quick action cards */
.os-b2c-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.os-b2c-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: 10px;
  border: 1px solid var(--os-border);
  background: var(--os-surface);
  color: var(--os-text-dim);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--os-transition);
}

.os-b2c-action-card svg {
  opacity: 0.5;
  transition: opacity var(--os-transition);
}

.os-b2c-action-card:hover {
  background: var(--os-surface-3);
  color: var(--os-text);
  border-color: var(--os-border-med);
  transform: translateY(-1px);
}

.os-b2c-action-card:hover svg {
  opacity: 0.9;
}

/* Improved empty states */
.os-ops-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 16px;
  color: var(--os-text-dim);
  font-size: 13px;
  line-height: 1.5;
  min-height: 80px;
}

.os-ops-empty p {
  margin: 0;
}

/* Light theme overrides for B2C Home */
[data-theme="light"] .os-b2c-stat {
  background: #fff;
}

[data-theme="light"] .os-b2c-next-item {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .os-b2c-action-card {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .os-b2c-action-card:hover {
  background: #f6f8fc;
  border-color: rgba(0,0,0,0.10);
}

/* Blueprints horizontal grid */
.os-b2c-blueprints-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.os-b2c-blueprint-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--os-border);
  background: var(--os-surface);
  cursor: pointer;
  transition: all var(--os-transition);
  text-align: left;
  font: inherit;
  color: inherit;
}

.os-b2c-blueprint-card:hover {
  background: var(--os-surface-3);
  border-color: var(--os-border-med);
  transform: translateY(-1px);
}

[data-theme="light"] .os-b2c-blueprint-card {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .os-b2c-blueprint-card:hover {
  background: #f6f8fc;
}

/* Responsive: stack on mobile */
@media (max-width: 700px) {
  .os-b2c-home-grid {
    grid-template-columns: 1fr;
  }
  .os-b2c-next-row {
    grid-template-columns: 1fr;
  }
  .os-b2c-stats-strip {
    flex-wrap: wrap;
  }
  .os-b2c-stat {
    min-width: calc(50% - 1px);
  }
}

/* ─── Action Toast Notification ────────────────────────────── */
.os-action-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  background: rgba(14, 34, 59, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  max-width: 400px;
}

.os-action-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.os-action-toast.is-ok {
  border-color: rgba(47, 199, 139, 0.35);
}

.os-action-toast.is-ok svg {
  color: #56d39b;
  flex-shrink: 0;
}

.os-action-toast.is-warn {
  border-color: rgba(227, 187, 99, 0.35);
}

.os-action-toast.is-warn svg {
  color: #e3bb63;
  flex-shrink: 0;
}

[data-theme="light"] .os-action-toast {
  background: rgba(255,255,255,0.96);
  color: #0e223b;
  border-color: rgba(0,0,0,0.10);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

/* ─── Button Loading / Success / Error States ──────────────── */
.os-session-flow-btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
  cursor: wait;
}

.os-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: os-spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes os-spin {
  to { transform: rotate(360deg); }
}

[data-theme="light"] .os-btn-spinner {
  border-color: rgba(0,0,0,0.1);
  border-top-color: currentColor;
}

/* ─── Before Sub-Tabs ──────────────────────────────────────── */
.os-before-subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--os-border);
}

.os-before-subtab {
  flex: 1;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--os-text-dim);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.os-before-subtab:hover {
  color: var(--os-text);
  background: rgba(255,255,255,0.04);
}

.os-before-subtab.active {
  color: var(--os-text);
  background: rgba(196, 154, 66, 0.12);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

[data-theme="light"] .os-before-subtabs {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .os-before-subtab:hover {
  background: rgba(0,0,0,0.03);
}

[data-theme="light"] .os-before-subtab.active {
  background: rgba(196, 154, 66, 0.10);
  color: #0e223b;
}

@media (max-width: 560px) {
  .os-before-subtab {
    padding: 7px 8px;
    font-size: 11px;
  }
  .os-action-toast {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: none;
  }
}

.os-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(196,154,66,0.18), transparent 34%),
    rgba(4, 8, 15, 0.82);
  backdrop-filter: blur(14px);
}

.os-auth-overlay[hidden] {
  display: none !important;
}

.os-auth-card {
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 18px;
  border: 1px solid var(--os-border-med);
  background: linear-gradient(180deg, rgba(14,25,40,0.96), rgba(10,17,29,0.98));
  box-shadow: var(--os-shadow-lg);
}

.os-auth-eyebrow {
  margin-bottom: 8px;
  color: var(--os-accent-hi);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.os-auth-title {
  margin-bottom: 18px;
  color: var(--os-text);
  font-size: 28px;
  font-weight: 800;
}

.os-auth-form {
  display: grid;
  gap: 14px;
}

.os-auth-field {
  display: grid;
  gap: 8px;
  color: var(--os-text-dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.os-auth-field input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--os-border-med);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  color: var(--os-text);
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.os-auth-field input:focus {
  outline: none;
  border-color: rgba(196,154,66,0.55);
  box-shadow: 0 0 0 3px rgba(196,154,66,0.14);
}

.os-auth-message {
  min-height: 18px;
  color: #fda4af;
  font-size: 13px;
}

.os-auth-message[hidden] {
  display: none !important;
}

.os-auth-submit {
  margin-top: 4px;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #8a6529, #c49a42, #e0b86a);
  color: #120b05;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.os-auth-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}
