:root {
  color-scheme: dark;
  --bg: #09090c;
  --surface: #111115;
  --surface-raised: #18171e;
  --ink: #f1eff7;
  --muted: #a3a0af;
  --subtle: #918b9d;
  --line: #2a2732;
  --accent: #c0a4ff;
  --accent-hover: #d2bcff;
  --accent-soft: #20182f;
  --red: #f19b9f;
  --red-soft: #2b191e;
  --amber: #d8bc85;
  --amber-soft: #282219;
  --radius: 9px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { color: #fff; background: #62478c; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
button, input, textarea { font: inherit; }
button, input[type="submit"] { cursor: pointer; }
h1, h2, p { margin: 0; }
h1 {
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: -1.8px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
h2 { font-size: 15px; font-weight: 500; letter-spacing: -.2px; }
pre, code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
pre { margin: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.site-header { border-bottom: 1px solid var(--line); background: #0d0c10; }
.header-inner {
  max-width: 1360px;
  min-height: 80px;
  margin: auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.8px;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-mark { width: 32px; height: 32px; color: var(--accent); }
.brand-tag {
  margin-left: 16px;
  color: var(--subtle);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.5px;
}
.header-note { color: var(--subtle); font-size: 9px; letter-spacing: 1.5px; }
.account-nav { display: flex; align-items: center; gap: 13px; min-width: 0; }
.account-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #3c2d55;
  border-radius: 7px;
  font-size: 11px;
}
.account-email { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.account-nav form { margin-left: 10px; }
.text-button { background: none; border: 0; color: var(--muted); padding: 5px 0; font-size: 12px; white-space: nowrap; }
.text-button:hover { color: var(--ink); }
.overdue-trigger { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid #61343e; border-radius: 6px; color: var(--red); background: var(--red-soft); white-space: nowrap; font-size: 11px; line-height: 1.5; }
.overdue-trigger:hover { color: #ffbac0; text-decoration: none; background: #3d2129; }
.overdue-mark { display: inline-grid; place-items: center; width: 14px; height: 14px; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 600; }
.overdue-menu { position: relative; }
.overdue-menu > summary { list-style: none; }
.overdue-menu > summary::-webkit-details-marker { display: none; }
.overdue-popover { position: absolute; top: calc(100% + 12px); right: 0; width: min(360px, calc(100vw - 40px)); z-index: 30; padding: 18px 0 0; border: 1px solid #4a303c; border-radius: var(--radius); background: #151118; box-shadow: 0 18px 48px #0009; }
.overdue-popover h2 { padding: 0 18px; }
.overdue-popover > p { padding: 5px 18px 14px; color: var(--muted); font-size: 10px; }
.overdue-popover ul { list-style: none; padding: 0; margin: 0; max-height: min(420px, 65vh); overflow-y: auto; }
.overdue-popover li { border-top: 1px solid var(--line); }
.overdue-popover li a { display: grid; gap: 4px; padding: 13px 18px; overflow-wrap: anywhere; }
.overdue-popover li a:hover, .overdue-popover li a:focus-visible { background: #241925; text-decoration: none; }
.overdue-job-name { color: var(--ink); font-size: 12px; }
.overdue-job-id, .overdue-job-server, .overdue-job-deadline { color: var(--muted); font-size: 10px; }
@media (max-width: 760px) {
  .header-inner:has(#overdue-notifications:not([hidden])) { flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; row-gap: 12px; }
  .account-nav:has(#overdue-notifications:not([hidden])) { position: relative; flex: 1 1 100%; }
  .account-nav:has(#overdue-notifications:not([hidden])) .account-email { flex: 1; min-width: 0; max-width: none; }
  .overdue-menu { position: static; }
  .overdue-popover { left: 0; right: 0; width: 100%; }
}

.page { max-width: 1360px; min-height: calc(100svh - 157px); margin: auto; padding: 58px 48px 64px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 32px; margin-bottom: 36px; }
.eyebrow { display: block; margin-bottom: 16px; color: var(--accent); font-size: 9px; font-weight: 500; letter-spacing: 1.8px; line-height: 1.6; }
.eyebrow-divider { color: #5e526e; margin: 0 10px; }
.dashboard-heading h1::after { content: "."; color: var(--accent); }
.subtitle { max-width: 700px; margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 11px 18px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s;
}
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button-primary { background: var(--accent); color: #170e26; border-color: #cfbaff; }
.button-primary:hover { background: var(--accent-hover); color: #170e26; }
.button-plus { font-size: 19px; font-weight: 400; line-height: 1; }
.button-secondary { background: #18161e; border-color: #36313f; color: var(--ink); }
.button-secondary:hover { background: #211d29; color: var(--ink); border-color: #65527e; }
.button-danger { background: var(--red-soft); color: var(--red); border-color: #61343e; }
.button-danger:hover { background: #3d2129; color: #ffbac0; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 40px;
  background: #0f0e13;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.summary-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 13px;
  min-height: 155px;
  padding: 25px 28px;
  border-right: 1px solid var(--line);
}
.summary-card:last-child { border-right: 0; }
.summary-card:first-child { background: radial-gradient(ellipse at top left, #241931 0%, transparent 90%); }
.summary-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 400; letter-spacing: .5px; }
.summary-card strong { font-size: 42px; line-height: 1; letter-spacing: -1.8px; font-weight: 400; font-variant-numeric: tabular-nums; }
.summary-card:first-child strong { color: #dbc9ff; }
.summary-caption { color: var(--subtle); font-size: 10px; }
.summary-value { font-size: 24px; font-weight: 400; letter-spacing: -.7px; }
.detail-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-summary .summary-card { gap: 15px; }

.status-dot { display: inline-block; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; }
.status-dot.healthy { background: #bd9ae9; box-shadow: 0 0 7px #b598e526; }
.status-dot.overdue { background: #ef8b96; }
.status-dot.waiting { background: #d8bc85; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid; border-radius: 5px; font-size: 10px; font-weight: 400; line-height: 1.2; white-space: nowrap; }
.badge.healthy { color: #c8adee; background: #211a2b; border-color: #3a2c4d; }
.badge.overdue { color: var(--red); background: var(--red-soft); border-color: #57303c; }
.badge.waiting { color: var(--amber); background: var(--amber-soft); border-color: #4b3e29; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 70px; padding: 20px 25px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { display: flex; align-items: center; gap: 10px; }
.panel-heading > .muted { font-size: 10px; }
.count { padding: 1px 6px; background: #24202d; color: #c5b6dd; border: 1px solid #393043; border-radius: 4px; font-size: 10px; font-variant-numeric: tabular-nums; }
.table-scroll { position: relative; overflow-x: auto; scrollbar-color: #493956 var(--surface); scrollbar-width: thin; }
.monitors-table { width: 100%; border-collapse: collapse; text-align: left; }
.monitors-table th { padding: 13px 18px; color: var(--subtle); background: #0e0e12; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 400; letter-spacing: .3px; white-space: nowrap; }
.monitors-table td { padding: 25px 18px; border-bottom: 1px solid #24212b; font-size: 12px; vertical-align: middle; }
.monitors-table th:first-child, .monitors-table td:first-child { padding-left: 25px; }
.monitors-table tr:last-child td { border-bottom: 0; }
.monitors-table tbody tr { transition: background .15s; }
.monitors-table tbody tr:hover { background: #17141e; }
.monitor-identity { display: flex; align-items: center; gap: 12px; }
.job-mark { display: grid; place-items: center; width: 33px; height: 33px; flex-shrink: 0; border: 1px solid #352d41; border-radius: 7px; color: #a78acb; background: #1c1723; }
.job-mark svg { width: 22px; height: 22px; }
.monitor-title { min-width: 0; }
.monitor-name { display: block; min-width: 120px; color: #eae5f3; font-size: 13px; font-weight: 500; letter-spacing: -.1px; }
.monitor-name:hover { color: var(--accent); }
.monitor-description { display: block; max-width: 240px; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--subtle); font-size: 10px; }
.monitor-record { display: block; margin-top: 7px; color: var(--subtle); font-size: 9px; }
.state-preview { display: block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 8px; color: #b9a6d2; border: 1px solid #30283b; border-radius: 4px; background: #18131f; font-size: 10px; }
.details-link { color: #9c8db0; font-size: 11px; white-space: nowrap; }
.details-link:hover { color: var(--accent); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.page-note { margin-top: 19px; color: var(--subtle); font-size: 10px; line-height: 1.7; }
.site-footer { display: flex; align-items: center; gap: 8px; max-width: 1264px; margin: auto; padding: 24px 0; border-top: 1px solid var(--line); color: var(--subtle); font-size: 10px; }
.site-footer > span:last-child { margin-left: auto; }
.footer-dot { width: 5px; height: 5px; border-radius: 50%; background: #9576c0; }

.empty-state { padding: 70px 24px; text-align: center; }
.empty-state h2 { font-size: 21px; letter-spacing: -.6px; }
.empty-state p { margin: 11px 0 24px; color: var(--muted); font-size: 13px; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 24px; background: var(--accent-soft); border: 1px solid #4b355f; border-radius: 10px; color: var(--accent); font-size: 25px; }
.empty-state.compact { padding: 42px 24px; }
.empty-state.compact h2 { font-size: 16px; }
.empty-state.compact p { margin-bottom: 0; }
.back-link { display: inline-block; margin-bottom: 26px; color: var(--muted); font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; margin-bottom: 30px; }
.record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.monitor-facts { display: grid; gap: 18px; margin: 0; }
.monitor-facts > div { display: grid; grid-template-columns: minmax(105px, .8fr) minmax(0, 1.2fr); gap: 15px; align-items: baseline; }
.monitor-facts dt { color: var(--muted); font-size: 10px; }
.monitor-facts dd { margin: 0; font-size: 11px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.monitor-facts .verified { margin-left: 0; }
.alert-actions { margin-top: 23px; }
.panel-body > .alert-rules { margin-top: 23px; margin-bottom: 0; font-size: 10px; }
.panel-body { padding: 24px 25px; }
.panel-body > p { margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.code-label { display: block; margin: 23px 0 10px; color: var(--subtle); font-size: 8px; font-weight: 400; letter-spacing: 1.2px; }
.code-block, .state-block { max-height: 420px; overflow-y: auto; padding: 17px; background: #0c0b10; border: 1px solid #2c2437; border-radius: 6px; color: #c4afd9; font-size: 11px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.code-block + .field-hint { margin-top: 16px; }
.history-entry { padding: 23px 25px; border-bottom: 1px solid #26222d; }
.history-entry:last-child { border-bottom: 0; }
.history-time { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 12px; }
.history-time > .muted { margin-left: auto; color: var(--subtle); font-size: 10px; }
.history-no-state { margin-left: 16px; color: var(--subtle); font-size: 11px; }
.pagination { display: flex; justify-content: space-between; gap: 15px; padding: 20px 25px; border-top: 1px solid var(--line); }

.payload-panel, .connection-panel { margin-bottom: 24px; }
.workspace-tabs { display: flex; gap: 24px; margin: -20px 0 34px; border-bottom: 1px solid var(--line); }
.workspace-tabs a { padding: 10px 0 13px; color: var(--muted); font-size: 12px; border-bottom: 2px solid transparent; }
.workspace-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.workspace-tabs a:hover { color: var(--ink); text-decoration: none; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dashboard-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 15px; margin: -10px 0 24px; }
.server-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.server-filter label { color: var(--muted); font-size: 11px; }
.server-filter select, .field select { min-width: 0; padding: 11px 13px; color: var(--ink); background: #0c0b10; border: 1px solid #37303e; border-radius: 6px; font: inherit; }
.server-filter select { max-width: 260px; font-size: 12px; }
.field select { width: 100%; }
.server-job-group { margin-bottom: 24px; }
.server-assignment { display: grid; gap: 20px; padding: 22px; border: 1px solid #392b48; background: #15101c; border-radius: 7px; }
.server-breadcrumb { display: inline-block; margin-left: 20px; color: var(--accent); font-size: 11px; }
.monitor-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; min-width: 0; margin-bottom: 26px; }
.monitor-navigation .back-link { margin-bottom: 0; }
.server-job-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; max-width: 100%; }
.monitor-navigation .server-breadcrumb { margin-left: 0; max-width: 100%; overflow-wrap: anywhere; }
.navigation-picker { min-width: 0; width: clamp(180px, 25vw, 360px); max-width: 100%; }
.server-job-navigation select { min-width: 0; width: 100%; max-width: 100%; padding: 8px 12px; color: var(--ink); background: #0c0b10; border: 1px solid #37303e; border-radius: 6px; font: 12px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; }
.server-job-navigation select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 600px) {
  .server-job-navigation { width: 100%; }
  .navigation-picker { flex: 1 1 220px; width: 100%; }
}
.server-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.server-card { min-width: 0; padding: 26px; }
.server-card-heading { display: flex; align-items: center; gap: 12px; }
.server-card-heading > .details-link { margin-left: auto; }
.server-icon { display: grid; place-items: center; height: 35px; width: 35px; color: var(--accent); border: 1px solid #49315e; background: var(--accent-soft); border-radius: 7px; font-size: 20px; flex-shrink: 0; }
.server-name { color: var(--ink); font-size: 18px; font-weight: 500; letter-spacing: -.5px; overflow-wrap: anywhere; }
.server-hostname { margin-top: 12px; color: var(--accent); font: 10px/1.6 "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }
.server-card-description { margin-top: 14px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.server-job-counts { display: flex; gap: 28px; margin-top: 28px; color: var(--subtle); font-size: 11px; }
.server-job-counts strong { margin-right: 5px; color: var(--ink); font-size: 26px; font-weight: 400; }
.server-report-preview { display: flex; justify-content: space-between; gap: 10px; margin: 20px 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11px; }
.server-card > .button { width: 100%; }
.server-status-panel { margin-bottom: 24px; }
.server-report-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; margin-bottom: 14px; font-size: 11px; }
.status-observed { margin: 14px 0 20px; color: var(--subtle); font-size: 10px; }
.worker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 22px 0; }
.worker-card { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #151018; }
.worker-card .summary-label { font-size: 10px; }
.status-section-heading { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin: 30px 0 16px; }
.status-section-heading h3 { margin: 0; font-size: 14px; font-weight: 500; }
.status-section-heading .muted { font-size: 10px; }
.status-table-scroll { overflow-x: auto; border: 1px solid #35273f; border-radius: 6px; scrollbar-color: #604878 #0c0b10; }
.status-table { min-width: 1200px; width: 100%; border-collapse: collapse; background: #0c0b10; text-align: left; font-size: 11px; }
.status-table th { padding: 13px 14px; color: var(--subtle); font-size: 9px; font-weight: 400; white-space: nowrap; border-bottom: 1px solid var(--line); }
.status-table td { padding: 17px 14px; border-bottom: 1px solid #29202f; font-variant-numeric: tabular-nums; }
.status-table tr:last-child td { border-bottom: 0; }
.status-table td:first-child { min-width: 260px; max-width: 350px; }
.status-table td strong { display: block; font: 10px/1.6 "SFMono-Regular", Consolas, monospace; color: #d6c4e7; overflow-wrap: anywhere; }
.source-status { display: block; margin-top: 6px; color: var(--subtle); font-size: 9px; }
.status-progress { min-width: 115px; }
.status-progress progress { display: block; width: 90px; height: 4px; margin-top: 7px; accent-color: #b48de5; background: #2c1e38; border: 0; border-radius: 4px; }
.status-progress progress::-webkit-progress-bar { background: #2c1e38; border-radius: 4px; }
.status-progress progress::-webkit-progress-value { background: #b48de5; border-radius: 4px; }
.status-caveat { margin-top: 12px; }
.status-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 35px; margin: 0; }
.status-facts > div { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 1.2fr); gap: 15px; }
.status-facts dt { color: var(--subtle); font-size: 10px; }
.status-facts dd { margin: 0; color: #e0d7ea; font-size: 11px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.status-subfacts { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.status-warning { margin: 15px 0; padding: 13px 15px; border: 1px solid #65512d; border-radius: 5px; background: var(--amber-soft); color: var(--amber); font-size: 11px; overflow-wrap: anywhere; }
.server-status-panel .history-payload { margin-top: 30px; }
.report-connection { margin-top: 24px; color: var(--muted); font-size: 11px; }
.report-connection .field-hint { margin: 15px 0; }
@media (max-width: 760px) {
  .workspace-tabs { margin-top: -10px; margin-bottom: 26px; }
  .server-filter { width: 100%; gap: 9px; }
  .server-filter label { width: 100%; }
  .server-filter select { flex: 1; width: 1px; }
  .server-cards { grid-template-columns: minmax(0, 1fr); }
  .server-card { padding: 22px 20px; }
  .server-name { font-size: 17px; }
  .server-assignment { padding: 18px; }
  .status-facts { grid-template-columns: 1fr; gap: 17px; }
  .worker-card { padding: 15px 13px; }
  .worker-card .summary-label { font-size: 9px; }
  .status-facts > div { grid-template-columns: minmax(90px, .9fr) minmax(0, 1.1fr); }
  .server-metrics dd { font-size: 18px; }
}
summary { cursor: pointer; }
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.connection-panel > summary { list-style: none; border-bottom: 0; }
.connection-panel[open] > summary { border-bottom: 1px solid var(--line); }
.connection-panel > summary h2::before { content: "+"; color: var(--accent); margin-right: 3px; }
.connection-panel[open] > summary h2::before { content: "−"; }
.connection-panel > summary::-webkit-details-marker { display: none; }
.payload-viewer { min-width: 0; }
.payload-viewer [hidden] { display: none !important; }
.payload-toolbar, .payload-explore-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.payload-toolbar { justify-content: space-between; margin-bottom: 18px; }
.payload-tabs { display: inline-flex; gap: 3px; padding: 3px; background: #0a090d; border: 1px solid var(--line); border-radius: 7px; }
.payload-tabs button, .payload-button { padding: 7px 11px; border: 1px solid transparent; border-radius: 4px; background: none; color: var(--muted); font-size: 11px; line-height: 1.4; }
.payload-tabs button[aria-pressed="true"] { color: #decaff; background: #2a1e3c; border-color: #47335e; }
.payload-button { border-color: #38303f; background: #17121f; }
.payload-button:hover, .payload-tabs button:hover { color: var(--ink); background: #271d32; }
.payload-explore-tools { margin-bottom: 22px; }
.payload-search { flex: 1 1 220px; min-width: 0; }
.payload-search input { width: 100%; min-width: 0; padding: 9px 12px; border: 1px solid #3a3045; border-radius: 5px; background: #0c0b10; color: var(--ink); font-size: 12px; }
.payload-search input::placeholder { color: var(--subtle); }
.payload-format { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.payload-format input { accent-color: #b28bea; }
.payload-fold-buttons { display: flex; gap: 6px; }
.payload-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 22px; }
.payload-metrics > div { min-width: 0; padding: 17px 18px; background: linear-gradient(135deg, #23182f, #141017); border: 1px solid #3b2c4c; border-radius: 7px; }
.payload-metrics dt { margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.payload-metrics dd { margin: 0; color: #e0c8ff; font-size: 23px; line-height: 1.3; letter-spacing: -.6px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.payload-tree, .payload-children { list-style: none; margin: 0; padding: 0; }
.payload-tree { max-height: 600px; overflow: auto; background: #0c0b10; border: 1px solid #302538; border-radius: 7px; scrollbar-color: #493956 #0c0b10; }
.payload-tree li { min-width: 0; }
.payload-tree > li + li { border-top: 1px solid #211b27; }
.payload-line { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, 2fr) auto; gap: 15px; align-items: baseline; padding: 11px 15px; }
.payload-key { color: #c7b5dc; font: 11px/1.7 "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }
.payload-value { color: #eee5f6; font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; white-space: pre-wrap; }
.payload-kind-null { color: var(--subtle); }
.payload-kind-boolean, .payload-kind-status { color: #d6b5ff; }
.payload-type { align-self: start; padding: 2px 6px; color: #a794b8; border: 1px solid #33283d; border-radius: 4px; font-size: 9px; }
.payload-value-original { display: none; }
.payload-viewer[data-formatted="false"] .payload-value-human { display: none; }
.payload-viewer[data-formatted="false"] .payload-value-original { display: inline; }
.payload-tree summary { padding: 11px 15px; color: #a88ebd; font-size: 11px; }
.payload-tree summary:hover { background: #191220; }
.payload-tree summary .payload-key { margin-left: 3px; }
.payload-group-count { margin-left: 10px; color: var(--subtle); font-size: 10px; }
.payload-children { margin: 0 10px 8px 20px; border-left: 1px solid #3b2b49; }
.payload-limit { padding: 12px 15px; color: var(--muted); font-size: 11px; }
.payload-value meter { display: inline-block; width: 95px; height: 7px; margin-left: 13px; vertical-align: middle; accent-color: #b693e2; }
.payload-value meter::-webkit-meter-bar { background: #2d203a; border: 0; }
.payload-value meter::-webkit-meter-optimum-value { background: #b693e2; }
.payload-hint { margin-top: 12px; color: var(--subtle); font-size: 10px; line-height: 1.7; }
.payload-partial { margin-bottom: 15px; color: var(--amber); font-size: 11px; }
.payload-no-results { padding: 20px 0; color: var(--muted); font-size: 12px; }
.payload-feedback { min-height: 16px; margin-top: 9px; color: var(--accent); font-size: 10px; }
.payload-viewer[data-enhanced] [data-payload-raw] > summary { display: none; }
.payload-viewer [data-payload-raw] .state-block { max-height: 600px; }
.history-payload > summary { color: var(--accent); font-size: 11px; }
.history-payload > summary .muted { margin-left: 10px; font-size: 10px; }
.history-payload[open] > summary { margin-bottom: 20px; }
.history-payload .payload-metrics dd { font-size: 20px; }

@media (max-width: 760px) {
  .payload-search { flex-basis: 100%; }
  .payload-format { margin-right: auto; font-size: 10px; }
  .payload-button, .payload-tabs button { padding: 7px 9px; font-size: 10px; }
  .payload-fold-buttons { gap: 4px; }
  .payload-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .payload-metrics > div { padding: 13px 12px; }
  .payload-metrics dd { font-size: 20px; }
  .payload-line { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 11px; }
  .payload-key { font-size: 10px; }
  .payload-line > .payload-key { grid-column: 1; }
  .payload-type { grid-column: 2; grid-row: 1; font-size: 8px; }
  .payload-value { grid-column: 1 / -1; grid-row: 2; font-size: 11px; }
  .payload-tree summary { padding: 10px 11px; }
  .payload-children { margin-left: 9px; margin-right: 4px; }
  .payload-hint { font-size: 9px; }
  .payload-tree, .payload-viewer [data-payload-raw] .state-block { max-height: 480px; }
  .connection-panel > summary { flex-wrap: wrap; }
}

.auth-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr); align-items: center; gap: 100px; max-width: 1150px; margin: 55px auto 65px; }
.auth-intro { min-width: 0; }
.auth-intro .eyebrow { margin-bottom: 27px; font-size: 9px; }
.auth-intro h1 { font-size: clamp(42px, 4.5vw, 66px); font-weight: 400; letter-spacing: -3px; line-height: 1.08; }
.auth-intro h1 span { color: var(--accent); }
.auth-description { max-width: 400px; margin-top: 25px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.signal-graphic { margin-top: 55px; }
.signal-label { display: flex; align-items: center; gap: 9px; color: var(--subtle); font-size: 8px; letter-spacing: 1.2px; }
.signal-graphic > svg { display: block; width: 100%; margin-top: 15px; }
.signal-grid { stroke: #26202f; stroke-width: .6; }
.signal-steps { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; color: var(--muted); font-size: 9px; }
.signal-steps b { margin-right: 6px; color: #a98bc8; font-size: 8px; font-weight: 400; }
.auth-card { position: relative; min-width: 0; padding: 36px; border: 1px solid #433151; border-radius: 12px; background: linear-gradient(150deg, #1c1626 0%, #111014 55%); box-shadow: 0 16px 60px #00000040; }
.auth-card::before { content: ""; position: absolute; height: 1px; top: -1px; left: 25px; right: 25px; background: linear-gradient(90deg, transparent, #aa83d7, transparent); }
.auth-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 28px; border: 1px solid #4f3769; border-radius: 9px; background: #2a1e3a; color: var(--accent); }
.auth-icon svg { width: 21px; height: 21px; }
.auth-card .eyebrow { margin-bottom: 11px; color: #a08dad; font-size: 8px; letter-spacing: 1.7px; }
.auth-card h2 { font-size: 25px; font-weight: 400; letter-spacing: -.8px; }
.auth-card-description { margin-top: 10px; margin-bottom: 30px; color: var(--muted); font-size: 12px; }
.auth-card .stacked-form { gap: 16px; }
.auth-card input[type="submit"] { width: 100%; padding: 12px; }
.auth-card .form-note { margin-top: 20px; font-size: 10px; line-height: 1.8; }
.auth-reassurance { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #302638; color: var(--subtle); font-size: 9px; }
.reassurance-mark { color: #b190d7; font-size: 15px; }

.stacked-form { display: flex; flex-direction: column; gap: 25px; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field label, .field-label { color: #d0c8dc; font-size: 11px; font-weight: 400; }
.field input, .field textarea { width: 100%; padding: 12px 13px; background: #0c0b10; border: 1px solid #37303e; border-radius: 6px; color: var(--ink); caret-color: var(--accent); }
.field input:hover, .field textarea:hover { border-color: #5b476d; }
.field input:focus, .field textarea:focus { border-color: #aa87d0; }
.field textarea { min-height: 100px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8a8194; }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 100px #17101e inset; }
.form-note, .field-hint { color: var(--muted); font-size: 11px; line-height: 1.8; }
.form-note { margin-top: 20px; }
.form-panel { max-width: 720px; padding: 32px; }
.form-actions { display: flex; align-items: center; gap: 12px; padding-top: 8px; }
.readonly-field { padding: 10px 0; color: var(--muted); font-size: 13px; }
.verified { margin-left: 9px; padding: 4px 7px; color: var(--accent); background: var(--accent-soft); border: 1px solid #41304f; border-radius: 4px; font-size: 9px; }
.danger-panel { display: flex; align-items: center; justify-content: space-between; gap: 26px; max-width: 720px; margin-top: 30px; padding: 25px 32px; background: #181115; border-color: #493039; }
.danger-panel h2 { font-size: 14px; }
.danger-panel p { margin-top: 7px; color: var(--muted); font-size: 11px; }
.flash, .form-errors { margin-bottom: 26px; padding: 14px 17px; border-radius: 6px; font-size: 12px; line-height: 1.7; }
.flash-notice { color: #d5bcf2; background: #21172d; border: 1px solid #4e345e; }
.flash-alert, .form-errors { color: #f2b3b7; background: var(--red-soft); border: 1px solid #57303c; }
.form-errors { margin: 0; }
.form-errors ul { margin: 7px 0 0; padding-left: 19px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1360px) {
  .site-footer { margin: 0 48px; }
  .monitors-table td, .monitors-table th { padding-left: 15px; padding-right: 15px; }
  .monitor-description { max-width: 210px; }
  .state-preview { max-width: 170px; }
  .auth-layout { gap: 65px; }
}

@media (max-width: 1080px) {
  .header-inner { padding: 0 30px; }
  .page { padding: 45px 30px 55px; }
  .site-footer { margin: 0 30px; }
  .brand-tag { display: none; }
  .summary-card { padding: 23px; }
  .summary-caption { font-size: 9px; }
  .monitors-table { min-width: 1030px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-summary .summary-value { font-size: 20px; }
  .auth-layout { gap: 40px; }
  .auth-card { padding: 28px; }
  .auth-intro h1 { letter-spacing: -2px; }
  .header-note { font-size: 8px; }
}

@media (max-width: 760px) {
  .header-inner { min-height: 72px; padding: 0 20px; gap: 16px; }
  .brand { gap: 9px; font-size: 18px; }
  .brand-mark { width: 28px; height: 28px; }
  .account-nav { gap: 9px; }
  .account-avatar { display: none; }
  .account-email { max-width: 128px; font-size: 10px; }
  .account-nav form { margin-left: 3px; }
  .text-button { font-size: 10px; }
  .header-note { display: none; }
  .page { padding: 33px 20px 45px; }
  .page-heading { flex-direction: column; align-items: flex-start; gap: 22px; margin-bottom: 28px; }
  h1 { font-size: 34px; letter-spacing: -1.4px; }
  .dashboard-heading h1 { font-size: 38px; }
  .eyebrow { margin-bottom: 14px; font-size: 8px; }
  .subtitle { font-size: 12px; margin-top: 12px; }
  .button { padding: 10px 15px; font-size: 11px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 29px; }
  .summary-card { min-height: 145px; gap: 13px; padding: 23px 20px; border-bottom: 1px solid var(--line); }
  .summary-card:nth-child(2n) { border-right: 0; }
  .summary-card:nth-last-child(-n+2) { border-bottom: 0; }
  .summary-card strong { font-size: 36px; }
  .summary-label { font-size: 9px; }
  .summary-caption { font-size: 9px; line-height: 1.6; }
  .panel-heading { min-height: 64px; padding: 18px 20px; gap: 10px; }
  .panel-heading > .muted { font-size: 9px; }
  .panel-heading h2 { font-size: 14px; }
  .monitors-table { display: block; min-width: 0; }
  .monitors-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .monitors-table tbody { display: block; }
  .monitors-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 14px; padding: 23px 20px; border-bottom: 1px solid var(--line); }
  .monitors-table tr:last-child { border-bottom: 0; }
  .monitors-table td, .monitors-table td:first-child { display: block; min-width: 0; padding: 0; border: 0; font-size: 12px; }
  .monitors-table td:nth-child(2), .monitors-table td:nth-child(4) { text-align: right; }
  .monitors-table td:nth-child(5), .monitors-table td:nth-child(6) { grid-column: 1 / -1; }
  .monitors-table td:nth-child(6) { margin-top: -5px; text-align: right; }
  .monitors-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 7px; color: var(--subtle); font-size: 8px; letter-spacing: .8px; text-transform: uppercase; }
  .monitor-identity { gap: 9px; align-items: flex-start; }
  .job-mark { display: none; }
  .monitor-name { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
  .monitor-description { max-width: 165px; font-size: 9px; }
  .monitors-table td:nth-child(2) .monitor-description { font-size: 8px; }
  .badge { font-size: 9px; padding: 5px 7px; gap: 5px; }
  .state-preview { max-width: none; font-size: 10px; padding: 9px 10px; }
  .details-link { font-size: 11px; }
  .page-note { font-size: 9px; }
  .site-footer { margin: 0 20px; padding: 22px 0; font-size: 9px; }
  .detail-summary { grid-template-columns: 1fr; }
  .detail-summary .summary-card { min-height: 125px; border-right: 0; border-bottom: 1px solid var(--line); }
  .detail-summary .summary-card:last-child { border-bottom: 0; }
  .detail-summary .summary-card:first-child { background: #181320; }
  .history-entry, .panel-body { padding: 21px 20px; }
  .monitor-facts > div { grid-template-columns: 1fr; gap: 5px; }
  .history-time { font-size: 10px; }
  .history-time > .muted { font-size: 9px; }
  .history-no-state { font-size: 10px; }
  .code-block, .state-block { padding: 14px; font-size: 10px; }
  .pagination { flex-wrap: wrap; padding: 18px 20px; }
  .form-panel { padding: 25px 21px; }
  .form-actions { flex-wrap: wrap; }
  .danger-panel { align-items: flex-start; flex-direction: column; gap: 19px; padding: 25px 21px; }
  .back-link { margin-bottom: 24px; font-size: 10px; }
  .auth-layout { grid-template-columns: 1fr; gap: 35px; margin: 10px auto 20px; max-width: 480px; }
  .auth-intro .eyebrow { margin-bottom: 20px; font-size: 8px; }
  .auth-intro h1 { font-size: 45px; letter-spacing: -2.4px; }
  .auth-description { margin-top: 19px; font-size: 12px; line-height: 1.8; }
  .signal-graphic { display: none; }
  .signal-label { font-size: 7px; }
  .signal-graphic > svg { margin-top: 7px; }
  .signal-steps { margin-top: 3px; font-size: 8px; }
  .signal-steps b { margin-right: 3px; font-size: 7px; }
  .auth-card { padding: 28px 25px; }
  .auth-icon { width: 36px; height: 36px; margin-bottom: 23px; }
  .auth-card h2 { font-size: 24px; }
  .auth-card-description { margin-bottom: 25px; }
}

@media (max-width: 360px) {
  .account-email { max-width: 95px; }
  .auth-intro h1 { font-size: 40px; }
  .summary-card { padding: 21px 16px; }
  .summary-caption { font-size: 8px; }
  .monitors-table tr { padding: 21px 16px; gap: 17px 9px; }
  .monitor-description { max-width: 140px; }
  .badge { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .button:hover { transform: none; }
}

/* Reporter-declared dashboard components. */
.published-dashboard { min-width: 0; }
.published-title { margin: 24px 0; font-size: 21px; letter-spacing: -.025em; }
.published-section { margin-top: 28px; min-width: 0; }
.published-section > h3 { margin: 0 0 14px; font-size: 15px; font-weight: 600; }
.published-section > .field-hint { margin: -4px 0 16px; }
.published-metrics { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
.published-fields > div, .published-metrics > div { min-width: 0; }
.published-fields dt, .published-fields dd, .published-metrics dt, .published-metrics dd { overflow-wrap: anywhere; }
.published-fields dd .badge { white-space: normal; }
.published-value { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; }
.published-value progress { display: block; width: 90px; height: 5px; accent-color: var(--accent, #bf9bfa); }
.published-measurement { overflow-wrap: anywhere; }
.published-table td { max-width: 340px; overflow-wrap: anywhere; }
.published-table .published-value { display: flex; min-width: 85px; }
.published-table progress { flex-basis: 100%; }
.published-notice { padding: 14px 16px; border: 1px solid; border-radius: 7px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.published-tone-healthy { background: rgba(160, 123, 220, .12); border-color: rgba(188, 149, 250, .3); color: #ceb1fa; }
.published-tone-warning { background: rgba(230, 181, 78, .11); border-color: rgba(230, 181, 78, .35); color: #e5c17c; }
.published-tone-critical { background: rgba(242, 119, 144, .11); border-color: rgba(242, 119, 144, .3); color: #f29aad; }
.published-tone-neutral { background: rgba(156, 151, 171, .08); border-color: rgba(156, 151, 171, .2); color: #bbb6ca; }
.published-fallback { margin: 20px 0; }
.published-title, .published-section > h3 { overflow-wrap: anywhere; }
.published-metrics .badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.published-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; min-width: 0; }
.published-image-card { margin: 0; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-raised); }
.published-image-placeholder { display: flex; align-items: center; justify-content: center; min-height: 180px; padding: 24px; color: var(--muted); background: var(--bg); text-align: center; overflow-wrap: anywhere; }
.published-image-link { display: block; background: var(--bg); border-bottom: 1px solid var(--line); }
.published-image-link img { display: block; width: 100%; height: auto; max-height: 280px; aspect-ratio: 16 / 10; object-fit: contain; }
.published-image-open { display: block; padding: 8px 14px; font-size: 12px; text-align: right; }
.published-image-card figcaption { padding: 14px 16px; }
.published-image-caption { display: block; font-weight: 500; overflow-wrap: anywhere; }
.published-image-time { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.published-image-grid + .field-hint { margin-top: 14px; }

/* Per-server condition alerts. */
.alert-rule-list { display: grid; gap: 14px; margin-top: 20px; }
.alert-rule-card { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 18px; padding: 20px; border: 1px solid #33263e; background: #100d16; border-radius: 10px; min-width: 0; }
.alert-rule-summary { flex: 1 1 260px; min-width: 0; }
.alert-rule-summary h3 { margin: 0 0 10px; font-size: 15px; overflow-wrap: anywhere; }
.alert-rule-summary p { margin: 7px 0; overflow-wrap: anywhere; }
.alert-rule-summary code { white-space: normal; overflow-wrap: anywhere; color: #c6acd9; }
.alert-rule-controls { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.alert-rule-buttons { display: flex; gap: 7px; flex-wrap: wrap; }
.alert-rule-buttons form { margin: 0; }
.alert-rule-buttons .button { padding: 8px 11px; font-size: 11px; }
.alert-history { margin-top: 22px; }
.alert-history summary, .alert-custom-field summary { cursor: pointer; color: #c6acd9; }
.alert-history .status-table-scroll { margin-top: 16px; }
.alert-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.alert-check-row { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; line-height: 1.6; }
.alert-check-row input { margin-top: 4px; width: auto; accent-color: #a179d0; }
.alert-custom-field .field { margin-top: 16px; }
.condition-alert-form .form-actions { flex-wrap: wrap; }
@media (max-width: 600px) {
  .alert-form-grid { grid-template-columns: 1fr; }
  .condition-alerts-panel .panel-heading { flex-wrap: wrap; gap: 12px; }
  .alert-rule-card { padding: 15px; }
  .alert-rule-summary { flex-basis: 100%; }
}
