/*
 * Принцип оформления: интерфейс монохромный, цвет означает только состояние.
 * Верхняя полоса целиком окрашена в цвет текущего состояния хостинга.
 */
:root {
  --bg: #EEF1F5;
  --surface: #FFFFFF;
  --surface-2: #F5F7FA;
  --ink: #141B26;
  --ink-2: #3F4A5A;
  --muted: #6E7A8C;
  --line: #DCE2EA;
  --line-2: #E9EDF2;

  --up: #12804F;
  --up-soft: #E1F3EA;
  --warn: #A86A00;
  --warn-soft: #FDF0D6;
  --down: #C2342C;
  --down-soft: #FBE5E3;
  --none: #C5CDD8;

  --hero-ok: #0F5C44;
  --hero-warn: #8A5600;
  --hero-bad: #9A231F;
  --hero-none: #263244;

  --btn: #141B26;
  --btn-ink: #FFFFFF;

  --r-s: 8px;
  --r: 12px;
  --r-l: 18px;
  --shadow: 0 1px 2px rgba(20, 27, 38, .05), 0 8px 24px -12px rgba(20, 27, 38, .14);
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1319;
    --surface: #151B23;
    --surface-2: #1A212B;
    --ink: #E7ECF2;
    --ink-2: #B9C2CE;
    --muted: #8692A3;
    --line: #27303C;
    --line-2: #1F2731;
    --up: #3BC488;
    --up-soft: #15302A;
    --warn: #F0B04A;
    --warn-soft: #33270F;
    --down: #FF6E62;
    --down-soft: #3A1D1B;
    --none: #3A4555;
    --hero-ok: #0B3D2F;
    --hero-warn: #573705;
    --hero-bad: #5A1816;
    --hero-none: #18202B;
    --btn: #E7ECF2;
    --btn-ink: #0E1319;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1319;
  --surface: #151B23;
  --surface-2: #1A212B;
  --ink: #E7ECF2;
  --ink-2: #B9C2CE;
  --muted: #8692A3;
  --line: #27303C;
  --line-2: #1F2731;
  --up: #3BC488;
  --up-soft: #15302A;
  --warn: #F0B04A;
  --warn-soft: #33270F;
  --down: #FF6E62;
  --down-soft: #3A1D1B;
  --none: #3A4555;
  --hero-ok: #0B3D2F;
  --hero-warn: #573705;
  --hero-bad: #5A1816;
  --hero-none: #18202B;
  --btn: #E7ECF2;
  --btn-ink: #0E1319;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--font);
  font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--btn); color: var(--btn-ink); padding: 8px 14px; border-radius: var(--r-s); z-index: 50; }
.skip:focus { top: 12px; }

.wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 24px; }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line-2);
}
.top-in { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; }
.brand-mark rect { fill: var(--ink); }
.brand-mark path { stroke: var(--bg); }
.top-nav { display: flex; gap: 20px; margin-left: auto; }
.top-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14px; }
.top-nav a:hover { color: var(--ink); }
.theme-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; color: var(--ink-2);
}
.theme-btn:hover { color: var(--ink); border-color: var(--ink-2); }

/* ---------- полоса состояния ---------- */
.status {
  --hero: var(--hero-none);
  background: var(--hero);
  color: #fff;
  transition: background-color .6s ease;
}
.status[data-level="ok"] { --hero: var(--hero-ok); }
.status[data-level="warn"] { --hero: var(--hero-warn); }
.status[data-level="bad"] { --hero: var(--hero-bad); }
.status-in { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; padding-top: 52px; padding-bottom: 48px; align-items: end; }
.status-kicker { margin: 0 0 14px; font-size: 14px; color: rgba(255, 255, 255, .78); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.status-updated { color: rgba(255, 255, 255, .6); }
.status h1 {
  margin: 0;
  font-size: clamp(38px, 6.4vw, 76px);
  line-height: .98;
  letter-spacing: -.035em;
  font-weight: 800;
  text-wrap: balance;
}
.status-text { margin: 18px 0 0; max-width: 60ch; font-size: 17px; line-height: 1.55; color: rgba(255, 255, 255, .86); text-wrap: pretty; }

.check {
  margin-top: 30px; display: flex; gap: 6px; padding: 6px;
  background: #fff; border-radius: 16px; max-width: 640px;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .55);
}
.check input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  padding: 0 14px; height: 50px; font-size: 17px; color: #141B26;
}
.check input::placeholder { color: #7D8798; }
.check button {
  border: 0; border-radius: 11px; padding: 0 22px; height: 50px;
  background: #141B26; color: #fff; font-weight: 600; font-size: 15px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
}
.check button:hover { background: #26303F; }
.check button:disabled { opacity: .75; cursor: progress; }
.check:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .45), 0 18px 40px -20px rgba(0, 0, 0, .55); }
.check-hint { margin: 10px 2px 0; font-size: 13px; color: rgba(255, 255, 255, .66); max-width: 640px; }
.check-hint.err { color: #fff; font-weight: 500; }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.mine-strip { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.mine-label { font-size: 13px; color: rgba(255, 255, 255, .7); margin-right: 2px; }
.mine-list { display: flex; flex-wrap: wrap; gap: 6px; }
.mine-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08);
  color: #fff; font-size: 13px; font-weight: 500;
}
.mine-chip:hover { background: rgba(255, 255, 255, .16); }
.mine-chip i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.mine-chip i.up { background: #6EE7A8; }
.mine-chip i.down, .mine-chip i.dead { background: #FF8A80; }

.pulse { margin: 0; }
.pulse figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: rgba(255, 255, 255, .72); margin-bottom: 12px; }
.pulse figcaption b { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.pulse-bars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 92px; align-items: end; }
.pulse-bars span { display: block; border-radius: 3px 3px 1px 1px; background: rgba(255, 255, 255, .85); min-height: 4px; }
.pulse-bars span.warn { background: #FFD27A; }
.pulse-bars span.bad { background: #FF9C92; }
.pulse-bars span.none { background: rgba(255, 255, 255, .18); height: 6px; }
.pulse-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: rgba(255, 255, 255, .55); }

/* ---------- сводка ---------- */
.figures {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 28px 0 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-l);
}
.fig { padding: 18px 22px; display: flex; flex-direction: column; gap: 2px; }
.fig + .fig { border-left: 1px solid var(--line-2); }
.fig b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.fig span { font-size: 13px; color: var(--muted); }
.fig-up b { color: var(--up); }
.fig-down b { color: var(--down); }

/* ---------- раскладка ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; margin: 28px 0 56px; align-items: start; }

.list { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-l); min-width: 0; }
.list-head { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 18px 22px 0; }
.list-head h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button {
  border: 0; background: transparent; padding: 7px 12px; border-radius: 999px;
  color: var(--ink-2); font-weight: 500; font-size: 14px; display: inline-flex; gap: 6px; align-items: center;
}
.tabs button b { font-weight: 600; color: var(--muted); font-size: 13px; }
.tabs button:hover { background: var(--surface-2); color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--btn); color: var(--btn-ink); }
.tabs button[aria-selected="true"] b { color: inherit; opacity: .7; }
.tabs button[hidden] { display: none; }

.list-tools { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.search {
  flex: 1 1 240px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; height: 40px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted);
}
.search:focus-within { border-color: var(--ink-2); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); height: 100%; }
.search kbd { font: 500 12px var(--font); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--muted); }
.select { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 4px 0 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--muted); }
.select select { border: 0; background: transparent; height: 100%; font-size: 14px; color: var(--ink); font-weight: 500; padding-right: 4px; cursor: pointer; }
.select select:focus { outline: 0; }
.select:focus-within { border-color: var(--ink-2); }

.thead, .row {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.55fr) minmax(0, 1.35fr) 76px 92px;
  gap: 16px; align-items: center; padding: 0 22px;
}
.thead { height: 38px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line-2); }
.rows { min-height: 120px; }
.row {
  min-height: 66px; padding-top: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line-2); cursor: pointer; text-align: left; width: 100%;
  background: transparent; border-left: 0; border-right: 0; border-top: 0;
}
.row:hover { background: var(--surface-2); }
.row:last-child { border-bottom: 0; }

.site { min-width: 0; }
.site-title { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.site-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-host { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { flex: none; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.tag.mine { border-color: transparent; background: var(--btn); color: var(--btn-ink); }

.state { min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; }
.pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--none); flex: none; }
.pill.up i { background: var(--up); box-shadow: 0 0 0 3px var(--up-soft); }
.pill.down i { background: var(--down); box-shadow: 0 0 0 3px var(--down-soft); }
.pill.dead i { background: transparent; border: 2px solid var(--down); }
.pill.down, .pill.dead { color: var(--down); }
.reason { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }

.uptime-cell { min-width: 0; }
.uptime-num { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.uptime-num b { font-weight: 600; }
.uptime-num span { color: var(--muted); }
.bars { height: 18px; border-radius: 4px; background-repeat: no-repeat; background-color: transparent; }

.ms { font-weight: 600; font-size: 14px; }
.ms small { font-weight: 400; color: var(--muted); margin-left: 2px; font-size: 12px; }
.ms.slow { color: var(--warn); }
.ms.none { color: var(--muted); font-weight: 400; }
.checked { font-size: 13px; color: var(--muted); line-height: 1.35; }
.checked b { display: block; color: var(--ink-2); font-weight: 500; }

.empty { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty h3 { margin: 0 0 6px; color: var(--ink); font-size: 18px; }
.empty p { margin: 0 auto; max-width: 42ch; }
.skeleton .row { cursor: default; }
.skeleton .sk { height: 12px; border-radius: 6px; background: var(--surface-2); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line-2); font-size: 14px; color: var(--muted); }
.btn-quiet {
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink);
}
.btn-quiet:hover:not(:disabled) { border-color: var(--ink-2); }
.btn-quiet:disabled { opacity: .45; cursor: default; }
.btn-quiet.on { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.btn-ink {
  height: 42px; padding: 0 18px; border-radius: 11px; border: 0; background: var(--btn); color: var(--btn-ink);
  font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn-ink:hover { opacity: .9; }
.btn-light { display: inline-flex; height: 44px; align-items: center; padding: 0 20px; border-radius: 11px; background: #fff; color: #141B26; font-weight: 600; text-decoration: none; }

/* ---------- боковая колонка ---------- */
.side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 80px; }
.side h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; line-height: 1.3; }
.side-text { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.side-note { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.side-note a { color: var(--ink-2); }

.hostings, .promo, .netinfo { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-l); padding: 20px; }
.host-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.host {
  border: 1px solid var(--line); border-radius: var(--r); padding: 14px;
  background: var(--surface);
  border-top: 3px solid var(--brand);
}
.host-head { display: flex; align-items: center; gap: 10px; }
.host-logo {
  width: 36px; height: 36px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 17px; overflow: hidden;
}
.host-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.host-name { min-width: 0; flex: 1; }
.host-name h3 { margin: 0; font-size: 15px; line-height: 1.25; }
.host-price { font-size: 13px; color: var(--muted); }
.host-badge { flex: none; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--up-soft); color: var(--up); }
.host-tagline { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); }
.host-perks { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); display: grid; gap: 3px; }
.host-perks li { position: relative; padding-left: 18px; }
.host-perks li::before { content: ''; position: absolute; left: 2px; top: .5em; width: 8px; height: 4px; border-left: 2px solid var(--up); border-bottom: 2px solid var(--up); transform: rotate(-45deg); }
.host-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.host-go {
  display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 10px;
  background: var(--btn); color: var(--btn-ink); text-decoration: none; font-weight: 600; font-size: 14px;
}
.host-go:hover { opacity: .9; }
.host-promo {
  height: 34px; border-radius: 9px; border: 1px dashed var(--line); background: transparent; font-size: 13px; color: var(--ink-2);
}
.host-promo b { color: var(--ink); letter-spacing: .02em; }
.host-promo:hover { border-color: var(--ink-2); }

.promo { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.promo p { margin: 8px 0 16px; font-size: 14px; opacity: .8; }
.promo .btn-ink { background: var(--btn-ink); color: var(--btn); width: 100%; }

.netinfo dl { margin: 14px 0 0; display: grid; gap: 8px; }
.netinfo dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.netinfo dt { color: var(--muted); }
.netinfo dd { margin: 0; font-weight: 600; text-align: right; }

.foot { border-top: 1px solid var(--line-2); padding: 22px 0 34px; font-size: 13px; color: var(--muted); }
.foot-in { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }

/* ---------- карточка сайта (боковая панель) ---------- */
.sheet {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(560px, 100vw); max-width: 100vw;
  border: 0; padding: 0; background: var(--surface); color: var(--ink);
  box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .45);
}
.sheet::backdrop { background: rgba(14, 19, 25, .42); }
.sheet[open] { animation: sheet-in .22s ease-out; }
@keyframes sheet-in { from { transform: translateX(40px); opacity: 0; } }
.sheet-body { padding: 0 0 32px; }
.sheet-head { position: sticky; top: 0; z-index: 2; background: var(--surface); display: flex; gap: 12px; align-items: flex-start; padding: 22px 24px 16px; border-bottom: 1px solid var(--line-2); }
.sheet-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; line-height: 1.2; word-break: break-word; }
.sheet-head a { font-size: 14px; color: var(--muted); }
.sheet-close { margin-left: auto; flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 18px; line-height: 1; }
.sheet-close:hover { border-color: var(--ink-2); }
.sheet-section { padding: 20px 24px 0; }
.sheet-section h3 { margin: 0 0 10px; font-size: 15px; }

.verdict { border-radius: var(--r); padding: 16px 18px; background: var(--surface-2); }
.verdict.up { background: var(--up-soft); }
.verdict.down, .verdict.dead { background: var(--down-soft); }
.verdict strong { display: block; font-size: 20px; letter-spacing: -.01em; }
.verdict.up strong { color: var(--up); }
.verdict.down strong, .verdict.dead strong { color: var(--down); }
.verdict p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }

.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.facts div { background: var(--surface); padding: 11px 14px; min-width: 0; }
.facts div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.facts dt { font-size: 12.5px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }

.ups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.ups div { border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; }
.ups b { display: block; font-size: 18px; letter-spacing: -.01em; }
.ups span { font-size: 12px; color: var(--muted); }
.timeline { margin-top: 10px; }
.timeline .bars { height: 30px; }
.timeline-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 5px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

.events { list-style: none; margin: 0; padding: 0; }
.events li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.events li:last-child { border-bottom: 0; }
.events time { color: var(--muted); font-size: 13px; }
.events .ev-up { color: var(--up); font-weight: 600; }
.events .ev-down { color: var(--down); font-weight: 600; }
.events small { display: block; color: var(--muted); font-size: 12.5px; }

.sheet .host-list { margin-top: 0; }
.move-box { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.move-box > p { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }

/* ---------- окна и уведомления ---------- */
.modal { border: 0; border-radius: var(--r-l); padding: 0; width: min(480px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(14, 19, 25, .42); }
.modal-body { padding: 22px 24px; }
.modal-body h2 { margin: 0 0 8px; font-size: 19px; }
.modal-body p, .modal-body ol { color: var(--ink-2); font-size: 14px; }
.modal-body ol { padding-left: 20px; display: grid; gap: 6px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: var(--btn); color: var(--btn-ink); padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); animation: toast-in .2s ease-out; pointer-events: auto; }
.toast.err { background: var(--down); color: #fff; }
.toast.out { opacity: 0; transform: translateY(6px); transition: .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
  .status-in { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .pulse { max-width: 640px; }
  .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fig:nth-child(4) { border-left: 0; }
  .fig:nth-child(n+4) { border-top: 1px solid var(--line-2); }
}

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .top-nav { display: none; }
  .theme-btn { margin-left: auto; }
  .status-in { padding-top: 32px; padding-bottom: 32px; }
  .status-text { font-size: 15.5px; }
  .check { flex-direction: column; padding: 5px; }
  .check input { height: 48px; }
  .check button { justify-content: center; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fig { padding: 14px 16px; }
  .fig b { font-size: 21px; }
  .fig + .fig { border-left: 0; }
  .fig:nth-child(even) { border-left: 1px solid var(--line-2); }
  .fig:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .fig:nth-child(4) { border-left: 1px solid var(--line-2); }
  .fig:last-child { grid-column: 1 / -1; border-left: 0; }

  .list-head, .list-tools { padding-left: 14px; padding-right: 14px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; width: calc(100% + 28px); }
  .tabs button { flex: none; }
  .select { flex: 1 1 140px; }
  .thead { display: none; }
  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'site state' 'reason reason' 'uptime uptime' 'ms checked';
    gap: 6px 12px; padding: 14px;
  }
  .row .site { grid-area: site; }
  .row .state { display: contents; }
  .row .pill { grid-area: state; justify-self: end; align-self: start; margin-top: 2px; }
  .row .reason { grid-area: reason; margin-top: -2px; }
  .row .reason:empty { display: none; }
  .row .uptime-cell { grid-area: uptime; }
  .row .ms { grid-area: ms; }
  .row .checked { grid-area: checked; text-align: right; display: flex; gap: 6px; justify-content: flex-end; }
  .row .checked b { display: inline; }
  .pager { padding: 12px 14px; font-size: 13px; }
  .side { grid-template-columns: minmax(0, 1fr); }
  .sheet { width: 100vw; }
  .sheet-head, .sheet-section { padding-left: 16px; padding-right: 16px; }
  .ups { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr; }
  .events li { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

[hidden] { display: none !important; }
