/* ==========================================================================
   Design tokens. Dark is the default look; light mirrors it.
   The theme is chosen by data-theme on <html> (set by theme.js before first paint).
   ========================================================================== */
:root {
    --bg: #06080d;
    --bg-glow: rgba(120, 160, 40, .10);
    --side: #06080d;
    --card: #0c1118;
    --card-2: #111823;
    --line: #18202b;
    --line-2: #243040;
    --text: #eef1f5;
    --text-2: #aeb7c2;
    --muted: #6f7a88;
    --accent: #d6f36b;
    --accent-fg: #d6f36b;
    --accent-ink: #10150a;
    --accent-soft: rgba(214, 243, 107, .11);
    --accent-line: rgba(214, 243, 107, .28);
    --ok: #62d394;
    --warn: #f0c659;
    --bad: #ff7373;
    --info: #74b8ff;
    --ok-soft: rgba(98, 211, 148, .12);
    --warn-soft: rgba(240, 198, 89, .12);
    --bad-soft: rgba(255, 115, 115, .12);
    --info-soft: rgba(116, 184, 255, .12);
    --shadow: 0 18px 50px rgba(0, 0, 0, .55);
    --radius: 10px;
    --font: "Inter Tight", "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
    color-scheme: dark;
}
:root[data-theme="light"] {
    --bg: #f4f5f0;
    --bg-glow: rgba(170, 210, 60, .20);
    --side: #fbfbf8;
    --card: #ffffff;
    --card-2: #f6f7f2;
    --line: #e2e5dc;
    --line-2: #cfd4c7;
    --text: #10141a;
    --text-2: #414a56;
    --muted: #6d7682;
    --accent: #c5ea3f;
    --accent-fg: #4d6a00;
    --accent-ink: #141a05;
    --accent-soft: rgba(140, 180, 0, .15);
    --accent-line: rgba(100, 135, 0, .35);
    --ok: #178a4b;
    --warn: #a86a00;
    --bad: #cf3d3d;
    --info: #1f6fc0;
    --ok-soft: rgba(23, 138, 75, .11);
    --warn-soft: rgba(168, 106, 0, .12);
    --bad-soft: rgba(207, 61, 61, .10);
    --info-soft: rgba(31, 111, 192, .10);
    --shadow: 0 18px 50px rgba(20, 30, 10, .16);
    color-scheme: light;
}

* { box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a.link { color: var(--accent-fg); }
a.link:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.icon { width: 15px; height: 15px; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hide { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-fg); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 208px minmax(0, 1fr); min-height: 100vh; }
.side {
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--side); border-right: 1px solid var(--line);
    padding: 14px 8px 20px; scrollbar-width: thin;
}
.brand { display: block; padding: 2px 10px 18px; font-weight: 800; font-size: 14px; line-height: .95; letter-spacing: -.02em; }
.brand span { display: block; }
.brand em { font-style: normal; color: var(--accent-fg); }
.nav-label, .eyebrow {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--serif); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase;
    color: var(--accent-fg);
}
.nav-label::before, .eyebrow::before { content: ""; width: 14px; height: 1.5px; background: var(--accent-fg); }
.nav-label { padding: 14px 10px 7px; }
.nav a {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 10px; margin: 1px 0; border-radius: 7px;
    color: var(--text-2); font-weight: 500; font-size: 13px;
}
.nav a:hover { background: var(--card-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.nav a.active .icon { color: var(--accent-fg); }
.nav a .tag { margin-left: auto; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 20px; padding: 0 6px; }
.nav a .count { margin-left: auto; font-size: 11px; background: var(--accent); color: var(--accent-ink); border-radius: 20px; padding: 0 6px; font-weight: 700; }

.main { min-width: 0; background: radial-gradient(900px 380px at 100% -80px, var(--bg-glow), transparent 70%) no-repeat; }
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 12px;
    height: 46px; padding: 0 22px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px);
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs a:hover { color: var(--text); }
.crumbs b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.search { position: relative; width: 250px; }
.search input { width: 100%; height: 30px; padding: 0 10px 0 30px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; }
.search input::placeholder { color: var(--muted); }
.search > .icon { position: absolute; left: 9px; top: 8px; color: var(--muted); }
.search-results { position: absolute; top: 36px; left: 0; right: 0; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); padding: 5px; }
.search-results a { display: block; padding: 7px 9px; border-radius: 7px; }
.search-results a:hover, .search-results a.sel { background: var(--accent-soft); }
.search-results small { display: block; color: var(--muted); }
.search-results .empty-row { padding: 9px; color: var(--muted); font-size: 12.5px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; color: var(--text-2); }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn .dot { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
[data-theme="light"] .only-dark, [data-theme="dark"] .only-light { display: none; }
.user { position: relative; }
.user > button { display: flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; padding: 0; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 11px; flex: none; }
.avatar.sq { border-radius: 7px; background: var(--card-2); color: var(--text-2); border: 1px solid var(--line); }
.menu { position: absolute; right: 0; top: 38px; min-width: 210px; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 30; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.menu a, .menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border-radius: 7px; background: none; border: 0; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--card-2); }

.page { padding: 22px 22px 60px; max-width: 1480px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; font-weight: 750; letter-spacing: -.02em; margin-top: 7px; }
.page-head .sub { color: var(--text-2); font-size: 12.5px; margin-top: 8px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- building blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 14px 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.card-head .hint { color: var(--muted); font-size: 12px; }
.card-head .actions { margin-left: auto; display: flex; gap: 6px; }
.grid { display: grid; gap: 10px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 10px; }

.stat { padding: 13px 15px 14px; }
.stat .k { font-size: 11.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 22px; font-weight: 750; letter-spacing: -.03em; margin-top: 5px; line-height: 1.1; }
.stat .v small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat .d { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.stat.is-bad .v { color: var(--bad); }
.stat.is-warn .v { color: var(--warn); }
.stat.na .v { color: var(--muted); font-size: 15px; font-weight: 600; margin-top: 9px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 31px; padding: 0 12px; border-radius: 8px;
    border: 1px solid var(--line-2); background: var(--card); color: var(--text);
    font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { border-color: transparent; background: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--card-2); color: var(--text); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
form.inline { display: inline; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 21px; padding: 0 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--card-2); color: var(--text-2); }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-info { background: var(--info-soft); color: var(--info); }
.chip { display: inline-block; padding: 1px 7px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 11.5px; color: var(--text-2); }

/* tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.t th { text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t th.right { text-align: right; } /* ".t th" is more specific than ".right": numeric headers must line up with their cells */
.t th a:hover { color: var(--text); }
.t th .sort { color: var(--accent-fg); }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover { background: color-mix(in srgb, var(--card-2) 60%, transparent); }
.t td.check, .t th.check { width: 30px; padding-right: 0; }
.t .primary-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.t .primary-cell b { font-weight: 650; display: block; }
.t .primary-cell small { color: var(--muted); display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; background: var(--card-2); border: 1px solid var(--line); flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--text-2); }
.na { color: var(--muted); }
td .na[title], .stat.na { cursor: help; }
.table-foot { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.pager { margin-left: auto; display: flex; gap: 4px; }
.pager a, .pager span { min-width: 26px; height: 26px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 7px; border: 1px solid var(--line); }
.pager a:hover { border-color: var(--line-2); color: var(--text); }
.pager .cur { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); font-weight: 700; }
.bulkbar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--accent-soft); border-bottom: 1px solid var(--accent-line); font-size: 12.5px; }

.toolbar { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar .grow { flex: 1; min-width: 160px; }

/* forms */
.field { display: block; margin-bottom: 12px; }
.field > span, .label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.field small, .help { display: block; color: var(--muted); font-size: 11.5px; margin-top: 4px; line-height: 1.4; }
.input, select.input, textarea.input {
    width: 100%; height: 33px; padding: 0 10px;
    background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px;
}
select.input { padding-right: 26px; }
textarea.input { height: auto; min-height: 76px; padding: 8px 10px; resize: vertical; font-family: var(--mono); font-size: 12px; }
.input:focus { outline: none; border-color: var(--accent-fg); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.sm { height: 30px; font-size: 12.5px; width: auto; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.checkline { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 9px; cursor: pointer; }
.checkline input { margin-top: 2px; accent-color: var(--accent-fg); }
.checkline small { display: block; color: var(--muted); font-size: 11.5px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-fg); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg label { padding: 6px 12px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--accent-soft); color: var(--text); }
.seg label + label { border-left: 1px solid var(--line-2); }
/* website Backups tab: left menu + one panel (tab_backups.php) */
.bk-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: start; }
.bk-nav { position: sticky; top: 74px; display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.bk-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: 13px; text-decoration: none; position: relative; }
.bk-nav-item svg { width: 16px; height: 16px; flex: none; opacity: .8; }
.bk-nav-item span { display: flex; flex-direction: column; min-width: 0; }
.bk-nav-item small { font-weight: 500; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-nav-item:hover { background: var(--card-2); color: var(--text); }
.bk-nav-item.on { background: var(--accent-soft); color: var(--text); }
.bk-nav-item.on::before { content: ""; position: absolute; left: -6px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
.bk-pane { display: none; }
.bk-pane.on { display: block; animation: bk-in .18s ease-out; }
.bk-pane > .card, .bk-pane > form.card { margin: 0; }
.bk-pane .g-cal { margin-bottom: 0 !important; }
@keyframes bk-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bk-pane.on { animation: none; } }
@media (max-width: 900px) {
    .bk-layout { grid-template-columns: minmax(0, 1fr); }
    .bk-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
    .bk-nav-item { flex: none; }
    .bk-nav-item small { display: none; }
    .bk-nav-item.on::before { left: 8px; right: 8px; top: auto; bottom: -6px; width: auto; height: 3px; }
}
.seg-wide { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
.seg-wide label { padding: 8px 16px; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 9px 12px; font-size: 12.5px; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent-fg); }
.tabs a.planned { color: var(--muted); font-weight: 500; }

/* alerts, empty states */
.alert { display: flex; gap: 10px; padding: 10px 13px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--card); font-size: 12.5px; margin-bottom: 12px; align-items: flex-start; }
.alert.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-soft); }
.alert.error { border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: var(--bad-soft); }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); }
.alert.info { border-color: color-mix(in srgb, var(--info) 35%, transparent); background: var(--info-soft); }
.alert b { font-weight: 700; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 14px; margin-bottom: 5px; }
.empty p { max-width: 460px; margin: 0 auto 12px; font-size: 12.5px; }
.empty .icon { width: 26px; height: 26px; margin-bottom: 8px; color: var(--muted); }

/* key/value lists and bar lists (as in the reference dashboard) */
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 7px 14px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.barlist { display: grid; gap: 9px; }
.barlist .r { display: grid; grid-template-columns: minmax(0, 1fr) 110px 62px; gap: 12px; align-items: center; font-size: 12.5px; }
.barlist .r > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent-fg); border-radius: 4px; }
.barlist .r .num { text-align: right; color: var(--text-2); }
.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; min-width: 90px; }
.progress i { display: block; height: 100%; background: var(--accent-fg); border-radius: 6px; transition: width .4s; }
.chart { width: 100%; height: 150px; display: block; }
.chart-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-2); }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.chart-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 9px; font-size: 11.5px; box-shadow: var(--shadow); }

/* backup calendar */
.g-cal { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-head b { font-size: 13.5px; letter-spacing: -.01em; }
.cal-nav { width: 26px; height: 26px; font-size: 15px; line-height: 1; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-dow { text-align: center; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 4px; }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 50px; border-radius: 8px; border: 1px solid transparent; font-size: 12px; color: var(--muted); }
.cal-day.has { background: var(--card-2); border-color: var(--line); color: var(--text); }
.cal-day:hover { border-color: var(--line-2); color: var(--text); }
.cal-day.today .num { text-decoration: underline; text-underline-offset: 3px; }
.cal-day.sel { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-fg); font-weight: 700; }
.cal-day i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent-fg); }
.cal-day i.dot-bad { background: var(--bad); }
.cal-day i.dot-run { background: var(--info); }
.cal-day i.dot-mixed { background: var(--accent-fg); box-shadow: 7px 0 0 var(--bad); margin-right: 7px; }
.cal-day em { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 9.5px; color: var(--muted); }
.rows { margin: 0 0 14px; }
.rows > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.rows dt { color: var(--text-2); }
.rows dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 1100px) { .g-cal { grid-template-columns: minmax(0, 1fr); } }

.log { font-family: var(--mono); font-size: 11.5px; line-height: 1.6; max-height: 420px; overflow: auto; padding: 12px 14px; }
.log div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
.log time { color: var(--muted); }
.log .warning span { color: var(--warn); }
.log .error span { color: var(--bad); }

.caps { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 8px; }
.cap { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
.cap .state { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--line-2); }
.cap.on .state { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.cap b { display: block; font-size: 12.5px; }
.cap code { color: var(--muted); font-size: 11px; }
.cap small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.cap.off b { color: var(--text-2); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 12.5px; }
.steps li { display: flex; gap: 9px; }
.steps li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.steps li.fail::before { content: "✕"; color: var(--bad); }
.steps li.unknown::before { content: "–"; color: var(--muted); }

.notif { display: flex; gap: 11px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: color-mix(in srgb, var(--accent-soft) 50%, transparent); }
.notif .sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--info); }
.notif .sev.success { background: var(--ok); } .notif .sev.warning { background: var(--warn); } .notif .sev.critical { background: var(--bad); }
.notif p { color: var(--text-2); font-size: 12.5px; white-space: pre-line; margin-top: 2px; }

dialog { border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--text); padding: 0; width: min(560px, calc(100vw - 30px)); box-shadow: var(--shadow); }
dialog.wide { width: min(760px, calc(100vw - 30px)); }
dialog::backdrop { background: rgba(3, 5, 9, .62); backdrop-filter: blur(2px); }
dialog .dlg-head { padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14px; display: flex; }
dialog .dlg-head button { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; }
dialog .dlg-body { padding: 16px 18px; max-height: 70vh; overflow: auto; }
dialog .dlg-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

.danger-zone { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.confirm-box { border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); background: var(--bad-soft); border-radius: 10px; padding: 14px 16px; }
.secret { font-family: var(--mono); font-size: 12px; background: var(--bg); border: 1px dashed var(--line-2); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; user-select: all; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(700px 360px at 80% 0, var(--bg-glow), transparent 70%); }
.auth .card { width: min(380px, 100%); padding: 26px 26px 22px; }
.auth h1 { font-size: 20px; letter-spacing: -.02em; margin: 10px 0 4px; }
.auth .brand { padding: 0 0 18px; font-size: 16px; }

@media (max-width: 1100px) {
    .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g-main, .g3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .side { position: fixed; z-index: 40; width: 230px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
    body.nav-open .side { transform: none; }
    .menu-btn { display: inline-grid !important; }
    .search { width: auto; flex: 1; }
    .page { padding: 16px 14px 50px; }
    .topbar { padding: 0 12px; }
    .crumbs { display: none; }
    .g2, .row, .row.r3 { grid-template-columns: minmax(0, 1fr); }
    .kv { grid-template-columns: 110px minmax(0, 1fr); }
}
.menu-btn { display: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- websites grid (partials/projects_table.php, ?view=grid): screenshot cards, like a site manager's thumbnails ---- */
.view-switch { display: inline-flex; gap: 4px; margin-left: auto; }
.view-switch .icon-btn.on { color: var(--accent-fg); border-color: var(--accent-line); background: var(--accent-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.site-grid-head { padding: 12px 16px 0; }
.site-grid-head .checkline { margin: 0; font-size: 12.5px; color: var(--muted); }
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; padding: 14px 16px 18px; }
.site-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color .2s, box-shadow .25s, transform .25s; }
.site-card:hover { border-color: var(--line-2); box-shadow: 0 14px 34px -18px rgba(0, 0, 0, .35); transform: translateY(-2px); }
.site-card:has(.site-check:checked) { border-color: var(--accent-line); box-shadow: 0 0 0 2px var(--accent-soft); }
.site-shot { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--card-2); border-bottom: 3px solid var(--info); overflow: hidden; }
.site-shot-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.site-shot-fallback b { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); font-size: 18px; font-weight: 700; color: var(--text-2); }
.site-shot-fallback img { max-width: 50%; max-height: 40%; object-fit: contain; }
.site-shot-fallback .site-shot-icon { width: 64px; height: 64px; border-radius: 14px; font-size: 18px; background: var(--card); }
.site-shot-fallback .site-shot-icon img.fav { max-width: none; max-height: none; }
/* favicon over the initials (helpers.php site_icon) */
.logo.has-fav { position: relative; overflow: hidden; }
.logo.has-fav img.fav { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 3px; background: var(--card-2); }
.site-shot-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 1.2s cubic-bezier(.22, 1, .36, 1); }
.site-card:hover .site-shot-img { transform: scale(1.04); }
.site-env { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 600; background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(4px); }
.site-card-body { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.site-card-main { display: grid; gap: 3px; min-width: 0; flex: 1; }
.site-name { font-weight: 650; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: none; }
.site-name:hover { text-decoration: underline; }
.site-url { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--muted); }
.site-dot--online { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.site-dot--offline { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.site-issue { flex: none; display: grid; place-items: center; width: 22px; height: 22px; cursor: help; }
.site-issue svg { width: 18px; height: 18px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-issue--warn svg { stroke: var(--warn); }
.site-issue--warn svg path:first-child { fill: var(--warn-soft); }
.site-issue--bad svg { stroke: var(--bad); }
.site-issue--bad svg path:first-child { fill: var(--bad-soft); }
.site-check { flex: none; width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }
.site-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 8px 14px 12px; border-top: 1px solid var(--line); }
.site-card-foot .icon { width: 13px; height: 13px; vertical-align: -2px; }
.site-shot-img.is-missing { display: none; }

/* ---- phases 3-9 ---- */
.page-sub-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.page-sub-head .actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.stat.is-ok .v { color: var(--ok); }
a.stat { color: inherit; text-decoration: none; }
a.stat:hover { border-color: var(--line-2); }
.nav a .tag.tag-bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: var(--bad-soft); }
td .bar { display: block; width: 100%; }

.issue-list { display: flex; flex-direction: column; }
.issue { border-top: 1px solid var(--line); }
.issue summary { display: flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer; list-style: none; }
.issue summary::-webkit-details-marker { display: none; }
.issue summary:hover { background: var(--card-2); }
.issue .issue-title { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; }
.issue .issue-title small { display: block; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.issue-body { padding: 4px 16px 14px 16px; font-size: 12.5px; color: var(--text-2); }
.issue-body p { margin: 0 0 8px; }
.issue[open] summary { background: var(--card-2); }
.issue.sev-critical summary { box-shadow: inset 3px 0 0 var(--bad); }
.issue.sev-warning summary { box-shadow: inset 3px 0 0 var(--warn); }
.issue.sev-info summary { box-shadow: inset 3px 0 0 var(--info); }
.issue-inline summary { cursor: pointer; list-style: none; }
.issue-inline summary::-webkit-details-marker { display: none; }
.issue-inline p { margin: 6px 0 0; }
.tabs-mini { display: inline-flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.tabs-mini a { padding: 4px 10px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--text-2); text-decoration: none; }
.tabs-mini a.on { background: var(--accent-soft); color: var(--text); }

.fm-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.fm-crumbs a { color: var(--text); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.fm-crumbs .icon { width: 15px; height: 15px; }
.fm-crumbs span { color: var(--muted); }
.fm-tools { display: flex; gap: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-top: 10px; padding-bottom: 10px; }
.fm-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fm .fm-name a, .fm .fm-file { display: inline-flex; align-items: center; gap: 7px; color: var(--text); text-decoration: none; }
.fm .icon { width: 15px; height: 15px; color: var(--muted); flex: none; }
.fm-pre { margin: 8px 0 0; padding: 12px; background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; overflow: auto; max-height: 62vh; color: var(--text); }

.scores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.score { text-align: center; padding: 10px 4px; border-radius: 10px; border: 1px solid var(--line); }
.score b { display: block; font-size: 24px; font-weight: 750; letter-spacing: -.03em; }
.score span { font-size: 11px; color: var(--muted); }
.score-ok b { color: var(--ok); } .score-warn b { color: var(--warn); } .score-bad b { color: var(--bad); }
span[class^="dot-"] { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; background: var(--muted); }
span.dot-ok { background: var(--ok); } span.dot-warn { background: var(--warn); } span.dot-bad { background: var(--bad); }
.compare td.best { color: var(--ok); font-weight: 700; }
@media (max-width: 700px) { .scores { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- SEO tab: horizontal sub-tabs, checklist, keywords ---- */
.subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.subnav-item { padding: 9px 12px; color: var(--text-2); font-weight: 600; font-size: 13px; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subnav-item:hover { color: var(--text); }
.subnav-item.on { color: var(--accent-fg); border-bottom-color: var(--accent); }
.subnav-sm .subnav-item { padding: 5px 10px; font-size: 12.5px; border: 0; border-radius: 7px; margin: 0; }
.subnav-sm .subnav-item.on { background: var(--accent-soft); color: var(--text); }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; margin: 0 2px 0 8px; }
.steps-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13px; }
.steps-list li.done::marker { color: var(--ok); }
.check-score { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.check-score-v { font-size: 26px; font-weight: 750; letter-spacing: -.03em; }
.check-score-v small { font-size: 13px; color: var(--muted); font-weight: 500; }
.meter { flex: 1; height: 6px; border-radius: 6px; background: var(--card-2); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 6px; background: var(--ok); transition: width .4s ease-out; }
.check-list { padding: 0 6px 6px; }
.check-row { border-top: 1px solid var(--line); }
.check-row:first-child { border-top: 0; }
.check-row > summary { display: flex; align-items: center; gap: 12px; padding: 11px 10px; list-style: none; cursor: pointer; }
.check-row > summary::-webkit-details-marker { display: none; }
.check-row[data-static] > summary { cursor: default; }
.check-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--ok-soft); color: var(--ok); }
.check-row.fail .check-ico { background: var(--warn-soft); color: var(--warn); }
.check-row.unknown .check-ico { background: var(--card-2); color: var(--muted); }
.check-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.check-text small { color: var(--muted); font-size: 11.5px; }
.check-pages { padding: 0 10px 12px 44px; display: grid; gap: 4px; font-size: 12px; overflow-wrap: anywhere; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 12px; max-height: 190px; overflow-y: auto; padding: 4px 0; }
.sitemap-row + .sitemap-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.scroll-y { max-height: 420px; overflow-y: auto; }
td.ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-ok { color: var(--ok); font-weight: 600; }
.t-warn { color: var(--warn); font-weight: 600; }
.t-bad { color: var(--bad); font-weight: 600; }
.strong { font-weight: 700; }
.kw-explain { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); font-size: 12.5px; line-height: 1.55; }
.kw-group { font-size: 9.5px; letter-spacing: .04em; margin-left: 6px; vertical-align: 1px; }
.kw-table td { white-space: nowrap; }
/* Websites table: compact cells (env chip beside the name, stacked status badges, GA/GSC dot flags). */
.env-chip { font-size: 10px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; font-weight: 600; }
.t td.stack { line-height: 1; }
.t td.stack > * { display: block; width: max-content; }
.t td.stack > * + * { margin-top: 4px; }
.dot-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); margin-right: 8px; }
.dot-flag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .45; }
.dot-flag.dot-ok { color: var(--ok, #16a34a); }
.dot-flag.dot-warn { color: var(--warn, #d97706); }
.dot-flag.dot-ok::before, .dot-flag.dot-warn::before { opacity: 1; }
.dot-flag:hover { text-decoration: underline; }
.seo-rules td { vertical-align: top; }
.rule-info summary { cursor: pointer; list-style: none; }
.rule-info summary::-webkit-details-marker { display: none; }
.rule-info summary::before { content: '▸'; display: inline-block; width: 1em; color: var(--muted); transition: transform .15s; }
.rule-info[open] summary::before { transform: rotate(90deg); }
.rule-info summary:hover { color: var(--text); }
.rule-info > p { margin: 8px 0 0 1em; color: var(--text-2); }
.rule-pages { margin: 8px 0 2px 1em; display: grid; gap: 4px; max-height: 320px; overflow-y: auto; overflow-wrap: anywhere; }
.rule-pages .mono { font-size: 11px; }
.bk-nav-item small.t-warn-soft { color: var(--warn); }
.bk-nav-item small.t-ok-soft { color: var(--ok); }
.bk-pane > .card:first-child { margin-top: 0 !important; }
.bk-nav-item small.t-bad-soft { color: var(--bad); }
.bk-pane > .grid:first-child, .bk-pane > form.card:first-child, .bk-pane > .stack:first-child { margin-top: 0 !important; }
.bk-pane > .card + .card, .bk-pane > .card + form.card, .bk-pane > form.card + .card { margin-top: 10px; }

/* ---- connector status ---- */
.conn-hero { overflow: hidden; }
.conn-hero-main { display: flex; align-items: center; gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
.conn-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 5px color-mix(in srgb, var(--muted) 18%, transparent); }
.tone-ok .conn-dot { background: var(--ok); box-shadow: 0 0 0 5px var(--ok-soft); }
.tone-warn .conn-dot { background: var(--warn); box-shadow: 0 0 0 5px var(--warn-soft); }
.tone-bad .conn-dot { background: var(--bad); box-shadow: 0 0 0 5px var(--bad-soft); }
.conn-hero-text { flex: 1; min-width: 220px; }
.conn-hero-text h2 { margin: 0; font-size: 16px; }
.conn-hero-text p { margin: 3px 0 0; overflow-wrap: anywhere; }
.conn-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.conn-hero-actions .btn svg, .conn-steps .btn svg { width: 15px; height: 15px; }
.conn-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.conn-tiles > div { padding: 12px 18px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.conn-tiles > div + div { border-left: 1px solid var(--line); }
.conn-tiles span { font-size: 11.5px; color: var(--text-2); }
.conn-tiles b { font-size: 16px; font-weight: 700; }
.conn-tiles small { color: var(--muted); font-size: 11.5px; }
@media (max-width: 900px) { .conn-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .conn-tiles > div:nth-child(3) { border-left: 0; } .conn-tiles > div:nth-child(n+3) { border-top: 1px solid var(--line); } }
.conn-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.conn-steps li { counter-increment: s; position: relative; padding-left: 38px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; font-size: 13px; }
.conn-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-fg); font-weight: 700; font-size: 12px; }
.conn-steps li span { color: var(--text-2); font-size: 12.5px; }
.conn-steps li .btn { margin-top: 6px; }

/* ---- sign-in page ---- */
.login-body { background: var(--bg); }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; }
.login-side { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; background: #070b12; color: #e9eef4; isolation: isolate; }
.login-side-glow { position: absolute; inset: -20% -30% auto auto; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(closest-side, rgba(214, 243, 107, .22), rgba(214, 243, 107, 0) 70%); z-index: -1; animation: login-drift 14s ease-in-out infinite alternate; }
.login-side-grid { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 60%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 30% 60%, #000 30%, transparent 75%); }
@keyframes login-drift { to { transform: translate(-60px, 80px) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .login-side-glow { animation: none; } }
.login-mark { display: flex; align-items: center; gap: 10px; font-size: 15px; letter-spacing: -.01em; }
.login-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #d6f36b; color: #10150a; font-weight: 800; font-size: 16px; box-shadow: 0 8px 24px -8px rgba(214, 243, 107, .55); }
.login-pitch { max-width: 440px; }
.login-eyebrow { display: inline-block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #d6f36b; margin-bottom: 14px; }
.login-pitch h2 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 28px; font-weight: 750; }
.login-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.login-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: #9fb0c0; line-height: 1.45; }
.login-points li i { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; background: rgba(214, 243, 107, .12); border: 1px solid rgba(214, 243, 107, .25); position: relative; }
.login-points li i::after { content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 9px; border: solid #d6f36b; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.login-points b { display: block; color: #e9eef4; font-weight: 650; }
.login-side-foot { font-size: 12px; color: #5d6b79; }

.login-main { display: grid; place-items: center; padding: 40px 24px; background: radial-gradient(600px 300px at 100% 0, var(--bg-glow), transparent 70%), var(--bg); }
.login-box { width: min(380px, 100%); animation: login-in .35s ease-out both; }
@keyframes login-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .login-box { animation: none; } }
.login-mark-text { display: flex; flex-direction: column; line-height: 1.15; }
.login-mark-text small { font-size: 11.5px; font-weight: 500; letter-spacing: .01em; opacity: .62; margin-top: 2px; }
.login-mark-sm { display: none; margin-bottom: 28px; color: var(--text); }
.login-title { font-size: 28px; letter-spacing: -.03em; margin: 0 0 6px; font-weight: 750; }
.login-sub { color: var(--text-2); margin: 0 0 26px; font-size: 14px; }
.login-error { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; margin-bottom: 18px; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); background: var(--bad-soft); font-size: 13px; line-height: 1.4; }
.login-error svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--bad); stroke-width: 2; stroke-linecap: round; }
.login-ok { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; margin-bottom: 18px; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-soft); font-size: 13px; line-height: 1.45; }
.login-ok svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: -2px; }
.login-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.login-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent-fg); cursor: pointer; }
.login-link { font-size: 13px; font-weight: 600; color: var(--accent-fg); text-decoration: none; }
.login-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.login-back { margin: 20px 0 0; }
.login-submit-link { text-decoration: none; }
.login-form { display: grid; gap: 16px; }
.login-field { display: grid; gap: 7px; }
.login-field > span:first-child { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.login-input { position: relative; display: flex; align-items: center; }
.login-input > svg { position: absolute; left: 13px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke .15s; }
.login-input input { width: 100%; height: 46px; padding: 0 44px 0 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); font: inherit; font-size: 14.5px; transition: border-color .15s, box-shadow .15s, background .15s; }
.login-input input::placeholder { color: var(--muted); }
.login-input input:hover { border-color: color-mix(in srgb, var(--accent-fg) 30%, var(--line-2)); }
.login-input input:focus { outline: none; border-color: var(--accent-fg); box-shadow: 0 0 0 4px var(--accent-soft); }
.login-input:focus-within > svg { stroke: var(--accent-fg); }
.login-input input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--card) inset; -webkit-text-fill-color: var(--text); caret-color: var(--text); }
.login-eye { position: absolute; right: 6px; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.login-eye:hover { background: var(--card-2); color: var(--text); }
.login-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-eye .eye-off, .login-eye.on .eye-on { display: none; }
.login-eye.on .eye-off { display: block; }
.login-caps { font-size: 12px; color: var(--warn); }
.login-submit { margin-top: 6px; height: 48px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 80%, transparent); transition: transform .12s ease-out, filter .15s, box-shadow .15s; }
.login-submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease-out; }
.login-submit:hover { filter: brightness(1.05); }
.login-submit:hover svg { transform: translateX(3px); }
.login-submit:active { transform: scale(.985); }
.login-submit.busy { pointer-events: none; opacity: .75; }
.login-submit.busy svg { animation: login-spin .8s linear infinite; }
@keyframes login-spin { to { transform: rotate(360deg); } }
.login-note { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; font-size: 12px; color: var(--muted); }
.login-note svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
@media (max-width: 900px) {
    .login { grid-template-columns: 1fr; }
    .login-side { display: none; }
    .login-mark-sm { display: flex; }
    .login-main { padding: 32px 16px; align-items: start; padding-top: 12vh; }
}

/* ---- website quick actions (visit site / open admin) ---- */
.qa { display: inline-flex; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
.qa-btn { height: 28px; padding: 0 10px 0 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .1s; }
.qa-btn .icon, .site-card-foot .qa-btn .icon { width: 14px; height: 14px; vertical-align: 0; color: var(--accent-fg); }
.qa-btn:hover:not([disabled]) { border-color: color-mix(in srgb, var(--accent-fg) 45%, var(--line-2)); background: var(--accent-soft); }
.qa-btn:active:not([disabled]) { transform: scale(.97); }
.qa-admin:not([disabled]) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.qa-admin:not([disabled]) .icon { color: var(--accent-ink); }
.qa-admin:hover:not([disabled]) { background: var(--accent); filter: brightness(1.06); }
.qa-btn[disabled] { opacity: .45; cursor: not-allowed; }
.name-row { display: flex; align-items: center; gap: 14px; }
.name-row .qa { margin-left: auto; padding-left: 4px; }
.name-row .qa-btn { width: 30px; height: 30px; padding: 0; justify-content: center; border-radius: 8px; }
.name-row .qa-btn span { display: none; }
.name-row .qa-btn .icon { width: 15px; height: 15px; }
.site-card-foot { flex-wrap: wrap; }
.site-card-foot .qa { display: flex; width: 100%; margin-top: 4px; }
.site-card-foot .qa-btn { flex: 1; justify-content: center; height: 32px; }
.site-form { max-width: 1080px; }
.site-form-actions { position: sticky; bottom: 0; margin-top: 12px; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 35%); z-index: 5; }
.logo-pick { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.logo-pick-current { flex: none; }

/* ---- site switcher (top bar) ---- */
.switcher { position: relative; }
.switcher-btn { display: flex; align-items: center; gap: 9px; height: 36px; min-width: 250px; max-width: 340px; padding: 0 10px 0 5px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); font: inherit; cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.switcher-btn:hover, .switcher-btn[aria-expanded="true"] { border-color: color-mix(in srgb, var(--accent-fg) 45%, var(--line-2)); background: var(--card-2); }
.switcher-logo { flex: none; width: 26px !important; height: 26px !important; border-radius: 7px !important; font-size: 10px !important; display: inline-grid; place-items: center; object-fit: cover; }
.switcher-all { background: var(--accent-soft); color: var(--accent-fg); }
.switcher-all .icon { width: 14px; height: 14px; }
.switcher-label { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.switcher-label b { font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switcher-label small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switcher kbd { font: inherit; font-size: 10.5px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 5px; line-height: 16px; background: var(--card-2); }
.switcher-caret { flex: none; width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.switcher-panel { position: absolute; top: 42px; right: 0; width: min(420px, calc(100vw - 24px)); background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); z-index: 60; overflow: hidden; animation: sw-in .14s ease-out; }
@keyframes sw-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .switcher-panel { animation: none; } }
.switcher-search { position: relative; padding: 10px; border-bottom: 1px solid var(--line); }
.switcher-search .icon { position: absolute; left: 22px; top: 21px; color: var(--muted); }
.switcher-search input { width: 100%; height: 36px; padding: 0 12px 0 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; }
.switcher-search input:focus { outline: none; border-color: var(--accent-fg); box-shadow: 0 0 0 3px var(--accent-soft); }
.switcher-list { max-height: min(420px, 60vh); overflow-y: auto; padding: 6px; }
.switcher-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px; color: var(--text); text-decoration: none; }
.switcher-item.sel { background: var(--accent-soft); }
.switcher-item.current .switcher-label b::after { content: " · current"; color: var(--accent-fg); font-weight: 500; font-size: 11px; }
.switcher-item.archived { opacity: .6; }
.switcher-item-all { border-bottom: 1px solid var(--line); border-radius: 9px 9px 0 0; margin-bottom: 4px; }
.switcher-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.switcher-dot.dot-up { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.switcher-dot.dot-down { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.switcher-crit { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad-soft); color: var(--bad); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.switcher-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 12.5px; }
.switcher-foot { display: flex; gap: 12px; flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.switcher-keep { margin-left: auto; }
@media (max-width: 900px) { .switcher-btn { min-width: 0; max-width: 200px; } .switcher-btn kbd, .switcher-btn small { display: none; } }

/* ---- overview ---- */
.ov-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 18px; }
.ov-head h1 { font-size: 26px; letter-spacing: -.03em; margin: 0 0 6px; }
.ov-sub { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.ov-pill { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 20px; font-weight: 650; font-size: 12.5px; }
.ov-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ov-pill.ok { background: var(--ok-soft); color: var(--ok); }
.ov-pill.warn { background: var(--warn-soft); color: var(--warn); }
.ov-pill.bad { background: var(--bad-soft); color: var(--bad); }
.ov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.ov-kpi { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "k ico" "v ico" "d d"; gap: 2px 10px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.ov-kpi:hover { border-color: color-mix(in srgb, var(--accent-fg) 35%, var(--line)); transform: translateY(-1px); }
.ov-kpi-ico { grid-area: ico; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-fg); }
.ov-kpi-ico .icon { width: 18px; height: 18px; }
.ov-kpi-k { grid-area: k; font-size: 12px; color: var(--text-2); }
.ov-kpi-v { grid-area: v; font-size: 28px; font-weight: 750; letter-spacing: -.03em; line-height: 1.15; }
.ov-kpi-v small { font-size: 14px; color: var(--muted); font-weight: 500; }
.ov-kpi-d { grid-area: d; font-size: 12px; color: var(--muted); margin-top: 4px; }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.ov-grid > .card { margin: 0; }
.ov-list { list-style: none; margin: 0; padding: 6px; }
.ov-site, .ov-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.ov-site:hover, .ov-row:hover { background: var(--card-2); }
.ov-site-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ov-site-main b { font-size: 13.5px; font-weight: 650; }
.ov-site-main small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-list li + li { border-top: 1px solid var(--line); }
.ov-when { flex: none; width: 70px; display: flex; flex-direction: column; line-height: 1.2; }
.ov-when b { font-size: 15px; font-weight: 700; }
.ov-when small { font-size: 11px; color: var(--muted); }
.ov-allgood { display: flex; gap: 14px; align-items: center; padding: 22px 18px; }
.ov-allgood b { display: block; font-size: 14px; }
.ov-allgood span { font-size: 12.5px; color: var(--muted); }
.ov-check { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font-weight: 800; font-size: 18px; }
.ov-kpi { grid-template-columns: 1fr; grid-template-areas: "k" "v" "bar" "d"; }
.ov-kpi-d { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.ov-kpi-d .ov-dot { margin-right: 7px; }
.ov-kpi-v small { margin-left: 2px; }
.ov-bar { grid-area: bar; display: block; height: 5px; margin-top: 8px; border-radius: 5px; background: var(--bad-soft); overflow: hidden; }
.ov-bar i { display: block; height: 100%; border-radius: 5px; background: var(--ok); }
.ov-dot.run { background: var(--accent-fg); box-shadow: 0 0 0 3px var(--accent-soft); }
.ov-attn { margin: 0 0 12px; border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.ov-status { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.ov-status small { font-size: 11.5px; color: var(--muted); }
.ov-st { font-size: 12px; font-weight: 650; display: inline-flex; align-items: center; gap: 6px; }
.ov-st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ov-st-ok { color: var(--ok); } .ov-st-bad { color: var(--bad); } .ov-st-run { color: var(--accent-fg); } .ov-st-muted { color: var(--muted); }
.ov-site-main b .chip { margin-left: 6px; font-weight: 500; vertical-align: 1px; }
.ov-days { padding: 2px 6px 6px; }
.ov-daytabs { display: flex; gap: 2px; overflow-x: auto; padding: 0 10px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.ov-daytab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 10px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.ov-daytab:hover { color: var(--text); }
.ov-daytab input { position: absolute; opacity: 0; pointer-events: none; }
.ov-daytab b { min-width: 18px; padding: 0 6px; border-radius: 9px; line-height: 18px; text-align: center; font-size: 11px; background: var(--card-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.ov-daytab:has(input:checked) { color: var(--text); border-bottom-color: var(--accent-fg); }
.ov-daytab:has(input:checked) b { background: var(--accent-soft); color: var(--text); }
.ov-daytab:has(input:focus-visible) { outline: 2px solid var(--accent-fg); outline-offset: -2px; border-radius: 6px; }
.ov-daypane { display: none; }
.card:has(.ov-daytab input[value="0"]:checked) .ov-daypane[data-day="0"],
.card:has(.ov-daytab input[value="1"]:checked) .ov-daypane[data-day="1"],
.card:has(.ov-daytab input[value="2"]:checked) .ov-daypane[data-day="2"],
.card:has(.ov-daytab input[value="3"]:checked) .ov-daypane[data-day="3"],
.card:has(.ov-daytab input[value="4"]:checked) .ov-daypane[data-day="4"],
.card:has(.ov-daytab input[value="5"]:checked) .ov-daypane[data-day="5"],
.card:has(.ov-daytab input[value="6"]:checked) .ov-daypane[data-day="6"] { display: block; }
.ov-time { flex: none; width: 46px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ov-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ov-areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ov-area { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ico k" "ico v" "ico d"; gap: 1px 12px; padding: 16px 18px; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.ov-area:nth-child(-n+2) { border-top: 0; }
.ov-area:nth-child(even) { border-left: 1px solid var(--line); }
.ov-area:hover { background: var(--card-2); }
.ov-area-ico { grid-area: ico; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--card-2); color: var(--text-2); align-self: start; margin-top: 2px; }
.ov-area-ico .icon { width: 16px; height: 16px; }
.ov-area-k { grid-area: k; font-size: 12px; color: var(--text-2); }
.ov-area b { grid-area: v; font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.ov-area b small { font-size: 12px; color: var(--muted); font-weight: 500; }
.ov-area > small { grid-area: d; font-size: 11.5px; color: var(--muted); }
@media (max-width: 1100px) { .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ov-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .ov-kpis { grid-template-columns: minmax(0, 1fr); } }

/* top bar: the site switcher matches the 30px buttons and stays on one line */
.switcher-btn { height: 30px; min-width: 220px; max-width: 300px; padding: 0 8px 0 4px; border-radius: 8px; border-color: var(--line); gap: 8px; }
.switcher-btn .switcher-logo { width: 22px !important; height: 22px !important; border-radius: 6px !important; font-size: 9px !important; }
.switcher-btn .switcher-label { flex-direction: row; align-items: baseline; gap: 6px; }
.switcher-btn .switcher-label small { display: none; }
.switcher-btn kbd { line-height: 15px; }
.switcher-panel { top: 38px; }

/* one-click admin login hand-off page */
.sso-wait { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.sso-wait p { color: var(--muted, #9aa7b4); margin: 0 0 14px; }

/* ---- analytics dashboard ---- */
.an-picker select.input, .an-picker .ss-btn { height: 34px; min-width: 280px; max-width: 380px; padding-left: 32px; font-weight: 600; }
.an-picker .ss-panel { min-width: 340px; right: 0; left: auto; }
.an-picker-l { position: relative; display: block; }
.an-picker-l > svg { position: absolute; z-index: 2; left: 10px; top: 17px; transform: translateY(-50%); width: 15px; height: 15px; color: var(--accent-fg); pointer-events: none; }
.an-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.an-toolbar-r { margin-left: auto; }
.an-live { display: inline-flex; align-items: center; gap: 5px; }
.an-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.an-live.on i { background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: an-pulse 2s infinite; }
@keyframes an-pulse { 0% { box-shadow: 0 0 0 0 rgba(98, 211, 148, .55); } 70% { box-shadow: 0 0 0 7px rgba(98, 211, 148, 0); } 100% { box-shadow: 0 0 0 0 rgba(98, 211, 148, 0); } }
@media (prefers-reduced-motion: reduce) { .an-live.on i { animation: none; } }
.an-delta { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--card-2); color: var(--text-2); margin-right: 4px; font-variant-numeric: tabular-nums; }
.an-delta.up { background: var(--ok-soft); color: var(--ok); }
.an-delta.down { background: var(--bad-soft); color: var(--bad); }
.an-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.an-bars li { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(60px, 1fr) auto 34px; align-items: center; gap: 10px; font-size: 12.5px; }
.an-bars-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.an-bars .meter span { background: var(--accent); }
.an-bars b { font-variant-numeric: tabular-nums; text-align: right; }
.an-bars small { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.an-cc { font-size: 10px; padding: 1px 4px; border-radius: 4px; background: var(--card-2); border: 1px solid var(--line-2); margin-right: 6px; color: var(--text-2); }
.an-geo { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0; }
.an-map { padding: 14px; border-right: 1px solid var(--line); min-height: 220px; display: grid; place-items: center; }
.an-map svg { width: 100%; height: auto; display: block; }
.an-map path { fill: var(--card-2); stroke: var(--line-2); stroke-width: .4; transition: fill .15s; }
.an-map path.has { cursor: pointer; }
.an-map path:hover { stroke: var(--text-2); stroke-width: .8; }
.an-map-scale { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 8px; justify-self: start; }
.an-map-scale i { width: 90px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 18%, var(--card-2)), var(--accent)); }
.an-geo-list { padding: 16px; }
.an-sub { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 10px; }
.an-stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--card-2); gap: 2px; }
.an-stack span { display: block; height: 100%; }
.an-stack-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--text-2); }
.an-stack-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.an-stack-legend b { color: var(--text); margin-left: 3px; }
@media (max-width: 1000px) { .an-geo { grid-template-columns: minmax(0, 1fr); } .an-map { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---- searchable select (enhances select.input; the native select stays underneath for forms) ---- */
.ss { position: relative; width: 100%; }
.ss-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; }
.ss-btn { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; color: var(--text); font: inherit; font-size: 13px; padding-right: 8px; }
.ss-btn.sm { font-size: 12.5px; }
.ss-btn:hover { border-color: color-mix(in srgb, var(--accent-fg) 40%, var(--line-2)); }
.ss.open .ss-btn { border-color: var(--accent-fg); box-shadow: 0 0 0 3px var(--accent-soft); }
.ss-btn:disabled { opacity: .55; cursor: not-allowed; }
.ss-val { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-placeholder .ss-val { color: var(--muted); }
.ss-caret { flex: none; width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.ss.open .ss-caret { transform: rotate(180deg); }
.ss.is-invalid .ss-btn { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.ss-panel { position: absolute; left: 0; top: calc(100% + 5px); min-width: 100%; width: max-content; max-width: min(460px, calc(100vw - 24px)); background: var(--card); border: 1px solid var(--line-2); border-radius: 11px; box-shadow: var(--shadow); z-index: 70; overflow: hidden; animation: sw-in .12s ease-out; }
.ss.up .ss-panel { top: auto; bottom: calc(100% + 5px); }
.ss-search { padding: 7px; border-bottom: 1px solid var(--line); }
.ss-search input { width: 100%; height: 32px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font: inherit; font-size: 12.5px; }
.ss-search input:focus { outline: none; border-color: var(--accent-fg); }
.ss-list { max-height: min(300px, 50vh); overflow-y: auto; padding: 5px; outline: none; }
.ss-opt { padding: 7px 9px; border-radius: 7px; font-size: 12.5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.ss-opt.sel { background: var(--accent-soft); color: var(--text); }
.ss-opt.current { color: var(--text); font-weight: 650; }
.ss-opt.current::after { content: "✓"; float: right; margin-left: 12px; color: var(--accent-fg); }
.ss-opt.is-disabled { opacity: .45; cursor: default; }
.ss-group { padding: 8px 9px 4px; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ss-empty { padding: 12px; text-align: center; color: var(--muted); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .ss-panel { animation: none; } .ss-caret { transition: none; } }
.ss-sm { display: inline-block; width: auto; vertical-align: middle; }
.ss-sm .ss-btn { width: auto; min-width: 140px; height: 30px; }
.ga4-key { border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; margin-bottom: 12px; background: var(--card-2); }
.ga4-key summary { cursor: pointer; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.ga4-key[open] summary { margin-bottom: 4px; }

/* ---- notifications: filters, selection, delete ---- */
.nf-filters { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 10px; }
.nf-count { display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 3px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; line-height: 16px; text-align: center; }
.nf-search { position: relative; flex: 1; min-width: 180px; max-width: 320px; }
.nf-search .icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted); pointer-events: none; }
.nf-search .input { width: 100%; padding-left: 30px; }
.nf-bar { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); background: var(--card-2); font-size: 12.5px; }
.nf-bar-actions { margin-left: auto; display: flex; gap: 6px; }
.notif .nf-check { margin-top: 3px; flex: none; }
.notif .nf-del { width: 26px; height: 26px; flex: none; opacity: 0; font-size: 12px; transition: opacity .12s; }
.notif:hover .nf-del, .notif .nf-del:focus-visible { opacity: 1; }
.notif .nf-del:hover { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: var(--bad-soft); }
@media (hover: none) { .notif .nf-del { opacity: 1; } }

/* ---- site checklist ---- */
.ck-site { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.ck-site span { display: flex; flex-direction: column; line-height: 1.2; }
.ck-site small { color: var(--muted); font-size: 11.5px; }
.ck-score-sm { font-weight: 750; font-variant-numeric: tabular-nums; }
.ck-kpis { margin-bottom: 10px; }
.bulk-running { cursor: default; color: var(--text-2); }
.bulk-running small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bulk-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent-fg); animation: bulk-spin .8s linear infinite; }
@keyframes bulk-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bulk-spin { animation-duration: 2.4s; } }
.ck-kpis .stat .k .icon { width: 13px; height: 13px; color: var(--muted); }
.ck-groupcards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.ck-gcard { --c: var(--ok); padding: 12px 14px 13px; display: flex; flex-direction: column; gap: 7px; }
.ck-gcard.t-warn { --c: var(--warn); } .ck-gcard.t-bad { --c: var(--bad); }
.ck-gcard-head { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-gcard-head .icon { flex: none; width: 13px; height: 13px; color: var(--c); }
.ck-gcard-head span { overflow: hidden; text-overflow: ellipsis; }
.ck-gcard-val { display: flex; align-items: baseline; gap: 7px; }
.ck-gcard-val b { font-size: 19px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ck-gcard-val small { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ck-bar { height: 4px; border-radius: 2px; background: var(--card-2); overflow: hidden; }
.ck-bar i { display: block; height: 100%; border-radius: 2px; background: var(--c); }
.ck-gcard-foot { font-size: 11px; color: var(--muted); }
@media (max-width: 1200px) { .ck-groupcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ck-groupcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ck-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; align-items: center; padding: 16px 18px; margin-bottom: 10px; }
.ck-ring { --c: var(--ok); width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; grid-row: span 2; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--card-2) 0); position: relative; }
.ck-ring.t-warn { --c: var(--warn); } .ck-ring.t-bad { --c: var(--bad); }
.ck-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--card); }
.ck-ring b { position: relative; font-size: 21px; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.ck-ring b small { font-size: 11px; color: var(--muted); font-weight: 600; }
.ck-summary-text h2 { font-size: 15px; font-weight: 750; }
.ck-summary-text p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-2); }
.ck-groups { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 2; }
.ck-group-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--text-2); text-decoration: none; background: var(--card-2); }
.ck-group-pill .icon { width: 13px; height: 13px; }
.ck-group-pill b { font-variant-numeric: tabular-nums; }
.ck-card { margin-bottom: 10px; scroll-margin-top: 70px; }
.ck-card .card-head .icon { width: 15px; height: 15px; color: var(--accent-fg); }
.ck-list { list-style: none; margin: 0; padding: 0; }
.ck-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.ck-item:first-child { border-top: 0; }
.ck-state { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; margin-top: 1px; background: var(--card-2); color: var(--muted); }
.is-pass .ck-state { background: var(--ok-soft); color: var(--ok); }
.is-warn .ck-state { background: var(--warn-soft); color: var(--warn); }
.is-fail .ck-state { background: var(--bad-soft); color: var(--bad); }
.is-na { opacity: .6; }
.ck-body { flex: 1; min-width: 0; }
.ck-body summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.ck-body summary::-webkit-details-marker { display: none; }
.ck-body summary b { font-size: 13px; font-weight: 650; }
.ck-body summary b::after { content: " ▸"; color: var(--muted); font-size: 10px; font-weight: 400; }
.ck-body[open] summary b::after { content: " ▾"; }
.ck-detail { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.ck-more { margin-top: 8px; padding: 9px 11px; border-radius: 8px; background: var(--card-2); font-size: 12.5px; color: var(--text-2); }
.ck-more p { margin: 0; } .ck-more p + p { margin-top: 5px; }
.ck-more b { color: var(--text); }
.ck-actions { flex: none; display: flex; gap: 5px; align-items: center; }
.ck-actions form { margin: 0; }
@media (max-width: 700px) { .ck-item { flex-wrap: wrap; } .ck-actions { width: 100%; padding-left: 34px; } .ck-groups { grid-column: 1 / -1; } }

/* ---- site checklist: group tabs ---- */
.ck-tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.ck-tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 12.5px; font-weight: 600; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.ck-tab .icon { width: 14px; height: 14px; }
.ck-tab:hover { color: var(--text); }
.ck-tab.on { color: var(--text); border-bottom-color: var(--accent-fg); }
.ck-tab b { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.ck-badge { min-width: 18px; padding: 0 6px; border-radius: 9px; line-height: 18px; text-align: center; }
.ck-badge.bad { background: var(--bad-soft); color: var(--bad); }
.ck-badge.warn { background: var(--warn-soft); color: var(--warn); }
.ck-badge.ok { background: var(--ok-soft); color: var(--ok); }
.ck-group-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 5px; background: var(--card-2); border: 1px solid var(--line); font-size: 10.5px; font-weight: 600; color: var(--muted); vertical-align: 1px; }
.ck-allgood { display: flex; gap: 12px; align-items: center; padding: 22px 18px; }
.ck-allgood > span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font-weight: 800; }
.ck-allgood div { display: flex; flex-direction: column; }
.ck-allgood small { color: var(--muted); font-size: 12px; }
.ck-summary { grid-template-columns: auto minmax(0, 1fr); }
.ck-summary .ck-ring { grid-row: auto; }
.ck-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ck-title .ck-group-tag { margin-left: 0; }
.ov-score { font-weight: 750; font-variant-numeric: tabular-nums; }
.ov-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.ov-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); } .ov-dot.bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.perf-badge { gap: 9px; }
.perf-badge > span { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.perf-badge .icon { width: 12px; height: 12px; stroke-width: 2; }
/* Overview "Your websites": one widget card per site, or the compact table (toggle remembered in app.js). */
.ov-sites[data-sites-view="cards"] .sw-table, .ov-sites[data-sites-view="table"] .sw-grid,
.ov-sites[data-sites-view="cards"] .sw-table-pg, .ov-sites[data-sites-view="table"] .sw-grid-pg { display: none; }
[data-paginate] > [hidden] { display: none !important; }
.pager a.cur { pointer-events: none; }
.ov-sites .card-head .actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ov-sites .tabs-mini { margin-left: 0; }
.sw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; padding: 12px; }
.sw { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); transition: border-color .15s, transform .15s; }
.sw:hover { border-color: var(--line-2); transform: translateY(-1px); }
.sw-bad, .sw-crit { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.sw-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sw-head .ck-site, .sw-head .ck-site span { min-width: 0; }
.sw-head .ck-site b { font-size: 14px; }
.sw-head .ck-site small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-state { flex: none; font-size: 12.5px; white-space: nowrap; padding-top: 2px; }
.sw-scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sw-score { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.sw-score:hover { border-color: var(--line-2); }
.sw-score b { font-size: 22px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sw-score span { font-size: 11.5px; color: var(--muted); }
.sw-bar { display: block; height: 4px; margin-top: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.sw-bar > i { display: block; height: 100%; border-radius: 4px; }
.sw-bar-ok { background: var(--ok); } .sw-bar-warn { background: var(--warn); } .sw-bar-bad { background: var(--bad); }
.sw-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.sw-meta div { min-width: 0; }
.sw-meta dt { font-size: 11px; color: var(--muted); margin-bottom: 2px; white-space: nowrap; }
.sw-meta dd { margin: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-meta dd a { color: inherit; text-decoration: none; }
.sw-meta dd a:hover { text-decoration: underline; }
@media (max-width: 560px) { .sw-grid { grid-template-columns: minmax(0, 1fr); padding: 8px; } }
@media (prefers-reduced-motion: reduce) { .sw:hover { transform: none; } }
