:root {
  --canvas: #f5f6f4;
  --surface: #fff;
  --sidebar: #fafbf9;
  --ink: #202923;
  --muted: #636d66;
  --faint: #879087;
  --line: #e0e5de;
  --strong-line: #c6cec4;
  --accent: #1c6348;
  --accent-hover: #154e39;
  --accent-soft: #e9f2eb;
  --danger: #a03932;
  --danger-soft: #fcf0ee;
  --warning: #795418;
  --warning-soft: #faf5e9;
  --radius: 7px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 14px;
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #629d7b; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 23px; line-height: 1.4; font-weight: 650; letter-spacing: -.6px; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.mono, code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.mono { font-size: 12px; overflow-wrap: anywhere; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 12px; padding: 8px 14px; z-index: 100; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.wordmark { display: inline-flex; align-items: baseline; gap: 5px; font-family: "Segoe UI", Arial, sans-serif; font-size: 19px; letter-spacing: -.65px; font-weight: 700; white-space: nowrap; }
.wordmark span { color: var(--muted); font-weight: 400; }
.brand-symbol { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--accent); border-radius: 6px; color: white; font-size: 17px; font-weight: 650; font-family: Arial, sans-serif; }
.brand { display: flex; align-items: center; gap: 9px; }
.shell { min-height: 100dvh; display: grid; grid-template-columns: 202px minmax(0, 1fr); }
.sidebar { height: 100dvh; position: sticky; top: 0; background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 24px 13px 14px; }
.sidebar .brand { padding: 0 9px; }
.nav-label { font-size: 11px; letter-spacing: 1.4px; color: var(--faint); margin: 35px 12px 9px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 8px 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); text-align: left; }
.nav-link:hover { background: #eff1ec; color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.nav-link svg { width: 17px; height: 17px; flex: none; }
.sidebar-bottom { margin-top: auto; padding: 18px 9px 0; }
.sidebar-bottom p { font-size: 11px; color: var(--muted); padding-top: 7px; }
.environment { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); }
.dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--accent); flex: none; }
.main-shell { min-width: 0; }
.topbar { min-height: 65px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: 12px; color: var(--muted); display: flex; gap: 10px; }
.breadcrumb strong { font-weight: 500; color: var(--ink); }
.session { display: flex; align-items: center; gap: 12px; min-width: 0; }
.session-email { font-size: 12px; color: var(--muted); max-width: 235px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 25px; height: 25px; background: #f0f3ed; border: 1px solid var(--line); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--accent); flex: none; }
.content { max-width: 1560px; margin: 0 auto; padding: 31px 32px 45px; min-width: 0; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.page-heading p { margin-top: 6px; font-size: 13px; color: var(--muted); max-width: 720px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.page-heading > .actions { flex-shrink: 0; padding-top: 3px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 7px 13px; border: 1px solid var(--strong-line); background: var(--surface); color: var(--ink); border-radius: 6px; font-size: 12px; font-weight: 550; white-space: nowrap; line-height: 1.5; }
.btn:hover:not(:disabled) { background: #f5f7f3; border-color: #aebbad; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: white; }
.btn.danger:hover:not(:disabled) { background: #842d27; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn.quiet:hover:not(:disabled) { background: #eff2ec; color: var(--ink); }
.btn.text-danger { color: var(--danger); }
.btn.small { min-height: 32px; padding: 5px 8px; font-size: 12px; }
.btn svg { height: 15px; width: 15px; flex: none; }
.btn.is-busy::before { content: ''; width: 11px; height: 11px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; overflow: hidden; }
.panel-heading { min-height: 57px; padding: 14px 19px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel-heading h2 { font-size: 14px; }
.panel-body { padding: 20px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 9px; flex: 1; }
.search { width: 260px; max-width: 100%; }
input:not([type="checkbox"]), select, textarea { border: 1px solid var(--strong-line); border-radius: 5px; background: var(--surface); outline-offset: 1px; max-width: 100%; }
input:not([type="checkbox"]), select { min-height: 37px; padding: 7px 10px; }
input::placeholder, textarea::placeholder { color: #90988f; }
textarea { display: block; width: 100%; padding: 10px 12px; resize: vertical; line-height: 1.7; min-height: 94px; }
input:disabled, select:disabled, textarea:disabled { background: #f5f6f3; color: var(--muted); }
select { cursor: pointer; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { background: #fafbf9; padding: 10px 18px; color: var(--muted); font-size: 11px; font-weight: 550; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 15px 18px; border-bottom: 1px solid #edf0ea; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfdfb; }
td.name-cell { min-width: 170px; max-width: 290px; }
.cell-title { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.cell-sub { margin-top: 3px; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.cell-meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; }
.row-actions { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.align-right { text-align: right; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 4px; color: var(--muted); font-size: 11px; background: #f0f2ee; line-height: 1.65; white-space: nowrap; }
.badge.good { background: var(--accent-soft); color: var(--accent); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }
.model-list { display: flex; flex-wrap: wrap; gap: 5px; max-width: 260px; }
.model-list code { font-size: 11px; background: #f4f6f1; border: 1px solid #e7ece2; padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.state { padding: 53px 22px; text-align: center; }
.state h2 { font-size: 15px; margin-bottom: 6px; }
.state p { max-width: 470px; margin: 0 auto; color: var(--muted); font-size: 13px; }
.state .actions { justify-content: center; margin-top: 18px; }
.state.loading { display: flex; justify-content: center; align-items: center; gap: 11px; min-height: 230px; color: var(--muted); }
.state .error-code { margin-top: 7px; color: var(--danger); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-right-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { padding: 12px 14px; border-radius: 5px; background: #f3f6f0; color: var(--muted); font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.notice.warning { background: var(--warning-soft); color: var(--warning); }
.notice.error { background: var(--danger-soft); color: var(--danger); }
.notice.success { background: var(--accent-soft); color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12px; font-weight: 600; }
.field > input, .field > select { width: 100%; }
.field .hint { font-weight: 400; }
.form-section { border: 0; border-top: 1px solid var(--line); padding: 16px 0 0; margin: 0; min-width: 0; }
.form-section legend { font-size: 12px; font-weight: 650; color: var(--muted); padding: 0 10px 0 0; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; cursor: pointer; padding: 5px 0; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; flex: none; margin: 3px 0 0; }
.checkbox-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 18px; max-height: 240px; overflow-y: auto; padding: 9px 12px; border: 1px solid var(--line); border-radius: 5px; }
.check > span { overflow-wrap: anywhere; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; padding-top: 4px; }
.dialog { border: 1px solid var(--line); padding: 0; border-radius: 10px; width: min(660px, calc(100% - 32px)); max-height: calc(100dvh - 48px); color: var(--ink); box-shadow: 0 18px 70px #17201924; overflow: auto; }
.dialog.narrow { width: min(470px, calc(100% - 32px)); }
.dialog::backdrop { background: #17201955; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 22px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 1; }
.dialog-title { font-size: 16px; }
.dialog-close { font-size: 21px; min-width: 32px; padding: 0 8px; }
.dialog-body { padding: 22px; }
.dialog pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.kv { margin: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; font-size: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 21px; }
.stat { padding: 18px 20px; border-right: 1px solid var(--line); min-width: 0; }
.stat:last-child { border-right: none; }
.stat-label { color: var(--muted); font-size: 11px; }
.stat-value { font-size: 25px; font-weight: 600; line-height: 1.45; margin-top: 5px; font-family: "Segoe UI", Arial, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.6px; overflow-wrap: anywhere; }
.stat-value.alert { color: var(--danger); }
.usage-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 25px; padding: 15px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 24px; }
.usage-strip h2 { font-size: 12px; margin-right: 8px; }
.usage-item { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--muted); }
.usage-item strong { color: var(--ink); font-weight: 550; font-variant-numeric: tabular-nums; }
.footnote { font-size: 11px; color: var(--muted); margin-top: 15px; }
.secret-row { display: flex; gap: 8px; align-items: center; }
.secret-row input { min-width: 0; flex: 1; font-family: Consolas, monospace; font-size: 12px; }
.playground-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
.playground-grid .panel-body { padding: 19px; }
.playground-input { min-height: 218px; }
.output-panel { min-height: 390px; }
.output-text { min-height: 230px; max-height: 600px; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.9; margin: 0; font-family: inherit; }
.output-text.empty { color: var(--faint); font-size: 13px; }
.output-meta { display: flex; flex-wrap: wrap; gap: 8px 17px; font-size: 11px; color: var(--muted); padding: 11px 18px; border-top: 1px solid var(--line); }
.events { border-top: 1px solid var(--line); padding: 13px 18px; }
.events summary { cursor: pointer; font-size: 12px; padding: 3px 0; }
.events ul { padding-left: 17px; margin: 10px 0 0; max-height: 200px; overflow-y: auto; font-size: 11px; }
.events li { padding: 2px 0; overflow-wrap: anywhere; }
.policy-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .8fr); gap: 22px; align-items: start; }
.policy-sections { display: flex; flex-direction: column; gap: 0; }
.policy-section { padding: 19px 21px; border-bottom: 1px solid var(--line); }
.policy-section:last-child { border: none; }
.policy-section h3 { margin-bottom: 6px; font-size: 13px; }
.policy-section p, .policy-section li { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.policy-section ul { margin: 7px 0 0; padding-left: 18px; }
.policy-section pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.toast-region { position: fixed; bottom: 23px; right: 25px; z-index: 50; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; background: #253f30; color: #fff; padding: 12px 15px; border-radius: 7px; box-shadow: 0 5px 20px #182f1926; font-size: 12px; pointer-events: auto; }
.toast.error { background: #783a31; }
.toast span { flex: 1; overflow-wrap: anywhere; }
.toast button { background: transparent; border: 0; color: inherit; font-size: 18px; padding: 0 3px; }
.boot { min-height: 100dvh; display: flex; align-items: center; justify-content: center; gap: 25px; }
.login-layout { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; padding: 30px 36px 23px; }
.login-panel { width: min(400px, 100%); margin: auto; padding: 38px 0 54px; }
.login-eyebrow { font-family: Consolas, monospace; letter-spacing: 2px; font-size: 10px; color: var(--accent); margin-bottom: 12px; }
.login-panel h1 { font-size: 26px; }
.login-panel .description { font-size: 13px; color: var(--muted); margin: 10px 0 27px; }
.login-panel form { display: flex; flex-direction: column; gap: 18px; }
.login-panel input { min-height: 44px; }
.login-panel .btn.primary { min-height: 43px; font-size: 13px; }
.login-panel .login-hint { font-size: 11px; line-height: 1.9; color: var(--muted); padding-top: 17px; border-top: 1px solid var(--line); margin-top: 25px; }
.login-footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.noscript { padding: 20px; text-align: center; }
@media (min-width: 1600px) { .content { padding-top: 37px; } }
@media (max-width: 1180px) {
  .shell { grid-template-columns: 181px minmax(0, 1fr); }
  .content { padding: 25px 23px 36px; }
  .topbar { padding: 0 23px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .page-heading { flex-wrap: wrap; gap: 14px; }
  .policy-layout { grid-template-columns: 1fr; }
  td, th { padding-left: 13px; padding-right: 13px; }
}
@media (max-width: 900px) {
  .playground-grid { grid-template-columns: 1fr; }
  .playground-input { min-height: 150px; }
  .output-panel { min-height: 270px; }
  .output-text { min-height: 170px; }
  .session-email { max-width: 145px; }
}
@media (max-width: 720px) {
  .shell { display: block; }
  .sidebar { height: auto; position: static; padding: 15px 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { padding: 0 1px 12px; }
  .nav-label, .sidebar-bottom { display: none; }
  .nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding-bottom: 8px; }
  .nav-link { justify-content: center; min-height: 44px; padding: 7px 3px; font-size: 12px; gap: 7px; }
  .nav-link svg { width: 15px; height: 15px; }
  .topbar { min-height: 48px; padding: 4px 16px; gap: 8px; }
  .breadcrumb { font-size: 11px; }
  .breadcrumb > span { display: none; }
  .session { gap: 5px; }
  .session-email { max-width: 140px; font-size: 11px; }
  .avatar { display: none; }
  .content { padding: 23px 16px 30px; }
  h1 { font-size: 21px; }
  .page-heading { margin-bottom: 19px; gap: 13px; }
  .page-heading p { font-size: 12px; line-height: 1.8; }
  .page-heading > .actions { width: 100%; }
  .btn, .btn.small, .nav-link, .dialog-close { min-height: 44px; min-width: 44px; }
  .btn { padding: 10px 13px; }
  .btn.small { padding: 8px 10px; }
  input:not([type="checkbox"]), select { min-height: 44px; }
  input:not([type="checkbox"]), select, textarea { font-size: 16px; }
  .field input.mono { font-size: 14px; }
  .toolbar { padding: 12px; gap: 9px; }
  .filters { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { width: 100%; grid-column: 1 / -1; }
  .filters select { width: 100%; min-width: 0; font-size: 12px; }
  .table-wrap { overflow: visible; }
  .responsive-table thead { display: none; }
  .responsive-table, .responsive-table tbody { display: block; width: 100%; }
  .responsive-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; border-bottom: 1px solid var(--line); gap: 10px 13px; }
  .responsive-table tr:last-child { border: none; }
  .responsive-table td { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: none; padding: 0; border: 0; text-align: left; }
  .responsive-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 400; }
  .responsive-table td.name-cell, .responsive-table td.action-cell, .responsive-table td.wide-cell { grid-column: 1 / -1; }
  .responsive-table td.name-cell::before, .responsive-table td.action-cell::before { display: none; }
  .cell-title { font-size: 14px; }
  .cell-sub { font-size: 11px; }
  .cell-meta { margin-top: 1px; }
  .model-list { max-width: none; }
  .model-list code { font-size: 11px; }
  .row-actions { justify-content: flex-start; border-top: 1px solid #edf0ea; padding-top: 8px; gap: 4px; }
  .badge { align-self: flex-start; }
  .table-footer { flex-wrap: wrap; padding: 12px 14px; }
  .table-footer .actions { gap: 5px; }
  .table-footer select { font-size: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .check { align-items: flex-start; min-height: 44px; padding: 11px 0; }
  .dialog { max-height: calc(100dvh - 24px); width: calc(100% - 24px); border-radius: 8px; }
  .dialog.narrow { width: calc(100% - 24px); }
  .dialog-header { padding: 10px 16px; }
  .dialog-body { padding: 18px 16px; }
  .checkbox-list { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: 23px; }
  .stat:nth-child(3) { border-right: 1px solid var(--line); }
  .stat:nth-child(even) { border-right: 0; }
  .stat:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .usage-strip { gap: 10px 20px; padding: 14px 16px; }
  .usage-strip h2 { width: 100%; }
  .kv { grid-template-columns: 92px minmax(0, 1fr); gap: 9px 12px; }
  .secret-row { flex-wrap: wrap; }
  .secret-row input { flex-basis: 100%; }
  .events summary { min-height: 44px; padding-top: 10px; }
  .toast-region { bottom: 14px; right: 16px; }
  .toast button { min-width: 44px; min-height: 44px; }
  .login-layout { padding: 22px; }
  .login-footer { flex-direction: column; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } }
