:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0B0D; --bg-2: #111113; --surface: #161719; --surface-2: #1E1F22; --surface-3: #27282C;
  --border: #232427; --border-2: #36373C; --border-3: #4A4B51;
  --text: #F7F5F0; --text-2: #D6D3CA; --muted: #A9A69D; --strong: #FFFFFF;
  --primary: #C9A35F; --primary-btn: #C9A35F; --primary-btn-2: #B8924C; --primary-hover: #D8B676; --on-primary: #0B0B0D;
  --link: #C9A35F; --accent-text: #DDBB7C; --focus: #DDBB7C; --accent-line: rgba(201,163,95,.45);
  --ok: #76C497; --ok-bg: #18281F; --bad: #EE7C8A; --bad-bg: #341C21; --bad-text: #F4A6B0;
  --warn: #DE9A62; --warn-bg: #2E2218; --warn-text: #EDB98A; --violet: #B3A5DE; --blue-bg: #2A2419;
  --topbar-bg: rgba(11,11,13,.92); --hover-row: rgba(255,255,255,.03); --thumb: #F7F5F0; --overlay: rgba(0,0,0,.7);
  --radius: 10px; --shadow: none;
  --font: 'IBM Plex Sans', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F5F0; --bg-2: #EEEBE3; --surface: #FFFFFF; --surface-2: #F4F1E9; --surface-3: #E9E5DA;
  --border: #DCD7CA; --border-2: #C9C3B3; --border-3: #A9A28F;
  --text: #0B0B0D; --text-2: #34332F; --muted: #5F5C54; --strong: #0B0B0D;
  --primary: #7A5C22; --primary-btn: #7A5C22; --primary-btn-2: #664C1B; --primary-hover: #664C1B; --on-primary: #FFFFFF;
  --link: #7A5C22; --accent-text: #7A5C22; --focus: #7A5C22; --accent-line: rgba(122,92,34,.5);
  --ok: #16744B; --ok-bg: #DDF1E6; --bad: #A8243A; --bad-bg: #F9E1E5; --bad-text: #A8243A;
  --warn: #8F5200; --warn-bg: #FBEBD0; --warn-text: #8F5200; --violet: #6B3FB5; --blue-bg: #F1E7D2;
  --topbar-bg: rgba(247,245,240,.92); --hover-row: rgba(11,11,13,.035); --thumb: #FFFFFF; --overlay: rgba(11,11,13,.45);
  --shadow: 0 1px 2px rgba(11,11,13,.06), 0 4px 14px rgba(11,11,13,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); min-height: 100vh; }
h1, h2, h3 { margin: 0; color: var(--strong); line-height: 1.25; }
h1 { font-size: 20px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
p { margin: 0 0 8px; }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 12.5px; }
.icon { flex: none; vertical-align: -3px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .strong { font-weight: 600; color: var(--strong); }
.ok-text { color: var(--ok); } .bad-text { color: var(--bad); } .right { text-align: right; } .grow { flex: 1; min-width: 0; } .spacer { flex: 1; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--primary-btn); color: var(--on-primary); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.container { width: 100%; max-width: 1020px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.main { padding-top: 24px; padding-bottom: 56px; outline: none; }
.narrow { max-width: 780px; margin: 0 auto; }

/* topbar */
.topbar { background: var(--topbar-bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(6px); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; gap: 10px; align-items: center; color: var(--strong); text-decoration: none !important; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 17px; } .brand-name span { color: var(--primary); }
.brand-sub { font-size: 11px; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 8px; color: var(--text-2); font: inherit; font-size: 13px; background: none; border: 0; cursor: pointer; text-decoration: none !important; }
.nav-link:hover { background: var(--surface-2); color: var(--strong); }
.nav-link.active { background: var(--blue-bg); color: var(--accent-text); }
.nav-sep { width: 1px; height: 20px; background: var(--border); margin: 0 6px; }

/* layout */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head p { margin: 2px 0 0; font-size: 12px; }
.page-actions, .btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.grid-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad, .pad { padding: 18px; }
.card + .card, section.card + section.card { margin-top: 16px; }
.grid-2 > .card + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--border); text-align: center; }
.form-section h2 { margin-bottom: 12px; } .form-section > p.muted { margin-top: -6px; }
.hr, .sep { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
.card.pad + .card.pad, .form-section + .form-section { margin-top: 16px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none !important; min-height: 36px; }
.btn:hover:not(:disabled) { background: var(--surface-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary-btn); border-color: var(--primary-btn); color: var(--on-primary); font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.5); color: var(--bad-text); }
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,.22); }
.btn-edit { background: var(--blue-bg); border-color: var(--accent-line); color: var(--focus); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-icon { padding: 0; width: 36px; }
.btn-sm { padding: 4px 10px; min-height: 30px; font-size: 12px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--strong); font: inherit; font-weight: 600; cursor: pointer; padding: 0; text-align: left; }
.link-btn:hover { color: var(--accent-text); text-decoration: underline; }
.link-sm { font-size: 12px; display: inline-flex; align-items: center; gap: 3px; }
.icon-link { color: var(--muted); display: inline-flex; padding: 6px; border-radius: 6px; } .icon-link:hover { color: var(--strong); background: var(--surface-2); }
.icon-link.big { padding: 8px; }
a.plain { color: inherit; } a.plain:hover { color: var(--accent-text); }

/* badges, chips, status */
.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; margin-left: 6px; border: 1px solid transparent; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(16,185,129,.3); }
.badge-bad { background: var(--bad-bg); color: var(--bad-text); border-color: rgba(239,68,68,.35); }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(245,158,11,.35); }
.badge-blue { background: var(--blue-bg); color: var(--focus); border-color: var(--accent-line); }
.badge-gray { background: var(--surface-3); color: var(--text-2); border-color: var(--border-2); }
td .badge:first-child, .step-top .badge, .inc-list .badge, .check .badge { margin-left: 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-3); color: var(--text-2); border-radius: 5px; padding: 1px 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; }
.chip-sm { margin-left: 8px; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.status-ok { color: var(--ok); } .status-ok .dot, .dot-ok { background: var(--ok); }
.status-bad { color: var(--bad); } .status-bad .dot, .dot-bad { background: var(--bad); }
.status-warn { color: var(--warn); } .status-warn .dot { background: var(--warn); }
.status-mute { color: var(--muted); } .dot-blue { background: var(--primary); margin-right: 6px; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.tiles-5 { grid-template-columns: repeat(5, 1fr); } .tiles-4 { grid-template-columns: repeat(4, 1fr); margin: 14px 0 18px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; min-width: 0; }
.tile-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.tile-value { font-size: 20px; font-weight: 700; color: var(--strong); margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile-value.sm { font-size: 15px; } .tile-value .small { font-weight: 400; }
.tile-ok .tile-label, .tile-ok .tile-value { color: var(--ok); } .tile-bad .tile-label { color: var(--bad-text); } .tile-bad .tile-value { color: var(--bad); }
.tile-blue .tile-label { color: var(--focus); } .tile-blue .tile-value { color: var(--accent-text); } .tile-violet .tile-label { color: var(--violet); }
.tile-plan { background: var(--surface); border-color: var(--accent-line); }
.bar { height: 5px; border-radius: 3px; background: var(--surface-3); margin-top: 6px; overflow: hidden; } .bar span { display: block; height: 100%; background: var(--primary); }

/* tables */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 18px; font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--hover-row); }
.table.compact td, .table.compact th { padding: 7px 12px; font-size: 12.5px; }
.table .actions { white-space: nowrap; } .table .actions > * { vertical-align: middle; }
.err-cell { max-width: 240px; overflow-wrap: anywhere; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pg-gap { padding: 0 4px; }
.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; }
.input.input-sm { width: auto; padding: 4px 8px; min-height: 32px; }

/* incident list */
.inc-list { list-style: none; margin: 0; padding: 0; }
.inc-list li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.inc-list .dot { margin-top: 6px; }
.inc-main { flex: 1; min-width: 0; } .inc-main strong { overflow-wrap: anywhere; }
.inc-main .muted { display: flex; align-items: center; gap: 5px; }

/* forms */
.field { margin-bottom: 14px; min-width: 0; }
.field > label, .label, .fieldset legend { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.req { color: var(--bad); }
.input { width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--border-2); border-radius: 9px; padding: 9px 12px; font: inherit; min-height: 38px; }
textarea.input { resize: vertical; }
.input::placeholder { color: var(--muted); }
.input:hover { border-color: var(--border-3); }
.input:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.has-error .input { border-color: var(--bad); }
select.input { appearance: auto; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field-error { font-size: 12px; color: var(--bad-text); min-height: 0; } .field-error:not(:empty) { margin-top: 4px; }
.form-alert { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 9px; background: var(--bad-bg); border: 1px solid rgba(239,68,68,.4); color: var(--bad-text); margin-bottom: 14px; font-size: 13px; }
.form-alert.warn { background: var(--warn-bg); border-color: rgba(245,158,11,.4); color: var(--warn-text); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; } .form-actions.left { justify-content: flex-start; }
.fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; } .fieldset legend { padding: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary-btn); flex: none; }
.check label { display: flex; flex-direction: column; flex: 1; cursor: pointer; }
.check-label { color: var(--text); font-weight: 600; font-size: 13px; }
.check .help { margin-top: 0; }
.check-box { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: var(--bg-2); align-items: center; }
.indent { margin-left: 26px; }
.row-toggle { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 0; }
.plain-list { list-style: none; padding: 0; margin: 0; } .plain-list > li { border-bottom: 1px solid var(--border); padding: 10px 0; } .plain-list > li:last-child { border-bottom: 0; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.switch-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch-track { position: absolute; inset: 0; background: var(--border-3); border-radius: 11px; transition: background .15s; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--thumb); transition: transform .15s; }
.switch-input:checked + .switch-track { background: var(--primary-btn); } .switch-input:checked + .switch-track .switch-thumb { transform: translateX(18px); }
.switch-input:focus-visible + .switch-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.color-row { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.color-pick { width: 52px; height: 38px; padding: 2px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--bg-2); cursor: pointer; flex: none; }

/* segmented */
.seg-control { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-btn { flex: 1; min-width: 78px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg-btn:hover:not(:disabled) { background: var(--surface-3); } .seg-btn:disabled:not(.on) { opacity: .45; cursor: not-allowed; }
.seg-btn.on { background: var(--primary-btn); border-color: var(--primary-btn); color: var(--on-primary); }
.small-seg { margin-bottom: 16px; } .small-seg .seg-btn { flex: none; min-width: 64px; padding: 6px 14px; }

/* wizard */
.wiz-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; } .wiz-head p { margin: 0; font-size: 12px; }
.wizard { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; max-width: 760px; margin: 0 auto; align-items: start; }
.wiz-head.narrow-head { max-width: 760px; margin-left: auto; margin-right: auto; }
.card + .grid-2 { margin-top: 16px; }
.stepper { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.stepper-title { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 2px 4px; }
.stepper-count { padding: 0 4px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.step { text-align: left; font: inherit; color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.step:hover { background: var(--surface-2); } .step.active { background: var(--blue-bg); border-color: var(--accent-line); }
.step-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.step-sum { color: var(--text); margin-top: 2px; }
.wiz-card { padding: 18px; }
.wiz-actions { margin-top: 12px; padding: 14px 18px; display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.wiz-actions .hint { margin-right: auto; }
.test-box { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 6px; }
.test-result { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-radius: 9px; } .test-result.ok { background: var(--ok-bg); color: var(--ok); } .test-result.bad { background: var(--bad-bg); color: var(--bad-text); }
.detail-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.target { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; overflow-wrap: anywhere; }

/* status page cards / form */
.sp-card { padding: 16px; border-top: 3px solid var(--ok); display: flex; flex-direction: column; gap: 8px; }
.sp-card.inactive { border-top-color: var(--border-2); }
.sp-title { display: flex; align-items: center; gap: 8px; } .sp-title h2 { flex: 1; font-size: 15px; overflow-wrap: anywhere; } .sp-title .badge { margin: 0; }
.slug { align-self: flex-start; background: var(--bg-2); padding: 2px 8px; border-radius: 5px; color: var(--text-2); overflow-wrap: anywhere; }
.domain-link { display: flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid var(--accent-line); background: var(--blue-bg); border-radius: 8px; font-size: 12px; overflow-wrap: anywhere; }
.sp-meta { display: flex; justify-content: space-between; font-size: 12px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 8px 0; }
.sp-actions { display: flex; gap: 8px; flex-wrap: wrap; } .sp-actions .btn { flex: none; }
.sp-form { max-width: 760px; margin: 0 auto; }
.cname-box { display: grid; grid-template-columns: 1fr auto 1fr; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); overflow: hidden; }
.cname-col { padding: 12px; } .cname-col .field { margin: 0; } .cname-col .field > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cname-mid { display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; padding: 12px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.cname-target { background: var(--bg-2); display: flex; flex-direction: column; justify-content: center; gap: 6px; } .cname-target code { background: var(--bg); padding: 8px 10px; border-radius: 7px; font-weight: 600; overflow-wrap: anywhere; }
.mon-check-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 6px; background: var(--bg-2); margin-top: 8px; }
.mon-check { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; background: var(--surface); }
.mon-check input { width: 16px; height: 16px; accent-color: var(--primary-btn); } .mon-check label { flex: 1; cursor: pointer; overflow-wrap: anywhere; }
.sp-preview { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--bg); display: grid; gap: 8px; }
.pv-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid; padding-bottom: 8px; } .pv-head img { max-height: 24px; width: auto; }
.pv-banner { border-left: 4px solid; padding: 6px 10px; background: var(--bg-2); border-radius: 6px; }
.pv-bars { display: flex; gap: 2px; height: 16px; } .pv-bars span { flex: 1; border-radius: 2px; }

/* history bar & chart */
.hist-wrap { position: relative; }
.hist { display: flex; gap: 2px; height: 26px; padding: 2px 0; border-radius: 6px; }
.seg { flex: 1; min-width: 2px; border-radius: 2px; background: var(--surface-3); }
.hist .seg { cursor: default; }
.seg-ok { background: var(--ok); } .seg-partial { background: var(--warn); } .seg-down { background: var(--bad); } .seg-nodata { background: var(--border-2); }
.seg-active { outline: 2px solid var(--strong); outline-offset: 1px; position: relative; z-index: 1; }
.hist-tip { position: absolute; bottom: calc(100% + 4px); transform: translateX(-50%); background: var(--strong); color: var(--bg); padding: 4px 8px; border-radius: 6px; font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; z-index: 5; font-weight: 600; }
.hist-tip.show { opacity: 1; }
.legend { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; } .legend-item { display: inline-flex; align-items: center; gap: 5px; } .legend-item .seg { flex: none; width: 10px; height: 10px; min-width: 10px; }
.chart-wrap { margin-top: 8px; } .chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; } .chart .axis { fill: var(--muted); font-size: 10.5px; font-family: var(--font); }
.chart .line { stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; } .chart .fail-line { stroke: var(--bad); stroke-width: 1; } .chart .fail-dot { fill: var(--bad); stroke: var(--bg); stroke-width: 1; }
.chart .cross { stroke: var(--muted); stroke-dasharray: 3 3; } .chart .hover-dot { fill: var(--primary); stroke: var(--strong); stroke-width: 1.5; }
.chart-readout { font-size: 12px; color: var(--muted); min-height: 18px; margin-top: 4px; }

/* settings */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab { display: inline-flex; gap: 7px; align-items: center; padding: 10px 14px; color: var(--text-2); border-radius: 8px 8px 0 0; white-space: nowrap; border-bottom: 2px solid transparent; text-decoration: none !important; font-size: 13px; }
.tab:hover { background: var(--surface-2); } .tab.on { color: var(--accent-text); border-bottom-color: var(--primary); background: var(--blue-bg); }
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--primary-btn); display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--on-primary); flex: none; }
.badges { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; } .badges .badge { margin: 0; }
.ch-group { margin-top: 18px; } .ch-group h3 { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.ch-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ch-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface-2); flex-wrap: wrap; }
.ch-ic { width: 36px; height: 36px; border-radius: 9px; background: var(--blue-bg); display: grid; place-items: center; color: var(--accent-text); flex: none; }
.ch-main { flex: 1; min-width: 160px; } .ch-dest { overflow-wrap: anywhere; display: block; }
.ch-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.verif { display: inline-flex; margin-left: 8px; } .verif.ok { color: var(--ok); } .verif.no { color: var(--muted); }
.codes { list-style: none; padding: 12px; margin: 10px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg-2); border-radius: 10px; }
.codes code { font-size: 14px; letter-spacing: .05em; }
.secret { display: flex; gap: 8px; align-items: center; } .secret code { flex: 1; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 8px; padding: 9px 12px; overflow-wrap: anywhere; user-select: all; }
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0 0 14px; } .dl dt { color: var(--muted); } .dl dd { margin: 0; }
.timeline { list-style: none; padding: 0 0 0 14px; margin: 10px 0 0; border-left: 2px solid var(--border-2); display: grid; gap: 12px; }
.timeline li { position: relative; } .timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); }
.timeline p { margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-line; } .tl-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.sub-form { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }

/* auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(700px 360px at 50% 0, rgba(201,163,95,.12), transparent); }
.auth-card { width: 100%; max-width: 380px; padding: 28px; position: relative; }
.auth-theme { position: absolute; top: 10px; right: 10px; }
.auth-brand { text-align: center; margin-bottom: 18px; display: grid; gap: 6px; justify-items: center; } .accent { color: var(--primary); }

/* states, toasts, modal */
.state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 16px; text-align: center; color: var(--muted); }
.state.error { color: var(--bad-text); } .state p { margin: 0; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border-2); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton-wrap { display: grid; gap: 8px; } .skeleton { height: 38px; border-radius: 8px; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sh 1.4s infinite; }
@keyframes sh { to { background-position: -200% 0; } }
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 200; max-width: calc(100vw - 32px); }
.toast { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--border-2); border-left: 3px solid var(--ok); padding: 10px 14px; border-radius: 9px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.toast-error { border-left-color: var(--bad); }
.modal { border: 1px solid var(--border-2); border-radius: 14px; background: var(--surface); color: var(--text); padding: 0; width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.modal-wide { width: min(620px, calc(100vw - 24px)); }
.modal::backdrop { background: var(--overlay); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.modal-body { padding: 18px; } .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .tiles { grid-template-columns: repeat(3, 1fr); } .tiles-5 { grid-template-columns: repeat(2, 1fr); } .tiles-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wizard { grid-template-columns: 1fr; } .stepper { flex-direction: row; overflow-x: auto; gap: 6px; } .stepper-title, .stepper-count { display: none; }
  .step { min-width: 150px; } .step .muted, .step-sum { display: none; }
  .grid-fields { grid-template-columns: 1fr; } .cname-box { grid-template-columns: 1fr; } .cname-mid { border: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); flex-direction: row; justify-content: flex-start; }
  .nav-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .nav-link { padding: 10px 12px; } .nav-sep { display: none; }
  .nav { width: 100%; justify-content: space-between; }
  .table th, .table td { padding: 9px 10px; }
  .wiz-actions { flex-wrap: wrap; } .wiz-actions .hint { flex-basis: 100%; }
  .codes { grid-template-columns: 1fr; } .dl { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; align-items: flex-start; }
  .main { padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.grid-2 > *, .card, .tile, .wizard > * { min-width: 0; }
.seg { min-width: 1px; }
@media (max-width: 640px) { .hist { gap: 1px; } .grid-2 { grid-template-columns: minmax(0, 1fr); } }
