/* ============================================================
   CredEntry Ready — design system
   Brand tokens lifted from credentry.com (Geist + teal on slate)
   ============================================================ */
:root {
  /* teal (brand / cta) */
  --teal-50:#ecfafb; --teal-100:#dcf6f7; --teal-200:#b6edf0; --teal-300:#82e0e4;
  --teal-400:#4ed1d7; --teal-500:#22bcc4; --teal-600:#0fa9b0; --teal-700:#0e6b73;
  --teal-800:#0c5057; --teal-900:#093a3e; --teal-950:#062a2d;
  /* slate (neutrals) */
  --slate-50:#f4f6f9; --slate-100:#e9edf2; --slate-200:#d7dde5; --slate-300:#b3bcc9;
  --slate-400:#8b96a8; --slate-500:#67748a; --slate-600:#4a5663; --slate-700:#37424a;
  --slate-800:#2c333c; --slate-900:#232931; --slate-950:#1b2026;

  --bg:#f2f5f8; --surface:#fff; --elevated:#fff;
  --fg:#37424a; --fg-strong:#232931; --fg-muted:#67748a; --fg-subtle:#8b96a8;
  --line:#37424a24; --line-strong:#37424a38;

  --cta:#22bcc4; --cta-hover:#0fa9b0; --cta-fg:#fff; --link:#0e6b73;

  /* status */
  --blue:#37b6e0;  --blue-bg:#ddf1fa;
  --amber:#f19f4f; --amber-bg:#fcead7;
  --green:#4caf50; --green-bg:#dcefdd;
  --red:#e53935;   --red-bg:#fcdbd9;

  --r-xs:4px; --r-sm:8px; --r-md:14px; --r-lg:22px; --r-xl:32px; --r-full:999px;
  --sh-1:0 1px 2px #37424a0a, 0 4px 14px #37424a0f;
  --sh-2:0 2px 4px #37424a0d, 0 14px 38px #37424a1a;
  --sh-3:0 8px 20px #37424a1a, 0 30px 70px #37424a2e;
  --sh-brand:0 12px 32px -10px #22bcc48c;

  --ease:cubic-bezier(.2,.8,.2,1);
  --t-fast:.14s; --t:.22s; --t-slow:.42s;

  --font:"Geist","GeistSans Fallback",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --mono:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;

  --rail-w:230px;
}

* { box-sizing:border-box; }
html,body { margin:0; padding:0; }
body {
  font-family:var(--font); color:var(--fg); background:var(--bg);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  font-size:15px; line-height:1.5;
}
h1,h2,h3,h4 { color:var(--fg-strong); font-weight:700; letter-spacing:-.02em; margin:0; }
a { color:var(--link); text-decoration:none; }
button { font-family:inherit; cursor:pointer; }
:focus-visible { outline:2px solid var(--teal-500); outline-offset:2px; border-radius:var(--r-xs); }
/* headings receive programmatic focus on navigation (a11y) — no visible box */
h1:focus, h1:focus-visible, h2:focus, h2:focus-visible { outline:none; }

/* ---- boot / loading ---- */
.boot { position:fixed; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px; background:var(--bg); }
.boot-mark { font-size:30px; font-weight:800; letter-spacing:-.03em; color:var(--fg-strong); }
.boot-mark span { color:var(--teal-500); }
.boot-bar { width:160px; height:5px; border-radius:var(--r-full); background:var(--slate-200); overflow:hidden; }
.boot-bar span { display:block; width:40%; height:100%; border-radius:var(--r-full); background:var(--teal-500); animation:boot 1.1s var(--ease) infinite; }
@keyframes boot { 0%{transform:translateX(-110%)} 100%{transform:translateX(360%)} }
#blazor-error-ui { display:none; position:fixed; bottom:0; left:0; right:0; padding:12px 18px; background:var(--slate-900); color:#fff; z-index:100; }
#blazor-error-ui .reload { color:var(--teal-300); }
#blazor-error-ui .dismiss { float:right; cursor:pointer; }

/* ============================================================
   App shell
   ============================================================ */
.shell { min-height:100vh; }
.rail {
  position:fixed; inset:0 auto 0 0; width:var(--rail-w);
  background:var(--slate-900); color:var(--slate-300);
  display:flex; flex-direction:column; padding:22px 14px; gap:4px; z-index:20;
}
.rail .brand { font-size:21px; font-weight:800; letter-spacing:-.03em; color:#fff; padding:6px 10px 2px; }
.rail .brand span { color:var(--teal-400); }
.rail .brand small { display:block; font-size:11px; font-weight:600; letter-spacing:.14em; text-transform:uppercase; color:var(--teal-400); margin-top:2px; }
.rail nav { margin-top:18px; display:flex; flex-direction:column; gap:3px; }
.nav-item {
  display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:var(--r-md);
  color:var(--slate-300); font-weight:500; font-size:14px; transition:background var(--t-fast),color var(--t-fast);
}
.nav-item .ico { width:20px; text-align:center; font-size:16px; opacity:.9; }
.nav-item:hover { background:#ffffff14; color:#fff; }
.nav-item.active { background:var(--teal-500); color:#fff; box-shadow:var(--sh-brand); }
.nav-item .badge { margin-left:auto; background:var(--amber); color:#3a2400; font-size:11px; font-weight:700; border-radius:var(--r-full); padding:1px 7px; }
.nav-item.active .badge { background:#fff; color:var(--teal-700); }
.rail .spacer { flex:1; }
.rail .me { display:flex; align-items:center; gap:10px; padding:10px; border-radius:var(--r-md); background:#ffffff10; }
.rail .me .av { width:34px; height:34px; border-radius:var(--r-full); background:linear-gradient(135deg,var(--teal-400),var(--teal-700)); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; }
.rail .me .who { font-size:13px; color:#fff; font-weight:600; line-height:1.2; }
.rail .me .who small { display:block; color:var(--slate-400); font-weight:400; font-size:11px; }

.main { margin-left:var(--rail-w); min-height:100vh; }
.topbar { display:none; }
.content { max-width:920px; margin:0 auto; padding:34px 28px 80px; }

/* bottom tabbar (mobile) */
.tabbar { display:none; }

/* ============================================================
   Status Home
   ============================================================ */
.context-chip {
  display:inline-flex; align-items:center; gap:8px; font-size:12px; font-weight:600;
  color:var(--teal-700); background:var(--teal-50); border:1px solid var(--teal-200);
  padding:5px 12px; border-radius:var(--r-full); letter-spacing:.01em;
}
.context-chip .dot { width:7px; height:7px; border-radius:var(--r-full); background:var(--teal-500); }
.context-chip b { color:var(--teal-800); }

.home-head { display:flex; align-items:flex-start; gap:26px; margin:18px 0 8px; flex-wrap:wrap; }
.home-head .hi { flex:1; min-width:240px; }
.home-head h1 { font-size:30px; margin:14px 0 6px; }
.home-head .sub { color:var(--fg-muted); font-size:15px; }
.home-head .sub b { color:var(--fg-strong); }

/* readiness ring */
.ring { width:118px; height:118px; flex:0 0 auto; position:relative; }
.ring svg { transform:rotate(-90deg); width:100%; height:100%; }
.ring .track { fill:none; stroke:var(--slate-200); stroke-width:11; }
.ring .arc { fill:none; stroke:url(#tg); stroke-width:11; stroke-linecap:round; transition:stroke-dashoffset 1s var(--ease); }
.ring .mid { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.ring .mid b { font-size:27px; font-weight:800; color:var(--fg-strong); letter-spacing:-.03em; }
.ring .mid small { font-size:11px; color:var(--fg-muted); font-weight:600; letter-spacing:.08em; text-transform:uppercase; }

/* card surface */
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--sh-1); }

/* journey */
.journey { margin-top:22px; padding:24px 26px; }
.journey > .lbl { font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--fg-subtle); margin-bottom:18px; }
.stage { display:flex; gap:16px; }
.stage .spine { display:flex; flex-direction:column; align-items:center; }
.stage .node { width:30px; height:30px; border-radius:var(--r-full); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; flex:0 0 auto; border:2px solid transparent; }
.stage .line { width:2px; flex:1; background:var(--slate-200); min-height:18px; margin:4px 0; }
.stage:last-child .line { display:none; }
.stage.done .node { background:var(--green); color:#fff; }
.stage.done .line { background:var(--green); opacity:.45; }
.stage.active .node { background:var(--teal-500); color:#fff; box-shadow:0 0 0 5px var(--teal-100); }
.stage.locked .node { background:var(--slate-100); color:var(--slate-400); }
.stage .body { flex:1; padding-bottom:22px; }
.stage .body h3 { font-size:16px; }
.stage.active .body h3 { color:var(--teal-700); }
.stage.locked .body h3 { color:var(--slate-400); }
.stage .body .meta { font-size:13px; color:var(--fg-muted); margin-top:2px; }

.reveal { animation:rise var(--t-slow) var(--ease) both; }
@keyframes rise { from{opacity:0; transform:translateY(8px)} to{opacity:1; transform:none} }

/* requirement card */
.req { display:flex; align-items:center; gap:14px; padding:15px 16px; border-radius:var(--r-md);
  border:1px solid var(--line); background:var(--surface); margin:11px 0; transition:transform var(--t-fast),box-shadow var(--t-fast),border-color var(--t-fast); }
.req .glyph { width:42px; height:42px; flex:0 0 auto; border-radius:var(--r-md); display:flex; align-items:center; justify-content:center; font-size:20px; background:var(--slate-50); }
.req .txt { flex:1; min-width:0; }
.req .txt h4 { font-size:15px; font-weight:600; color:var(--fg-strong); }
.req .txt .line2 { font-size:12.5px; color:var(--fg-muted); margin-top:3px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.req .who { color:var(--fg-subtle); }
.req .act { flex:0 0 auto; }
.req.actionable { cursor:pointer; }
.req.actionable:hover { transform:translateY(-2px); box-shadow:var(--sh-2); }
.req.is-action { border-color:var(--teal-300); background:linear-gradient(0deg,var(--teal-50),var(--surface)); }
.req.is-action .glyph { background:var(--teal-100); }
.req.is-expiring { border-color:#f3d6ab; background:linear-gradient(0deg,var(--amber-bg),var(--surface)); }
.req.is-expiring .glyph { background:var(--amber-bg); }
.req.settled { opacity:.92; }
.req.settled .glyph { background:var(--green-bg); }

.collapsed-row { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--fg-muted); padding:10px 4px 2px; cursor:pointer; user-select:none; }
.collapsed-row:hover { color:var(--fg); }
.settled-list { margin-top:6px; }

/* pills + buttons */
.pill { display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:700; padding:3px 10px; border-radius:var(--r-full); white-space:nowrap; }
.pill .d { width:6px; height:6px; border-radius:var(--r-full); }
.pill.blue { color:#0b6f93; background:var(--blue-bg); } .pill.blue .d{background:var(--blue);}
.pill.amber { color:#9a5a13; background:var(--amber-bg); } .pill.amber .d{background:var(--amber);}
.pill.green { color:#2c6e2f; background:var(--green-bg); } .pill.green .d{background:var(--green);}
.pill.red { color:#a3201d; background:var(--red-bg); } .pill.red .d{background:var(--red);}
.pill.slate { color:var(--fg-muted); background:var(--slate-100); } .pill.slate .d{background:var(--slate-400);}

.btn { display:inline-flex; align-items:center; gap:8px; border:none; font-weight:600; font-size:14px;
  padding:10px 18px; border-radius:var(--r-full); transition:transform var(--t-fast),background var(--t-fast),box-shadow var(--t-fast); }
.btn:active { transform:translateY(1px) scale(.99); }
.btn.primary { background:var(--cta); color:var(--cta-fg); box-shadow:var(--sh-brand); }
.btn.primary:hover { background:var(--cta-hover); }
.btn.ghost { background:transparent; color:var(--fg); border:1px solid var(--line-strong); }
.btn.ghost:hover { background:var(--slate-50); }
.btn.sm { padding:7px 14px; font-size:13px; }
.btn.amber { background:#fff; color:#9a5a13; border:1px solid #f3d6ab; box-shadow:none; }
.btn.amber:hover { background:var(--amber-bg); }
.btn.block { width:100%; justify-content:center; }
.btn:disabled { opacity:.45; cursor:not-allowed; box-shadow:none; }

/* ready banner */
.ready-banner { margin-top:22px; padding:22px 24px; border-radius:var(--r-lg);
  background:linear-gradient(120deg,var(--teal-600),var(--teal-800)); color:#fff; box-shadow:var(--sh-brand);
  display:flex; align-items:center; gap:16px; }
.ready-banner .big { font-size:30px; }
.ready-banner h3 { color:#fff; font-size:18px; }
.ready-banner p { margin:3px 0 0; color:var(--teal-100); font-size:14px; }

/* ============================================================
   Focused wizard (SEEK-inspired, CredEntry identity)
   ============================================================ */
.focus { min-height:100vh; display:flex; flex-direction:column; background:var(--surface); }
.focus-top { display:flex; align-items:center; gap:14px; padding:16px 22px; border-bottom:1px solid var(--line); }
.focus-top .back { display:inline-flex; align-items:center; gap:6px; color:var(--fg-muted); font-weight:500; font-size:14px; background:none; border:none; }
.focus-top .back:hover { color:var(--fg); }
.focus-top .title { margin-left:auto; font-size:13px; color:var(--fg-subtle); font-weight:600; letter-spacing:.02em; }
.focus-top .brand { font-weight:800; letter-spacing:-.03em; color:var(--fg-strong); font-size:16px; }
.focus-top .brand span { color:var(--teal-500); }

.focus-body { flex:1; display:flex; justify-content:center; padding:40px 22px; }
.focus-inner { width:100%; max-width:480px; animation:swap var(--t) var(--ease); }
@keyframes swap { from{opacity:0; transform:translateY(10px)} to{opacity:1; transform:none} }
.focus-inner .step-kicker { font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--teal-600); }
.focus-inner h2 { font-size:23px; margin:10px 0 6px; }
.focus-inner .lead { color:var(--fg-muted); font-size:15px; margin-bottom:22px; }

/* selectable options */
.choice { display:flex; align-items:center; gap:14px; width:100%; text-align:left; padding:15px 16px; margin:10px 0;
  border:1.5px solid var(--line); border-radius:var(--r-md); background:var(--surface); transition:border-color var(--t-fast),background var(--t-fast),transform var(--t-fast); }
.choice:hover { border-color:var(--teal-300); transform:translateY(-1px); }
.choice.sel { border-color:var(--teal-500); background:var(--teal-50); }
.choice .radio { width:20px; height:20px; border-radius:var(--r-full); border:2px solid var(--slate-300); flex:0 0 auto; display:flex; align-items:center; justify-content:center; }
.choice.sel .radio { border-color:var(--teal-500); }
.choice.sel .radio::after { content:""; width:10px; height:10px; border-radius:var(--r-full); background:var(--teal-500); }
.choice .ic { font-size:20px; } .choice .lab { font-weight:600; color:var(--fg-strong); } .choice .lab small{ display:block; font-weight:400; color:var(--fg-muted); font-size:12.5px; }

.field { margin:14px 0; }
.field label { display:block; font-size:13px; font-weight:600; color:var(--fg-strong); margin-bottom:6px; }
.field input { width:100%; padding:12px 14px; border:1.5px solid var(--line-strong); border-radius:var(--r-md); font-size:15px; font-family:inherit; color:var(--fg-strong); background:var(--surface); transition:border-color var(--t-fast); }
.field input:focus { outline:none; border-color:var(--teal-500); }

/* dropzone (simulated upload) */
.drop { border:2px dashed var(--slate-300); border-radius:var(--r-lg); padding:30px 20px; text-align:center; cursor:pointer; transition:border-color var(--t-fast),background var(--t-fast); background:var(--slate-50); }
.drop:hover { border-color:var(--teal-400); background:var(--teal-50); }
.drop .dico { font-size:34px; }
.drop h4 { margin:8px 0 2px; font-size:15px; }
.drop p { color:var(--fg-muted); font-size:13px; margin:0; }
.drop.filled { border-style:solid; border-color:var(--green); background:var(--green-bg); cursor:default; }
.drop.filled .dico { color:var(--green); }

/* selfie sim */
.selfie { width:170px; height:170px; border-radius:var(--r-full); margin:6px auto 4px; border:3px solid var(--teal-200);
  background:radial-gradient(circle at 50% 38%,var(--teal-50),var(--slate-100)); display:flex; align-items:center; justify-content:center; font-size:60px; position:relative; overflow:hidden; }
.selfie.scan::after { content:""; position:absolute; left:0; right:0; height:36px; background:linear-gradient(var(--teal-300),transparent); animation:scan 1.4s var(--ease) infinite; }
@keyframes scan { 0%{top:-36px} 100%{top:170px} }
.selfie.done { border-color:var(--green); background:var(--green-bg); }

/* review list */
.review { border:1px solid var(--line); border-radius:var(--r-md); overflow:hidden; }
.review .row { display:flex; justify-content:space-between; gap:12px; padding:12px 15px; font-size:14px; border-bottom:1px solid var(--line); }
.review .row:last-child { border-bottom:none; }
.review .row span { color:var(--fg-muted); } .review .row b { color:var(--fg-strong); font-weight:600; }

.escape { display:inline-flex; align-items:center; gap:7px; margin-top:16px; font-size:13px; color:var(--fg-muted); text-decoration:underline; text-underline-offset:3px; background:none; border:none; }
.escape:hover { color:var(--fg); }

/* done */
.done-wrap { text-align:center; padding:14px 0; }
.done-check { width:84px; height:84px; border-radius:var(--r-full); background:var(--green-bg); color:var(--green); display:flex; align-items:center; justify-content:center; font-size:42px; margin:0 auto 18px; animation:pop var(--t-slow) var(--ease); }
@keyframes pop { 0%{transform:scale(.4); opacity:0} 60%{transform:scale(1.08)} 100%{transform:scale(1); opacity:1} }

/* wizard footer + progress */
.focus-foot { border-top:1px solid var(--line); padding:16px 22px; }
.focus-foot .pinfo { display:flex; justify-content:space-between; font-size:12px; color:var(--fg-muted); margin-bottom:8px; }
.pbar { height:7px; border-radius:var(--r-full); background:var(--slate-200); overflow:hidden; }
.pbar span { display:block; height:100%; border-radius:var(--r-full); background:linear-gradient(90deg,var(--teal-400),var(--teal-600)); transition:width var(--t-slow) var(--ease); }
.foot-actions { display:flex; align-items:center; gap:14px; margin-top:14px; }
.foot-actions .hint { font-size:12px; color:var(--fg-subtle); }
.foot-actions .grow { flex:1; }

/* ============================================================
   Stub pages
   ============================================================ */
.page-head { margin-bottom:18px; }
.page-head h1 { font-size:26px; }
.page-head p { color:var(--fg-muted); margin:6px 0 0; }
.lib-item { display:flex; align-items:center; gap:14px; padding:15px 16px; }
.lib-item + .lib-item { border-top:1px solid var(--line); }
.stub-note { display:flex; gap:12px; align-items:center; padding:14px 16px; margin-top:18px; border-radius:var(--r-md); background:var(--teal-50); border:1px dashed var(--teal-300); color:var(--teal-800); font-size:13.5px; }

.peak { display:flex; align-items:center; gap:14px; padding:16px; }
.peak + .peak { border-top:1px solid var(--line); }
.peak .logo { width:44px; height:44px; border-radius:var(--r-md); background:var(--slate-900); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; }
.peak .grow { flex:1; }
.mini-bar { height:6px; border-radius:var(--r-full); background:var(--slate-200); overflow:hidden; width:120px; margin-top:6px; }
.mini-bar span { display:block; height:100%; background:var(--teal-500); border-radius:var(--r-full); }

/* ============================================================
   Responsive — phone / native feel
   ============================================================ */
@media (max-width:820px) {
  .rail { display:none; }
  .main { margin-left:0; padding-bottom:74px; }
  .content { padding:18px 16px 40px; }
  .topbar { display:flex; align-items:center; gap:10px; padding:14px 16px; position:sticky; top:0; background:#f2f5f8ee; backdrop-filter:blur(8px); z-index:15; border-bottom:1px solid var(--line); }
  .topbar .brand { font-size:18px; font-weight:800; letter-spacing:-.03em; color:var(--fg-strong); }
  .topbar .brand span { color:var(--teal-500); }
  .topbar .me { margin-left:auto; width:32px; height:32px; border-radius:var(--r-full); background:linear-gradient(135deg,var(--teal-400),var(--teal-700)); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:12px; }
  .home-head h1 { font-size:25px; }

  .tabbar { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:20; background:#fff;
    border-top:1px solid var(--line); padding:7px 6px calc(7px + env(safe-area-inset-bottom)); box-shadow:0 -6px 20px #37424a14; }
  .tab { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; padding:4px; color:var(--fg-subtle); font-size:10.5px; font-weight:600; position:relative; }
  .tab .ti { font-size:19px; }
  .tab.active { color:var(--teal-600); }
  .tab .dot { position:absolute; top:2px; right:50%; transform:translateX(16px); width:8px; height:8px; border-radius:var(--r-full); background:var(--amber); border:2px solid #fff; }

  .focus-body { padding:26px 18px; }
  .focus-inner h2 { font-size:21px; }
}
@media (min-width:821px) { .topbar { display:none; } }
