/* ─────────────────────────────────────────────
   Noctis Nova Admin — design tokens
   ───────────────────────────────────────────── */

:root {
  --font-sans: "Geist", "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --header-h: 68px;
  --rail-w: 68px;
}

/* DARK */
[data-theme="dark"] {
  --bg-0: #07070b;
  --bg-1: #0e0e16;
  --bg-2: #15151f;
  --bg-3: #1e1e2a;
  --bg-hover: #1f1f2c;
  --border: #25252f;
  --border-strong: #34344a;
  --text-0: #ffffff;
  --text-1: #d6d6e2;
  --text-2: #8e8ea4;
  --text-3: #5a5a72;

  --accent: #b478ff;
  --accent-soft: #c89cff;
  --accent-deep: #7d3ff5;
  --accent-bg: rgba(180, 120, 255, 0.10);
  --accent-bg-strong: rgba(180, 120, 255, 0.18);
  --accent-glow: rgba(167, 100, 255, 0.35);

  --success: #6fe3a7;
  --warning: #f5c062;
  --danger:  #ff7a8a;
  --info:    #8ab8ff;

  --shadow-card: 0 1px 0 0 rgba(255,255,255,0.04) inset, 0 12px 32px -16px rgba(0,0,0,0.6);
}

/* LIGHT */
[data-theme="light"] {
  --bg-0: #f7f6f3;
  --bg-1: #ffffff;
  --bg-2: #faf9f6;
  --bg-3: #f1efe9;
  --bg-hover: #f1efe9;
  --border: #e8e6df;
  --border-strong: #d6d3ca;
  --text-0: #14131a;
  --text-1: #43424e;
  --text-2: #76758a;
  --text-3: #a3a2b3;

  --accent: #7c3aed;
  --accent-soft: #9a64ff;
  --accent-deep: #6024d4;
  --accent-bg: rgba(124, 58, 237, 0.08);
  --accent-bg-strong: rgba(124, 58, 237, 0.14);
  --accent-glow: rgba(124, 58, 237, 0.25);

  --success: #16a47a;
  --warning: #c98a16;
  --danger:  #d94860;
  --info:    #2b6ad6;

  --shadow-card: 0 1px 0 0 rgba(20,19,26,0.02) inset, 0 1px 2px rgba(20,19,26,0.04), 0 8px 24px -16px rgba(20,19,26,0.10);
}

/* glow intensity */
[data-glow="none"]   { --glow-mult: 0; }
[data-glow="subtle"] { --glow-mult: 0.4; }
[data-glow="medium"] { --glow-mult: 1; }
[data-glow="loud"]   { --glow-mult: 2; }

/* reset */
*, *::before, *::after { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--text-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-bg-strong); color: var(--text-0); }

/* ────────  APP SHELL  ──────── */
.app {
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  height: 100vh;
  background: var(--bg-0);
  overflow: hidden;
}

/* ────────  SIDEBAR (icon rail)  ──────── */
.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 14px;
  border-right: 1px solid var(--border);
  background: var(--bg-1);
  position: relative;
}
.rail-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, rgba(180,120,255,0.18), transparent 60%), var(--bg-2);
  border: 1px solid var(--border-strong);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.rail-logo img { width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 0 8px var(--accent-glow)); }
.rail-logo::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: 0 0 calc(20px * var(--glow-mult)) var(--accent-glow) inset;
  border-radius: inherit;
  pointer-events: none;
}

.rail-divider { width: 28px; height: 1px; background: var(--border); margin: 4px 0 8px; }

.rail-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.rail-foot { display: flex; flex-direction: column; gap: 6px; align-items: center; }

.rail-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  position: relative;
  transition: color .15s ease, background .15s ease;
}
.rail-btn:hover { color: var(--text-0); background: var(--bg-hover); }
.rail-btn[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-bg);
}
.rail-btn[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 8px; bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 calc(8px * var(--glow-mult)) var(--accent);
}
.rail-btn svg { width: 18px; height: 18px; }

.rail-tooltip {
  position: absolute;
  left: 56px;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  background: var(--bg-3);
  color: var(--text-0);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s, transform .12s;
  z-index: 50;
  font-weight: 500;
}
.rail-btn:hover .rail-tooltip { opacity: 1; transform: translateY(-50%) translateX(0); }

.rail-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c89cff, #7d3ff5);
  display: grid; place-items: center;
  color: white; font-weight: 600; font-size: 12px;
  border: 1px solid var(--border-strong);
}

/* ────────  MAIN  ──────── */
.main {
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  overflow: hidden;
  min-width: 0;
}

.header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-0);
}
.header-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.crumbs {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.crumbs .sep { opacity: .5; margin: 0 6px; }
.title { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; color: var(--text-0); }
.header-spacer { flex: 1; }

.searchbar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  min-width: 260px;
  color: var(--text-2);
  transition: border-color .15s, box-shadow .15s;
}
.searchbar:focus-within {
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.searchbar svg { width: 14px; height: 14px; }
.searchbar input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 13px; color: var(--text-0);
}
.searchbar input::placeholder { color: var(--text-2); }
.kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  background: var(--bg-1);
}

.header-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--text-1);
  border: 1px solid var(--border);
  background: var(--bg-1);
  position: relative;
  transition: border-color .15s, background .15s;
}
.header-btn:hover { border-color: var(--border-strong); background: var(--bg-2); }
.header-btn svg { width: 15px; height: 15px; }
.header-btn .dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 calc(6px * var(--glow-mult)) var(--accent);
  border: 2px solid var(--bg-1);
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .12s, border-color .12s, color .12s, transform .12s;
}
.btn svg { width: 14px; height: 14px; }
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 calc(18px * var(--glow-mult)) var(--accent-glow), 0 1px 0 rgba(255,255,255,0.18) inset;
}
[data-theme="light"] .btn-primary { color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost {
  background: var(--bg-1);
  border-color: var(--border);
  color: var(--text-1);
}
.btn-ghost:hover { background: var(--bg-2); color: var(--text-0); border-color: var(--border-strong); }
.btn-subtle {
  color: var(--text-1);
}
.btn-subtle:hover { background: var(--bg-hover); color: var(--text-0); }

/* ────────  PAGE  ──────── */
.page {
  overflow: auto;
  padding: 24px 28px 64px;
  background: var(--bg-0);
}
.page-inner { max-width: 1280px; margin: 0 auto; }
.page-hello {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 22px; gap: 16px;
}
.hello-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--text-0);
}
.hello-title .accent { color: var(--accent); }
.hello-sub {
  margin-top: 6px;
  color: var(--text-1);
  font-size: 13.5px;
}
.hello-actions { display: flex; gap: 8px; }

/* stat grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.stat {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-icon {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: grid; place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.stat-icon svg { width: 13px; height: 13px; }
.stat-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text-0);
}
.stat-value .unit { font-size: 15px; color: var(--text-2); margin-left: 4px; font-weight: 500; letter-spacing: 0; }
.stat-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
  color: var(--text-2);
}
.delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.delta.up    { color: var(--success); }
.delta.down  { color: var(--danger); }
.delta.flat  { color: var(--text-2); }
.spark {
  width: 70px; height: 22px;
}

.stat.accent {
  background: linear-gradient(180deg, var(--accent-bg) 0%, transparent 60%), var(--bg-1);
  border-color: var(--border-strong);
}
.stat.accent .stat-icon {
  background: var(--accent-bg-strong);
  border-color: transparent;
  color: var(--accent);
}
.stat.accent::after {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 60%);
  opacity: calc(0.5 * var(--glow-mult));
  pointer-events: none;
}

/* ────────  GRID LAYOUT  ──────── */
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ────────  CARD  ──────── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; color: var(--text-0); }
.card-sub { font-size: 12px; color: var(--text-2); margin-left: 8px; font-weight: 400; }
.card-actions { display: flex; gap: 4px; align-items: center; }
.card-body { padding: 8px 6px; }
.card-body.padded { padding: 16px; }
.card-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
  color: var(--text-2);
}

/* ────────  TABLE / LIST  ──────── */
.row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background .12s;
  color: var(--text-1);
}
.row:hover { background: var(--bg-hover); }
.row + .row { border-top: 1px solid var(--border); border-radius: 0; }
.row:first-child { border-top: 0; }
.row .cell { min-width: 0; }
.row .mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
.row .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .num { font-variant-numeric: tabular-nums; }

/* ────────  BADGE / PILL  ──────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.pill.live    { color: var(--success); border-color: color-mix(in oklab, var(--success) 25%, var(--border)); }
.pill.dev     { color: var(--info);    border-color: color-mix(in oklab, var(--info) 25%, var(--border)); }
.pill.staging { color: var(--warning); border-color: color-mix(in oklab, var(--warning) 25%, var(--border)); }
.pill.paused  { color: var(--text-2); }
.pill.urgent  { color: var(--danger);  border-color: color-mix(in oklab, var(--danger) 30%, var(--border)); background: color-mix(in oklab, var(--danger) 8%, var(--bg-2)); }
.pill.open    { color: var(--info);    background: color-mix(in oklab, var(--info) 8%, var(--bg-2)); border-color: color-mix(in oklab, var(--info) 25%, var(--border)); }
.pill.closed  { color: var(--text-2); }
.pill.pending { color: var(--warning); }
.pill.paid    { color: var(--success); }
.pill.accent  { color: var(--accent); background: var(--accent-bg); border-color: color-mix(in oklab, var(--accent) 25%, var(--border)); }

.plan {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  color: var(--text-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.plan.pro { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 30%, var(--border)); }

/* ────────  AVATAR  ──────── */
.avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  color: var(--text-1);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.avatar.lg { width: 34px; height: 34px; font-size: 12px; }
.avatar.purple {
  background: linear-gradient(135deg, #c89cff, #7d3ff5);
  color: white;
  border: 0;
}

/* ────────  ACTIVITY ITEM  ──────── */
.activity {
  display: flex; gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  align-items: flex-start;
}
.activity:first-of-type { border-top: 0; }
.activity-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  width: 44px;
  flex-shrink: 0;
  padding-top: 2px;
}
.activity-body { flex: 1; color: var(--text-1); }
.activity-body b { color: var(--text-0); font-weight: 500; }
.activity-body .meta { color: var(--text-2); }

/* ────────  ANNOUNCEMENT  ──────── */
.announce {
  padding: 16px;
  position: relative;
}
.announce-pinned {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.announce-pinned svg { width: 11px; height: 11px; }
.announce-author {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 10px;
}
.announce-author .name { color: var(--text-0); font-weight: 500; }
.announce h3 {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--text-0);
}
.announce p {
  margin: 0;
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.55;
}
.announce-foot {
  display: flex; gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 11.5px;
  color: var(--text-2);
}

/* ────────  TRAINING  ──────── */
.training-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  align-items: center;
}
.training-item:first-of-type { border-top: 0; }
.training-name { font-size: 13px; font-weight: 500; }
.training-meta { font-size: 11.5px; color: var(--text-2); font-family: var(--font-mono); }
.bar {
  grid-column: 1 / -1;
  height: 4px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  border-radius: inherit;
  box-shadow: 0 0 calc(8px * var(--glow-mult)) var(--accent-glow);
}

/* ────────  SECTION HEADER  ──────── */
.section-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}
.section-bar h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-0);
}
.section-bar .filters { display: flex; align-items: center; gap: 6px; }

.tabs {
  display: inline-flex;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.tab {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  padding: 5px 10px;
  border-radius: 6px;
  transition: background .12s, color .12s;
  font-variant-numeric: tabular-nums;
}
.tab:hover { color: var(--text-0); }
.tab[aria-selected="true"] {
  background: var(--bg-3);
  color: var(--text-0);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
}
.tab .count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  margin-left: 4px;
}
.tab[aria-selected="true"] .count { color: var(--accent); }

/* ────────  TABLE (full)  ──────── */
.tbl {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}
.tbl thead {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
}
.tbl th {
  font-weight: 500;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; cursor: pointer; }
.tbl tbody tr:hover { background: var(--bg-hover); }
.tbl .num { font-variant-numeric: tabular-nums; text-align: right; }
.tbl .mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
.tbl td .name { color: var(--text-0); font-weight: 500; }
.tbl td .sub { color: var(--text-2); font-size: 11.5px; }
.tbl tbody td { color: var(--text-1); }

.lead {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.lead .meta { min-width: 0; display: flex; flex-direction: column; }
.lead .meta .name { font-weight: 500; }
.lead .meta .sub { color: var(--text-2); font-size: 11.5px; font-family: var(--font-mono); }

/* ────────  EMPTY / PLACEHOLDER  ──────── */
.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
}

/* ────────  DRAWER  ──────── */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(8,8,12,0.55);
  backdrop-filter: blur(4px);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0; right: 0;
  width: 480px;
  max-width: 92vw;
  height: 100vh;
  background: var(--bg-1);
  border-left: 1px solid var(--border-strong);
  z-index: 90;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
  box-shadow: -24px 0 60px -20px rgba(0,0,0,0.5);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.drawer-head .title { font-size: 16px; font-weight: 600; }
.drawer-head .sub { font-family: var(--font-mono); font-size: 11px; color: var(--text-2); margin-top: 2px; }
.drawer-body {
  flex: 1; overflow: auto;
  padding: 20px;
  display: flex; flex-direction: column; gap: 18px;
}
.drawer-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
}

.kv {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 16px;
  font-size: 13px;
}
.kv dt {
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 2px;
}
.kv dd { margin: 0; color: var(--text-0); }

/* ────────  FOCUS  ──────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* tweaks button override (override package default ish) */
.tweaks-fab {
  background: var(--accent) !important;
  color: white !important;
  box-shadow: 0 0 calc(20px * var(--glow-mult)) var(--accent-glow) !important;
}

/* scrollbar */
.page::-webkit-scrollbar, .drawer-body::-webkit-scrollbar { width: 10px; height: 10px; }
.page::-webkit-scrollbar-thumb, .drawer-body::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid var(--bg-0);
}
.page::-webkit-scrollbar-track, .drawer-body::-webkit-scrollbar-track {
  background: transparent;
}

/* helper */
.hstack { display: flex; align-items: center; gap: 8px; }
.vstack { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.muted { color: var(--text-2); }
.mono { font-family: var(--font-mono); }

/* ────────  SPINNER  ──────── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ────────  FORM INPUTS (for add forms)  ──────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input:not([type]),
textarea,
select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-0);
  font-size: 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
input::placeholder, textarea::placeholder {
  color: var(--text-3);
}
select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238e8ea4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
}
