/* ============================================================
   EVOLTA — Hi-fi design system
   Solar EPC cost-control. Serious, data-dense financial tool.
   Slate ink + solar amber accent. Red/green reserved for variance.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  /* ----- surfaces ----- */
  --bg:#f0efea;
  --surface:#ffffff;
  --surface-2:#f8f7f2;
  --surface-3:#f0efe7;
  --sidebar:#191b1f;
  --sidebar-2:#272a30;

  /* ----- ink ----- */
  --ink:#1c1d1a;
  --ink-2:#52524c;
  --ink-3:#7d7d74;
  --ink-4:#a5a59a;
  --line:#e4e2d8;
  --line-2:#eeece3;
  --line-strong:#d2cfc2;

  /* ----- brand (Evolve Energy: solar gold + charcoal) ----- */
  --slate:#21232a;        /* charcoal primary */
  --slate-2:#2f323b;
  --amber:#f5a800;        /* solar gold accent */
  --amber-2:#ffc233;
  --amber-soft:#fdf3da;

  /* ----- semantic: the 3 numbers ----- */
  --budget:#3a3a33;       /* frozen baseline */
  --committed:#b07d10;    /* POs issued (gold-bronze) */
  --committed-soft:#f8eccb;
  --actual:#33352f;       /* invoices booked (charcoal) */

  /* ----- variance semantics ----- */
  --over:#cf3b30;
  --over-soft:#fbe7e5;
  --over-line:#e9b6b1;
  --under:#1f9d57;
  --under-soft:#e3f3ea;
  --warn:#c98a12;
  --warn-soft:#fbf0d4;

  /* ----- radii / shadow ----- */
  --r-sm:6px;
  --r:9px;
  --r-lg:13px;
  --r-xl:18px;
  --sh-1:0 1px 2px rgba(16,32,52,.06), 0 1px 3px rgba(16,32,52,.05);
  --sh-2:0 2px 6px rgba(16,32,52,.07), 0 4px 14px rgba(16,32,52,.06);
  --sh-3:0 8px 28px rgba(16,32,52,.14), 0 2px 8px rgba(16,32,52,.08);
  --sh-pop:0 14px 44px rgba(16,32,52,.20);

  --sans:'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono:'IBM Plex Mono', ui-monospace, monospace;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; height:100%; }
body{
  font-family:var(--sans);
  background:var(--bg);
  color:var(--ink);
  font-size:14px;
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
#root{ height:100%; }

/* numbers are always tabular + mono-ish */
.num{ font-family:var(--mono); font-variant-numeric:tabular-nums; font-feature-settings:"tnum"; }
.tnum{ font-variant-numeric:tabular-nums; }

h1,h2,h3,h4{ margin:0; font-weight:600; letter-spacing:-.01em; color:var(--ink); }
h1{ font-size:24px; letter-spacing:-.02em; }
h2{ font-size:19px; }
h3{ font-size:16px; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; }

.eyebrow{ font-family:var(--mono); font-size:11px; letter-spacing:.09em; text-transform:uppercase; color:var(--ink-3); font-weight:500; }
.muted{ color:var(--ink-2); }
.faint{ color:var(--ink-4); }

/* ---------- scrollbars ---------- */
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-thumb{ background:#c4ccd8; border-radius:8px; border:2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover{ background:#aab4c4; }

/* slim dark scrollbar inside sidebar nav */
.sidebar ::-webkit-scrollbar{ width:4px; }
.sidebar ::-webkit-scrollbar-thumb{ background:#3a3d44; border-radius:4px; border:none; }
.sidebar ::-webkit-scrollbar-thumb:hover{ background:#4a4e58; }
.sidebar ::-webkit-scrollbar-track{ background:transparent; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn{
  display:inline-flex; align-items:center; gap:7px;
  font-size:13.5px; font-weight:500; line-height:1;
  padding:9px 14px; border-radius:var(--r-sm);
  border:1px solid var(--line-strong); background:var(--surface); color:var(--ink);
  cursor:pointer; white-space:nowrap; transition:background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover{ background:var(--surface-2); border-color:#bcc6d4; }
.btn:active{ transform:translateY(.5px); }
.btn svg{ width:15px; height:15px; }
.btn-primary{ background:var(--slate); border-color:var(--slate); color:#fff; }
.btn-primary:hover{ background:var(--slate-2); border-color:var(--slate-2); }
.btn-amber{ background:var(--amber); border-color:var(--amber); color:#3a2606; font-weight:600; }
.btn-amber:hover{ background:var(--amber-2); border-color:var(--amber-2); }
.btn-danger{ color:var(--over); border-color:var(--over-line); }
.btn-danger:hover{ background:var(--over-soft); }
.btn-ghost{ border-color:transparent; background:transparent; color:var(--ink-2); }
.btn-ghost:hover{ background:var(--surface-3); }
.btn-sm{ padding:6px 10px; font-size:12.5px; }
.btn-lg{ padding:11px 18px; font-size:14.5px; }
.btn-icon{ padding:8px; }

/* ============================================================
   CHIPS / BADGES
   ============================================================ */
.badge{
  display:inline-flex; align-items:center; gap:5px;
  font-size:11.5px; font-weight:600; line-height:1;
  padding:4px 9px; border-radius:20px; white-space:nowrap;
  background:var(--surface-3); color:var(--ink-2); border:1px solid transparent;
}
.badge .dot{ width:6px; height:6px; border-radius:50%; background:currentColor; }
.badge-over{ background:var(--over-soft); color:var(--over); }
.badge-under{ background:var(--under-soft); color:var(--under); }
.badge-warn{ background:var(--warn-soft); color:#9a6711; }
.badge-committed{ background:var(--committed-soft); color:var(--committed); }
.badge-frozen{ background:#e8edf4; color:var(--slate); }
.badge-amber{ background:var(--amber-soft); color:#9a5b11; }
.badge-outline{ background:transparent; border-color:var(--line-strong); color:var(--ink-2); }
.badge-solid{ background:var(--slate); color:#fff; }

.tag{ font-family:var(--mono); font-size:11px; color:var(--ink-3); letter-spacing:.02em; }

/* status dot stand-alone */
.sdot{ width:8px; height:8px; border-radius:50%; display:inline-block; flex:none; }
.sdot-over{ background:var(--over); }
.sdot-under{ background:var(--under); }
.sdot-warn{ background:var(--warn); }
.sdot-committed{ background:var(--committed); }
.sdot-idle{ background:var(--line-strong); }

/* ============================================================
   CARDS / SURFACES
   ============================================================ */
.card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--sh-1); }
.card-pad{ padding:18px 20px; }
.card-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 20px; border-bottom:1px solid var(--line-2); }
.card-head h3{ font-size:15px; }
.divider{ height:1px; background:var(--line-2); border:none; margin:0; }

/* ============================================================
   TABLES
   ============================================================ */
.tbl{ width:100%; border-collapse:collapse; font-size:13.5px; }
.tbl thead th{
  font-family:var(--mono); font-size:10.5px; letter-spacing:.05em; text-transform:uppercase;
  color:var(--ink-3); font-weight:500; text-align:left; padding:10px 14px;
  border-bottom:1px solid var(--line); background:var(--surface-2); position:sticky; top:0; z-index:1;
}
.tbl tbody td{ padding:11px 14px; border-bottom:1px solid var(--line-2); vertical-align:middle; }
.tbl tbody tr:hover{ background:var(--surface-2); }
.tbl .r{ text-align:right; }
.tbl .c{ text-align:center; }
.tbl tr.group-row td{ background:var(--surface-3); font-weight:600; }
.tbl tr.group-row:hover td{ background:var(--surface-3); }
.tbl tr.sub td{ color:var(--ink-2); }
.tbl tr.sub td:first-child{ padding-left:30px; }
.tbl tr.total-row td{ border-top:2px solid var(--line-strong); border-bottom:none; font-weight:700; background:var(--surface-2); }
.cell-strong{ font-weight:600; color:var(--ink); }

/* ============================================================
   BUDGET BARS (the 3-number bar)
   ============================================================ */
.tribar{ position:relative; height:10px; border-radius:6px; background:var(--surface-3); overflow:hidden; }
.tribar .fill-committed{ position:absolute; left:0; top:0; bottom:0; background:var(--committed-soft); }
.tribar .fill-actual{ position:absolute; left:0; top:0; bottom:0; background:var(--actual); border-radius:6px 0 0 6px; }
.tribar.is-over .fill-actual{ background:var(--over); }
.tribar.is-over .fill-committed{ background:var(--over-soft); }
.budget-marker{ position:absolute; top:-3px; bottom:-3px; width:2px; background:var(--ink); z-index:2; }
.budget-marker::after{ content:''; position:absolute; top:-3px; left:-2px; width:6px; height:6px; border-radius:50%; background:var(--ink); }

/* ============================================================
   FORMS
   ============================================================ */
.field label{ display:block; font-size:12px; font-weight:500; color:var(--ink-2); margin-bottom:5px; }
.input, .select, textarea.input{
  width:100%; font-family:var(--sans); font-size:13.5px; color:var(--ink);
  padding:9px 11px; border:1px solid var(--line-strong); border-radius:var(--r-sm); background:var(--surface);
  outline:none; transition:border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, textarea.input:focus{ border-color:var(--committed); box-shadow:0 0 0 3px rgba(58,110,165,.14); }
.input.num{ text-align:right; }

/* segmented toggle */
.segmented{ display:inline-flex; background:var(--surface-3); border-radius:var(--r-sm); padding:3px; gap:2px; }
.segmented button{
  border:none; background:transparent; cursor:pointer; font-size:12.5px; font-weight:500; color:var(--ink-2);
  padding:6px 12px; border-radius:5px; display:inline-flex; align-items:center; gap:6px; transition:all .12s;
}
.segmented button.active{ background:var(--surface); color:var(--ink); box-shadow:var(--sh-1); }

/* ============================================================
   APP SHELL
   ============================================================ */
.app{ display:flex; height:100vh; overflow:hidden; }

.sidebar{ width:228px; flex:none; background:var(--sidebar); color:#cdd7e6; display:flex; flex-direction:column; }
.sidebar .brand{ display:flex; align-items:center; gap:10px; padding:18px 18px 16px; }
.sidebar .brand-logo{ height:30px; width:auto; max-width:172px; object-fit:contain; display:block; }
.sidebar .brand .logo{ width:30px; height:30px; border-radius:8px; background:linear-gradient(135deg,var(--amber),var(--amber-2)); display:flex; align-items:center; justify-content:center; flex:none; box-shadow:0 2px 8px rgba(232,145,42,.4); }
.sidebar .brand .logo svg{ width:18px; height:18px; }
.sidebar .brand .name{ font-size:18px; font-weight:700; color:#fff; letter-spacing:-.01em; }
.sidebar .brand .sub{ font-family:var(--mono); font-size:9.5px; letter-spacing:.12em; text-transform:uppercase; color:#8d8a7f; }

.nav-section{ padding:6px 12px; }
.nav-label{ font-family:var(--mono); font-size:9.5px; letter-spacing:.12em; text-transform:uppercase; color:#83817a; padding:12px 10px 6px; }
.nav-item{ display:flex; align-items:center; gap:11px; padding:9px 11px; border-radius:7px; font-size:13.5px; font-weight:500; color:#c4c2b8; cursor:pointer; transition:background .12s,color .12s; position:relative; }ition:relative; }
.nav-item svg{ width:17px; height:17px; flex:none; opacity:.85; }
.nav-item:hover{ background:var(--sidebar-2); color:#fff; }
.nav-item.active{ background:var(--sidebar-2); color:#fff; }
.nav-item.active::before{ content:''; position:absolute; left:-12px; top:7px; bottom:7px; width:3px; border-radius:0 3px 3px 0; background:var(--amber); }
.nav-item .count{ margin-left:auto; font-family:var(--mono); font-size:11px; background:var(--over); color:#fff; border-radius:10px; padding:1px 7px; font-weight:600; }
.nav-item .count.neutral{ background:#3a3d44; color:#cdcabd; }

.sidebar .foot{ margin-top:auto; padding:14px; border-top:1px solid #34373d; }
.sidebar .foot-row{ display:flex; align-items:center; gap:6px; }
.sidebar .foot-row .user-chip{ flex:1; min-width:0; }
.logout-btn{ flex:none; width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; background:transparent; border:1px solid #34373d; color:#b9b6ab; cursor:pointer; transition:background .12s, color .12s, border-color .12s; }
.logout-btn:hover{ background:var(--over); border-color:var(--over); color:#fff; }
.user-chip{ display:flex; align-items:center; gap:10px; padding:7px; border-radius:8px; cursor:pointer; }
.user-chip:hover{ background:var(--sidebar-2); }
.user-chip .av{ width:30px; height:30px; border-radius:50%; background:#3a3d44; color:#e2dfd2; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:600; flex:none; }
.user-chip .uname{ font-size:13px; font-weight:600; color:#f0eee4; }
.user-chip .urole{ font-size:11px; color:#928f84; }

/* main column */
.main{ flex:1; display:flex; flex-direction:column; overflow:hidden; min-width:0; }
.topbar{ height:60px; flex:none; background:var(--surface); border-bottom:1px solid var(--line); display:flex; align-items:center; gap:16px; padding:0 24px; }
.crumb{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink-3); }
.crumb .here{ color:var(--ink); font-weight:600; }
.crumb svg{ width:14px; height:14px; opacity:.5; }
.topbar .search{ display:flex; align-items:center; gap:8px; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-sm); padding:7px 11px; width:300px; color:var(--ink-3); }
.topbar .search input{ border:none; background:transparent; outline:none; font-family:var(--sans); font-size:13px; color:var(--ink); width:100%; }

.scroll{ flex:1; overflow-y:auto; }
.page-pad{ padding:24px 28px 60px; max-width:1320px; margin:0 auto; }
.page-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:20px; flex-wrap:wrap; }
.page-head .ph-sub{ color:var(--ink-2); font-size:14px; margin-top:4px; max-width:680px; }

/* metric tiles */
.tiles{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.tile{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); padding:16px 18px; box-shadow:var(--sh-1); }
.tile .t-label{ font-size:12.5px; color:var(--ink-2); display:flex; align-items:center; gap:7px; }
.tile .t-val{ font-size:27px; font-weight:600; margin-top:8px; letter-spacing:-.02em; }
.tile .t-val small{ font-size:15px; font-weight:500; color:var(--ink-3); }
.tile .t-meta{ font-size:12px; margin-top:6px; display:flex; align-items:center; gap:6px; }

/* generic flex helpers */
.row{ display:flex; gap:14px; }
.col{ display:flex; flex-direction:column; gap:14px; }
.wrap{ flex-wrap:wrap; }
.between{ justify-content:space-between; }
.center{ align-items:center; }
.end{ justify-content:flex-end; }
.grow{ flex:1; min-width:0; }
.gap-sm{ gap:8px; }
.gap-lg{ gap:22px; }

/* sync pill */
.sync-pill{ display:inline-flex; align-items:center; gap:7px; font-size:12px; color:var(--under); background:var(--under-soft); border-radius:20px; padding:4px 10px; font-weight:500; }
.sync-pill svg{ width:13px; height:13px; }
.sync-pill.pending{ color:#9a6711; background:var(--warn-soft); }

/* drawer */
.drawer-scrim{ position:fixed; inset:0; background:rgba(16,32,52,.34); z-index:60; opacity:0; pointer-events:none; transition:opacity .2s; }
.drawer-scrim.open{ opacity:1; pointer-events:auto; }
.drawer{ position:fixed; top:0; right:0; bottom:0; width:520px; max-width:92vw; background:var(--surface); box-shadow:var(--sh-pop); z-index:61; transform:translateX(100%); transition:transform .26s cubic-bezier(.4,0,.1,1); display:flex; flex-direction:column; }
.drawer.open{ transform:none; }
.drawer-head{ display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--line); }
.drawer-body{ flex:1; overflow-y:auto; padding:20px; }
.drawer-foot{ padding:14px 20px; border-top:1px solid var(--line); display:flex; gap:10px; }

/* keyboard hint */
.kbd{ font-family:var(--mono); font-size:10.5px; background:var(--surface-3); border:1px solid var(--line-strong); border-bottom-width:2px; border-radius:4px; padding:1px 5px; color:var(--ink-3); }

/* fade-in */
.fade-in{ animation:fadein .26s ease; }
@keyframes fadein{ from{ transform:translateY(7px); } to{ transform:none; } }

@media (max-width:1100px){ .tiles{ grid-template-columns:repeat(2,1fr); } }

/* ============================================================
   WIZARD / NEW PROJECT
   ============================================================ */
.wiz{ max-width:980px; margin:0 auto; }
.stepper{ display:flex; align-items:center; gap:0; margin-bottom:26px; }
.step{ display:flex; align-items:center; gap:10px; flex:none; }
.step .sc{ width:30px; height:30px; border-radius:50%; border:2px solid var(--line-strong); background:var(--surface); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:600; color:var(--ink-3); flex:none; }
.step .st{ font-size:13.5px; font-weight:600; color:var(--ink-3); white-space:nowrap; }
.step.done .sc{ background:var(--under); border-color:var(--under); color:#fff; }
.step.active .sc{ background:var(--slate); border-color:var(--slate); color:#fff; }
.step.active .st{ color:var(--ink); }
.step-line{ flex:1; height:2px; background:var(--line); margin:0 14px; min-width:24px; }
.step-line.done{ background:var(--under); }

.choice-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.choice{ border:1.5px solid var(--line-strong); border-radius:var(--r-lg); background:var(--surface); padding:18px; cursor:pointer; transition:border-color .12s, box-shadow .12s, transform .08s; text-align:left; }
.choice:hover{ border-color:var(--amber); box-shadow:var(--sh-2); }
.choice.sel{ border-color:var(--slate); box-shadow:0 0 0 2px rgba(33,35,42,.14); }
.choice .ci{ width:38px; height:38px; border-radius:9px; background:var(--surface-3); display:flex; align-items:center; justify-content:center; color:var(--ink-2); margin-bottom:12px; }
.choice.sel .ci{ background:var(--amber); color:#3a2606; }
.choice h4{ font-size:15px; margin-bottom:3px; }
.choice p{ font-size:12.5px; color:var(--ink-2); margin:0; line-height:1.35; }

.tpl-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.tpl{ border:1.5px solid var(--line-strong); border-radius:var(--r); background:var(--surface); padding:14px 16px; cursor:pointer; transition:all .12s; display:flex; align-items:center; gap:13px; }
.tpl:hover{ border-color:var(--amber); }
.tpl.sel{ border-color:var(--slate); box-shadow:0 0 0 2px rgba(33,35,42,.12); }
.tpl .tk{ width:42px; height:42px; border-radius:9px; background:var(--surface-3); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; color:var(--ink-2); flex:none; }
.tpl.sel .tk{ background:var(--slate); color:#fff; }

.dropzone{ border:2px dashed var(--line-strong); border-radius:var(--r-lg); background:var(--surface-2); padding:38px 24px; text-align:center; cursor:pointer; transition:all .15s; }
.dropzone:hover, .dropzone.drag{ border-color:var(--amber); background:var(--amber-soft); }
.dropzone .dz-ic{ width:48px; height:48px; border-radius:12px; background:var(--surface); border:1px solid var(--line); display:flex; align-items:center; justify-content:center; margin:0 auto 14px; color:var(--ink-2); }

.map-row{ display:grid; grid-template-columns:1fr 28px 1fr 90px; align-items:center; gap:12px; padding:9px 0; border-bottom:1px solid var(--line-2); }
.xls-cell{ font-family:var(--mono); font-size:12.5px; background:#e6f0e6; border:1px solid #cfe2cf; color:#2f5d36; border-radius:5px; padding:5px 9px; display:inline-block; }

.field-row{ display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }
.field-row-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }

.summary-list{ display:flex; flex-direction:column; }
.summary-list .sl-row{ display:flex; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--line-2); font-size:13.5px; }
.summary-list .sl-row .k{ color:var(--ink-2); }
.summary-list .sl-row .v{ font-weight:600; }

/* ============================================================
   AUTH (login / 2FA / reset)
   ============================================================ */
.auth{ display:flex; height:100vh; overflow:hidden; }
.auth-brand{ width:46%; max-width:640px; background:linear-gradient(165deg,#2079ca 0%, #0f4f91 58%, #0b3c73 100%); color:#eaf2fb; padding:40px 46px; display:flex; flex-direction:column; position:relative; overflow:hidden; }
.auth-brand::before{ content:''; position:absolute; top:-180px; right:-140px; width:480px; height:480px; border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,.16), rgba(255,255,255,0) 68%); pointer-events:none; }
.auth-brand::after{ content:''; position:absolute; inset:0; background-image:linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px); background-size:34px 34px; pointer-events:none; }
.auth-brand .ab-logo{ height:28px; width:auto; position:relative; z-index:1; }
.auth-brand .ab-top{ position:relative; z-index:1; }
.auth-brand h1{ color:#fff; font-size:34px; line-height:1.1; letter-spacing:-.02em; margin-top:14px; }
.auth-brand .ab-sub{ color:#c6dcf2; font-size:15px; margin-top:13px; max-width:430px; line-height:1.5; }
.auth-brand .ab-hero{ width:100%; max-width:520px; margin:auto; display:block; position:relative; z-index:1;
  -webkit-mask-image:radial-gradient(ellipse 80% 80% at 50% 50%, #000 66%, transparent 100%);
  mask-image:radial-gradient(ellipse 80% 80% at 50% 50%, #000 66%, transparent 100%); }
.auth-brand .ab-foot{ position:relative; z-index:1; font-size:12.5px; color:#8fb2d8; font-family:var(--mono); }

.auth-main{ flex:1; display:flex; align-items:center; justify-content:center; background:var(--bg); padding:30px; }
.auth-card{ width:100%; max-width:392px; }
.auth-card .ac-h{ font-size:26px; letter-spacing:-.02em; }
.auth-card .ac-sub{ color:var(--ink-2); font-size:14px; margin-top:6px; margin-bottom:26px; }
.auth-field{ margin-bottom:16px; }
.auth-field label{ display:block; font-size:12.5px; font-weight:600; color:var(--ink-2); margin-bottom:6px; }
.auth-input-wrap{ position:relative; display:flex; align-items:center; }
.auth-input-wrap .eye{ position:absolute; right:10px; background:none; border:none; cursor:pointer; color:var(--ink-3); padding:4px; display:flex; }
.auth-row{ display:flex; align-items:center; justify-content:space-between; margin:4px 0 20px; font-size:13px; }
.auth-check{ display:flex; align-items:center; gap:8px; color:var(--ink-2); cursor:pointer; }
.auth-link{ color:var(--committed); font-weight:600; cursor:pointer; }
.auth-link:hover{ text-decoration:underline; }
.btn-block{ width:100%; justify-content:center; padding:11px; font-size:14.5px; }
.auth-divider{ display:flex; align-items:center; gap:12px; margin:22px 0; color:var(--ink-4); font-size:12px; }
.auth-divider::before, .auth-divider::after{ content:''; flex:1; height:1px; background:var(--line); }
.sso-row{ display:flex; gap:10px; }
.sso-btn{ flex:1; justify-content:center; gap:9px; }
.auth-foot{ text-align:center; font-size:13px; color:var(--ink-3); margin-top:24px; }

.otp-row{ display:flex; gap:10px; justify-content:space-between; margin:6px 0 22px; }
.otp-box{ width:50px; height:58px; text-align:center; font-family:var(--mono); font-size:24px; font-weight:600; color:var(--ink); border:1.5px solid var(--line-strong); border-radius:var(--r); background:var(--surface); outline:none; }
.otp-box:focus{ border-color:var(--committed); box-shadow:0 0 0 3px rgba(58,110,165,.14); }
.otp-box.filled{ border-color:var(--slate); }

.auth-success{ text-align:center; padding:8px 0; }
.auth-success .as-ic{ width:54px; height:54px; border-radius:50%; background:var(--under-soft); color:var(--under); display:flex; align-items:center; justify-content:center; margin:0 auto 16px; }

/* sign-out menu in sidebar */
.signout-menu{ position:absolute; left:14px; right:14px; bottom:64px; background:#23262d; border:1px solid #34373d; border-radius:9px; box-shadow:0 -8px 28px rgba(0,0,0,.4); padding:5px; z-index:5; }
.signout-menu .so-item{ display:flex; align-items:center; gap:10px; padding:9px 11px; border-radius:6px; font-size:13.5px; color:#d4d2c8; cursor:pointer; }
.signout-menu .so-item:hover{ background:#2f323a; color:#fff; }

@media (max-width:880px){ .auth-brand{ display:none; } }

/* ============================================================
   PURCHASE ORDER FLOW
   ============================================================ */
.po-badge{ display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:600; padding:4px 10px; border-radius:20px; white-space:nowrap; }
.po-badge .pd{ width:6px; height:6px; border-radius:50%; background:currentColor; }

/* horizontal mini progress for list rows */
.po-mini{ display:flex; align-items:center; gap:3px; }
.po-mini .seg{ width:14px; height:4px; border-radius:2px; background:var(--line); }

/* vertical stepper */
.vstep-item{ display:flex; gap:13px; }
.vstep-rail{ display:flex; flex-direction:column; align-items:center; }
.vstep-dot{ width:26px; height:26px; border-radius:50%; border:2px solid var(--line-strong); background:var(--surface); display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:var(--ink-4); z-index:1; flex:none; }
.vstep-line{ width:2px; flex:1; background:var(--line); margin:3px 0; min-height:16px; }
.vstep-item.done .vstep-dot{ background:var(--under); border-color:var(--under); color:#fff; }
.vstep-item.done .vstep-line{ background:var(--under); }
.vstep-item.current .vstep-dot{ background:var(--slate); border-color:var(--slate); color:#fff; box-shadow:0 0 0 4px rgba(33,35,42,.1); }
.vstep-body{ padding-bottom:16px; }
.vstep-item:last-child .vstep-body{ padding-bottom:0; }
.vstep-label{ font-size:13.5px; font-weight:600; color:var(--ink-4); line-height:1.3; padding-top:3px; }
.vstep-item.done .vstep-label, .vstep-item.current .vstep-label{ color:var(--ink); }
.vstep-sub{ font-size:11.5px; color:var(--ink-3); font-weight:400; margin-top:2px; }

/* searchable vendor combobox */
.combo{ position:relative; }
.combo-list{ position:absolute; left:0; right:0; top:calc(100% + 4px); background:var(--surface); border:1px solid var(--line-strong); border-radius:var(--r); box-shadow:var(--sh-2); max-height:240px; overflow-y:auto; z-index:20; }
.combo-item{ padding:9px 12px; cursor:pointer; border-bottom:1px solid var(--line-2); }
.combo-item:hover, .combo-item.hl{ background:var(--surface-2); }
.combo-item:last-child{ border-bottom:none; }

/* match comparison */
.match-grid{ display:grid; grid-template-columns:1fr 1fr; gap:0; }
.match-col{ padding:0; }
.match-col + .match-col{ border-left:1px solid var(--line); }
.match-col .mc-head{ padding:11px 16px; font-weight:600; font-size:13px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; }
.match-row{ display:flex; justify-content:space-between; padding:9px 16px; font-size:13px; border-bottom:1px solid var(--line-2); }
.match-flag{ background:var(--over-soft); }
.match-good{ background:var(--under-soft); }

@media (max-width:760px){ .match-grid{ grid-template-columns:1fr; } .match-col + .match-col{ border-left:none; border-top:1px solid var(--line); } }

/* ============================================================
   MOBILE — slide-in nav + thumb-friendly approval screen
   ============================================================ */
.nav-toggle{ display:none; }
.nav-scrim{ display:none; }
.po-approve-bar{ display:none; }

@media (max-width:820px){
  /* off-canvas sidebar */
  .sidebar{ position:fixed; top:0; left:0; bottom:0; z-index:60;
    transform:translateX(-100%); transition:transform .22s ease;
    box-shadow:0 0 50px rgba(8,12,20,.45); }
  .sidebar.open{ transform:none; }
  .nav-scrim{ display:block; position:fixed; inset:0; z-index:55;
    background:rgba(8,12,20,.5); opacity:0; pointer-events:none; transition:opacity .22s; }
  .nav-scrim.open{ opacity:1; pointer-events:auto; }
  .nav-toggle{ display:inline-flex; margin-left:-6px; }

  .topbar{ padding:0 14px; gap:8px; }
  .topbar .search{ display:none; }
  .crumb{ font-size:12.5px; }

  .page-pad{ padding:16px 14px 96px; }
  .page-head{ gap:12px; }
  .page-head h1{ font-size:20px; }

  /* thumb-friendly controls everywhere in the flow */
  .btn{ min-height:44px; }
  .btn-sm{ min-height:36px; }

  /* PO detail: stack the two columns */
  .po-detail-cols{ flex-direction:column; gap:16px; }
  .po-detail-side{ width:100% !important; }

  /* hide in-card approve/reject — the sticky bar handles it */
  .decision-btns{ display:none; }

  /* sticky bottom approve bar */
  .po-approve-bar{ display:flex; gap:10px; position:fixed; left:0; right:0; bottom:0; z-index:50;
    padding:12px 14px calc(12px + env(safe-area-inset-bottom));
    background:var(--surface); border-top:1px solid var(--line);
    box-shadow:0 -6px 22px rgba(8,12,20,.12); }
  .po-approve-bar .btn{ flex:1; min-height:52px; font-size:15.5px; font-weight:600; }
  .po-approve-bar .btn svg{ width:18px; height:18px; }
}



