/* ═══════════════════════════════════════════════════
   BUSINESS NUMBERS — Design System
   Tokens, Base, Components, Views
════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────── */
:root {
  --primary:       #1a73e8;
  --primary-tonal: #e8f0fe;
  --primary-dark:  #1558b0;
  --error:         #c5221f;
  --error-tonal:   #fce8e6;
  --error-on:      #8c1b19;
  --warn:          #e37400;
  --warn-tonal:    #fef7e0;
  --warn-on:       #7a4100;
  --success:       #1e8e3e;
  --success-tonal: #e6f4ea;
  --success-on:    #0d5227;
  --surface:       #ffffff;
  --bg:            #f8f9fa;
  --on-s:          #202124;
  --on-s2:         #3c4043;
  --muted:         #5f6368;
  --outline:       #dadce0;
  --outline-faint: #e8eaed;

  --sh1: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
  --sh2: 0 1px 2px rgba(60,64,67,.3), 0 2px 6px 2px rgba(60,64,67,.15);
  --sh3: 0 4px 8px 3px rgba(60,64,67,.15), 0 1px 3px rgba(60,64,67,.3);
  --r:   12px;
  --rl:  16px;
  --rxl: 28px;

  --sidebar-w: 240px;
  --topbar-h:  64px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
}

/* ── BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--on-s);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
  display: flex;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 700; }

/* ── LAYOUT ─────────────────────────────────────── */
.dashboard {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* Sidebar */
.nav-drawer {
  width: var(--sidebar-w);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--outline-faint);
}
.nav-header {
  padding: 16px;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--outline-faint);
}
.nav-logo {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}
.nav-brand { font-size: 13px; font-weight: 700; color: var(--on-s); line-height: 1.2; }
.nav-brand-sub { font-size: 11px; color: var(--muted); }
.nav-items { padding: 8px 10px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  height: 44px;
  border-radius: var(--rxl);
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s;
  text-decoration: none;
}
.nav-item:hover { background: var(--bg); color: var(--on-s); text-decoration: none; }
.nav-item.active { background: var(--primary-tonal); color: var(--primary); font-weight: 600; }
.nav-icon { font-size: 17px; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto;
  background: var(--error);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-badge--warn { background: var(--warn); }
.nav-badge--alert { background: var(--error); }
.nav-footer { padding: 10px 10px 14px; border-top: 1px solid var(--outline-faint); }
.period-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 32px;
  border: 1px solid var(--outline);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--on-s2);
  cursor: pointer;
  transition: background .15s;
}
.period-chip:hover { background: var(--bg); }
.period-arrow { margin-left: auto; color: var(--muted); font-size: 11px; }

/* Main */
.main {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.top-bar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--outline-faint);
  display: flex;
  align-items: center;
  padding: 0 16px 0 24px;
  gap: 12px;
  flex-shrink: 0;
}
.tb-title { font-size: 17px; font-weight: 700; color: var(--on-s); flex: 1; }
.tb-chips { display: flex; gap: 8px; }
.tb-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}
.tb-chip--error { background: var(--error-tonal); color: var(--error-on); border: 1px solid #f5c6c5; }
.tb-chip--warn  { background: var(--warn-tonal);  color: var(--warn-on);   border: 1px solid #fde68a; }
.tb-chip--ok    { background: var(--success-tonal);color: var(--success-on);border: 1px solid #a8d5b5; }
.tb-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #fbbc04;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--on-s2);
  cursor: pointer;
  flex-shrink: 0;
}
.scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.view { display: none; }
.view.active { display: block; }

/* ── BUTTONS ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 22px;
  height: 38px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  font-family: inherit;
  text-decoration: none;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); box-shadow: var(--sh1); }
.btn--outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn--outline:hover { background: var(--primary-tonal); }
.btn--success { background: var(--success); color: #fff; }
.btn--success:hover { background: #166c34; }
.btn--text { background: none; color: var(--muted); font-weight: 500; border: none; padding: 0; height: auto; }
.btn--text:hover { color: var(--primary); text-decoration: underline; }


/* ── CARDS ───────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--sh1);
  overflow: hidden;
}
.card--shadow2 { box-shadow: var(--sh2); }
.card--round-lg { border-radius: var(--rl); }
.card--round-xl { border-radius: var(--rxl); }
.card-hdr {
  padding: 14px 18px;
  border-bottom: 1px solid var(--outline-faint);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-hdr h2, .card-hdr h3 { font-size: 14px; font-weight: 700; }
.card-body { padding: 16px 18px; }

/* ── TEXT UTILITIES ─────────────────────────────── */
.text-link { font-size: 13px; color: var(--primary); font-weight: 500; cursor: pointer; }
.text-link:hover { text-decoration: underline; }
.text-muted { color: var(--muted); }
.text-error { color: var(--error); }
.text-warn { color: var(--warn); }
.text-success { color: var(--success); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-uppercase { text-transform: uppercase; letter-spacing: .5px; }
.font-bold { font-weight: 700; }
.font-mono { font-variant-numeric: tabular-nums; }

/* ── CHIPS / BADGES ─────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--outline);
}
.chip--meesho { background: #fce4ec; color: #880e4f; border-color: #f48fb1; }
.chip--amazon { background: #fff8e1; color: #7b4f00; border-color: #ffe082; }
.chip--flipkart { background: #e3f2fd; color: #0d47a1; border-color: #90caf9; }

.signal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.signal::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.signal--POSITIVE { background: var(--success-tonal); color: var(--success-on); }
.signal--AT_RISK  { background: var(--warn-tonal);   color: var(--warn-on); }
.signal--NEGATIVE { background: var(--error-tonal);  color: var(--error-on); }

.auto-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--success);
  background: rgba(52,168,83,.12);
  padding: 2px 7px;
  border-radius: 10px;
  vertical-align: middle;
}
.manual-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #8c5e00;
  background: #fef3c7;
  padding: 2px 7px;
  border-radius: 10px;
  vertical-align: middle;
}

/* ── INPUTS ──────────────────────────────────────── */
.input {
  border: 1px solid var(--outline);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--on-s);
  background: var(--surface);
  outline: none;
  transition: border .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(26,115,232,.2); }
.input--sm { width: 72px; text-align: right; }
.input--num { -moz-appearance: textfield; }
.input--num::-webkit-outer-spin-button,
.input--num::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── TABLES ──────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--outline-faint);
  background: var(--bg);
}
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--primary); }
th.sortable.sorted { color: var(--primary); font-weight: 700; }
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--outline-faint);
  font-size: 13px;
}
tr:last-child td { border-bottom: none; }
tr.clickable td { cursor: pointer; }
tr.clickable:hover td { background: var(--primary-tonal); }

/* ── TABS ────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--outline-faint);
  background: var(--surface);
  border-radius: var(--r) var(--r) 0 0;
  overflow: hidden;
  box-shadow: var(--sh1);
}
.tab {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
}
.tab:hover { color: var(--on-s); background: var(--bg); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab--ok.active { color: var(--success); border-bottom-color: var(--success); }
.tab-badge {
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
  background: var(--error-tonal); color: var(--error-on);
  margin-left: 6px;
}
.tab-badge--warn { background: var(--warn-tonal); color: var(--warn-on); }
.tab-badge--ok   { background: var(--success-tonal); color: var(--success-on); }

/* ── INFO CARD ───────────────────────────────────── */
.info-card {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 14px;
}
.info-card--tip { background: var(--primary-tonal); color: var(--primary-dark); }
.info-card--warn { background: var(--warn-tonal); border: 1px solid #fde68a; color: var(--warn-on); }
.info-card--error { background: var(--error-tonal); border: 1px solid #f5c6c5; color: var(--error-on); }
.info-card-icon { flex-shrink: 0; font-size: 14px; line-height: 1.3; }

/* ── INSIGHT BANNER ──────────────────────────────── */
.insight-banner {
  background: var(--warn-tonal);
  border: 1px solid #fde68a;
  border-radius: var(--r);
  padding: 12px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--warn-on);
  line-height: 1.5;
}

/* ── SECTION HEADERS ────────────────────────────── */
.section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-hdr h3 { font-size: 14px; font-weight: 700; color: var(--on-s); }


/* ════════════════════════════════════════════════════
   WIZARD
═════════════════════════════════════════════════════ */
.wizard-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.wizard-shell {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--sh3);
  width: 100%;
  max-width: 760px;
  overflow: hidden;
}
.wizard-top {
  background: linear-gradient(135deg, #1a1f5c 0%, #1a73e8 100%);
  padding: 28px 36px 24px;
}
.wiz-brand { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.6); letter-spacing: .5px; text-transform: uppercase; margin-bottom: 6px; }
.wizard-top h1 { font-size: 22px; font-weight: 700; color: #fff; line-height: 1.3; }
.wizard-top p { font-size: 13px; color: rgba(255,255,255,.75); margin-top: 4px; }

.wiz-steps {
  display: flex;
  align-items: center;
  padding: 0 36px;
  background: #f8fbff;
  border-bottom: 1px solid var(--outline-faint);
}
.wiz-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  flex: 1;
}
.wiz-step:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--outline);
  margin: 0 8px;
}
.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
.step-label { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.wiz-step.done .step-num { background: var(--success); color: #fff; }
.wiz-step.done .step-label { color: var(--success); }
.wiz-step.active .step-num { background: var(--primary); color: #fff; }
.wiz-step.active .step-label { color: var(--primary); font-weight: 600; }
.wiz-step .step-num { background: var(--outline-faint); color: var(--muted); }

.wiz-body { padding: 28px 36px 24px; min-height: 340px; }
.wiz-step-content { display: none; }
.wiz-step-content.active { display: block; }
.wiz-desc { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.wiz-action { font-size: 12px; color: var(--primary); margin-bottom: 8px; }

/* Channel picker */
.channel-pick { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 18px; }
.channel-tile {
  border: 2px solid var(--outline);
  border-radius: var(--r);
  padding: 16px;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
  user-select: none;
}
.channel-tile:hover { border-color: var(--primary); background: var(--primary-tonal); }
.channel-tile.selected { border-color: var(--primary); background: var(--primary-tonal); }
.ct-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
  color: #fff;
  margin: 0 auto 8px;
}
.ct-name { font-size: 13px; font-weight: 600; color: var(--on-s); }
.ct-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ct-logo.meesho { background: #e91e8c; }
.ct-logo.amazon { background: #ff9900; color: #000; }
.ct-logo.flipkart { background: #2874f0; }
.check-mark {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  display: none;
  align-items: center; justify-content: center;
  margin: 6px auto 0;
}
.channel-tile.selected .check-mark { display: flex; }

/* SKU input table */
.wiz-table-wrap { overflow-x: auto; max-height: 240px; overflow-y: auto; }
.sku-input-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 13px; }
.sku-input-table th {
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-align: left; padding: 8px 10px;
  border-bottom: 2px solid var(--outline);
  background: var(--bg);
}
.sku-input-table td { padding: 6px 10px; border-bottom: 1px solid var(--outline-faint); vertical-align: middle; }
.sku-input-table tr:hover td { background: #f8fbff; }
.sku-name { font-weight: 500; color: var(--on-s); }
.sku-id { font-size: 11px; color: var(--muted); }
.computed { font-size: 12px; color: var(--muted); font-style: italic; }
.add-sku-row {
  text-align: center; padding: 10px;
  color: var(--primary); font-size: 13px; font-weight: 500;
  cursor: pointer; border-top: 1px dashed var(--outline);
}
.add-sku-row:hover { background: var(--primary-tonal); }

/* Return rate sliders */
.wiz-rates { margin-bottom: 20px; }
.cr-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--outline-faint);
}
.cr-row:last-child { border-bottom: none; }
.cr-logo {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.cr-logo.meesho { background: #e91e8c; }
.cr-logo.amazon { background: #ff9900; color: #000; }
.cr-logo.flipkart { background: #2874f0; }
.cr-name { width: 80px; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.cr-slider-wrap { flex: 1; }
.cr-slider {
  width: 100%;
  -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 2px;
  background: var(--outline); outline: none; cursor: pointer;
}
.cr-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: var(--sh1);
}
.cr-val { width: 48px; text-align: right; font-size: 14px; font-weight: 700; color: var(--error); flex-shrink: 0; }

/* Ad spend section in wizard */
.wiz-ad { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--outline-faint); }
.wiz-ad h4 { font-size: 13px; font-weight: 700; color: var(--on-s); margin-bottom: 4px; }
.optional { font-weight: 400; color: var(--muted); }
.wiz-ad-sub { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.ad-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--outline-faint); }
.ad-row:last-child { border-bottom: none; }
.ad-name { flex: 1; font-size: 13px; font-weight: 500; }
.ad-input { width: 120px; }
.wiz-ad-note { color: var(--muted); font-size: 12px; text-align: center; padding-top: 8px; }

/* P&L preview in wizard */
.pl-hero {
  background: linear-gradient(135deg, #1a1f5c, #1a73e8);
  border-radius: var(--r);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}
.ph-label { font-size: 12px; color: rgba(255,255,255,.7); font-weight: 500; margin-bottom: 6px; }
.ph-val { font-size: 40px; font-weight: 800; color: #fff; letter-spacing: -2px; }
.ph-sub { font-size: 13px; color: rgba(255,255,255,.7); margin-top: 4px; }
.verdict {
  display: inline-flex;
  align-items: center; gap: 6px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  margin-top: 8px;
}
.verdict--warn { background: rgba(227,116,0,.2); color: #fde68a; }
.verdict--ok   { background: rgba(30,142,62,.2); color: #a8f0c0; }

.pl-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.pl-card {
  background: var(--bg);
  border-radius: var(--r);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--outline-faint);
}
.pl-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.pl-val { font-size: 24px; font-weight: 700; letter-spacing: -1px; }
.pl-val.pos { color: var(--success); }
.pl-val.warn { color: var(--warn); }
.pl-val.neg { color: var(--error); }
.pl-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Wizard footer */
.wiz-footer {
  padding: 16px 36px;
  border-top: 1px solid var(--outline-faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
}
.wiz-actions { display: flex; gap: 10px; }


/* ════════════════════════════════════════════════════
   OVERVIEW — Income Statement
═════════════════════════════════════════════════════ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.coverage-banner {
  background: var(--warn-tonal, #fff4d6);
  border: 1px solid var(--warn, #e6b800);
  color: var(--warn-on, #7a5b00);
  border-radius: var(--r);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.5;
}
.kpi-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 18px 20px;
  box-shadow: var(--sh1);
  border-top: 3px solid var(--outline);
}
.kpi-card--primary { border-top-color: var(--primary); }
.kpi-card--err     { border-top-color: var(--error); }
.kpi-card--warn    { border-top-color: var(--warn); }
.kpi-card--ok      { border-top-color: var(--success); }
.kpi-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.kpi-val { font-size: 22px; font-weight: 800; color: var(--on-s); letter-spacing: -.5px; }
.kpi-sub { font-size: 12px; margin-top: 4px; }
.kpi-sub--up { color: var(--success); font-weight: 600; }
.kpi-sub--down { color: var(--error); font-weight: 600; }

/* Waterfall chart card */
.chart-card {
  background: var(--surface);
  border-radius: var(--rl);
  box-shadow: var(--sh2);
  overflow: hidden;
  margin-bottom: 20px;
}
.chart-card-hdr {
  padding: 13px 24px;
  border-bottom: 1px solid var(--outline-faint);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.chart-card-hdr h3 { font-size: 13px; font-weight: 700; color: var(--on-s); }
.chart-card-hdr span { font-size: 12px; color: var(--muted); }
.chart-wrap { padding: 16px 28px 20px; height: 210px; }

/* Income Statement */
.is-card {
  background: var(--surface);
  border-radius: var(--rl);
  box-shadow: var(--sh2);
  overflow: hidden;
  margin-bottom: 20px;
}
.is-card-hdr {
  padding: 18px 28px;
  border-bottom: 1px solid var(--outline-faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.is-card-hdr h2 { font-size: 15px; font-weight: 700; color: var(--on-s); }

.is-section-hdr {
  padding: 7px 28px;
  font-size: 10px; font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  background: #f1f3f4;
  border-bottom: 1px solid var(--outline-faint);
}
.is-subsection-hdr {
  padding: 6px 28px 6px 36px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  background: var(--surface);
  border-bottom: 1px solid var(--outline-faint);
  display: flex;
  align-items: center;
  gap: 7px;
}
.is-subsection-hdr::before {
  content: '';
  width: 3px; height: 11px;
  border-radius: 2px;
  flex-shrink: 0;
}
.is-subsection-hdr--platform { color: var(--primary); }
.is-subsection-hdr--platform::before { background: var(--primary); }
.is-subsection-hdr--self { color: var(--on-s2); }
.is-subsection-hdr--self::before { background: var(--muted); }

.is-row {
  display: grid;
  grid-template-columns: 1fr 110px 110px 60px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--outline-faint);
  align-items: center;
  transition: background .1s;
}
.is-row:hover { background: #fafbff; }
.is-row--highlighted { border-left: 3px solid var(--warn); padding-left: 25px; background: #fffdf0; }
.is-row--highlighted:hover { background: #fff8e1; }
.is-row--total {
  background: var(--bg);
  border-top: 1px solid var(--outline);
  border-bottom: 2px solid var(--outline);
  font-weight: 700;
}
.is-row--total:hover { background: #eef2fb; }

.ir-label {
  font-size: 13px;
  color: var(--on-s2);
  padding-left: 20px;
}
.ir-label--no-indent { padding-left: 0; font-weight: 700; color: var(--on-s); font-size: 14px; }
.ir-amount {
  text-align: right;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.2px;
}
.ir-amount--cost { color: var(--on-s2); }
.ir-amount--prev { color: var(--muted); font-weight: 400; }
.ir-amount--pos { color: var(--success); font-size: 15px; font-weight: 800; }
.ir-amount--warn { color: var(--warn); font-size: 15px; font-weight: 800; }
.ir-pct {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ir-pct--bold { font-weight: 700; color: var(--on-s2); }
.ir-change {
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.ir-change--up { color: var(--success); font-weight: 600; }
.ir-change--down { color: var(--error); font-weight: 600; }
.ir-change--flat { color: var(--muted); font-weight: 400; }

/* Expandable rows */
.is-row--expandable { cursor: pointer; }
.is-row--expandable:hover { background: #f0f4ff; }
.is-row--expandable.open { background: #f0f4ff; }
.is-sub-row.is-row--expandable:hover { background: #f0f4ff; }
.is-sub-row.is-row--expandable.open { background: #f0f4ff; }
.ir-chevron {
  font-size: 13px;
  color: var(--muted);
  display: inline-block;
  transition: transform .2s;
}
.ir-chevron.open { transform: rotate(90deg); }
.is-sub-rows { display: none; background: #fafbff; }
.is-sub-rows.open { display: block; }

.is-sub-row {
  display: grid;
  grid-template-columns: 1fr 110px 110px 60px;
  padding: 8px 28px;
  border-bottom: 1px solid var(--outline-faint);
  align-items: center;
}
.is-sub-row:last-child { border-bottom: 1px solid var(--outline-faint); }
.is-sub-row--nested { padding-left: 48px; }
.sr-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 32px;
  font-size: 12px;
  color: var(--muted);
}
.sr-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sr-dot--meesho { background: #e91e8c; }
.sr-dot--amazon { background: #ff9900; }
.sr-dot--flipkart { background: #2874f0; }
.sr-dot--neutral { background: var(--muted); }
.sr-amount { text-align: right; font-size: 12px; font-weight: 500; color: var(--on-s2); font-variant-numeric: tabular-nums; }
.sr-pct { text-align: right; font-size: 11px; color: var(--muted); }

/* ── What Changed strip ─────────────────────────── */
.wc-card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--sh1);
  overflow: hidden;
  margin-bottom: 20px;
}
.wc-hdr {
  padding: 14px 18px;
  border-bottom: 1px solid var(--outline-faint);
  font-size: 14px;
  font-weight: 700;
}
.wc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--outline-faint);
}
.wc-item:last-child { border-bottom: none; }
.wc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wc-dot--bad  { background: var(--error); }
.wc-dot--warn { background: var(--warn); }
.wc-dot--good { background: var(--success); }
.wc-text { flex: 1; font-size: 13px; }
.wc-delta { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.wc-delta--bad  { background: var(--error-tonal); color: var(--error-on); }
.wc-delta--warn { background: var(--warn-tonal); color: var(--warn-on); }
.wc-delta--good { background: var(--success-tonal); color: var(--success-on); }


/* ════════════════════════════════════════════════════
   MARKETPLACES
═════════════════════════════════════════════════════ */
.mp-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.mp-pcard {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--sh1);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .15s, transform .1s;
}
.mp-pcard:hover { box-shadow: var(--sh2); transform: translateY(-1px); }
.mp-pcard.active { box-shadow: var(--sh2); outline: 2px solid var(--primary); }

.mp-pcard-top {
  padding: 14px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid transparent;
}
.mp-pcard-top--meesho  { border-bottom-color: #e91e8c; }
.mp-pcard-top--amazon  { border-bottom-color: #ff9900; }
.mp-pcard-top--flipkart { border-bottom-color: #2874f0; }

.mp-pcard-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.mp-status {
  font-size: 10px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.mp-status--LOSING  { background: var(--error-tonal); color: var(--error-on); }
.mp-status--AT_RISK { background: var(--warn-tonal); color: var(--warn-on); }
.mp-status--HEALTHY { background: var(--success-tonal); color: var(--success-on); }

.mp-pcard-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.mp-pcard-row { display: flex; justify-content: space-between; font-size: 12px; }
.mp-pcard-key { color: var(--muted); }
.mp-pcard-val { font-weight: 600; }
.mp-pcard-val--neg { color: var(--error); }
.mp-pcard-val--warn { color: var(--warn); }

.mp-pcard-footer {
  padding: 10px 16px;
  background: var(--bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mp-pcard-cm { font-size: 18px; font-weight: 800; letter-spacing: -.5px; }
.mp-pcard-cm--ok   { color: var(--success); }
.mp-pcard-cm--warn { color: var(--warn); }
.mp-pcard-cm--neg  { color: var(--error); }
.mp-pcard-cm-label { font-size: 11px; color: var(--muted); }

/* Comparison table */
.mp-compare { overflow-x: auto; }
.mp-compare-table { width: 100%; min-width: 600px; border-collapse: collapse; }
.mp-compare-table th {
  padding: 10px 20px;
  font-size: 11px; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  text-align: right;
  background: var(--bg);
  border-bottom: 1px solid var(--outline-faint);
}
.mp-compare-table th:first-child { text-align: left; }
.mp-compare-table td {
  padding: 10px 20px;
  font-size: 13px;
  text-align: right;
  border-bottom: 1px solid var(--outline-faint);
  font-variant-numeric: tabular-nums;
}
.mp-compare-table td:first-child { text-align: left; font-weight: 500; color: var(--on-s2); }
.mp-compare-table tr:hover td { background: #fafbff; }
.mp-compare-table .section-row td {
  background: #f1f3f4;
  font-size: 10px; font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 20px;
}
.mp-compare-table .total-row td {
  font-weight: 700;
  font-size: 14px;
  background: var(--bg);
  border-top: 1px solid var(--outline);
}
.mp-tab-bar {
  display: flex;
  background: var(--surface);
  border-radius: var(--r) var(--r) 0 0;
  box-shadow: var(--sh1);
  overflow: hidden;
}
.mp-tab {
  flex: 1;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  text-align: center;
  transition: all .15s;
}
.mp-tab:hover { background: var(--bg); color: var(--on-s); }
.mp-tab.active { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); background: #f8fbff; }
.mp-tab-content { display: none; }
.mp-tab-content.active { display: block; }


/* ════════════════════════════════════════════════════
   ALERTS & OPPORTUNITIES
═════════════════════════════════════════════════════ */
.ao-group { margin-bottom: 20px; }
.ao-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  margin-bottom: 8px;
}
.ao-group-label-text {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  white-space: nowrap;
}
.ao-group-label-text--cash     { color: var(--error); }
.ao-group-label-text--margin   { color: var(--warn); }
.ao-group-label-text--capital  { color: #795548; }
.ao-group-label-text--scale    { color: var(--success); }
.ao-group-label-text--structure { color: var(--primary); }
.ao-group-line { flex: 1; height: 1px; background: var(--outline-faint); }
.ao-group-rows { display: flex; flex-direction: column; gap: 6px; }

.ao-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: var(--r);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: box-shadow .15s, background .1s;
  box-shadow: var(--sh1);
}
.ao-card:hover { box-shadow: var(--sh2); background: #fafbff; }
.ao-card--critical { border-left-color: var(--error); }
.ao-card--warning  { border-left-color: var(--warn); }
.ao-card--opp      { border-left-color: var(--success); }

.ao-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.ao-body { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 0; align-items: start; }
.ao-title { grid-column: 1; font-size: 13px; font-weight: 700; color: var(--on-s); margin-bottom: 3px; line-height: 1.35; }
.ao-desc { grid-column: 1; font-size: 12px; color: var(--muted); line-height: 1.45; }
.ao-directive { font-weight: 700; }
.ao-directive--crit { color: var(--error); }
.ao-directive--warn { color: #b54708; }
.ao-directive--ok   { color: #1a7f3c; }
.ao-metric {
  grid-column: 2;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.4px;
  white-space: nowrap;
  text-align: right;
  align-self: center;
}
.ao-metric--neg  { color: var(--error); }
.ao-metric--warn { color: var(--warn); }
.ao-metric--ok   { color: var(--success); }
.ao-chips { grid-column: 1 / -1; display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.ao-chip {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10px; font-weight: 500;
  border: 1px solid var(--outline-faint);
  color: var(--muted);
}
.ao-cta {
  grid-column: 2;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  align-self: center;
  justify-self: end;
}
.ao-cta--crit { background: var(--error-tonal); color: var(--error-on); }
.ao-cta--warn { background: var(--warn-tonal); color: var(--warn-on); }
.ao-cta--ok   { background: var(--success-tonal); color: var(--success-on); }


/* ════════════════════════════════════════════════════
   SKUs
═════════════════════════════════════════════════════ */
.sku-hero {
  background: var(--surface);
  border-radius: var(--rl);
  padding: 22px 24px;
  box-shadow: var(--sh1);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.sku-hero-name { font-size: 18px; font-weight: 700; }
.sku-hero-id { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sku-hero-chips { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.sku-hero-cm { font-size: 30px; font-weight: 700; letter-spacing: -1px; text-align: right; }
.sku-hero-cm--pos { color: var(--success); }
.sku-hero-cm--neg { color: var(--error); }
.sku-hero-cm-lbl { font-size: 11px; color: var(--muted); text-align: right; margin-top: 3px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 14px;
}
.back-link:hover { text-decoration: underline; }

.insight-card {
  background: var(--primary-tonal);
  border-radius: var(--r);
  padding: 14px 18px;
  margin-bottom: 14px;
  border-left: 4px solid var(--primary);
}
.insight-card h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.insight-card ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.insight-card ul li { font-size: 12px; color: var(--primary-dark); display: flex; gap: 6px; }
.insight-card ul li::before { content: '\2192'; font-weight: 700; flex-shrink: 0; }

/* Platform context strip */
.platform-ctx {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg);
  border-bottom: 1px solid var(--outline-faint);
}
.pctx-cell {
  padding: 14px 20px;
  border-right: 1px solid var(--outline-faint);
}
.pctx-cell:last-child { border-right: none; }
.pctx-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 5px; }
.pctx-val { font-size: 18px; font-weight: 800; color: var(--on-s); letter-spacing: -.3px; }
.pctx-val--warn { color: var(--warn); }
.pctx-val--ok   { color: var(--success); }
.pctx-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }


/* ════════════════════════════════════════════════════
   MY COSTS
═════════════════════════════════════════════════════ */
.costs-explainer {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--sh1);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-left: 4px solid var(--primary);
}
.costs-explainer-icon { font-size: 20px; flex-shrink: 0; }
.costs-explainer h3 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.costs-explainer p { font-size: 12px; color: var(--muted); line-height: 1.55; margin: 0; }

.cog-table { width: 100%; min-width: 680px; border-collapse: collapse; }
.cog-table th {
  padding: 10px 14px;
  font-size: 10px; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  text-align: right;
  background: var(--bg);
  border-bottom: 1px solid var(--outline-faint);
  white-space: nowrap;
}
.cog-table th:first-child { text-align: left; min-width: 170px; }
.cog-table th.total-col { color: var(--primary); }
.cog-table td {
  padding: 9px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--outline-faint);
  vertical-align: middle;
  text-align: right;
}
.cog-table td:first-child { text-align: left; }
.cog-table .total-row td {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  border-top: 2px solid var(--outline);
  background: var(--bg);
  text-align: right;
}
.cog-table .total-row td:first-child { text-align: left; color: var(--muted); }

.cost-input {
  width: 76px;
  padding: 5px 8px;
  border: 1px solid var(--outline-faint);
  border-radius: 6px;
  font-size: 12px;
  text-align: right;
  font-family: inherit;
  color: var(--on-s);
  background: var(--surface);
  transition: border .15s;
  -moz-appearance: textfield;
}
.cost-input::-webkit-outer-spin-button,
.cost-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cost-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(26,115,232,.12); }
.cost-total { font-weight: 700; color: var(--primary); }

.fc-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--outline-faint);
  align-items: center;
}
.fc-label { font-size: 13px; color: var(--on-s2); }
.fc-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.fc-input-wrap { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.fc-prefix { font-size: 13px; color: var(--muted); font-weight: 500; }
.fc-input {
  width: 110px;
  padding: 7px 10px;
  border: 1px solid var(--outline-faint);
  border-radius: 6px;
  font-size: 13px;
  text-align: right;
  font-family: inherit;
  color: var(--on-s);
  background: var(--surface);
  transition: border .15s;
  -moz-appearance: textfield;
}
.fc-input::-webkit-outer-spin-button,
.fc-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.fc-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(26,115,232,.12); }
.fc-auto { font-size: 13px; color: var(--muted); text-align: right; font-style: italic; }
.fc-total-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  padding: 13px 28px;
  background: var(--bg);
  border-top: 1px solid var(--outline);
  align-items: center;
}
.fc-total-label { font-size: 14px; font-weight: 700; color: var(--on-s); }
.fc-total-val { font-size: 15px; font-weight: 800; color: var(--primary); text-align: right; }

.save-bar {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--outline-faint);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}
.save-bar-hint { font-size: 12px; color: var(--muted); }
.save-bar .btn--success.saved { background: var(--success); }


/* ════════════════════════════════════════════════════
   ANIMATIONS
═════════════════════════════════════════════════════ */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
[data-pulse] { animation: pulse 2.4s ease-in-out infinite; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.view.active { animation: fadeIn .2s ease-out; }


/* ════════════════════════════════════════════════════
   RESPONSIVE
═════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .mp-summary { grid-template-columns: repeat(2, 1fr); }
  .pl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-drawer { width: 60px; overflow: hidden; }
  .nav-brand, .nav-brand-sub, .nav-item span:not(.nav-icon), .nav-badge, .nav-footer { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-header { justify-content: center; }
  .nav-logo { margin: 0; }
  .kpi-row { grid-template-columns: 1fr; }
  .mp-summary { grid-template-columns: 1fr; }
  .is-row { grid-template-columns: 1fr 80px 80px 50px; padding: 10px 16px; }
  .is-row--highlighted { padding-left: 13px; }
  .is-sub-row { grid-template-columns: 1fr 80px 80px 50px; padding: 8px 16px; }
  .wizard-shell { max-width: 100%; border-radius: 0; }
  .wizard-top { padding: 20px; }
  .wiz-steps { padding: 0 16px; }
  .wiz-body { padding: 20px; }
  .wiz-footer { padding: 16px 20px; }
}

/* ── Avatar Dropdown ──────────────────────────── */
.user-menu { position: relative; cursor: pointer; display: inline-flex; }
.user-dropdown {
  position: absolute; top: 44px; right: 0; z-index: 1000;
  background: var(--surface); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  width: 220px; padding: 8px 0; display: none;
}
.user-dropdown.open { display: block; }
.ud-header { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.ud-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ud-name { font-size: 13px; font-weight: 600; color: var(--on-s); }
.ud-location { font-size: 11px; color: var(--muted); margin-top: 1px; }
.ud-status {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 16px 10px; font-size: 12px;
}
.ud-status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.ud-status--ok .ud-status-dot { background: var(--success); }
.ud-status--warn .ud-status-dot { background: var(--warn); }
.ud-status--crit .ud-status-dot { background: var(--error); }
.ud-divider { height: 1px; background: var(--outline-faint); margin: 4px 0; }
.ud-item {
  padding: 9px 16px; font-size: 13px; color: var(--on-s2);
  display: flex; align-items: center; gap: 8px; cursor: pointer;
}
.ud-item:hover { background: var(--bg); }
.ud-item--logout:hover { color: var(--error); background: var(--error-tonal); }

/* ── Nav Sign Out ─────────────────────────────── */
.nav-signout {
  font-size: 12px; color: var(--muted); cursor: pointer;
  padding: 7px 14px; border-radius: 8px;
  display: flex; align-items: center; gap: 6px;
  transition: all .15s; margin-top: 6px;
}
.nav-signout:hover { background: var(--error-tonal); color: var(--error); }

/* ── Login Page ─────────────────────────────── */
.login-page {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.login-card {
  background: var(--surface); border-radius: 20px;
  padding: 40px 36px; width: 380px; max-width: 92vw;
  box-shadow: var(--sh3); text-align: center;
}
.login-card-logo {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #4a90d9);
  color: #fff; font-size: 24px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.login-card-title { font-size: 20px; font-weight: 700; color: var(--on-s); }
.login-card-sub { font-size: 13px; color: var(--muted); margin: 4px 0 24px; }
.login-card-field { text-align: left; margin-bottom: 16px; }
.login-card-label { display: block; font-size: 12px; font-weight: 600; color: var(--on-s2); margin-bottom: 5px; }
.login-card-input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--outline);
  border-radius: 10px; font-size: 14px; outline: none;
  background: var(--bg); color: var(--on-s);
}
.login-card-input:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px rgba(26,115,232,.12); }
.login-card-error { font-size: 13px; color: var(--error); display: none; padding: 8px 12px; background: var(--error-tonal); border-radius: 8px; margin-bottom: 14px; }
.login-card-hint { margin-top: 14px; font-size: 11px; color: var(--muted); }
.login-card-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0 12px; color: var(--muted); font-size: 11px;
}
.login-card-divider::before,
.login-card-divider::after { content: ""; flex: 1; height: 1px; background: var(--outline); }
.login-admin-link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px; border: 1.5px solid var(--outline); border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--on-s2); text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.login-admin-link:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-tonal); }
.login-admin-icon { font-size: 15px; }
.login-admin-arrow { margin-left: auto; color: var(--muted); }

/* ── Settings / Channel Info ─────────────────────── */
.set-form { display:flex; flex-direction:column; gap:12px; }
.set-row { display:grid; grid-template-columns:160px 1fr; align-items:center; gap:12px; }
.set-row-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.set-row-grid .set-row { grid-template-columns:1fr; }
.set-label { font-size:13px; font-weight:600; color:var(--on-s); }
.set-input { width:100%; padding:9px 12px; border:1.5px solid var(--outline); border-radius:8px; font-size:13px; outline:none; background:var(--bg); color:var(--on-s); }
.set-input:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(26,115,232,.12); }
.set-section-hdr { font-size:12px; font-weight:700; color:var(--primary); text-transform:uppercase; letter-spacing:.5px; margin-top:8px; padding-top:12px; border-top:1px solid var(--outline); }
.set-section-hdr:first-of-type { margin-top:0; }
