/* ==========================================================================
   PHPWeb Backup — panel UI
   Self-hosted, CSP-safe (no inline styles). Light + dark theme.
   ========================================================================== */
:root {
  --ink: #161a33;            /* sidebar — brand indigo, darkened */
  --ink-2: #1f2445;
  --ink-text: #b9c0e8;
  --bg: #f2f3f8;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --line: #e3e5ef;
  --line-strong: #cfd3e3;
  --text: #1c2033;
  --muted: #6b7190;
  --primary: #5b63e8;
  --primary-2: #7047e8;
  --primary-soft: #eceeff;
  --ok: #1fa774;
  --ok-bright: #34c38f;
  --ok-soft: #e3f7ee;
  --warn: #c98200;
  --warn-soft: #fff3db;
  --bad: #d93d42;
  --bad-soft: #fde8e8;
  --idle: #a3a8c3;
  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(22, 26, 51, .06), 0 4px 16px rgba(22, 26, 51, .04);
  --font: "Noto Sans Georgian", "BPG Arial", "FiraGO", "Segoe UI", system-ui, -apple-system, Roboto, Ubuntu, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --ink: #0f1124;
  --ink-2: #191c38;
  --bg: #13152b;
  --surface: #1b1e3a;
  --surface-2: #20244400;
  --surface-2: #212546;
  --line: #2c3158;
  --line-strong: #3a4070;
  --text: #e6e8f6;
  --muted: #959bc2;
  --primary: #8e95ff;
  --primary-soft: #272c5c;
  --ok-soft: #173a33;
  --warn-soft: #3d3216;
  --bad-soft: #43202a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.55;
  color: var(--text); background: var(--bg);
  font-feature-settings: "tnum" 1;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; }
h1 { font-size: 1.45rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; }
h3 { font-size: .95rem; }
p { margin: 0 0 .75rem; }
code, pre, .mono { font-family: var(--mono); font-size: .86em; }
pre { white-space: pre-wrap; word-break: break-word; margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 1rem; } .mt-sm { margin-top: .5rem; } .mb { margin-bottom: 1rem; } .mb-0 { margin-bottom: 0; }
.ok-text { color: var(--ok); } .bad-text { color: var(--bad); } .warn-text { color: var(--warn); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }

/* ---------------- shell ---------------- */
.scrim { display: none; }
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--ink); color: var(--ink-text); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 20px 14px; overflow-y: auto; z-index: 40;
}
.sidebar .brand { display: block; padding: 4px 10px 22px; }
.sidebar .brand img { height: 34px; width: auto; display: block; }
.nav-group { margin-bottom: 18px; }
.nav-title { font-size: .76rem; color: #7d84b3; padding: 0 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; margin: 1px 0;
  color: var(--ink-text); border-radius: var(--radius); font-size: .93rem; text-decoration: none;
}
.nav a:hover { background: var(--ink-2); color: #fff; }
.nav a.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 6px 18px rgba(91, 99, 232, .35); }
[data-theme="dark"] .nav a.active { background: linear-gradient(135deg, #5b63e8, #7047e8); }
.nav .count { margin-left: auto; font-size: .75rem; background: rgba(255, 255, 255, .1); padding: 1px 8px; border-radius: 99px; }
.nav .count.bad { background: var(--bad); color: #fff; }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--ink-2); font-size: .8rem; color: #7d84b3; }
.sidebar-foot .health { display: flex; align-items: center; gap: 8px; color: var(--ink-text); margin-bottom: 6px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 16px 28px; border-bottom: 1px solid var(--line);
  background: var(--surface); position: sticky; top: 0; z-index: 30;
}
.topbar .title { flex: 1; min-width: 0; }
.topbar .title h1 { font-size: 1.2rem; }
.topbar .title .crumb { font-size: .82rem; color: var(--muted); }
.menu-btn { display: none; }
.content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; }

.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface);
  padding: 5px 12px 5px 5px; border-radius: 99px; cursor: pointer; color: var(--text); font: inherit;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem;
  color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); flex: none;
}
.user-btn .who { text-align: left; line-height: 1.2; }
.user-btn .who small { display: block; color: var(--muted); font-size: .74rem; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 12px 32px rgba(22, 26, 51, .14); padding: 6px; display: none;
}
.dropdown.open { display: block; }
.dropdown a, .dropdown button {
  display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 0; background: none; color: var(--text);
  font: inherit; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); }
.dropdown .danger { color: var(--bad); }

/* ---------------- surfaces ---------------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { flex: 1; }
.panel-head .sub { color: var(--muted); font-size: .83rem; font-weight: 400; display: block; margin-top: 2px; }
.panel-body { padding: 20px; }
.panel-body.tight { padding: 0; }
.grid { display: grid; gap: 18px; }
.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)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* metric tiles: number + context, no icon blobs */
.metric { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.metric .label { color: var(--muted); font-size: .84rem; display: flex; align-items: center; gap: 8px; }
.metric .value { font-size: 1.85rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.metric .value small { font-size: .95rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
.metric .foot { font-size: .8rem; color: var(--muted); }
.metric.alert .value { color: var(--bad); }

/* ---------------- heartbeat strip (signature element) ---------------- */
.beats { display: flex; gap: 3px; align-items: flex-end; height: 26px; }
.beat { width: 7px; border-radius: 2px; background: var(--line); height: 9px; }
.beat.ok { background: var(--ok-bright); height: 22px; }
.beat.bad { background: var(--bad); height: 26px; }
.beat.mixed { background: linear-gradient(var(--bad) 40%, var(--ok-bright) 40%); height: 24px; }
.beat.run { background: var(--primary); height: 16px; }

/* ---------------- status ---------------- */
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--idle); flex: none; }
.dot.online, .dot.success, .dot.ok { background: var(--ok-bright); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.offline, .dot.failed, .dot.bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.dot.pending, .dot.running, .dot.warn { background: #f0a020; box-shadow: 0 0 0 3px var(--warn-soft); }
.dot.running { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: var(--radius-sm); font-size: .78rem;
  font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.badge.ok, .badge.success, .badge.online { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.bad, .badge.failed, .badge.offline, .badge.danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.warn, .badge.running, .badge.pending, .badge.warning { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.primary, .badge.info { background: var(--primary-soft); color: var(--primary); border-color: transparent; }

/* ---------------- tables ---------------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table td.actions { text-align: right; white-space: nowrap; }
.table .strong { font-weight: 600; color: var(--text); }
.table .sub { display: block; font-size: .8rem; color: var(--muted); }
.empty { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty .icon { width: 34px; height: 34px; opacity: .5; display: block; margin: 0 auto 10px; }

/* ---------------- forms ---------------- */
.form-grid { display: grid; gap: 16px 18px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.col-12 { grid-column: span 12; } .col-8 { grid-column: span 8; } .col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; } .col-2 { grid-column: span 2; }
.field label, .label-block { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 6px; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.error-text { font-size: .8rem; color: var(--bad); margin-top: 5px; }
.input, select.input, textarea.input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface);
  color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 96px; resize: vertical; font-family: var(--mono); font-size: .85rem; }
.input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input.is-invalid { border-color: var(--bad); }
.input.sm { padding: 6px 10px; font-size: .86rem; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary); }
.check .t { font-weight: 600; font-size: .9rem; }
.check .d { font-size: .8rem; color: var(--muted); }
.switch-list > * + * { margin-top: 14px; }
.input-group { display: flex; }
.input-group .input { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; }
fieldset { border: 0; padding: 0; margin: 0; }
.section-title { font-size: .95rem; font-weight: 650; margin: 0 0 4px; }
.section-desc { color: var(--muted); font-size: .84rem; margin-bottom: 14px; }
.form-section { padding: 22px 20px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-actions { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 15px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: .88rem;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; color: #fff; }
[data-theme="dark"] .btn.primary { background: linear-gradient(135deg, #5b63e8, #7047e8); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); border-color: var(--bad-soft); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.danger-solid { background: var(--bad); color: #fff; border-color: transparent; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 5px 10px; font-size: .8rem; }
.btn.icon-only { padding: 7px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
form.inline { display: inline; }

/* ---------------- alerts ---------------- */
.flash { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; border: 1px solid transparent; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.err { background: var(--bad-soft); color: var(--bad); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash.info { background: var(--primary-soft); color: var(--primary); }
.flash ul { margin: 0; padding-left: 18px; }
.flash .close { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; }

/* ---------------- code / secrets ---------------- */
.codebox {
  position: relative; background: var(--ink); color: #dfe3ff; border-radius: var(--radius); padding: 14px 52px 14px 16px;
  font-family: var(--mono); font-size: .84rem; word-break: break-all;
}
.codebox .copy {
  position: absolute; right: 8px; top: 8px; background: rgba(255, 255, 255, .08); border: 0; color: #dfe3ff; border-radius: var(--radius-sm);
  padding: 6px; cursor: pointer;
}
.codebox .copy:hover { background: rgba(255, 255, 255, .16); }
.secret-code { font-family: var(--mono); font-size: 1.35rem; letter-spacing: .06em; font-weight: 700; color: #fff; }
.callout {
  border-radius: var(--radius-lg); padding: 20px; color: #fff;
  background: linear-gradient(135deg, #3f47c9, #6a3fd6); box-shadow: 0 12px 30px rgba(91, 99, 232, .3);
}
.callout h2 { color: #fff; margin-bottom: 6px; }
.callout p { color: #dcdfff; }
.callout .codebox { background: rgba(10, 12, 40, .45); }
.logbox { background: var(--ink); color: #cfd5ff; border-radius: var(--radius); padding: 16px; max-height: 520px; overflow: auto; font-family: var(--mono); font-size: .8rem; line-height: 1.6; }

/* ---------------- meters ---------------- */
.meter { height: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 99px; transition: width .6s ease; }
.meter.ok > span { background: var(--ok-bright); }
.meter.warn > span { background: #f0a020; }
.meter.bad > span { background: var(--bad); }
.meter-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: baseline; }
.meter-row .meter { grid-column: span 2; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.kv dt { color: var(--muted); font-size: .85rem; }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }

/* ---------------- charts ---------------- */
.chart { position: relative; width: 100%; min-height: 220px; }
.chart.h-160 { min-height: 160px; } .chart.h-280 { min-height: 280px; } .chart.h-60 { min-height: 60px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .tip {
  position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: .78rem; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .1s; z-index: 5;
}
.chart .tip.show { opacity: 1; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.donut-wrap { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: center; }
.donut-list { list-style: none; margin: 0; padding: 0; font-size: .86rem; }
.donut-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.donut-list li:last-child { border: 0; }
.donut-list i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-list b { margin-left: auto; font-weight: 600; }
.c-0 { background: #5b63e8; } .c-1 { background: #34c38f; } .c-2 { background: #f0a020; } .c-3 { background: #e5484d; }
.c-4 { background: #3fb6dc; } .c-5 { background: #a35bd8; } .c-6 { background: #8a90b0; } .c-7 { background: #e07bb0; }

/* ---------------- tabs / filters ---------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 14px; }
.tabs a { padding: 12px 12px 10px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; font-size: .88rem; text-decoration: none; }
.tabs a.active { color: var(--primary); border-color: var(--primary); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.seg a { padding: 6px 12px; font-size: .82rem; color: var(--muted); text-decoration: none; border-right: 1px solid var(--line); }
.seg a:last-child { border: 0; }
.seg a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.filters .input { width: auto; min-width: 150px; }

/* ---------------- pagination ---------------- */
.pager { display: flex; gap: 4px; padding: 14px 16px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.pager a, .pager span { min-width: 34px; padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: center; font-size: .85rem; text-decoration: none; color: var(--text); }
.pager .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .disabled { color: var(--muted); opacity: .5; }
.pager .info { border: 0; color: var(--muted); margin-right: auto; }

/* ---------------- client card list ---------------- */
.client-row { display: grid; grid-template-columns: minmax(200px, 1.4fr) minmax(150px, 1fr) 160px 120px auto; gap: 16px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.client-row:last-child { border-bottom: 0; }
.client-row:hover { background: var(--surface-2); }
.client-row .name { font-weight: 650; color: var(--text); display: flex; align-items: center; gap: 9px; }
.client-row .meta { font-size: .8rem; color: var(--muted); }
.client-head { background: var(--surface-2); font-size: .8rem; color: var(--muted); font-weight: 600; padding-top: 10px; padding-bottom: 10px; }
.client-head:hover { background: var(--surface-2); }

/* ---------------- db rows (client form) ---------------- */
.db-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr .7fr 1fr 1.1fr auto; gap: 8px; align-items: start; padding: 10px; border: 1px dashed var(--line-strong); border-radius: var(--radius); margin-bottom: 8px; }
.db-row .input { padding: 7px 9px; font-size: .84rem; }
.db-row .mini { font-size: .72rem; color: var(--muted); margin-bottom: 3px; display: block; }

/* ---------------- dialog ---------------- */
dialog.confirm { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(440px, 92vw); background: var(--surface); color: var(--text); box-shadow: 0 30px 60px rgba(0, 0, 0, .3); }
dialog.confirm::backdrop { background: rgba(15, 17, 36, .55); backdrop-filter: blur(2px); }
dialog.confirm .body { padding: 22px; }
dialog.confirm .body h3 { margin-bottom: 8px; font-size: 1.05rem; }
dialog.confirm .foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: var(--surface-2); border-top: 1px solid var(--line); }

/* ---------------- auth ---------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 520px); background: var(--surface); }
.auth-art {
  background: radial-gradient(1200px 600px at 10% 0%, #2b3190 0%, transparent 60%), radial-gradient(900px 500px at 100% 100%, #4b2a9c 0%, transparent 60%), var(--ink);
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-art img { height: 44px; width: auto; }
.auth-art h2 { font-size: 2.1rem; font-weight: 700; line-height: 1.2; max-width: 14em; letter-spacing: -.02em; }
.auth-art p { color: #b9c0e8; max-width: 34em; }
.auth-art .art-beats { display: flex; gap: 5px; align-items: flex-end; height: 70px; opacity: .9; }
.auth-art .art-beats span { width: 10px; border-radius: 3px; background: #34c38f; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 48px; }
.auth-form .inner { width: 100%; max-width: 360px; margin: 0 auto; }
.auth-form h1 { margin-bottom: 6px; }
.auth-form .field { margin-top: 16px; }
.auth-form .btn { width: 100%; margin-top: 22px; padding: 11px; }
.otp { font-family: var(--mono); font-size: 1.6rem; letter-spacing: .4em; text-align: center; }

/* ---------------- responsive ---------------- */
@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
  .client-row { grid-template-columns: 1.4fr 1fr 120px auto; }
  .client-row .beats-col { display: none; }
  .db-row { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .25s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: 20px 0 50px rgba(0, 0, 0, .35); }
  body.nav-open .scrim { display: block; }
  .scrim { display: none; position: fixed; inset: 0; background: rgba(15, 17, 36, .5); z-index: 35; }
  .menu-btn { display: inline-flex; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .form-grid > [class*="col-"] { grid-column: span 12; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .user-btn .who { display: none; }
  .client-row { grid-template-columns: 1fr auto; }
  .client-row .hide-sm { display: none; }
  .donut-wrap { grid-template-columns: 1fr; }
  .db-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .g-4 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* auth art bars */
.auth-art .art-beats .ab-0 { height: 30px; opacity: 0.35; }
.auth-art .art-beats .ab-1 { height: 44px; opacity: 0.39; }
.auth-art .art-beats .ab-2 { height: 38px; opacity: 0.44; }
.auth-art .art-beats .ab-3 { height: 52px; opacity: 0.48; }
.auth-art .art-beats .ab-4 { height: 47px; opacity: 0.53; }
.auth-art .art-beats .ab-5 { height: 58px; opacity: 0.57; }
.auth-art .art-beats .ab-6 { height: 40px; opacity: 0.62; }
.auth-art .art-beats .ab-7 { height: 62px; opacity: 0.67; }
.auth-art .art-beats .ab-8 { height: 55px; opacity: 0.71; }
.auth-art .art-beats .ab-9 { height: 66px; opacity: 0.75; }
.auth-art .art-beats .ab-10 { height: 49px; opacity: 0.80; }
.auth-art .art-beats .ab-11 { height: 70px; opacity: 0.84; }
.auth-art .art-beats .ab-12 { height: 61px; opacity: 0.89; }
.auth-art .art-beats .ab-13 { height: 68px; opacity: 0.93; }
.metric .value.small-value { font-size: 1.3rem; }
.shell { background: linear-gradient(to right, var(--ink) 248px, var(--bg) 248px); }
.event { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.event .dot { margin-top: 7px; }
.event:last-child { margin-bottom: 0; }
@media (max-width: 900px) { .shell { background: var(--bg); } }
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 8px; }
  .topbar .title { flex-basis: calc(100% - 140px); }
  .topbar > .btn:not(.menu-btn):not([data-theme-toggle]), .topbar > form, .topbar > .seg { order: 5; }
  .main { overflow-x: hidden; }
  .metric .value { font-size: 1.5rem; }
}

/* 2FA QR */
.qr-box { display: inline-block; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); line-height: 0; }
.qr-box svg { width: 220px; height: 220px; display: block; }
