:root {
  color-scheme: dark;
  --bg: #0b131a;
  --surface: #111d27;
  --surface-raised: #15242f;
  --border: #273946;
  --text: #e7eff5;
  --muted: #a4b6c3;
  --faint: #788f9f;
  --accent: #64dfcd;
  --good: #61dcae;
  --warning: #ffca83;
  --danger: #ff9a9d;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.topbar { background: #101a23; border-bottom: 1px solid var(--border); }
.top-inner { max-width: 1352px; min-height: 66px; margin: auto; padding: 0 32px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-size: 18px; font-weight: 750; letter-spacing: -.035em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--accent); }
.brand-divider { width: 1px; height: 18px; background: var(--border); margin: 0 2px; }
.brand-context { color: var(--muted); font-size: 13px; font-weight: 570; letter-spacing: 0; }
.brand-icon { display: inline-grid; grid-template-columns: repeat(3,4px); align-items: end; justify-content: center; gap: 2px; width: 30px; height: 30px; background: #183833; border: 1px solid #285d55; border-radius: 9px; padding-bottom: 6px; }
.brand-icon i { display: block; background: var(--accent); width: 4px; border-radius: 3px; height: 15px; }
.brand-icon i:first-child { height: 7px; }
.brand-icon i:nth-child(2) { height: 11px; }
.top-actions { display: flex; gap: 11px; align-items: center; }
.account { color: var(--muted); font-size: 13px; max-width: 232px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; background: var(--surface-raised); color: var(--text); border: 1px solid #365060; border-radius: 8px; padding: 0 15px; font-size: 14px; font-weight: 650; white-space: nowrap; }
.button:hover { background: #1d3441; text-decoration: none; }
.button.small { min-height: 36px; font-size: 13px; padding: 0 12px; }
.button.primary { color: #09231f; background: var(--accent); border-color: var(--accent); }
.button.primary:hover { background: #90f1e3; }
.layout { max-width: 1352px; margin: auto; padding: 49px 32px 48px; }
.heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 29px; }
h1 { font-size: clamp(29px, 4vw, 42px); letter-spacing: -.045em; line-height: 1.09; font-weight: 730; }
.heading p, .panel-head p, .dialog-head p, .login p { color: var(--muted); font-size: 14px; line-height: 1.55; margin-top: 8px; }
.schedule { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 20px; border: 1px solid #29473f; background: #111e22; color: #add7cb; font-size: 12px; white-space: nowrap; }
.schedule-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { min-height: 132px; padding: 17px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: inset 0 2px 0 #365060; display: grid; align-content: start; gap: 7px; }
.stat span { font-size: 13px; font-weight: 660; color: var(--muted); }
.stat strong { font-size: 35px; letter-spacing: -.05em; font-variant-numeric: tabular-nums; font-weight: 725; }
.stat small { font-size: 12px; color: var(--muted); }
.stat.good { box-shadow: inset 0 2px 0 #378974; }
.stat.good strong { color: var(--good); }
.stat.problem { box-shadow: inset 0 2px 0 #98674f; }
.stat.problem strong { color: var(--warning); }
.stat.stale strong { color: #abc0d1; }
.tabs { display: flex; gap: 21px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs button { min-height: 42px; padding: 0 3px; background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font-size: 13px; font-weight: 660; white-space: nowrap; }
.tabs button[aria-pressed="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.panel { border-radius: 13px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.panel-head { padding: 19px 21px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
h2 { font-size: 17px; letter-spacing: -.018em; }
.panel-head p, .dialog-head p { margin-top: 4px; font-size: 12px; }
.controls { padding: 0 21px 16px; display: flex; align-items: end; gap: 12px; }
.field { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 650; }
.field.search { width: clamp(190px, 34vw, 350px); }
input, select { min-width: 0; min-height: 40px; width: 100%; padding: 0 11px; border-radius: 7px; color: var(--text); background: #0d1821; border: 1px solid #344956; font-size: 13px; }
input::placeholder { color: var(--faint); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th { font-size: 11px; font-weight: 700; color: #a9bfcc; background: #15232e; white-space: nowrap; }
th, td { border-top: 1px solid var(--border); padding: 13px 12px; }
th:first-child, td:first-child { padding-left: 21px; }
th:last-child, td:last-child { padding-right: 21px; }
tbody tr:hover { background: #15232e; }
.service { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; font-weight: 680; }
.service-icon { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border: 1px solid #3b5364; border-radius: 8px; color: #b9d6e7; background: #20313e; font-size: 10px; font-weight: 750; }
.domain { color: #c4d4df; overflow-wrap: anywhere; }
.domain:hover { color: var(--accent); }
.status { width: max-content; display: inline-flex; align-items: center; gap: 6px; border-radius: 19px; padding: 4px 8px; border: 1px solid #344b5b; background: #20313e; color: #bbd0de; font-size: 11px; font-weight: 670; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.healthy { color: var(--good); background: #142e2a; border-color: #2b584c; }
.status.unstable { color: var(--warning); background: #332822; border-color: #6b4f36; }
.status.down { color: var(--danger); background: #36242c; border-color: #6d4049; }
.time, .latency { font-variant-numeric: tabular-nums; white-space: nowrap; }
.time small { display: block; color: var(--muted); margin-top: 3px; }
.empty, .notice { padding: 14px 21px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.notice:empty { display: none; }
.login { display: grid; min-height: calc(100dvh - 67px); place-items: center; padding: 26px; background: radial-gradient(ellipse at 50% 39%, #162d35, transparent 66%); }
.login-panel { text-align: center; border: 1px solid var(--border); border-radius: 18px; background: #111d27; padding: 37px; width: min(100%, 443px); box-shadow: 0 22px 65px #060e1670; }
.login-panel h1 { font-size: 30px; }
.login-mark { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: #173b36; margin-bottom: 19px; }
.login-panel .primary { width: 100%; margin-top: 22px; }
.login-panel .notice { padding: 0; margin-top: 14px; color: var(--warning); }
dialog { width: min(700px, calc(100vw - 30px)); max-height: min(790px, 90dvh); padding: 0; border-radius: 13px; border: 1px solid #395261; background: var(--surface); color: var(--text); }
dialog::backdrop { background: #070e16cc; }
.dialog-head { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.dialog-head h2, .dialog-head p { overflow-wrap: anywhere; }
.dialog-body { padding: 18px 20px; }
.dialog-body > p { color: var(--muted); font-size: 13px; line-height: 1.55; margin-bottom: 14px; }
.dialog-body .field + .field { margin-top: 13px; }
.form-actions { display: flex; gap: 9px; flex-wrap: wrap; margin: 15px 0 1px; }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 16px; }
.detail-stats div { padding: 10px; background: #15242f; border: 1px solid var(--border); border-radius: 8px; }
.detail-stats span, .detail-stats small { font-size: 11px; display: block; color: var(--muted); }
.detail-stats strong { display: block; font-size: 14px; margin: 5px 0; }
.history { margin-top: 13px; max-height: 36dvh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.history thead { position: sticky; top: 0; }
.history th, .history td { padding: 8px 9px; }
@media (max-width: 900px) {
  .top-inner, .layout { padding-left: 20px; padding-right: 20px; }
  .monitor-table { min-width: 790px; }
}
@media (max-width: 575px) {
  .top-inner, .layout { padding-left: 15px; padding-right: 15px; }
  .account, .brand-divider, .brand-context { display: none; }
  .layout { padding-top: 27px; }
  .heading { display: grid; margin-bottom: 20px; }
  .schedule { width: fit-content; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 18px; }
  .stat { min-height: 108px; padding: 12px; }
  .stat strong { font-size: 28px; }
  .stat span, .stat small { font-size: 11px; }
  .panel-head { align-items: flex-start; padding: 15px 12px 12px; }
  .controls { padding: 0 12px 12px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 145px); gap: 7px; }
  .field.search { width: auto; }
  .login-panel { padding: 27px 21px; }
  .detail-stats { grid-template-columns: 1fr 1fr; }
  .detail-stats div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 575px) {
  .monitor-table { display: block; min-width: 0; }
  .monitor-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .monitor-table tbody { display: block; }
  .monitor-table tr { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 12px; gap: 7px 10px; border-top: 1px solid var(--border); }
  .monitor-table td { display: block; padding: 0; border: 0; }
  .monitor-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .monitor-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .monitor-table td:nth-child(3) { grid-column: 2; grid-row: 1; justify-self: end; }
  .monitor-table td:nth-child(4) { grid-column: 1; grid-row: 3; }
  .monitor-table td:nth-child(5) { grid-column: 1; grid-row: 4; }
  .monitor-table td:nth-child(6) { grid-column: 2; grid-row: 3 / 5; justify-self: end; }
  .monitor-table .time small { display: inline; margin-left: 5px; }
}
