/* FWORLD — people console. One accent, neutral surfaces, no decoration for its own sake. */

@font-face {
  font-family: 'Inter var';
  src: url('/assets/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'Grotesk var';
  src: url('/assets/fonts/grotesk.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
  font-style: normal;
}

:root {
  --accent: #7b6cff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(123, 108, 255, 0.14);
  --accent-line: rgba(123, 108, 255, 0.34);

  --bg: #0a0a0d;
  --surface: #121218;
  --surface-2: #17171f;
  --raise: #1c1c26;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --ink: #f2f2f5;
  --ink-2: #b4b4c0;
  --muted: #7c7c8a;
  --hover: rgba(255, 255, 255, 0.045);

  --good: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 44px -28px rgba(0, 0, 0, 0.9);
  --shadow-pop: 0 24px 60px -24px rgba(0, 0, 0, 0.85);

  --sans: 'Inter var', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Grotesk var', 'Inter var', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: dark;
}

:root[data-theme='light'] {
  --accent: #5b4bef;
  --accent-soft: rgba(91, 75, 239, 0.1);
  --accent-line: rgba(91, 75, 239, 0.28);

  --bg: #f6f6f9;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --raise: #ffffff;
  --line: rgba(15, 15, 25, 0.09);
  --line-strong: rgba(15, 15, 25, 0.18);
  --ink: #14141b;
  --ink-2: #4a4a58;
  --muted: #7a7a88;
  --hover: rgba(15, 15, 25, 0.04);

  --good: #16a34a;
  --warn: #c2820b;
  --bad: #dc2626;

  --shadow: 0 14px 34px -26px rgba(15, 15, 30, 0.45);
  --shadow-pop: 0 24px 50px -22px rgba(15, 15, 30, 0.3);

  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

::selection { background: var(--accent-soft); }

/* ───────── layout ───────── */

.app { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px;
  padding: 18px 12px; border-right: 1px solid var(--line); background: var(--surface);
}

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
.brand img { width: 30px; height: 30px; display: block; }
.brand-name { font-family: var(--display); font-weight: 700; letter-spacing: 0.15em; font-size: 14px; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }

.nav-link {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: var(--radius-sm); color: var(--ink-2); font-size: 13.5px; font-weight: 500;
  transition: background .14s, color .14s;
}
.nav-link:hover { background: var(--hover); color: var(--ink); }
.nav-link.active { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.nav-link.active::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 2.5px;
  border-radius: 0 3px 3px 0; background: var(--accent);
}
.nav-link svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.nav-link.active svg { opacity: 1; color: var(--accent); }

.nav-count {
  margin-left: auto; min-width: 19px; text-align: center; font-size: 11px; font-weight: 700;
  padding: 2px 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}

.nav-section {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  padding: 18px 10px 6px; font-weight: 600;
}

.sidebar-foot { margin-top: auto; padding-top: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
}

.searchbox { position: relative; flex: 1; max-width: 420px; }
.searchbox button {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 11px; cursor: pointer;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 13.5px; text-align: left; transition: border-color .14s;
}
.searchbox button:hover { border-color: var(--line-strong); }
.searchbox svg { width: 15px; height: 15px; flex: none; }
.searchbox kbd {
  margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px;
}

.view { padding: 22px; max-width: 1460px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 24px; margin: 0; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 5px; }

/* ───────── primitives ───────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; font-size: 13px; font-weight: 550; transition: border-color .14s, background .14s, opacity .14s;
}
.btn:hover { border-color: var(--line-strong); background: var(--hover); }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn.tiny { padding: 5px 9px; font-size: 12px; border-radius: 8px; }
.btn.icon { padding: 7px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.card.pad-sm { padding: 14px; }
.card.flat { background: transparent; }
.card-title {
  font-family: var(--sans); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px; font-weight: 600;
}

.grid { display: grid; gap: 12px; }
.grid.kpi { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }

.kpi-value { font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.kpi-delta { font-size: 12px; font-weight: 600; margin-top: 9px; color: var(--accent); }
.kpi-delta.flat { color: var(--muted); font-weight: 500; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 7px;
  font-size: 11.5px; font-weight: 550; border: 1px solid var(--line); color: var(--ink-2);
  background: var(--surface-2); white-space: nowrap;
}
.chip.accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.chip.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 30%, transparent); background: color-mix(in srgb, var(--good) 10%, transparent); }
.chip.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.chip.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }

.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.online { background: var(--good); }
.dot.stopped { background: var(--bad); }

.muted { color: var(--muted); }
.dim { color: var(--ink-2); }
.mono { font-family: var(--mono); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────── custom controls ───────── */

.field-label { font-size: 12px; color: var(--muted); font-weight: 550; }

.select { position: relative; display: inline-block; }
.select > button {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; cursor: pointer;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; min-width: 0; transition: border-color .14s;
}
.select > button:hover { border-color: var(--line-strong); }
.select > button .caret { margin-left: auto; opacity: .55; width: 13px; height: 13px; }
.select.open > button { border-color: var(--accent-line); }

.pop {
  position: fixed; z-index: 90; min-width: 180px; max-height: 320px; overflow-y: auto;
  background: var(--raise); border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: var(--shadow-pop); padding: 5px; animation: pop .12s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }

.pop-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px;
  cursor: pointer; font-size: 13px; white-space: nowrap;
}
.pop-item:hover, .pop-item.active { background: var(--hover); }
.pop-item.selected { color: var(--accent); font-weight: 600; }
.pop-item svg { width: 15px; height: 15px; opacity: .8; }
.pop-item .check { margin-left: auto; opacity: 0; color: var(--accent); }
.pop-item.selected .check { opacity: 1; }
.pop-sep { height: 1px; background: var(--line); margin: 5px 2px; }
.pop-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 7px 10px 4px; font-weight: 600; }
.pop-item.danger { color: var(--bad); }

.input {
  padding: 8px 11px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); outline: none; font-size: 13px; width: 100%;
  transition: border-color .14s, box-shadow .14s;
}
.input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--muted); }

textarea.input { min-height: 78px; resize: vertical; line-height: 1.55; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.seg button { border: none; background: none; padding: 6px 12px; cursor: pointer; font-size: 12.5px; color: var(--muted); font-weight: 550; }
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--accent-soft); color: var(--accent); }

.switch { position: relative; width: 40px; height: 23px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-strong); transition: background .16s; pointer-events: none; }
.switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%;
  background: #fff; transition: transform .16s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(17px); }

.checkbox {
  width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; cursor: pointer; flex: none; background: var(--surface);
}
.checkbox.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.checkbox svg { width: 11px; height: 11px; opacity: 0; }
.checkbox.on svg { opacity: 1; }

/* ───────── project cards ───────── */

.project-card {
  position: relative; display: block; cursor: pointer; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px; transition: border-color .16s, transform .16s;
}
.project-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.project-card .pc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.project-card .pc-name { font-weight: 600; font-size: 14px; }
.project-card .pc-tag { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.project-card .pc-total { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.project-card .pc-stats { display: flex; gap: 12px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.project-card .pc-spark { margin-top: 12px; height: 30px; }
.project-card .badge-new {
  position: absolute; top: 13px; right: 13px; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px;
}

/* ───────── table ───────── */

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }

/* No overflow clipping here: it would trap the sticky header inside the box and
   let rows slide over it. The corners are rounded on the cells instead. */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.people thead tr:first-child th:first-child { border-top-left-radius: var(--radius); }
table.people thead tr:first-child th:last-child { border-top-right-radius: var(--radius); }
table.people tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius); }
table.people tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius); }
table.people { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.people th {
  text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  padding: 11px 14px; border-bottom: 1px solid var(--line); font-weight: 600;
  position: sticky; top: 52px; background: var(--surface); z-index: 5;
}
table.people td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.people tr:last-child td { border-bottom: none; }
table.people tbody tr { cursor: pointer; transition: background .12s; }
table.people tbody tr:hover { background: var(--hover); }
table.people tbody tr.is-new td:first-child { box-shadow: inset 2.5px 0 0 var(--accent); }
table.people tbody tr.selected { background: var(--accent-soft); }
.dense table.people td { padding: 5px 14px; }
.dense table.people th { padding: 8px 14px; }

.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 30px; height: 30px; border-radius: 9px; object-fit: cover; flex: none; background: var(--surface-2);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 650; color: var(--ink-2);
  border: 1px solid var(--line); overflow: hidden;
}
.avatar.lg { width: 52px; height: 52px; border-radius: 15px; font-size: 18px; }
.who-name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.who-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }

.pager { display: flex; align-items: center; gap: 9px; justify-content: flex-end; padding: 13px 2px 0; font-size: 13px; color: var(--muted); }

.empty { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty svg { width: 34px; height: 34px; opacity: .35; margin-bottom: 12px; }

.skeleton {
  background: linear-gradient(90deg, var(--hover), var(--line), var(--hover));
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 8px; height: 14px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.bulkbar {
  position: sticky; bottom: 14px; z-index: 20; display: flex; align-items: center; gap: 9px;
  background: var(--raise); border: 1px solid var(--line-strong); border-radius: 99px;
  padding: 8px 10px 8px 16px; box-shadow: var(--shadow-pop); margin: 14px auto 0; width: fit-content;
  font-size: 13px;
}

/* ───────── drawer ───────── */

.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(5, 5, 10, 0.55); z-index: 60;
  opacity: 0; transition: opacity .18s; pointer-events: none;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(430px, 100vw); z-index: 61;
  background: var(--bg); border-left: 1px solid var(--line); box-shadow: var(--shadow-pop);
  transform: translateX(102%); transition: transform .2s cubic-bezier(.22,.8,.3,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { padding: 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer-body { padding: 16px 18px 28px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.kv { display: grid; grid-template-columns: 124px 1fr; gap: 9px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.timeline { display: flex; flex-direction: column; gap: 11px; }
.timeline-item { display: flex; gap: 10px; font-size: 13px; }
.timeline-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }

/* ───────── modal ───────── */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5, 5, 10, 0.6); backdrop-filter: blur(3px); z-index: 95;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade .14s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(410px, 100%); background: var(--raise); border: 1px solid var(--line-strong);
  border-radius: 18px; box-shadow: var(--shadow-pop); padding: 22px; animation: pop .16s ease-out;
}
.modal h3 { margin: 0 0 8px; font-size: 17px; }
.modal p { margin: 0 0 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.modal .row { justify-content: flex-end; }

/* ───────── palette ───────── */

.palette-backdrop {
  position: fixed; inset: 0; background: rgba(5, 5, 10, 0.6); backdrop-filter: blur(3px); z-index: 96;
  display: none; align-items: flex-start; justify-content: center; padding-top: 12vh;
}
.palette-backdrop.open { display: flex; }
.palette {
  width: min(600px, 92vw); background: var(--raise); border: 1px solid var(--line-strong);
  border-radius: 16px; box-shadow: var(--shadow-pop); overflow: hidden;
}
.palette input { width: 100%; padding: 15px 18px; border: none; background: none; outline: none; font-size: 15px; }
.palette-list { max-height: 52vh; overflow-y: auto; border-top: 1px solid var(--line); padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.palette-item.active, .palette-item:hover { background: var(--accent-soft); }
.palette-item .hint { margin-left: auto; font-size: 11.5px; color: var(--muted); }

/* ───────── toast ───────── */

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 99; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--raise); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 11px 14px; font-size: 13.5px; box-shadow: var(--shadow-pop); animation: rise .18s ease-out;
  display: flex; gap: 9px; align-items: center; max-width: 330px;
}
.toast.good { border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.toast.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ───────── charts ───────── */

.chart { width: 100%; display: block; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.bar-row { display: grid; grid-template-columns: 124px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 9px; }
.bar-track { height: 7px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--accent); }

/* ───────── settings ───────── */

.setting-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: none; }
.setting-row .label { font-size: 13.5px; font-weight: 550; }
.setting-row .hint { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }

/* ───────── login ───────── */

.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1fr; place-items: center; padding: 24px;
  position: relative; overflow: hidden;
}
.login-glow {
  position: absolute; width: 760px; height: 760px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(123, 108, 255, 0.16), transparent 62%);
  top: -280px; right: -180px; filter: blur(20px);
}
.login-glow.two { top: auto; bottom: -340px; right: auto; left: -240px; background: radial-gradient(circle, rgba(123, 108, 255, 0.1), transparent 62%); }

.login {
  position: relative; width: min(392px, 100%); background: var(--surface);
  border: 1px solid var(--line); border-radius: 22px; padding: 32px 30px 26px; box-shadow: var(--shadow);
}
.login-logo { width: 54px; height: 54px; display: block; margin-bottom: 20px; }
.login h1 { margin: 0 0 7px; font-size: 25px; letter-spacing: -0.02em; }
.login .lead { margin: 0 0 24px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.login .field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.login .input { padding: 12px 14px; font-size: 14px; }
.code-input { letter-spacing: .42em; font-family: var(--mono); font-size: 19px; text-align: center; padding-left: 0; }
.login .btn { width: 100%; padding: 12px; font-size: 14px; }
.login .error { color: var(--bad); font-size: 13px; margin: -4px 0 14px; }
.login .sent { color: var(--good); font-size: 13px; margin: -4px 0 14px; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); margin-bottom: 18px; cursor: pointer; user-select: none; }
.login-foot {
  position: relative; margin-top: 22px; display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted);
}
.login-side { display: flex; gap: 6px; }

/* ───────── mobile ───────── */

.mobile-nav { display: none; }
.only-sm { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .view { padding: 15px 13px 92px; }
  .topbar { padding: 10px 13px; }
  table.people th { top: 50px; }
  .who-name, .who-sub { max-width: 44vw; }
  table.people th.hide-sm, table.people td.hide-sm { display: none; }
  .drawer { width: 100vw; }
  .kv { grid-template-columns: 104px 1fr; }
  .page-title { font-size: 21px; }
  .grid.two { grid-template-columns: 1fr; }

  .hide-sm-none { display: none; }
  .searchbox .hide-sm { display: none; }
  .only-sm { display: inline; }
  .searchbox { max-width: none; }

  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
  }
  .mobile-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 2px;
    font-size: 10px; color: var(--muted); position: relative;
  }
  .mobile-nav a.active { color: var(--accent); }
  .mobile-nav svg { width: 18px; height: 18px; }
  .mobile-nav .nav-count { position: absolute; top: -2px; right: 24%; margin: 0; padding: 1px 5px; font-size: 10px; }
}
