
.brand-suffix { font-weight: 400; color: var(--muted); }
.console { padding: 64px 0 96px; min-height: 60vh; }
.console h1 { margin: 14px 0 12px; font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.1; letter-spacing: -0.035em; font-weight: 600; }
.card { margin-top: 32px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); max-width: 36rem; }
.card h2 { margin: 0 0 8px; font-size: 1.125rem; font-weight: 600; }
.card p { margin: 0; }
/* Sign-in and other one-message pages: a narrow card, full-width controls. */
.auth { margin: 0 auto; max-width: 26rem; }
.console .auth h1 { margin: 14px 0 8px; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.02em; }
.auth-mark { display: block; border-radius: 10px; }
.auth .field input { width: 100%; max-width: none; }
.auth form .btn { width: 100%; justify-content: center; }
.auth .pw { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.auth .pw > summary { cursor: pointer; font-size: 0.875rem; color: var(--muted); }
.auth .pw[open] > summary { margin-bottom: 4px; }
.auth .pw form { margin-top: 12px; }
.auth form { margin: 24px 0 0; }
.muted { color: var(--muted); }
.fine { margin-top: 20px !important; font-size: 0.875rem; color: var(--muted); }
.auth .divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; color: var(--muted); font-size: 0.875rem; }
.auth .divider + form { margin-top: 14px; }
.auth .divider::before, .auth .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth form.inline-form { margin-top: 0; }
.providers { display: grid; gap: 10px; margin-top: 24px; }
.providers form { margin: 0 !important; }
.btn-provider { width: 100%; justify-content: center; }
.field input[type="password"] { font: inherit; font-size: 1rem; padding: 9px 11px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--paper); color: var(--text); max-width: 32rem; }
.login-names { margin: 8px 0 0; padding: 0; list-style: none; }
.login-names li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.login-names li:last-child { border-bottom: 0; }
.login-names form { margin: 0; }
.link-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.notice { margin-top: 16px !important; padding: 12px 14px; border: 1px solid var(--control-line); border-radius: 10px; color: var(--text); }
.nav form { margin: 0; }
button.btn { cursor: pointer; font: 500 0.875rem/1 var(--mono); }
/* The site's .btn-secondary sets no background, so a <button> kept the browser's gray (dark gray in dark mode)
   while an <a class="btn btn-secondary"> beside it was clear. */
button.btn-secondary { background: transparent; color: var(--text); }
.nav { gap: 20px; }
/* The console keeps every header link at any width; below 720px the header wraps instead. */
@media (max-width: 720px) { .site-header .wrap { flex-wrap: wrap; height: auto; min-height: 64px; padding-block: 10px; } .site-header .nav { gap: 16px; } }
.org-list { margin: 8px 0 0; padding: 0; list-style: none; }
.org-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.org-list li:last-child { border-bottom: 0; }

/* Operator area: tabs, action forms, plan pages. */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 20px 0 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.admin-tabs a { padding: 8px 0 10px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); }
@media (hover: hover) { .admin-tabs a:hover { color: var(--text); } }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions-row form { margin: 0; }
.btn-tiny { min-height: 32px; padding: 0 12px; font-size: 0.8125rem; }
/* Status colors, one meaning each: ok (healthy, done), warn (needs a look: drained, partial, near a limit, forced),
   danger (failed, and the button of an irreversible action). At least 4.5:1 on --paper-2, where tables sit. */
:root { --status-ok: #186a35; --status-warn: #7d5400; --status-danger: #b3261e; }
@media (prefers-color-scheme: dark) { :root { --status-ok: #5ec27f; --status-warn: #e0b050; --status-danger: #f2887f; } }
.btn-danger { border-color: var(--status-danger); color: var(--status-danger); background: transparent; }
/* A disabled button looks unavailable and does not press in. */
button.btn:disabled { opacity: 0.45; cursor: not-allowed; }
button.btn:disabled:active { scale: none; }
.more { display: inline-block; }
.more > summary { list-style: none; cursor: pointer; }
.more > summary::-webkit-details-marker { display: none; }
.more[open] > summary { margin-bottom: 8px; }
.mt-s { margin-top: 12px; }
.mt-m { margin-top: 20px; }
.actions-end { align-items: flex-end; }
.form-card { margin-top: 24px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); max-width: 44rem; }
.form-card h2 { margin: 0 0 12px; font-size: 1.0625rem; font-weight: 600; }
.field { display: grid; gap: 6px; margin: 0 0 14px; }
.field label { font-size: 0.875rem; font-weight: 500; }
.field .hint { font-size: 0.8125rem; color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field input[type="number"], .field select, .field textarea {
  font: inherit; font-size: 1rem; padding: 9px 11px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--paper); color: var(--text); max-width: 32rem; }
.field textarea { min-height: 72px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; font-size: 0.9375rem; }
.kv-table { border-collapse: collapse; font-size: 0.9375rem; margin-top: 8px; }
.kv-table th, .kv-table td { text-align: start; vertical-align: top; padding: 8px 18px 8px 0; border-bottom: 1px solid var(--line); }
.kv-table th { font-weight: 500; color: var(--muted); white-space: nowrap; }
.body-dump { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; overflow: auto; font-size: 0.8125rem; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.audio-block { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; font-size: 0.8125rem; }
.audio-block audio { max-width: 100%; height: 34px; }
.diff { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
@media (max-width: 720px) { .diff { grid-template-columns: minmax(0, 1fr); } }
.diff pre { margin: 6px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-2); overflow-x: auto; font: 400 0.8125rem/1.55 var(--mono); }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 16px; }
.filters.form-card { max-width: none; }
td details summary { cursor: pointer; font-size: 0.8125rem; color: var(--muted); }
td details .diff { min-width: 28rem; margin-top: 8px; }
.secret { display: block; margin: 12px 0; padding: 12px 14px; border: 1px solid var(--control-line); border-radius: 10px; font: 500 0.9375rem/1.4 var(--mono); word-break: break-all; user-select: all; }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); font: 500 0.75rem/1.6 var(--mono); }

/* Operator overview (sections rendered by admin-sections.ts). */
/* Same width as the header; wide tables scroll inside their card. */
.admin-toc { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 24px 0 8px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font: 400 0.8125rem/1.4 var(--mono); }
.admin-toc a { color: var(--muted); text-decoration: none; }
@media (hover: hover) { .admin-toc a:hover { color: var(--text); } }
.admin-section { padding-top: 32px; scroll-margin-top: 16px; }
.admin-section h2 { margin: 0 0 10px; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em; }
/* A table wider than its card scrolls inside it; the shadows at either edge show there is more (they scroll away
   with the content once its end is reached). */
.table-card { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto;
  --edge: rgb(0 0 0 / 0.3);
  background:
    linear-gradient(to right, var(--paper-2) 30%, transparent) left / 40px 100% no-repeat local,
    linear-gradient(to left, var(--paper-2) 30%, transparent) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--edge), transparent) left / 16px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--edge), transparent) right / 16px 100% no-repeat scroll,
    var(--paper-2); }
@media (prefers-color-scheme: dark) { .table-card { --edge: rgb(0 0 0 / 0.7); } }
.table-card:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.table-card table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
/* Cells stay on one line, so a wide table scrolls instead of squeezing columns to one word each; long free text
   (reasons, details, aliases) is marked .wrap and wraps within a readable width. */
.table-card th, .table-card td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; white-space: nowrap; }
.table-card td.wrap { white-space: normal; overflow-wrap: break-word; min-width: 12rem; max-width: 32rem; }
.table-card th { font: 500 0.75rem/1.3 var(--mono); color: var(--muted); }
.table-card tr:last-child td { border-bottom: 0; }
.table-card small, .table-card .muted { color: var(--muted); }
/* <small> would otherwise shrink the 13px table text to ~10.8px. */
.table-card small { font-size: 0.75rem; }
.table-card .empty { margin: 0; padding: 12px 14px; }
.table-card ul { margin: 8px 0 0; padding-inline-start: 1.25rem; white-space: normal; }
.table-card code { font-size: 0.75rem; }
.table-note { margin: 8px 0 0; font-size: 0.8125rem; color: var(--muted); max-width: 60rem; }
.ok, .state.serving { color: var(--status-ok); }
.warn, .state.qualifying { color: var(--status-warn); }
.bad, td.bad, .state.unhealthy { color: var(--status-danger); }

/* App frame of the operator area (adminShell): sidebar beside the page from 1024px, a scrolling row above it below. */
.app-page .site-header .wrap { max-width: 100rem; height: 56px; }
.console-app { padding: 0; }
.console-app > .wrap { max-width: 100rem; display: grid; grid-template-columns: 12.5rem minmax(0, 1fr); gap: 40px; padding-block: 24px 80px; }
.app-main { min-width: 0; }
.side { position: sticky; top: 16px; align-self: start; display: grid; gap: 1px; font-size: 0.875rem; }
.side h2 { margin: 18px 0 6px 10px; font: 500 0.6875rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.side h2:first-child { margin-top: 4px; }
.side a { padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.side a[aria-current="page"] { background: var(--paper-2); color: var(--text); font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); }
/* The open organization, with its pages under it on a guide line. */
.side-org { padding: 6px 10px 2px; color: var(--text); font-weight: 500; }
.side a.sub { margin-inline-start: 14px; padding-inline-start: 12px; border-radius: 0 8px 8px 0; box-shadow: inset 1px 0 0 var(--line); }
.side a.sub[aria-current="page"] { box-shadow: inset 2px 0 0 var(--text); background: var(--paper-2); }
.app-page .site-header .who { font-size: 0.875rem; }
@media (max-width: 720px) { .app-page .site-header .who { display: none; } }
@media (hover: hover) { .side a:hover { color: var(--text); } }
@media (max-width: 1023px) {
  .console-app > .wrap { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 12px 64px; }
  .side { position: static; display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .side h2, .side-org { display: none; }
  .side a.sub { margin-inline-start: 0; }
  .side a { white-space: nowrap; }
}
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 4px 0 14px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.console-app .page-head h1 { margin: 0; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.02em; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.page-meta { font-size: 0.8125rem; }
.console-app .admin-section { padding-top: 28px; }
.console-app .admin-toc { margin-top: 16px; }
.app-main h2 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.block-head h2 { margin: 0; }
/* A choice of views (a time window): links in a track, the current one raised. */
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--line); font: 500 0.8125rem/1 var(--mono); }
.seg > * { padding: 6px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.seg > [aria-current] { background: var(--paper); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }
@media (hover: hover) { .seg > a:hover { color: var(--text); } }

/* Numbers line up: right-aligned, tabular. Rows show where the pointer is. */
.table-card th.num, .table-card td.num { text-align: end; }
@media (hover: hover) { .table-card tbody tr:hover { background: color-mix(in srgb, var(--text) 4%, transparent); } }
.table-card tr.current { background: color-mix(in srgb, var(--link) 10%, transparent); }

/* State as a dot and a word, never the color alone. */
.dot::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-end: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }

/* Headline numbers: one row of cells split by 1px lines (the gap shows the border color through). */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { display: grid; gap: 4px; align-content: start; padding: 12px 16px 14px; background: var(--paper-2); color: inherit; text-decoration: none; }
.stat .k { font: 500 0.6875rem/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-size: 1.375rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 0.75rem; color: var(--muted); }
@media (hover: hover) { a.stat:hover { background: var(--paper); } }
a.stat:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }

/* A row's actions behind one button; the list opens in the row (a table card would clip a floating one). */
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: "▾"; font-size: 0.75em; margin-inline-start: 2px; }
.menu-list { display: grid; min-width: 10rem; margin-top: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.menu-list a { padding: 6px 10px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 0.8125rem; }
.menu-list form { margin: 0; display: grid; }
.menu-list button { padding: 6px 10px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 0.8125rem; text-align: start; cursor: pointer; }
.menu-list a.danger { color: var(--status-danger); }
@media (hover: hover) { .menu-list a:hover, .menu-list button:hover { background: var(--paper-2); } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Share of a limit: a thin bar under the number. */
.bar { display: block; width: 8rem; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--link); }
.bar.warn > i { background: var(--status-warn); }

/* Filters above a list: small labeled fields on one line, wrapping. */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); }
.filter-bar label { display: grid; gap: 4px; font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.filter-bar input, .filter-bar select { width: 9.5rem; min-height: 34px; padding: 5px 9px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--paper); color: var(--text); font: inherit; font-size: 0.875rem; }
.filter-bar input.wide { width: 18rem; }
.filter-bar .btn { min-height: 34px; }
/* Let the request filters share the available width; keep both actions together when wrapping. */
.body-filters { column-gap: 10px; }
.body-filters label { flex: 1 1 7rem; min-width: 0; }
.body-filters .filter-date { flex-basis: 16rem; }
.body-filters .filter-status { flex: 0 0 4rem; }
.body-filters input, .body-filters select { box-sizing: border-box; width: 100%; min-width: 0; }
.body-filters .filter-actions { display: flex; flex: 0 0 auto; gap: 6px; }

/* Grouped report lines: the kind and its count; the lines behind it. */
.report-head { margin: 0; padding: 12px 14px 4px; }
.anomalies { margin: 0; padding: 4px 14px 12px; list-style: none; }
.anomalies > li { padding: 4px 0; }
.anomalies details > summary { cursor: pointer; }
.anomalies details ul { margin: 6px 0 4px; padding-inline-start: 1.25rem; font-size: 0.8125rem; color: var(--muted); }
.count { display: inline-block; min-width: 1.6em; padding: 0 6px; border-radius: 999px; background: var(--line); font: 500 0.75rem/1.5 var(--mono); text-align: center; }

/* A captured conversation: one block per message, labeled by role. */
.meta-line { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 8px; font-size: 0.8125rem; color: var(--muted); }
.meta-line b { color: var(--text); font-weight: 500; }
.msg { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-2); }
.msg-head { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-bottom: 1px solid var(--line); font: 500 0.6875rem/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.msg-head .role-user { color: var(--link); }
.msg-head .role-assistant { color: var(--status-ok); }
.msg-head .role-system { color: var(--status-warn); }
.msg-body { margin: 0; padding: 10px 12px; max-height: 28rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 0.875rem/1.55 var(--sans); }
.msg-body.code { font: 400 0.8125rem/1.5 var(--mono); }
.raw { margin-top: 12px; }
/* Captured requests: previews in the list, the open one in a panel beside it (as AI Studio's logs). */
.table-card.bodies tr.body-row { cursor: pointer; }
.table-card.bodies tr.body-row:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.table-card.bodies td.pv-cell { max-width: 22rem; }
.pv { display: block; overflow: hidden; text-overflow: ellipsis; }
.side-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 20; width: min(54rem, 58vw); display: flex; flex-direction: column;
  background: var(--paper); border-left: 1px solid var(--line); box-shadow: -12px 0 32px rgb(0 0 0 / 0.12); }
.side-panel[hidden] { display: none; }
@media (max-width: 900px) { .side-panel { width: 100vw; } }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-head code { font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-actions { display: flex; gap: 6px; flex-shrink: 0; }
.panel-body { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 14px 18px 32px; }
#panel-raw[aria-pressed="true"] { background: var(--text); color: var(--paper); }
.panel-body.raw-mode .msg, .panel-body.raw-mode .earlier { display: none; }
.panel-body.raw-mode details.raw > summary { display: none; }
.panel-body.raw-mode details.raw:not([open]) > * { display: block; }
.body-h { margin: 18px 0 2px; font-size: 0.9375rem; font-weight: 600; }
.earlier { margin-top: 10px; }
.earlier > summary { cursor: pointer; font-size: 0.8125rem; color: var(--muted); }
.open-by-id { display: flex; gap: 6px; margin: 0; }
.open-by-id input { width: 15rem; min-height: 32px; padding: 4px 9px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--paper); color: var(--text); font: inherit; font-size: 0.8125rem; }
.raw > summary { cursor: pointer; font-size: 0.8125rem; color: var(--muted); }
.raw .body-dump { margin-top: 8px; }
