/* Fingerprint hub. Tokens and components follow FuelOne's DESIGN.md (admin tool: indigo accent). */
:root {
  --bg: #f6f7f9; --text: #14181f; --white: #fff;
  --s50: #f8fafc; --s100: #f1f5f9; --s200: #e2e8f0; --s300: #cbd5e1; --s400: #94a3b8; --s500: #64748b;
  --s600: #475569; --s700: #334155; --s800: #1e293b; --s900: #0f172a;
  --a50: #eef2ff; --a200: #c7d2fe; --a300: #a5b4fc; --a500: #6366f1; --a600: #4f46e5; --a700: #4338ca;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.mono, code { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--s500); }
.small { font-size: 12px; }
[hidden] { display: none !important; }
a { color: var(--s900); text-underline-offset: 2px; text-decoration-color: var(--a500); }

/* shell */
.shell { display: flex; min-height: 100dvh; }
.sidebar { width: 224px; flex: none; background: var(--s900); border-right: 1px solid var(--s800); color: #cbd5e1; display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; }
.brand { padding: 16px 16px 12px; }
.brand-name { font-size: 14px; font-weight: 600; color: #fff; }
.brand-sub { font-size: 12px; color: var(--s400); }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 8px; }
.nav-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--s500); padding: 12px 12px 4px; }
.nav a { border-radius: 6px; padding: 8px 12px; font-size: 14px; font-weight: 500; color: #cbd5e1; text-decoration: none; white-space: nowrap; }
.nav a:hover { background: var(--s800); color: #fff; }
.nav a[aria-current="page"] { background: rgba(99, 102, 241, .15); color: var(--a300); }
.nav a:focus-visible, .btn:focus-visible, .pager button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--a200); }
.side-foot { margin-top: auto; padding: 12px 16px; font-size: 11px; color: var(--s500); }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--s200); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.top-title { font-size: 14px; font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--s600); }
.live { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--s400); flex: none; display: inline-block; }
.dot.on { background: #10b981; } .dot.off { background: #f43f5e; } .dot.sync { background: #f59e0b; animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
main { padding: 24px; flex: 1; }
.page { margin: 0 auto; max-width: 80rem; }
@media (min-width: 1536px) { .page { max-width: 100rem; } }

/* page header */
.page-h { margin-bottom: 20px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
h1 { margin: 0; font-size: 20px; font-weight: 600; color: var(--s900); }
.page-sub { margin-top: 2px; font-size: 14px; color: var(--s500); }

/* controls */
.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid var(--s300); background: #fff; color: var(--s700); box-shadow: var(--shadow-xs); min-height: 36px; }
.btn:hover { background: var(--s50); }
.btn.primary { background: var(--a600); border-color: var(--a600); color: #fff; padding: 8px 14px; }
.btn.primary:hover { background: var(--a700); }
.btn.danger { border-color: #fda4af; color: #be123c; }
.btn.danger:hover { background: #fff1f2; }
.btn.quiet { border-color: transparent; background: transparent; box-shadow: none; color: var(--s600); padding: 6px 10px; min-height: 32px; }
.btn.quiet:hover { background: var(--s100); }
.btn.sm { padding: 6px 10px; min-height: 32px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.input, select.input { width: 100%; border-radius: 6px; border: 1px solid var(--s300); background: #fff; padding: 8px 12px; font: inherit; font-size: 14px; color: var(--text); box-shadow: var(--shadow-xs); outline: none; min-height: 36px; }
.input:focus { border-color: var(--a500); box-shadow: 0 0 0 2px var(--a200); }
.field label, .label { display: block; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--s500); margin-bottom: 4px; }
.field .hint { margin-top: 4px; font-size: 12px; color: var(--s500); }
.fields { display: grid; gap: 16px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--s700); padding: 2px 0; }
.check input { width: 16px; height: 16px; accent-color: var(--a600); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters .input { width: auto; min-width: 200px; }

/* surfaces */
.card { background: #fff; border: 1px solid var(--s200); border-radius: 8px; box-shadow: var(--shadow-xs); min-width: 0; }
.card-h { border-bottom: 1px solid var(--s200); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-h h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--s700); }
.card-b { padding: 16px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--s200); border-radius: 8px; box-shadow: var(--shadow-xs); padding: 12px 16px; }
.stat .v { font-size: 20px; font-weight: 600; color: var(--s900); font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .hint { font-size: 12px; color: var(--s500); }
.grid3 { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.span2 { grid-column: span 2; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead tr { border-bottom: 1px solid var(--s200); background: var(--s50); }
th { text-align: left; padding: 8px 12px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--s500); white-space: nowrap; }
td { padding: 8px 12px; border-top: 1px solid var(--s100); vertical-align: top; color: var(--s700); }
tbody tr:first-child td { border-top: 0; }
tbody tr:hover { background: var(--s50); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.who { font-weight: 500; color: var(--s800); }
tr.flash td { animation: flash 4s ease-out; }
@keyframes flash { 0% { background: #fef3c7; } 100% { background: transparent; } }
.empty { text-align: center; padding: 56px 16px; }
.empty .what { font-size: 14px; font-weight: 500; color: var(--s700); }
.empty .next { font-size: 14px; color: var(--s500); margin-top: 4px; }
.pager { border-top: 1px solid var(--s200); padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pager .of { font-size: 12px; color: var(--s500); }
.pager .pages { display: flex; gap: 4px; align-items: center; }
.pager button { min-width: 32px; min-height: 32px; border-radius: 6px; border: 1px solid var(--s300); background: #fff; font: inherit; font-size: 13px; color: var(--s700); cursor: pointer; padding: 0 8px; }
.pager button[aria-current="page"] { background: var(--s900); color: #fff; border-color: var(--s900); }
.pager button:disabled { opacity: .5; cursor: default; }

/* badges and notes */
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 500; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--ring); background: var(--fill); color: var(--ink); margin: 0 4px 2px 0; }
.t-gray { --fill: var(--s100); --ink: var(--s600); --ring: var(--s200); }
.t-green { --fill: #ecfdf5; --ink: #047857; --ring: #a7f3d0; }
.t-amber { --fill: #fffbeb; --ink: #b45309; --ring: #fde68a; }
.t-red { --fill: #fff1f2; --ink: #be123c; --ring: #fecdd3; }
.t-blue { --fill: #f0f9ff; --ink: #0369a1; --ring: #bae6fd; }
.t-violet { --fill: #f5f3ff; --ink: #6d28d9; --ring: #ddd6fe; }
.t-indigo { --fill: var(--a50); --ink: var(--a700); --ring: var(--a200); }
.note { border-radius: 6px; border: 1px solid; padding: 8px 12px; font-size: 14px; }
.note.err { border-color: #fecdd3; background: #fff1f2; color: #be123c; }
.note.ok { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.note.warn { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.note.info { border-color: var(--s200); background: var(--s50); color: var(--s700); }
.secret { display: flex; gap: 8px; align-items: center; background: var(--s50); border: 1px solid var(--s200); border-radius: 6px; padding: 8px 10px; word-break: break-all; }

/* dialog */
dialog { margin: auto; width: min(28rem, calc(100vw - 2rem)); border-radius: 8px; border: 1px solid var(--s200); background: #fff; padding: 0; box-shadow: 0 20px 25px -5px rgba(15, 23, 42, .15), 0 8px 10px -6px rgba(15, 23, 42, .1); color: var(--text); }
dialog.wide { width: min(36rem, calc(100vw - 2rem)); }
dialog::backdrop { background: rgba(15, 23, 42, .4); }
.dlg-h { border-bottom: 1px solid var(--s200); padding: 12px 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.dlg-h h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--s800); }
.dlg-b { padding: 16px; display: grid; gap: 16px; }
.dlg-f { padding: 12px 16px; border-top: 1px solid var(--s200); display: flex; justify-content: flex-end; gap: 8px; }

/* toast */
.toast { position: fixed; right: 16px; bottom: 16px; max-width: calc(100% - 32px); background: var(--s900); color: #fff; padding: 12px 16px; border-radius: 8px; box-shadow: 0 10px 15px -3px rgba(15, 23, 42, .25); font-size: 14px; transform: translateY(calc(100% + 32px)); visibility: hidden; transition: transform .25s, visibility .25s; z-index: 10; }
.toast.show { transform: none; visibility: visible; }

/* login */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login { width: min(24rem, 100%); }
.login .card-b { padding: 24px; }
.login h1 { font-size: 18px; }

@media (max-width: 1024px) { .grid3 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; flex-direction: row; align-items: center; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--s800); }
  .brand { padding: 10px 12px; flex: none; }
  .brand-sub, .nav-title, .side-foot { display: none; }
  .nav { flex-direction: row; padding: 6px; }
  main { padding: 16px; }
  .filters .input { min-width: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) { tr.flash td, .dot.sync { animation: none; } .toast { transition: none; } }
