/* =========================================================
   Theme tokens. Dark is the default (:root).
   For light, set  data-theme="light"  on <html>.
   ========================================================= */

:root {
    --bg: #0f1115;
    --surface: #181b21;
    --surface-muted: #20242c;
    --surface-soft: #262b34;
    --surface-invert: #e7e8ea;
    --on-invert: #0f1115;
    --on-accent: #ffffff;
    --switch-thumb: #f0f0f2;
    --text-primary: #e7e8ea;
    --text-secondary: #a0a6b0;
    --text-tertiary: #6e747e;
    --disabled-bg: #3a3f48;
    --track: #3a3f48;
    --nav-active-bg: #28352f;
    --border: rgba(255,255,255,0.10);
    --border-faint: rgba(255,255,255,0.06);
    --border-strong: rgba(255,255,255,0.16);
    --border-stronger: rgba(255,255,255,0.26);
    --hover: rgba(255,255,255,0.05);
    --hover-strong: rgba(255,255,255,0.12);
    --neutral-grey: #3a3f48;
    --accent: #3b82f6;
    --accent-hover: #2f6fd6;
    --accent-text: #6aa9e9;
    --accent-bright: #5b9ee0;
    --radius: 8px;
    --success-bg: #11271f;
    --success-strong: #7fdcb6;
    --success: #54c79b;
    --success-solid: #2bbd8a;
    --success-border: #1e4a3b;
    --success-border-strong: #2c6e56;
    --warning-bg: #2a2110;
    --warning-strong: #f3ca8c;
    --warning: #e0a64a;
    --warning-mid: #d9962f;
    --warning-solid: #f0a838;
    --warning-border: #4b3a1a;
    --warning-row-bg: rgba(240,168,56,0.10);
    --danger-bg: #2a1414;
    --danger-strong: #f0a3a3;
    --danger: #e57373;
    --danger-solid: #c0413f;
    --danger-solid-hover: #a83636;
    --danger-bright: #ef5f5f;
    --danger-border: #4a2222;
    --danger-border-strong: #6e2c2c;
    --danger-row-bg: rgba(229,115,115,0.10);
    --info-bg: #102234;
    --info-text: #8fc1ef;
    --info-border: #1e3a5a;
    --info-border-strong: #244262;
    --purple-bg: #1f1d3a;
    --purple-text: #b3aef0;
    --pink-bg: #34172a;
    --pink-text: #f0a0bd;
}

:root[data-theme="light"] {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-muted: #f5f4ee;
    --surface-soft: #f1efe8;
    --surface-invert: #1a1a1a;
    --on-invert: #ffffff;
    --on-accent: #ffffff;
    --switch-thumb: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --text-tertiary: #888888;
    --disabled-bg: #b8b8b8;
    --track: #d3d1c7;
    --nav-active-bg: #ced7ce;
    --border: rgba(0,0,0,0.10);
    --border-faint: rgba(0,0,0,0.07);
    --border-strong: rgba(0,0,0,0.18);
    --border-stronger: rgba(0,0,0,0.28);
    --hover: rgba(0,0,0,0.03);
    --hover-strong: rgba(0,0,0,0.18);
    --neutral-grey: #808080;
    --accent: #185fa5;
    --accent-hover: #134e87;
    --accent-text: #185fa5;
    --accent-bright: #378add;
    --radius: 8px;
    --success-bg: #e1f5ee;
    --success-strong: #04342c;
    --success: #0f6e56;
    --success-solid: #1d9e75;
    --success-border: #9fe1cb;
    --success-border-strong: #5dcaa5;
    --warning-bg: #faeeda;
    --warning-strong: #412402;
    --warning: #854f0b;
    --warning-mid: #ba7517;
    --warning-solid: #ef9f27;
    --warning-border: #fac775;
    --warning-row-bg: rgba(250,238,218,0.3);
    --danger-bg: #fcebeb;
    --danger-strong: #501313;
    --danger: #a32d2d;
    --danger-solid: #a32d2d;
    --danger-solid-hover: #8a2424;
    --danger-bright: #e24b4a;
    --danger-border: #f7c1c1;
    --danger-border-strong: #f09595;
    --danger-row-bg: rgba(252,235,235,0.5);
    --info-bg: #e6f1fb;
    --info-text: #042c53;
    --info-border: #85b7eb;
    --info-border-strong: #b5d4f4;
    --purple-bg: #eeedfe;
    --purple-text: #534ab7;
    --pink-bg: #fbeaf0;
    --pink-text: #993556;
}

/* Dusk — a warm sepia midpoint between light and dark: dim, low-glare warm
   browns with cream text. Set  data-theme="dusk"  on <html>. */
:root[data-theme="dusk"] {
    --bg: #2b2520;
    --surface: #362f27;
    --surface-muted: #423a30;
    --surface-soft: #4d4439;
    --surface-invert: #ece1cf;
    --on-invert: #2b2520;
    --on-accent: #fffaf2;
    --switch-thumb: #f0e7d7;
    --text-primary: #f0e6d4;
    --text-secondary: #c5b9a4;
    --text-tertiary: #9b8e78;
    --disabled-bg: #5a5043;
    --track: #574d40;
    --nav-active-bg: #4a4031;
    --border: rgba(245,235,215,0.11);
    --border-faint: rgba(245,235,215,0.06);
    --border-strong: rgba(245,235,215,0.17);
    --border-stronger: rgba(245,235,215,0.28);
    --hover: rgba(245,235,215,0.05);
    --hover-strong: rgba(245,235,215,0.12);
    --neutral-grey: #574d40;
    --accent: #5b8fc9;
    --accent-hover: #4d7cb0;
    --accent-text: #93b8e2;
    --accent-bright: #79a4d6;
    --radius: 8px;
    --success-bg: #2b3a2c;
    --success-strong: #a6dcc0;
    --success: #62c096;
    --success-solid: #3bb083;
    --success-border: #3a5042;
    --success-border-strong: #4e6c58;
    --warning-bg: #3b3018;
    --warning-strong: #f3d6a0;
    --warning: #dca94e;
    --warning-mid: #cf9a35;
    --warning-solid: #ebb04a;
    --warning-border: #574626;
    --warning-row-bg: rgba(235,176,74,0.12);
    --danger-bg: #3a2420;
    --danger-strong: #f1b6a8;
    --danger: #e08573;
    --danger-solid: #c2503f;
    --danger-solid-hover: #a84436;
    --danger-bright: #ec6f5b;
    --danger-border: #573a32;
    --danger-border-strong: #6e4a40;
    --danger-row-bg: rgba(224,133,115,0.12);
    --info-bg: #243446;
    --info-text: #9bbde0;
    --info-border: #34506c;
    --info-border-strong: #3e5c7a;
    --purple-bg: #2f2840;
    --purple-text: #bcb2e2;
    --pink-bg: #3a2530;
    --pink-text: #e6a8bf;
}

:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dusk"] { color-scheme: dark; }

/* The /god-eye admin pages were authored against a fixed dark palette
   (--panel, --line, --tx, ...) with hard-coded dark fallbacks, so their cards
   stayed dark regardless of theme. Alias those neutral tokens to the shared
   theme tokens (resolved late, so they follow light/dark) so the admin cards,
   tables and text match the rest of the site. Status/accent colors keep their
   own vivid values, which read fine on either background. */
:root {
    --panel: var(--surface);
    --panel2: var(--surface-muted);
    --line: var(--border);
    --line2: var(--border-strong);
    --tx: var(--text-primary);
    --tx2: var(--text-secondary);
    --tx3: var(--text-tertiary);
}

/* =========================================
   Reset & base
   ========================================= */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--surface);
    min-height: 100vh;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-container {
    width: 100%;
    max-width: 380px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 2rem;
    font-size: 16px;
    font-weight: 500;
}

.auth-logo svg {
    width: 22px;
    height: 22px;
    overflow: visible;
}

.pulse-glow {
    transform-origin: center;
    transform-box: fill-box;
    animation: pulse 2s ease-out infinite;
}

.pulse-delayed { animation-delay: 1s; }

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(3); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .pulse-glow { animation: none; }
}

.auth-card {
    background: var(--surface);
    border: 0.5px solid var(--border-strong);
    border-radius: 12px;
    padding: 1.75rem;
}

.auth-card h3 { font-size: 18px; font-weight: 500; margin: 0 0 4px; }
.auth-card > p { font-size: 13px; color: var(--text-secondary); margin: 0 0 1.5rem; }

form { display: flex; flex-direction: column; }
form label { display: block; margin-bottom: 14px; font-size: 12px; color: var(--text-secondary); }

form input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 9px 12px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--surface);
    border: 0.5px solid var(--border-strong);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

form input:hover { border-color: var(--border-stronger); }
form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.15); }

button[type="submit"] {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--on-accent);
    background: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

button[type="submit"]:hover:not(:disabled) { background: var(--accent-hover); }
button[type="submit"]:active:not(:disabled) { transform: scale(0.99); }
button[type="submit"]:disabled { background: var(--disabled-bg); cursor: not-allowed; }

.error-message { color: var(--danger); font-size: 12px; margin: 0 0 12px; }

form small { display: block; text-align: center; margin-top: 12px; font-size: 11px; color: var(--text-tertiary); line-height: 1.5; }
form small a { color: var(--text-secondary); }
form hr { margin: 1.25rem 0 1rem; border: none; border-top: 0.5px solid var(--border); }
form > p:last-child { text-align: center; font-size: 13px; color: var(--text-secondary); margin: 0; }
form a { color: var(--accent-text); text-decoration: none; font-weight: 500; }
form a:hover { text-decoration: underline; }

.check-email-card { text-align: center; }
.check-email-icon { display: flex; justify-content: center; margin-bottom: 1rem; }
.check-email-icon svg { width: 48px; height: 48px; }
.check-email-card h3 { margin-top: 0; }
.check-email-message { font-size: 13px; color: var(--text-secondary); margin: 0 0 1.5rem; line-height: 1.6; }
.check-email-message strong { color: var(--text-primary); font-weight: 500; }
.check-email-tips { text-align: left; background: var(--surface-muted); border-radius: 8px; padding: 12px 16px; margin-bottom: 1rem; }
.check-email-tips p { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin: 0 0 6px; }
.check-email-tips ul { margin: 0; padding-left: 18px; font-size: 12px; color: var(--text-secondary); line-height: 1.7; }
.check-email-footer { text-align: center; font-size: 13px; color: var(--text-secondary); margin: 0; }

.toast {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 28rem;
  padding: 0.875rem 1rem;
  background: var(--warning-bg);
  color: var(--warning-strong);
  border: 1px solid var(--warning-border);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  box-shadow:
      0 10px 15px -3px rgba(0, 0, 0, 0.08),
      0 4px 6px -2px rgba(0, 0, 0, 0.04);
  animation: toast-slide-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-icon { font-size: 1.1rem; }
.toast-message { flex: 1; }
.toast-close { background: none; border: none; color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0 0.25rem; opacity: 0.7; }
.toast-close:hover { opacity: 1; }

.toast-info { background: var(--info-bg); border: 0.5px solid var(--info-border); border-left: 4px solid var(--accent); color: var(--info-text); }
.toast-error { background: var(--danger-bg); border: 0.5px solid var(--danger-border-strong); border-left: 4px solid var(--danger); color: var(--danger-strong); }
.toast-success { background: var(--success-bg); border: 0.5px solid var(--success-border-strong); border-left: 4px solid var(--success); color: var(--success-strong); }
.toast-warning { background: var(--warning-bg); border: 0.5px solid var(--warning-solid); border-left: 4px solid var(--warning); color: var(--warning-strong); }

@keyframes toast-slide-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

.app-layout { display: flex; min-height: 100vh; align-items: stretch; }
.app-main { flex: 1; overflow: auto; }

.sidebar {
    width: 200px;
    height: 100vh;
    position: sticky;
    top: 0;
    background: var(--surface);
    border-right: 0.5px solid var(--border);
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

.sidebar-brand { display: flex; align-items: center; gap: 8px; padding: 4px 8px; margin-bottom: 1.5rem; font-size: 14px; font-weight: 500; }
.sidebar-brand svg { width: 18px; height: 18px; overflow: visible; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }

.nav-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    font-size: 14px;
    gap: 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.1s, color 0.1s;
}

.nav-item:hover { background: var(--hover); color: var(--text-primary); }
.nav-item[aria-current="page"] { background: var(--nav-active-bg); color: var(--text-primary); font-weight: 500; }
.nav-badge { background: var(--danger-bg); color: var(--danger-strong); font-size: 10px; font-weight: 500; padding: 1px 6px; border-radius: 8px; line-height: 1.5; }
.sidebar-footer { margin-top: auto; padding: 8px; border-top: 0.5px solid var(--border); font-size: 11px; color: var(--text-tertiary); }
.connection-status { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.status-dot-up { background: var(--success-solid); }
.status-dot-degraded { background: var(--warning-mid); }
.status-dot-down { background: var(--danger-solid); }
.search-hint kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-muted); padding: 1px 5px; border-radius: 3px; font-size: 10px; color: var(--text-secondary); }

.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.dashboard-header h1 { font-size: 18px; font-weight: 500; margin: 0; }
.dashboard-subtitle { font-size: 12px; color: var(--text-secondary); margin: 2px 0 0; }
.dashboard-actions { display: flex; gap: 8px; }

/* .btn-primary / .btn-secondary are defined once with the form-modal styles below. */

.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 1.5rem; }
.stat-card { background: var(--surface-muted); border-radius: 8px; padding: 1rem 1.125rem; display: flex; flex-direction: column; gap: 6px; }
.stat-card-value { font-size: 24px; font-weight: 500; color: var(--text-secondary); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; margin: 0 0 4px; }
.stat-card-label { font-size: 13px; color: var(--text-secondary); margin: 0; }
.stat-card-head { display: flex; align-items: center; justify-content: space-between; }
.stat-card-icon { font-size: 17px; color: var(--text-tertiary); line-height: 1; }
.stat-card-unit { font-size: 14px; font-weight: 400; color: var(--text-tertiary); margin-left: 4px; letter-spacing: normal; }
.stat-card-delta { display: flex; align-items: center; gap: 4px; font-size: 12px; margin-top: 2px; }
.stat-card-delta i { font-size: 13px; }
.stat-card-delta-good { color: var(--success); }
.stat-card-delta-bad { color: var(--danger); }
.stat-card-delta-muted { color: var(--text-tertiary); }
.stat-card-value-danger { color: var(--danger); }
.stat-value { font-size: 22px; font-weight: 500; margin: 0; }
.stat-up { color: var(--success); }
.stat-degraded { color: var(--warning-mid); }
.stat-down { color: var(--danger); }

/* .section-label is defined once further down (the form-section group). */

.monitor-table { background: var(--surface); border: 0.5px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 1.5rem; }
.monitor-table-header, .monitor-row { display: grid; grid-template-columns: 1.8fr 0.9fr 1.2fr 1.3fr 0.7fr 0.7fr; align-items: center; gap: 12px; }
.monitor-table-header { padding: 8px 14px; background: var(--surface-muted); border-bottom: 0.5px solid var(--border); font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.monitor-row { padding: 12px 14px; font-size: 13px; border-bottom: 0.5px solid var(--border); }
.monitor-row:hover { background: var(--hover); }
.monitor-name p { margin: 0; font-weight: 500; }
.monitor-meta { font-size: 11px; color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 2px !important; }
.tabular { font-variant-numeric: tabular-nums; }

.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 500; line-height: 1.5; width: fit-content; }
.status-badge-up { background: var(--success-bg); color: var(--success-strong); }
.status-badge-degraded { background: var(--warning-bg); color: var(--warning-strong); }
.status-badge-down { background: var(--danger-bg); color: var(--danger-strong); }
.status-badge-pending { background: var(--surface-soft); color: var(--text-secondary); }
.status-dot-pending { background: var(--text-tertiary); }

.sparkline { display: flex; gap: 1.5px; align-items: center; }
.sparkline-tick { width: 3px; height: 12px; border-radius: 1px; background: var(--track); }
.sparkline-tick-up { background: var(--success-solid); }
.sparkline-tick-degraded { background: var(--warning-solid); }
.sparkline-tick-down { background: var(--danger-bright); }

.monitor-row-link { display: block; text-decoration: none; color: inherit; }
.monitor-row-link:hover .monitor-row { background: var(--hover); }

.monitor-detail { padding: 1.25rem 1.5rem; }
.breadcrumb { font-size: 12px; color: var(--text-secondary); margin: 0 0 8px; }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--text-primary); }
.monitor-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.monitor-detail-title { display: flex; align-items: center; gap: 10px; }
.monitor-detail-title h1 { font-size: 22px; font-weight: 500; margin: 0; }
.monitor-detail-actions { display: flex; gap: 8px; }
.monitor-config { font-size: 13px; color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin: 0 0 1.25rem; }

.checks-table { background: var(--surface); border: 0.5px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 1.5rem; }
.checks-table-header, .check-row { display: grid; grid-template-columns: 0.5fr 1fr 0.5fr 0.6fr 1.4fr; align-items: center; gap: 12px; padding: 10px 16px; font-size: 13px; }
.checks-table-header { background: var(--surface-muted); border-bottom: 0.5px solid var(--border); font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.check-row { border-bottom: 0.5px solid var(--border); }
.check-row:last-child { border-bottom: none; }
.check-row-fail { background: var(--danger-row-bg); }
.check-row-fail .check-when, .check-row-fail .check-detail, .check-row-fail .tabular { color: var(--danger-strong); }
.check-status { display: inline-flex; align-items: center; gap: 6px; }
.check-status-ok { color: var(--success-strong); font-weight: 500; }
.check-status-fail { color: var(--danger-strong); font-weight: 500; }
.check-status-degraded { color: var(--warning-strong); font-weight: 500; }
.check-when { color: var(--text-secondary); }
.check-detail { color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Monitor detail: info cards + incident history + recent checks ---- */
.detail-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 1.25rem; }
.info-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.info-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.info-card-label { font-size: 12.5px; color: var(--text-secondary); }
.info-card-icon { font-size: 16px; color: var(--text-tertiary); }
.info-card-value { font-size: 17px; font-weight: 600; color: var(--text-primary); margin: 0 0 5px; }
.info-card-sub { font-size: 12px; color: var(--text-tertiary); margin: 0; line-height: 1.5; }

.detail-two-col { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; margin-bottom: 1.5rem; }
.detail-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; }
.detail-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.detail-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.detail-card-meta { font-size: 12px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.detail-card-link { font-size: 12px; color: var(--text-tertiary); text-decoration: none; }
.detail-card-link:hover { color: var(--text-secondary); }

/* Request timing breakdown + status codes (fixed data-viz colors, theme-agnostic) */
.detail-perf-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; margin-bottom: 1.5rem; }
.timing-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; margin: 6px 0 16px; }
.timing-seg { display: block; min-width: 2px; }
.timing-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.timing-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.timing-dot { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }
.timing-label { flex: 1; color: var(--text-secondary); }
.timing-val { color: var(--text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.timing-dns { background: #8b929e; }
.timing-tcp { background: #4f8ff0; }
.timing-tls { background: #a78bfa; }
.timing-ttfb { background: #34d399; }
.timing-transfer { background: #fbbf24; }

.status-codes-body { display: flex; align-items: center; gap: 22px; padding-top: 6px; }
.status-donut { width: 112px; height: 112px; border-radius: 50%; flex: 0 0 auto; background: conic-gradient(#34d399 0 73%, #f87171 73% 98%, #fbbf24 98% 100%); -webkit-mask: radial-gradient(circle, transparent 56%, #000 57%); mask: radial-gradient(circle, transparent 56%, #000 57%); }
.status-legend { display: flex; flex-direction: column; gap: 12px; }
.status-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sc-dot { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }
.sc-label { color: var(--text-secondary); min-width: 64px; }
.sc-val { color: var(--text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.sc-ok { background: #34d399; }
.sc-timeout { background: #f87171; }
.sc-5xx { background: #fbbf24; }

.incident-history-list { display: flex; flex-direction: column; gap: 15px; }
.incident-history-row { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; }
.incident-history-name { font-size: 13px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.incident-history-when { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.sev-badge { justify-self: start; display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.sev-critical { background: var(--danger-bg); color: var(--danger-strong); }
.sev-major { background: var(--warning-bg); color: var(--warning-strong); }
.sev-minor { background: var(--surface-soft); color: var(--text-secondary); }

/* Compact empty state for the incident-history panel (the full-page
   .empty-state is 55vh — too tall to sit inside a card). */
/* flex:1 fills the card height (which stretches to match the taller "Recent
   checks" column) so the message sits dead-centre, not hugging the top. */
.incident-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 28px 12px; min-height: 180px; }
.incident-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--success-bg); color: var(--success-strong); font-size: 20px; }
.incident-empty-title { font-size: 14px; font-weight: 500; color: var(--text-primary); margin: 0; }
.incident-empty-text { font-size: 12.5px; color: var(--text-tertiary); margin: 0; max-width: 260px; line-height: 1.5; }

/* Recent-checks table sits flush inside its card (no nested border/strip) */
.checks-table-flush { background: transparent; border: none; border-radius: 0; overflow: visible; margin-bottom: 0; }
.checks-table-flush .checks-table-header { background: transparent; padding-left: 0; padding-right: 0; border-bottom-color: var(--border-faint); }
.checks-table-flush .check-row { padding-left: 0; padding-right: 0; }
.checks-table-flush .check-row:last-child { border-bottom: none; }

@media (max-width: 760px) {
  .detail-info-grid { grid-template-columns: 1fr; }
  .detail-two-col, .detail-perf-grid { grid-template-columns: 1fr; }
}

.chart-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.chart-title { font-size: 13px; font-weight: 500; margin: 0; }
.chart-range { display: flex; gap: 4px; }
.chart-range-btn { font-size: 12px; padding: 3px 10px; border: 0.5px solid var(--border-strong); background: transparent; border-radius: 6px; cursor: pointer; }
.chart-range-active { background: var(--surface-muted); font-weight: 500; }
.latency-chart-svg { width: 100%; height: auto; display: block; }
.chart-grid-line { stroke: var(--border); stroke-width: 0.5; stroke-dasharray: 2 3; }
/* Axis labels are HTML overlaid on the SVG so they render at real CSS px
   (matching the page's small text) instead of scaling with the viewBox. */
.chart-plot { position: relative; }
.chart-y-label { position: absolute; left: 0; transform: translateY(-50%); font-size: 11px; line-height: 1; color: var(--text-tertiary); font-variant-numeric: tabular-nums; pointer-events: none; }
.chart-unit-label { position: absolute; top: 0; left: 0; font-size: 11px; line-height: 1; color: var(--text-tertiary); pointer-events: none; }
.chart-x-label { position: absolute; bottom: 0; font-size: 11px; line-height: 1; color: var(--text-tertiary); white-space: nowrap; pointer-events: none; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.chart-area-stop-top { stop-color: var(--accent); stop-opacity: 0.22; }
.chart-area-stop-bottom { stop-color: var(--accent); stop-opacity: 0; }
.chart-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 1.2; cursor: pointer; }
.chart-dot-degraded { fill: var(--surface); stroke: var(--warning); stroke-width: 1.2; cursor: pointer; }
.chart-dot-down { fill: var(--surface); stroke: var(--danger); stroke-width: 1.2; cursor: pointer; }
.chart-fail-marker { fill: var(--danger); cursor: pointer; }
.chart-fail-marker-degraded { fill: var(--warning); }
.chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text-tertiary); pointer-events: none; }
/* Interactive hover: crosshair, marker, and a timestamp/latency tooltip. */
.chart-hover { position: absolute; inset: 0; z-index: 2; cursor: crosshair; }
.chart-crosshair { position: absolute; top: 0; bottom: 14%; width: 1px; background: var(--border-stronger); pointer-events: none; z-index: 3; }
.chart-hover-marker { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); transform: translate(-50%, -50%); pointer-events: none; z-index: 4; }
.chart-hover-marker-degraded { border-color: var(--warning); }
.chart-hover-marker-down { border-color: var(--danger); }
.chart-tooltip { position: absolute; top: 4px; z-index: 5; pointer-events: none; background: var(--surface); border: 0.5px solid var(--border-strong); border-radius: 8px; padding: 5px 9px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); white-space: nowrap; }
.chart-tooltip-when { font-size: 11px; color: var(--text-secondary); }
.chart-tooltip-lat { font-size: 13px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }

.landing { min-height: 100vh; }
.landing-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 0.5px solid var(--border-faint); }
.landing-header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 1rem 2rem; max-width: 1200px; margin: 0 auto; }
.landing-burger { display: none; }
.landing-mobile-menu { display: none; }
.landing-brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; }
.landing-brand svg { width: 22px; height: 22px; overflow: visible; }
.landing-nav { display: flex; align-items: center; gap: 1.5rem; font-size: 13px; }
.landing-nav a { color: var(--text-secondary); text-decoration: none; }
.landing-nav a:hover { color: var(--text-primary); }
.landing-nav-signin { color: var(--text-primary) !important; }
.landing-nav-cta { background: var(--accent); color: var(--on-accent) !important; padding: 6px 14px; border-radius: 6px; font-weight: 500; }
.landing-nav-cta:hover { background: var(--accent-hover); }

.hero { padding: 4rem 2rem 3rem; text-align: center; max-width: 760px; margin: 0 auto; }
.hero-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 0.5px solid var(--border); padding: 4px 12px; border-radius: 999px; font-size: 12px; color: var(--text-secondary); margin-bottom: 1.5rem; }
.hero-headline { font-size: 44px; font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 1rem; color: var(--text-primary); }
.hero-subhead { font-size: 17px; line-height: 1.5; color: var(--text-secondary); margin: 0 auto 2rem; max-width: 560px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 1rem; }
.btn-large { padding: 11px 20px !important; font-size: 14px !important; text-decoration: none; display: inline-block; }
.hero-fineprint { font-size: 12px; color: var(--text-tertiary); margin: 0; }

.preview-section { max-width: 920px; margin: 0 auto 4rem; padding: 0 2rem; }
.preview-frame { background: var(--surface); border: 0.5px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04); }
.preview-titlebar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 0.5px solid var(--border-faint); margin-bottom: 12px; }
.preview-dot { width: 10px; height: 10px; border-radius: 50%; }
.preview-dot-red { background: #ff5f57; }
.preview-dot-yellow { background: #ffbd2e; }
.preview-dot-green { background: #28c840; }
.preview-url { font-size: 11px; color: var(--text-tertiary); margin-left: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.preview-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.preview-stat { background: var(--surface-muted); border-radius: 8px; padding: 10px 12px; }
.preview-stat-card-value { font-size: 10px; color: var(--text-secondary); margin: 0 0 2px; text-transform: uppercase; letter-spacing: 0.05em; }
.preview-stat-value { font-size: 18px; font-weight: 500; margin: 0; }
.preview-stat-up { color: var(--success); }
.preview-stat-degraded { color: var(--warning-mid); }
.preview-stat-down { color: var(--danger); }
.preview-row { display: grid; grid-template-columns: 1.4fr 0.7fr 1.2fr 0.5fr 0.5fr; padding: 12px 14px; font-size: 12px; align-items: center; border-bottom: 0.5px solid var(--border-faint); }
.preview-row:last-child { border-bottom: none; }
.preview-row-degraded { background: var(--warning-row-bg); }
.preview-name p:first-child { margin: 0; font-weight: 500; }
.preview-meta { margin: 1px 0 0; font-size: 10px; color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.preview-pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 8px; font-size: 11px; font-weight: 500; width: fit-content; }
.preview-pill-up { background: var(--success-bg); color: var(--success-strong); }
.preview-pill-degraded { background: var(--warning-bg); color: var(--warning-strong); }
.preview-spark { display: flex; gap: 1.5px; }
.spark { width: 3px; height: 11px; border-radius: 1px; }
.spark-up { background: var(--success-solid); }
.spark-degraded { background: var(--warning-solid); }
.spark-down { background: var(--danger-bright); }
.preview-num { font-variant-numeric: tabular-nums; font-size: 11px; }

.section-narrow { padding: 4rem 2rem; max-width: 760px; margin: 0 auto; }
.section-center { text-align: center; }
.section-eyebrow { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 12px; }
.section-heading { font-size: 32px; font-weight: 500; line-height: 1.2; margin: 0 0 1rem; letter-spacing: -0.01em; }
.section-lede { font-size: 16px; color: var(--text-secondary); max-width: 540px; margin: 0 auto; }

.features-section { padding: 0 2rem 4rem; max-width: 1000px; margin: 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card { background: var(--surface); border: 0.5px solid var(--border-faint); border-radius: 14px; padding: 24px; }
.feature-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feature-icon-blue { background: var(--info-bg); color: var(--accent-text); }
.feature-icon-green { background: var(--success-bg); color: var(--success); }
.feature-icon-pink { background: var(--pink-bg); color: var(--pink-text); }
.feature-icon-purple { background: var(--purple-bg); color: var(--purple-text); }
.feature-icon-amber { background: var(--warning-bg); color: var(--warning); }
.feature-icon-gray { background: var(--surface-soft); color: var(--text-secondary); }
.feature-title { font-size: 15px; font-weight: 500; margin: 0 0 6px; }
.feature-body { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* ---- How it works ---- */
.howit-section { max-width: 1080px; margin: 0 auto; padding: 4rem 2rem 4.5rem; }
.howit-head { text-align: center; max-width: 620px; margin: 0 auto 2.75rem; }
.howit-title { font-size: 32px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; margin: 8px 0 0.75rem; color: var(--text-primary); }
.howit-subtitle { font-size: 15px; color: var(--text-secondary); line-height: 1.55; margin: 0; }
.howit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.howit-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 0.5px solid var(--border); border-radius: 16px; padding: 22px; }
.howit-card:not(:last-child)::after { content: "\2192"; position: absolute; top: 50%; right: -17px; transform: translateY(-50%); font-size: 20px; font-weight: 300; color: var(--text-tertiary); opacity: 0.55; pointer-events: none; z-index: 1; }
.howit-step-head { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.howit-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 600; flex-shrink: 0; }
.howit-step-title { font-size: 16px; font-weight: 600; margin: 0; color: var(--text-primary); }
.howit-step-body { font-size: 13px; color: var(--text-secondary); line-height: 1.55; margin: 0 0 18px; }
.howit-visual { margin-top: auto; display: flex; flex-direction: column; gap: 11px; justify-content: center; min-height: 116px; background: var(--surface-muted); border: 0.5px solid var(--border-faint); border-radius: 12px; padding: 15px; }

/* step 1 — URL input + interval pills */
.howit-input { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 0.5px solid var(--border-strong); border-radius: 8px; padding: 9px 11px; }
.howit-input .ti { font-size: 15px; color: var(--text-tertiary); flex-shrink: 0; }
.howit-input-url { font-size: 12.5px; color: var(--text-primary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.howit-caret { width: 1.5px; height: 14px; background: var(--accent); margin-left: auto; flex-shrink: 0; animation: howit-blink 1.1s step-end infinite; }
@keyframes howit-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .howit-caret, .howit-alert, .howit-alert-icon .ti { animation: none; }
  .howit-alert { opacity: 1; transform: none; }
}
.howit-pills { display: flex; gap: 6px; }
.howit-pill { font-size: 11px; padding: 4px 11px; border-radius: 999px; background: var(--surface); border: 0.5px solid var(--border-strong); color: var(--text-secondary); }
.howit-pill-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 500; }

/* step 2 — channel chips + test confirmation */
.howit-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.howit-confirm { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--success-strong); margin: 3px 0 0; }
.howit-confirm .ti { font-size: 15px; color: var(--success-solid); }

/* step 3 — incoming alert toast */
.howit-alert { display: flex; align-items: flex-start; gap: 11px; background: var(--surface); border: 0.5px solid var(--danger-border); border-left: 3px solid var(--danger-solid); border-radius: 8px; padding: 12px 13px; animation: howit-alert-loop 5.5s ease-in-out infinite; }
.howit-alert-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: var(--danger-bg); color: var(--danger); flex-shrink: 0; }
.howit-alert-icon .ti { font-size: 17px; transform-origin: 50% 18%; animation: howit-bell 5.5s ease-in-out infinite; }
@keyframes howit-alert-loop { 0% { opacity: 0; transform: translateX(18px); } 9%, 78% { opacity: 1; transform: translateX(0); } 90%, 100% { opacity: 0; transform: translateX(0); } }
@keyframes howit-bell { 0%, 9%, 24%, 100% { transform: rotate(0deg); } 12% { transform: rotate(13deg); } 15% { transform: rotate(-11deg); } 18% { transform: rotate(8deg); } 21% { transform: rotate(-5deg); } }
.howit-alert-body { min-width: 0; }
.howit-alert-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--text-primary); margin: 0 0 3px; }
.howit-alert-meta { font-size: 11.5px; color: var(--text-secondary); margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 860px) {
  .howit-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .howit-card:not(:last-child)::after { content: none; }
}

/* ---- Final CTA ---- */
.final-cta { padding: 4rem 2rem 5rem; max-width: 880px; margin: 0 auto; }
.final-cta-panel { position: relative; overflow: hidden; border: 0.5px solid var(--border); border-radius: 24px; padding: 3rem 2rem 3.25rem; text-align: center; background: radial-gradient(115% 135% at 50% -15%, var(--info-bg), var(--surface) 62%); }
.final-cta-title { font-size: 32px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; margin: 0.25rem auto 0.75rem; max-width: 460px; color: var(--text-primary); }
.final-cta-sub { font-size: 15px; color: var(--text-secondary); line-height: 1.55; margin: 0 auto 1.85rem; max-width: 480px; }
.final-cta-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.final-cta-fine { font-size: 13px; color: var(--text-tertiary); margin: 1.5rem 0 0; }
@media (max-width: 640px) {
  .final-cta { padding: 3rem 1rem 4rem; }
  .final-cta-panel { padding: 2.5rem 1.25rem 2.75rem; border-radius: 20px; }
}

/* ---- Pricing ---- */
.pricing-section { padding: 4rem 2rem 5rem; max-width: 1080px; margin: 0 auto; }
.pricing-head { text-align: center; max-width: 600px; margin: 0 auto 2.75rem; }
.pricing-title { font-size: 32px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; margin: 8px 0 0.75rem; color: var(--text-primary); }
.pricing-subtitle { font-size: 15px; color: var(--text-secondary); line-height: 1.55; margin: 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.pricing-card { display: flex; flex-direction: column; background: var(--surface); border: 0.5px solid var(--border); border-radius: 16px; padding: 28px 24px; }
.pricing-card-featured { position: relative; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 34px rgba(0, 0, 0, 0.07); }
.pricing-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.pricing-plan { font-size: 16px; font-weight: 600; margin: 0 0 4px; color: var(--text-primary); }
.pricing-plan-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin: 0 0 20px; min-height: 39px; }
.pricing-price { display: flex; align-items: baseline; gap: 5px; margin-bottom: 20px; }
.pricing-amount { font-size: 36px; font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); line-height: 1; }
.pricing-period { font-size: 14px; color: var(--text-tertiary); }
.pricing-cta { display: block; width: 100%; text-align: center; margin-bottom: 22px; box-sizing: border-box; text-decoration: none; }
.pricing-features-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); margin: 0 0 14px; }
.pricing-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.pricing-feature { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--text-secondary); line-height: 1.45; }
.pricing-check { color: var(--success); font-size: 15px; line-height: 1.3; flex-shrink: 0; }
.pricing-foot { text-align: center; font-size: 13px; color: var(--text-tertiary); margin: 2.25rem 0 0; }
@media (max-width: 860px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .pricing-card-featured { order: -1; }
  .pricing-plan-desc { min-height: 0; }
}

.landing-footer { padding: 2rem; border-top: 0.5px solid var(--border-faint); display: flex; justify-content: space-between; align-items: center; max-width: 1000px; margin: 0 auto; flex-wrap: wrap; gap: 1rem; }
.landing-footer-brand { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.landing-footer-copyright { font-size: 12px; color: var(--text-tertiary); font-weight: 400; margin-left: 8px; }
.landing-footer-links { display: flex; gap: 1.5rem; font-size: 12px; }
.landing-footer-links a { color: var(--text-secondary); text-decoration: none; }
.landing-footer-links a:hover { color: var(--text-primary); }

@media (max-width: 768px) {
    .hero-headline { font-size: 32px; }
    .features-grid, .steps-grid, .preview-stats { grid-template-columns: 1fr; }
    .landing-nav { gap: 0.75rem; font-size: 12px; }
    .preview-row { grid-template-columns: 1fr; gap: 6px; }
    /* Give the sample dashboard card more width on small screens. */
    .preview-section { padding: 0 1rem; }
    .preview-frame { padding: 12px; }
}

.settings-section { margin-bottom: 2.5rem; }
.settings-eyebrow { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 8px; }
.settings-section-title { font-size: 16px; font-weight: 500; margin: 0 0 1.25rem; }
.settings-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: 12px; padding: 0 1.5rem; margin-bottom: 1rem; }
.settings-row { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; padding: 16px 0; border-bottom: 0.5px solid var(--border-faint); align-items: start; }
.settings-row:last-child { border-bottom: none; }
.settings-row-title { font-size: 13px; font-weight: 500; margin: 0 0 2px; }
.settings-row-help { font-size: 12px; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.settings-row-input { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.settings-input { width: 100%; max-width: 320px; padding: 8px 12px; font-size: 14px; color: var(--text-primary); background: var(--surface); border: 0.5px solid var(--border-strong); border-radius: 8px; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.settings-input:disabled { background: var(--surface-muted); color: var(--text-secondary); border-color: var(--border-faint); cursor: not-allowed; }
.settings-input:disabled:hover { border-color: var(--border-faint); }
.settings-input:hover { border-color: var(--border-stronger); }
.settings-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.15); }
.settings-row-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-secondary); margin: 0; }
.settings-row-meta.verified { color: var(--success-strong); }
.settings-row-meta.unverified { color: var(--text-secondary); }
.settings-inline-btn { width: fit-content; }
.settings-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 1rem; }
.btn-ghost { padding: 7px 14px; font-size: 13px; background: transparent; color: var(--text-secondary); border: 0.5px solid var(--border-strong); border-radius: 6px; cursor: pointer; }
.btn-ghost:hover { color: var(--text-primary); background: var(--hover); }

.settings-page { max-width: 100vw; height: 100vh; display: flex; flex-direction: column; }
.settings-header { margin-bottom: 1.75rem; flex-shrink: 0; }
.settings-header h1 { font-size: 18px; font-weight: 500; margin: 0 0 4px; }
.settings-header p { font-size: 13px; color: var(--text-secondary); margin: 0; }
.settings-layout { display: flex; gap: 2rem; align-items: stretch; flex: 1; min-height: 0; }
.settings-nav { width: 180px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.settings-nav-item { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text-secondary); text-decoration: none; font-size: 13px; transition: background 0.1s, color 0.1s; }
.settings-nav-item:hover { background: var(--hover); color: var(--text-primary); }
.settings-nav-item.active { background: var(--surface-muted); color: var(--text-primary); font-weight: 500; }
.settings-content { flex: 1; min-width: 0; overflow-y: auto; padding-right: 0.5rem; }
.settings-section-help { font-size: 13px; color: var(--text-secondary); margin: -0.5rem 0 1rem; max-width: 480px; }

.channels-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1rem; }
.channel-row { display: grid; grid-template-columns: 32px 1fr auto auto; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 0.5px solid var(--border); border-radius: 10px; }
.channel-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.channel-icon-email { background: var(--pink-bg); color: var(--pink-text); }
.channel-icon-slack { background: var(--purple-bg); color: var(--purple-text); font-weight: 600; }
.channel-icon-whatsapp { background: var(--success-bg); color: var(--purple-text); font-weight: 600; }
.channel-icon-webhook { background: var(--surface-soft); color: var(--text-secondary); }
.channel-icon-letter { font-size: 13px; font-weight: 600; }
.channel-info { min-width: 0; }
.channel-name { font-size: 13px; font-weight: 500; margin: 0; }
.channel-detail { font-size: 12px; color: var(--text-secondary); margin: 2px 0 0; }
.channel-meta { min-width: 80px; }
.channel-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-secondary); }
.channel-status-active { color: var(--success-strong); }
.channel-button { padding: 5px 12px; font-size: 12px; color: var(--text-primary); background: transparent; border: 0.5px solid var(--border-strong); border-radius: 6px; cursor: pointer; transition: background 0.1s; }
.channel-button:hover { background: var(--hover); }

.quiet-hours-card { padding: 1.25rem 1.5rem !important; }
.quiet-hours-toggle { display: flex; justify-content: space-between; align-items: center; padding-bottom: 1rem; border-bottom: 0.5px solid var(--border-faint); }
.quiet-hours-times { display: flex; align-items: end; gap: 12px; padding-top: 1rem; transition: opacity 0.15s; }
.quiet-hours-times.disabled { opacity: 0.5; }
.time-input-group { display: flex; flex-direction: column; gap: 4px; }
.time-input-group label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.time-input { max-width: 130px !important; font-variant-numeric: tabular-nums; }
.time-separator { font-size: 14px; color: var(--text-secondary); padding-bottom: 10px; }
.time-timezone { font-size: 12px; color: var(--text-secondary); padding-bottom: 10px; margin-left: auto; }

.toggle { width: 36px; height: 20px; background: var(--track); border: none; border-radius: 10px; position: relative; cursor: pointer; padding: 0; transition: background 0.15s; flex-shrink: 0; }
.toggle-on { background: var(--accent); }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--switch-thumb); border-radius: 50%; transition: transform 0.15s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.toggle-on .toggle-thumb { transform: translateX(16px); }

.eyebrow-danger { color: var(--danger) !important; }
.danger-card { border-color: rgba(163, 45, 45, 0.2) !important; padding: 0 !important; }
.danger-row { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1rem 1.5rem; border-bottom: 0.5px solid var(--border-faint); }
.danger-row:last-child { border-bottom: none; }
.danger-row-destructive { background: var(--danger-row-bg); }
.danger-row-info { flex: 1; min-width: 0; }
.danger-row-title { font-size: 13px; font-weight: 500; margin: 0 0 4px; }
.danger-row-title-red { color: var(--danger-strong); }
.danger-row-help { font-size: 12px; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.btn-danger { padding: 7px 14px; font-size: 13px; background: transparent; color: var(--danger); border: 0.5px solid rgba(163, 45, 45, 0.3); border-radius: 6px; cursor: pointer; font-weight: 500; transition: background 0.1s, border-color 0.1s; flex-shrink: 0; }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-danger-filled { padding: 7px 14px; font-size: 13px; background: var(--danger-solid); color: var(--on-accent); border: none; border-radius: 6px; cursor: pointer; font-weight: 500; transition: background 0.1s; }
.btn-danger-filled:hover { background: var(--danger-solid-hover); }

/* .modal-backdrop is fully restyled by the form-modal block further down. */
.modal-card { background: var(--surface); border-radius: 12px; padding: 1.5rem; max-width: 440px; width: 100%; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12); animation: modal-slide-up 0.2s ease-out; }
.modal-title { font-size: 16px; font-weight: 500; margin: 0 0 8px; }
.modal-message { font-size: 13px; color: var(--text-secondary); margin: 0 0 1.5rem; line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* modal-fade-in / modal-slide-up keyframes are defined with the form-modal block below. */
@media (prefers-reduced-motion: reduce) { .modal-backdrop, .modal-card { animation: none; } }

select.settings-input {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%236b6b6b' d='M6 9L1 4h10z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
    max-width: 320px;
}

@media (max-width: 768px) {
    .landing-header-inner { padding: 0.75rem 1rem; }
    .landing-brand { font-size: 15px; gap: 6px; }
    .landing-brand svg { width: 20px; height: 20px; }
    /* Replace the inline nav with a hamburger + dropdown on mobile. */
    .landing-nav { display: none; }
    .landing-burger { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; background: transparent; border: 0.5px solid var(--border-strong); border-radius: 8px; color: var(--text-primary); font-size: 20px; line-height: 1; cursor: pointer; }
    .landing-burger:hover { background: var(--hover); }
    .landing-mobile-menu.is-open { display: flex; flex-direction: column; position: absolute; top: calc(100% + 1px); left: 0; right: 0; background: var(--surface); border-bottom: 0.5px solid var(--border); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14); padding: 8px; gap: 2px; z-index: 60; }
    .landing-mobile-menu a { padding: 11px 12px; border-radius: 8px; color: var(--text-secondary); text-decoration: none; font-size: 14px; }
    .landing-mobile-menu a:hover { background: var(--hover); color: var(--text-primary); }
    .landing-mobile-menu .landing-nav-signin { color: var(--text-primary) !important; }
    .landing-mobile-menu .landing-nav-cta { background: var(--accent); color: var(--on-accent) !important; text-align: center; font-weight: 500; margin-top: 4px; }
}

@media (max-width: 480px) {
    .landing-header-inner { padding: 0.625rem 0.875rem; }
    .landing-brand { font-size: 14px; }
}

.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center; padding: 2rem; z-index: 1000; animation: modal-fade-in 0.15s ease-out; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 4rem); background: var(--surface); border-radius: 12px; border: 0.5px solid var(--border-faint); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.06); display: flex; flex-direction: column; overflow: hidden; animation: modal-slide-up 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 0.5px solid var(--border-faint); }
.modal-header h2 { font-size: 18px; font-weight: 500; margin: 0 0 4px; color: var(--text-primary); }
.modal-header p { font-size: 13px; color: var(--text-secondary); margin: 0; }
.modal-close { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; background: transparent; border: none; border-radius: 6px; color: var(--text-secondary); font-size: 22px; line-height: 1; cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.modal-close:hover { background: var(--hover); color: var(--text-primary); }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.field { display: flex; flex-direction: column; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-primary); margin: 0 0 6px; }
.field input[type="text"], .field input[type="url"], .field input[type="number"], .field input[type="email"], .field input[type="tel"], .field select { width: 100%; height: 36px; padding: 0 12px; font-size: 14px; font-family: inherit; color: var(--text-primary); background: var(--surface); border: 0.5px solid var(--border-strong); border-radius: 8px; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.field input::placeholder { color: var(--text-tertiary); }
.field input:hover, .field select:hover { border-color: var(--border-stronger); }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.15); }
.field-hint { font-size: 12px; color: var(--text-tertiary); margin: 6px 0 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-toggle { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: var(--surface-muted); border-radius: 8px; }
.field-toggle input[type="checkbox"] { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.field-toggle label { display: block; font-size: 13px; font-weight: 500; color: var(--text-primary); margin: 0 0 2px; cursor: pointer; }
.field-toggle p { font-size: 12px; color: var(--text-secondary); margin: 0; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 0.5px solid var(--border-faint); background: var(--surface-muted); }
/* "Disconnect" sits left of Cancel/Save and reads as destructive. */
.modal-footer-danger { margin-right: auto; color: var(--danger); border-color: var(--danger-border); }
.modal-footer-danger:hover { border-color: var(--danger); }
.btn-secondary, .btn-primary { padding: 8px 14px; font-size: 13px; font-weight: 500; font-family: inherit; border-radius: 8px; cursor: pointer; transition: background-color 0.15s, border-color 0.15s, opacity 0.15s; }
.btn-secondary { background: var(--surface); color: var(--text-primary); border: 0.5px solid var(--border-strong); }
.btn-secondary:hover { background: var(--surface-muted); border-color: var(--border-stronger); }
.btn-primary { background: var(--accent); color: var(--on-accent); border: 0.5px solid var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

@keyframes modal-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-slide-up { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 600px) {
    .modal-backdrop { padding: 0; align-items: flex-end; }
    .modal { max-width: 100%; max-height: 90vh; border-radius: 16px 16px 0 0; animation: modal-slide-up-mobile 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
    .field-row { grid-template-columns: 1fr; }
}
@keyframes modal-slide-up-mobile { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: translateY(0); } }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 1rem; flex-wrap: wrap; }
.pagination-info { font-size: 13px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.pagination-controls { display: flex; align-items: center; gap: 6px; }
.page-btn { height: 34px; min-width: 34px; padding: 0 10px; background: var(--surface); border: 0.5px solid var(--border-strong); border-radius: 8px; color: var(--text-primary); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background-color 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s; }
.page-btn:hover:not(:disabled):not(.page-btn-active) { background: var(--surface-muted); border-color: var(--border-stronger); }
.page-btn-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); cursor: default; }
.page-btn-active:hover { background: var(--accent); }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.page-btn-icon { font-size: 16px; }
.page-btn-icon i { display: block; line-height: 1; }
.page-ellipsis { min-width: 22px; text-align: center; color: var(--text-tertiary); font-size: 13px; user-select: none; }

.empty-state { min-height: 55vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 2rem; }
.empty-state-title { font-size: 18px; font-weight: 500; margin: 0; }
.empty-state-text { font-size: 14px; color: var(--text-tertiary); margin: 0 0 8px; max-width: 360px; }

.section-heading { align-items: center; gap: 8px; margin: 1.75rem 0 0.75rem; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.section-heading-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--danger-solid); }
.section-heading-dot-muted { background: var(--surface-muted); }

.incident-table { background: var(--surface); border: 0.5px solid var(--border); border-radius: 12px; overflow: hidden; }
.incident-table-header, .incident-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr 1fr; gap: 12px; align-items: center; }
.incident-table-header { padding: 10px 16px; background: var(--surface-muted); font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.incident-table-header .text-right { text-align: right; }
.incident-row-link { display: block; text-decoration: none; color: inherit; border-top: 0.5px solid var(--border-faint); transition: background 0.12s ease; }
.incident-row-link:hover { background: var(--surface-muted); }
.incident-row { padding: 14px 16px; font-size: 14px; }
.incident-row-resolved { color: var(--text-secondary); }
.incident-row-resolved .incident-monitor-name, .incident-row-resolved .incident-cell-duration { color: var(--text-secondary); }
.incident-cell { min-width: 0; }
.incident-cell-muted { color: var(--text-secondary); }
.incident-cell-monitor { overflow: hidden; }
.incident-monitor-name { margin: 0; font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.incident-monitor-id { margin: 2px 0 0; font-size: 12px; color: var(--text-tertiary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.incident-cell-cause { min-width: 0; }
.incident-cause-category { margin: 0; font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.incident-cause-detail { margin: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.incident-cell-duration { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.status-pill-down { background: var(--danger-bg); color: var(--danger); }
.status-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.text-right { text-align: right; }

.dashboard, .incidents-page, .heatmap-page, .settings-page, .checks-page { padding: 1.25rem 1.5rem; }

/* Monitor checks page */
.checks-back { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-secondary); text-decoration: none; margin-bottom: 6px; }
.checks-back:hover { color: var(--text-primary); }
.checks-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
/* Scoped under .checks-toolbar so these beat .filter-input's width:100% (which
   is defined later in the file) — otherwise the input eats the whole row and
   the search box collapses. */
.checks-toolbar .checks-search { flex: 1 1 220px; width: auto; min-width: 0; -webkit-appearance: none; appearance: none; }
.checks-dates { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; flex-wrap: wrap; }
.checks-date-field { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.checks-toolbar .checks-date { flex: 0 0 auto; width: auto; min-width: 0; padding: 7px 10px; cursor: pointer; }
.checks-clear { background: none; border: none; color: var(--text-tertiary); font-size: 12px; font-family: inherit; cursor: pointer; padding: 4px 6px; }
.checks-clear:hover { color: var(--text-primary); }
.checks-empty { padding: 28px 16px; text-align: center; color: var(--text-tertiary); font-size: 13px; }
.heatmap-range-select { font-size: 13px; padding: 6px 10px; }
.stat-card-value-sm { font-size: 16px; font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-card-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.stat-card-sub-danger { color: var(--danger); }
.heatmap-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: 12px; padding: 1.25rem; margin-top: 1.75rem; }
.heatmap-grid { display: grid; grid-template-columns: 56px 1fr; gap: 12px; }
.heatmap-hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; font-size: 10px; color: var(--text-tertiary); padding-bottom: 6px; }
.heatmap-hour-label { text-align: center; }
.heatmap-days { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; font-size: 11px; color: var(--text-secondary); align-items: center; text-align: right; padding-right: 4px; }
.heatmap-day-label { line-height: 1; }
.heatmap-cells { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.heatmap-row { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.hm-cell { aspect-ratio: 1; border-radius: 2px; cursor: pointer; transition: transform 0.08s ease, outline 0.08s ease; outline: 0 solid transparent; }
.hm-cell:hover { transform: scale(1.6); outline: 2px solid var(--border-stronger); z-index: 2; position: relative; }
.u-100 { background: #639922; }
.u-99  { background: #97C459; }
.u-98  { background: #C0DD97; }
.u-95  { background: #EAF3DE; }
.u-90  { background: #FAEEDA; }
.u-80  { background: #FAC775; }
.u-50  { background: #EF9F27; }
.u-bad { background: #E24B4A; }
.u-na  { background: #F1EFE8; }
.heatmap-legend { display: flex; align-items: center; justify-content: space-between; margin-top: 1.25rem; padding-top: 1rem; border-top: 0.5px solid var(--border-faint); }
.heatmap-legend-scale { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.heatmap-legend-label { margin: 0 4px; }
.heatmap-legend-divider { width: 1px; height: 14px; background: var(--hover-strong); margin: 0 8px; }
.heatmap-legend-hint { font-size: 12px; color: var(--text-tertiary); }
.hm-swatch { width: 14px; height: 14px; border-radius: 2px; display: inline-block; }
.worst-windows-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: 12px; overflow: hidden; margin-top: 0.75rem; }
.worst-window-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 12px; padding: 14px 16px; align-items: center; font-size: 14px; border-top: 0.5px solid var(--border-faint); }
.worst-window-row:first-child { border-top: none; }
.worst-window-when { font-weight: 500; }
.worst-window-affected { color: var(--text-secondary); }
.worst-window-pct { font-weight: 500; font-variant-numeric: tabular-nums; }
.worst-window-pct-danger { color: var(--danger); }
.worst-window-pct-warning { color: var(--warning-mid); }
.worst-window-downtime { text-align: right; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.section-label { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); margin-bottom: 10px; }

.icon-wrap { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%; background: rgb(23 92 161 / 18%); display: flex; align-items: center; justify-content: center; }
.user-email { font-weight: 400; color: var(--text-primary); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; background: var(--surface-soft); padding: 1px 5px; border-radius: 6px; display: inline-block; margin-bottom: 32px; }
.subtitle { font-size: 14px; color: var(--text-tertiary); margin: 0 0 4px; }
.otp-row { display: flex; align-items: center; justify-content: center; gap: .8em; }
.otp-digit { width: 49px; height: 56px; border: .5px solid var(--neutral-grey); text-align: center; font-size: 22px; font-weight: 500px; }
.status { color: var(--text-tertiary); font-size: 13px; min-height: 20px; margin: 8px 0 24px; transition: color 0.15s ease; }
.btn-verify-btn { width: 100%; padding: 13px 20px; font-family: inherit; font-size: 15px; font-weight: 500; color: var(--on-accent); background: var(--accent); border: none; border-radius: var(--radius); cursor: pointer; transition: background 0.15s ease, transform 0.05s ease; }
.divider { height: 1px; background: var(--border); margin: 28px 0 20px; }

.filter-wrapper, .dashboard-actions, .monitor-detail-actions { position: relative; }
.filter-wrapper { position: relative; display: inline-block; }
.filter-btn { display: inline-flex; align-items: center; gap: 6px; }
.filter-btn .ti { font-size: 16px; }
.filter-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px; background: var(--info-bg); color: var(--accent-text); border-radius: 9px; font-size: 11px; font-weight: bold; line-height: 1; }
.filter-panel { position: absolute; top: calc(100% + 8px); right: 0; width: 320px; background: var(--surface); border: 0.5px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04); z-index: 50; overflow: hidden; animation: filter-panel-in 120ms ease-out; transform-origin: top right; }
@keyframes filter-panel-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.filter-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 0.5px solid var(--border-faint); }
.filter-panel-title { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.filter-close-btn { background: none; border: none; padding: 4px; margin: -4px; cursor: pointer; color: var(--text-tertiary); display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; transition: background 120ms ease, color 120ms ease; }
.filter-close-btn:hover { background: var(--hover); color: var(--text-primary); }
.filter-close-btn .ti { font-size: 16px; }
.filter-panel-body { padding: 14px 16px; max-height: 360px; overflow-y: auto; }
.filter-section { margin-bottom: 16px; }
.filter-section:last-child { margin-bottom: 0; }
.filter-section-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-tertiary); margin: 0 0 8px; display: block; }
.filter-chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; background: var(--surface); color: var(--text-secondary); border: 0.5px solid var(--border-strong); border-radius: 14px; font-size: 12px; font-weight: 500; font-family: inherit; cursor: pointer; transition: border-color 120ms ease, background 120ms ease, color 120ms ease; user-select: none; }
.filter-chip:hover { border-color: var(--border-stronger); color: var(--text-primary); }
.filter-chip:focus-visible { outline: none; border-color: var(--accent-bright); box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.15); }
.filter-chip.is-active { background: var(--info-bg); color: var(--accent-text); border-color: var(--info-border-strong); }
.filter-chip.is-active:hover { border-color: var(--info-border); }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.chip-status.chip-up.is-active { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.chip-status.chip-up.is-active:hover { border-color: var(--success-border-strong); }
.chip-status.chip-degraded.is-active { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.chip-status.chip-degraded.is-active:hover { border-color: var(--warning-solid); }
.chip-status.chip-down.is-active { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.chip-status.chip-down.is-active:hover { border-color: var(--danger-border-strong); }
.chip-status.chip-pending.is-active { background: var(--surface-soft); color: var(--text-secondary); border-color: var(--track); }
.chip-status.chip-pending.is-active:hover { border-color: var(--text-tertiary); }
.filter-input { width: 100%; box-sizing: border-box; padding: 8px 12px; background: var(--surface); border: 0.5px solid var(--border-strong); border-radius: 8px; font-size: 13px; font-family: inherit; color: var(--text-primary); transition: border-color 120ms ease, box-shadow 120ms ease; }
.filter-input::placeholder { color: var(--text-tertiary); }
.filter-input:hover { border-color: var(--border-stronger); }
.filter-input:focus { outline: none; border-color: var(--accent-bright); box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.15); }
.filter-panel-footer { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 0.5px solid var(--border-faint); background: var(--surface-muted); }
.filter-clear-btn { background: none; border: none; font-size: 13px; font-weight: 500; color: var(--text-secondary); cursor: pointer; padding: 4px 2px; font-family: inherit; transition: color 120ms ease; }
.filter-clear-btn:hover { color: var(--text-primary); }
.filter-apply-btn { padding: 6px 14px; background: var(--surface-invert); color: var(--on-invert); border: none; border-radius: 8px; font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer; transition: background 120ms ease, transform 80ms ease; }
.filter-apply-btn:hover { background: var(--surface-invert); }
.filter-apply-btn:active { transform: scale(0.97); }
.filter-panel-body::-webkit-scrollbar { width: 6px; }
.filter-panel-body::-webkit-scrollbar-thumb { background: var(--hover-strong); border-radius: 3px; }
.filter-panel-body::-webkit-scrollbar-thumb:hover { background: var(--hover-strong); }
.filter-panel-body::-webkit-scrollbar-track { background: transparent; }
@media (max-width: 480px) { .filter-panel { width: calc(100vw - 32px); right: 0; } }
/* RTL: the actions row mirrors to the left edge, so a right-anchored panel
   (filter dropdowns + the edit-monitor modal) runs off-screen. Anchor it to the
   inline-start side instead. Higher specificity beats the base/mobile rules. */
[dir="rtl"] .filter-panel { right: auto; left: 0; transform-origin: top left; }
.filter-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 40; animation: filter-backdrop-in 150ms ease-out; }
@keyframes filter-backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.ad-carousel { background: var(--surface); border: 0.5px solid var(--border-faint); border-radius: 10px; padding: 10px; margin: 0; margin-bottom: 10px; }
.ad-carousel-viewport { overflow: hidden; }
.ad-carousel-track { display: flex; transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.ad-carousel-slide { box-sizing: border-box; padding-right: 2px; }
.ad-slide-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 8px; }
.ad-slide-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px; margin-bottom: 8px; }
.ad-slide-icon .ti { font-size: 14px; }
.ad-slide-image-row { display: flex; gap: 10px; align-items: flex-start; }
.ad-slide-image { flex: 0 0 50px; height: 50px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.ad-slide-image .ti { font-size: 20px; color: var(--on-accent); }
.ad-slide-text { flex: 1; min-width: 0; }
.ad-slide-title { font-size: 12px; font-weight: 500; margin: 0 0 2px; color: var(--text-primary); line-height: 1.3; }
.ad-slide-body { font-size: 10px; color: var(--text-tertiary); margin: 0 0 10px; line-height: 1.4; }
.ad-slide-cta { display: block; width: 100%; box-sizing: border-box; padding: 5px 10px; color: var(--on-accent); border: none; border-radius: 5px; font-size: 11px; font-weight: 500; font-family: inherit; text-align: center; text-decoration: none; cursor: pointer; }
.ad-slide-cta:hover { opacity: 0.92; }
.ad-carousel-controls { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 10px; padding-top: 8px; border-top: 0.5px solid var(--border-faint); }
.ad-carousel-arrow { background: none; border: none; padding: 4px; margin: 0 2px; cursor: pointer; color: var(--text-tertiary); display: inline-flex; align-items: center; border-radius: 4px; transition: color 150ms ease, background 150ms ease; }
.ad-carousel-arrow:hover { color: var(--text-primary); background: var(--hover); }
.ad-carousel-arrow .ti { font-size: 14px; }
.ad-carousel-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--track); border: none; padding: 0; cursor: pointer; transition: background 200ms ease, width 200ms ease, border-radius 200ms ease; }
.ad-carousel-dot.is-active { background: var(--surface-invert); width: 16px; border-radius: 3px; }

/* Sponsors — an understated brand/logo strip that scrolls slowly across. The
   track holds two identical copies; translating it -50% lands on a seamless
   loop. Trailing margin (not flex gap) keeps the seam spacing even. */
.sponsors-section { max-width: 1000px; margin: 0 auto; padding: 3.5rem 1.5rem 4rem; text-align: center; }
.sponsors-label { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-tertiary); margin: 0 0 1.75rem; }
.sponsors-marquee { overflow: hidden; padding: 6px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.sponsors-logos { display: flex; align-items: center; width: max-content; animation: sponsors-scroll 30s linear infinite; }
.sponsors-marquee:hover .sponsors-logos { animation-play-state: paused; }
.sponsor-brand { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; margin-right: 3.25rem; text-decoration: none; color: var(--text-secondary); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; opacity: 0.7; transition: opacity 150ms ease, color 150ms ease; }
.sponsor-brand i { font-size: 21px; color: var(--text-tertiary); transition: color 150ms ease; }
.sponsor-brand:hover { opacity: 1; color: var(--text-primary); }
.sponsor-brand:hover i { color: var(--accent-text); }
.sponsors-cta { font-size: 13px; color: var(--text-tertiary); margin: 2.25rem 0 0; }
.sponsors-cta-link { color: var(--accent-text); text-decoration: none; font-weight: 500; }
.sponsors-cta-link:hover { text-decoration: underline; }
@keyframes sponsors-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .sponsors-logos { animation: none; } }

@media (max-width: 640px) {
  .sponsors-section { padding: 2.5rem 1rem 3rem; }
  .sponsor-brand { font-size: 17px; margin-right: 2.25rem; }
  .sponsor-brand i { font-size: 19px; }
}

.edit-modal-body { padding: 15px 17px; }
.error-banner { background-color: #e9a17178; border-left: 4px solid red; padding: 8px 8px; margin-bottom: 15px; }
.error-banner > p { margin: 5px; }
.recent-check-table-header { display: flex; justify-content: space-between; }
.recent-check-table-header * { margin: 0; padding: 5px; }
.password-field { position: relative; }
.password-field input { width: 100%; padding-right: 2.5rem; }
.password-field button { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; }


/* ===== Floating theme toggle (bottom-left) ===== */
.theme-toggle {
    position: fixed;
    right: 16px;
    bottom: 32px;
    z-index: 60;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-secondary);
    border: 0.5px solid var(--border-strong);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s ease, color 0.15s ease,
                transform 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover {
    opacity: 1;
    color: var(--text-primary);
    transform: translateY(-1px);
}

.theme-toggle svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
    .theme-toggle { transition: none; }
}

/* Language picker — a flag dropdown that sits inline in the navbar. */
.locale-toggle { position: relative; display: inline-flex; }
.locale-trigger { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 7px; border-radius: 6px; background: transparent; border: 0.5px solid var(--border-strong); color: var(--text-secondary); cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease; }
.locale-trigger:hover { color: var(--text-primary); border-color: var(--border-stronger); }
.locale-trigger .ti { font-size: 14px; }
.locale-flag { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; display: block; }
.locale-backdrop { position: fixed; inset: 0; z-index: 90; }
.locale-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 100; display: flex; flex-direction: column; min-width: 170px; max-height: 300px; overflow-y: auto; padding: 5px; background: var(--surface); border: 0.5px solid var(--border-strong); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18); }
.locale-option { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: none; background: transparent; border-radius: 7px; color: var(--text-secondary); font-size: 13px; font-family: inherit; text-align: left; cursor: pointer; }
.locale-option:hover { background: var(--hover); color: var(--text-primary); }
/* In the mobile dropdown the trigger fills the row. */
.landing-mobile-menu .locale-toggle { display: flex; }
.landing-mobile-menu .locale-trigger { width: 100%; height: 40px; justify-content: space-between; }


/* ===== OAuth callback states ===== */
.callback-card { text-align: center; padding: 2.25rem 1.5rem; }

.callback-logo { display: flex; justify-content: center; margin-bottom: 1.4rem; }
.callback-logo svg { width: 34px; height: 34px; overflow: visible; }

.callback-icon {
    width: 48px; height: 48px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--danger-bg);
    color: var(--danger);
}
.callback-icon svg { width: 26px; height: 26px; }

.callback-title { font-size: 16px; font-weight: 500; margin: 0 0 4px; color: var(--text-primary); }
.callback-sub   { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin: 0; }

.callback-actions { display: flex; gap: 8px; justify-content: center; margin-top: 1.5rem; }


.sponsor-logo-blue   { background: #102234; color: #8fc1ef; }
.sponsor-logo-teal   { background: #11271f; color: #7fdcb6; }
.sponsor-logo-amber  { background: #2a2110; color: #f3ca8c; }
.sponsor-logo-purple { background: #1f1d3a; color: #b3aef0; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.25rem 0 1rem;
    color: var(--text-tertiary);
    font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 0;
    border-top: 0.5px solid var(--border);
}


.spin {
    display: inline-block;
    animation: spin 0.6s ease-in-out;
}

@keyframes spin {
    from { transform: rotate(0deg);   font-size: 1rem; }
    50%  { transform: rotate(180deg); font-size: 1.5rem; }
    to   { transform: rotate(360deg); font-size: 1rem; }
}



.why-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 2rem 4rem;
}
 
.why-head { 
    margin-bottom: 1.75rem; 
    text-align: center;
}

.why-eyebrow {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 10px;
}
.why-title {
    font-size: 28px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 0;
}
 
/* ---- bento grid ---- */
.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    grid-template-areas:
        "latency latency status"
        "latency latency status"
        "checks  team    channels";
}
 
.why-card {
    background: var(--surface);
    border: 0.5px solid var(--border-faint);
    border-radius: 14px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
}
.why-card-latency  { grid-area: latency; }
.why-card-status   { grid-area: status; }
.why-card-checks   { grid-area: checks; }
.why-card-team     { grid-area: team; }
.why-card-channels { grid-area: channels; }
 
.why-card-head { display: flex; align-items: center; gap: 8px; }
.why-card-head .ti { font-size: 18px; color: var(--text-secondary); }
.why-card-title { font-size: 15px; font-weight: 500; color: var(--text-primary); margin: 0; }
.why-card-title-sm { font-size: 14px; }
.why-card-body {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 6px 0 14px;
}
 
/* ---- latency card ---- */
.why-latency-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.why-degraded-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 8px;
    background: var(--warning-bg);
    color: var(--warning-strong);
    border: 0.5px solid var(--warning-border);
}
.why-degraded-badge .ti { font-size: 13px; color: inherit; }
 
.why-chart { width: 100%; height: auto; display: block; }
 
.why-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    color: var(--text-secondary);
}
.why-legend span { display: inline-flex; align-items: center; gap: 5px; }
.why-legend i { width: 10px; height: 2px; border-radius: 1px; display: inline-block; }
 
/* ---- mini status page ---- */
.why-status-inner {
    background: var(--surface-muted);
    border-radius: 8px;
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.why-status-head { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.why-status-headline { font-size: 12px; font-weight: 500; color: var(--text-primary); }
.why-status-rows { display: flex; flex-direction: column; gap: 11px; }
.why-status-row { display: flex; align-items: center; justify-content: space-between; }
.why-status-row span:first-child { font-size: 11px; color: var(--text-secondary); }
 
.why-status-bars {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    align-items: stretch;
    gap: 2px;
    height: 36px;
}
.why-status-bars .why-bar { flex: 1; border-radius: 1px; opacity: 0.85; }
.why-status-foot { font-size: 10px; color: var(--text-tertiary); margin: 6px 0 0; }
 
/* ---- sparkbars (checks) ---- */
.why-sparkbars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 30px;
    margin-top: auto;
}
.why-sparkbars .why-bar { flex: 1; border-radius: 2px; }
 
/* shared bar fills — your uptime palette */
.why-bar { display: block; }
.why-fill-up      { background: #639922; }
.why-fill-up-mid  { background: #97C459; }
.why-fill-up-soft { background: #C0DD97; }
.why-fill-warn    { background: #EF9F27; }
.why-fill-down    { background: #E24B4A; }
 
/* ---- team avatars ---- */
.why-avatars { display: flex; align-items: center; margin-top: auto; }
.why-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    border: 1.5px solid var(--surface);
}
.why-avatar + .why-avatar { margin-left: -8px; }
.why-avatar-1    { background: var(--info-bg);     color: var(--info-text); }
.why-avatar-2    { background: var(--success-bg);  color: var(--success-strong); }
.why-avatar-3    { background: var(--pink-bg);     color: var(--pink-text); }
.why-avatar-more { background: var(--surface-soft); color: var(--text-secondary); }
 
/* ---- channel chips ---- */
.why-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.why-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 4px 9px;
    border: 0.5px solid var(--border-faint);
    border-radius: 8px;
    color: var(--text-secondary);
}
.why-chip-primary { border-color: var(--border-strong); color: var(--text-primary); }
.why-chip .ti { font-size: 13px; }
.why-chip-whatsapp .ti { color: var(--success-solid); }
.why-chip-telegram .ti { color: var(--accent-bright); }
 
/* ---- responsive ---- */
@media (max-width: 768px) {
    .why-section { padding: 1rem 1rem 3rem; }
    .why-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "latency"
            "status"
            "checks"
            "team"
            "channels";
    }
    .why-title { font-size: 24px; }
}


/* =========================================================
   Mobile: off-canvas sidebar drawer + responsive app pages
   ========================================================= */

/* Drawer controls are hidden on desktop; the sidebar stays in-flow. */
.sidebar-toggle,
.sidebar-close,
.sidebar-backdrop { display: none; }

@media (max-width: 768px) {
    /* Floating hamburger, fixed top-left */
    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 60;
        width: 40px;
        height: 40px;
        padding: 0;
        background: var(--surface);
        border: 0.5px solid var(--border-strong);
        border-radius: 8px;
        color: var(--text-primary);
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    }
    .sidebar-toggle:hover { background: var(--surface-muted); }

    /* Sidebar becomes an off-canvas drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 70;
        height: 100vh;
        height: 100dvh;
        width: 264px;
        max-width: 84vw;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 2px 0 18px rgba(0, 0, 0, 0.2);
    }
    .sidebar.is-open { transform: translateX(0); }

    /* Close (X) button inside the drawer header */
    .sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        width: 28px;
        height: 28px;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 6px;
        color: var(--text-secondary);
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
    }
    .sidebar-close:hover { background: var(--hover); color: var(--text-primary); }

    /* Dimmed backdrop behind the open drawer */
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 65;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }
    .sidebar-backdrop.is-open { opacity: 1; visibility: visible; }

    /* Top padding on the scroll container clears the floating hamburger for
       every page (including the Tailwind-based god-eye admin pages). */
    .app-main { padding-top: 3.5rem; }
    .dashboard,
    .incidents-page,
    .heatmap-page,
    .settings-page,
    .checks-page,
    .monitor-detail { padding: 0.5rem 1rem 1.5rem; }

    /* Headers stack instead of overflowing */
    .dashboard-header,
    .monitor-detail-header { flex-wrap: wrap; gap: 10px; }
    .dashboard-actions,
    .monitor-detail-actions { flex-wrap: wrap; }

    /* KPI cards: two across */
    .status-grid { grid-template-columns: repeat(2, 1fr); }

    /* Monitor table — keep Name, Status, Latency; hide sparkline, last check, uptime */
    .monitor-table-header,
    .monitor-row { grid-template-columns: 1.7fr 0.9fr 0.8fr; gap: 8px; }
    .monitor-table-header > *:nth-child(3),
    .monitor-table-header > *:nth-child(4),
    .monitor-table-header > *:nth-child(6),
    .monitor-row > *:nth-child(3),
    .monitor-row > *:nth-child(4),
    .monitor-row > *:nth-child(6) { display: none; }
    /* Truncate the name/meta so a long monitor name can't widen the column
       (fr tracks default to min-content; min-width:0 lets it shrink). */
    .monitor-name { min-width: 0; }
    .monitor-name p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* Incident table — keep Monitor, Status, Duration; hide Started, Cause */
    .incident-table-header,
    .incident-row { grid-template-columns: 1.8fr 1fr 0.9fr; gap: 8px; }
    .incident-table-header > *:nth-child(2),
    .incident-table-header > *:nth-child(4),
    .incident-row > *:nth-child(2),
    .incident-row > *:nth-child(4) { display: none; }

    /* Checks table — keep Status, When, Latency; hide Code, Detail */
    .checks-table-header,
    .check-row { grid-template-columns: 0.8fr 1.4fr 0.8fr; gap: 8px; }
    .checks-table-header > *:nth-child(3),
    .checks-table-header > *:nth-child(5),
    .check-row > *:nth-child(3),
    .check-row > *:nth-child(5) { display: none; }

    /* Heatmap — scroll the grid sideways so cells stay legible/tappable
       instead of being squeezed to a few pixels. */
    .heatmap-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .heatmap-grid { min-width: 520px; grid-template-columns: 48px 1fr; }
    .heatmap-card { padding: 0.85rem; }
    .heatmap-legend { flex-wrap: wrap; gap: 8px; }
    .heatmap-legend-scale { flex-wrap: wrap; }
    .worst-window-row { grid-template-columns: 1fr auto; row-gap: 4px; font-size: 13px; }
    .worst-window-downtime { text-align: right; }

    /* Settings — stack nav above content, single-column rows */
    .settings-page { height: auto; }
    .settings-layout { flex-direction: column; gap: 1rem; }
    .settings-nav { width: 100%; flex-direction: row; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
    .settings-nav-item { white-space: nowrap; }
    .settings-row { grid-template-columns: 1fr; gap: 8px; }
    .settings-input { max-width: 100%; }
}

/* Edit-monitor modal becomes a full-width bottom sheet on mobile. It reuses the
   .filter-panel dropdown styles, which are absolutely positioned to the actions
   row and run off-screen on small viewports — pin it to the viewport instead. */
@media (max-width: 768px) {
    .edit-monitor-backdrop { z-index: 1000; }
    .edit-monitor-panel {
        position: fixed;
        inset: auto 0 0 0;
        width: 100%;
        max-width: 100%;
        max-height: 88vh;
        display: flex;
        flex-direction: column;
        border-radius: 16px 16px 0 0;
        z-index: 1001;
        animation: modal-slide-up-mobile 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .edit-monitor-panel .modal-body { flex: 1; min-height: 0; overflow-y: auto; }
}
