/* Team mockups — shared design tokens.
   Extracted from docs/ux/mockups/*-mockup.html so every Team mockup
   stays visually consistent with Customer 360, Invoice, Deal, etc.
   Applied via <link rel="stylesheet" href="_shared.css">. */

:root {
  --ns-bg: #0c1222;
  --ns-surface: rgba(255,255,255,0.04);
  --ns-surface-h: rgba(255,255,255,0.07);
  --ns-border: rgba(255,255,255,0.08);
  --ns-border-h: rgba(255,255,255,0.12);
  --ns-inset-glow: inset 0 1px 0 rgba(255,255,255,0.04);
  --ns-text-100: rgba(255,255,255,0.95);
  --ns-text-70: rgba(255,255,255,0.70);
  --ns-text-45: rgba(255,255,255,0.45);
  --ns-text-25: rgba(255,255,255,0.25);

  --ns-accent: #818cf8;
  --ns-accent-glow: rgba(129,140,248,0.10);
  --ns-info: #60a5fa;
  --ns-positive: #34d399;
  --ns-warning: #fbbf24;
  --ns-critical: #f97316;
  --ns-danger: #f87171;

  --card-shadow: 0 0 0 1px var(--ns-border), var(--ns-inset-glow);
  --glass-bg: rgba(255,255,255,0.06);
  --glass-shadow: 0 0 0 1px rgba(255,255,255,0.06), inset 0 1px 0 rgba(255,255,255,0.04);

  --ease: cubic-bezier(0.22,1,0.36,1);
  --transition: 150ms var(--ease);
}

.light {
  --ns-bg: #f0f1f5;
  --ns-surface: rgba(255,255,255,0.85);
  --ns-surface-h: rgba(255,255,255,0.95);
  --ns-border: rgba(0,0,0,0.10);
  --ns-border-h: rgba(0,0,0,0.15);
  --ns-inset-glow: inset 0 1px 0 rgba(255,255,255,0.6);
  --ns-text-100: #1a1d26;
  --ns-text-70: #44495a;
  --ns-text-45: #6b7188;
  --ns-text-25: #9ba0b3;

  --ns-accent: #818cf8;
  --ns-accent-glow: rgba(129,140,248,0.08);
  --ns-info: #60a5fa;
  --ns-positive: #34d399;
  --ns-warning: #d97706;
  --ns-critical: #dc2626;
  --ns-danger: #dc2626;

  --card-shadow: 0 0 0 1px var(--ns-border), 0 1px 3px rgba(0,0,0,0.06);
  --glass-bg: rgba(255,255,255,0.70);
  --glass-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', sans-serif;
  background: var(--ns-bg);
  color: var(--ns-text-100);
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ── Preview banner (for mockup gallery linking) ── */
.preview-banner {
  background: rgba(129,140,248,0.08);
  border-bottom: 1px solid rgba(129,140,248,0.2);
  color: var(--ns-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 6px;
}
.preview-banner a {
  color: var(--ns-text-70);
  margin-left: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* ── TOP NAV ── */
.top-nav {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: rgba(9,9,11,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}
.nav-brand { display: flex; align-items: center; gap: 10px; margin-right: 28px; color: var(--ns-text-100); }
.nav-logo {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #818cf8, #6366f1);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: white;
}
.nav-brand-text { font-size: 18px; font-weight: 700; letter-spacing: 0.18em; }
.nav-items { display: flex; align-items: center; gap: 2px; flex: 1; }
.ni {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}
.ni.active {
  color: var(--ns-text-100);
  background: rgba(255,255,255,0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(255,255,255,0.08);
}
.ni:not(.active) { color: var(--ns-text-45); }
.ni:not(.active):hover { color: var(--ns-text-70); background: rgba(255,255,255,0.03); }
.nav-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nib {
  padding: 7px; border-radius: 8px;
  color: var(--ns-text-45);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  border: none; background: none;
}
.nib:hover { color: var(--ns-text-70); background: rgba(255,255,255,0.03); }
.nco {
  font-size: 12px; font-weight: 500;
  color: var(--ns-text-70);
  background: none; border: none;
  padding: 5px 8px; border-radius: 6px;
}
.ndiv { width: 1px; height: 20px; background: rgba(255,255,255,0.06); margin: 0 6px; }
.ns { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hled {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 6px var(--ns-positive), 0 0 12px rgba(52,211,153,0.4);
}

/* ── LAYOUT: 3-column shell ── */
.page-body {
  flex: 1;
  display: grid;
  grid-template-columns: 340px 1fr 320px;
  gap: 16px;
  padding: 16px 20px;
  overflow: hidden;
  min-height: 0;
}
.left-panel, .main-area, .right-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.main-area { min-width: 0; }

/* Single-column layout for list-view mockups */
.page-body.single-column {
  grid-template-columns: 260px 1fr;
}
.page-body.full-width {
  display: block;
  padding: 16px 20px;
  overflow-y: auto;
}

/* Responsive collapse */
@media (max-width: 1200px) {
  .page-body { grid-template-columns: 1fr; }
  .left-panel, .right-rail { display: none; }
}

/* ── Breadcrumb ── */
.crumb {
  font-size: 11px;
  color: var(--ns-text-45);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.crumb a { color: var(--ns-text-45); }
.crumb a:hover { color: var(--ns-text-70); }

/* ── Cards ── */
.card {
  background: var(--ns-surface);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 16px;
  transition: background var(--transition), box-shadow var(--transition);
}
.card:hover { background: rgba(255,255,255,0.035); box-shadow: 0 0 0 1px var(--ns-border-h), var(--ns-inset-glow); }
.card.no-hover:hover { background: var(--ns-surface); box-shadow: var(--card-shadow); }
.card.pad-lg { padding: 20px 22px; }
.card.pad-sm { padding: 12px 14px; }
.card.accent {
  background: linear-gradient(135deg, rgba(129,140,248,0.08), rgba(96,165,250,0.04));
  box-shadow: 0 0 0 1px rgba(129,140,248,0.25), var(--ns-inset-glow);
}
.card.elevated {
  background: rgba(255,255,255,0.04);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), inset 0 1px 0 rgba(255,255,255,0.05), 0 4px 24px rgba(0,0,0,0.3);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ns-text-45);
}
.card-title.lg { font-size: 11px; color: var(--ns-text-70); }
.card-subtitle { font-size: 10px; color: var(--ns-text-45); margin-top: 2px; }

/* ── Hero identity card (left panel top) ── */
.identity-hero { padding: 20px; text-align: center; background: var(--ns-surface); border-radius: 12px; box-shadow: var(--card-shadow); }
.identity-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #818cf8, #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #09090b;
  margin: 0 auto 10px;
  letter-spacing: 0;
}
.identity-avatar.amber { background: linear-gradient(135deg, #fbbf24, #f97316); }
.identity-avatar.green { background: linear-gradient(135deg, #34d399, #60d394); }
.identity-avatar.pink  { background: linear-gradient(135deg, #f472b6, #ec4899); }
.identity-avatar.teal  { background: linear-gradient(135deg, #22d3ee, #14b8a6); }
.identity-name { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 2px; }
.identity-sub { font-size: 11px; color: var(--ns-text-45); }
.identity-id { font-family: 'Geist Mono', 'SF Mono', monospace; font-size: 10px; color: var(--ns-text-45); margin-top: 6px; }

/* Hero amount block */
.hero-amount {
  text-align: center;
  padding: 14px 0;
  border-top: 1px solid var(--ns-border);
  margin-top: 14px;
}
.hero-amount-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ns-text-45);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.hero-amount-value {
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--ns-text-100);
  font-variant-numeric: tabular-nums;
}
.hero-amount-value.pos { color: var(--ns-positive); }
.hero-amount-value.warn { color: var(--ns-warning); }
.hero-amount-value.crit { color: var(--ns-danger); }
.hero-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  margin-left: 8px;
  vertical-align: middle;
}
.hero-delta.pos { background: rgba(52,211,153,0.12); color: var(--ns-positive); }
.hero-delta.neg { background: rgba(248,113,113,0.12); color: var(--ns-danger); }

/* ── DK rows (detail key/value) ── */
.dk-list { display: flex; flex-direction: column; }
.dk {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 11px;
}
.dk .k { color: var(--ns-text-45); }
.dk .v { color: var(--ns-text-70); font-family: 'Geist Mono', 'SF Mono', monospace; font-variant-numeric: tabular-nums; }
.dk .v.txt { font-family: inherit; }
.dk .v a { color: var(--ns-accent); }

/* ── Pills & badges ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: 0.02em;
  background: var(--ns-surface);
  color: var(--ns-text-70);
}
.pill.pos   { background: rgba(52,211,153,0.12); color: var(--ns-positive); }
.pill.warn  { background: rgba(251,191,36,0.12); color: var(--ns-warning); }
.pill.crit  { background: rgba(248,113,113,0.12); color: var(--ns-danger); }
.pill.info  { background: rgba(96,165,250,0.12); color: var(--ns-info); }
.pill.accent{ background: rgba(129,140,248,0.12); color: var(--ns-accent); }
.pill.ghost { background: rgba(255,255,255,0.06); color: var(--ns-text-70); }
.pill.dot::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Stage pipeline (multi-step progress) ── */
.stage-pipeline {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
}
.stage {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ns-text-45);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--ns-border);
}
.stage.done { background: rgba(52,211,153,0.08); color: var(--ns-positive); border-color: rgba(52,211,153,0.25); }
.stage.current { background: rgba(52,211,153,0.18); color: var(--ns-positive); border-color: var(--ns-positive); box-shadow: 0 0 0 1px rgba(52,211,153,0.25); }
.stage.upcoming { color: var(--ns-text-45); }

/* Sub-stage dot trail */
.dot-trail { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.08); }
.dot.done { background: var(--ns-positive); }
.dot.current { background: var(--ns-positive); box-shadow: 0 0 0 3px rgba(52,211,153,0.18); }
.dot-line {
  flex: 1; height: 1px;
  background: rgba(255,255,255,0.08);
}
.dot-line.done { background: var(--ns-positive); }

/* ── Stage velocity bars ── */
.velocity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 11px;
}
.velocity-label { width: 110px; color: var(--ns-text-70); }
.velocity-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}
.velocity-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--ns-positive), #60d394);
}
.velocity-bar-fill.warn { background: linear-gradient(90deg, var(--ns-warning), #fcd34d); }
.velocity-bar-fill.crit { background: linear-gradient(90deg, var(--ns-danger), #fca5a5); }
.velocity-value {
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-size: 11px;
  color: var(--ns-text-70);
  font-variant-numeric: tabular-nums;
  width: 80px;
  text-align: right;
}

/* ── KPI tiles ── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.kpi-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.kpi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.kpi {
  background: var(--ns-surface);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}
.kpi .kpi-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ns-text-45);
  margin-bottom: 6px;
}
.kpi .kpi-value {
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ns-text-100);
}
.kpi .kpi-sub { font-size: 10px; color: var(--ns-text-45); margin-top: 4px; }
.kpi .kpi-delta { font-size: 11px; font-weight: 600; margin-left: 4px; }
.kpi .kpi-delta.pos { color: var(--ns-positive); }
.kpi .kpi-delta.neg { color: var(--ns-danger); }
.kpi.accent   { border-left: 3px solid var(--ns-accent); }
.kpi.positive { border-left: 3px solid var(--ns-positive); }
.kpi.warning  { border-left: 3px solid var(--ns-warning); }
.kpi.critical { border-left: 3px solid var(--ns-danger); }

/* ── Tables ──
   More breathing room + horizontal scroll when needed. Wrap the table in
   <div class="tbl-wrap"> to get a clean overflow container with its own
   scrollbar styling.
*/
.tbl-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
  border-radius: 10px;
  margin: 0 -2px;
}
.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  min-width: 640px;
}
.tbl th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ns-text-45);
  padding: 12px 16px;
  border-bottom: 1px solid var(--ns-border);
  white-space: nowrap;
  background: rgba(255,255,255,0.02);
}
.tbl th:first-child { padding-left: 18px; }
.tbl th:last-child  { padding-right: 18px; }
.tbl td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ns-border);
  color: var(--ns-text-70);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
  line-height: 1.5;
}
.tbl td:first-child { padding-left: 18px; }
.tbl td:last-child  { padding-right: 18px; }
.tbl tr:hover td { background: var(--ns-surface-h); }
.tbl tr:last-child td { border-bottom: none; }
.tbl .mono   { font-family: 'Geist Mono', 'SF Mono', monospace; }
.tbl .num    { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .nowrap { white-space: nowrap; }
.tbl .muted  { color: var(--ns-text-45); font-size: 11px; }

/* Compact variant — for small widgets where breathing room isn't possible */
.tbl.compact td { padding: 10px 12px; font-size: 12px; }
.tbl.compact th { padding: 9px 12px; font-size: 9px; }

/* Row status-coloring — flag on first cell only so it reads as a row marker */
.tbl tr.row-pos  td:first-child { box-shadow: inset 3px 0 0 var(--ns-positive); }
.tbl tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--ns-warning); }
.tbl tr.row-crit td:first-child { box-shadow: inset 3px 0 0 var(--ns-danger); }
.tbl tr.row-info td:first-child { box-shadow: inset 3px 0 0 var(--ns-info); }

/* ── Timeline ── */
.timeline { display: flex; flex-direction: column; gap: 4px; }
.timeline-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--ns-surface);
  transition: background var(--transition);
  border-left: 3px solid var(--ns-text-25);
}
.timeline-entry:hover { background: var(--ns-surface-h); }
.timeline-entry.pos  { border-left-color: var(--ns-positive); }
.timeline-entry.warn { border-left-color: var(--ns-warning); }
.timeline-entry.crit { border-left-color: var(--ns-danger); }
.timeline-entry.info { border-left-color: var(--ns-info); }
.timeline-entry.accent { border-left-color: var(--ns-accent); }
.timeline-icon {
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1.3;
}
.timeline-body { flex: 1; min-width: 0; }
.timeline-title { font-size: 12px; font-weight: 600; color: var(--ns-text-100); margin-bottom: 2px; }
.timeline-desc { font-size: 11px; color: var(--ns-text-70); line-height: 1.5; }
.timeline-meta { font-size: 10px; color: var(--ns-text-45); margin-top: 3px; font-family: 'Geist Mono', 'SF Mono', monospace; font-variant-numeric: tabular-nums; }

/* ── AI Insights panel (indigo-tinted) ── */
.ai-insights {
  background: linear-gradient(180deg, rgba(129,140,248,0.05), rgba(129,140,248,0.02));
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(129,140,248,0.25), var(--ns-inset-glow);
  padding: 16px;
}
.ai-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ns-accent);
  margin-bottom: 12px;
}
.ai-insight {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(9,9,11,0.3);
  border: 1px solid rgba(129,140,248,0.15);
  margin-bottom: 8px;
}
.ai-insight:last-child { margin-bottom: 0; }
.ai-insight-title { font-size: 12px; font-weight: 600; color: var(--ns-text-100); margin-bottom: 3px; }
.ai-insight-body { font-size: 11px; color: var(--ns-text-70); line-height: 1.5; }
.ai-insight-actions { display: flex; gap: 6px; margin-top: 8px; }

/* ── Callouts (warning/info boxes) ── */
.callout {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.5;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.callout.warn {
  background: rgba(251,191,36,0.06);
  border-left: 2px solid var(--ns-warning);
  color: var(--ns-text-90);
}
.callout.info {
  background: rgba(96,165,250,0.06);
  border-left: 2px solid var(--ns-info);
  color: var(--ns-text-90);
}
.callout.crit {
  background: rgba(248,113,113,0.06);
  border-left: 2px solid var(--ns-danger);
  color: var(--ns-text-90);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ns-border);
  background: var(--ns-surface);
  color: var(--ns-text-90);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all var(--transition);
}
.btn:hover { background: var(--ns-surface-h); color: var(--ns-text-100); border-color: var(--ns-border-h); }
.btn.primary {
  background: var(--ns-accent);
  color: #09090b;
  border-color: transparent;
}
.btn.primary:hover { filter: brightness(1.08); background: var(--ns-accent); color: #09090b; }
.btn.pos {
  background: var(--ns-positive);
  color: #09090b;
  border-color: transparent;
}
.btn.ghost { background: transparent; }
.btn.danger { color: var(--ns-danger); border-color: rgba(248,113,113,0.3); }
.btn.sm { padding: 4px 10px; font-size: 10px; }
.btn.full { width: 100%; justify-content: center; }

/* Action grid (Customer-360 style) */
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.action-tile {
  padding: 10px 8px;
  border-radius: 8px;
  background: var(--ns-surface);
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--ns-text-70);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--ns-border);
}
.action-tile:hover { background: var(--ns-surface-h); color: var(--ns-text-100); }
.action-tile .at-ico { font-size: 16px; display: block; margin-bottom: 4px; }

/* ── Progress bar ── */
.progress {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--ns-accent), var(--ns-info));
}
.progress.pos > span { background: linear-gradient(90deg, var(--ns-positive), #60d394); }
.progress.warn > span { background: linear-gradient(90deg, var(--ns-warning), #fcd34d); }
.progress.crit > span { background: linear-gradient(90deg, var(--ns-danger), #fca5a5); }

/* Progress card (like "installation with warranty progress") */
.progress-card {
  padding: 12px;
  border-radius: 10px;
  background: var(--ns-surface);
  box-shadow: var(--card-shadow);
}
.progress-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.progress-card-title { font-size: 12px; font-weight: 600; color: var(--ns-text-100); }
.progress-card-meta { font-size: 10px; color: var(--ns-text-45); margin-top: 6px; }

/* ── Sidebar (list-view pages) ── */
.sidebar-filters {
  padding: 14px;
  background: var(--ns-surface);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  font-size: 12px;
}
.sidebar-section { margin-bottom: 18px; }
.sidebar-section:last-child { margin-bottom: 0; }
.sidebar-section-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ns-text-45);
  margin-bottom: 8px;
}
.filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--ns-text-70);
  cursor: pointer;
}
.filter-item:hover { background: var(--ns-surface-h); color: var(--ns-text-100); }
.filter-item.active { background: rgba(129,140,248,0.12); color: var(--ns-text-100); }
.filter-count {
  font-size: 10px;
  color: var(--ns-text-45);
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* ── Module tab bar — full-width pill strip below the global top-nav.
   Matches the CRM Level-2 sub-tab pattern for consistency. Sticky under
   top-nav. Goes at the top of the Team area on every mockup. ── */
.module-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 20px;
  border-bottom: 1px solid var(--ns-border);
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 56px;
  z-index: 40;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.module-tabs::-webkit-scrollbar { display: none; }
.module-tabs-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5px;
  padding: 4px;
  background: rgba(255,255,255,0.035);
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--ns-border), var(--ns-inset-glow);
}
.mtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ns-text-45);
  transition: all 200ms var(--ease);
  white-space: nowrap;
}
.mtab:hover { color: var(--ns-text-70); background: rgba(255,255,255,0.02); }
.mtab.active {
  color: var(--ns-text-100);
  background: var(--ns-surface-h);
  font-weight: 500;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12), inset 0 0 0 1px var(--ns-border-h);
}
.mtab.active svg { color: var(--ns-accent); }
.mtab svg { width: 13px; height: 13px; stroke-width: 1.8; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.mtab-badge {
  font-size: 9px;
  font-weight: 700;
  font-family: 'Geist Mono', 'SF Mono', monospace;
  padding: 2px 6px;
  border-radius: 100px;
  background: rgba(255,255,255,0.08);
  color: var(--ns-text-70);
}
.mtab.active .mtab-badge { background: rgba(129,140,248,0.2); color: var(--ns-accent); }
.module-tabs-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ns-text-45);
}

/* ── Tab pills (intra-page, smaller) ── */
.tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--ns-surface);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  width: fit-content;
}
.tab {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ns-text-45);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.tab.active { background: var(--ns-surface-h); color: var(--ns-text-100); box-shadow: 0 0 0 1px var(--ns-border-h); }
.tab:not(.active):hover { color: var(--ns-text-70); }
.tab-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 100px;
  background: rgba(255,255,255,0.08);
  color: var(--ns-text-70);
}
.tab.active .tab-badge { background: rgba(129,140,248,0.2); color: var(--ns-accent); }

/* ── Avatar chip ── */
.chip { display: inline-flex; align-items: center; gap: 8px; }
.chip-circ {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #09090b;
  background: linear-gradient(135deg, #818cf8, #60a5fa);
  flex-shrink: 0;
}
.chip-circ.sm { width: 22px; height: 22px; font-size: 10px; }
.chip-circ.lg { width: 40px; height: 40px; font-size: 14px; }
.chip-circ.amber { background: linear-gradient(135deg, #fbbf24, #f97316); }
.chip-circ.green { background: linear-gradient(135deg, #34d399, #60d394); }
.chip-circ.pink  { background: linear-gradient(135deg, #f472b6, #ec4899); }
.chip-circ.teal  { background: linear-gradient(135deg, #22d3ee, #14b8a6); }
.chip-circ.red   { background: linear-gradient(135deg, #f87171, #fb7185); }
.chip-circ.violet { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
.chip-name { font-size: 12px; font-weight: 600; color: var(--ns-text-100); }
.chip-role { font-size: 11px; color: var(--ns-text-45); }

/* ── Utility rows ── */
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.wrap { flex-wrap: wrap; }
.stack-xs > * + * { margin-top: 4px; }
.stack-sm > * + * { margin-top: 8px; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 18px; }

/* ── Nested context card (3-column sub-grid like warranty claim) ── */
.context-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 14px;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  border: 1px solid var(--ns-border);
}
.context-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.context-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ns-text-45);
  margin-bottom: 4px;
}
.context-value { font-size: 13px; font-weight: 600; color: var(--ns-text-100); }

/* ── Mini sparkline bar chart ── */
.spark {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 22px;
}
.spark-bar {
  width: 4px;
  border-radius: 1px;
  background: rgba(96,165,250,0.6);
}
.spark-bar.crit { background: rgba(248,113,113,0.7); }
.spark-bar.warn { background: rgba(251,191,36,0.7); }

/* ── Toggle switch ── */
.toggle {
  position: relative;
  width: 32px;
  height: 18px;
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--transition);
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ns-text-100);
  transition: transform var(--transition);
}
.toggle.on { background: var(--ns-accent); }
.toggle.on::after { transform: translateX(14px); }

/* ── GWC pip (from EOS) ── */
.gwc { display: inline-flex; gap: 4px; }
.gwc-pip {
  width: 20px; height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  background: rgba(255,255,255,0.04);
  color: var(--ns-text-45);
}
.gwc-pip.yes { background: rgba(52,211,153,0.18); color: var(--ns-positive); }
.gwc-pip.no { background: rgba(248,113,113,0.18); color: var(--ns-danger); }
.gwc-pip.q { background: rgba(251,191,36,0.18); color: var(--ns-warning); }

/* ── Search input ── */
.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--ns-surface);
  border: 1px solid var(--ns-border);
  border-radius: 8px;
  color: var(--ns-text-100);
  font-size: 12px;
  font-family: inherit;
}
.search-input:focus { outline: none; border-color: var(--ns-border-h); background: var(--ns-surface-h); }
.search-wrap { position: relative; }
.search-wrap::before {
  content: '🔍';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.5;
}

/* ── Version badge (for review/comp-plan history) ── */
.version-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  background: rgba(167,139,250,0.15);
  color: #a78bfa;
  font-family: 'Geist Mono', 'SF Mono', monospace;
}

/* ── Divider ── */
.divider { height: 1px; background: var(--ns-border); margin: 12px 0; }

/* ── Text utility classes ── */
.t-mono { font-family: 'Geist Mono', 'SF Mono', monospace; font-variant-numeric: tabular-nums; }
.t-sm { font-size: 11px; }
.t-xs { font-size: 10px; }
.t-muted { color: var(--ns-text-45); }
.t-secondary { color: var(--ns-text-70); }
.t-pos { color: var(--ns-positive); }
.t-warn { color: var(--ns-warning); }
.t-crit { color: var(--ns-danger); }
.t-accent { color: var(--ns-accent); }
.t-bold { font-weight: 700; }
.t-center { text-align: center; }
.t-right { text-align: right; }
.t-upper { text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Icon sizing ── */
.icon { width: 14px; height: 14px; stroke-width: 1.6; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.icon-lg { width: 18px; height: 18px; }
.icon-sm { width: 11px; height: 11px; }

/* ── Light mode overrides ── */
.light .top-nav { background: rgba(240,241,245,0.92); border-bottom-color: rgba(0,0,0,0.06); }
.light .ni.active { background: rgba(0,0,0,0.06); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 0 1px rgba(0,0,0,0.08); }
.light .ni:not(.active):hover { background: rgba(0,0,0,0.03); }
.light .nib:hover { background: rgba(0,0,0,0.03); }
.light .ndiv { background: rgba(0,0,0,0.10); }
.light .card:hover { background: rgba(0,0,0,0.02); }
.light .card.elevated { background: rgba(0,0,0,0.02); }
.light .card.accent { background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(59,130,246,0.03)); box-shadow: 0 0 0 1px rgba(99,102,241,0.20), var(--ns-inset-glow); }
.light .left-panel, .light .main-area, .light .right-rail { scrollbar-color: rgba(0,0,0,0.1) transparent; }
