/* Issues License Console — brand styles.
 * Palette lifted from the licence worker's panel: deep navy ground, electric blue accent,
 * pale-blue text, mint green for OK, coral for danger. Variables here are the whole
 * design system — change --accent to retheme, nothing else edits the hue. */
:root {
  --accent: #c9ccd4;
  --accent-hi: #eef0f4;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-glow: color-mix(in srgb, var(--accent) 45%, transparent);

  --bg: #08080a;
  --bg-2: #0b0b0e;
  --panel: rgba(15, 15, 18, 0.8);
  --panel-solid: #0f0f12;
  --panel-raised: #141418;
  --panel-input: rgba(6, 6, 8, 0.55);

  --line: rgba(232, 234, 240, 0.07);
  --line-2: rgba(232, 234, 240, 0.13);
  --line-3: rgba(232, 234, 240, 0.22);

  --text: #f2f3f6;
  --text-2: #b2b5bf;
  --muted: #7a7d88;
  --dim: #4a4c55;

  --green: #8fe3a7;
  --red: #e57373;
  --amber: #f0b86e;
  --violet: #9c7cff;
  --cyan: #6dd0ff;

  --radius: 12px;
  --radius-lg: 16px;
  --sidebar: 236px;
  --row: 44px;

  --sans: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Mono', ui-monospace, Consolas, monospace;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 28px 70px -20px rgba(0, 0, 0, 0.8);
  --shadow-accent: 0 10px 28px -10px var(--accent-glow);

  color-scheme: dark;
}
body.compact { --row: 36px; }

/* ───── Reset ───── */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 13.5px/1.5 var(--sans);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--text); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(178, 181, 191, 0.1); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(178, 181, 191, 0.2); }
.ic { flex: none; display: block; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -0.015em; font-feature-settings: 'ss02'; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.bg-fade {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(90% 60% at 80% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    radial-gradient(120% 70% at 75% 0%, transparent 0%, rgba(8, 8, 10, 0.3) 40%, rgba(8, 8, 10, 0.92) 70%),
    linear-gradient(180deg, transparent 20%, var(--bg) 85%);
}

.app { position: relative; z-index: 1; display: flex; height: 100vh; }

/* ───── Sidebar ───── */
.sidebar {
  width: var(--sidebar); flex: none; display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 12, 15, 0.9), rgba(8, 8, 10, 0.95));
  backdrop-filter: blur(16px) saturate(140%);
  transition: width 0.22s ease;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 14px 16px 18px; height: 68px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  flex: none;
  background:
    linear-gradient(140deg, var(--accent-hi) 0%, var(--accent) 55%, color-mix(in srgb, var(--accent) 70%, #0f0f12) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 8px 24px -10px var(--accent-glow);
  position: relative; overflow: hidden;
}
.brand-mark::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, transparent 45%);
  pointer-events: none;
}
.brand-mark .issues-mark {
  width: 70%; height: 70%;
  background: #0b0b0d;
  -webkit-mask: url('assets/issues-mark.png') no-repeat center / contain;
  mask: url('assets/issues-mark.png') no-repeat center / contain;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.15));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text b {
  font-size: 15.5px; font-weight: 700; letter-spacing: -0.035em;
  color: var(--text);
}
.brand-text span { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }

/* Large brand mark used on the login screen */
.brand-mark-lg { width: 56px !important; height: 56px !important; border-radius: 16px !important; }
.brand-mark-lg .issues-mark { width: 68%; height: 68%; }
.collapse-btn { margin-left: auto; }

.nav { flex: 1; overflow-y: auto; padding: 8px 10px; }
.nav-group {
  margin: 16px 0 6px; padding: 0 10px;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--dim); white-space: nowrap;
}
.nav-group:first-child { margin-top: 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px;
  height: 36px; padding: 0 11px; margin: 2px 0;
  border-radius: 9px; color: var(--text-2); text-decoration: none;
  white-space: nowrap; font-weight: 500; font-size: 13px;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: rgba(178, 181, 191, 0.04); color: var(--text); }
.nav a.on {
  background: linear-gradient(90deg, var(--accent-soft), transparent 70%);
  color: var(--text);
}
.nav a.on::before {
  content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  box-shadow: 0 0 12px var(--accent-glow);
}
.nav a.on .ic { color: var(--accent-hi); }
.nav .count {
  margin-left: auto; font: 600 11px var(--mono); color: var(--dim);
  padding: 1px 6px; border-radius: 6px;
}
.nav .count.hot {
  color: var(--amber);
  background: rgba(240, 184, 110, 0.1);
  border: 1px solid rgba(240, 184, 110, 0.2);
}
.nav .count.hot.live {
  color: var(--green);
  background: rgba(143, 227, 167, 0.1);
  border-color: rgba(143, 227, 167, 0.2);
}

.sidebar-foot { padding: 10px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  font: 700 12px var(--sans); letter-spacing: -0.02em; color: #0b0b0d;
  background: linear-gradient(140deg, var(--accent-hi), var(--accent) 60%, #8a8f9b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.avatar .issues-mark { width: 62%; height: 62%; background: #0b0b0d; -webkit-mask: url('assets/issues-mark.png') no-repeat center / contain; mask: url('assets/issues-mark.png') no-repeat center / contain; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: var(--panel-raised); }
.avatar .ava-fb { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--sans); color: #0b0b0d; background: linear-gradient(140deg, var(--accent-hi), var(--accent) 60%, #8a8f9b); }
.me-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.me-text b { font-size: 13px; font-weight: 600; }
.me-text span { font-size: 11px; color: var(--muted); }
.me .icon-btn { margin-left: auto; }

body.collapsed { --sidebar: 70px; }
body.collapsed .brand-text, body.collapsed .nav-group,
body.collapsed .nav a span, body.collapsed .nav .count,
body.collapsed .me-text { display: none; }
body.collapsed .brand { flex-direction: column; height: auto; gap: 10px; padding: 18px 0 10px; }
body.collapsed .collapse-btn { margin: 0; }
body.collapsed .nav a { justify-content: center; padding: 0; }
body.collapsed .nav-group { display: block; height: 1px; background: var(--line); margin: 10px 8px; padding: 0; font-size: 0; }
body.collapsed .me { flex-direction: column; }
body.collapsed .me .icon-btn { margin: 0; }
body.collapsed .nav a[data-tip]:hover::after {
  content: attr(data-tip); position: fixed; left: 76px;
  padding: 6px 10px; border-radius: 7px;
  background: var(--panel-raised); border: 1px solid var(--line-2);
  color: var(--text); font-size: 12.5px; font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 50; pointer-events: none;
  white-space: nowrap;
}

/* ───── Topbar ───── */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 68px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 28px; }
.search {
  display: flex; align-items: center; gap: 10px;
  width: min(440px, 100%); height: 38px; padding: 0 8px 0 12px;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-input); backdrop-filter: blur(10px);
  color: var(--muted); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
}
.search:hover { border-color: var(--line-2); }
.search-ph { flex: 1; font-size: 13px; }
kbd {
  font: 500 11px var(--mono); color: var(--muted);
  padding: 2px 6px; border-radius: 6px;
  border: 1px solid var(--line-2);
  background: rgba(232, 234, 240, 0.03);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.status-pill {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: 20px;
  font: 600 12.5px var(--sans); color: var(--green);
  border: 1px solid rgba(143, 227, 167, 0.28);
  background: rgba(143, 227, 167, 0.08);
}
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: ping 2.2s infinite; }
.status-pill.down { color: var(--red); border-color: rgba(229, 115, 115, 0.3); background: rgba(229, 115, 115, 0.08); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 7px transparent; } }

.icon-btn {
  position: relative; width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--muted);
  cursor: pointer; transition: 0.15s;
  flex: none;
}
.icon-btn:hover { background: rgba(178, 181, 191, 0.06); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 7px; }
.icon-btn.boxed { border-color: var(--line); background: var(--panel-input); }
.icon-btn.boxed:hover { border-color: var(--line-2); }
.icon-btn.danger:hover { color: var(--red); background: rgba(229, 115, 115, 0.08); }
.icon-btn.mobile-only { display: none; }
.bell { border-color: var(--line); background: var(--panel-input); }
.bell .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg-2); box-shadow: 0 0 8px var(--accent-glow); }
.pop-wrap { position: relative; }

/* ───── View ───── */
.view { flex: 1; overflow-y: auto; padding: 8px 28px 48px; scroll-behavior: smooth; }
.view > * { animation: rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.view > *:nth-child(2) { animation-delay: 0.03s; }
.view > *:nth-child(3) { animation-delay: 0.06s; }
.view > *:nth-child(4) { animation-delay: 0.09s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; gap: 16px; margin: 14px 0 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font: 700 26px/1.1 var(--sans); letter-spacing: -0.028em; }
.page-head p { margin: 6px 0 0; color: var(--text-2); font-size: 13.5px; max-width: 640px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.g-overview { grid-template-columns: minmax(0, 1fr) 340px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 16px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); backdrop-filter: blur(16px);
  min-width: 0; position: relative;
  box-shadow: var(--shadow-sm);
}
.card-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px; }
.card-h + .card-b { padding-top: 0; }
.card-h h3 { margin: 0; font: 600 14.5px var(--sans); letter-spacing: -0.015em; }
.card-h p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-2); }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 18px 20px; }
.card-f { padding: 14px 20px; border-top: 1px solid var(--line); }

.chip-ic {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(178, 181, 191, 0.04);
  border: 1px solid var(--line);
  color: var(--text-2); flex: none;
  transition: 0.15s;
}
.chip-ic.accent {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  color: var(--accent-hi);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent) 30%, transparent);
}

/* Hero */
.hero {
  padding: 28px 32px; overflow: hidden;
  display: flex; align-items: center; gap: 24px; min-height: 172px;
  background:
    radial-gradient(60% 100% at 100% 0%, var(--accent-soft) 0%, transparent 60%),
    linear-gradient(110deg, rgba(15, 15, 18, 0.92) 30%, rgba(15, 15, 18, 0.45) 100%);
  border: 1px solid var(--line);
  position: relative;
}
.hero::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-hi), transparent);
  opacity: 0.4;
}
.hero::after {
  content: ''; position: absolute; right: -40px; top: 50%;
  transform: translateY(-50%);
  width: 240px; height: 240px;
  background: var(--accent-hi);
  -webkit-mask: url('assets/issues-mark.png') no-repeat center / contain;
  mask: url('assets/issues-mark.png') no-repeat center / contain;
  opacity: 0.07; pointer-events: none;
}
.hero .eyebrow {
  font: 700 11px/1 var(--sans);
  letter-spacing: 0.14em; color: var(--accent-hi);
  text-transform: uppercase;
}
.hero h1 { margin: 10px 0 8px; font: 800 32px/1 var(--sans); letter-spacing: -0.035em; }
.hero p { margin: 0; color: var(--text-2); max-width: 520px; font-size: 13.5px; }
.hero .pills { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

/* Stats */
.stat {
  padding: 18px 20px; display: flex; flex-direction: column; gap: 6px;
  overflow: hidden; transition: border-color 0.15s, transform 0.15s;
}
.stat:hover { border-color: var(--line-2); transform: translateY(-1px); }
.stat .top { display: flex; align-items: center; justify-content: space-between; }
.stat .lbl { color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.stat .val {
  font: 700 30px/1 var(--sans);
  letter-spacing: -0.035em; margin-top: 10px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 75%, var(--accent)));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-2); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.flat { color: var(--dim); }
.spark { width: 84px; height: 28px; }

/* Chart */
.chart { position: relative; height: 230px; padding: 0 20px 12px 8px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .axis text { fill: var(--dim); font: 400 11px var(--sans); font-variant-numeric: tabular-nums; }
.chart .gridline { stroke: rgba(232, 234, 240, 0.05); }
.chart .tip {
  position: absolute; pointer-events: none;
  padding: 8px 11px; border-radius: 9px;
  background: var(--panel-raised); border: 1px solid var(--line-2);
  font-size: 12px; white-space: nowrap;
  box-shadow: var(--shadow-md);
  transform: translate(-50%, -110%); opacity: 0;
  transition: opacity 0.12s;
}
.chart .tip b { display: block; margin-bottom: 3px; font-weight: 600; color: var(--text); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); font-weight: 500; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }

/* Forms */
label.f { display: flex; flex-direction: column; gap: 6px; font: 500 12px var(--sans); color: var(--text-2); min-width: 0; }
.input, select.input, textarea.input {
  height: 38px; width: 100%; padding: 0 12px;
  border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-input); color: var(--text);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  font: 400 13px var(--sans);
}
textarea.input { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input::placeholder { color: var(--dim); }
.input.sm { height: 32px; font-size: 12.5px; }
select.input {
  appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237d87b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
select.input option { background: var(--panel-raised); color: var(--text); }
.input-ic { position: relative; }
.input-ic .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.input-ic .input { padding-left: 34px; }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.seg {
  display: inline-flex; padding: 3px;
  border-radius: 10px;
  background: var(--panel-input); border: 1px solid var(--line);
  gap: 2px;
}
.seg button {
  border: 0; background: transparent;
  padding: 5px 11px; border-radius: 7px;
  color: var(--muted); cursor: pointer;
  font: 500 12.5px var(--sans);
  transition: 0.15s;
}
.seg button:hover { color: var(--text); }
.seg button.on {
  background: var(--panel-raised); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 1px 3px rgba(0, 0, 0, 0.4);
}

.stepper {
  display: flex; align-items: center;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel-input); height: 38px;
}
.stepper input { width: 100%; border: 0; background: transparent; text-align: center; outline: none; font: 500 14px var(--mono); font-variant-numeric: tabular-nums; }
.stepper button { width: 34px; height: 100%; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: 0.15s; }
.stepper button:hover { color: var(--text); }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; color: var(--text); font: 400 13px var(--sans); }
.check input {
  appearance: none; width: 16px; height: 16px;
  border-radius: 5px; border: 1.5px solid var(--line-3);
  background: var(--panel-input);
  display: grid; place-items: center;
  cursor: pointer; margin: 0; flex: none;
  transition: 0.12s;
}
.check input:hover { border-color: var(--accent-hi); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ''; width: 8px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check input:indeterminate { background: var(--accent); border-color: var(--accent); }
.check input:indeterminate::after { content: ''; width: 8px; height: 2px; background: #fff; border-radius: 2px; }

.switch { position: relative; width: 36px; height: 20px; flex: none; cursor: pointer; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: rgba(178, 181, 191, 0.1); transition: 0.2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch.danger input:checked + span { background: var(--red); }

.key-preview {
  font: 500 12.5px var(--mono);
  padding: 11px 13px; border-radius: 9px;
  border: 1px dashed var(--line-2); color: var(--muted);
  background: var(--panel-input);
  display: flex; align-items: center; gap: 8px;
  overflow: hidden; white-space: nowrap;
}
.key-preview b { color: var(--text); font-weight: 500; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: 9px; border: 1px solid var(--line-2);
  background: rgba(232, 234, 240, 0.04); color: var(--text);
  font: 600 13px var(--sans); letter-spacing: -0.005em;
  cursor: pointer; white-space: nowrap;
  transition: 0.15s;
}
.btn:hover { background: rgba(232, 234, 240, 0.08); border-color: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn.primary {
  background: linear-gradient(180deg, #f4f5f8 0%, #a7acb8 55%, #e2e4ea 100%);
  border-color: transparent; color: #0b0b0d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    var(--shadow-accent);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.white {
  background: linear-gradient(180deg, #fff, #e2e4ea);
  color: #0f0f12; border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 20px -8px rgba(232, 234, 240, 0.3);
}
.btn.white:hover { filter: brightness(1.04); }
.btn.green {
  color: var(--green);
  border-color: rgba(143, 227, 167, 0.3);
  background: rgba(143, 227, 167, 0.08);
}
.btn.green:hover { background: rgba(143, 227, 167, 0.16); }
.btn.red {
  color: var(--red);
  border-color: rgba(229, 115, 115, 0.3);
  background: rgba(229, 115, 115, 0.08);
}
.btn.red:hover { background: rgba(229, 115, 115, 0.16); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: rgba(178, 181, 191, 0.06); }
.btn.block { width: 100%; height: 40px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font: 700 10.5px/1 var(--sans);
  letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid; white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-active, .b-latest, .b-ok { color: var(--green); border-color: rgba(143, 227, 167, 0.3); background: rgba(143, 227, 167, 0.1); }
.b-unused, .b-uploaded, .b-paused { color: var(--text-2); border-color: var(--line-2); background: rgba(178, 181, 191, 0.04); }
.b-expired, .b-revoked, .b-banned, .b-suspended, .b-disabled, .b-fail { color: var(--red); border-color: rgba(229, 115, 115, 0.3); background: rgba(229, 115, 115, 0.08); }
.b-locked, .b-beta, .b-warn { color: var(--amber); border-color: rgba(240, 184, 110, 0.3); background: rgba(240, 184, 110, 0.08); }
.b-stable, .b-reseller { color: var(--cyan); border-color: rgba(109, 208, 255, 0.3); background: rgba(109, 208, 255, 0.08); }
.b-admin { color: var(--accent-hi); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); }
.b-customer { color: var(--muted); border-color: var(--line-2); background: transparent; }

.tool-tag { display: inline-flex; align-items: center; gap: 7px; font: 600 12px var(--sans); white-space: nowrap; color: var(--text); }
.tool-tag i { width: 8px; height: 8px; border-radius: 3px; box-shadow: 0 0 6px color-mix(in srgb, currentColor 40%, transparent); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px; border-radius: 20px;
  font: 500 12px var(--sans); color: var(--text-2);
  border: 1px solid var(--line-2);
  background: var(--panel-input);
}
.pill b { color: var(--text); font-weight: 600; }
.cc { display: inline-grid; place-items: center; min-width: 26px; height: 18px; padding: 0 5px; border-radius: 4px; font: 700 10px var(--mono); color: var(--text); background: rgba(232, 234, 240, 0.05); border: 1px solid var(--line-2); }

/* Tables */
.toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.toolbar .input, .toolbar select.input { height: 34px; width: auto; }
.toolbar .search-in { width: 260px; }
.toolbar .sp { flex: 1; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; padding: 0 12px; height: 40px;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-solid) 95%, var(--accent));
  user-select: none;
}
.t th.sort { cursor: pointer; }
.t th.sort:hover { color: var(--text); }
.t th .arr { display: inline-block; margin-left: 4px; color: var(--accent-hi); }
.t td { padding: 0 12px; height: var(--row); border-bottom: 1px solid rgba(232, 234, 240, 0.04); white-space: nowrap; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background 0.1s; }
.t tbody tr:hover { background: rgba(178, 181, 191, 0.035); }
.t tbody tr.sel { background: var(--accent-soft); }
.t .c-check { width: 40px; padding-right: 0; }
.t .c-act { width: 1%; text-align: right; }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.t .muted, .muted { color: var(--text-2); }
.dim { color: var(--dim); }

.keycell {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 12.5px var(--mono); cursor: pointer;
  color: var(--text); transition: color 0.1s;
}
.keycell .copy { opacity: 0; transition: 0.12s; color: var(--muted); }
tr:hover .keycell .copy { opacity: 1; }
.keycell:hover { color: var(--accent-hi); }

.link { color: var(--text); text-decoration: none; cursor: pointer; border-bottom: 1px dashed rgba(232, 234, 240, 0.2); transition: 0.1s; }
.link:hover { color: var(--accent-hi); border-color: var(--accent); }
.add-link { color: var(--dim); cursor: pointer; font-size: 12.5px; transition: color 0.1s; }
.add-link:hover { color: var(--accent-hi); }

.bal { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.bal b { font-weight: 600; }
.bal .z { color: var(--dim); }
.bar { height: 4px; border-radius: 4px; background: rgba(232, 234, 240, 0.07); overflow: hidden; margin-top: 4px; width: 64px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); border-radius: 4px; }
.pager {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-top: 1px solid var(--line);
  color: var(--text-2); font-size: 12.5px; flex-wrap: wrap;
}
.pager .sp { flex: 1; }
.pager b { color: var(--text); font-weight: 600; }

.empty {
  padding: 56px 20px 48px; text-align: center; color: var(--text-2);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 13.5px;
}
.empty .chip-ic { margin: 0 auto 14px; width: 52px; height: 52px; border-radius: 14px; color: var(--muted); }
.empty b { display: block; color: var(--text); font: 600 15px var(--sans); margin-bottom: 4px; letter-spacing: -0.01em; }

.bulkbar {
  position: sticky; bottom: 14px; z-index: 5;
  margin: -56px auto 0; width: max-content;
  max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px 8px 16px; border-radius: 12px;
  background: var(--panel-raised); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  animation: rise 0.2s both; flex-wrap: wrap;
}
.bulkbar .n { font-weight: 600; margin-right: 8px; color: var(--text); font-size: 12.5px; }

/* Lists */
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.qa {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 11px 14px;
  border-radius: 10px; border: 1px solid transparent;
  background: transparent; cursor: pointer;
  text-align: left; transition: 0.15s;
}
.qa:hover { background: rgba(178, 181, 191, 0.04); border-color: var(--line); }
.qa .chip-ic { width: 32px; height: 32px; border-radius: 8px; }
.qa b { font: 600 13px var(--sans); display: block; }
.qa span { font-size: 12px; color: var(--text-2); }
.qa .go { margin-left: auto; color: var(--dim); transition: 0.15s; }
.qa:hover .go { color: var(--accent-hi); transform: translateX(2px); }

.health-item { display: flex; flex-direction: column; gap: 4px; }
.health-item .lbl { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.health-item .v { font: 700 17px var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -0.025em; color: var(--text); }
.meter { height: 6px; border-radius: 6px; background: rgba(232, 234, 240, 0.06); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); }
.dist { display: flex; height: 10px; border-radius: 6px; overflow: hidden; gap: 2px; background: rgba(232, 234, 240, 0.04); }
.dist i { display: block; height: 100%; }

.feed-item {
  display: flex; gap: 12px; padding: 13px 20px;
  border-top: 1px solid var(--line); align-items: flex-start;
  transition: background 0.1s;
}
.feed-item[data-action]:hover { background: rgba(178, 181, 191, 0.03); }
.feed-item:first-child { border-top: 0; }
.feed-item .chip-ic { width: 32px; height: 32px; border-radius: 8px; }
.feed-item .msg { flex: 1; min-width: 0; font-size: 13px; }
.feed-item .msg b { font-weight: 600; }
.feed-item .meta { font-size: 11.5px; color: var(--dim); margin-top: 3px; font-feature-settings: 'ss02'; }
.feed-day {
  padding: 16px 20px 8px;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dim); border-top: 1px solid var(--line);
}
.feed-day:first-child { border-top: 0; }
.t-key { color: var(--accent-hi); }
.t-auth { color: var(--cyan); }
.t-res { color: var(--violet); }
.t-build { color: var(--green); }
.t-sec { color: var(--amber); }

.mini {
  padding: 16px; border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.15s;
}
.mini:hover { border-color: var(--line-2); }
.mini .ic { color: var(--muted); }
.mini .v { font: 700 22px var(--sans); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; color: var(--text); }
.mini .l { font-size: 12px; color: var(--text-2); font-weight: 500; }

/* Themes grid */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.theme {
  position: relative; border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-input);
  padding: 8px; cursor: pointer; text-align: left;
  transition: 0.15s;
}
.theme:hover { border-color: var(--line-2); transform: translateY(-1px); }
.theme.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-accent);
}
.theme canvas { width: 100%; aspect-ratio: 16/9; border-radius: 8px; display: block; background: var(--bg-2); }
.theme b { display: block; font: 600 13px var(--sans); margin: 10px 4px 2px; letter-spacing: -0.01em; color: var(--text); }
.theme span { display: block; font-size: 11.5px; color: var(--text-2); margin: 0 4px 4px; }
.theme .tick {
  position: absolute; top: 14px; right: 14px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent);
  display: none; place-items: center; color: #0b0b0d;
  box-shadow: var(--shadow-accent);
}
.theme.on .tick { display: grid; }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(8, 8, 10, 0.5);
  transition: 0.15s;
}
.swatch:hover { transform: scale(1.06); }
.swatch.on { border-color: #fff; transform: scale(1.08); }

.drop {
  border: 1.5px dashed var(--line-2);
  border-radius: 12px; padding: 28px;
  text-align: center; color: var(--text-2);
  cursor: pointer; transition: 0.15s;
  background: var(--panel-input);
}
.drop:hover, .drop.over {
  border-color: var(--accent); background: var(--accent-soft); color: var(--text);
}
.drop .ic { margin: 0 auto 10px; color: var(--muted); }
.drop:hover .ic, .drop.over .ic { color: var(--accent-hi); }
.drop b { color: var(--text); display: block; font: 600 13px var(--sans); margin-bottom: 4px; }

.progress { height: 6px; border-radius: 6px; background: rgba(232, 234, 240, 0.06); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); transition: width 0.2s; }

.code {
  font: 12.5px/1.6 var(--mono);
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px;
  overflow-x: auto; white-space: pre; color: #cfd3df;
}
.code .k { color: var(--accent-hi); }
.code .s { color: var(--green); }
.code .c { color: var(--dim); }

.method { font: 700 10.5px var(--mono); padding: 3px 7px; border-radius: 5px; letter-spacing: 0.04em; }
.m-get { color: var(--green); background: rgba(143, 227, 167, 0.1); }
.m-post { color: var(--accent-hi); background: var(--accent-soft); }
.m-del { color: var(--red); background: rgba(229, 115, 115, 0.1); }
.kill-on { border-color: rgba(229, 115, 115, 0.35) !important; background: linear-gradient(180deg, rgba(229, 115, 115, 0.07), var(--panel)) !important; }

/* Overlays */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(4, 4, 6, 0.6);
  backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  animation: fade 0.15s both;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(480px, 100%); max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--panel-raised); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.modal.wide { width: min(640px, 100%); }
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(6px); } }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 20px 22px 6px; }
.modal-h h3 { margin: 0; font: 600 16px var(--sans); letter-spacing: -0.015em; }
.modal-h p { margin: 3px 0 0; color: var(--text-2); font-size: 12.5px; }
.modal-h .icon-btn { margin-left: auto; }
.modal-b { padding: 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; }

.drawer-ov { position: fixed; inset: 0; z-index: 40; background: rgba(4, 4, 6, 0.5); animation: fade 0.15s both; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41;
  width: min(460px, 100%);
  background: var(--panel-raised); border-left: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: slide 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-h { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.drawer-b { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 20px; }
.drawer-f { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }

.kv { display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px; font-size: 13px; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.sect-t { font: 600 10.5px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }

.big-key { font: 600 15px var(--mono); letter-spacing: -0.015em; word-break: break-all; color: var(--text); }
.keys-out { max-height: 260px; overflow: auto; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); }
.keys-out div {
  font: 500 12.5px var(--mono); padding: 9px 12px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--text);
}
.keys-out div:nth-child(even) { background: rgba(232, 234, 240, 0.025); }

.palette {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(4, 4, 6, 0.55);
  backdrop-filter: blur(6px);
  display: flex; justify-content: center; align-items: flex-start;
  padding-top: 12vh; animation: fade 0.12s both;
}
.palette-box {
  width: min(620px, calc(100% - 32px));
  background: var(--panel-raised); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  overflow: hidden; animation: pop 0.18s both;
}
.palette-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette-in input { flex: 1; height: 56px; border: 0; background: transparent; outline: none; font: 400 15px var(--sans); color: var(--text); }
.palette-in input::placeholder { color: var(--muted); }
.palette-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-sec { padding: 10px 10px 4px; font: 600 10.5px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.palette-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px;
  cursor: pointer; color: var(--text-2);
  font: 400 13px var(--sans);
  transition: 0.1s;
}
.palette-item b { color: var(--text); font-weight: 500; }
.palette-item .r { margin-left: auto; font-size: 12px; color: var(--dim); }
.palette-item.on { background: var(--accent-soft); color: var(--text); }
.palette-item.on .ic { color: var(--accent-hi); }
.palette-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); }

.popover {
  position: absolute; right: 0; top: 46px; width: 380px; z-index: 30;
  background: var(--panel-raised); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: none; overflow: hidden;
}
.popover.open { display: block; animation: pop 0.16s both; }
.popover .ph { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.popover .ph b { flex: 1; font-weight: 600; font-size: 13.5px; color: var(--text); }
.popover .feed-item { padding: 12px 18px; }
.popover .scroll { max-height: 380px; overflow-y: auto; }

.menu {
  position: fixed; z-index: 70; min-width: 200px;
  background: var(--panel-raised); border: 1px solid var(--line-2);
  border-radius: 11px; padding: 5px;
  box-shadow: var(--shadow-lg);
  display: none;
}
.menu.open { display: block; animation: pop 0.12s both; }
.menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 11px;
  border: 0; background: transparent; border-radius: 7px;
  cursor: pointer; text-align: left;
  font: 500 13px var(--sans); color: var(--text);
}
.menu button .ic { color: var(--muted); }
.menu button:hover { background: var(--accent-soft); }
.menu button:hover .ic { color: var(--accent-hi); }
.menu button.danger { color: var(--red); }
.menu button.danger .ic { color: var(--red); }
.menu button.danger:hover { background: rgba(229, 115, 115, 0.1); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 2px; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 15px; border-radius: 11px;
  background: var(--panel-raised); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-md);
  font: 500 13px var(--sans);
  animation: slide 0.2s both; max-width: 380px;
  color: var(--text);
}
.toast .ic { color: var(--green); }
.toast.err .ic { color: var(--red); }
.toast.info .ic { color: var(--accent-hi); }
.toast.out { opacity: 0; transform: translateY(6px); transition: 0.2s; }

.scrim { display: none; }

@media (max-width: 1280px) {
  .g-overview { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 35; transform: translateX(-100%); transition: transform 0.22s; width: 248px; }
  body.side-open .sidebar { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; z-index: 34; background: rgba(0, 0, 0, 0.55); }
  body.collapsed { --sidebar: 248px; }
  .collapse-btn { display: none; }
  .icon-btn.mobile-only { display: grid; }
  .topbar, .view { padding-left: 16px; padding-right: 16px; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .search kbd { display: none; }
  .hero h1 { font-size: 26px; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .g-4 { grid-template-columns: 1fr 1fr; }
  .status-pill span { display: none; }
  .toolbar .search-in { width: 100%; }
  .card-h { flex-wrap: wrap; }
  .card-h .right { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .stat .foot .dim, .stat .spark { display: none; }
  .stat .val { font-size: 24px; }
  .hero { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ───── Login + live-dot + locked state ───── */
body.locked .app { filter: blur(6px) brightness(0.4); pointer-events: none; }
body.locked .app, body.locked .app * { user-select: none; }
.login {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(60% 50% at 50% 0%, var(--accent-soft), transparent 70%),
    radial-gradient(40% 40% at 50% 100%, color-mix(in srgb, var(--violet) 10%, transparent), transparent 70%),
    rgba(4, 4, 6, 0.6);
  backdrop-filter: blur(10px);
  animation: fade 0.2s both;
}
.login-box {
  width: min(400px, 100%);
  display: flex; flex-direction: column; gap: 14px;
  padding: 32px 28px 28px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel-raised) 92%, var(--accent)) 0%, var(--panel-raised) 60%);
  border: 1px solid var(--line-2);
  border-radius: 20px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: pop 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  position: relative; overflow: hidden;
}
.login-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-hi), transparent);
}
.login-box .brand-mark { margin-bottom: 4px; }
.login-box h2 { margin: 0; font: 700 22px var(--sans); letter-spacing: -0.028em; }
.login-box > p { margin: -8px 0 4px; font-size: 13px; color: var(--text-2); }
.login-err {
  color: var(--red); font-size: 12.5px;
  padding: 10px 12px; border-radius: 9px;
  background: rgba(229, 115, 115, 0.08); border: 1px solid rgba(229, 115, 115, 0.3);
}
.input.otp { letter-spacing: 0.4em; text-align: center; font: 500 16px var(--mono); }

.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 var(--green), 0 0 6px color-mix(in srgb, var(--green) 50%, transparent);
  animation: ping 2s infinite;
}
.live-dot.big { width: 9px; height: 9px; }
.muted.note { cursor: pointer; border-bottom: 1px dashed transparent; transition: 0.1s; }
.muted.note:hover { color: var(--text); border-bottom-color: rgba(232, 234, 240, 0.2); }

#syncBtn.spin .ic { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───── IP history drawer rows ───── */
.ip-row { padding: 10px 0; border-top: 1px solid var(--line); }
.ip-row:first-child { border-top: 0; }
.ip-row.ip-cur { position: relative; }
.ip-row.ip-cur::before { content: ''; position: absolute; left: -12px; top: 14px; width: 4px; height: 20px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }

.ip-row .pill { cursor: pointer; transition: border-color .1s, background .1s; }
.ip-row .pill:hover { border-color: var(--line-3); background: color-mix(in srgb, var(--panel-input) 80%, var(--accent)); color: var(--text); }
