/* Localhost: BMC Brand tokens and shared components. One look only (no dark mode). */
@font-face { font-family: Figtree; font-weight: 300; font-display: swap; src: url(fonts/figtree-latin-300-normal.woff2) format('woff2'); }
@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(fonts/figtree-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(fonts/figtree-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(fonts/figtree-latin-700-normal.woff2) format('woff2'); }

:root {
  --bg-page: #f7f8fd; --surface: #ffffff; --surface-sunken: #eef1f6; --line: #d7dbe0;
  --ink: #052140; --ink-secondary: #33475e; --ink-muted: #55687d; --input-border: #7d8b9a;
  --header-bg: #052140; --header-bg-end: #264580; --header-ink: #ffffff; --header-ink-muted: #c0c8cf;
  --primary: #264580; --primary-soft: #edfbff; --cta: #ff5a4d; --on-cta: #052140; --cta-ink: #e04a3e;
  --toggle-on: #4040d9; --lilac: #758ce5; --done-bg: #264580;
  --warning-bg: #eef0fc; --warning-line: #c9d1f4; --warning-ink: #914796;
  --danger: #b8382d; --danger-bg: #ffe9e7; --focus: #4040d9;
  --tile-bg: #edfbff; --tile-ring: #cfe9f5; --tile-ink: #264580;
  --shadow-card: 0 1px 2px rgba(5,33,64,.06), 0 6px 18px rgba(5,33,64,.06);
  --r: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Sofia Pro", Figtree, "Segoe UI", system-ui, sans-serif; font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg-page); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); } a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { color: var(--ink); font-weight: 600; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 24px; } h2 { font-size: 15px; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface); }
.sr:focus { position: fixed; left: 8px; top: 8px; width: auto; height: auto; clip-path: none; z-index: 100; background: #fff; color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ic { display: block; flex: none; }
.muted { color: var(--ink-muted); }
.small { font-size: 12.5px; }
[hidden] { display: none !important; }

/* ---------- app frame ---------- */
#app { min-height: 100%; display: flex; flex-direction: column; }
.hdr { flex: 0 0 60px; display: flex; align-items: center; gap: 16px; padding: 0 22px; background: linear-gradient(90deg, var(--header-bg), var(--header-bg-end)); color: var(--header-ink); position: sticky; top: 0; z-index: 20; }
.hdr-left { display: flex; align-items: center; gap: 16px; flex: 1 0 auto; }
.hdr-div { width: 1px; height: 24px; background: rgba(255,255,255,.3); }
.crumb { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.crumb a { color: #fff; text-decoration: none; font-size: 17px; font-weight: 600; }
.crumb .sep { color: var(--header-ink-muted); }
.crumb .here { font-size: 17px; font-weight: 300; }
.hs { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); border-radius: 999px; padding: 0 14px; height: 36px; color: var(--header-ink-muted); flex: 0 1 320px; min-width: 170px; }
.hs input { border: 0; background: transparent; color: #fff; padding: 0; width: 100%; font: inherit; font-size: 13.5px; outline: none; }
.hs input::placeholder { color: var(--header-ink-muted); }
.hs:focus-within { box-shadow: inset 0 0 0 2px #fff; }
.hk { font-size: 11.5px; border: 1px solid rgba(255,255,255,.3); border-radius: 5px; padding: 0 5px; white-space: nowrap; }
.hdr-right { display: flex; align-items: center; gap: 12px; flex: 1 0 auto; justify-content: flex-end; }
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--header-ink-muted); white-space: nowrap; }
.stc { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 5px 12px; white-space: nowrap; border: 0; cursor: pointer; }
.stc.access { background: var(--cta); color: var(--on-cta); }
.stc.conflict { background: #fff; color: var(--ink); }
.stc.readonly { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.stc.netfail { background: var(--danger); color: #fff; }
.st-div { width: 1px; height: 18px; background: rgba(255,255,255,.25); }
.spin { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }

.frame { flex: 1; display: flex; min-height: 0; }
.nav { flex: 0 0 220px; padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 8px; color: var(--ink-secondary); text-decoration: none; font-weight: 600; min-height: 40px; }
.nav a:hover { background: var(--bg-page); color: var(--ink); }
.nav a.on { background: var(--primary-soft); color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 1px #cfe9f5; }
.nav a .ni { display: flex; gap: 10px; align-items: center; }
.nav a .ni svg { color: var(--ink-muted); } .nav a.on .ni svg { color: var(--tile-ink); }
.nav .grp { display: flex; align-items: center; gap: 10px; padding: 16px 12px 8px; border-top: 1px solid var(--line); margin-top: 8px; font-weight: 700; font-size: 15px; }
.nav .soon { font-size: 11px; font-weight: 600; color: var(--ink-muted); }
.nav .spacer { flex: 1; }
main { flex: 1; min-width: 0; }
.page { padding: 24px 32px 40px; display: flex; flex-direction: column; gap: 16px; max-width: 960px; }
.page.wide { max-width: 1180px; margin: 0 auto; width: 100%; }

/* ---------- components ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-card); }
.sec { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.sec-h { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.sec-h h2 { display: flex; align-items: center; gap: 10px; }
.tile { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--tile-bg); color: var(--tile-ink); box-shadow: inset 0 0 0 1px var(--tile-ring); }
.tile.d { background: var(--danger-bg); color: var(--danger); box-shadow: inset 0 0 0 1px #f6c9c3; }
.tool { display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 4px 12px rgba(5,33,64,.18); }
.tool-new { border: 1.5px dashed var(--input-border); color: var(--ink-muted); box-shadow: none; }
.lbl { font-size: 11.5px; font-weight: 700; color: var(--ink-secondary); text-transform: uppercase; letter-spacing: .06em; }
.btn { font: inherit; font-size: 13px; font-weight: 700; min-height: 36px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--input-border); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { background: var(--bg-page); }
.btn-p { background: var(--cta); border-color: var(--cta); color: var(--on-cta); }
.btn-p:hover { background: #ff7468; }
.btn-d { color: var(--danger); border-color: #e7b3ad; }
.btn-s { min-height: 30px; padding: 3px 10px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input, select, textarea { font: inherit; font-size: 13.5px; color: var(--ink); border: 1px solid var(--input-border); border-radius: 6px; padding: 7px 10px; background: #fff; min-height: 36px; }
label.fld { display: flex; flex-direction: column; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-sunken); color: var(--ink-secondary); }
.pill.blue { background: #e3e8ff; color: var(--ink); }
.pill.done { background: var(--done-bg); color: #fff; }
.pill.wait { background: var(--warning-bg); color: var(--warning-ink); box-shadow: inset 0 0 0 1px var(--warning-line); }
.pill.red { background: var(--danger-bg); color: var(--danger); }
.pill button { border: 0; background: none; padding: 0; color: inherit; cursor: pointer; display: inline-flex; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.kv { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px 12px; align-items: baseline; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; align-items: start; }
.note { background: var(--primary-soft); border: 1px solid var(--tile-ring); border-radius: 10px; padding: 10px 14px; display: flex; gap: 10px; align-items: flex-start; }
.note.warn { background: var(--danger-bg); border-color: #f6c9c3; }

#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 13px; box-shadow: 0 8px 24px rgba(5,33,64,.25); }
.toast-act { background: none; border: 0; color: #fff; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

.dlg { border: 0; border-radius: 14px; padding: 0; width: min(480px, 92vw); box-shadow: 0 20px 60px rgba(5,33,64,.3); color: var(--ink); }
.dlg.wide { width: min(720px, 94vw); }
.dlg::backdrop { background: rgba(5,33,64,.45); }
.dlg form { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.dlg h2 { font-size: 18px; }
.dlg-body { display: flex; flex-direction: column; gap: 12px; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.update { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 340px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.update ul { margin: 0; padding-left: 18px; }

/* ---------- home ---------- */
.hero { border-radius: 24px; padding: 30px 36px 32px; display: flex; flex-direction: column; gap: 14px; min-height: 220px; justify-content: space-between; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255,90,77,.38) 0%, rgba(255,90,77,0) 45%), radial-gradient(90% 120% at 0% 100%, rgba(117,140,229,.35) 0%, rgba(117,140,229,0) 55%), linear-gradient(120deg, #052140 0%, #0b2b57 55%, #264580 100%); }
.hero h1 { color: #fff; font-size: 40px; line-height: 44px; }
.hero p { margin: 0; font-size: 18px; font-weight: 300; color: var(--header-ink-muted); }
.hchip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); color: #fff; text-decoration: none; font-weight: 600; font-size: 13.5px; }
.hchip:hover { color: #fff; background: rgba(255,255,255,.18); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 16px; }
.tcard { padding: 20px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
a.tcard:hover { border-color: var(--input-border); color: var(--ink); }
.tcard.next { border-style: dashed; box-shadow: none; background: transparent; }
.tcard .tname { font-size: 18px; font-weight: 600; }
.foot { display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--ink-muted); border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- setup ---------- */
.setup { padding: 32px; display: flex; flex-wrap: wrap; gap: 32px; justify-content: center; align-items: stretch; max-width: 1180px; margin: 0 auto; width: 100%; }
.brand-panel { flex: 1 1 380px; min-height: 540px; border-radius: 24px; padding: 36px; color: #fff; display: flex; flex-direction: column; gap: 14px;
  background: radial-gradient(80% 60% at 85% 85%, rgba(255,90,77,.45) 0%, rgba(255,90,77,0) 60%), radial-gradient(70% 70% at 10% 10%, rgba(117,140,229,.35) 0%, rgba(117,140,229,0) 60%), linear-gradient(160deg, #052140 0%, #0b2b57 60%, #264580 100%); }
.brand-panel .big { font-size: 40px; line-height: 44px; font-weight: 600; letter-spacing: -.02em; max-width: 12ch; }
.brand-panel .sub { font-size: 18px; font-weight: 300; color: var(--header-ink-muted); max-width: 30ch; }
.setup-form { flex: 1 1 420px; max-width: 520px; padding: 32px; display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.step { display: flex; flex-direction: column; gap: 8px; }

/* ---------- small screens / phones ---------- */
.phone { max-width: 440px; margin: 0 auto; padding: 28px 20px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 760px) {
  .hs, .hdr-right .st-net-label { display: none; }
  .nav { display: none; }
  .page { padding: 20px 16px; }
  .hero h1 { font-size: 30px; line-height: 34px; }
}
