/* NSOS base styles. Colours and fonts are tokens; themes/<key>.json overrides them at runtime. */
:root {
  --bg:#f4f5f6; --surface:#ffffff; --ink:#1b2328; --muted:#5d6a72; --line:#d9dee2; --band:#eceff1;
  --accent:#2f5d7c; --accent-soft:#dde8ef; --alert:#b4413c; --alert-soft:#f6e0de;
  --ok:#2f7d4f; --ok-soft:#dff0e5; --warn:#a86a12; --warn-soft:#f6ead6;
  --display:"Segoe UI", system-ui, sans-serif;
  --body:"Segoe UI", system-ui, sans-serif;
  --mono:ui-monospace, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font:15px/1.5 var(--body); }
h1, h2, h3 { font-family:var(--display); line-height:1.2; margin:0 0 .5em; }
h1 { font-size:1.6rem; } h2 { font-size:1.2rem; } h3 { font-size:1rem; }
a { color:var(--accent); }
.muted { color:var(--muted); }
.small { font-size:.85rem; }
code, .mono { font-family:var(--mono); font-size:.88em; }

.topbar { display:flex; gap:16px; align-items:center; padding:10px 16px; background:var(--surface);
  border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; flex-wrap:wrap; }
.brand { font-family:var(--display); font-weight:700; text-decoration:none; color:var(--ink); }
.topbar nav { display:flex; gap:4px; flex-wrap:wrap; flex:1; }
.topbar nav a { padding:6px 10px; border-radius:6px; text-decoration:none; color:var(--muted); }
.topbar nav a.on { background:var(--accent-soft); color:var(--accent); }
.who { display:flex; gap:8px; align-items:center; font-size:.9rem; color:var(--muted); }

.view { max-width:1200px; margin:0 auto; padding:24px 16px 64px; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:20px; margin-bottom:16px; }
.narrow { max-width:420px; margin:48px auto; }

label { display:block; font-weight:600; margin:12px 0 4px; }
input[type=text], input[type=email], input[type=password], input:not([type]), select {
  width:100%; padding:9px 10px; border:1px solid var(--line); border-radius:6px; background:var(--surface);
  color:var(--ink); font:inherit; }
input.code { font-family:var(--mono); font-size:1.4rem; letter-spacing:.3em; text-align:center; }
button { font:inherit; padding:9px 14px; border-radius:6px; border:1px solid var(--accent); background:var(--accent);
  color:#fff; cursor:pointer; }
button.ghost { background:transparent; color:var(--accent); }
button.danger { background:var(--alert); border-color:var(--alert); }
button:disabled { opacity:.5; cursor:default; }
.actions { display:flex; gap:8px; margin-top:16px; flex-wrap:wrap; }
.check { display:flex; gap:8px; align-items:center; font-weight:400; }
.err { color:var(--alert); margin-top:10px; }
.qr { display:block; width:200px; height:200px; margin:12px auto; background:#fff; padding:8px; border-radius:8px; }
.secret { word-break:break-all; background:var(--band); padding:8px; border-radius:6px; }

.chip { display:inline-block; font-size:.72rem; padding:1px 7px; border-radius:99px; background:var(--band);
  color:var(--muted); white-space:nowrap; vertical-align:middle; }
.chip.restricted { background:var(--warn-soft); color:var(--warn); }
.chip.cohort_only { background:var(--accent-soft); color:var(--accent); }
.chip.suspended, .chip.none { background:var(--alert-soft); color:var(--alert); }
.chip.lv { background:var(--ok-soft); color:var(--ok); }

.tree { list-style:none; padding:0; margin:0; }
.tree > li { padding:10px 0; border-top:1px solid var(--line); }
.tree ul { list-style:none; padding-left:18px; margin:6px 0 0; }
.tree ul li { padding:3px 0; }
.tree .off { color:var(--muted); text-decoration:line-through; }

.grid-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
table.grid { border-collapse:separate; border-spacing:0; font-size:.85rem; }
table.grid th, table.grid td { padding:6px 8px; border-bottom:1px solid var(--line); border-right:1px solid var(--line);
  vertical-align:top; min-width:120px; }
table.grid thead th { background:var(--band); text-align:left; position:sticky; top:0; }
table.grid th.sec { font-weight:400; }
table.grid tbody th { text-align:left; }
table.grid tbody th .muted { font-weight:400; }
table.grid .sticky { position:sticky; left:0; background:var(--surface); z-index:2; min-width:220px; }
table.grid thead .sticky { background:var(--band); z-index:3; }
table.grid select { padding:4px; font-size:.85rem; }
table.grid .eff { margin-top:3px; }
.member-ctl { display:flex; gap:6px; flex-wrap:wrap; align-items:center; margin-top:6px; }
.member-ctl select { width:auto; padding:3px; font-size:.8rem; }
.member-ctl.inline { display:inline-flex; margin:0 0 0 6px; }
.w-name { max-width:320px; }
.gap-top { margin-top:16px; }
.member-ctl label { margin:0; font-weight:400; font-size:.8rem; display:flex; gap:4px; align-items:center; }

table.list { width:100%; border-collapse:collapse; font-size:.9rem; }
table.list th, table.list td { text-align:left; padding:8px; border-bottom:1px solid var(--line); vertical-align:top; }
table.list td.when { white-space:nowrap; color:var(--muted); }

.banner { background:var(--warn-soft); color:var(--warn); padding:8px 12px; border-radius:8px; margin-bottom:16px; }
.toast { position:fixed; bottom:16px; left:50%; transform:translateX(-50%); background:var(--ink); color:var(--bg);
  padding:10px 16px; border-radius:8px; max-width:90vw; z-index:10; }
.toast.bad { background:var(--alert); color:#fff; }
pre.cmd { background:var(--band); padding:12px; border-radius:8px; white-space:pre-wrap; word-break:break-all;
  font-family:var(--mono); font-size:.85rem; }

@media (max-width: 640px) {
  .view { padding:16px 16px 48px; }
  .narrow { margin:16px auto; }
}
