:root {
  color-scheme: dark;
  --canvas: #0c1116;
  --surface: #131c21;
  --surface-raised: #18242a;
  --surface-soft: #202d32;
  --line: #2a3a40;
  --text: #eaf0f2;
  --muted: #9eafb5;
  --subtle: #71858b;
  --mint: #46d5bb;
  --mint-strong: #22b89f;
  --amber: #f2b45e;
  --coral: #f38372;
  --blue: #6cb5ee;
  --green: #71cf8e;
  --danger: #f16e75;
  --shadow: 0 16px 48px rgb(0 0 0 / 34%);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #f3f6f5;
  --surface: #ffffff;
  --surface-raised: #f7faf9;
  --surface-soft: #edf3f1;
  --line: #d7e1de;
  --text: #182827;
  --muted: #536764;
  --subtle: #71827f;
  --mint: #087d6d;
  --mint-strong: #0a917c;
  --amber: #ad6710;
  --coral: #c65042;
  --blue: #2376b5;
  --green: #237e48;
  --danger: #bd3943;
  --shadow: 0 14px 34px rgb(31 57 50 / 10%);
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:not(:disabled) { cursor: pointer; touch-action: manipulation; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .58; }
button[aria-busy="true"] { cursor: progress; opacity: .82; }
button[aria-busy="true"]::before { width: 12px; height: 12px; flex: 0 0 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ""; animation: button-spin .72s linear infinite; }
@keyframes button-spin { to { transform: rotate(360deg); } }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 10;
  inset: 0 auto 0 0;
  display: flex;
  width: 238px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 24px 15px 16px;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 1px 10px 0; }
.brand-mark {
  position: relative;
  display: flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid rgb(70 213 187 / 42%);
  border-radius: 10px;
  background: linear-gradient(145deg, rgb(70 213 187 / 18%), rgb(108 181 238 / 10%));
}
.brand-mark span { display: block; width: 4px; border-radius: 3px; background: var(--mint); }
.brand-mark span:nth-child(1) { height: 12px; opacity: .72; }
.brand-mark span:nth-child(2) { height: 20px; }
.brand-mark span:nth-child(3) { height: 15px; opacity: .86; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 14px; font-weight: 700; }
.brand-copy small { color: var(--subtle); font-size: 9px; letter-spacing: 1.15px; }
.demo-label {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  margin: 22px 10px 16px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  padding: 5px 10px;
  font-size: 11px;
}
.status-dot, .pulse-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--green); }
.status-dot { box-shadow: 0 0 0 3px rgb(113 207 142 / 13%); }
.pulse-dot { box-shadow: 0 0 0 4px rgb(113 207 142 / 12%); }
.nav-list { display: grid; gap: 4px; }
.nav-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  padding: 0 11px;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.nav-link[hidden] { display: none !important; }
.nav-link:hover { background: var(--surface-raised); color: var(--text); }
.nav-link.active { border-color: rgb(70 213 187 / 19%); background: rgb(70 213 187 / 10%); color: var(--mint); }
.nav-icon, [data-icon] { display: inline-flex; width: 18px; height: 18px; flex: 0 0 18px; align-items: center; justify-content: center; }
.nav-icon svg, [data-icon] svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.sidebar-bottom { display: grid; gap: 13px; margin-top: auto; }
.gateway-state { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 18px 10px 3px; }
.gateway-state > span:last-child { display: grid; gap: 1px; }
.gateway-state strong { font-size: 12px; font-weight: 600; }
.gateway-state small { color: var(--subtle); font-size: 11px; }
.side-help { display: flex; min-height: 38px; align-items: center; gap: 11px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); padding: 0 10px; text-align: left; cursor: pointer; }
.side-help:hover { background: var(--surface-raised); color: var(--text); }
.license-link { padding: 3px 10px; color: var(--subtle); font-size: 10px; }
.license-link:hover { color: var(--mint); }

.main-column { min-height: 100vh; margin-left: 238px; }
.topbar {
  position: sticky;
  z-index: 8;
  top: 0;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 91%, transparent);
  padding: 0 34px;
  backdrop-filter: blur(16px);
}
.crumb { display: flex; align-items: center; gap: 10px; color: var(--subtle); font-size: 12px; }
.crumb strong { color: var(--text); font-weight: 600; }
.crumb-sep { color: var(--line); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.env-pill { display: inline-flex; min-height: 27px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); padding: 0 9px; font-size: 10px; font-weight: 700; letter-spacing: .6px; }
.env-pill .status-dot { width: 6px; height: 6px; flex-basis: 6px; }
.icon-button { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { border-color: var(--line); background: var(--surface); color: var(--text); }
.icon-button svg { width: 18px; height: 18px; }
.quick-config { display: inline-flex; min-height: 37px; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgb(70 213 187 / 25%); border-radius: 6px; background: rgb(70 213 187 / 10%); color: var(--mint); padding: 0 12px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background-color 160ms ease; }
.quick-config:hover { background: rgb(70 213 187 / 17%); }
.quick-config svg { width: 16px; height: 16px; }
.profile-button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 0 0 0 5px; text-align: left; cursor: pointer; }
.profile-button:hover { color: var(--text); }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgb(242 180 94 / 25%); border-radius: 50%; background: rgb(242 180 94 / 13%); color: var(--amber); font-size: 11px; font-weight: 700; }
.profile-name { display: grid; gap: 0; }
.profile-name strong { font-size: 11px; font-weight: 600; }
.profile-name small { color: var(--subtle); font-size: 10px; }
.chevron { color: var(--subtle); font-size: 17px; }
.account-menu { position: absolute; top: 58px; right: 24px; width: 208px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-raised); box-shadow: var(--shadow); padding: 7px; }
.account-menu[hidden] { display: none; }
.account-menu-heading { display: grid; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 5px; padding: 8px; }
.account-menu-heading strong { font-size: 12px; }
.account-menu-heading span { color: var(--subtle); font-size: 11px; }
.account-menu button { width: 100%; border: 0; border-radius: 4px; background: transparent; color: var(--muted); padding: 8px; text-align: left; cursor: pointer; }
.account-menu button:hover { background: var(--surface-soft); color: var(--text); }
.account-menu button:active:not(:disabled) { background: var(--surface-soft); }

.page-content { width: min(1440px, 100%); margin: 0 auto; padding: 31px 34px 48px; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--subtle); padding: 17px 34px 24px; font-size: 10px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.page-heading h1 { margin: 0; font-size: 23px; font-weight: 650; line-height: 1.25; }
.page-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: var(--mint); font-size: 10px; font-weight: 700; letter-spacing: 1.15px; text-transform: uppercase; }
.heading-actions { display: flex; align-items: center; gap: 9px; }
.btn { display: inline-flex; min-height: 37px; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-raised); color: var(--text); padding: 0 12px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease; }
.btn:hover { border-color: color-mix(in srgb, var(--mint) 45%, var(--line)); background: var(--surface-soft); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { border-color: var(--mint-strong); background: var(--mint-strong); color: #071d1a; }
.btn-primary:hover { border-color: var(--mint); background: var(--mint); color: #071d1a; }
.btn-soft { border-color: rgb(70 213 187 / 25%); background: rgb(70 213 187 / 10%); color: var(--mint); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn-danger { border-color: rgb(241 110 117 / 28%); background: rgb(241 110 117 / 8%); color: var(--danger); }
.btn-sm { min-height: 31px; padding: 0 9px; font-size: 11px; }
.text-button { border: 0; background: transparent; color: var(--mint); padding: 4px 0; font-size: 11px; font-weight: 600; cursor: pointer; }
.text-button:hover { color: var(--text); }
.text-button:active:not(:disabled) { color: var(--mint); }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.mono { font-family: "Cascadia Code", Consolas, monospace; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi-card { min-height: 126px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 15px 17px 14px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.kpi-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 6px; background: rgb(70 213 187 / 10%); color: var(--mint); }
.kpi-icon.amber { background: rgb(242 180 94 / 11%); color: var(--amber); }
.kpi-icon.blue { background: rgb(108 181 238 / 11%); color: var(--blue); }
.kpi-icon.coral { background: rgb(243 131 114 / 11%); color: var(--coral); }
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-value { margin-top: 12px; font-size: 25px; font-variant-numeric: tabular-nums; font-weight: 650; line-height: 1.1; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--subtle); font-size: 10px; }
.trend { color: var(--green); font-weight: 600; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .85fr); gap: 14px; margin-bottom: 15px; }
.panel { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.panel-pad { padding: 17px 18px; }
.panel-heading { display: flex; min-height: 32px; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-heading h2 { margin: 0; font-size: 13px; font-weight: 650; }
.panel-heading p { margin: 4px 0 0; color: var(--subtle); font-size: 10px; }
.select, .field, .search-field { min-height: 35px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-raised); color: var(--text); padding: 0 10px; }
.select { min-width: 104px; font-size: 11px; }
.chart-wrap { position: relative; height: 212px; margin-top: 17px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-gridline { stroke: var(--line); stroke-dasharray: 3 5; stroke-width: 1; }
.chart-area { fill: url(#chart-fill); }
.chart-line { fill: none; stroke: var(--mint); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; }
.chart-line-alt { fill: none; stroke: var(--blue); stroke-dasharray: 4 5; stroke-linecap: round; stroke-width: 1.5; opacity: .7; }
.chart-axis { fill: var(--subtle); font-size: 9px; }
.chart-legend { display: flex; align-items: center; gap: 15px; margin-top: 4px; color: var(--muted); font-size: 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-mark { width: 12px; height: 3px; border-radius: 3px; background: var(--mint); }
.legend-mark.blue { background: var(--blue); }
.usage-summary { display: flex; flex-direction: column; justify-content: space-between; min-height: 293px; }
.donut-wrap { display: grid; flex: 1; place-items: center; padding: 14px 0 8px; }
.donut { position: relative; display: grid; width: 144px; aspect-ratio: 1; place-items: center; border-radius: 50%; background: conic-gradient(var(--mint) 0 19%, var(--amber) 19% 20%, var(--surface-soft) 20% 100%); }
.donut::before { position: absolute; width: 111px; aspect-ratio: 1; border-radius: 50%; background: var(--surface); content: ""; }
.donut-center { position: relative; display: grid; justify-items: center; gap: 0; }
.donut-center strong { font-size: 24px; line-height: 1.2; }
.donut-center span { color: var(--subtle); font-size: 10px; }
.quota-rows { display: grid; gap: 11px; border-top: 1px solid var(--line); padding-top: 12px; }
.quota-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.quota-label { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 7px; height: 7px; border-radius: 2px; background: var(--mint); }
.swatch.amber { background: var(--amber); }
.quota-row strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.usage-section { border-top: 1px solid var(--line); padding-top: 21px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.section-heading h2 { margin: 0; font-size: 14px; font-weight: 650; }
.section-heading p { margin: 4px 0 0; color: var(--subtle); font-size: 10px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.field { min-height: 33px; font-size: 11px; }
.range-sep { color: var(--subtle); font-size: 11px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { border-bottom: 1px solid var(--line); padding: 11px 12px; white-space: nowrap; }
th { background: var(--surface-raised); color: var(--subtle); font-size: 10px; font-weight: 600; }
td { color: var(--muted); font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-raised) 72%, transparent); }
td strong { color: var(--text); font-weight: 600; }
.model-name { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-weight: 550; }
.provider-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.provider-dot.amber { background: var(--amber); }
.provider-dot.blue { background: var(--blue); }
.provider-dot.coral { background: var(--coral); }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px 0; color: var(--subtle); font-size: 10px; }
.pagination { display: flex; align-items: center; gap: 7px; }
.pagination button { width: 28px; height: 27px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--muted); cursor: pointer; }
.pagination button:disabled { opacity: .48; cursor: default; }

.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.content-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-grid .span-two { grid-column: span 2; }
.model-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.search-field { display: flex; min-width: min(320px, 100%); align-items: center; gap: 8px; }
.search-field svg { width: 15px; height: 15px; color: var(--subtle); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.search-field input::placeholder { color: var(--subtle); }
.segment { display: inline-flex; gap: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 3px; }
.segment button { min-height: 32px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); padding: 0 10px; font-size: 10px; cursor: pointer; }
.segment button:hover:not([aria-pressed="true"]) { background: var(--surface-raised); color: var(--text); }
.segment button[aria-pressed="true"] { background: var(--surface-soft); color: var(--mint); }
.model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.model-card { display: flex; min-height: 177px; flex-direction: column; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 14px; transition: border-color 160ms ease, transform 160ms ease; }
.model-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--mint) 45%, var(--line)); }
.model-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.model-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; }
.model-glyph { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 6px; background: rgb(70 213 187 / 10%); color: var(--mint); }
.model-glyph svg { width: 15px; height: 15px; }
.model-glyph.amber { background: rgb(242 180 94 / 11%); color: var(--amber); }
.model-glyph.blue { background: rgb(108 181 238 / 11%); color: var(--blue); }
.model-glyph.coral { background: rgb(243 131 114 / 11%); color: var(--coral); }
.availability { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 9px; }
.availability .status-dot { width: 5px; height: 5px; flex-basis: 5px; box-shadow: none; }
.model-desc { min-height: 33px; margin: 11px 0; color: var(--muted); font-size: 10px; }
.model-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; color: var(--subtle); font-size: 9px; }
.model-meta strong { color: var(--text); font-size: 10px; font-weight: 600; }
.model-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.tag { display: inline-flex; min-height: 20px; align-items: center; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); padding: 0 6px; font-size: 9px; }
.empty-state { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 7px; color: var(--muted); padding: 32px; text-align: center; }

.callout { display: flex; align-items: flex-start; gap: 11px; border: 1px solid rgb(108 181 238 / 23%); border-radius: 6px; background: rgb(108 181 238 / 7%); color: var(--muted); padding: 13px 14px; font-size: 11px; }
.callout strong { color: var(--text); }
.callout .nav-icon { color: var(--blue); }
.key-mask { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.key-mask code { color: var(--muted); font-size: 10px; }
.key-name { display: grid; gap: 2px; }
.key-name strong { font-size: 11px; }
.key-name small { color: var(--subtle); font-size: 9px; }
.key-status { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 10px; }
.key-status .status-dot { width: 5px; height: 5px; flex-basis: 5px; box-shadow: none; }
.key-table td:last-child { text-align: right; }
.key-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.row-icon { display: inline-grid; width: 32px; height: 32px; place-items: center; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; }
.row-icon:hover { border-color: var(--line); background: var(--surface-raised); color: var(--text); }
.row-icon.danger:hover { border-color: rgb(241 110 117 / 20%); background: rgb(241 110 117 / 8%); color: var(--danger); }
.row-icon svg { width: 14px; height: 14px; }
.key-created { border: 1px solid rgb(113 207 142 / 30%); border-radius: 6px; background: rgb(113 207 142 / 8%); margin-bottom: 14px; padding: 13px; }
.key-created strong { display: block; margin-bottom: 6px; color: var(--green); font-size: 11px; }
.key-created code { display: block; overflow-wrap: anywhere; color: var(--text); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-field { display: grid; gap: 6px; }
.form-field label { color: var(--muted); font-size: 10px; font-weight: 600; }
.form-field .field, .form-field select, .form-field input { width: 100%; min-height: 38px; }
.form-note { color: var(--subtle); font-size: 10px; }
.code-block { overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: #090e11; color: #cce1db; padding: 15px; font: 11px/1.7 "Cascadia Code", Consolas, monospace; white-space: pre; }
:root[data-theme="light"] .code-block { background: #172522; color: #d4eae4; }
.config-preview[role="button"] { cursor: pointer; }
.config-preview[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.config-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(275px, .7fr); gap: 14px; }
.config-panel { padding: 17px; }
.config-panel .section-heading { align-items: flex-start; }
.config-status { display: flex; align-items: center; gap: 8px; margin: 11px 0 14px; color: var(--muted); font-size: 10px; }
.step-list { display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.step-list li { display: grid; grid-template-columns: 25px 1fr; gap: 10px; padding: 10px 0; }
.step-num { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--mint); font-size: 10px; font-weight: 700; }
.step-list strong { display: block; margin: 1px 0 3px; font-size: 11px; }
.step-list p { margin: 0; color: var(--muted); font-size: 10px; }
.endpoint-box { display: grid; gap: 7px; margin-top: 15px; border-top: 1px solid var(--line); padding-top: 14px; }
.endpoint-box small { color: var(--subtle); font-size: 9px; }
.endpoint-value { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-raised); padding: 8px 9px; }
.endpoint-value code { overflow-wrap: anywhere; color: var(--mint); font-size: 10px; }

.faq-list { display: grid; gap: 8px; }
.faq-item { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.faq-item summary { display: flex; min-height: 49px; align-items: center; justify-content: space-between; gap: 14px; padding: 0 14px; color: var(--text); font-size: 11px; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { color: var(--subtle); content: "+"; font-size: 17px; font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { border-top: 1px solid var(--line); padding: 12px 14px 14px; color: var(--muted); font-size: 11px; }
.faq-answer p { margin: 0; }
.faq-answer code { color: var(--mint); font-size: 10px; }
.faq-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }

.referral-band { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; border: 1px solid rgb(70 213 187 / 25%); border-radius: 7px; background: linear-gradient(112deg, rgb(70 213 187 / 12%), rgb(108 181 238 / 6%) 64%, rgb(242 180 94 / 8%)); padding: 20px; }
.referral-band h2 { margin: 0; font-size: 16px; }
.referral-band p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.referral-code { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); padding: 8px; }
.referral-code code { color: var(--mint); padding: 0 4px; font-size: 12px; }
.stats-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 7px; background: var(--surface); margin-top: 14px; }
.stats-strip > div { padding: 16px 18px; }
.stats-strip > div + div { border-left: 1px solid var(--line); }
.stats-strip span { display: block; color: var(--subtle); font-size: 10px; }
.stats-strip strong { display: block; margin-top: 6px; font-size: 20px; font-weight: 650; }
.reward-card { min-height: 160px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 17px; }
.reward-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 7px; background: rgb(242 180 94 / 12%); color: var(--amber); }
.reward-icon svg { width: 17px; height: 17px; }
.reward-card h3 { margin: 13px 0 5px; font-size: 12px; }
.reward-card p { margin: 0; color: var(--muted); font-size: 10px; }
.reward-card .text-button { margin-top: 13px; }
.plan-card { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 17px; }
.plan-card.featured { border-color: rgb(70 213 187 / 44%); }
.plan-card h3 { margin: 0; font-size: 12px; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin-top: 14px; }
.plan-price strong { font-size: 24px; }
.plan-price span { color: var(--muted); font-size: 10px; }
.plan-card p { min-height: 32px; margin: 7px 0 13px; color: var(--muted); font-size: 10px; }
.plan-points { display: grid; gap: 8px; margin: 0 0 15px; padding: 0; color: var(--muted); font-size: 10px; list-style: none; }
.plan-points li { display: flex; align-items: center; gap: 7px; }
.plan-points li::before { color: var(--green); content: "✓"; }

.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; background: rgb(4 8 10 / 68%); padding: 18px; }
.modal { width: min(560px, 100%); max-height: min(86vh, 800px); overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.modal.wide { width: min(720px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 17px 19px 14px; }
.modal-head h2 { margin: 0; font-size: 14px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.modal-body { padding: 17px 19px 19px; }
.copy-fallback { min-height: 128px; resize: vertical; font-family: "Cascadia Code", Consolas, monospace; }
.modal-close { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.modal-close:hover { border-color: var(--line); color: var(--text); }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding: 12px 19px; }
.toast-stack { position: fixed; z-index: 40; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 9px; min-width: 220px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-raised); box-shadow: var(--shadow); color: var(--text); padding: 10px 13px; font-size: 11px; animation: toast-in 180ms ease-out; }
.toast::before { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); content: ""; }
.toast[data-type="error"]::before { background: var(--danger); }
.toast[data-type="info"]::before { background: var(--blue); }
@keyframes toast-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1180px) {
  .sidebar { width: 208px; }
  .main-column { margin-left: 208px; }
  .topbar { padding-right: 24px; padding-left: 24px; }
  .page-content { padding-right: 24px; padding-left: 24px; }
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-name { display: none; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.4fr) minmax(250px, .8fr); }
}

@media (max-width: 900px) {
  .sidebar { position: sticky; inset: auto; width: auto; height: auto; padding: 10px 14px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { display: none; }
  .demo-label { display: none; }
  .nav-list { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 9px; scrollbar-width: thin; }
  .nav-link { min-width: max-content; min-height: 37px; padding: 0 10px; font-size: 11px; }
  .nav-icon { width: 16px; height: 16px; flex-basis: 16px; }
  .nav-icon svg { width: 16px; height: 16px; }
  .sidebar-bottom { display: none; }
  .main-column { margin-left: 0; }
  .topbar { height: 60px; }
  .page-content { padding-top: 24px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .usage-summary { min-height: 250px; }
  .config-layout { grid-template-columns: minmax(0, 1fr); }
  .page-footer { padding-right: 24px; padding-left: 24px; }
}

@media (max-width: 620px) {
  body { font-size: 13px; }
  .topbar { padding: 0 14px; }
  .crumb { gap: 7px; font-size: 10px; }
  .top-actions { gap: 5px; }
  .env-pill { min-height: 24px; padding: 0 7px; font-size: 9px; }
  .quick-config { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; }
  .quick-config span:last-child { display: none; }
  .profile-button { padding-left: 2px; }
  .avatar { width: 31px; height: 31px; }
  .account-menu { top: 53px; right: 9px; }
  .page-content { padding: 21px 14px 35px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 18px; }
  .page-heading h1 { font-size: 20px; }
  .heading-actions { width: 100%; flex-wrap: wrap; }
  .heading-actions .btn { flex: 1 1 auto; }
  .kpi-grid { gap: 8px; }
  .kpi-card { min-height: 115px; padding: 12px; }
  .kpi-value { font-size: 21px; }
  .kpi-top { font-size: 10px; }
  .kpi-icon { width: 27px; height: 27px; }
  .panel-pad { padding: 14px; }
  .chart-wrap { height: 184px; margin-top: 12px; }
  .usage-summary { min-height: 236px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .filter-row { width: 100%; }
  .filter-row .field { flex: 1 1 120px; }
  .filter-row .btn { flex: 1 1 100%; }
  .model-toolbar { align-items: stretch; flex-direction: column; }
  .search-field { min-width: 0; }
  .segment { width: 100%; }
  .segment button { flex: 1; }
  .content-grid, .content-grid.three, .model-grid { grid-template-columns: minmax(0, 1fr); }
  .content-grid .span-two { grid-column: auto; }
  .referral-band { grid-template-columns: 1fr; padding: 16px; }
  .referral-code { width: 100%; justify-content: space-between; }
  .stats-strip { grid-template-columns: 1fr; }
  .stats-strip > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .stats-strip > div { padding: 12px 14px; }
  .stats-strip strong { margin-top: 2px; font-size: 18px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .page-footer { flex-direction: column; padding: 14px; }
  .table-foot { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.auth-mode .sidebar, .auth-mode .topbar, .auth-mode .page-footer { display: none; }
.auth-mode .main-column { margin-left: 0; }
.auth-mode .page-content { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 28px 18px; }
.auth-frame { width: min(460px, 100%); }
.auth-panel { display: grid; gap: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); padding: 25px; }
.auth-brand-logo { display: block; width: auto; max-width: min(240px, 100%); height: 84px; justify-self: center; border-radius: 10px; object-fit: contain; }
.auth-panel > .brand-mark { margin-bottom: 2px; }
.auth-panel h1 { margin: -4px 0 0; font-size: 22px; font-weight: 650; line-height: 1.3; }
.auth-panel > p { margin: -8px 0 2px; color: var(--muted); font-size: 12px; }
.auth-panel .form-field { margin-top: 1px; }
.auth-submit { width: 100%; margin-top: 2px; }
.auth-register-button { min-height: 32px; justify-self: center; margin-top: -6px; padding-inline: 18px; text-decoration: none; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.auth-actions > * { flex: 1 1 150px; }
.auth-footnote { color: var(--subtle); font-size: 10px; line-height: 1.6; }
.auth-footnote a { color: var(--mint); }
.form-status { min-height: 14px; margin: -9px 0 0 !important; color: var(--muted) !important; font-size: 10px !important; }
.auth-progress { display: flex; min-height: 40px; align-items: center; gap: 9px; border-top: 1px solid var(--line); color: var(--muted); padding-top: 12px; font-size: 11px; }
.auth-progress::before { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); content: ""; animation: auth-pulse 1s ease-in-out infinite alternate; }
@keyframes auth-pulse { to { opacity: .35; } }
.auth-callout { margin: 0; }
.form-error { min-height: 14px; margin: -5px 0 0; color: var(--danger); font-size: 10px; }
.check-field { display: flex; min-height: 32px; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.check-field input { width: 16px; height: 16px; accent-color: var(--mint-strong); }
.key-status.muted { color: var(--muted); }
.key-status.danger { color: var(--danger); }
.key-status.muted .status-dot { background: var(--subtle); }
.key-status.danger .status-dot { background: var(--danger); }
.page-loading { margin: 0 0 12px; color: var(--subtle); font-size: 10px; }
.page-error { margin-bottom: 12px; }

@media (max-width: 620px) {
  .auth-panel { padding: 19px; }
  .auth-panel h1 { font-size: 20px; }
}
