:root {
  color-scheme: light;
  --bg: #f4f6f7;
  --surface: #ffffff;
  --surface-muted: #f8fafb;
  --ink: #182026;
  --muted: #647078;
  --border: #dce2e5;
  --border-strong: #c8d0d4;
  --sidebar: #171d20;
  --sidebar-muted: #9ba8ae;
  --green: #11705a;
  --green-soft: #e5f4ef;
  --blue: #1769a7;
  --blue-soft: #e8f1f8;
  --amber: #9a6000;
  --amber-soft: #fff3d8;
  --red: #b42336;
  --red-soft: #fdebed;
  --shadow: 0 1px 2px rgba(18, 27, 32, 0.06), 0 8px 24px rgba(18, 27, 32, 0.04);
  --sidebar-width: 236px;
}

* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: #0f4f80; }
svg { width: 18px; height: 18px; stroke-width: 1.8; flex: 0 0 auto; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
code { overflow-wrap: anywhere; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: var(--sidebar); color: #fff; display: flex; flex-direction: column; z-index: 40; border-right: 1px solid #272f33; }
.brand { height: 70px; padding: 0 18px; display: flex; align-items: center; gap: 11px; color: #fff; border-bottom: 1px solid #2a3236; }
.brand:hover { color: #fff; }
.brand-mark { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--green); border-radius: 6px; }
.brand-mark.large { width: 44px; height: 44px; }
.brand-mark.large svg { width: 23px; height: 23px; }
.brand > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.brand strong { font-size: 14px; line-height: 1.25; }
.brand small { color: var(--sidebar-muted); font-size: 11px; }
.primary-nav { padding: 16px 10px; display: grid; gap: 3px; }
.nav-section-label { margin: 13px 10px 4px; color: #718087; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.nav-section-label:first-of-type { margin-top: 6px; }
.nav-link { min-height: 41px; padding: 0 10px; display: flex; align-items: center; gap: 11px; color: #b7c1c5; border-radius: 5px; font-weight: 550; }
.nav-link:hover { color: #fff; background: #232b2f; }
.nav-link.active { color: #fff; background: #293337; box-shadow: inset 3px 0 var(--green); }
.nav-link svg { width: 17px; height: 17px; }
.nav-count { margin-left: auto; min-width: 21px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-flex; justify-content: center; align-items: center; background: #364247; color: #dce4e7; font-size: 11px; }
.sidebar-footer { margin-top: auto; padding: 12px; border-top: 1px solid #2a3236; }
.account-row { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; gap: 9px; }
.avatar { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #e9f2ef; color: var(--green); font-size: 11px; font-weight: 800; }
.account-copy { display: flex; flex-direction: column; min-width: 0; }
.account-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.account-copy small { color: var(--sidebar-muted); font-size: 10px; }
.workspace { min-height: 100vh; margin-left: var(--sidebar-width); }
.main-content { width: 100%; max-width: 1560px; margin: 0 auto; padding: 28px 32px 56px; }
.mobile-header { display: none; }
.sidebar-scrim { display: none; }

.page-header { min-height: 58px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-header h1 { margin: 2px 0 0; font-size: 25px; line-height: 1.2; font-weight: 720; }
.eyebrow { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.2; text-transform: uppercase; font-weight: 750; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.health-pill, .project-chip { height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; color: #3f4a50; white-space: nowrap; }
.project-chip svg { color: var(--green); }
.status-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #9ba6ac; }
.status-dot.online { background: #1d956e; box-shadow: 0 0 0 3px rgba(29, 149, 110, 0.12); }
.status-dot.idle { background: #929da3; }
.status-dot.working { background: var(--amber); box-shadow: 0 0 0 3px rgba(154, 96, 0, 0.12); animation: pulse 1.1s infinite; }
.status-dot.failed { background: var(--red); }
@keyframes pulse { 50% { opacity: 0.45; } }

.button { min-height: 36px; padding: 0 13px; border: 1px solid transparent; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-weight: 650; transition: background 120ms, border-color 120ms, color 120ms; }
.button svg { width: 16px; height: 16px; }
.button.primary { background: var(--green); color: #fff; border-color: var(--green); }
.button.primary:hover { background: #0d5c49; border-color: #0d5c49; color: #fff; }
.button.secondary { background: var(--surface); color: #354047; border-color: var(--border-strong); }
.button.secondary:hover { background: #f1f5f6; color: var(--ink); }
.button.full { width: 100%; }
.button:disabled { opacity: 0.55; cursor: wait; }
.icon-button { width: 34px; height: 34px; padding: 0; display: inline-flex; justify-content: center; align-items: center; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: #4f5c63; cursor: pointer; }
.icon-button:hover { color: var(--ink); background: #eef2f3; }
.icon-button.quiet { border-color: transparent; background: transparent; }
.sidebar .icon-button.quiet { color: var(--sidebar-muted); }
.sidebar .icon-button.quiet:hover { color: #fff; background: #283135; }
.icon-button.danger { color: var(--red); border-color: transparent; background: transparent; }
.icon-button.danger:hover { background: var(--red-soft); }
.icon-button.disabled { pointer-events: none; opacity: 0.38; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metrics-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { min-height: 132px; padding: 18px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); }
.metric-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 650; }
.metric-label svg { color: #738087; width: 17px; height: 17px; }
.metric-card > strong { margin-top: 14px; font-size: 27px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric-card strong em { font-size: 13px; font-style: normal; color: var(--muted); font-weight: 600; }
.metric-card small { margin-top: auto; color: var(--muted); font-size: 11px; }
.surface { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); }
.section-header { min-height: 68px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.section-header h2 { margin: 0; font-size: 15px; }
.section-header p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.section-header > a { font-size: 12px; font-weight: 650; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr); gap: 18px; margin-bottom: 18px; }
.chart-surface { min-height: 324px; }
.legend { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); font-size: 11px; }
.legend i { width: 9px; height: 9px; background: var(--green); border-radius: 2px; }
.bar-chart { height: 250px; padding: 25px 18px 15px; display: flex; align-items: stretch; gap: 7px; overflow-x: auto; }
.bar-column { min-width: 22px; flex: 1; max-width: 52px; display: grid; grid-template-rows: 1fr 20px; gap: 7px; align-items: end; }
.bar-track { height: 100%; display: flex; align-items: flex-end; background: #f1f4f5; border-radius: 3px 3px 1px 1px; overflow: hidden; }
.bar-fill { width: 100%; min-height: 3px; background: var(--green); border-radius: 3px 3px 1px 1px; transition: height 300ms ease; }
.bar-column small { text-align: center; color: var(--muted); font-size: 9px; white-space: nowrap; }
.service-list { padding: 5px 18px; }
.service-row { min-height: 73px; display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center; border-bottom: 1px solid #edf0f1; }
.service-row:last-child { border-bottom: 0; }
.service-row > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.service-row strong { text-transform: capitalize; }
.service-row small { color: var(--muted); font-size: 11px; }
.service-row b { font-size: 12px; font-variant-numeric: tabular-nums; }
.service-icon, .catalog-icon { width: 36px; height: 36px; display: inline-flex; justify-content: center; align-items: center; border-radius: 5px; }
.service-icon.gemini { color: var(--blue); background: var(--blue-soft); }
.service-icon.tts { color: var(--green); background: var(--green-soft); }
.service-icon.platform { color: var(--amber); background: var(--amber-soft); }
.table-surface { margin-top: 18px; overflow: hidden; }
.table-surface.flush-top { margin-top: 0; }
.table-scroll { overflow: auto; }
.table-scroll.tall { max-height: calc(100vh - 150px); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { height: 38px; padding: 0 14px; text-align: left; color: var(--muted); background: #f7f9fa; border-bottom: 1px solid var(--border); white-space: nowrap; font-size: 10px; text-transform: uppercase; }
td { min-height: 46px; padding: 11px 14px; border-bottom: 1px solid #ebeff1; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfc; }
td code { color: #3e4c53; background: #eef2f3; padding: 2px 5px; border-radius: 3px; font-size: 11px; }
td svg { width: 14px; height: 14px; vertical-align: middle; }
.nowrap { white-space: nowrap; }
.model-cell { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.error-text { color: var(--red); max-width: 140px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.service-tag, .scope-tag, .status-code { min-height: 22px; padding: 2px 7px; display: inline-flex; align-items: center; border-radius: 4px; font-size: 10px; font-weight: 700; }
.service-tag.gemini { color: var(--blue); background: var(--blue-soft); }
.service-tag.tts { color: var(--green); background: var(--green-soft); }
.service-tag.platform { color: var(--amber); background: var(--amber-soft); }
.scope-tag { margin: 1px 3px 1px 0; color: #45535a; background: #edf1f2; }
.status-code.success { color: var(--green); background: var(--green-soft); }
.status-code.error { color: var(--red); background: var(--red-soft); }
.empty-row { padding: 28px; text-align: center; color: var(--muted); }
.empty-state { width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--muted); }
.empty-state.compact { min-height: 140px; }
.empty-state svg { width: 25px; height: 25px; }
.empty-state p { margin: 8px 0 0; }

.notice { min-height: 48px; margin-bottom: 18px; padding: 11px 14px; display: flex; align-items: flex-start; gap: 10px; color: #3d535d; background: #eef5f6; border: 1px solid #d5e5e8; border-radius: 5px; }
.notice svg { color: #2b7d8f; margin-top: 1px; }
.notice p { margin: 0; font-size: 12px; }
.alert { padding: 10px 12px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid; border-radius: 5px; font-size: 12px; }
.alert.error { color: #8d1b2a; background: var(--red-soft); border-color: #f3cbd1; }
.alert.warning { color: #754a00; background: var(--amber-soft); border-color: #f0d59a; }

.segmented-control { min-height: 36px; padding: 3px; display: flex; align-items: center; gap: 2px; background: #e8edef; border: 1px solid #d5dde0; border-radius: 6px; }
.segmented-control button, .segmented-control a { min-height: 29px; padding: 0 11px; border: 0; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #58666d; background: transparent; cursor: pointer; font-weight: 650; }
.segmented-control .active { color: var(--ink); background: #fff; box-shadow: 0 1px 2px rgba(18, 27, 32, 0.12); }
.segmented-control.compact { font-size: 12px; }
.tool-layout { display: none; min-height: 650px; grid-template-columns: minmax(330px, 430px) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); overflow: hidden; }
.tool-layout.active { display: grid; }
.tool-controls { padding: 20px; border-right: 1px solid var(--border); overflow-y: auto; }
.control-section { display: grid; gap: 14px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.control-section h2 { margin: 0 0 2px; font-size: 14px; }
label { display: grid; gap: 6px; color: #3f4c52; font-size: 11px; font-weight: 700; }
input, textarea, select { width: 100%; color: var(--ink); background: #fff; border: 1px solid var(--border-strong); border-radius: 5px; outline: 0; }
input, select { height: 38px; padding: 0 10px; }
textarea { padding: 9px 10px; line-height: 1.5; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #4f8f7e; box-shadow: 0 0 0 3px rgba(17, 112, 90, 0.1); }
input::placeholder, textarea::placeholder { color: #a0aaaf; }
input[type="range"] { height: 18px; padding: 0; accent-color: var(--green); box-shadow: none; border: 0; }
label output { float: right; color: var(--green); }
.compact-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-output { min-width: 0; display: grid; grid-template-rows: 51px minmax(0, 1fr) 46px; background: #fbfcfc; }
.output-toolbar { padding: 0 15px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--border); }
.output-toolbar > span { display: inline-flex; align-items: center; gap: 9px; }
.output-toolbar b { font-size: 12px; }
.result-content { margin: 0; padding: 22px; white-space: pre-wrap; word-break: break-word; overflow: auto; color: #253137; font-size: 13px; line-height: 1.7; }
.usage-strip { padding: 0 17px; display: flex; align-items: center; gap: 24px; overflow-x: auto; background: #fff; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; text-transform: uppercase; white-space: nowrap; }
.usage-strip b { margin-left: 4px; color: var(--ink); }
.audio-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 360px; }
.audio-glyph { width: 72px; height: 72px; display: inline-flex; justify-content: center; align-items: center; color: var(--green); background: var(--green-soft); border-radius: 50%; }
.audio-glyph svg { width: 34px; height: 34px; }
.audio-stage audio { display: none; width: min(520px, 80%); }
.audio-stage audio.ready { display: block; }
.audio-stage p { margin: 0; color: var(--muted); }

.state-label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.state-label span { width: 7px; height: 7px; border-radius: 50%; }
.state-label.enabled { color: var(--green); }
.state-label.enabled span { background: #1d956e; }
.state-label.disabled { color: #778288; }
.state-label.disabled span { background: #9aa4a9; }
.credential-band { min-height: 86px; padding: 16px 18px; display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: center; border: 1px solid; border-radius: 6px; }
.credential-band.healthy { background: #f1f8f5; border-color: #cce5dc; }
.credential-band.checking { background: #f5f8f9; border-color: var(--border); }
.credential-band.degraded { background: var(--red-soft); border-color: #efc9cf; }
.credential-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; background: #fff; color: var(--green); }
.credential-band h2 { margin: 0; font-size: 14px; }
.credential-band p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.billing-band { min-height: 66px; margin-top: 10px; padding: 12px 18px; display: grid; grid-template-columns: 36px minmax(180px, 1fr) minmax(220px, 1fr) auto; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 6px; }
.billing-band > span:first-child { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--amber); background: var(--amber-soft); border-radius: 5px; }
.billing-band > div { display: flex; flex-direction: column; }
.billing-band strong { font-size: 12px; }
.billing-band small { color: var(--muted); font-size: 10px; }
.service-catalog { margin-top: 25px; }
.service-catalog > .section-header { padding-left: 0; padding-right: 0; border: 0; }
.catalog-row { min-height: 90px; padding: 14px 2px; display: grid; grid-template-columns: 42px 260px minmax(200px, 1fr) 80px; gap: 14px; align-items: center; border-bottom: 1px solid var(--border); }
.catalog-icon { width: 42px; height: 42px; color: var(--blue); background: var(--blue-soft); }
.catalog-row h3 { margin: 0 0 3px; font-size: 13px; }
.catalog-row code { color: var(--muted); font-size: 10px; }
.catalog-row p { margin: 0; color: var(--muted); font-size: 12px; }
.roadmap-band { margin-top: 28px; padding: 17px 19px; min-height: 78px; display: flex; align-items: center; justify-content: space-between; color: #5f4b1b; background: var(--amber-soft); border: 1px solid #ebd398; border-radius: 6px; }
.roadmap-band h2 { margin: 0; font-size: 14px; }
.roadmap-band p { margin: 3px 0 0; font-size: 11px; }
.roadmap-band > svg { width: 30px; height: 30px; color: var(--amber); }
.refresh-meta { margin: 10px 0 0; color: var(--muted); font-size: 10px; text-align: right; }

.dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border-strong); border-radius: 7px; box-shadow: 0 20px 70px rgba(10, 18, 22, 0.22); }
.dialog::backdrop { background: rgba(18, 25, 29, 0.55); }
.dialog-header { min-height: 68px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.dialog-header h2 { margin: 2px 0 0; font-size: 17px; }
.dialog-body { padding: 18px; }
.dialog-actions { padding: 12px 18px; display: flex; justify-content: flex-end; gap: 9px; background: #f8fafb; border-top: 1px solid var(--border); }
.stack-form { display: grid; gap: 14px; }
.secret-result { margin-top: 14px; padding: 11px; display: grid; grid-template-columns: 1fr 34px; gap: 8px; align-items: center; background: #f2f5f6; border: 1px solid var(--border); border-radius: 5px; }
.secret-result code { max-height: 90px; overflow: auto; word-break: break-all; }

.docs-header { align-items: center; }
.base-url { min-height: 38px; max-width: 520px; padding: 0 5px 0 11px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; }
.base-url > span { color: var(--muted); font-size: 10px; text-transform: uppercase; font-weight: 750; }
.base-url code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-layout { display: grid; grid-template-columns: 190px minmax(0, 820px); gap: 42px; align-items: start; }
.docs-toc { position: sticky; top: 20px; display: grid; padding-left: 12px; border-left: 1px solid var(--border); }
.docs-toc a { min-height: 34px; display: flex; align-items: center; color: var(--muted); font-size: 12px; }
.docs-toc a:hover { color: var(--green); }
.docs-content { min-width: 0; }
.docs-content section { padding: 4px 0 38px; margin-bottom: 32px; border-bottom: 1px solid var(--border); scroll-margin-top: 18px; }
.docs-content section:last-child { border-bottom: 0; }
.docs-content h2 { margin: 0 0 11px; font-size: 20px; }
.docs-content p { color: #4f5c63; line-height: 1.7; }
.docs-content li { margin: 7px 0; color: #4f5c63; }
.docs-content p code, .docs-content li code { padding: 2px 4px; color: #34515d; background: #eaf0f2; border-radius: 3px; font-size: 12px; }
.endpoint-heading { display: flex; align-items: center; gap: 10px; }
.endpoint-heading h2 { margin: 0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 18px; }
.method { min-width: 42px; height: 24px; display: inline-flex; justify-content: center; align-items: center; border-radius: 4px; font-size: 9px; font-weight: 800; }
.method.post { color: var(--green); background: var(--green-soft); }
.method.get { color: var(--blue); background: var(--blue-soft); }
.code-block { margin: 16px 0; overflow: hidden; background: #171d20; border: 1px solid #2a3438; border-radius: 6px; }
.code-block > div { height: 38px; padding: 0 9px 0 13px; display: flex; align-items: center; justify-content: space-between; color: #aab6bb; background: #222a2e; border-bottom: 1px solid #30393d; font-size: 10px; }
.code-block button { height: 28px; padding: 0 7px; display: inline-flex; align-items: center; gap: 5px; color: #c5ced2; background: transparent; border: 0; border-radius: 4px; cursor: pointer; font-size: 10px; }
.code-block button:hover { color: #fff; background: #343e43; }
.code-block button svg { width: 13px; height: 13px; }
.code-block pre { margin: 0; padding: 16px; overflow-x: auto; color: #dce5e8; font-size: 12px; line-height: 1.65; }
.parameter-list { margin: 16px 0; border-top: 1px solid var(--border); }
.parameter-list > div { min-height: 54px; padding: 10px 0; display: grid; grid-template-columns: 145px 90px 1fr; gap: 10px; align-items: start; border-bottom: 1px solid var(--border); }
.parameter-list > div > code { font-weight: 700; }
.parameter-list > div > span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.parameter-list p { margin: 0; font-size: 12px; line-height: 1.5; }
.doc-table { overflow: auto; border: 1px solid var(--border); border-radius: 5px; }
.response-headers { padding: 10px 12px; background: #eef5f6; border-left: 3px solid #2b7d8f; }

.login-body { min-height: 100vh; background: #edf1f2; }
.login-shell { min-height: 100vh; padding: 24px; display: flex; align-items: center; justify-content: center; }
.login-panel { width: min(410px, 100%); padding: 28px; background: #fff; border: 1px solid var(--border); border-radius: 7px; box-shadow: 0 20px 60px rgba(20, 31, 36, 0.1); }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand > div { display: flex; flex-direction: column; }
.login-brand strong { font-size: 15px; }
.login-brand span { color: var(--muted); font-size: 11px; }
.login-copy { margin: 34px 0 20px; }
.login-copy h1 { margin: 0; font-size: 23px; }
.login-copy p { margin: 5px 0 0; color: var(--muted); }
.secret-input { position: relative; }
.secret-input input { padding-right: 42px; }
.secret-input .icon-button { position: absolute; right: 2px; top: 2px; }
.login-meta { margin-top: 24px; padding-top: 16px; display: flex; align-items: center; gap: 8px; color: var(--muted); border-top: 1px solid var(--border); font-size: 10px; overflow-wrap: anywhere; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 420px; padding: 11px 13px; display: flex; align-items: center; gap: 9px; color: #fff; background: #263137; border-radius: 5px; box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2); animation: toast-in 180ms ease; }
.toast.error { background: #8f2433; }
.spin { animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .service-summary { min-height: auto; }
  .tool-layout { grid-template-columns: 360px minmax(0, 1fr); }
  .compact-controls { grid-template-columns: 1fr; }
  .catalog-row { grid-template-columns: 42px 220px 1fr 70px; }
}

@media (max-width: 800px) {
  .sidebar { transform: translateX(-100%); transition: transform 180ms ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim.open { position: fixed; inset: 0; z-index: 30; display: block; background: rgba(12, 19, 22, 0.48); }
  .workspace { margin-left: 0; }
  .mobile-header { height: 54px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
  .mobile-brand { color: var(--ink); font-weight: 750; }
  .main-content { padding: 20px 15px 40px; }
  .page-header { align-items: flex-start; }
  .page-header h1 { font-size: 22px; }
  .tool-layout.active { display: block; }
  .tool-controls { border-right: 0; border-bottom: 1px solid var(--border); }
  .tool-output { min-height: 500px; }
  .docs-layout { grid-template-columns: 1fr; gap: 16px; }
  .docs-toc { position: static; display: flex; gap: 4px; overflow-x: auto; padding: 0 0 10px; border-left: 0; border-bottom: 1px solid var(--border); }
  .docs-toc a { min-width: max-content; padding: 0 8px; }
  .docs-header { align-items: flex-start; }
  .base-url { max-width: 100%; }
  .catalog-row { grid-template-columns: 42px 1fr auto; }
  .catalog-row > p { grid-column: 2 / -1; }
  .billing-band { grid-template-columns: 36px 1fr auto; }
  .billing-band > div:nth-child(3) { grid-column: 2 / -1; }
}

@media (max-width: 560px) {
  .page-header { flex-direction: column; }
  .page-header .segmented-control, .header-actions { width: 100%; }
  .page-header .segmented-control > * { flex: 1; }
  .metrics-grid, .metrics-grid.three { grid-template-columns: 1fr; }
  .metric-card { min-height: 116px; }
  .form-grid.two { grid-template-columns: 1fr; }
  .compact-controls { grid-template-columns: 1fr; }
  .usage-strip { gap: 15px; }
  .parameter-list > div { grid-template-columns: 1fr 70px; }
  .parameter-list p { grid-column: 1 / -1; }
  .login-shell { padding: 12px; }
  .login-panel { padding: 22px; }
  .project-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}
