:root {
  color-scheme: dark;
  --bg: #07090f;
  --bg-raised: #0c1019;
  --surface: #101620;
  --surface-2: #151c28;
  --surface-3: #1a2230;
  --text: #f3f6fb;
  --text-2: #a6b0c2;
  --text-3: #6f7b90;
  --line: #242d3c;
  --line-strong: #354156;
  --cyan: #31c6d4;
  --cyan-soft: rgba(49, 198, 212, .12);
  --violet: #9b87f5;
  --violet-soft: rgba(155, 135, 245, .12);
  --magenta: #ef6bb0;
  --magenta-soft: rgba(239, 107, 176, .12);
  --amber: #f2b84b;
  --amber-soft: rgba(242, 184, 75, .12);
  --green: #4dd39a;
  --green-soft: rgba(77, 211, 154, .12);
  --red: #f26d7d;
  --red-soft: rgba(242, 109, 125, .12);
  --blue: #68a5ff;
  --shadow: 0 18px 48px rgba(0, 0, 0, .24);
  --header-bg: rgba(7, 9, 15, .88);
  --wallet-featured: #0d2025;
  --wallet-featured-text: #f3f9fa;
  --wallet-featured-muted: #a9bcc0;
  --wallet-featured-line: #2b464c;
  --radius: 8px;
  --max: 1280px;
  --font: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f9;
  --bg-raised: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #edf1f6;
  --text: #101722;
  --text-2: #536074;
  --text-3: #7c8798;
  --line: #dce2ea;
  --line-strong: #c5ced9;
  --cyan: #087f8c;
  --cyan-soft: rgba(8, 127, 140, .09);
  --violet: #6954c7;
  --violet-soft: rgba(105, 84, 199, .09);
  --magenta: #b63878;
  --magenta-soft: rgba(182, 56, 120, .09);
  --amber: #9b6700;
  --amber-soft: rgba(155, 103, 0, .09);
  --green: #147e59;
  --green-soft: rgba(20, 126, 89, .09);
  --red: #bd3547;
  --red-soft: rgba(189, 53, 71, .09);
  --blue: #286ccc;
  --shadow: 0 16px 40px rgba(27, 39, 54, .1);
  --header-bg: rgba(244, 246, 249, .9);
  --wallet-featured: #102127;
  --wallet-featured-text: #f5fbfc;
  --wallet-featured-muted: #afc1c5;
  --wallet-featured-line: #315058;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.55; letter-spacing: 0; }
body.dialog-open { overflow: hidden; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
code, pre { font-family: var(--mono); }
svg { width: 18px; height: 18px; stroke-width: 1.8; }
.hidden { display: none !important; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
::selection { background: var(--cyan); color: #071015; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border: 3px solid var(--bg); border-radius: 6px; }

.site-header { position: sticky; top: 0; z-index: 50; height: 68px; border-bottom: 1px solid var(--line); background: var(--header-bg); backdrop-filter: blur(16px); }
.header-inner { width: min(calc(100% - 40px), var(--max)); height: 100%; margin: 0 auto; display: flex; align-items: center; gap: 34px; }
.platform-brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; overflow: visible; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-word { color: var(--text); font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 16px; line-height: 1; font-weight: 760; white-space: nowrap; }
.global-nav { align-self: stretch; display: flex; align-items: center; gap: 4px; }
.global-nav a { position: relative; height: 100%; padding: 0 16px; display: grid; place-items: center; color: var(--text-2); font-weight: 600; transition: color .18s ease; }
.global-nav a:hover, .global-nav a.active { color: var(--text); }
.global-nav a.active::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px; background: var(--cyan); }
.global-nav a.demo-download-link { display: inline-flex !important; align-items: center; gap: 6px; color: var(--cyan); }
.global-nav a.demo-download-link svg { width: 15px; height: 15px; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.service-pill { height: 32px; padding: 0 11px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); font-size: 12px; }
.service-pill i, .status-indicator { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.account-control { position: relative; }
.header-account { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); font-weight: 650; transition: border-color .18s, transform .18s; }
.header-account:hover { border-color: var(--cyan); transform: translateY(-1px); }
.account-avatar { position: relative; width: 24px; height: 24px; flex: 0 0 24px; overflow: hidden; display: grid; place-items: center; border-radius: 50%; color: var(--cyan); background: var(--cyan-soft); font-size: 11px; font-weight: 750; }
.account-avatar img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.account-avatar.fallback { border: 1px solid var(--line); }
.account-avatar svg { width: 14px; height: 14px; }
.account-menu { position: absolute; z-index: 60; top: calc(100% + 10px); right: 0; width: 210px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.account-menu-profile { padding: 10px 11px 12px; border-bottom: 1px solid var(--line); }
.account-menu-profile span, .account-menu-profile strong { display: block; }
.account-menu-profile span { margin-bottom: 3px; color: var(--text-3); font-size: 9px; }
.account-menu-profile strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-menu > a, .account-menu > button { width: 100%; height: 38px; padding: 0 10px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 5px; color: var(--text-2); background: transparent; cursor: pointer; font-size: 11px; text-align: left; }
.account-menu > a { margin-top: 5px; }
.account-menu > a:hover, .account-menu > button:hover { color: var(--text); background: var(--surface-3); }
.account-menu > button:hover { color: var(--red); }
.account-menu svg { width: 15px; height: 15px; }
.icon-button { width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-1px); }
.menu-button { display: none; }

.page-view { min-height: calc(100vh - 68px); }
.public-shell, .console-shell { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 56px 0 80px; }
.eyebrow { margin: 0 0 12px; display: flex; align-items: center; gap: 9px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.eyebrow > span { width: 20px; height: 1px; background: currentColor; }
.page-intro { min-height: 170px; padding: 16px 0 38px; display: flex; justify-content: space-between; align-items: end; gap: 32px; border-bottom: 1px solid var(--line); }
.page-intro h1 { margin: 0 0 12px; font-size: clamp(34px, 4vw, 52px); line-height: 1.08; font-weight: 760; }
.page-intro p:not(.eyebrow) { max-width: 660px; margin: 0; color: var(--text-2); font-size: 16px; }
.intro-stat { min-width: 150px; display: flex; align-items: baseline; justify-content: flex-end; gap: 9px; }
.intro-stat strong { color: var(--cyan); font-size: 44px; line-height: 1; }
.intro-stat span { color: var(--text-3); }

/* Login */
.login-view { position: relative; overflow: hidden; background: var(--bg); }
.login-grid { position: absolute; inset: 0; opacity: .28; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(to bottom, black, transparent 92%); }
.signal-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.signal-field i { position: absolute; left: -15%; width: 50%; height: 1px; background: var(--cyan); opacity: .42; animation: signal-pass 8s linear infinite; }
.signal-field i:nth-child(1) { top: 18%; }
.signal-field i:nth-child(2) { top: 42%; background: var(--magenta); animation-delay: -3s; animation-duration: 11s; }
.signal-field i:nth-child(3) { top: 68%; background: var(--amber); animation-delay: -6s; animation-duration: 13s; }
.signal-field i:nth-child(4) { top: 84%; background: var(--violet); animation-delay: -2s; animation-duration: 9s; }
@keyframes signal-pass { from { transform: translateX(-10vw); } to { transform: translateX(145vw); } }
.login-stage { position: relative; z-index: 1; width: min(calc(100% - 40px), 1160px); min-height: calc(100vh - 68px); margin: 0 auto; padding: 64px 0 70px; display: grid; grid-template-columns: minmax(0, 1fr) 390px; align-items: center; gap: 100px; }
.login-copy h1 { max-width: 680px; margin: 0 0 22px; font-size: clamp(48px, 6vw, 78px); line-height: 1.05; font-weight: 760; }
.login-copy h1 em { color: var(--text); font-style: normal; text-decoration-line: underline; text-decoration-color: var(--magenta); text-decoration-thickness: 3px; text-underline-offset: 10px; }
.login-lead { max-width: 610px; margin: 0 0 36px; color: var(--text-2); font-size: 17px; line-height: 1.8; }
.endpoint-stream { max-width: 620px; border-top: 1px solid var(--line); }
.endpoint-stream > div { min-height: 66px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.endpoint-icon, .metric-icon, .action-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; }
.endpoint-icon.cyan, .metric-icon.cyan, .action-icon.cyan { color: var(--cyan); background: var(--cyan-soft); }
.endpoint-icon.magenta, .metric-icon.magenta { color: var(--magenta); background: var(--magenta-soft); }
.endpoint-icon.amber, .metric-icon.amber, .action-icon.amber { color: var(--amber); background: var(--amber-soft); }
.action-icon.violet { color: var(--violet); background: var(--violet-soft); }
.endpoint-stream > div > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.endpoint-stream strong { font-size: 14px; }
.endpoint-stream code { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.endpoint-stream b { color: var(--text-3); font-family: var(--mono); font-size: 10px; }
.login-facts { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px 24px; color: var(--text-3); font-size: 12px; }
.login-facts strong { color: var(--text-2); }
.scan-access { position: relative; padding: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.scan-access::before { content: ""; position: absolute; top: -1px; left: 26px; width: 88px; height: 2px; background: var(--cyan); }
.scan-heading { margin-bottom: 24px; display: flex; gap: 13px; align-items: center; }
.scan-symbol { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--cyan); background: var(--cyan-soft); }
.scan-heading p { margin: 0 0 2px; color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.scan-heading h2 { margin: 0; font-size: 20px; }
.scan-heading div > span { color: var(--text-3); font-size: 12px; }
.qr-stage { position: relative; width: 246px; height: 246px; margin: 0 auto 20px; padding: 15px; }
.qr-frame { width: 216px; height: 216px; display: grid; place-items: center; padding: 9px; overflow: hidden; border-radius: 5px; background: #fff; }
.qr-frame img { width: 100%; height: 100%; object-fit: contain; }
.qr-placeholder { color: #5d6676; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.qr-placeholder svg { width: 34px; height: 34px; }
.qr-corner { position: absolute; width: 24px; height: 24px; border-color: var(--cyan); border-style: solid; }
.qr-corner.tl { left: 0; top: 0; border-width: 2px 0 0 2px; }
.qr-corner.tr { right: 0; top: 0; border-width: 2px 2px 0 0; }
.qr-corner.bl { left: 0; bottom: 0; border-width: 0 0 2px 2px; }
.qr-corner.br { right: 0; bottom: 0; border-width: 0 2px 2px 0; }
.qr-stage > .scan-line { position: absolute; z-index: 2; left: 16px; right: 16px; top: 18px; height: 2px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); opacity: .7; animation: qr-scan 3s ease-in-out infinite; }
@keyframes qr-scan { 0%,100% { transform: translateY(0); opacity: .2; } 50% { transform: translateY(206px); opacity: .8; } }
.qr-status { min-height: 38px; padding: 0 12px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--text-2); background: var(--surface-2); font-size: 12px; text-align: center; }
.qr-status.is-error .status-indicator { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.qr-status.is-success .status-indicator { background: var(--green); }
.qr-status.is-loading .status-indicator, .qr-status.is-waiting .status-indicator { animation: pulse 1.6s ease infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.75); } }
.trust-row { margin-top: 16px; display: flex; justify-content: center; gap: 16px; color: var(--text-3); font-size: 11px; }
.trust-row span { display: inline-flex; align-items: center; gap: 5px; }
.trust-row svg { width: 14px; height: 14px; }
.login-consent { margin: 14px 0 0; color: var(--text-3); font-size: 10px; text-align: center; }
.login-consent button { padding: 0 2px; border: 0; color: var(--cyan); background: transparent; cursor: pointer; font-size: inherit; }
.login-consent button:hover { text-decoration: underline; text-underline-offset: 2px; }
.login-method-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0 0 18px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.login-method-tabs button { min-height: 36px; padding: 0 10px; border: 0; border-radius: 7px; color: var(--text-2); background: transparent; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.login-method-tabs button.active { color: var(--text-1); background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.password-login-panel { display: grid; gap: 9px; padding: 14px 4px 24px; }
.password-login-panel label { color: var(--text-2); font-size: 12px; font-weight: 700; }
.password-login-panel input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-1); background: var(--surface-2); font: inherit; box-sizing: border-box; }
.password-login-panel input:focus { outline: 2px solid color-mix(in srgb, var(--cyan) 35%, transparent); outline-offset: 1px; border-color: var(--cyan); }
.password-login-panel .primary-button { margin-top: 8px; }

/* Common controls */
.primary-button, .secondary-button, .danger-button, .text-button { min-height: 38px; border-radius: 6px; cursor: pointer; font-weight: 650; transition: transform .18s, border-color .18s, background .18s, opacity .18s; }
.primary-button, .secondary-button, .danger-button { padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; }
.primary-button { color: #061014; background: var(--cyan); }
.primary-button:hover, .secondary-button:hover, .danger-button:hover { transform: translateY(-1px); }
.secondary-button { border-color: var(--line-strong); background: var(--surface); color: var(--text); }
.secondary-button:hover { border-color: var(--cyan); }
.danger-button { color: #fff; background: var(--red); }
.text-button { min-height: 30px; padding: 0; border: 0; color: var(--cyan); background: transparent; }
.text-button.danger { color: var(--red); }
button:disabled { cursor: not-allowed; opacity: .55; transform: none !important; }
.full-width { width: 100%; margin-top: 10px; }
.spinner { width: 16px; height: 16px; display: inline-block; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.section-heading { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.section-heading h2 { margin: 0 0 5px; font-size: 28px; }
.section-heading p:not(.eyebrow) { margin: 0; color: var(--text-2); }

/* Catalog */
.catalog-toolbar { position: sticky; top: 82px; z-index: 20; margin: 28px 0 18px; padding: 12px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--header-bg); box-shadow: 0 5px 16px rgba(20, 31, 50, .05); backdrop-filter: blur(14px); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.catalog-toolbar:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 16px 38px rgba(24, 38, 62, .14); }
.search-field, .provider-select { height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text-3); }
.search-field:focus-within, .provider-select:focus-within { border-color: var(--cyan); }
.search-field input, .provider-select select { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.search-field input::placeholder { color: var(--text-3); }
.search-field kbd { padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--text-3); background: var(--surface-2); font-family: var(--mono); }
.provider-select { position: relative; }
.provider-select select { appearance: none; cursor: pointer; }
.provider-select select option { color: var(--text); background: var(--surface); }
html[data-theme="dark"] .provider-select select { color-scheme: dark; color: var(--text); }
html[data-theme="dark"] .provider-select select option { color: #f3f6fb; background: #101620; }
html[data-theme="dark"] .provider-select select option:checked { color: #ffffff; background: #273246; }
.provider-select > svg:last-child { width: 14px; }
.category-tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab { height: 40px; padding: 0 11px; display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; border: 1px solid transparent; border-radius: 5px; color: var(--text-2); background: transparent; cursor: pointer; transition: transform .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease; }
.category-tab:hover { color: var(--text); background: var(--surface-2); box-shadow: 0 7px 18px rgba(24, 38, 62, .11); transform: translateY(-1px); }
.category-tab.active { color: var(--cyan); border-color: rgba(49,198,212,.24); background: var(--cyan-soft); }
.category-tab svg { width: 15px; height: 15px; }
.category-tab b { min-width: 18px; padding: 1px 5px; border-radius: 999px; background: var(--surface-3); font-size: 10px; font-weight: 700; text-align: center; }
.provider-select { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.provider-select:hover { transform: translateY(-1px); border-color: var(--line-strong); box-shadow: 0 7px 18px rgba(24, 38, 62, .11); }
html[data-theme="dark"] .catalog-toolbar { box-shadow: 0 7px 22px rgba(0, 0, 0, .16); }
html[data-theme="dark"] .catalog-toolbar:hover { box-shadow: 0 18px 44px rgba(0, 0, 0, .32); }
.catalog-result-line { min-height: 30px; display: flex; align-items: center; justify-content: space-between; color: var(--text-3); font-size: 12px; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.model-card { position: relative; min-height: 292px; padding: 20px; display: flex; flex-direction: column; align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,.025); text-align: left; cursor: pointer; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.model-card::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--accent, var(--cyan)); }
.model-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent, var(--cyan)) 45%, var(--line)); box-shadow: 0 16px 34px rgba(0,0,0,.18); }
.model-quality-picker { position: relative; z-index: 2; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.model-quality-option { min-width: 58px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-3); background: color-mix(in srgb, var(--surface) 88%, transparent); font: 800 13px var(--mono); text-align: center; cursor: pointer; transition: border-color .18s ease, color .18s ease, background .18s ease; }
.model-quality-option:hover { border-color: color-mix(in srgb, var(--accent, var(--cyan)) 55%, var(--line)); color: var(--text); }
.model-quality-option.is-active { border-color: var(--accent, var(--cyan)); color: var(--text); background: color-mix(in srgb, var(--accent, var(--cyan)) 12%, transparent); }
.model-quality-option.is-disabled { opacity: .48; text-decoration: line-through; }
.model-quality-picker.is-compact { position: relative; z-index: 2; margin-top: 14px; gap: 9px; }
.model-card-kicker { min-height: 20px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--accent, var(--cyan)); font: 700 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.model-availability { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-family: var(--font); font-weight: 600; letter-spacing: 0; }
.model-availability i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.model-card-top { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 13px; align-items: center; }
.model-logo, .detail-logo { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--accent, var(--cyan)) 18%, var(--line)); border-radius: 7px; color: var(--accent, var(--cyan)); background: color-mix(in srgb, var(--accent, var(--cyan)) 10%, var(--surface)); }
.model-heading { min-width: 0; display: flex; flex-direction: column; }
.model-heading strong { overflow: hidden; color: var(--text); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.model-heading span { overflow: hidden; margin-top: 2px; color: var(--text-3); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.featured-mark { min-height: 24px; padding: 3px 7px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid color-mix(in srgb, var(--amber) 24%, var(--line)); border-radius: 4px; color: var(--amber); background: var(--amber-soft); font-size: 9px; font-weight: 750; }
.featured-mark svg { width: 12px; height: 12px; }
.model-description { min-height: 42px; margin-top: 15px; overflow: hidden; color: var(--text-2); font-size: 11px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.model-price { margin-top: 15px; padding: 12px 0 13px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 3px 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.model-price small { grid-column: 1 / -1; color: var(--text-3); font-size: 8px; font-weight: 650; text-transform: uppercase; }
.model-price strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.model-price > span { color: var(--text-3); font-size: 9px; white-space: nowrap; }
.model-card-footer { margin-top: auto; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.model-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.model-tag, .detail-tags span { padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--text-3); background: var(--surface-2); font-size: 9px; }
.card-detail { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; color: var(--text-2); font-size: 9px; font-weight: 650; }
.card-detail svg { width: 14px; height: 14px; color: var(--accent, var(--cyan)); transition: transform .18s ease; }
.model-card:hover .card-detail svg { transform: translate(2px, -2px); }
.accent-cyan { --accent: var(--cyan); } .accent-blue, .accent-azure { --accent: var(--blue); } .accent-violet, .accent-indigo { --accent: var(--violet); } .accent-magenta, .accent-rose { --accent: var(--magenta); } .accent-coral, .accent-orange { --accent: #ef8063; } .accent-amber { --accent: var(--amber); } .accent-mint { --accent: var(--green); }

/* Premium luminous catalog cards */
#modelsView { width: min(calc(90% - 58px), 1440px); }
.catalog-grid { gap: 20px; }
.model-card {
  min-height: 390px;
  padding: 26px 28px 24px;
  isolation: isolate;
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--surface)) 0%, var(--surface) 56%, color-mix(in srgb, var(--accent) 10%, var(--surface)) 100%);
  box-shadow: 0 16px 50px rgba(12, 20, 38, .1), inset 0 1px 0 rgba(255, 255, 255, .72);
}
.model-card::before { display: none; }
.model-card::after { content: ""; position: absolute; z-index: -1; inset: 7px; border: 1px solid rgba(255, 255, 255, .32); border-radius: 6px; pointer-events: none; }
.model-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: 0 24px 64px rgba(25, 35, 58, .16), 0 0 32px color-mix(in srgb, var(--accent) 12%, transparent), inset 0 1px 0 rgba(255, 255, 255, .85); }
.model-card:active { transform: translateY(-1px) scale(.995); }
.model-card-art { position: absolute; z-index: -1; top: 62px; right: -22px; width: 48%; height: 62%; display: grid; place-items: center; overflow: hidden; border: 0; background: transparent; pointer-events: none; }
.model-art-mark { width: 82%; height: 82%; display: grid; place-items: center; color: var(--accent); opacity: .065; transform: rotate(-7deg) scale(1.08); filter: saturate(.8); }
.model-art-mark img { width: 100%; height: 100%; object-fit: contain; }
.model-art-mark svg { width: 78%; height: 78%; stroke-width: 1.1; }
.model-card-kicker { position: relative; z-index: 1; min-height: 34px; margin-bottom: 25px; justify-content: space-between; padding: 0; }
.model-type-chip { min-height: 32px; padding: 5px 11px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line)); border-radius: 6px; color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, .74)); font-family: var(--font); font-size: 11px; font-weight: 760; letter-spacing: 0; text-transform: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .68); }
.model-type-chip b { padding-left: 8px; border-left: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); font: 800 9px var(--mono); }
.model-availability { min-height: 30px; margin-left: auto; padding: 0 9px; border: 1px solid rgba(20, 126, 89, .12); border-radius: 999px; color: var(--green); background: rgba(77, 211, 154, .06); font-size: 11px; }
.model-availability i { width: 7px; height: 7px; box-shadow: 0 0 0 4px var(--green-soft), 0 0 12px rgba(77, 211, 154, .45); }
.model-availability.is-unavailable, .is-unavailable .model-availability { border-color: var(--line); color: var(--text-3); background: color-mix(in srgb, var(--surface-2) 80%, transparent); }
.model-availability.is-unavailable i, .is-unavailable .model-availability i { background: var(--text-3); box-shadow: 0 0 0 3px var(--surface-3); }
.model-card-top { position: relative; z-index: 1; width: 92%; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 18px; }
.model-logo { width: 72px; height: 72px; border-color: color-mix(in srgb, var(--accent) 24%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--accent) 7%, rgba(255, 255, 255, .88)); box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 12%, transparent), inset 0 1px 0 rgba(255, 255, 255, .82); }
.model-logo img, .detail-logo img { width: 82%; height: 82%; object-fit: contain; }
.model-logo svg { width: 31px; height: 31px; }
.model-heading strong { color: var(--text); font-size: 22px; line-height: 1.2; font-weight: 760; white-space: nowrap; }
.model-heading span { margin-top: 5px; color: var(--text-3); font-size: 13px; }
.featured-mark { position: absolute; left: calc(100% + 16px); top: 19px; min-height: 30px; padding: 4px 9px; border-radius: 5px; background: color-mix(in srgb, var(--amber) 10%, rgba(255, 255, 255, .78)); font-size: 10px; white-space: nowrap; }
.model-description { position: relative; z-index: 1; width: 100%; min-height: 52px; margin-top: 25px; color: var(--text-2); font-size: 14px; line-height: 1.75; -webkit-line-clamp: 2; }
.model-price { position: relative; z-index: 1; min-height: 94px; margin-top: 18px; padding: 17px 0 16px; display: flex; flex-direction: column; align-items: stretch; gap: 11px; border-color: color-mix(in srgb, var(--accent) 12%, var(--line)); }
.model-price-label { color: var(--text-3); font-size: 10px; font-weight: 720; }
.model-price-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.model-price-pair > span { min-width: 0; padding-right: 18px; display: grid; grid-template-columns: auto minmax(0, auto); align-items: baseline; justify-content: start; gap: 2px 8px; }
.model-price-pair > span + span { padding-left: 24px; border-left: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line)); }
.model-price-pair small { grid-column: auto; color: var(--text-2); font-size: 12px; font-weight: 700; }
.model-price-pair strong { overflow: visible; color: var(--accent); font-size: 27px; line-height: 1; font-weight: 780; font-variant-numeric: tabular-nums; white-space: nowrap; }
.model-price-pair em { grid-column: 1 / -1; color: var(--text-3); font-size: 10px; font-style: normal; white-space: nowrap; }
.model-price-empty { min-height: 37px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.model-price-empty strong { color: var(--accent); font-size: 23px; font-weight: 760; }
.model-price-empty small { grid-column: auto; color: var(--text-3); font-size: 10px; }
.model-card-footer { position: relative; z-index: 1; padding-top: 16px; }
.model-tags { gap: 7px; }
.model-tag { min-height: 30px; padding: 5px 9px; display: inline-flex; align-items: center; gap: 6px; border-color: color-mix(in srgb, var(--accent) 14%, var(--line)); border-radius: 5px; color: var(--text-2); background: color-mix(in srgb, var(--accent) 4%, var(--surface-2)); font-size: 10px; }
.model-tag svg { width: 13px; height: 13px; color: var(--accent); }
.card-detail { gap: 10px; color: var(--accent); font-size: 11px; }
.card-detail-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); border-radius: 50%; background: color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, .7)); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 10%, transparent); }
.card-detail-icon svg { width: 17px; height: 17px; }
.model-card.is-unavailable { opacity: .68; box-shadow: none; }
html[data-theme="dark"] .model-card { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--surface)) 0%, var(--surface) 58%, color-mix(in srgb, var(--accent) 12%, var(--surface)) 100%); box-shadow: 0 18px 52px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .035); }
html[data-theme="dark"] .model-card::after { border-color: rgba(255, 255, 255, .035); }
html[data-theme="dark"] .model-type-chip, html[data-theme="dark"] .model-logo, html[data-theme="dark"] .featured-mark, html[data-theme="dark"] .card-detail-icon { background: color-mix(in srgb, var(--accent) 9%, var(--surface-2)); box-shadow: none; }
html[data-theme="dark"] .model-card:hover { box-shadow: 0 24px 64px rgba(0, 0, 0, .3), 0 0 34px color-mix(in srgb, var(--accent) 9%, transparent); }

/* Docs and pricing */
.protocol-badge { padding: 9px 13px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(77,211,154,.25); border-radius: 5px; color: var(--green); background: var(--green-soft); }
.docs-shell { width: min(calc(100% - 40px), 1440px); }
.docs-intro { min-height: 250px; align-items: center; }
.docs-intro-copy { max-width: 820px; }
.docs-intro-copy > p:last-of-type { max-width: 780px; }
.docs-intro-actions { min-width: 230px; display: flex; flex-direction: column; align-items: stretch; gap: 9px; }
.docs-intro-actions .primary-button, .docs-intro-actions .secondary-button { justify-content: center; }
.docs-intro-actions small { color: var(--text-3); font-size: 10px; text-align: center; }
.docs-copy-markdown { min-height: 44px; }
.docs-copy-markdown:disabled { cursor: wait; opacity: .65; }
.docs-meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.docs-meta > span { min-height: 30px; padding: 5px 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--text-3); background: var(--surface-2); font-size: 9px; }
.docs-meta svg { width: 13px; height: 13px; color: var(--cyan); }
.docs-meta code { color: var(--text-2); }
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1040px); gap: 64px; padding-top: 42px; align-items: start; }
.docs-index { position: sticky; top: 100px; height: max-content; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.docs-index > span { padding: 16px 16px 6px; color: var(--text); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.docs-index > span:first-child { padding-top: 2px; }
.docs-index a { padding: 7px 16px; color: var(--text-3); font-size: 11px; }
.docs-index a:hover { color: var(--cyan); }
.docs-content { min-width: 0; counter-reset: docs-section; }
.docs-content > section { counter-increment: docs-section; }
.docs-content section { padding: 12px 0 54px; scroll-margin-top: 90px; border-bottom: 1px solid var(--line); }
.docs-content section + section { padding-top: 48px; }
.docs-content h2 { margin: 0 0 14px; font-size: 27px; }
.docs-content p { color: var(--text-2); font-size: 14px; line-height: 1.8; }
.docs-content code { font-family: var(--mono); }
.docs-lead { max-width: 900px; color: var(--text) !important; font-size: 16px !important; }
.section-number { margin: 0 0 8px !important; color: var(--cyan) !important; font-family: var(--mono); font-size: 0 !important; font-weight: 800; }
.section-number::before { content: counter(docs-section, decimal-leading-zero); font-size: 11px; }
.code-block { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #080b11; }
html[data-theme="light"] .code-block { background: #111827; }
.code-toolbar { height: 42px; padding: 0 12px 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #273143; color: #a8b3c6; font-size: 11px; }
.code-toolbar .icon-button { width: 30px; height: 30px; border-color: #273143; color: #cbd5e1; background: #111722; }
.code-block pre { margin: 0; padding: 20px; overflow-x: auto; color: #d9e3f0; font-size: 12px; line-height: 1.8; }
.notice { padding: 16px; display: flex; gap: 12px; border-left: 2px solid var(--amber); background: var(--amber-soft); color: var(--amber); }
.notice span { display: flex; flex-direction: column; }
.notice small { color: var(--text-2); }
.notice.info { margin-top: 18px; border-left-color: var(--cyan); color: var(--cyan); background: var(--cyan-soft); }
.endpoint-table { border-top: 1px solid var(--line); }
.endpoint-table > div { min-height: 58px; display: grid; grid-template-columns: 52px minmax(220px, 1fr) 1fr; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.endpoint-table b { color: var(--cyan); font-family: var(--mono); font-size: 10px; }
.endpoint-table code { color: var(--text); }
.endpoint-table span { color: var(--text-3); }
.error-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.error-grid span { padding: 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-2); background: var(--surface); }
.error-grid b { margin-right: 10px; color: var(--red); font-family: var(--mono); }
.docs-summary { margin: 24px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.docs-summary > span { min-width: 0; padding: 16px; border-right: 1px solid var(--line); }
.docs-summary > span:last-child { border-right: 0; }
.docs-summary b, .docs-summary code { display: block; }
.docs-summary b { margin-bottom: 7px; color: var(--text-3); font-size: 9px; text-transform: uppercase; }
.docs-summary code { overflow: hidden; color: var(--text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.docs-steps { margin: 0 0 24px; padding: 0; list-style: none; counter-reset: docs-step; border-top: 1px solid var(--line); }
.docs-steps li { min-height: 64px; padding: 12px 0; display: grid; grid-template-columns: 36px 165px minmax(0, 1fr); align-items: center; gap: 12px; counter-increment: docs-step; border-bottom: 1px solid var(--line); }
.docs-steps li::before { content: counter(docs-step, decimal-leading-zero); color: var(--cyan); font: 800 10px var(--mono); }
.docs-steps b { font-size: 12px; }
.docs-steps span { color: var(--text-3); font-size: 11px; }
.endpoint-signature { min-height: 56px; margin: 20px 0; padding: 0 14px; display: grid; grid-template-columns: 58px minmax(200px, .7fr) 1fr; align-items: center; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.endpoint-signature b { color: var(--cyan); font: 800 10px var(--mono); }
.endpoint-signature code { color: var(--text); }
.endpoint-signature span { color: var(--text-3); font-size: 11px; }
.code-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.code-grid .code-block { min-width: 0; }
.docs-table-wrap { margin: 20px 0; overflow-x: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.docs-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.docs-table th, .docs-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table th { color: var(--text-3); background: var(--surface-2); font-size: 9px; font-weight: 750; text-transform: uppercase; white-space: nowrap; }
.docs-table td { color: var(--text-2); line-height: 1.65; }
.docs-table td:first-child code { color: var(--cyan); }
.docs-table td > b { color: var(--text); font-size: 10px; }
.docs-footnote { margin: 16px 0 0; padding-left: 13px; border-left: 2px solid var(--line-strong); color: var(--text-3) !important; font-size: 11px !important; }
.docs-flow { margin: 22px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.docs-flow > span:not([data-lucide]) { min-height: 74px; padding: 14px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.docs-flow b, .docs-flow code { display: block; }
.docs-flow b { margin-bottom: 8px; font-size: 11px; }
.docs-flow code { color: var(--cyan); font-size: 9px; }
.docs-flow > svg { width: 15px; color: var(--text-3); }
.docs-checklist { margin: 20px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.docs-checklist li { position: relative; min-height: 48px; padding: 13px 12px 13px 34px; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 11px; line-height: 1.7; }
.docs-checklist li::before { content: ""; position: absolute; left: 9px; top: 19px; width: 7px; height: 7px; border: 2px solid var(--green); border-radius: 50%; }
.docs-checklist.production { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.docs-checklist.production li:nth-child(odd) { border-right: 1px solid var(--line); }
.docs-limit-line, .docs-retry { margin: 20px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.docs-limit-line span, .docs-retry span { min-height: 70px; padding: 13px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); color: var(--text-3); font-size: 10px; }
.docs-limit-line span:last-child, .docs-retry span:last-child { border-right: 0; }
.docs-limit-line b, .docs-retry b { margin-bottom: 6px; color: var(--text); font-size: 10px; }
.docs-retry code { color: var(--cyan); font-size: 9px; white-space: normal; }
.docs-billing-flow { margin: 22px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.docs-billing-flow > span { min-height: 112px; padding: 16px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.docs-billing-flow > span:last-child { border-right: 0; }
.docs-billing-flow b { color: var(--text); }
.docs-billing-flow small { margin: 10px 0 auto; color: var(--text-3); line-height: 1.55; }
.docs-billing-flow code { margin-top: 12px; color: var(--cyan); font-size: 9px; white-space: normal; }
.docs-ai-handoff { min-height: 104px; margin-top: 22px; padding: 18px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 16px; border: 1px solid var(--line); border-left: 2px solid var(--cyan); background: var(--surface-2); }
.docs-ai-handoff > svg { width: 30px; height: 30px; color: var(--cyan); }
.docs-ai-handoff strong { font-size: 12px; }
.docs-ai-handoff p { margin: 6px 0 0; color: var(--text-3); font-size: 11px; line-height: 1.65; }
.pricing-metrics { margin-top: 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pricing-metrics article { min-height: 190px; padding: 24px; display: flex; gap: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pricing-metrics p { margin: 0 0 22px; color: var(--text-3); font-family: var(--mono); font-size: 10px; }
.pricing-metrics h2 { margin: 0 0 8px; font-size: 20px; }
.pricing-metrics div > span { color: var(--text-2); font-size: 12px; }
.pricing-section { padding-top: 64px; }

/* Console */
.console-shell { width: min(calc(100% - 40px), 1492px); padding-top: 40px; display: grid; grid-template-columns: 184px minmax(0, 1280px); gap: 28px; align-items: start; }
.console-workspace { min-width: 0; }
.workspace-tabs { position: sticky; top: 96px; margin: 22px 0 0; display: flex; flex-direction: column; gap: 4px; }
.workspace-tabs::-webkit-scrollbar { display: none; }
.workspace-tabs button, .workspace-tabs > a { position: relative; width: 100%; min-width: 0; height: 44px; padding: 0 14px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; border: 0; border-radius: 5px; color: var(--text-2); background: transparent; cursor: pointer; font-size: 12px; font-weight: 650; text-align: left; }
.workspace-tabs button:hover, .workspace-tabs button.active, .workspace-tabs > a:hover { color: var(--text); background: var(--surface); }
.workspace-tabs button.active { color: var(--cyan); background: var(--cyan-soft); }
.workspace-tabs button.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--cyan); }
.workspace-tabs svg { width: 16px; height: 16px; }
.console-panel { margin-top: 30px; animation: panel-in .25s ease both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.balance-metric { min-height: 142px; padding: 20px; display: flex; align-items: flex-start; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.balance-metric .metric-icon { color: var(--cyan); background: var(--cyan-soft); }
.balance-metric.image .metric-icon { color: var(--magenta); background: var(--magenta-soft); }
.balance-metric.video .metric-icon { color: var(--amber); background: var(--amber-soft); }
.balance-metric.key .metric-icon { color: var(--violet); background: var(--violet-soft); }
.balance-metric p { margin: 0 0 10px; color: var(--text-3); font-size: 11px; }
.balance-metric strong { display: block; margin-bottom: 5px; font-size: 25px; line-height: 1.1; }
.balance-metric small { color: var(--text-3); font-size: 10px; }
.dashboard-grid { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); gap: 12px; }
.data-panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-heading { min-height: 42px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.panel-heading p { margin: 0 0 4px; color: var(--text-3); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.panel-heading h2 { margin: 0; font-size: 17px; }
.panel-heading > a, .panel-heading .text-button { color: var(--cyan); font-size: 12px; }
.panel-value { color: var(--text-2); font-size: 12px; }
.chart-wrap { position: relative; height: 230px; }
.chart-wrap.large { height: 300px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); font-size: 12px; text-align: center; }
.health-kpis { display: grid; gap: 0; }
.health-kpis > div { min-height: 58px; display: grid; grid-template-columns: 1fr auto 8px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.health-kpis > div:last-child { border: 0; }
.health-kpis span { color: var(--text-3); }
.health-kpis strong { font-size: 16px; }
.health-kpis i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.health-kpis i.good { background: var(--green); }
.health-kpis i.violet { background: var(--violet); }
.model-ranking { min-height: 120px; display: flex; flex-direction: column; gap: 14px; }
.ranking-item { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(90px, 1.2fr) 52px; align-items: center; gap: 12px; }
.ranking-name { min-width: 0; display: flex; flex-direction: column; }
.ranking-name strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-name span { color: var(--text-3); font-size: 9px; }
.ranking-track { width: 100%; height: 5px; overflow: hidden; appearance: none; border: 0; border-radius: 4px; background: var(--surface-3); color: var(--cyan); }
.ranking-track::-webkit-progress-bar { border-radius: 4px; background: var(--surface-3); }
.ranking-track::-webkit-progress-value { border-radius: 4px; background: currentColor; }
.ranking-track::-moz-progress-bar { border-radius: 4px; background: currentColor; }
.ranking-item:nth-child(2) .ranking-track { color: var(--violet); }
.ranking-item:nth-child(3) .ranking-track { color: var(--magenta); }
.ranking-item:nth-child(4) .ranking-track { color: var(--amber); }
.ranking-value { color: var(--text-3); font-size: 10px; text-align: right; }
.activity-list { display: flex; flex-direction: column; }
.activity-item { min-height: 54px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border: 0; }
.activity-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; color: var(--green); background: var(--green-soft); }
.activity-icon svg { width: 15px; }
.activity-copy { min-width: 0; display: flex; flex-direction: column; }
.activity-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy span { color: var(--text-3); font-size: 9px; }
.activity-value { font-family: var(--mono); font-size: 11px; }
.activity-value.negative { color: var(--red); }
.activity-value.positive { color: var(--green); }
.quick-actions { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-actions > a, .quick-actions > button { min-height: 76px; padding: 14px; display: grid; grid-template-columns: 36px 1fr 18px; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); background: var(--surface); text-align: left; cursor: pointer; transition: border-color .18s, transform .18s; }
.quick-actions > a:hover, .quick-actions > button:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.quick-actions > * > span:nth-child(2) { display: flex; flex-direction: column; }
.quick-actions strong { font-size: 12px; }
.quick-actions small { color: var(--text-3); font-size: 9px; }
.quick-actions > * > svg { color: var(--text-3); }

.analytics-summary { margin-bottom: 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.analytics-summary article { min-height: 90px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.analytics-summary span { display: block; margin-bottom: 11px; color: var(--text-3); font-size: 10px; }
.analytics-summary strong { font-size: 21px; }
.analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.analytics-detail { margin-top: 12px; display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); align-items: stretch; gap: 12px; }
.analytics-side { min-width: 0; display: grid; align-content: start; gap: 12px; }
.daily-data-panel { min-height: 100%; }
.analytics-detail .table-wrap.compact { max-height: 520px; overflow: auto; }
.analytics-detail .table-wrap.compact thead { position: sticky; z-index: 1; top: 0; }
.period-usage-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.period-usage-list > div { min-width: 0; min-height: 66px; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.period-usage-list > div:nth-last-child(-n + 2) { border-bottom: 0; }
.period-usage-list > div > span:last-child { min-width: 0; }
.period-usage-list small, .period-usage-list strong { display: block; }
.period-usage-list small { margin-bottom: 3px; color: var(--text-3); font-size: 9px; }
.period-usage-list strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.period-usage-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 5px; color: var(--cyan); background: var(--cyan-soft); }
.period-usage-icon.image { color: var(--magenta); background: var(--magenta-soft); }
.period-usage-icon.video { color: var(--amber); background: var(--amber-soft); }
.period-usage-icon.average { color: var(--violet); background: var(--violet-soft); }
.period-usage-icon svg { width: 15px; height: 15px; }
.overview-analytics-heading { margin-top: 48px; }
.range-switch { padding: 3px; display: inline-flex; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.range-switch button { height: 30px; padding: 0 12px; border: 0; border-radius: 4px; color: var(--text-3); background: transparent; cursor: pointer; }
.range-switch button.active { color: var(--text); background: var(--surface-3); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--text-3); font-size: 9px; }
.chart-legend span::before { content: ""; width: 7px; height: 7px; margin-right: 5px; display: inline-block; border-radius: 2px; background: var(--cyan); }
.chart-legend .image::before { background: var(--magenta); }.chart-legend .video::before { background: var(--amber); }.chart-legend .request::before { background: var(--violet); }.chart-legend .success::before { background: var(--green); border-radius: 50%; }

/* User call logs */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.log-toolbar { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.log-modality-tabs { padding: 3px; display: inline-flex; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.log-modality-tabs button { height: 34px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 4px; color: var(--text-3); background: transparent; cursor: pointer; font-size: 11px; }
.log-modality-tabs button:hover, .log-modality-tabs button.active { color: var(--text); background: var(--surface-3); }
.log-modality-tabs button.active { color: var(--cyan); }
.log-modality-tabs svg { width: 14px; }
.log-search { display: flex; align-items: center; gap: 7px; }
.log-search select, .log-search input { height: 40px; border: 1px solid var(--line); border-radius: 5px; outline: 0; color: var(--text); background: var(--surface); font: inherit; }
.log-search select { width: 118px; padding: 0 28px 0 10px; }
.log-keyword { position: relative; display: block; }
.log-keyword svg { position: absolute; left: 11px; top: 12px; width: 15px; color: var(--text-3); pointer-events: none; }
.log-keyword input { width: 270px; padding: 0 10px 0 34px; }
.log-search select:focus, .log-search input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.call-log-list { min-height: 240px; display: flex; flex-direction: column; gap: 9px; }
.call-log-list > .empty-state { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.call-log-item { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.call-log-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--cyan); }
.call-log-item.image::before { background: var(--magenta); }.call-log-item.video::before { background: var(--amber); }
.call-log-main { min-height: 66px; padding: 13px 14px 11px 16px; display: grid; grid-template-columns: 38px minmax(210px, 1fr) auto 34px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.call-log-type, .call-log-detail-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; color: var(--cyan); background: var(--cyan-soft); }
.call-log-item.image .call-log-type, .call-log-detail-icon.image { color: var(--magenta); background: var(--magenta-soft); }
.call-log-item.video .call-log-type, .call-log-detail-icon.video { color: var(--amber); background: var(--amber-soft); }
.call-log-title { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.call-log-title > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.call-log-title strong { overflow: hidden; max-width: 360px; text-overflow: ellipsis; white-space: nowrap; }
.call-log-title code { overflow: hidden; color: var(--text-3); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.call-log-main > time { color: var(--text-3); font-size: 10px; white-space: nowrap; }
.modality-badge, .outcome-badge { min-height: 22px; padding: 2px 7px; display: inline-flex; align-items: center; gap: 4px; border-radius: 4px; font-size: 9px; font-style: normal; font-weight: 700; white-space: nowrap; }
.modality-badge { color: var(--cyan); background: var(--cyan-soft); }.modality-badge.image { color: var(--magenta); background: var(--magenta-soft); }.modality-badge.video { color: var(--amber); background: var(--amber-soft); }
.outcome-badge svg { width: 12px; }.outcome-badge.success { color: var(--green); background: var(--green-soft); }.outcome-badge.failed { color: var(--red); background: var(--red-soft); }.outcome-badge.running { color: var(--cyan); background: var(--cyan-soft); }.outcome-badge.cancelled, .outcome-badge.interrupted, .outcome-badge.unknown { color: var(--text-2); background: var(--surface-3); }
.outcome-badge.running svg, .drawer-loading svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.call-log-facts { padding: 13px 16px 14px; display: grid; grid-template-columns: 1.1fr .8fr 1.35fr .85fr .75fr; gap: 10px; }
.call-log-facts > span, .log-detail-grid > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.call-log-facts small, .log-detail-grid small { color: var(--text-3); font-size: 8px; text-transform: uppercase; }
.call-log-facts strong { overflow: hidden; color: var(--text-2); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.call-log-facts em, .log-detail-grid em { overflow: hidden; color: var(--text-3); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.call-log-assets { padding: 0 16px 14px; display: flex; gap: 7px; }
.log-asset-thumb { position: relative; width: 56px; height: 42px; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; color: var(--text); background: var(--surface-2); }
.log-asset-thumb img { width: 100%; height: 100%; object-fit: cover; }.log-asset-thumb.video > svg { position: absolute; z-index: 1; width: 16px; }.log-asset-thumb.video::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.3); }
.call-log-error { margin: 0 16px 14px; padding: 9px 11px; display: grid; grid-template-columns: 16px auto 1fr; align-items: center; gap: 7px; border: 1px solid color-mix(in srgb, var(--red) 28%, var(--line)); border-radius: 5px; color: var(--red); background: var(--red-soft); font-size: 9px; }
.call-log-error svg { width: 14px; }.call-log-error span:last-child { overflow: hidden; color: var(--text-2); text-overflow: ellipsis; white-space: nowrap; }
.log-pagination { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; color: var(--text-3); font-size: 10px; }
.log-pagination > div { display: flex; gap: 7px; }.log-pagination button:disabled { opacity: .38; cursor: not-allowed; }

.call-log-dialog { width: min(860px, 100%); max-width: none; height: 100vh; max-height: none; margin: 0 0 0 auto; border-width: 0 0 0 1px; border-radius: 0; }
.call-log-drawer { min-height: 100%; padding: 28px 30px 50px; overflow-y: auto; }
.call-log-drawer > .drawer-close { position: sticky; z-index: 3; top: 0; margin-left: auto; }
.drawer-loading { min-height: 70vh; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-3); }.drawer-loading svg { width: 18px; }
.call-log-detail-hero { margin-top: -34px; padding: 8px 52px 26px 0; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.call-log-detail-icon { width: 50px; height: 50px; }.call-log-detail-hero h2 { margin: 2px 0 4px; font-size: 25px; }
.detail-request-id { display: flex; align-items: center; gap: 5px; }.detail-request-id code { overflow: hidden; color: var(--text-3); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.call-log-detail-section { padding: 24px 0; border-bottom: 1px solid var(--line); }.call-log-detail-section:last-child { border-bottom: 0; }.call-log-detail-section > h3, .detail-section-title h3 { margin: 0 0 14px; font-size: 14px; }
.detail-section-title { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }.detail-section-title h3 { margin: 0; }.detail-section-title span { color: var(--text-3); font-size: 10px; }
.log-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 12px; }
.log-detail-grid > span { min-height: 58px; padding: 10px; border-left: 2px solid var(--line-strong); background: var(--surface-2); }
.log-detail-grid strong { overflow-wrap: anywhere; color: var(--text-2); font-size: 11px; }.log-detail-grid.usage > span:nth-child(4) { border-left-color: var(--amber); }.log-detail-grid.usage > span:nth-child(-n+3) { border-left-color: var(--cyan); }
.wallet-settlement { margin-top: 10px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 5px; }.wallet-settlement > span { min-height: 52px; padding: 9px 11px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 12px; border-bottom: 1px solid var(--line); }.wallet-settlement > span:last-child { border-bottom: 0; }.wallet-settlement small { color: var(--text-2); }.wallet-settlement strong { grid-column: 2; grid-row: 1 / 3; font: 10px var(--mono); }.wallet-settlement em { color: var(--text-3); font-size: 8px; font-style: normal; }
.price-snapshot { margin-top: 10px; border: 1px solid var(--line); border-radius: 5px; }.price-snapshot summary { padding: 11px; color: var(--text-2); cursor: pointer; font-size: 10px; }.price-snapshot pre { margin: 0; padding: 12px; overflow-x: auto; border-top: 1px solid var(--line); color: var(--text-3); background: var(--surface-2); font: 9px/1.6 var(--mono); }
.call-log-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.call-log-gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }.call-log-gallery img, .call-log-gallery video { width: 100%; aspect-ratio: 16 / 10; display: block; object-fit: contain; background: #080b10; }.call-log-gallery figcaption { padding: 11px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }.call-log-gallery figcaption strong, .call-log-gallery figcaption span, .call-log-gallery figcaption p { grid-column: 1; }.call-log-gallery figcaption span { color: var(--text-3); font-size: 9px; }.call-log-gallery figcaption p { margin: 4px 0 0; overflow: hidden; color: var(--text-2); font-size: 9px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }.call-log-gallery figcaption a { grid-column: 2; grid-row: 1 / 4; align-self: center; display: inline-flex; align-items: center; gap: 4px; color: var(--cyan); font-size: 9px; }.call-log-gallery figcaption svg { width: 12px; }
.asset-unavailable { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-3); }.asset-unavailable svg { width: 18px; }
.detail-empty { min-height: 76px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 5px; color: var(--text-3); font-size: 10px; }
.attempt-list { border-top: 1px solid var(--line); }.attempt-list > div { min-height: 62px; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }.attempt-list > div:last-child { border-bottom: 0; }.attempt-index { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--cyan); background: var(--cyan-soft); font: 9px var(--mono); }.attempt-list > div > span:nth-child(2) { display: flex; flex-direction: column; }.attempt-list strong { font-size: 10px; }.attempt-list small { color: var(--text-3); font-size: 8px; }.attempt-list em { margin-top: 3px; color: var(--red); font-size: 8px; font-style: normal; }.attempt-list b { color: var(--text-3); font: 9px var(--mono); }
.error-detail { color: var(--red); }.error-detail strong { font: 11px var(--mono); }.error-detail p { margin: 7px 0 0; color: var(--text-2); line-height: 1.65; }
.payload-stack { display: flex; flex-direction: column; gap: 8px; }.payload-block { border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); }.payload-block summary { min-height: 44px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }.payload-block summary span { color: var(--text-2); font-weight: 650; }.payload-block summary small { color: var(--text-3); }.payload-block pre { max-height: 420px; margin: 0; padding: 14px; overflow: auto; border-top: 1px solid var(--line); color: #b8e4dd; background: #080b10; font: 9px/1.65 var(--mono); white-space: pre-wrap; word-break: break-word; }.payload-block[data-empty] > div { padding: 0 12px 13px; color: var(--text-3); font-size: 9px; }

/* Tables, plans, dialogs */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 760px; }
.table-wrap th, .table-wrap td { padding: 15px 16px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.table-wrap th { color: var(--text-3); background: var(--surface-2); font-size: 10px; font-weight: 650; }
.table-wrap td { color: var(--text-2); font-size: 12px; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 65%, transparent); }
.table-wrap code { color: var(--cyan); }
.table-actions { display: flex; align-items: center; gap: 12px; }
.key-legacy-note { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.positive { color: var(--green) !important; }.negative { color: var(--red) !important; }
.status-badge { padding: 3px 7px; border-radius: 4px; font-size: 10px; }
.status-badge.enabled { color: var(--green); background: var(--green-soft); }.status-badge.disabled { color: var(--text-3); background: var(--surface-3); }
.billing-heading { margin-bottom: 28px; align-items: flex-end; }
.billing-heading > div:first-child { max-width: 590px; }
.billing-assurance { max-width: 520px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px 18px; }
.billing-assurance > span { min-height: 28px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 10px; font-weight: 650; white-space: nowrap; }
.billing-assurance svg { width: 15px; height: 15px; color: var(--green); }
.plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan-item { position: relative; min-width: 0; min-height: 442px; padding: 26px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid color-mix(in srgb, var(--cyan) 15%, var(--line)); border-radius: var(--radius); background: linear-gradient(145deg, var(--surface) 58%, color-mix(in srgb, var(--cyan-soft) 44%, var(--surface))); box-shadow: 0 12px 34px rgba(18, 49, 69, .08); transition: transform .22s cubic-bezier(.22, 1, .36, 1), border-color .22s ease, box-shadow .22s ease; }
.plan-item:hover { z-index: 1; transform: translateY(-4px); border-color: color-mix(in srgb, var(--cyan) 45%, var(--line)); box-shadow: 0 24px 52px rgba(17, 53, 72, .15); }
.plan-item-top { position: relative; z-index: 2; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.plan-type { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--cyan) 28%, var(--line)); border-radius: 8px; color: var(--cyan); background: color-mix(in srgb, var(--cyan-soft) 82%, var(--surface)); box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--surface) 64%, transparent); }
.plan-type svg { width: 24px; height: 24px; }
.plan-heading-copy { min-width: 0; }
.plan-eyebrow { display: block; margin-bottom: 3px; color: var(--cyan); font: 750 8px var(--mono); letter-spacing: .08em; }
.plan-item h3 { margin: 0; font-size: 19px; line-height: 1.25; }
.plan-security { min-height: 30px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 700; white-space: nowrap; }
.plan-security svg { width: 15px; height: 15px; }
.plan-wallet-hero { position: relative; min-height: 154px; margin-top: 26px; display: flex; align-items: center; }
.plan-wallet-hero::after { content: ""; position: absolute; z-index: 0; right: 0; bottom: 8px; width: 190px; height: 96px; opacity: .3; background: repeating-radial-gradient(ellipse at 58% 80%, transparent 0 8px, color-mix(in srgb, var(--cyan) 18%, transparent) 9px 10px); mask-image: linear-gradient(90deg, transparent, #000 48%, transparent); }
.plan-price-block { position: relative; z-index: 2; width: 100%; }
.plan-price-label { color: var(--text-2); font-size: 9px; font-weight: 650; }
.plan-amount { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.plan-amount strong { overflow-wrap: anywhere; font-size: 44px; line-height: 1; font-weight: 780; }
.plan-amount small { color: var(--text-2); font: 700 9px var(--mono); }
.plan-price-block p { max-width: 68%; min-height: 18px; margin: 16px 0 0; color: var(--text-2); font-size: 11px; line-height: 1.55; }
.plan-shield-art { position: absolute; z-index: 1; right: -1px; top: 6px; width: 132px; height: 132px; display: grid; place-items: center; color: var(--cyan); opacity: .16; filter: drop-shadow(0 12px 18px color-mix(in srgb, var(--cyan) 30%, transparent)); transform: rotate(-4deg); }
.plan-shield-art svg { width: 100%; height: 100%; stroke-width: 1.35; }
.plan-benefits { min-height: 70px; padding: 10px 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid color-mix(in srgb, var(--cyan) 12%, var(--line)); border-radius: 7px; background: color-mix(in srgb, var(--surface) 78%, transparent); box-shadow: 0 7px 20px rgba(21, 48, 67, .045); }
.plan-benefits > span { min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 9px; }
.plan-benefits > span + span { padding-left: 12px; border-left: 1px solid var(--line); }
.plan-benefits i { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); }
.plan-benefits svg { width: 15px; height: 15px; }
.plan-benefits b { min-width: 0; font-weight: 600; line-height: 1.45; }
.plan-checkout { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.plan-arrival { min-height: 50px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.plan-arrival > span { display: flex; flex-direction: column; }
.plan-arrival small { color: var(--text-2); font-size: 8px; }
.plan-arrival strong { margin-top: 2px; font-size: 13px; font-variant-numeric: tabular-nums; }
.plan-arrival-status { align-items: flex-end; text-align: right; }
.plan-arrival-status em { color: var(--green); font-size: 10px; font-style: normal; font-weight: 750; }
.plan-arrival-status small { margin-top: 3px; }
.plan-footer { margin-top: 8px; }
.plan-action { width: 100%; min-height: 50px; justify-content: space-between; font-size: 13px; box-shadow: 0 12px 26px color-mix(in srgb, var(--cyan) 18%, transparent); }
.plan-action svg { width: 18px; height: 18px; }
.plan-action:active { transform: translateY(0) scale(.99); }
.plan-footer p { margin: 9px 0 0; display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--text-2); font-size: 8px; }
.plan-footer p svg { width: 12px; height: 12px; }
.ledger-heading { margin-top: 52px; }
.empty-state { min-height: 180px; display: grid; place-items: center; color: var(--text-3); text-align: center; }
.empty-state > div { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.empty-state strong { color: var(--text-2); }.empty-state small { max-width: 260px; }
.key-reveal { margin-bottom: 14px; padding: 15px; display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 12px; border: 1px solid rgba(242,184,75,.3); border-radius: var(--radius); background: var(--amber-soft); }
.reveal-icon { color: var(--amber); }.key-reveal > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }.key-reveal code { overflow: hidden; color: var(--text); text-overflow: ellipsis; }

dialog { width: min(480px, calc(100% - 24px)); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(3, 5, 9, .72); backdrop-filter: blur(5px); }
.login-dialog { width: min(410px, calc(100% - 24px)); overflow: visible; }
.login-dialog-shell { position: relative; padding: 26px; }
.login-dialog-close { position: absolute; z-index: 3; top: 16px; right: 16px; }
.login-dialog .scan-heading { padding-right: 40px; }
.login-dialog .qr-stage { margin-top: 6px; }
.legal-dialog { width: min(680px, calc(100% - 24px)); max-height: calc(100vh - 32px); }
.legal-dialog-shell { max-height: calc(100vh - 34px); display: flex; flex-direction: column; }
.legal-dialog-heading { flex: 0 0 auto; padding: 22px 24px 18px; display: flex; align-items: start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.legal-dialog-heading p { margin: 0 0 4px; color: var(--cyan); font: 700 9px var(--mono); letter-spacing: .08em; }
.legal-dialog-heading h2 { margin: 0; font-size: 22px; }
.legal-content { min-height: 0; margin: 0; padding: 20px 24px 28px; overflow-y: auto; }
.legal-content h3 { margin: 22px 0 7px; font-size: 14px; }
.legal-content p { margin: 0; color: var(--text-2); font-size: 12px; line-height: 1.8; }
.legal-content .legal-effective { padding-bottom: 15px; border-bottom: 1px solid var(--line); color: var(--text-3); font-size: 10px; }
.dialog-form { padding: 22px; }.dialog-heading { margin-bottom: 20px; display: flex; align-items: start; justify-content: space-between; gap: 20px; }.dialog-heading h2 { margin: 0; font-size: 22px; }.dialog-form > label { display: block; margin-bottom: 7px; color: var(--text-2); font-size: 12px; }.dialog-form > input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; outline: 0; color: var(--text); background: var(--surface-2); }.dialog-form > input:focus { border-color: var(--cyan); }.field-hint { margin: 8px 0 0; color: var(--text-3); font-size: 11px; }.dialog-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 8px; }
.confirm-dialog { display: grid; grid-template-columns: 40px 1fr; gap: 14px; }.confirm-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; color: var(--amber); background: var(--amber-soft); }.confirm-dialog h2 { margin: 2px 0 5px; }.confirm-dialog p { margin: 0; color: var(--text-2); }.confirm-dialog .dialog-actions { grid-column: 1 / -1; }
.payment-dialog { text-align: center; }.payment-qr { width: 220px; height: 220px; margin: 0 auto 16px; padding: 8px; border-radius: 5px; background: #fff; object-fit: contain; }
.model-dialog { width: min(800px, 100%); max-width: none; height: 100vh; max-height: none; margin: 0 0 0 auto; overflow: hidden; border-width: 0 0 0 1px; border-radius: 0; }
.model-drawer { height: 100%; min-height: 0; display: grid; grid-template-rows: 64px minmax(0, 1fr); overflow: hidden; }
.model-drawer-header { position: relative; z-index: 4; min-height: 64px; padding: 0 20px 0 30px; display: flex; align-items: center; border-bottom: 1px solid var(--line); background: var(--surface); box-shadow: 0 8px 24px rgba(13, 24, 38, .05); }
.model-drawer-header > span { color: var(--text-2); font-size: 11px; font-weight: 700; }
.model-drawer-header .drawer-close { position: static; margin-left: auto; }
#modelDialogBody { min-height: 0; padding: 26px 30px 40px; overflow-y: auto; overscroll-behavior: contain; }
.detail-hero { padding-bottom: 26px; border-bottom: 1px solid var(--line); }.detail-hero-top { display: flex; align-items: start; justify-content: space-between; gap: 18px; }.detail-logo { width: 52px; height: 52px; margin-bottom: 20px; }.detail-hero h2 { margin: 0; font-size: 30px; }.detail-model-id { margin: 5px 0 18px; color: var(--text-3); font-family: var(--mono); }.detail-description { color: var(--text-2); font-size: 15px; line-height: 1.75; }.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 24px 0; }.detail-price, .detail-provider { min-height: 116px; padding: 16px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }.detail-price span, .detail-provider span { color: var(--text-3); font-size: 10px; }.detail-price strong, .detail-provider strong { margin: 12px 0 4px; font-size: 16px; }.detail-price small, .detail-provider small { color: var(--text-3); }
.detail-section { padding: 24px 0; border-top: 1px solid var(--line); }.detail-section-heading { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }.detail-section-heading h3 { margin: 0; font-size: 16px; }.endpoint-stack { display: flex; flex-direction: column; gap: 7px; }.endpoint-row { min-height: 44px; padding: 0 10px; display: grid; grid-template-columns: 42px 1fr 30px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); }.endpoint-method { color: var(--cyan); font-family: var(--mono); font-size: 9px; font-weight: 800; }.endpoint-row code { overflow: hidden; color: var(--text-2); font-size: 11px; text-overflow: ellipsis; }.copy-endpoint { width: 28px; height: 28px; display: grid; place-items: center; border: 0; color: var(--text-3); background: transparent; cursor: pointer; }.copy-endpoint svg { width: 14px; }.detail-actions { display: flex; gap: 8px; }.detail-actions > * { flex: 1; }
.inline-debugger { margin-top: 24px; padding-top: 26px; scroll-margin-top: 14px; border-top: 1px solid var(--line-strong); }
.inline-debug-loading { min-height: 150px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-2); }
.inline-debug-head { margin-bottom: 22px; display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.inline-debug-head > div > span { color: var(--cyan); font: 800 9px var(--mono); }
.inline-debug-head h3 { margin: 4px 0 5px; font-size: 21px; }
.inline-debug-head p { margin: 0; color: var(--text-3); font-size: 11px; }
.inline-debug-head code { color: var(--text-2); }
.inline-debug-state { min-height: 30px; padding: 0 9px; display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; border: 1px solid rgba(77, 211, 154, .24); border-radius: 5px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 700; }
.inline-debug-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.inline-debug-form { padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.inline-debug-form > label, .inline-debug-grid > label, .inline-debug-options > label { min-width: 0; display: flex; flex-direction: column; gap: 7px; color: var(--text-2); font-size: 10px; font-weight: 700; }
.inline-debug-form input, .inline-debug-form select, .inline-debug-form textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 5px; outline: 0; color: var(--text); background: var(--surface); font: 11px var(--font); }
.inline-debug-form input, .inline-debug-form select { height: 40px; padding: 0 10px; }
.inline-debug-form textarea { min-height: 92px; padding: 10px; resize: vertical; line-height: 1.65; }
.inline-debug-form input:focus, .inline-debug-form select:focus, .inline-debug-form textarea:focus { border-color: var(--cyan); }
.inline-debug-form input:disabled { color: var(--text-3); background: var(--surface-3); }
.inline-debug-form label > small { color: var(--text-3); font-size: 9px; font-weight: 450; }
.inline-debug-grid, .inline-debug-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.inline-debug-options { margin: 14px 0 0; }
.inline-debug-options .inline-check { min-height: 40px; padding: 0 10px; flex-direction: row; align-items: center; align-self: end; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.inline-debug-options .inline-check input { width: 16px; height: 16px; }
.inline-field-action { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 6px; }
.inline-field-action .icon-button { width: 40px; height: 40px; }
.inline-upload { position: relative; min-height: 72px; margin-top: 14px; padding: 12px 14px; display: grid !important; grid-template-columns: 34px minmax(0, 1fr) minmax(150px, .7fr); align-items: center; gap: 10px; border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--text-3) !important; background: var(--surface); cursor: pointer; }
.inline-upload > svg { color: var(--cyan); }
.inline-upload > span { display: flex; flex-direction: column; }
.inline-upload strong { color: var(--text-2); font-size: 11px; }
.inline-upload small { font-size: 9px; font-weight: 450; }
.inline-upload input[type="file"] { height: auto; padding: 0; border: 0; background: transparent; font-size: 9px; }
.inline-debug-submit { margin-top: 18px; padding-top: 15px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); }
.inline-debug-submit > span { color: var(--text-3); font-size: 9px; }
.inline-debug-submit .primary-button { min-width: 124px; }
.inline-debug-result { margin-top: 14px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #080b11; }
html[data-theme="light"] .inline-debug-result { background: #111827; }
.inline-debug-meta { display: grid; grid-template-columns: .6fr .8fr 1.5fr .8fr; border-bottom: 1px solid #273143; }
.inline-debug-meta > span { min-width: 0; padding: 10px 12px; display: flex; flex-direction: column; border-right: 1px solid #273143; }
.inline-debug-meta > span:last-child { border-right: 0; }
.inline-debug-meta small { color: #748198; font-size: 8px; }
.inline-debug-meta strong { overflow: hidden; color: #d9e3f0; font: 11px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.inline-debug-response-head { height: 38px; padding: 0 10px 0 14px; display: flex; align-items: center; justify-content: space-between; color: #8e9bb0; font-size: 9px; }
.inline-debug-response-head .icon-button { width: 28px; height: 28px; border-color: #273143; color: #b7c2d3; background: #111722; }
.inline-debug-response { margin: 0; }
#inlineDebugResponse { min-height: 170px; max-height: 360px; margin: 0; padding: 0 16px 18px; overflow: auto; color: #d9e3f0; font-size: 10px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.inline-debug-media { padding: 14px; border-bottom: 1px solid #273143; }
.inline-debug-media img, .inline-debug-media video { width: 100%; max-height: 440px; object-fit: contain; background: #05070b; }
.inline-debug-media audio { width: 100%; }
.inline-debug-empty { min-height: 142px; padding: 22px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.inline-debug-empty > svg { width: 24px; height: 24px; color: var(--amber); }
.inline-debug-empty strong { font-size: 14px; }
.inline-debug-empty p { margin: 4px 0 0; color: var(--text-3); font-size: 10px; }
.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; }.toast { min-width: 240px; max-width: 360px; padding: 12px 14px; display: flex; align-items: center; gap: 9px; border: 1px solid rgba(77,211,154,.3); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }.toast svg { color: var(--green); }.toast.error { border-color: rgba(242,109,125,.3); }.toast.error svg { color: var(--red); }

/* API documentation and real request workbench */
.docs-parameter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.docs-parameter-grid > span { min-height: 72px; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.docs-parameter-grid b, .docs-parameter-grid small { display: block; }
.docs-parameter-grid b { margin-bottom: 6px; color: var(--cyan); font-family: var(--mono); }
.docs-parameter-grid small { color: var(--text-3); line-height: 1.55; }
.docs-playground-link { width: max-content; margin-top: 18px; }
.playground-intro { padding-bottom: 22px; }.playground-intro code { color: var(--cyan); }
.playground-shell { display: grid; grid-template-columns: minmax(340px, .78fr) minmax(0, 1.22fr); min-height: 680px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-soft); }
.playground-controls { padding: 24px; border-right: 1px solid var(--line); background: var(--surface-2); }
.playground-section-title, .playground-output-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.playground-section-title span, .playground-output-head > div > span { color: var(--cyan); font-size: 9px; font-weight: 750; }
.playground-section-title h2, .playground-output-head h2 { margin: 4px 0 0; font-size: 20px; }
.playground-controls > label, .playground-options > label { margin: 0 0 14px; display: flex; flex-direction: column; gap: 7px; color: var(--text-2); font-size: 11px; font-weight: 650; }
.playground-controls label > small { color: var(--text-3); font-size: 9px; font-weight: 450; }
.playground-controls input, .playground-controls select, .playground-controls textarea { width: 100%; border: 1px solid var(--line); border-radius: 5px; outline: 0; color: var(--text); background: var(--surface); font: inherit; }
.playground-controls input, .playground-controls select { height: 40px; padding: 0 11px; }.playground-controls textarea { padding: 11px; resize: vertical; line-height: 1.55; }
.playground-controls input:focus, .playground-controls select:focus, .playground-controls textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.playground-modes { margin-bottom: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.playground-modes button { min-height: 36px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--text-3); background: var(--surface); cursor: pointer; font-size: 10px; }
.playground-modes button.active { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-soft); }
.playground-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.playground-options .toggle-label { justify-content: center; }.playground-options .toggle-label input { width: 18px; height: 18px; accent-color: var(--cyan); }
.playground-audio-options { display: grid; gap: 12px; }
.playground-field-action { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 6px; }.playground-field-action .icon-button { width: 40px; height: 40px; }
.audio-engine-panel { margin: 2px 0 14px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.audio-engine-heading { margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }.audio-engine-heading > svg { width: 28px; height: 28px; padding: 6px; border-radius: 5px; color: var(--cyan); background: var(--cyan-soft); }.audio-engine-heading strong, .audio-engine-heading small { display: block; }.audio-engine-heading strong { color: var(--text); font-size: 12px; }.audio-engine-heading small { margin-top: 3px; color: var(--text-3); font-size: 9px; font-weight: 450; }
.audio-long-field { margin: 0 0 12px; display: flex; flex-direction: column; gap: 7px; color: var(--text-2); font-size: 11px; font-weight: 650; }.audio-long-field small { color: var(--text-3); font-size: 9px; font-weight: 450; }
.audio-toggle { min-height: 38px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-2); font-size: 11px; font-weight: 650; }.audio-toggle input { width: 18px; height: 18px; accent-color: var(--cyan); }
.emotion-vector-grid { margin: 0 0 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }.emotion-vector-grid label { padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); }.emotion-vector-grid label > span { display: flex; justify-content: space-between; color: var(--text-2); font-size: 10px; }.emotion-vector-grid output { color: var(--cyan); font-family: var(--mono); }.emotion-vector-grid input[type="range"] { height: 20px; padding: 0; border: 0; box-shadow: none; accent-color: var(--cyan); }
.emotion-vector-total { grid-column: 1 / -1; padding: 7px 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--text-3); background: var(--surface-2); font: 10px/1.4 var(--mono); }.emotion-vector-total.is-invalid { border-color: var(--red); color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--surface-2)); }
.playground-file { position: relative; min-height: 92px; border: 1px dashed var(--line-strong); border-radius: 6px; cursor: pointer; background: var(--surface); }.playground-file > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.playground-file > span { min-height: 90px; display: grid; grid-template-columns: 30px 1fr; align-content: center; column-gap: 8px; padding: 12px; }.playground-file svg { grid-row: 1 / 3; color: var(--cyan); }.playground-file strong, .playground-file small { display: block; }
.playground-audio-file > span { grid-template-rows: auto auto auto; }.playground-audio-file #playgroundVoiceName { grid-column: 2; width: min(100%, 220px); height: 32px; margin-top: 8px; padding: 0 9px; }
.playground-estimate { min-height: 48px; margin: 6px 0 14px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }.playground-estimate span { color: var(--text-3); font-size: 10px; }.playground-estimate strong { color: var(--amber); }
.playground-output { min-width: 0; padding: 24px; }.playground-kpis { display: grid; grid-template-columns: 90px 90px minmax(130px, 1fr) 110px; gap: 8px; margin-bottom: 16px; }
.playground-kpis > span { min-width: 0; min-height: 66px; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }.playground-kpis small, .playground-kpis strong { display: block; }.playground-kpis small { margin-bottom: 8px; color: var(--text-3); font-size: 8px; }.playground-kpis strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.playground-code-head { min-height: 40px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; color: var(--text-3); background: var(--surface-2); font-size: 10px; }
.playground-response { min-height: 390px; max-height: 540px; margin: 0; padding: 18px; overflow: auto; border: 1px solid var(--line); border-radius: 0 0 6px 6px; color: #b8e4dd; background: #080b10; font: 11px/1.7 var(--mono); white-space: pre-wrap; word-break: break-word; }
.playground-asset { min-height: 160px; margin-bottom: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }.playground-asset img, .playground-asset video { width: 100%; max-height: 360px; display: block; object-fit: contain; background: #080b10; }.playground-asset audio { width: calc(100% - 32px); margin: 56px 16px; display: block; }
.playground-request { margin-top: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }.playground-request summary { padding: 12px; cursor: pointer; color: var(--text-2); font-size: 11px; }.playground-request pre { margin: 0; padding: 0 12px 14px; overflow-x: auto; color: var(--text-3); font: 10px/1.6 var(--mono); }
.model-logo img, .detail-logo img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

/* Seven-day generated resource library */
.resource-retention-notice { min-height: 74px; margin-bottom: 16px; padding: 15px 18px; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 13px; border: 1px solid color-mix(in srgb, var(--amber) 30%, var(--line)); border-radius: 7px; background: color-mix(in srgb, var(--amber) 8%, var(--surface)); }
.resource-retention-notice > svg { width: 22px; color: var(--amber); }.resource-retention-notice strong { display: block; font-size: 12px; }.resource-retention-notice p { margin: 4px 0 0; color: var(--text-3); font-size: 10px; line-height: 1.55; }
#refreshResourcesButton { min-width: 86px; white-space: nowrap; }
.resource-toolbar { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }.resource-type-tabs { padding: 3px; display: inline-flex; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }.resource-type-tabs button { height: 34px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 4px; color: var(--text-3); background: transparent; cursor: pointer; font-size: 11px; }.resource-type-tabs button:hover, .resource-type-tabs button.active { color: var(--text); background: var(--surface-3); }.resource-type-tabs button.active { color: var(--cyan); }.resource-type-tabs svg { width: 14px; }
.resource-filter { display: flex; gap: 7px; }.resource-filter label { width: min(250px, 28vw); height: 40px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }.resource-filter label:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }.resource-filter svg { width: 14px; color: var(--text-3); }.resource-filter input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font: inherit; }.resource-filter select { height: 40px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 5px; outline: 0; color: var(--text); background: var(--surface); font: inherit; }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }.resource-grid > .empty-state { grid-column: 1 / -1; }
.resource-item { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }.resource-item:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.resource-preview { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center; background: #090d14; }.resource-preview > img, .resource-preview > video { width: 100%; height: 100%; display: block; object-fit: contain; }.resource-kind { position: absolute; left: 9px; top: 9px; min-height: 27px; padding: 0 8px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(255,255,255,.16); border-radius: 5px; color: #f4f7fb; background: rgba(8,12,18,.74); backdrop-filter: blur(8px); font-size: 9px; }.resource-kind svg { width: 12px; }
.resource-audio { width: 100%; padding: 0 18px; display: flex; flex-direction: column; align-items: center; gap: 16px; }.resource-audio > svg { width: 34px; height: 34px; color: var(--cyan); }.resource-audio audio { width: 100%; height: 38px; }.resource-unavailable { display: flex; align-items: center; gap: 8px; color: #9ca9bb; font-size: 10px; }.resource-unavailable svg { width: 18px; }
.resource-content { padding: 15px; }.resource-title { min-width: 0; display: flex; justify-content: space-between; gap: 10px; }.resource-title strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.resource-title > span { flex: 0 0 auto; color: var(--green); font-size: 9px; }.resource-title > span.urgent { color: var(--amber); }.resource-content > p { margin: 7px 0 12px; overflow: hidden; color: var(--text-3); font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }.resource-meta { min-height: 38px; padding-bottom: 12px; display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid var(--line); color: var(--text-3); font-size: 9px; }.resource-actions { padding-top: 11px; display: flex; justify-content: flex-end; gap: 6px; }.resource-actions .icon-button { width: 32px; height: 32px; }.resource-actions .danger { color: var(--red); }
html[data-theme="dark"] .resource-type-tabs button:hover, html[data-theme="dark"] .resource-type-tabs button.active { background: #202731; } html[data-theme="dark"] .resource-filter label { background: #131922; }

@media (max-width: 1080px) {
  .header-inner { gap: 18px; }.global-nav a { padding: 0 10px; }.service-pill { display: none; }
  .login-stage { grid-template-columns: minmax(0, 1fr) 360px; gap: 52px; }
  .catalog-toolbar { grid-template-columns: 1fr 190px; }.category-tabs { grid-column: 1 / -1; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 34px; }.code-grid { grid-template-columns: 1fr; }.docs-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.docs-summary > span:nth-child(2) { border-right: 0; }.docs-summary > span:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .console-shell { width: min(calc(100% - 40px), var(--max)); display: block; }.workspace-tabs { position: static; margin: 24px 0 30px; flex-direction: row; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }.workspace-tabs button, .workspace-tabs > a { width: auto; min-width: max-content; height: 48px; padding: 0 16px; border-radius: 0; background: transparent; }.workspace-tabs button:hover, .workspace-tabs button.active, .workspace-tabs > a:hover { background: transparent; }.workspace-tabs button.active::before { left: 16px; right: 16px; top: auto; bottom: -1px; width: auto; height: 2px; }.console-panel { margin-top: 0; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }.plans-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }.analytics-detail { grid-template-columns: 1fr; }
  .log-toolbar { align-items: stretch; flex-direction: column; }.log-search { display: grid; grid-template-columns: 118px minmax(0, 1fr) auto; }.log-keyword input { width: 100%; }.call-log-facts { grid-template-columns: repeat(3, 1fr); }
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .playground-shell { grid-template-columns: 1fr; }.playground-controls { border-right: 0; border-bottom: 1px solid var(--line); }.playground-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .site-header { height: 60px; }.header-inner { width: calc(100% - 28px); }
  .menu-button { display: inline-grid; }.header-account span:last-child { display: none; }.header-account { width: 36px; padding: 0; justify-content: center; }
  .global-nav { position: absolute; left: 14px; right: 14px; top: 67px; height: auto; padding: 8px; display: none; flex-direction: column; align-items: stretch; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }.global-nav.open { display: flex; }.global-nav a { height: 44px; display: flex; justify-content: flex-start; border-radius: 5px; }.global-nav a.active::after { display: none; }.global-nav a.active { background: var(--cyan-soft); color: var(--cyan); }
  .page-view { min-height: calc(100vh - 60px); }.public-shell, .console-shell { width: calc(100% - 28px); padding: 32px 0 56px; }.page-intro { min-height: 140px; padding: 8px 0 28px; align-items: start; flex-direction: column; }.page-intro h1 { font-size: 36px; }.intro-stat { justify-content: flex-start; }
  .login-stage { width: calc(100% - 28px); min-height: calc(100vh - 60px); padding: 38px 0 50px; grid-template-columns: 1fr; gap: 42px; }.login-copy h1 { font-size: 44px; }.login-lead { font-size: 15px; }.scan-access { width: min(100%, 390px); margin: 0 auto; }.login-facts { gap: 8px 15px; }
  .catalog-toolbar { position: static; padding: 0; grid-template-columns: 1fr; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }.catalog-toolbar:hover { transform: none; box-shadow: none; }.provider-select { grid-row: auto; }.category-tabs { grid-column: auto; grid-row: auto; padding-bottom: 2px; }.catalog-grid { grid-template-columns: 1fr; }.model-card { min-height: 250px; }
  .docs-shell { width: calc(100% - 28px); }.docs-intro-actions { width: 100%; min-width: 0; }.docs-meta { margin-top: 16px; }.docs-layout { grid-template-columns: 1fr; gap: 24px; }.docs-index { position: static; flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--line); }.docs-index > span { display: none; }.docs-index a { min-width: max-content; padding: 11px 13px; }.docs-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.docs-steps li { grid-template-columns: 30px minmax(0, 1fr); }.docs-steps li span { grid-column: 2; }.endpoint-signature { grid-template-columns: 48px minmax(0, 1fr); padding: 10px 0; }.endpoint-signature span { grid-column: 2; }.endpoint-table > div { grid-template-columns: 45px 1fr; padding: 10px 0; }.endpoint-table span { grid-column: 2; }.docs-table { min-width: 680px; }.docs-flow { grid-template-columns: 1fr; }.docs-flow > svg { display: none; }.docs-checklist.production { grid-template-columns: 1fr; }.docs-checklist.production li:nth-child(odd) { border-right: 0; }.docs-limit-line, .docs-retry, .docs-billing-flow { grid-template-columns: 1fr; }.docs-limit-line span, .docs-retry span, .docs-billing-flow > span { border-right: 0; border-bottom: 1px solid var(--line); }.docs-limit-line span:last-child, .docs-retry span:last-child, .docs-billing-flow > span:last-child { border-bottom: 0; }.docs-ai-handoff { grid-template-columns: 34px minmax(0, 1fr); }.docs-ai-handoff .secondary-button { grid-column: 2; width: max-content; }.error-grid { grid-template-columns: 1fr; }
  .pricing-metrics { grid-template-columns: 1fr; }.pricing-metrics article { min-height: 140px; }.billing-heading { align-items: flex-start; }.billing-assurance { justify-content: flex-start; gap: 6px 14px; }.plans-grid { grid-template-columns: 1fr; }.plan-item { min-height: 0; padding: 20px; }.plan-wallet-hero { min-height: 142px; }.plan-amount strong { font-size: 38px; }.plan-shield-art { right: -8px; width: 116px; height: 116px; }.plan-price-block p { max-width: 72%; }.plan-benefits { padding: 9px 10px; }.plan-benefits > span { gap: 6px; font-size: 8px; }.plan-benefits > span + span { padding-left: 9px; }.plan-benefits i { width: 27px; height: 27px; flex-basis: 27px; }
  .workspace-tabs { margin-top: 20px; }.workspace-tabs button, .workspace-tabs > a { padding: 0 13px; }.workspace-tabs button.active::before { left: 13px; right: 13px; }
  .metric-strip { grid-template-columns: 1fr 1fr; }.balance-metric { min-height: 132px; padding: 15px; flex-direction: column; gap: 10px; }.balance-metric strong { font-size: 20px; }.balance-metric small { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }.quick-actions { grid-template-columns: 1fr; }.analytics-summary { grid-template-columns: 1fr 1fr; }.chart-wrap.large { height: 250px; }.section-heading { align-items: start; }.section-heading h2 { font-size: 24px; }.range-switch { flex: 0 0 auto; }
  .overview-analytics-heading { margin-top: 38px; }.log-modality-tabs { width: 100%; overflow-x: auto; }.log-modality-tabs button { flex: 1; justify-content: center; min-width: max-content; }.log-search { grid-template-columns: 1fr auto; }.log-search > label:first-child { grid-column: 1 / -1; }.log-search select { width: 100%; }.call-log-main { grid-template-columns: 36px minmax(0, 1fr) 34px; }.call-log-main > time { grid-column: 2; grid-row: 2; }.call-log-main > button { grid-column: 3; grid-row: 1 / 3; }.call-log-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }.call-log-facts > span:nth-child(3) { grid-column: 1 / -1; }.call-log-dialog { width: 100%; }.call-log-drawer { padding: 20px 16px 40px; }.call-log-detail-hero { margin-top: -34px; padding-right: 42px; grid-template-columns: 44px minmax(0, 1fr); }.call-log-detail-icon { width: 42px; height: 42px; }.call-log-detail-hero > .outcome-badge { grid-column: 2; width: max-content; }.log-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.call-log-gallery { grid-template-columns: 1fr; }
  .resource-toolbar { align-items: stretch; flex-direction: column; }.resource-type-tabs { width: 100%; overflow-x: auto; }.resource-type-tabs button { flex: 1; justify-content: center; min-width: max-content; }.resource-filter label { width: 100%; grid-column: 1 / -1; }.resource-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; }.resource-grid { grid-template-columns: 1fr; }.resource-preview { aspect-ratio: 16 / 9; }
  .model-dialog { width: 100%; }.model-drawer { padding: 0; grid-template-rows: 58px minmax(0, 1fr); }.model-drawer-header { min-height: 58px; padding: 0 14px 0 16px; }#modelDialogBody { padding: 20px 16px 36px; }.detail-price-grid { grid-template-columns: 1fr; }.detail-actions { flex-direction: column; }
  .docs-parameter-grid { grid-template-columns: 1fr; }.playground-shell { border-radius: 6px; }.playground-controls, .playground-output { padding: 16px; }.playground-modes { grid-template-columns: repeat(2, 1fr); }.playground-options, .emotion-vector-grid { grid-template-columns: 1fr; }.playground-response { min-height: 300px; }
  .toast-region { left: 14px; right: 14px; bottom: 14px; }.toast { min-width: 0; max-width: none; }
}

@media (max-width: 420px) {
  .header-tools { gap: 5px; }.brand-mark { width: 31px; height: 31px; }
  .login-dialog-shell { padding: 22px 16px; }.login-dialog .scan-heading { padding: 0 38px 0 2px; }.login-dialog .qr-stage { transform: scale(.94); margin: -4px auto 4px; }
  .login-copy h1 { font-size: 38px; }.endpoint-stream > div { grid-template-columns: 36px minmax(0, 1fr) auto; }.scan-access { padding: 20px 16px; }.qr-stage { transform: scale(.92); margin: -10px auto 5px; }
  .docs-summary { grid-template-columns: 1fr; }.docs-summary > span { border-right: 0; border-bottom: 1px solid var(--line); }.docs-summary > span:last-child { border-bottom: 0; }.docs-meta > span { max-width: 100%; }.metric-strip { grid-template-columns: 1fr; }.balance-metric { min-height: 98px; display: grid; grid-template-columns: 36px 1fr; }.balance-metric small { display: block; }.analytics-summary { grid-template-columns: 1fr; }.analytics-summary article { min-height: 76px; }
  .ranking-item { grid-template-columns: minmax(90px, 1fr) 80px 44px; }.protocol-badge { display: none; }
}

@media (max-width: 760px) {
  #modelsView { width: calc(100% - 28px); }
  .catalog-grid { gap: 14px; }
  .model-card { min-height: 370px; padding: 22px 20px 20px; }
  .model-card-art { top: 58px; right: -18px; width: 48%; height: 54%; }
  .model-card-kicker { margin-bottom: 21px; padding: 0; }
  .model-type-chip { min-height: 29px; padding: 4px 9px; }
  .model-availability { min-height: 28px; }
  .model-card-top { width: 82%; grid-template-columns: 58px minmax(0, 1fr); gap: 13px; }
  .model-logo { width: 58px; height: 58px; }
  .model-heading strong { font-size: 18px; }
  .model-heading span { font-size: 11px; }
  .featured-mark { display: none; }
  .model-description { width: 100%; min-height: 46px; margin-top: 20px; font-size: 12px; }
  .model-price { min-height: 86px; margin-top: 14px; padding: 14px 0; }
  .model-price-pair > span { padding-right: 10px; gap: 2px 5px; }
  .model-price-pair > span + span { padding-left: 12px; }
  .model-price-pair small { font-size: 10px; }
  .model-price-pair strong { font-size: 21px; }
  .model-price-pair em { font-size: 8px; }
  .model-tag { min-height: 27px; padding: 4px 7px; font-size: 9px; }
  .card-detail > span:first-child { display: none; }
  .card-detail-icon { width: 34px; height: 34px; }
  .detail-hero-top { padding-right: 42px; }
  .inline-debug-head { flex-direction: column; }
  .inline-debug-grid, .inline-debug-options { grid-template-columns: 1fr; }
  .inline-upload { grid-template-columns: 32px minmax(0, 1fr); }
  .inline-upload > input { grid-column: 2; }
  .inline-debug-submit { align-items: stretch; flex-direction: column; }
  .inline-debug-submit .primary-button { width: 100%; }
  .inline-debug-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-debug-meta > span:nth-child(2) { border-right: 0; }
  .inline-debug-meta > span:nth-child(-n+2) { border-bottom: 1px solid #273143; }
  .inline-debug-empty { grid-template-columns: 36px minmax(0, 1fr); }
  .inline-debug-empty .primary-button { grid-column: 2; width: max-content; }
}

@media (min-width: 761px) and (max-width: 1320px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

/* Model health status shared by catalog cards and model detail. */
.model-health {
  position: relative;
  z-index: 1;
  min-height: 34px;
  margin-top: 12px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid color-mix(in srgb, currentColor 20%, var(--line));
  border-radius: 6px;
  color: var(--text-2);
  background: color-mix(in srgb, currentColor 5%, var(--surface-2));
  font-size: 11px;
}
.model-health i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 13%, transparent);
}
.model-health strong { color: currentColor; font-size: 11px; }
.model-health small { margin-left: auto; color: var(--text-3); font-size: 10px; }
.model-health.is-healthy { color: #20a779; }
.model-health.is-warning { color: #d89216; }
.model-health.is-degraded { color: #e0642f; }
.model-health.is-critical { color: #dc3d42; }
.model-health.is-insufficient,
.model-health.is-paused { color: var(--text-3); }
.model-health.is-paused { opacity: .82; }

.model-health-detail { padding-top: 0; }
.model-health-detail .detail-section-heading { margin-bottom: 12px; }
.model-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
}
.model-health-grid > div {
  min-height: 104px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.model-health-grid > div:last-child { border-right: 0; }
.model-health-grid span { color: var(--text-3); font-size: 10px; }
.model-health-grid strong { margin: 10px 0 5px; color: var(--text); font-size: 22px; font-variant-numeric: tabular-nums; }
.model-health-grid small { color: var(--text-3); font-size: 11px; }
.model-health-note { margin: 10px 0 0; color: var(--text-3); font-size: 10px; }

@media (max-width: 900px) {
  .model-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-health-grid > div:nth-child(2) { border-right: 0; }
  .model-health-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .model-health-grid { grid-template-columns: 1fr; }
  .model-health-grid > div,
  .model-health-grid > div:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .model-health-grid > div:last-child { border-bottom: 0; }
}

/* Managed video quality matrix. */
.video-quality-list { display: grid; gap: 8px; }
.video-quality-row { min-height: 46px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.video-quality-row strong { color: var(--text); font-size: 13px; }
.video-quality-row span { color: var(--accent, var(--cyan)); font-size: 12px; font-weight: 700; }
