/* Hallmesh dashboard. Same design tokens as the Windows app (app/ui/shared/base.css). */
:root {
  --brand: #5746d9; --brand-hover: #4a3ac4; --on-brand: #fff; --brand-soft: #eeebff; --brand-text: #4335b0;
  --bg: #f5f5f8; --surface: #fff; --surface-2: #eeeef2;
  --text: #16161a; --text-2: #5a5a66; --text-3: #8b8b97;
  --border: rgba(0, 0, 0, 0.09); --border-strong: rgba(0, 0, 0, 0.17);
  --ok: #14805a; --ok-fill: #1da571; --warn: #a2660a; --danger: #bf3329; --danger-soft: #fdeceb;
  --radius: 8px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", ui-monospace, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #6f60ee; --brand-hover: #8172f3; --brand-soft: #2a2552; --brand-text: #b9b0ff;
    --bg: #17171b; --surface: #202026; --surface-2: #2a2a32;
    --text: #f2f2f5; --text-2: #a8a8b4; --text-3: #777784;
    --border: rgba(255, 255, 255, 0.09); --border-strong: rgba(255, 255, 255, 0.19);
    --ok: #4ccb98; --ok-fill: #24a672; --warn: #e0a544; --danger: #f27b70; --danger-soft: #3a1f1d;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); min-height: 100vh; }
h1, h2, p { margin: 0; }
h1 { font: 600 24px/1.25 var(--font-display); letter-spacing: -0.01em; }
h2 { font: 600 16px/1.3 var(--font-display); }
a { color: var(--brand-text); }
[hidden] { display: none !important; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mark { display: block; flex: none; border-radius: 22%; }

/* ---- top bar ---- */
.top { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.top .brand { display: flex; align-items: center; gap: 9px; font: 600 16px var(--font-display); color: var(--text); text-decoration: none; margin-right: 12px; }
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.nav a { padding: 6px 12px; border-radius: 6px; color: var(--text-2); text-decoration: none; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-text); }
.top select { max-width: 200px; }
.who { color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }

main { max-width: 860px; margin: 0 auto; padding: 28px 20px 60px; }
main.narrow { max-width: 440px; padding-top: 56px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section { margin-top: 32px; }
.section > h2 { margin-bottom: 10px; }
.hero { margin-bottom: 20px; }
h1 + p { margin-top: 6px; }

/* ---- cards and rows ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.card.pad { padding: 18px 20px; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--border); min-width: 0; }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .actions { display: flex; gap: 6px; flex: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.on { background: var(--ok-fill); }
.empty { padding: 30px 20px; text-align: center; color: var(--text-2); }
.empty h2 { color: var(--text); margin-bottom: 4px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }

/* ---- controls ---- */
button, input, select { font: inherit; }
.btn { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: transparent; color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-hover); }
.btn.danger { color: var(--danger); }
.btn.big { height: 42px; width: 100%; font-size: 15px; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn[disabled], .btn.busy { opacity: 0.6; pointer-events: none; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--brand-text); font-weight: 500; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
label.field { display: block; font-size: 13px; color: var(--text-2); margin: 14px 0 5px; }
input[type="text"], input[type="email"], select { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); }
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
input.code { font: 600 24px var(--mono); letter-spacing: 0.3em; text-align: center; height: 52px; }
.inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline > .grow { flex: 1; min-width: 180px; }
.inline select { width: auto; }
.stack > * + * { margin-top: 10px; }
.error { color: var(--danger); font-size: 13px; margin-top: 8px; }
.note { padding: 11px 14px; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand-text); font-size: 14px; }
.note.bad { background: var(--danger-soft); color: var(--danger); }
.note.warn { background: var(--surface-2); color: var(--text-2); }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.codebox { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius); font: 12.5px/1.4 var(--mono); word-break: break-all; margin-top: 12px; }
.codebox span { flex: 1; user-select: all; }
ol.steps { margin: 0; padding-left: 20px; }
ol.steps li { margin: 6px 0; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 8px 16px; border-radius: 18px; background: var(--text); color: var(--bg); font-size: 13px; white-space: nowrap; z-index: 10; }
.center { text-align: center; }
.spacer { height: 16px; }
@media (max-width: 560px) {
  .top { padding: 10px 14px; }
  .who { display: none; }
  .row { flex-wrap: wrap; }
  .row .actions { width: 100%; justify-content: flex-end; }
  main { padding: 20px 14px 48px; }
}
