:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --card: #ffffff;
  --line: #e4e7ec;
  --text: #111827;
  --muted: #687385;
  --ok: #10b981;
  --bad: #ef4444;
  --warn: #f59e0b;
  --soft-ok: #e8fff5;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-active: #047857;
  --primary-soft: #ecfdf5;
  --primary-border: #a7f3d0;
  --primary-focus: rgba(16, 185, 129, 0.18);
}

/* Light violet brand theme (final monitor-page overrides). */
.monitor-page {
  --bg: #f6f5fa;
  --card: #ffffff;
  --line: #e6e1ef;
  --text: #211a2e;
  --muted: #766d83;
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-active: #5b21b6;
  --primary-soft: #f3e8ff;
  --primary-border: #d8b4fe;
  --primary-focus: rgba(124, 58, 237, .18);
  --shadow: 0 18px 50px rgba(63, 38, 92, .08);
  color-scheme: light;
  background:
    radial-gradient(circle at 8% -10%, rgba(139,92,246,.14), transparent 34rem),
    radial-gradient(circle at 94% 0%, rgba(196,181,253,.18), transparent 30rem),
    #f6f5fa;
}
.monitor-page::before {
  opacity: .6;
  background-image:
    linear-gradient(rgba(124,58,237,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,.035) 1px, transparent 1px);
}
.monitor-page .topbar {
  border-color: rgba(82,54,115,.1);
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 32px rgba(69,44,97,.045);
}
.monitor-page .monitor-kicker { color: #7c3aed; }
.monitor-page .language-picker select,
.monitor-page .range {
  border-color: #e5dfee;
  background: #f5f2f9;
  color: #30263e;
}
.monitor-page .range button { color: #766d83; }
.monitor-page .range button.active {
  color: #fff;
  background: #7c3aed;
  box-shadow: 0 5px 16px rgba(124,58,237,.2);
}
.monitor-page .refresh {
  border-color: #d8b4fe;
  background: #f3e8ff;
  color: #6d28d9;
}
.monitor-page .refresh:hover { background: #ead7ff; }
.monitor-page .banner {
  border-color: #e3daee;
  background: linear-gradient(110deg, rgba(255,255,255,.99), rgba(248,245,253,.98));
  box-shadow: 0 20px 60px rgba(67,39,96,.08);
}
.monitor-page .banner::after {
  border-color: rgba(124,58,237,.12);
  box-shadow: 0 0 0 42px rgba(124,58,237,.025), 0 0 0 84px rgba(124,58,237,.018);
}
.monitor-page .banner-label { color: #8b7c9f; }
.monitor-page .banner-title { color: #211a2e; }
.monitor-page .banner-stats {
  border-color: #e5dfee;
  background: rgba(247,244,251,.9);
}
.monitor-page .banner-stats span {
  color: #645a72;
  border-color: #e5dfee;
}
.monitor-page .monitor-filter-bar {
  border-color: #e4ddec;
  background: rgba(255,255,255,.9);
  box-shadow: 0 12px 32px rgba(67,39,96,.05);
}
.monitor-page .filter-label { color: #877b95; }
.monitor-page .groups button,
.monitor-page .groups a,
.monitor-page .secondary-button {
  border-color: #e2dbe9;
  color: #695f76;
  background: #f8f6fa !important;
}
.monitor-page .groups button:hover,
.monitor-page .secondary-button:hover { border-color: #c4a4eb; color: #6d28d9; }
.monitor-page .groups button.active,
.monitor-page .secondary-button.active {
  border-color: #b98bea;
  color: #6d28d9;
  background: #f3e8ff !important;
  box-shadow: inset 0 0 0 1px rgba(124,58,237,.06);
}
.monitor-page .group-count { color: #9486a2; }
.monitor-page .filters {
  border-color: #e2dbe9;
  background: #f7f4fa !important;
}
.monitor-page .filters button {
  border-color: #e5dfea;
  color: #71667e;
  background: transparent !important;
}
.monitor-page .filters button.active {
  color: #4c1d95;
  background: #f1e8fb !important;
  box-shadow: inset 0 -2px #7c3aed;
}
.monitor-page .cards .card {
  border-color: #e4ddea;
  background: linear-gradient(145deg, #fff, #fbf9fd);
  box-shadow: 0 10px 30px rgba(62,37,88,.055);
}
.monitor-page .cards .card:hover {
  border-color: #ccb9df;
  background: #fff;
  box-shadow: 0 18px 40px rgba(62,37,88,.09);
}
.monitor-page .card-head,
.monitor-page .foot { border-color: #eee9f2; }
.monitor-page .brand-icon { border-color: #ebe4f1; background: #f8f5fb; }
.monitor-page .name { color: #2a2036; }
.monitor-page .status { border-color: #e4ddea; background: #f6f3f8; color: #756a82; }
.monitor-page .icon-button { border-color: #e4ddea; background: #fff; color: #766985; }
.monitor-page .metrics > * { border-color: #e9e3ed; color: #81758f; }
.monitor-page .metrics strong { color: #392e46; }
.monitor-page .spark-label,
.monitor-page .axis,
.monitor-page .foot { color: #8a7e98; }
.monitor-page .status-bar { border-color: #e9e3ee; background: #f5f2f7; }
.monitor-page .status-cell.no-data { background: #ddd6e5; }
.monitor-page .empty { border-color: #ded5e7; background: #fff; }
.monitor-page .tooltip { border-color: rgba(124,58,237,.32); background: #2e174b; }
.monitor-page .dialog { border-color: #dfd5e8; background: #fff; }
.monitor-page .dialog::backdrop { background: rgba(42,25,59,.35); }
.monitor-page .error-details div { border-color: #e8e0ed; background: #faf8fc; }

/* State monitor — independent observatory theme. Scoped to keep settings and
   dashboard pages on their existing visual system. */
.monitor-page {
  --bg: #070b12;
  --card: #0d131d;
  --line: rgba(148, 163, 184, 0.16);
  --text: #ecf5ff;
  --muted: #8290a3;
  --ok: #3ee6a8;
  --bad: #ff5c78;
  --warn: #ffbd4a;
  --soft-ok: rgba(62, 230, 168, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  min-height: 100vh;
  color-scheme: dark;
  background:
    radial-gradient(circle at 8% -10%, rgba(61, 112, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 94% 0%, rgba(62, 230, 168, 0.1), transparent 30rem),
    #070b12;
}

.monitor-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

.monitor-page .shell {
  width: min(1680px, 100%);
  padding: 0 36px 48px;
}

.monitor-page .topbar {
  min-height: 92px;
  margin: 0 -36px 30px;
  padding: 16px 36px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(7, 11, 18, 0.72);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.monitor-page .brand-copy { display: grid; gap: 4px; }
.monitor-page .monitor-kicker {
  color: #4fe2b1;
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .2em;
}
.monitor-page h1 {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 540;
  letter-spacing: -.035em;
}

.monitor-page .actions { gap: 9px; }
.monitor-page .language-picker select,
.monitor-page .range {
  border: 1px solid rgba(148, 163, 184, 0.17);
  background: rgba(255,255,255,.035);
  border-radius: 8px;
}
.monitor-page .language-picker select { min-height: 38px; padding: 0 12px; }
.monitor-page .range { padding: 3px; }
.monitor-page .range button,
.monitor-page .filters button,
.monitor-page .refresh { border-radius: 6px; }
.monitor-page .range button { color: #8795a8; font-size: 13px; }
.monitor-page .range button.active {
  color: #07120f;
  background: #4fe2b1;
  box-shadow: 0 0 20px rgba(79,226,177,.18);
}
.monitor-page .refresh {
  border: 1px solid rgba(79,226,177,.32);
  background: rgba(79,226,177,.08);
  color: #68ecc0;
  box-shadow: none;
  font-weight: 650;
}
.monitor-page .refresh:hover { background: rgba(79,226,177,.16); }

.monitor-page .banner {
  min-height: 168px;
  position: relative;
  padding: 58px 30px 26px;
  border: 1px solid rgba(148, 163, 184, .17);
  border-radius: 4px;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(27, 38, 55, .96), rgba(11, 17, 27, .94)),
    #0b111b;
  box-shadow: var(--shadow);
}
.monitor-page .banner::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -120px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(79,226,177,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(79,226,177,.025), 0 0 0 84px rgba(79,226,177,.018);
}
.monitor-page .banner-label {
  position: absolute;
  left: 30px;
  top: 22px;
  color: #718096;
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .18em;
}
.monitor-page .banner-icon {
  width: 54px;
  height: 54px;
  border-radius: 4px;
  border: 1px solid currentColor;
  background: rgba(255,92,120,.08);
  box-shadow: inset 0 0 20px rgba(255,92,120,.07);
  font: 800 20px/1 ui-monospace, monospace;
}
.monitor-page .banner-icon.ok { color: var(--ok); background: rgba(62,230,168,.08); }
.monitor-page .banner-icon.pending { color: #94a3b8; background: rgba(148,163,184,.08); }
.monitor-page .banner-icon.degraded { color: var(--warn); background: rgba(255,189,74,.08); }
.monitor-page .banner-icon.failed { color: var(--bad); background: rgba(255,92,120,.08); }
.monitor-page .banner-title { font-size: clamp(19px, 2vw, 25px); font-weight: 620; letter-spacing: -.02em; }
.monitor-page .banner-meta { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.monitor-page .banner-stats {
  z-index: 1;
  gap: 0;
  border: 1px solid rgba(148, 163, 184, .14);
  background: rgba(4, 8, 13, .35);
}
.monitor-page .banner-stats span {
  min-width: 150px;
  padding: 15px 18px;
  color: #afbbcb;
  font: 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  border-left: 1px solid rgba(148,163,184,.12);
}
.monitor-page .banner-stats span:first-child { border-left: 0; }

.monitor-page .monitor-filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 24px;
  margin: 18px 0;
  padding: 18px 20px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 4px;
  background: rgba(13, 19, 29, .76);
}
.monitor-page .filter-row { min-width: 0; }
.monitor-page .filter-label {
  min-width: 54px;
  color: #66758a;
  font: 700 10px/1 ui-monospace, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.monitor-page .groups,
.monitor-page .filters { gap: 7px; margin: 5px 0; }
.monitor-page .groups button,
.monitor-page .groups a,
.monitor-page .filters button,
.monitor-page .secondary-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 3px;
  color: #8f9db0;
  background: rgba(255,255,255,.025) !important;
  box-shadow: none;
  font-size: 12px;
}
.monitor-page .groups button.active,
.monitor-page .filters button.active,
.monitor-page .secondary-button.active {
  border-color: rgba(79,226,177,.48);
  background: rgba(79,226,177,.1) !important;
  color: #65e9bd;
}
.monitor-page .filters {
  display: inline-grid;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  gap: 0;
  border: 1px solid rgba(148,163,184,.16);
  background: #080d15 !important;
}
.monitor-page .filters button {
  position: relative;
  min-height: 42px;
  border: 0;
  border-right: 1px solid rgba(148,163,184,.14);
  border-radius: 0;
  padding: 0 14px 0 30px;
  text-align: left;
  background: transparent !important;
  box-shadow: inset 0 -2px transparent;
}
.monitor-page .filters button:last-child { border-right: 0; }
.monitor-page .filters button::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #657286;
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px rgba(101,114,134,.1);
}
.monitor-page .filters button[data-filter="ok"]::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(62,230,168,.1); }
.monitor-page .filters button[data-filter="degraded"]::before { background: var(--warn); box-shadow: 0 0 0 3px rgba(255,189,74,.1); }
.monitor-page .filters button[data-filter="failed"]::before { background: var(--bad); box-shadow: 0 0 0 3px rgba(255,92,120,.1); }
.monitor-page .filters button[data-filter="pending"]::before { background: #7f8da0; }
.monitor-page .filters button.active {
  border-color: transparent;
  color: #ecf5ff;
  background: rgba(255,255,255,.045) !important;
  box-shadow: inset 0 -2px #4fe2b1;
}
.monitor-page .monitor-filter-actions { align-self: end; margin-bottom: 5px; }

.monitor-page .cards { gap: 10px; }
.monitor-page .card {
  position: relative;
  border: 1px solid rgba(148,163,184,.14);
  border-radius: 3px;
  padding: 20px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(16,24,36,.98), rgba(10,15,24,.98));
  box-shadow: none;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.monitor-page .card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: #485569;
}
.monitor-page .card:has(.status.ok)::before { background: var(--ok); box-shadow: 0 0 16px var(--ok); }
.monitor-page .card:has(.status.degraded)::before { background: var(--warn); }
.monitor-page .card:has(.status.failed)::before { background: var(--bad); }
.monitor-page .card:hover {
  border-color: rgba(148,163,184,.28);
  transform: translateY(-2px);
  background: linear-gradient(145deg, rgba(19,29,43,.99), rgba(11,17,27,.99));
}
.monitor-page .card-head { padding-bottom: 14px; border-bottom: 1px solid rgba(148,163,184,.11); }
.monitor-page .brand-icon { border-radius: 3px; background: #111a27; border-color: rgba(148,163,184,.13); }
.monitor-page .name { color: #e8f2ff; font-size: 15px; letter-spacing: -.015em; }
.monitor-page .status {
  border: 1px solid rgba(148,163,184,.15);
  border-radius: 3px;
  background: rgba(148,163,184,.06);
  color: #94a3b8;
  font: 700 10px/1 ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.monitor-page .status.ok { border-color: rgba(62,230,168,.25); background: rgba(62,230,168,.07); color: var(--ok); }
.monitor-page .status.degraded { border-color: rgba(255,189,74,.25); background: rgba(255,189,74,.07); color: var(--warn); }
.monitor-page .status.failed { border-color: rgba(255,92,120,.25); background: rgba(255,92,120,.07); color: var(--bad); }
.monitor-page .icon-button { border-radius: 3px; background: #121a26; box-shadow: none; }
.monitor-page .metrics {
  gap: 10px;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
.monitor-page .metrics > * {
  min-height: 52px;
  padding: 9px 11px;
  border-left: 1px solid rgba(148,163,184,.13);
  color: #6f7d90;
  font: 10px/1.35 ui-monospace, monospace;
}
.monitor-page .metrics strong { display: block; margin-top: 3px; color: #cbd8e7; font-size: 15px; }
.monitor-page .spark-label { color: #64748b; font: 10px/1 ui-monospace, monospace; letter-spacing: .1em; }
.monitor-page .status-bar { gap: 2px; height: 42px; padding: 7px; background: rgba(0,0,0,.22); border: 1px solid rgba(148,163,184,.1); }
.monitor-page .status-cell { height: 26px; border-radius: 1px; opacity: .9; }
.monitor-page .status-cell.no-data { background: #222d3b; }
.monitor-page .status-cell.ok { background: #2acb91; }
.monitor-page .status-cell.degraded { background: #e5a93c; }
.monitor-page .status-cell.failed { background: #e44d69; }
.monitor-page .axis,
.monitor-page .foot { color: #68778b; font: 10px/1.5 ui-monospace, monospace; }
.monitor-page .foot { padding-top: 12px; border-top: 1px solid rgba(148,163,184,.09); }
.monitor-page .empty { border-radius: 3px; background: #0d131d; }
.monitor-page .tooltip { border-radius: 3px; border-color: rgba(79,226,177,.24); background: #0a1019; font-family: ui-monospace, monospace; }
.monitor-page .dialog { border-radius: 4px; background: #0d141f; }
.monitor-page .dialog::backdrop { background: rgba(0,4,10,.78); backdrop-filter: blur(5px); }
.monitor-page .error-details div { border-radius: 3px; background: rgba(255,255,255,.02); }

@media (max-width: 980px) {
  .monitor-page .shell { padding: 0 18px 32px; }
  .monitor-page .topbar { margin: 0 -18px 22px; padding: 14px 18px; position: relative; }
  .monitor-page .banner { align-items: flex-start; flex-wrap: wrap; }
  .monitor-page .banner-stats { width: 100%; margin-left: 0; }
  .monitor-page .banner-stats span { flex: 1; min-width: 0; }
  .monitor-page .monitor-filter-bar { grid-template-columns: 1fr; }
  .monitor-page .monitor-filter-actions { margin-top: 10px; }
}

@media (max-width: 680px) {
  .monitor-page .topbar { align-items: flex-start; }
  .monitor-page .actions { width: 100%; }
  .monitor-page .range { width: 100%; order: 3; }
  .monitor-page .range button { flex: 1; padding: 0 6px; }
  .monitor-page .banner { padding: 54px 18px 18px; }
  .monitor-page .banner-label { left: 18px; }
  .monitor-page .banner-stats { display: grid; }
  .monitor-page .banner-stats span { border-left: 0; border-top: 1px solid rgba(148,163,184,.12); }
  .monitor-page .banner-stats span:first-child { border-top: 0; }
  .monitor-page .cards { grid-template-columns: 1fr; }
  .monitor-page .monitor-filter-bar { padding: 14px; }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1920px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.topbar,
.actions,
.brand,
.banner,
.banner-stats,
.groups,
.filters,
.card-head,
.status,
.status-wrap,
.metrics,
.foot,
.dialog-head {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.brand {
  gap: 12px;
}

.pulse-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.site-logo {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 7px;
}

h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.actions {
  gap: 14px;
  flex-wrap: wrap;
}

.language-picker select {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
}

.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; }

.range {
  display: inline-flex;
  background: #eef0f3;
  border-radius: 999px;
  padding: 3px;
}

button {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.range button,
.filters button,
.refresh {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
}

.range button.active,
.filters button.active,
.refresh {
  background: var(--card);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.12);
}

.range button.active {
  color: #047857;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #a7f3d0, 0 1px 5px rgba(15, 23, 42, 0.12);
}

.banner {
  min-height: 76px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  gap: 16px;
}

.banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--bad);
  background: #ffe7e7;
  font-weight: 800;
}

.banner-icon.ok {
  color: #047857;
  background: #d1fae5;
}

.banner-icon.pending {
  color: #64748b;
  background: #f1f5f9;
}

.banner-icon.degraded {
  color: #b45309;
  background: #fef3c7;
}

.banner-icon.failed {
  color: var(--bad);
  background: #ffe7e7;
}

.banner-title {
  font-size: 17px;
  margin-bottom: 4px;
}

.banner-stats {
  margin-left: auto;
  gap: 22px;
  color: #4b5563;
  font-size: 14px;
}

.muted {
  color: var(--muted);
}

.groups,
.filters {
  gap: 12px;
  margin: 18px 0;
  flex-wrap: wrap;
}

.groups {
  margin-bottom: 6px;
}

.filters button {
  background: transparent;
}

.groups button,
.groups a {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

.groups button.active {
  border-color: #a7f3d0;
  color: #047857;
  font-weight: 700;
  background: #ecfdf5;
}

.group-count {
  color: var(--muted);
  font-size: 12px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.card-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.model-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #f8fafc;
  border: 1px solid #edf0f4;
  overflow: hidden;
}

.brand-icon.claude {
  background: #fff7ed;
}

.brand-icon.gemini {
  background: #eef2ff;
}

.brand-icon.gpt {
  background: #f8fafc;
}

.brand-icon.other {
  background: #eef1f5;
}

.brand-fallback {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  line-height: 1;
}

.brand-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.brand-icon.claude img,
.brand-icon.gemini img {
  width: 19px;
  height: 19px;
}

.brand-icon.gpt img {
  width: 18px;
  height: 18px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #9ca3af;
}

.dot.ok {
  background: var(--ok);
}

.dot.failed {
  background: var(--bad);
}

.dot.degraded {
  background: var(--warn);
}

.name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status {
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 14px;
  white-space: nowrap;
}

.status.ok {
  background: var(--soft-ok);
  color: #047857;
}

.status.failed {
  background: #fff1f2;
  color: #be123c;
}

.status.degraded {
  background: #fffbeb;
  color: #b45309;
}

.status-wrap {
  gap: 8px;
  flex: 0 0 auto;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card);
  color: #667085;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.error-button {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
  font-weight: 800;
}

.metrics {
  gap: 26px;
  margin-bottom: 16px;
  color: var(--muted);
}

.metrics strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.spark-label,
.axis {
  color: #8a94a6;
  font-size: 12px;
}

.range-note {
  grid-column: 1 / -1;
  margin: 0 0 12px;
  color: #5f6b7a;
  font-size: 13px;
}

.status-bar {
  display: grid;
  grid-template-columns: repeat(var(--bucket-count, 60), minmax(3px, 1fr));
  gap: 4px;
  margin: 10px 0 8px;
  height: 34px;
  align-items: end;
  overflow: hidden;
}

.status-cell {
  display: block;
  min-width: 0;
  height: 34px;
  border-radius: 3px;
  background: #d8dee7;
  cursor: default;
}

.status-cell.no-data {
  background: #e9edf3;
}

.status-cell.ok {
  background: var(--ok);
}

.status-cell.failed {
  background: var(--bad);
}

.status-cell.degraded {
  background: var(--warn);
}

.axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 0 1px;
}

.axis span {
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

.axis span:first-child {
  text-align: left;
}

.axis span:last-child {
  text-align: right;
}

.foot {
  gap: 24px;
  margin-top: 10px;
  color: #5f6b7a;
  font-size: 14px;
  flex-wrap: wrap;
}

.checked-at {
  margin-left: auto;
}

.empty {
  grid-column: 1 / -1;
  padding: 60px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 18px;
}

.tooltip {
  position: fixed;
  z-index: 20;
  width: min(360px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #111827;
  color: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
  font-size: 13px;
  line-height: 1.55;
  pointer-events: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tooltip.pinned {
  pointer-events: auto;
  max-height: min(320px, calc(100vh - 28px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: default;
  user-select: text;
}

.tooltip-copy {
  align-self: flex-end;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  padding: 3px 8px;
  cursor: pointer;
}

.tooltip-copy:hover {
  background: rgba(255, 255, 255, 0.18);
}

.tooltip-text {
  margin: 0;
  min-height: 0;
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
}

.dialog {
  width: min(620px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  color: var(--text);
  background: var(--card);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.dialog::backdrop {
  background: rgba(15, 23, 42, 0.28);
}

.dialog-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dialog-kicker {
  color: #be123c;
  font-size: 13px;
  margin-bottom: 4px;
}

.dialog h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.error-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.error-details div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.error-details dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.error-details dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}

.dialog pre {
  max-height: 340px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: #0f172a;
  color: #e5e7eb;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.nav-link {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.12);
}

.gate {
  display: grid;
  place-items: center;
  min-height: 55vh;
}

.gate-card {
  width: min(400px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.gate-card h2 {
  margin: 0;
  font-size: 20px;
}

.gate-card p {
  margin: 0;
  font-size: 14px;
}

.gate-icon {
  font-size: 30px;
}

.gate-card input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  outline: none;
}

.gate-card input:focus {
  border-color: #a7f3d0;
  box-shadow: 0 0 0 3px #d1fae5;
}

.gate-submit {
  min-height: 44px;
  border-radius: 12px;
  background: #047857;
  color: #fff;
  font-weight: 700;
}

.gate-error {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f2;
  color: #be123c;
  font-size: 14px;
}

.table-wrap {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: auto;
  position: relative;
}

.usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.usage-table th,
.usage-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.usage-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  background: #f8fafc;
  position: sticky;
  top: 0;
}

.usage-table tr:last-child td {
  border-bottom: 0;
}

.usage-table tbody tr:hover {
  background: #f8fafc;
}

.quota-col {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.id-col {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.bar-col {
  width: 90px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.rank {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.rank-1 {
  background: #fef3c7;
  color: #b45309;
}

.rank-2 {
  background: #e2e8f0;
  color: #334155;
}

.rank-3 {
  background: #ffedd5;
  color: #c2410c;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 40px !important;
}

.range-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 0;
  flex-wrap: wrap;
}

.range-bar .range button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
}

.range-bar .range button.active {
  color: #047857;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #a7f3d0, 0 1px 5px rgba(15, 23, 42, 0.12);
}

.custom-range {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.custom-range input[type="date"] {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.custom-range input[type="date"]:focus {
  border-color: #a7f3d0;
  box-shadow: 0 0 0 3px #d1fae5;
}

.range-apply {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: #047857;
  color: #fff;
  font-weight: 700;
}

.name-col {
  font-weight: 600;
}

.unit-label {
  font-size: 14px;
}

.search-box {
  margin-left: auto;
}

.search-box input {
  height: 36px;
  width: min(260px, 100%);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.search-box input:focus {
  border-color: #a7f3d0;
  box-shadow: 0 0 0 3px #d1fae5;
}

.usage-table tbody tr[data-user-id] {
  cursor: pointer;
}

.trend-dialog {
  width: min(860px, calc(100vw - 32px));
}

.trend-dialog .dialog-kicker {
  color: #047857;
}

#trend-subtitle {
  margin-top: 4px;
  font-size: 13px;
}

.trend-range-bar {
  margin: 0 0 14px;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.trend-range-bar .range {
  flex: 0 0 auto;
}

.trend-stats {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.trend-stats strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.trend-chart-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  overflow: hidden;
  position: relative;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
  z-index: 2;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #d7dbe3;
  border-top-color: #047857;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.trend-chart {
  display: block;
  width: 100%;
  height: auto;
}

.trend-chart .trend-axis line {
  stroke: #e4e7ec;
  stroke-width: 1;
}

.trend-chart .trend-axis text {
  fill: #8a94a6;
  font-size: 11px;
}

.trend-chart .trend-tick {
  fill: #8a94a6;
  font-size: 11px;
}

.trend-chart .trend-bar {
  fill: #34d399;
}

.trend-chart .trend-bar:hover {
  fill: #047857;
}

.trend-chart .trend-bar.empty {
  fill: transparent;
}

.trend-chart .trend-empty {
  fill: #8a94a6;
  font-size: 14px;
}

.department-filters {
  margin-top: 14px;
  align-items: center;
}

.department-label {
  color: var(--muted);
  font-size: 14px;
}

.department-summary {
  margin-top: 18px;
}

.query-panel {
  display: grid;
  grid-template-columns: minmax(520px, 1.65fr) minmax(260px, 0.85fr);
  grid-template-areas:
    "time name"
    "department department";
  align-items: stretch;
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: visible;
}

.query-section {
  min-width: 0;
  padding: 15px 18px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.query-time {
  grid-area: time;
}

.query-name {
  grid-area: name;
}

.query-department {
  grid-area: department;
  border-right: 0;
}

.department-filter-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.department-filter-row .department-filters {
  flex: 1 1 auto;
  min-width: 0;
}

.department-filter-row .secondary-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
}

.query-label {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  flex-wrap: wrap;
}

.filter-row .groups,
.filter-row .filters {
  margin: 0;
}

.monitor-filter-bar {
  display: grid;
  grid-template-columns: auto auto minmax(max-content, 1fr);
  align-items: center;
  gap: 24px;
  margin: 18px 0;
}

.monitor-filter-bar .filter-row {
  margin: 0;
  flex-wrap: nowrap;
}

.monitor-filter-bar .groups,
.monitor-filter-bar .filters {
  flex-wrap: nowrap;
}

.monitor-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  justify-self: end;
}

.monitor-filter-actions .secondary-button.active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.filter-label {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.query-control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.query-panel .custom-range,
.query-panel .department-filters {
  margin: 0;
}

.query-panel .department-filters {
  gap: 6px;
}

.query-panel .department-filters button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.query-panel .department-filters button.active {
  color: #047857;
  background: #ecfdf5;
  border-color: #6ee7b7;
  box-shadow: none;
  font-weight: 700;
}

.query-panel .search-box {
  margin: 0;
  display: flex;
  align-items: center;
}

.query-panel .search-box input {
  width: 100%;
  border-radius: 6px 0 0 6px;
}

.name-search-button {
  width: 40px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 0 6px 6px 0;
  color: #fff;
  background: var(--primary);
  font-size: 20px;
  font-weight: 700;
}

.name-search-button:hover {
  background: var(--primary-hover);
}

.name-search-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.date-range-picker { position: relative; }

.date-range-trigger {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: #595959;
  white-space: nowrap;
}

.date-range-trigger:hover { color: var(--primary); border-color: var(--primary-hover); }

.date-range-popover {
  position: absolute;
  z-index: 100;
  top: calc(100% + 8px);
  left: 0;
  width: min(500px, calc(100vw - 48px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
}

.date-range-fields {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 10px;
}

.date-range-fields label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }

.date-range-fields input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
}

.date-range-arrow { padding-bottom: 9px; color: var(--muted); }

.date-range-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.department-chart-layout {
  display: block;
  width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
}

.department-bar-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.department-bar-chart {
  display: block;
  width: 100%;
  height: 235px;
}

.department-grid-line {
  stroke: #e4e7ec;
  stroke-width: 1;
}

.department-axis-label,
.department-name-label,
.department-value-label {
  fill: #7b8494;
  font-size: 11px;
}

.department-value-label {
  fill: #4b5563;
  font-weight: 600;
}

.department-bar {
  opacity: 0.88;
  transition: opacity 0.15s ease;
}

.department-bar:hover {
  opacity: 1;
}

.department-bar-empty {
  fill: var(--muted);
  font-size: 14px;
}

.dashboard-overview-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.48fr) minmax(620px, 2.52fr);
  gap: 14px;
  align-items: stretch;
}

.combined-metrics {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
}

.combined-metric {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 76px;
  justify-content: center;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.combined-metric::after {
  content: attr(data-icon);
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: none;
  place-items: center;
  border-radius: 8px;
  color: var(--primary-active);
  background: var(--primary-soft);
  font-size: 14px;
  font-weight: 700;
}

.combined-metric + .combined-metric {
  border-left: 0;
  border-top: 1px solid var(--line);
}

.combined-metric > span:first-child {
  color: var(--muted);
  font-size: 12px;
}

.combined-metric strong {
  font-size: 28px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.overview-block {
  display: grid;
  grid-template-rows: auto minmax(120px, 1fr) auto;
  min-width: 0;
  min-height: 245px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.overview-card-head {
  min-height: 62px;
  padding: 13px 18px 11px;
  border-bottom: 1px solid var(--line);
}

.overview-card-head h2 {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.25;
}

.overview-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.overview-card-body {
  min-width: 0;
  padding: 16px 18px;
}

.summary-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.summary-metric strong {
  font-size: 30px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.comparison {
  font-size: 12px;
}

.overview-card-foot {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 7px 18px;
  border-top: 1px solid var(--line);
}

.overview-card-foot-muted {
  color: var(--muted);
  font-size: 12px;
}

.comparison {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
}

.comparison.up {
  color: #be123c;
  background: #ffe4e6;
}

.comparison.down {
  color: #047857;
  background: #d1fae5;
}

.department-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.department-tag-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.05);
}

.people-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.people-table-head h2 {
  margin: 0 0 3px;
  font-size: 16px;
}

.people-table-head p {
  margin: 0;
  font-size: 12px;
}

.hide-user-id .usage-table .id-col {
  display: none;
}

.comparison.neutral {
  color: #64748b;
  background: #e2e8f0;
}

.department-pie-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
}

.department-pie {
  display: block;
  width: 100%;
  height: 100%;
}

.department-pie circle {
  transition: opacity 0.15s ease;
}

.department-pie circle:hover {
  opacity: 0.78;
}

.department-pie .pie-empty {
  fill: var(--muted);
  font-size: 14px;
}

.department-pie-total {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.department-pie-total strong {
  font-size: 19px;
}

.department-pie-total span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.department-legend {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  max-height: 165px;
  overflow-y: auto;
}

.department-legend-item {
  display: grid;
  grid-template-columns: 10px minmax(80px, 1fr) auto 54px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 13px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.department-legend-item strong,
.department-legend-item .muted {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 14px;
  font-size: 14px;
}

.page-size {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.page-size select {
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--text);
  font: inherit;
}

.page-buttons {
  display: flex;
  gap: 8px;
}

.page-buttons button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
}

.page-buttons button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.settings-page {
  display: grid;
  gap: 18px;
}

.settings-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.settings-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.settings-panel h2 {
  margin: 0 0 5px;
  font-size: 18px;
}

.settings-panel p {
  margin: 0;
  font-size: 14px;
}

.settings-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.people-department-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 4px;
  flex-wrap: wrap;
}

.people-department-filter-row .department-filters {
  margin: 0;
}

.people-department-filter-row button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 400;
}

.model-group-filters {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.model-group-filters button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
}

.model-group-filters button.active {
  color: var(--primary-active);
  border-color: var(--primary-border);
  background: var(--primary-soft);
  font-weight: 700;
}

.csv-hint {
  margin-top: 12px !important;
  font-size: 12px !important;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-form {
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 2fr) auto;
}

.model-form-grid {
  grid-template-columns: minmax(160px, 1fr) minmax(260px, 2fr) minmax(110px, 0.6fr) auto;
}

.sort-order-col {
  width: 100px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.drag-handle {
  margin-right: 8px;
  padding: 3px 5px;
  color: #8c8c8c;
  cursor: grab;
  font-size: 18px;
  line-height: 1;
}

.drag-handle:active { cursor: grabbing; }
.usage-table tr.dragging { opacity: 0.38; }
.usage-table tr.drop-before td { border-top: 2px solid var(--primary); }
.usage-table tr.drop-after td { border-bottom: 2px solid var(--primary); }

.settings-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.settings-form input,
.settings-form select,
.settings-search {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
}

.settings-form input:focus,
.settings-form select:focus,
.settings-search:focus {
  border-color: #a7f3d0;
  box-shadow: 0 0 0 3px #d1fae5;
}

.settings-form .checkbox-label {
  display: flex;
  align-items: center;
  min-height: 42px;
  flex-direction: row;
}

.settings-form .checkbox-label input {
  width: 18px;
  height: 18px;
}

.settings-form small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
}

.wide-field {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.primary-button,
.secondary-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 700;
}

.primary-button {
  background: #047857;
  color: #fff;
}

.secondary-button {
  background: #eef2f7;
  color: var(--text);
}

.secondary-button:disabled,
.primary-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.settings-table-wrap {
  margin-top: 18px;
  box-shadow: none;
  border-radius: 12px;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.row-actions button {
  padding: 5px 9px;
  border-radius: 7px;
  background: #eef2f7;
  color: #334155;
}

.row-actions .danger-text {
  background: #fff1f2;
  color: #be123c;
}

.settings-message {
  position: sticky;
  top: 12px;
  z-index: 8;
  padding: 12px 16px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #047857;
  box-shadow: var(--shadow);
}

.settings-message.error {
  background: #fff1f2;
  color: #be123c;
}

.settings-search {
  width: min(300px, 100%);
}

.auth-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.auth-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}

/* Unified site theme: interactive controls use the green palette. */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--primary);
}

.range {
  background: var(--primary-soft);
}

.range button.active,
.filters button.active,
.groups button.active {
  color: var(--primary-active);
  border-color: var(--primary-border);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--primary-border), 0 1px 5px rgba(77, 58, 40, 0.1);
}

.query-panel .department-filters button.active,
.model-group-filters button.active {
  color: var(--primary-active);
  border-color: var(--primary-border);
  background: var(--primary-soft);
}

.gate-submit,
.range-apply,
.primary-button,
.name-search-button {
  color: #fff;
  background: var(--primary);
}

.refresh,
.nav-link,
.secondary-button,
.page-buttons button,
.row-actions button:not(.danger-text) {
  color: var(--primary-active);
  border-color: var(--primary-border);
  background: var(--primary-soft);
}

/* Unified secondary controls (matching the pagination buttons). */
.secondary-button,
.nav-link,
.page-buttons button,
.refresh {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--primary-border);
  border-radius: 9px;
  color: var(--primary-active);
  background: #fff;
  box-shadow: none;
  font-weight: 400;
}

.secondary-button:hover,
.nav-link:hover,
.page-buttons button:not(:disabled):hover,
.refresh:hover {
  color: var(--primary-active);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.query-panel .department-filters button,
.model-group-filters button {
  border-color: var(--primary-border);
}

.page-size select,
.date-range-trigger,
.date-range-fields input,
.custom-range input[type="date"],
.search-box input,
.settings-form input,
.settings-form select,
.settings-search,
.language-picker select {
  border-color: var(--primary-border);
}

.gate-submit:hover,
.range-apply:hover,
.primary-button:hover,
.name-search-button:hover {
  background: var(--primary-hover);
}

.gate-submit:active,
.range-apply:active,
.primary-button:active,
.name-search-button:active {
  background: var(--primary-active);
}

.date-range-trigger:hover,
.nav-link:hover,
.row-actions button:not(.danger-text):hover {
  color: var(--primary-active);
  border-color: var(--primary-border);
  background: var(--primary-soft);
}

.gate-card input:focus,
.custom-range input[type="date"]:focus,
.search-box input:focus,
.settings-form input:focus,
.settings-form select:focus,
.settings-search:focus,
.date-range-fields input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus);
  outline: none;
}

.spinner {
  border-top-color: var(--primary);
}

.trend-chart .trend-bar {
  fill: var(--primary);
}

.trend-chart .trend-bar:hover {
  fill: var(--primary-active);
}

.combined-metric {
  border-color: transparent;
  background: transparent;
}

.combined-metric::after {
  color: var(--primary-active);
  background: var(--primary-soft);
}

.usage-table tr.drop-before td { border-top-color: var(--primary); }
.usage-table tr.drop-after td { border-bottom-color: var(--primary); }

/* Single-choice controls are connected segments; department multi-select stays separated. */
.range,
.groups,
.model-group-filters,
.filters:not(.department-filters) {
  gap: 0;
  padding: 0;
  width: fit-content;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.groups button,
.model-group-filters button,
.range button,
.filters:not(.department-filters) button {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--primary-border);
  border-radius: 0;
  color: #475569;
  background: #fff;
  box-shadow: none;
}

.range button:last-child,
.groups button:last-child,
.model-group-filters button:last-child,
.filters:not(.department-filters) button:last-child {
  border-right: 0;
}

.range button.active,
.groups button.active,
.model-group-filters button.active,
.filters:not(.department-filters) button.active {
  color: #fff;
  background: var(--primary);
  box-shadow: none;
}

.department-filters {
  gap: 7px;
}

.query-panel .department-filters button,
.people-department-filters button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  color: #475569;
  background: #fff;
  box-shadow: none;
}

.query-panel .department-filters button.active,
.people-department-filters button.active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: none;
}

.dialog-gate {
  border: 0;
}

@media (max-width: 920px) {
  .shell {
    padding: 18px;
  }

  .topbar,
  .banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .banner-stats {
    margin-left: 0;
    flex-wrap: wrap;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .range-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .monitor-filter-bar {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .monitor-filter-bar .filter-row,
  .monitor-filter-bar .groups,
  .monitor-filter-bar .filters {
    flex-wrap: wrap;
  }

  .monitor-filter-actions {
    margin-left: 0;
    flex-wrap: wrap;
  }

  .query-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "time"
      "name"
      "department";
  }

  .query-section {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .search-box {
    margin-left: 0;
    width: 100%;
  }

  .search-box input {
    width: 100%;
  }

  .custom-range {
    width: 100%;
  }

  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-overview-grid {
    grid-template-columns: 1fr;
  }

  .settings-form,
  .settings-grid,
  .compact-form,
  .model-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .actions,
  .metrics,
  .filters {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .range {
    width: 100%;
  }

  .range button {
    flex: 1;
  }

  .status-bar {
    gap: 2px;
  }

  .error-details {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 20px;
  }

  .unit-label {
    width: 100%;
  }

  .actions .nav-link,
  .actions .refresh {
    flex: 1;
    text-align: center;
  }

  .banner-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .banner-icon,
  .icon-button {
    min-width: 36px;
  }

  .card {
    padding: 14px;
  }

  .card-head {
    flex-wrap: wrap;
    gap: 8px;
  }

  .metrics {
    gap: 14px;
  }

  .foot {
    gap: 10px;
  }

  .checked-at {
    margin-left: 0;
  }

  .usage-table th,
  .usage-table td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .department-chart-layout {
    display: block;
  }

  .dashboard-overview-grid {
    grid-template-columns: 1fr;
  }

  .summary-metric {
    min-height: 180px;
  }

  .overview-block:last-child {
    grid-column: auto;
  }

  .combined-metrics {
    grid-template-columns: 1fr;
  }

  .combined-metric + .combined-metric {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .department-legend {
    grid-template-columns: 1fr;
  }

  .pagination {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .custom-range {
    flex-direction: column;
    align-items: stretch;
  }

  .custom-range input[type="date"] {
    width: 100%;
  }

  .range-apply {
    width: 100%;
  }

  .dialog,
  .trend-dialog {
    width: calc(100vw - 24px);
    padding: 16px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }

  .gate-card {
    padding: 24px;
  }

  .settings-panel {
    padding: 16px;
  }

  .settings-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-form,
  .settings-grid,
  .compact-form,
  .model-form-grid {
    grid-template-columns: 1fr;
  }

  .wide-field {
    grid-column: span 1;
  }

  .form-actions,
  .form-actions button {
    width: 100%;
  }

  .tooltip {
    width: calc(100vw - 24px);
  }
}

/* Keep the light violet theme last so it wins over the legacy shared sheet. */
body.monitor-page {
  --bg:#f6f5fa; --card:#fff; --line:#e6e1ef; --text:#211a2e; --muted:#766d83;
  --primary:#7c3aed; --primary-hover:#6d28d9; --primary-active:#5b21b6;
  color-scheme:light;
  background:radial-gradient(circle at 8% -10%,rgba(139,92,246,.14),transparent 34rem),radial-gradient(circle at 94% 0%,rgba(196,181,253,.18),transparent 30rem),var(--monitor-background,#f6f5fa);
}
body.monitor-page .topbar { background:rgba(255,255,255,.86); border-color:#e8e1ef; box-shadow:0 8px 32px rgba(69,44,97,.045); }
body:not(.monitor-page) .color-setting { display:flex; align-items:center; gap:10px; }
body:not(.monitor-page) .color-setting input[type="color"] { width:48px; height:38px; padding:3px; cursor:pointer; }
body:not(.monitor-page) .color-setting input[type="text"] { flex:1; min-width:0; }
body.monitor-page .monitor-kicker { color:#7c3aed; }
body.monitor-page .language-picker select,body.monitor-page .range { background:#f5f2f9; border-color:#e5dfee; color:#30263e; }
body.monitor-page .range button { color:#766d83; }
body.monitor-page .range button.active { color:#fff; background:#7c3aed; box-shadow:0 5px 16px rgba(124,58,237,.2); }
body.monitor-page .refresh { color:#6d28d9; background:#f3e8ff; border-color:#d8b4fe; }
body.monitor-page .banner { border-color:#e3daee; background:linear-gradient(110deg,#fff,#f8f5fd); box-shadow:0 20px 60px rgba(67,39,96,.08); }
body.monitor-page .banner::after { border-color:rgba(124,58,237,.12); box-shadow:0 0 0 42px rgba(124,58,237,.025),0 0 0 84px rgba(124,58,237,.018); }
body.monitor-page .banner-title { color:#211a2e; }
body.monitor-page .banner-stats { background:#f7f4fb; border-color:#e5dfee; }
body.monitor-page .banner-stats span { color:#645a72; border-color:#e5dfee; }
body.monitor-page .monitor-filter-bar { background:rgba(255,255,255,.94); border-color:#e4ddec; box-shadow:0 12px 32px rgba(67,39,96,.05); }
body.monitor-page .groups button,body.monitor-page .secondary-button { color:#695f76; background:#f8f6fa!important; border-color:#e2dbe9; }
body.monitor-page .groups button.active,body.monitor-page .secondary-button.active { color:#6d28d9; background:#f3e8ff!important; border-color:#b98bea; }
body.monitor-page .filters { background:#f7f4fa!important; border-color:#e2dbe9; }
body.monitor-page .filters button { color:#71667e; background:transparent!important; border-color:#e5dfea; }
body.monitor-page .filters button.active { color:#4c1d95; background:#f1e8fb!important; box-shadow:inset 0 -2px #7c3aed; }
body.monitor-page .card { border-color:#e4ddea; background:linear-gradient(145deg,#fff,#fbf9fd); box-shadow:0 10px 30px rgba(62,37,88,.055); }
body.monitor-page .card:hover { border-color:#ccb9df; background:#fff; box-shadow:0 18px 40px rgba(62,37,88,.09); }
body.monitor-page .card-head,body.monitor-page .foot { border-color:#eee9f2; }
body.monitor-page .brand-icon { background:#f8f5fb; border-color:#ebe4f1; }
body.monitor-page .name { color:#2a2036; }
body.monitor-page .status { background:#f6f3f8; border-color:#e4ddea; color:#756a82; }
body.monitor-page .icon-button { background:#fff; border-color:#e4ddea; color:#766985; }
body.monitor-page .metrics>* { color:#81758f; border-color:#e9e3ed; }
body.monitor-page .metrics strong { color:#392e46; }
body.monitor-page .status-bar { background:#f5f2f7; border-color:#e9e3ee; }
body.monitor-page .status-cell.no-data { background:#ddd6e5; }
body.monitor-page .axis,body.monitor-page .foot,body.monitor-page .spark-label { color:#8a7e98; }
body.monitor-page .empty { background:#fff; border-color:#ded5e7; }
body.monitor-page .tooltip { background:#2e174b; border-color:rgba(124,58,237,.32); }
body.monitor-page .dialog { background:#fff; border-color:#dfd5e8; }
body.monitor-page .test-model {
  flex-basis:100%;
  color:#9a8ca7;
  font:11px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;
}
body.monitor-page .model-heading {
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:3px;
}
body.monitor-page .model-subtitle {
  overflow:hidden;
  color:#9a8ca7;
  font:11px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.monitor-page .metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
body.monitor-page .cards { grid-template-columns:repeat(var(--cards-per-row,2),minmax(0,1fr)); }

body.monitor-page .range {
  display:flex; align-items:stretch; gap:0; height:42px; min-height:42px;
  padding:0; border-radius:8px; overflow:hidden;
}
body.monitor-page .range button {
  display:flex; flex:1 1 0; align-items:center; justify-content:center;
  box-sizing:border-box; min-width:68px; height:40px; min-height:40px; max-height:40px;
  padding:0 12px; border:0; border-right:1px solid #e5dfee;
  border-radius:0; background:#f7f4fa!important; color:#71667e;
  appearance:none; line-height:1; text-align:center; vertical-align:middle; white-space:nowrap;
}
body.monitor-page .range button:last-child { border-right:0; }
body.monitor-page .range button.active {
  color:#4c1d95; background:#f1e8fb!important; box-shadow:inset 0 -2px #7c3aed;
}
body.monitor-page .expiry-countdown {
  display:inline-flex; align-items:center; min-height:36px; padding:0 10px;
  border:1px solid #e2dbe9; border-radius:8px; background:#fff; color:#6f627f;
  font:700 12px/1 ui-monospace,SFMono-Regular,Menlo,monospace; white-space:nowrap;
}
body.monitor-page .topbar .actions {
  display:flex;
  align-items:center;
  gap:9px;
  line-height:1;
}
body.monitor-page .topbar .language-picker {
  display:flex;
  align-items:center;
  height:42px;
  min-height:42px;
}
body.monitor-page .topbar .language-picker select,
body.monitor-page .topbar .refresh,
body.monitor-page .topbar .expiry-countdown,
body.monitor-page .topbar .home-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:42px;
  min-height:42px;
  max-height:42px;
  margin:0;
  line-height:1;
  box-sizing:border-box;
}
body.monitor-page .home-button {
  padding:0 14px;
  border:1px solid #d8b4fe;
  border-radius:8px;
  background:#7c3aed;
  color:#fff;
  font-size:13px;
  font-weight:700;
  text-decoration:none;
  white-space:nowrap;
}
body.monitor-page .home-button:hover { background:#6d28d9; }
body.monitor-page .topbar .language-picker select {
  padding-top:0;
  padding-bottom:0;
}

/* Responsive monitor toolbar and page layout. */
@media (min-width: 1201px) {
  body.monitor-page .monitor-filter-bar {
    display:flex;
    align-items:center;
    gap:18px;
    min-width:0;
    padding:14px 16px;
  }
  body.monitor-page .filter-row {
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
    flex:0 1 auto;
  }
  body.monitor-page #groups-row { flex:1 1 auto; }
  body.monitor-page .groups,body.monitor-page .filters { flex-wrap:nowrap; margin:0; gap:6px; }
  body.monitor-page .filters { gap:0; }
  body.monitor-page .groups button { white-space:nowrap; }
  body.monitor-page .monitor-filter-actions { display:flex; flex-wrap:nowrap; align-self:center; margin:0 0 0 auto; white-space:nowrap; }
}

@media (max-width: 1200px) {
  body.monitor-page .monitor-filter-bar { display:flex; flex-wrap:wrap; gap:12px 20px; }
  body.monitor-page .filter-row { width:100%; display:flex; align-items:center; gap:8px; }
  body.monitor-page .groups,body.monitor-page .filters { margin:0; }
  body.monitor-page .monitor-filter-actions { margin:0 0 0 62px; }
}

@media (max-width: 720px) {
  body.monitor-page .shell { width:100%; padding:0 12px 24px; overflow:hidden; }
  body.monitor-page .topbar { margin:0 -12px 16px; padding:14px 12px; gap:14px; }
  body.monitor-page .brand,body.monitor-page .brand-copy { min-width:0; }
  body.monitor-page h1 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  body.monitor-page .actions { display:grid; grid-template-columns:1fr auto; width:100%; gap:8px; }
  body.monitor-page .language-picker select { width:100%; }
  body.monitor-page .refresh { min-width:86px; }
  body.monitor-page .home-button { grid-column:1/-1; width:100%; }
  body.monitor-page .refresh { grid-column:1/-1; width:100%; }
  body.monitor-page .range { grid-column:1/-1; display:grid; grid-template-columns:repeat(4,1fr); width:100%; }
  body.monitor-page .expiry-countdown { grid-column:1/-1; width:100%; justify-content:center; }
  body.monitor-page .home-button { min-width:72px; }
  body.monitor-page .banner { min-height:0; padding:50px 16px 16px; gap:12px; }
  body.monitor-page .banner-icon { width:44px; height:44px; }
  body.monitor-page .banner>div:not(.banner-stats) { min-width:0; flex:1; }
  body.monitor-page .banner-stats { display:grid; width:100%; }
  body.monitor-page .banner-stats span { min-width:0; padding:11px 12px; border-left:0; border-top:1px solid #e5dfee; }
  body.monitor-page .banner-stats span:first-child { border-top:0; }
  body.monitor-page .monitor-filter-bar { margin:12px 0; padding:12px; gap:12px; }
  body.monitor-page .filter-row { display:block; min-width:0; }
  body.monitor-page .filter-label { display:block; margin:0 0 8px; }
  body.monitor-page .groups,body.monitor-page .filters {
    display:flex;
    width:100%;
    gap:6px;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    scrollbar-width:none;
    padding-bottom:3px;
  }
  body.monitor-page .groups::-webkit-scrollbar,body.monitor-page .filters::-webkit-scrollbar { display:none; }
  body.monitor-page .groups button,body.monitor-page .filters button { flex:0 0 auto; white-space:nowrap; }
  body.monitor-page .filters { border:0; background:transparent!important; }
  body.monitor-page .filters button { border:1px solid #e2dbe9; min-width:auto; padding:0 14px 0 30px; }
  body.monitor-page .monitor-filter-actions { display:grid; grid-template-columns:repeat(3,1fr); width:100%; margin:0; gap:6px; }
  body.monitor-page .monitor-filter-actions button { min-width:0; padding:0 6px; font-size:11px; }
  body.monitor-page .cards { grid-template-columns:1fr; }
  body.monitor-page .card { padding:14px; }
  body.monitor-page .card-head { align-items:flex-start; }
  body.monitor-page .name { font-size:14px; }
  body.monitor-page .status-bar { overflow-x:auto; min-width:0; }
  body.monitor-page .status-cell { min-width:3px; }
  body.monitor-page .range-note { font-size:11px; }
  body.monitor-page .dialog { width:calc(100vw - 20px); max-height:calc(100vh - 20px); padding:14px; }
  body.monitor-page .error-details { grid-template-columns:1fr; }
}
