:root {
  --bg: #061d2b; --panel: #0c2a3d; --panel-2: #12364d; --line: rgba(190, 235, 255, 0.14);
  --text: #eaf6fc; --muted: #93b3c3; --accent: #ff9a5c; --accent-ink: #3a1600; --good: #6be3a6; --warn: #ffcf7a; --bad: #ff7b6b;
  --hd-bg: #12364d; --hd-text: #eaf6fc; --hd-muted: #93b3c3; --hd-field: rgba(0, 0, 0, 0.25); --hd-accent: #ff9a5c; --hd-accent-ink: #3a1600; --hd-shadow: rgba(255, 140, 70, 0.3);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(1200px 600px at 80% -10%, #0f4560, transparent 60%), var(--bg); color: var(--text); font: 14.5px/1.5 "Be Vietnam Pro", system-ui, "Segoe UI", sans-serif; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; padding: 16px 20px; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; }
.brand span { display: grid; line-height: 1.2; }
.brand b { font-size: 18px; }
.brand small { color: var(--muted); font-size: 12.5px; }
.bar-right { display: flex; gap: 8px; }
.btn { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 8px 14px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { filter: brightness(1.12); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
main { max-width: 1200px; margin: 0 auto; padding: 0 20px 40px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tile { padding: 14px 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.tile small { color: var(--muted); font-weight: 600; }
.tile b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.tile .btn { margin-top: 6px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 10px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--panel-2); color: var(--text); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; margin-left: 4px; }
.tools { display: flex; gap: 8px; margin: 14px 0; }
.tools input { flex: 1; max-width: 360px; font: inherit; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); outline: none; }
.tools input:focus { border-color: #6fd3ff; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12.5px; color: var(--muted); font-weight: 700; background: var(--panel-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, 0.08); }
.tag.good { color: var(--good); }
.tag.bad { color: var(--bad); background: rgba(255, 123, 107, 0.12); }
.tag.admin { color: var(--warn); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
select { font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 999px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.empty { padding: 28px; text-align: center; color: var(--muted); background: var(--panel); border-radius: 18px; border: 1px solid var(--line); }
.log { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.log li { padding: 9px 14px; border-bottom: 1px solid var(--line); }
.log li:last-child { border-bottom: 0; }
.log time { color: var(--muted); font-size: 12.5px; margin-right: 8px; }
.gate { max-width: 460px; margin: 12vh auto; padding: 0 20px; text-align: center; }
.gate h1 { font-size: 28px; margin: 0 0 6px; }
.gate p { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 160%); visibility: hidden; padding: 11px 18px; border-radius: 14px; background: #f3fbff; color: #062236; font-weight: 700; transition: transform 0.3s, visibility 0.3s; z-index: 40; }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast.err { background: #ffe4df; color: #6b1608; }
@media (max-width: 760px) {
  table, thead, tbody, tr, td { display: block; }
  thead { display: none; }
  table { border-radius: 16px; }
  tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  td { border: 0; padding: 3px 0; }
  td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 12.5px; }
}
