:root {
  --navy-950: #052c3a;
  --navy-900: #073b4c;
  --navy-800: #0b4a5f;
  --slate-700: #3f5963;
  --slate-500: #72868e;
  --slate-300: #becbd0;
  --slate-200: #d8e1e4;
  --slate-100: #eaf0f2;
  --surface: #ffffff;
  --canvas: #f1f4f5;
  --blue: #3778ff;
  --cyan: #0ca7c8;
  --green: #14a673;
  --orange: #f47a2a;
  --red: #e34e56;
  --ink: #132e38;
  --muted: #71828a;
  --border: #dfe6e8;
  --shadow: 0 16px 48px rgba(16, 48, 60, .07);
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-display: "Sora", "Aptos Display", sans-serif;
  --font-body: "Manrope", "Aptos", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; }
svg { display: block; }

/* Login */
.login-body { min-height: 100vh; background: #eef2f3; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.08fr) minmax(420px, .92fr); }
.login-story { position: relative; min-height: 100vh; padding: 46px 58px; overflow: hidden; display: flex; flex-direction: column; color: #fff; background: var(--navy-900); }
.login-story::before { content: ""; position: absolute; width: 520px; height: 520px; right: -210px; bottom: -170px; border-radius: 50%; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 0 0 90px rgba(255,255,255,.025), 0 0 0 180px rgba(255,255,255,.018); }
.login-story::after { content: ""; position: absolute; width: 240px; height: 240px; right: 16%; top: 20%; background: radial-gradient(circle, rgba(12,167,200,.28), transparent 68%); filter: blur(15px); }
.login-grid { position: absolute; inset: 0; opacity: .13; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(to bottom right, #000, transparent 72%); }
.login-story__top { position: relative; z-index: 2; display: flex; align-items: center; gap: 13px; font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: inline-grid; place-items: center; color: var(--navy-900); background: #e3f6fa; }
.brand-mark svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark--light { color: #fff; background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.12); }
.login-story__content { position: relative; z-index: 2; margin: auto 0; max-width: 660px; }
.eyebrow { margin: 0 0 10px; color: #54717c; font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.eyebrow--light { color: #79d8e7; }
.login-story h1 { margin: 0; max-width: 650px; font-family: var(--font-display); font-size: clamp(44px, 5vw, 76px); line-height: 1.08; letter-spacing: -.055em; }
.login-story__content > p:last-child { margin: 28px 0 0; max-width: 540px; color: rgba(255,255,255,.68); font-size: 16px; line-height: 1.75; }
.login-story__footer { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 30px; color: rgba(255,255,255,.58); font-size: 12px; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #21d795; box-shadow: 0 0 0 4px rgba(33,215,149,.12); }
.login-panel { min-height: 100vh; display: grid; place-items: center; padding: 48px; background: linear-gradient(145deg, #f7f9f9 0%, #e9eff1 100%); }
.login-card { width: min(100%, 420px); padding: 46px; border: 1px solid rgba(216,225,228,.9); border-radius: 24px; background: rgba(255,255,255,.88); box-shadow: 0 30px 90px rgba(7,59,76,.11); backdrop-filter: blur(15px); }
.mobile-brand { display: none; }
.login-card h2 { margin: 0; font-family: var(--font-display); font-size: 31px; line-height: 1.2; letter-spacing: -.04em; }
.login-hint { margin: 12px 0 30px; color: var(--muted); font-size: 14px; }
.login-form label { display: block; margin-bottom: 8px; color: #3f5963; font-size: 12px; font-weight: 700; }
.password-field { position: relative; }
.password-field input { width: 100%; height: 54px; padding: 0 50px 0 16px; color: var(--ink); outline: none; border: 1px solid var(--border); border-radius: 12px; background: #f9fbfb; transition: border-color .2s, box-shadow .2s, background .2s; }
.password-field input:focus { border-color: var(--cyan); background: #fff; box-shadow: 0 0 0 4px rgba(12,167,200,.1); }
.password-toggle { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; padding: 9px; cursor: pointer; border: 0; border-radius: 9px; color: var(--muted); background: transparent; }
.password-toggle:hover { background: var(--slate-100); }
.password-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
.form-error { margin: 10px 0 0; color: var(--red); font-size: 12px; }
.login-submit { width: 100%; height: 54px; margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 12px; cursor: pointer; color: #fff; background: var(--navy-900); font-weight: 700; box-shadow: 0 12px 25px rgba(7,59,76,.19); transition: transform .2s, background .2s, box-shadow .2s; }
.login-submit:hover { transform: translateY(-2px); background: var(--navy-800); box-shadow: 0 16px 30px rgba(7,59,76,.24); }
.login-submit svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.login-meta { margin: 30px 0 0; color: #9aa9ae; font-size: 10px; text-align: center; }

/* Dashboard shell */
.dashboard-body { min-height: 100vh; overflow-x: hidden; background: var(--canvas); }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 226px minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: 226px; padding: 26px 17px 20px; display: flex; flex-direction: column; color: #fff; background: var(--navy-950); }
.sidebar::after { content: ""; position: absolute; inset: auto 0 0; height: 220px; pointer-events: none; background: radial-gradient(circle at 30% 100%, rgba(12,167,200,.18), transparent 65%); }
.sidebar-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; padding: 0 8px; font-family: var(--font-display); }
.sidebar-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.08; }
.sidebar-brand strong { font-size: 16px; letter-spacing: -.03em; }
.sidebar-brand small { margin-top: 3px; color: rgba(255,255,255,.44); font-family: var(--font-body); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; }
.sidebar-nav { position: relative; z-index: 1; margin-top: 52px; }
.sidebar-nav > p { margin: 0 12px 12px; color: rgba(255,255,255,.34); font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.nav-link { position: relative; min-height: 44px; margin-bottom: 5px; padding: 0 12px; display: flex; align-items: center; gap: 12px; border-radius: 10px; color: rgba(255,255,255,.6); font-size: 13px; font-weight: 600; text-decoration: none; transition: color .2s, background .2s, transform .2s; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.06); transform: translateX(2px); }
.nav-link.is-active { color: #fff; background: rgba(255,255,255,.1); }
.nav-link.is-active::before { content: ""; position: absolute; left: -17px; width: 3px; height: 22px; border-radius: 0 4px 4px 0; background: #24c4dc; }
.nav-link svg, .logout-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-count { min-width: 20px; height: 20px; margin-left: auto; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 20px; color: #fff; background: rgba(255,255,255,.12); font-size: 9px; }
.nav-count.has-alert { background: var(--red); }
.sidebar-spacer { flex: 1; }
.sidebar-pulse { position: relative; z-index: 1; margin: 10px 3px 18px; padding: 14px; display: flex; align-items: center; gap: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.045); }
.pulse-orbit { position: relative; width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border: 1px solid rgba(56,208,191,.4); border-radius: 50%; }
.pulse-orbit::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(56,208,191,.22); border-radius: 50%; }
.pulse-orbit span { width: 6px; height: 6px; border-radius: 50%; background: #38d0bf; box-shadow: 0 0 13px #38d0bf; }
.sidebar-pulse strong, .sidebar-pulse small { display: block; }
.sidebar-pulse strong { font-size: 10px; }
.sidebar-pulse small { margin-top: 4px; color: rgba(255,255,255,.44); font-size: 9px; }
.logout-button { position: relative; z-index: 1; width: 100%; height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; border: 0; border-radius: 9px; color: rgba(255,255,255,.46); background: transparent; font-size: 11px; }
.logout-button:hover { color: #fff; background: rgba(255,255,255,.05); }

.main-content { grid-column: 2; min-width: 0; }
.topbar { position: sticky; z-index: 30; top: 0; height: 68px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.88); backdrop-filter: blur(16px); }
.breadcrumb { color: var(--muted); font-size: 11px; }
.breadcrumb strong { color: var(--ink); font-weight: 700; }
.breadcrumb i { margin: 0 8px; color: #b7c3c7; font-style: normal; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.timezone-pill { height: 34px; padding: 0 12px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); background: #fff; font-size: 10px; font-weight: 700; }
.timezone-pill svg, .icon-button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; border: 1px solid var(--border); border-radius: 10px; color: var(--slate-700); background: #fff; }
.icon-button:hover { color: var(--cyan); border-color: #abdfe8; }
.icon-button.is-spinning svg { animation: spin .8s linear infinite; }
.mobile-menu, .mobile-wordmark { display: none; }
.content-wrap { width: min(1480px, 100%); margin: 0 auto; padding: 36px 30px 24px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.hero h1 { margin: 0; font-family: var(--font-display); font-size: clamp(27px, 3vw, 39px); line-height: 1.15; letter-spacing: -.045em; }
.hero-subtitle { max-width: 680px; margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.check-button { min-width: 172px; height: 55px; padding: 0 17px 0 10px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 13px; cursor: pointer; color: #fff; background: var(--navy-900); box-shadow: 0 12px 25px rgba(7,59,76,.16); transition: transform .2s, background .2s; }
.check-button:hover { transform: translateY(-2px); background: var(--navy-800); }
.check-button:disabled { cursor: wait; opacity: .68; transform: none; }
.check-button__icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.1); }
.check-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.check-button.is-running svg { animation: spin .9s linear infinite; }
.check-button small, .check-button strong { display: block; text-align: left; }
.check-button small { color: rgba(255,255,255,.56); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.check-button strong { margin-top: 2px; font-family: var(--font-display); font-size: 12px; }

.status-strip { min-height: 76px; margin-top: 28px; padding: 14px 20px; display: flex; align-items: center; gap: 22px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 8px 32px rgba(16,48,60,.035); }
.overall-state { min-width: 220px; display: flex; align-items: center; gap: 13px; }
.state-beacon { position: relative; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: rgba(20,166,115,.1); }
.state-beacon::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(20,166,115,.24); border-radius: 50%; }
.state-beacon i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(20,166,115,.5); }
.state-beacon.is-down { background: rgba(227,78,86,.1); }
.state-beacon.is-down::before { border-color: rgba(227,78,86,.24); }
.state-beacon.is-down i { background: var(--red); box-shadow: 0 0 12px rgba(227,78,86,.5); }
.state-beacon.is-loading i { background: #a8b5ba; animation: pulse 1.3s ease-in-out infinite; }
.overall-state small, .overall-state strong, .status-meta small, .status-meta strong { display: block; }
.overall-state small, .status-meta small { margin-bottom: 3px; color: var(--muted); font-size: 9px; }
.overall-state strong { font-family: var(--font-display); font-size: 12px; }
.status-divider { width: 1px; height: 36px; background: var(--border); }
.status-meta { min-width: 130px; }
.status-meta strong { font-size: 11px; }
.status-meta--right { margin-left: auto; }
.env-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--green); }

.kpi-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi-card { min-height: 124px; padding: 21px; display: flex; align-items: flex-start; gap: 15px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); transition: transform .2s, box-shadow .2s; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; }
.kpi-icon svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.kpi-icon--blue { color: var(--blue); background: rgba(55,120,255,.09); }
.kpi-icon--teal { color: var(--cyan); background: rgba(12,167,200,.1); }
.kpi-icon--orange { color: var(--orange); background: rgba(244,122,42,.1); }
.kpi-icon--navy { color: var(--navy-900); background: rgba(7,59,76,.09); }
.kpi-card p { margin: 0 0 7px; color: var(--muted); font-size: 10px; }
.kpi-card strong { display: block; font-family: var(--font-display); font-size: 25px; line-height: 1.05; letter-spacing: -.04em; }
.kpi-card span { display: block; margin-top: 8px; color: #97a5aa; font-size: 9px; }

.section-block { margin-top: 34px; scroll-margin-top: 90px; }
.section-heading, .panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-heading h2, .panel-heading h2 { margin: 0; font-family: var(--font-display); font-size: 18px; letter-spacing: -.035em; }
.legend { display: flex; gap: 15px; color: var(--muted); font-size: 9px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; }
.legend-dot--up { background: var(--green); }
.legend-dot--down { background: var(--red); }
.service-grid { margin-top: 15px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.service-card { position: relative; min-height: 184px; padding: 20px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); animation: rise .45s ease both; }
.service-card::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: var(--green); opacity: 0; transition: opacity .2s; }
.service-card.is-down::before { opacity: 1; background: var(--red); }
.service-card.is-degraded::before { opacity: 1; background: var(--orange); }
.service-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.service-symbol { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: var(--navy-900); background: var(--slate-100); }
.service-symbol svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service-status { padding: 5px 8px; border-radius: 20px; color: var(--green); background: rgba(20,166,115,.09); font-size: 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.service-card.is-down .service-status { color: var(--red); background: rgba(227,78,86,.09); }
.service-card.is-degraded .service-status { color: #c76620; background: rgba(244,122,42,.1); }
.service-card h3 { margin: 15px 0 3px; font-family: var(--font-display); font-size: 13px; letter-spacing: -.02em; }
.service-card__url { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.service-card__metrics { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.service-card__metrics div { min-width: 0; }
.service-card__metrics span, .service-card__metrics strong { display: block; }
.service-card__metrics span { margin-bottom: 4px; color: #9aa8ad; font-size: 8px; }
.service-card__metrics strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.service-error { margin: 13px 0 0; padding-top: 11px; overflow: hidden; border-top: 1px solid var(--border); color: var(--red); font-size: 8px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.service-ok { color: var(--muted); }

.analytics-grid { margin-top: 30px; display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(280px, .72fr); gap: 12px; scroll-margin-top: 90px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.latency-panel, .speed-panel, .heatmap-panel, .incidents-panel { padding: 22px; }
.panel-heading { align-items: flex-start; }
.range-switch { padding: 3px; display: flex; border: 1px solid var(--border); border-radius: 9px; background: var(--canvas); }
.range-switch button { min-width: 40px; height: 26px; padding: 0 8px; cursor: pointer; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 700; }
.range-switch button.is-active { color: var(--ink); background: #fff; box-shadow: 0 2px 8px rgba(16,48,60,.08); }
.chart-legend { min-height: 28px; margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 8px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.chart-legend i { width: 14px; height: 2px; border-radius: 3px; }
.chart-wrap { height: 255px; margin-top: 5px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: #e8edef; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-axis-label { fill: #92a0a5; font: 8px var(--font-body); }
.chart-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-area { opacity: .05; }
.chart-point { stroke: #fff; stroke-width: 1.5; }
.mini-badge { padding: 5px 8px; border-radius: 20px; color: var(--cyan); background: rgba(12,167,200,.08); font-size: 8px; font-weight: 700; }
.speed-orb { position: relative; height: 145px; margin-top: 8px; display: grid; place-items: center; }
.speed-orb svg { position: absolute; width: 190px; height: 112px; top: 19px; }
.speed-track, .speed-progress { fill: none; stroke-width: 8; stroke-linecap: round; }
.speed-track { stroke: #edf1f2; }
.speed-progress { stroke: var(--cyan); stroke-dasharray: 222; stroke-dashoffset: 222; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.speed-orb > div { margin-top: 34px; text-align: center; }
.speed-orb strong { display: block; font-family: var(--font-display); font-size: 31px; letter-spacing: -.05em; }
.speed-orb span { color: var(--muted); font-size: 9px; }
.speed-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; border-top: 1px solid var(--border); padding-top: 15px; }
.speed-details div { text-align: center; }
.speed-details span, .speed-details strong { display: block; }
.speed-details span { color: var(--muted); font-size: 8px; }
.speed-details strong { margin-top: 5px; font-size: 9px; }

.heatmap-panel { margin-top: 12px; }
.panel-note { color: var(--muted); font-size: 8px; }
.heatmap-scroll { margin-top: 22px; overflow-x: auto; scrollbar-width: thin; }
.heatmap { min-width: 820px; display: grid; grid-template-columns: 145px repeat(48, minmax(8px, 1fr)); gap: 3px; align-items: center; }
.heatmap-label { padding-right: 8px; overflow: hidden; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.heat-cell { height: 18px; border-radius: 3px; background: #e8edef; }
.heat-cell.is-up { background: #8edac1; }
.heat-cell.is-degraded { background: #f3c190; }
.heat-cell.is-down { background: #ef8d93; }
.heat-cell.is-empty { background: #edf1f2; }
.heatmap-axis { margin: 8px 0 0 148px; display: flex; justify-content: space-between; color: #9aa8ad; font-size: 7px; }

.incidents-panel { margin-top: 12px; scroll-margin-top: 90px; }
.incident-list { margin-top: 18px; }
.incident-row { min-height: 61px; padding: 10px 5px; display: grid; grid-template-columns: 34px minmax(170px, 1.4fr) minmax(120px, .8fr) minmax(120px, .8fr) minmax(90px, .6fr); gap: 12px; align-items: center; border-top: 1px solid var(--border); }
.incident-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--red); background: rgba(227,78,86,.08); }
.incident-icon.is-resolved { color: var(--green); background: rgba(20,166,115,.08); }
.incident-icon svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.incident-cell span, .incident-cell strong { display: block; }
.incident-cell span { margin-bottom: 4px; color: var(--muted); font-size: 7px; text-transform: uppercase; letter-spacing: .06em; }
.incident-cell strong { overflow: hidden; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.incident-state { width: fit-content; padding: 5px 8px; border-radius: 20px; color: var(--red); background: rgba(227,78,86,.08); font-size: 8px; font-weight: 700; }
.incident-state.is-resolved { color: var(--green); background: rgba(20,166,115,.08); }
.empty-state { height: 100%; min-height: 100px; display: grid; place-items: center; color: #9ba9ae; font-size: 10px; }
.dashboard-footer { padding: 28px 3px 3px; display: flex; justify-content: space-between; color: #8e9da3; font-size: 8px; }

.skeleton { position: relative; overflow: hidden; background: #e8edef; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: shimmer 1.5s infinite; }
.service-skeleton { height: 184px; border-radius: var(--radius-md); }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(380px, calc(100vw - 32px)); padding: 13px 16px; transform: translateY(20px); pointer-events: none; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; opacity: 0; color: #fff; background: var(--navy-950); box-shadow: 0 18px 50px rgba(5,44,58,.25); font-size: 11px; transition: opacity .25s, transform .25s; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast.is-error { background: #823840; }
.sidebar-scrim { display: none; }

@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 1180px) {
  .kpi-grid, .service-grid { grid-template-columns: repeat(2, 1fr); }
  .status-meta--right { display: none; }
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-panel { padding: 24px; }
  .mobile-brand { margin-bottom: 42px; display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; }
  .login-card { padding: 35px; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-102%); transition: transform .25s ease; box-shadow: 20px 0 70px rgba(5,44,58,.25); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 40; inset: 0; display: block; pointer-events: none; opacity: 0; background: rgba(5,44,58,.38); backdrop-filter: blur(2px); transition: opacity .25s; }
  .sidebar-scrim.is-visible { pointer-events: auto; opacity: 1; }
  .main-content { min-width: 0; }
  .topbar { height: 62px; padding: 0 18px; }
  .mobile-menu { width: 38px; height: 38px; padding: 9px; display: flex; flex-direction: column; justify-content: center; gap: 4px; border: 0; border-radius: 9px; background: var(--slate-100); }
  .mobile-menu span { width: 18px; height: 1.5px; background: var(--navy-900); }
  .topbar-title { margin-right: auto; margin-left: 12px; }
  .mobile-wordmark { display: block; font-family: var(--font-display); font-size: 13px; font-weight: 700; }
  .breadcrumb { display: none; }
  .content-wrap { padding: 27px 18px 20px; }
  .analytics-grid { grid-template-columns: 1fr; }
  .status-strip { flex-wrap: wrap; }
  .overall-state { flex: 1 1 100%; }
  .status-divider { display: none; }
  .status-meta { min-width: 0; flex: 1; padding-top: 12px; border-top: 1px solid var(--border); }
}

@media (max-width: 620px) {
  .login-panel { place-items: stretch; padding: 0; background: #fff; }
  .login-card { width: 100%; min-height: 100vh; padding: max(32px, env(safe-area-inset-top)) 24px 28px; display: flex; flex-direction: column; justify-content: center; border: 0; border-radius: 0; box-shadow: none; }
  .mobile-brand { margin-bottom: 58px; }
  .login-card h2 { font-size: 27px; }
  .hero { align-items: stretch; flex-direction: column; }
  .hero h1 { font-size: 28px; }
  .hero-subtitle { font-size: 12px; }
  .check-button { width: 100%; justify-content: center; }
  .status-strip { margin-top: 18px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi-card { min-height: 131px; padding: 16px; flex-direction: column; gap: 11px; }
  .kpi-icon { width: 32px; height: 32px; flex-basis: 32px; }
  .kpi-card strong { font-size: 21px; }
  .service-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .service-card { min-height: 171px; }
  .latency-panel, .speed-panel, .heatmap-panel, .incidents-panel { padding: 17px; border-radius: 15px; }
  .chart-wrap { height: 220px; }
  .panel-heading { gap: 10px; }
  .panel-heading h2 { font-size: 16px; }
  .panel-note { display: none; }
  .incident-row { padding: 14px 2px; grid-template-columns: 32px 1fr auto; }
  .incident-row .incident-cell:nth-child(3), .incident-row .incident-cell:nth-child(4) { display: none; }
  .incident-state { grid-column: 3; grid-row: 1; }
  .dashboard-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
  .timezone-pill { display: none; }
  .toast { right: 16px; bottom: 16px; }
}

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