:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-2: #f1f3f9;
  --border: #e3e6ef;
  --text: #171a26;
  --muted: #6b7185;
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --accent-soft: #eef0ff;
  --danger: #d92d43;
  --danger-soft: #fdecef;
  --ok: #16a34a;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --radius: 10px;
  --check-a: #eceef4;
  --check-b: #ffffff;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1117; --panel: #171a23; --panel-2: #1e2230; --border: #2a2f3f; --text: #e8eaf2; --muted: #9097ab;
    --accent: #7c74ff; --accent-soft: #24234a; --danger: #ff5c72; --danger-soft: #3a1820;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35); --check-a: #1e2230; --check-b: #262b3b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1117; --panel: #171a23; --panel-2: #1e2230; --border: #2a2f3f; --text: #e8eaf2; --muted: #9097ab;
  --accent: #7c74ff; --accent-soft: #24234a; --danger: #ff5c72; --danger-soft: #3a1820;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35); --check-a: #1e2230; --check-b: #262b3b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[hidden] { display: none !important; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
code { background: var(--panel-2); padding: 1px 5px; border-radius: 5px; }
pre { background: var(--panel-2); padding: 12px 14px; border-radius: 8px; overflow: auto; white-space: pre; margin: 8px 0 14px; }
h2 { font-size: 18px; margin: 0; }
h3 { font-size: 15px; margin: 0 0 10px; }
h4 { font-size: 13px; margin: 14px 0 6px; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.error { color: var(--danger); margin: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); font: inherit; font-weight: 500; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); }
.btn:focus-visible, .select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 28px; padding: 0 9px; font-size: 12.5px; }
.btn-icon { width: 34px; padding: 0; }
.btn-block { width: 100%; }
input, .select {
  height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel); color: var(--text); font: inherit; min-width: 0;
}
input[type=range] { padding: 0; height: 22px; accent-color: var(--accent); border: 0; background: transparent; }
input[type=color] { padding: 2px; width: 100%; }
input[type=checkbox] { height: auto; accent-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--muted); }
.copyline { display: flex; gap: 6px; }
.copyline input { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* login */
.login { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.brand-lg { font-size: 20px; margin-bottom: 8px; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); position: relative; flex: none; }
.logo::after { content: ""; position: absolute; inset: 8px 6px 7px; background: linear-gradient(135deg, transparent 45%, #fff 46%); border-radius: 2px; }

/* shell */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  background: var(--panel); border-right: 1px solid var(--border); padding: 18px 14px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--panel-2); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.usage { margin-top: 6px; padding: 12px; border-radius: var(--radius); background: var(--panel-2); display: grid; gap: 6px; font-size: 12.5px; }
.usage-row { display: flex; justify-content: space-between; color: var(--muted); }
.usage-row strong { color: var(--text); font-weight: 600; }
.sidebar-foot { margin-top: auto; display: flex; justify-content: space-between; }
.main { min-width: 0; display: flex; flex-direction: column; }
.view { display: flex; flex-direction: column; min-height: 100vh; }
.menu-btn { display: none; }

.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.search { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--muted); }
.search input { border: 0; padding: 0; height: 100%; flex: 1; background: transparent; outline: none; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { height: 32px; width: 34px; border: 0; background: var(--panel); color: var(--muted); cursor: pointer; font-size: 15px; }
.seg button.active { background: var(--accent-soft); color: var(--accent); }

.crumbs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px 6px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-weight: 600; }
.crumbs a { color: var(--muted); text-decoration: none; padding: 2px 6px; border-radius: 6px; }
.crumbs a:hover { background: var(--panel-2); color: var(--text); }
.crumbs a:last-child { color: var(--text); }
.crumbs .sep { color: var(--muted); }

.selection-bar {
  margin: 6px 20px 0; padding: 8px 10px 8px 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--accent-soft); border-radius: var(--radius); font-weight: 600;
}
.selection-bar span { margin-right: auto; color: var(--accent); }

/* library grid */
.library { padding: 12px 20px 8px; }
.library.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tile {
  position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: box-shadow .15s, border-color .15s; min-width: 0;
}
.tile:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.tile.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.checker {
  background-color: var(--check-b);
  background-image: linear-gradient(45deg, var(--check-a) 25%, transparent 25%, transparent 75%, var(--check-a) 75%),
                    linear-gradient(45deg, var(--check-a) 25%, transparent 25%, transparent 75%, var(--check-a) 75%);
  background-size: 16px 16px; background-position: 0 0, 8px 8px;
}
.tile-info { padding: 8px 10px; border-top: 1px solid var(--border); }
.tile-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { color: var(--muted); font-size: 12px; }
.tile-check {
  position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--border); opacity: 0; transition: opacity .1s; font-size: 13px; color: var(--accent-ink);
}
.tile:hover .tile-check, .tile.selected .tile-check, .library.selecting .tile-check { opacity: 1; }
.tile.selected .tile-check { background: var(--accent); border-color: var(--accent); }
.tile-check::after { content: "✓"; opacity: 0; }
.tile.selected .tile-check::after { opacity: 1; }

.folder { display: flex; align-items: center; gap: 12px; padding: 14px; }
.folder-icon { width: 38px; height: 30px; border-radius: 5px; background: linear-gradient(#f5c451, #eab308); position: relative; flex: none; }
.folder-icon::before { content: ""; position: absolute; top: -5px; left: 0; width: 16px; height: 8px; border-radius: 3px 3px 0 0; background: #eab308; }
.folder .tile-name { font-weight: 600; flex: 1; min-width: 0; }
.folder-del { margin-left: auto; opacity: 0; color: var(--muted); }
.folder:hover .folder-del, .folder-del:focus-visible { opacity: 1; }
.folder-del:hover { color: var(--danger); background: var(--danger-soft); }

.file-icon { width: 54px; height: 66px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); display: grid; place-items: end center; padding-bottom: 8px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.file-icon.big { width: 90px; height: 110px; font-size: 14px; }

/* list mode */
.library.list { display: flex; flex-direction: column; gap: 0; }
.library.list .tile { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; border-radius: 0; border-width: 0 0 1px; padding: 6px 10px; }
.library.list .tile:first-child { border-top-width: 1px; }
.library.list .tile.selected { box-shadow: none; background: var(--accent-soft); }
.library.list .thumb { width: 56px; height: 42px; aspect-ratio: auto; border-radius: 6px; }
.library.list .tile-info { border: 0; padding: 0; display: contents; }
.library.list .tile-sub { text-align: right; }
.library.list .folder { padding: 6px 10px; }
.library.list .folder-icon { width: 34px; height: 26px; margin: 0 11px; }
.library.list .file-icon { width: 30px; height: 38px; padding-bottom: 3px; font-size: 8px; }
.library.list .tile-check { position: static; opacity: 1; display: none; }

.empty { text-align: center; padding: 60px 20px; }
.empty-art { width: 84px; height: 64px; margin: 0 auto 14px; border-radius: 12px; background: var(--accent-soft); position: relative; }
.empty-art::after { content: "⇪"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; color: var(--accent); }
.empty h3 { margin-bottom: 4px; }
.more { display: flex; justify-content: center; padding: 6px 0 30px; }

/* drawer */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 20; display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--border); box-shadow: -10px 0 30px rgba(0,0,0,.12);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.tabs { display: flex; gap: 4px; }
.tabs button { border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.tabs button.active { background: var(--accent-soft); color: var(--accent); }
.drawer-body { overflow: auto; padding: 16px; flex: 1; }
.preview { border-radius: var(--radius); border: 1px solid var(--border); min-height: 200px; max-height: 320px; display: grid; place-items: center; overflow: hidden; margin-bottom: 14px; }
.preview img { max-width: 100%; max-height: 320px; display: block; }
.d-name { word-break: break-all; }
.meta { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; margin: 0 0 14px; font-size: 13px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; word-break: break-all; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.tgrid .span2 { grid-column: span 2; }
.field-check { align-self: end; margin-bottom: 20px; }
.field b { color: var(--text); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; }
.chip { border: 1px solid var(--border); background: var(--panel-2); color: var(--text); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* upload */
.dropzone {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; pointer-events: none;
  background: color-mix(in srgb, var(--accent) 14%, transparent); border: 3px dashed var(--accent);
}
.dropzone div { background: var(--panel); padding: 16px 22px; border-radius: 12px; box-shadow: var(--shadow); font-size: 16px; }
.uploads {
  position: fixed; right: 16px; bottom: 16px; z-index: 30; width: min(360px, calc(100vw - 32px)); max-height: 50vh;
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.uploads header { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--border); }
.uploads ul { list-style: none; margin: 0; padding: 6px 0; overflow: auto; }
.uploads li { padding: 6px 14px; display: grid; gap: 4px; }
.up-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.up-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-status { color: var(--muted); flex: none; }
.up-status.ok { color: var(--ok); }
.up-status.err { color: var(--danger); }
.bar { height: 4px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }

/* docs */
.doc-body { padding: 20px; display: grid; gap: 16px; max-width: 980px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px; min-width: 0; }
.card p { margin: 0 0 10px; }
.kv { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.kv > span:first-child { color: var(--muted); }
.kv code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.card { overflow-x: auto; }

/* toast & dialog */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60;
  background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 500; max-width: calc(100vw - 32px);
}
.toast.err { background: var(--danger); color: #fff; }
.dialog { border: 1px solid var(--border); border-radius: 14px; padding: 22px; width: min(420px, calc(100vw - 32px)); background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(10, 12, 20, .45); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* phone */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; z-index: 30; width: 250px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .topbar, .crumbs-row, .library, .doc-body { padding-left: 16px; padding-right: 16px; }
  .selection-bar { margin: 6px 16px 0; }
  .library.grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .search { order: 10; flex-basis: 100%; }
  #sort { flex: 1; }
  .kv { grid-template-columns: 1fr; gap: 4px; }
}

/* roles */
body:not(.has-user) .user-only, body:not(.is-admin) .admin-only { display: none !important; }
.who { display: grid; gap: 2px; padding: 0 4px; }
.who-role { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.who strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .field { margin: 10px 0 0; }
.grow { flex: 1; }

/* users & keys */
.doc-body.wide { max-width: none; }
.card.flush { padding: 0; }
.card.flush .table th:first-child, .card.flush .table td:first-child { padding-left: 18px; }
.card.flush .table th:last-child, .card.flush .table td:last-child { padding-right: 18px; }
.table td { vertical-align: middle; }
.table .row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.table .sub { color: var(--muted); font-size: 12px; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill.off { background: var(--danger-soft); color: var(--danger); }
.pill.cur { background: var(--accent-soft); color: var(--accent); }
tr.revoked td { opacity: .55; }
.warn { background: color-mix(in srgb, #f59e0b 16%, transparent); color: var(--text); border-radius: 8px; padding: 9px 12px; font-weight: 500; }
.dialog-wide { width: min(560px, calc(100vw - 32px)); }
.kv-stack { margin-top: 12px; }
.empty-inline { padding: 26px 18px; text-align: center; color: var(--muted); }
.notice { margin: 20px; padding: 18px; border: 1px dashed var(--border); border-radius: 12px; text-align: center; }

/* sign-in & profile */
.login-switch { text-align: center; margin: 14px 0 0; }
.linkish { border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pactions { flex-direction: row; align-items: end; gap: 8px; }
.pill.warn-pill { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; }
.users-table .sub a { color: inherit; }
@media (max-width: 860px) { .pgrid { grid-template-columns: 1fr; } }

/* security */
.alert-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 20px; background: var(--danger); color: #fff; }
.alert-banner .btn { margin-left: auto; }
.alert-card { border-color: var(--danger); background: var(--danger-soft); }
.alert-card h3 { color: var(--danger); }
.alert-card ul { margin: 6px 0 10px; padding-left: 18px; max-height: 180px; overflow: auto; }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-left: auto; }
.act-filter { width: 170px; }
.act-check { margin: 0; }
tr.warn-row td { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.table td.wrap { white-space: normal; word-break: break-word; max-width: 360px; }

/* custom domains */
.dom-add { display: grid; gap: 8px; margin: 4px 0 14px; }
.dom-add .field, .dom-add p { margin: 0; }
.dom-owner { max-width: 480px; }
.dom-host-row { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.dom-host-row .field { flex: 1; min-width: min(220px, 100%); }
.dom-result { padding: 12px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); }
.dom-result p { margin: 6px 0 0; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.steps code { word-break: break-all; }

/* monitor — data-viz tokens (reference palette: series-1 blue; fixed status palette) */
:root {
  --series-1: #2a78d6;
  --grid: #e7e6e2;
  --status-good: #0ca30c;
  --status-warning: #fab219;
  --status-critical: #d03b3b;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) { --series-1: #3987e5; --grid: #2e2f38; }
}
:root[data-theme="dark"] { --series-1: #3987e5; --grid: #2e2f38; }

.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.card-head .select { margin-left: auto; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checks li { display: grid; grid-template-columns: 22px 190px 1fr; gap: 8px; align-items: start; padding: 7px 4px; border-top: 1px solid var(--border); }
.checks li:first-child { border-top: 0; }
.checks .name { font-weight: 600; }
.checks .detail { color: var(--muted); word-break: break-word; }
.st-icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; }
.st-ok { background: var(--status-good); }
.st-warn { background: var(--status-warning); color: #1b1300; }
.st-fail { background: var(--status-critical); }
.overall { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.tile .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.tile .value { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.tiles-sm .tile { padding: 10px 12px; }
.tiles-sm .tile .value { font-size: 19px; }

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chart-card { margin: 0; }
.chart-card figcaption { margin-bottom: 6px; }
.chart { position: relative; height: 170px; }
.chart-tall { height: 210px; }
/* Charts opt out of the icon defaults (svg { stroke: currentColor }) set for the UI icons. */
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; stroke: none; fill: none; }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--series-1); opacity: .08; }
.chart .bar { fill: var(--series-1); }
.chart .bar.dim { opacity: .35; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--series-1); stroke: var(--panel); stroke-width: 2; }
.chart .empty-chart { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.tip {
  position: absolute; pointer-events: none; z-index: 3; background: var(--text); color: var(--bg);
  border-radius: 8px; padding: 6px 9px; font-size: 12px; white-space: nowrap; box-shadow: var(--shadow); transform: translate(-50%, -100%);
}
.tip b { font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-col { width: 22%; min-width: 90px; }
.hbar { height: 8px; border-radius: 0 4px 4px 0; background: var(--series-1); min-width: 2px; }
.drives { display: grid; gap: 12px; }
.drive-row { display: grid; grid-template-columns: 70px 1fr 220px; gap: 12px; align-items: center; }
.meter { height: 10px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--series-1); }
.meter i.warn { background: var(--status-warning); }
.meter i.fail { background: var(--status-critical); }

@media (max-width: 860px) {
  .chart-grid { grid-template-columns: 1fr; }
  .checks li { grid-template-columns: 22px 1fr; }
  .checks .detail { grid-column: 2; }
  .drive-row { grid-template-columns: 60px 1fr; }
  .drive-row .sub { grid-column: 1 / -1; }
}

/* domain verification log */
.diag-row td { background: var(--panel-2); padding: 12px 18px 14px !important; }
.diag { display: grid; gap: 8px; }
.diag-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.diag-head .sub { margin-left: auto; }
.diag-hint { border-left: 3px solid var(--status-warning); background: var(--panel); padding: 8px 12px; border-radius: 6px; line-height: 1.5; }
.diag-ok .diag-hint { border-left-color: var(--status-good); }
.diag-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.diag-steps li { display: grid; grid-template-columns: 22px 170px 1fr; gap: 8px; align-items: start; }
.diag-steps .name { font-weight: 600; }
.diag-steps .detail { word-break: break-word; color: var(--muted); }
.st-info { background: var(--muted); }
.diag-actions { margin-top: 6px; }
.diag-history { margin-top: 10px; display: grid; gap: 6px; }
.diag-history summary { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.diag-history details > .diag { margin: 8px 0 6px 28px; }
tr.has-diag td { border-bottom: 0; }
@media (max-width: 860px) { .diag-steps li { grid-template-columns: 22px 1fr; } .diag-steps .detail { grid-column: 2; } }
