:root {
  color-scheme: light;
  --canvas: oklch(96.8% .014 166);
  --surface: oklch(99.6% .004 166);
  --surface-quiet: oklch(94.7% .021 166);
  --surface-tint: oklch(97.2% .025 166);
  --ink: oklch(24% .035 166);
  --ink-soft: oklch(43% .035 166);
  --ink-faint: oklch(58% .025 166);
  --line: oklch(88.8% .025 166);
  --line-strong: oklch(77% .045 166);
  --brand: oklch(47% .13 166);
  --brand-dark: oklch(34% .11 166);
  --brand-soft: oklch(91.8% .055 166);
  --blue: oklch(49% .13 247);
  --blue-soft: oklch(92.8% .035 247);
  --amber: oklch(56% .14 76);
  --amber-soft: oklch(93.6% .06 86);
  --red: oklch(51% .17 28);
  --red-soft: oklch(93.5% .055 28);
  --violet: oklch(51% .13 304);
  --violet-soft: oklch(93% .04 304);
  --on-brand: oklch(99% .005 166);
  --on-dark: oklch(97% .01 166);
  --field-surface: oklch(98.5% .009 166);
  --platform-anthropic: oklch(43% .10 47);
  --platform-grok: oklch(28% .035 166);
  --platform-unknown: oklch(51% .03 166);
  --toast-error-line: oklch(78% .12 28);
  --toast-success-line: oklch(77% .08 166);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --shadow: 0 7px 8px oklch(22% .035 166 / .07);
  --shadow-pop: 0 7px 8px oklch(22% .035 166 / .11);
  --radius: 12px;
  --font: "MiSans", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { padding: 28px 24px 56px; background-image: radial-gradient(circle at 12% 0%, oklch(94% .05 166 / .55), transparent 28rem); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid oklch(49% .13 247 / .28); outline-offset: 2px; }
[hidden] { display: none !important; }
.shell { width: min(1240px, 100%); margin: 0 auto; }
.auth-shell { min-height: calc(100vh - 84px); display: grid; place-items: center; }
.auth-frame { width: min(920px, 100%); display: grid; grid-template-columns: 1fr 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); animation: lift .5s ease both; }
.auth-brand { padding: 48px; background: var(--brand-dark); color: var(--on-dark); position: relative; isolation: isolate; }
.auth-brand::before { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -90px; border: 1px solid oklch(99% .005 166 / .16); border-radius: 50%; box-shadow: 0 0 0 22px oklch(99% .005 166 / .04), 0 0 0 46px oklch(99% .005 166 / .025); }
.auth-brand h1 { max-width: 11ch; margin: 42px 0 18px; font-size: clamp(32px, 5vw, 58px); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.auth-brand p { max-width: 34ch; margin: 0; color: oklch(97% .01 166 / .72); line-height: 1.75; }
.brand-lockup { display: flex; align-items: center; gap: 12px; font-weight: 760; }
.brand-lockup img { width: 38px; height: 38px; border-radius: 10px; background: var(--on-brand); }
.auth-form { padding: 48px 42px; align-self: center; }
.auth-form h2 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.02em; }
.auth-form .muted { margin: 0 0 28px; color: var(--ink-faint); line-height: 1.6; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.field input, .field select { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--field-surface); color: var(--ink); }
.button { border: 1px solid transparent; border-radius: 8px; min-height: 40px; padding: 0 14px; font-weight: 720; transition: transform .18s cubic-bezier(.32,.72,0,1), border-color .18s cubic-bezier(.32,.72,0,1), background .18s cubic-bezier(.32,.72,0,1), color .18s cubic-bezier(.32,.72,0,1); }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .62; transform: none; }
.button-primary { width: 100%; color: var(--on-brand); background: var(--brand); }
.button-primary:hover { background: var(--brand-dark); }
.button-quiet { color: var(--brand-dark); background: var(--brand-soft); }
.button-outline { color: var(--ink-soft); border-color: var(--line); background: var(--surface); }
.button-outline:hover { border-color: var(--line-strong); color: var(--ink); }
.error-message { min-height: 20px; margin: 14px 0 0; color: var(--red); font-size: 13px; }
.login-note { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 12px; line-height: 1.6; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); }
.brand-name { font-size: 15px; font-weight: 780; }
.brand-sub { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 11px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.mode-badge, .user-badge { display: inline-flex; align-items: center; min-height: 34px; padding: 0 11px; border-radius: 999px; color: var(--brand-dark); background: var(--brand-soft); font-size: 12px; font-weight: 720; white-space: nowrap; }
.user-badge { color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); }
.icon-button { width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: var(--surface); }
.icon-button svg { width: 16px; height: 16px; }
.icon-button.is-loading svg { animation: spin .8s linear infinite; }
.hero { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; padding: 28px 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); animation: lift .5s .05s ease both; }
.hero-operational { background: linear-gradient(105deg, var(--surface) 0%, var(--brand-soft) 140%); }
.hero-degraded { background: linear-gradient(105deg, var(--surface) 0%, var(--amber-soft) 140%); }
.hero-outage { background: linear-gradient(105deg, var(--surface) 0%, var(--red-soft) 140%); }
.hero-maintenance { background: linear-gradient(105deg, var(--surface) 0%, var(--blue-soft) 140%); }
.hero-unknown { background: linear-gradient(105deg, var(--surface) 0%, var(--surface-quiet) 140%); }
.hero-kicker { display: flex; align-items: center; gap: 9px; color: var(--brand); font-size: 12px; font-weight: 780; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px oklch(47% .13 166 / .14); }
.hero-status-line { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.hero h1 { flex: 0 0 auto; margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: 0; text-wrap: balance; }
.overall-heading { display: inline-block; padding: 7px 10px; border-radius: 7px; }
.overall-operational { color: var(--brand-dark); background: var(--brand-soft); }
.overall-degraded { color: var(--amber); background: var(--amber-soft); }
.overall-outage { color: var(--red); background: var(--red-soft); }
.overall-maintenance { color: var(--blue); background: var(--blue-soft); }
.overall-unknown { color: var(--ink-soft); background: var(--surface-quiet); }
.hero p { max-width: 63ch; margin: 0; color: var(--ink-soft); line-height: 1.55; }
.hero-side { display: grid; justify-items: end; gap: 9px; color: var(--ink-faint); font-size: 12px; white-space: nowrap; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 760; white-space: nowrap; }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-operational { color: var(--brand-dark); background: var(--brand-soft); }
.status-degraded { color: var(--amber); background: var(--amber-soft); }
.status-outage { color: var(--red); background: var(--red-soft); }
.status-maintenance { color: var(--blue); background: var(--blue-soft); }
.status-unknown { color: var(--ink-soft); background: var(--surface-quiet); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 16px 0 30px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-quiet); }
.metric { padding: 16px 14px; border: 0; border-radius: 10px; background: transparent; animation: lift .28s var(--delay) ease both; }
.metric:hover { background: var(--surface); }
.metric + .metric { border-left: 1px solid var(--line); border-radius: 0 10px 10px 0; }
.metric span { color: var(--ink-faint); font-size: 12px; }
.metric strong { display: block; margin-top: 7px; color: var(--brand-dark); font-family: var(--mono); font-size: 22px; letter-spacing: -.04em; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 26px 0 14px; }
.section-head h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.section-head p { margin: 5px 0 0; color: var(--ink-faint); font-size: 12px; }
.controls { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.segments { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-quiet); }
.segment { min-height: 30px; padding: 0 10px; border: 0; border-radius: 6px; color: var(--ink-soft); background: transparent; font-size: 12px; }
.segment[aria-pressed="true"] { color: var(--brand-dark); background: var(--surface); box-shadow: 0 1px 3px oklch(22% .035 166 / .1); }
.select-control { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: var(--surface); font-size: 12px; }
.group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.group-card { padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); animation: lift .28s var(--delay) ease both; transition: transform .2s cubic-bezier(.32,.72,0,1), border-color .2s cubic-bezier(.32,.72,0,1), background .2s cubic-bezier(.32,.72,0,1); }
.group-card:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.group-card-degraded { border-color: oklch(79% .10 82); background: linear-gradient(112deg, var(--surface) 0%, var(--amber-soft) 165%); }
.group-card-outage { border-color: oklch(78% .12 28); background: linear-gradient(112deg, var(--surface) 0%, var(--red-soft) 165%); }
.group-card-unknown { border-style: dashed; background: var(--surface-quiet); }
.group-card-top, .group-card-foot, .group-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.group-heading { display: flex; align-items: center; gap: 11px; min-width: 0; }
.platform-mark { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--on-brand); font-family: var(--mono); font-size: 12px; font-weight: 800; }
.mark-openai { background: var(--brand-dark); }.mark-anthropic { background: var(--platform-anthropic); }.mark-grok { background: var(--platform-grok); }.mark-unknown { background: var(--platform-unknown); }
.group-heading h3 { overflow: hidden; margin: 0; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.group-heading p { overflow: hidden; margin: 5px 0 0; color: var(--ink-faint); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.group-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 19px 0 15px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.group-metrics span, .detail-grid span { display: block; color: var(--ink-faint); font-size: 11px; }
.group-metrics strong { display: block; margin-top: 6px; font-family: var(--mono); font-size: 14px; }
.group-card-foot { color: var(--ink-faint); font-size: 11px; }
.group-actions { justify-content: flex-start; margin-top: 16px; flex-wrap: wrap; }
.group-actions .button { min-height: 34px; padding: 0 11px; font-size: 12px; }
.empty-state { padding: 44px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--ink-faint); text-align: center; }
.event-panel { margin-top: 28px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.event-list { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; }
.event-list li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.event-list li:last-child { border-bottom: 0; }
.event-list strong { font-size: 13px; }.event-list p { margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; }.event-list time { color: var(--ink-faint); font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.event-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--blue); }.event-degraded { background: var(--amber); }.event-outage { background: var(--red); }.event-operational { background: var(--brand); }
.event-empty { display: block !important; color: var(--ink-faint); }
.footer { margin-top: 28px; color: var(--ink-faint); font-size: 11px; text-align: center; }
dialog { width: min(560px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-pop); }
dialog::backdrop { background: oklch(20% .03 166 / .36); }
.dialog-shell { padding: 24px; }.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; }.dialog-head h2 { margin: 6px 0 0; font-size: 22px; }.dialog-head p { margin: 5px 0 0; color: var(--ink-faint); font-size: 12px; }.dialog-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }.dialog-close svg { width: 15px; height: 15px; }.dialog-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 0; }.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }.detail-grid > div { padding: 12px; border-radius: 8px; background: var(--surface-quiet); }.detail-grid strong { display: block; margin-top: 7px; font-family: var(--mono); font-size: 14px; }.detail-note { margin: 18px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 10; max-width: min(520px, calc(100% - 32px)); padding: 12px 15px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-pop); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; font-size: 13px; }.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }.toast[data-tone="error"] { border-color: var(--toast-error-line); color: var(--red); }.toast[data-tone="success"] { border-color: var(--toast-success-line); color: var(--brand-dark); }
.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; }
@keyframes lift { from { opacity: .94; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 820px) { .auth-frame { grid-template-columns: 1fr; }.auth-brand { padding: 32px; }.auth-brand h1 { max-width: 16ch; margin-top: 32px; }.auth-form { padding: 34px 30px; }.hero { grid-template-columns: 1fr; }.hero-status-line { align-items: flex-start; flex-direction: column; gap: 9px; }.hero-side { justify-items: start; }.metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }.metric + .metric { border-left: 0; border-radius: 10px; }.group-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { body { padding: 15px 13px 36px; }.app-header { align-items: stretch; flex-direction: column; gap: 13px; }.brand-name { font-size: 14px; }.header-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }.header-actions .user-badge { display: none; }.header-actions .button { white-space: nowrap; }.hero { padding: 22px 20px; }.metrics { gap: 8px; }.metric { padding: 14px; }.metric strong { font-size: 18px; }.section-head { align-items: flex-start; flex-direction: column; }.group-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }.group-card-foot { align-items: flex-start; flex-direction: column; gap: 5px; }.group-actions { gap: 8px; }.detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.event-list li { grid-template-columns: 10px 1fr; }.event-list time { grid-column: 2; }.auth-brand { padding: 26px 22px; }.auth-form { padding: 28px 22px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

:root {
  --canvas: oklch(96.5% .008 245);
  --surface: oklch(99.7% .002 245);
  --surface-quiet: oklch(94.8% .012 245);
  --surface-tint: oklch(96.8% .018 220);
  --ink: oklch(22% .03 245);
  --ink-soft: oklch(42% .025 245);
  --ink-faint: oklch(56% .02 245);
  --line: oklch(87% .018 245);
  --line-strong: oklch(73% .04 245);
  --brand: oklch(48% .13 220);
  --brand-dark: oklch(31% .09 235);
  --brand-soft: oklch(91.5% .045 220);
  --red: oklch(54% .18 28);
  --red-soft: oklch(93% .06 28);
  --green: oklch(49% .14 150);
  --green-soft: oklch(91% .055 150);
  --shadow: 0 6px 18px oklch(25% .03 245 / .06);
  --shadow-pop: 0 12px 28px oklch(25% .03 245 / .13);
}

body { padding: 24px 24px 54px; background-image: none; }
.app-header { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.hero { padding: 22px 24px; border-radius: 8px; box-shadow: var(--shadow); }
.hero-operational, .hero-degraded, .hero-outage, .hero-maintenance, .hero-unknown { background: var(--surface); }
.hero-outage { border-color: oklch(78% .12 28); }
.hero-degraded { border-color: oklch(78% .11 78); }
.hero-kicker { color: var(--brand); }
.metrics { margin: 12px 0 24px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.metric strong { color: var(--ink); }
.section-head { margin-top: 30px; }
.section-head h2 { font-size: 19px; }
.section-head p { max-width: 58ch; }
.group-grid { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 12px; }
.group-card { padding: 16px; border-radius: 8px; box-shadow: var(--shadow); }
.group-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.group-card-degraded { border-color: oklch(78% .10 78); background: var(--surface); }
.group-card-outage { border-color: oklch(78% .13 28); background: var(--surface); }
.group-card-unknown { background: var(--surface-quiet); box-shadow: none; }
.group-metrics { margin: 16px 0 13px; padding: 12px 0; }
.group-metrics strong { font-size: 15px; color: var(--ink); }
.call-grid-wrap { margin: 0 0 14px; padding: 11px 12px 12px; border-radius: 6px; background: var(--surface-quiet); }
.call-grid-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.call-grid-legend { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-faint); font-size: 10px; font-weight: 600; }
.call-grid-legend i, .call-cell { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.legend-success, .call-success { background: var(--green); }
.legend-warning, .call-warning { background: var(--amber); }
.legend-failure, .call-failure { background: var(--red); }
.call-grid { display: grid; grid-template-columns: repeat(15, 10px); grid-auto-rows: 10px; gap: 5px; min-height: 10px; }
.call-cell { cursor: help; box-shadow: inset 0 0 0 1px oklch(100% 0 0 / .22); animation: call-in .24s ease both; }
.call-cell:hover { transform: scale(1.35); }
.call-grid-empty { color: var(--ink-faint); font-size: 11px; }
.event-panel { border-radius: 8px; box-shadow: var(--shadow); }
.event-list li { padding: 12px 0; }
.footer { padding-top: 8px; }
@keyframes call-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@media (max-width: 820px) { .group-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { body { padding: 14px 12px 34px; }.call-grid { grid-template-columns: repeat(10, 10px); }.call-grid-wrap { overflow-x: auto; }.call-grid { width: max-content; } }
