/* Chợ Bán Tool · shared sky palette. Loaded last for the entire application. */
:root {
  color-scheme: light;
  --ink: #10283f;
  --forest: #0089d7;
  --green: #007dc3;
  --muted: #526d87;
  --border: #d3e9f8;
  --paper: #f5fbff;
  --lime: #e3f5ff;
  --white: #fff;
  --shadow: 0 12px 40px #1979b410;
  --sky: #008bdc;
  --sky-deep: #0069a9;
  --sky-wash: #edf8ff;
  --sky-border: #cce6f7;
}
body.api-first-mode { background: #f6fbff; color: var(--ink); }
.main-shell { position: relative; isolation: isolate; }
.main-shell::before {
  content: ''; position: absolute; inset: 70px 0 auto; height: 540px;
  pointer-events: none; z-index: -2;
  background: linear-gradient(180deg, #d8f3ff 0%, #ecfaff 62%, #f6fbff 100%);
}
.main-shell::after {
  content: ''; position: absolute; inset: 64px 0 auto; height: 490px;
  pointer-events: none; z-index: -1;
  background:
    radial-gradient(ellipse 31% 25% at 9% 10%, #fffffff5 0%, #ffffffd9 48%, #fff0 78%),
    radial-gradient(ellipse 20% 25% at 29% 17%, #fffffff2 0%, #ffffffbe 42%, #fff0 77%),
    radial-gradient(ellipse 34% 30% at 91% 22%, #fffffff5 0%, #ffffffdb 45%, #fff0 79%),
    radial-gradient(ellipse 24% 19% at 70% 38%, #ffffffeb 0%, #ffffffbf 43%, #fff0 80%),
    radial-gradient(ellipse 36% 32% at 52% 6%, #63d4f466 0%, #63d4f400 78%);
  animation: sky-drift 28s ease-in-out infinite alternate;
  transform-origin: center top;
}
@keyframes sky-drift { from { transform: translateY(0) scale(1); opacity: .88; } to { transform: translateY(12px) scale(1.025); opacity: 1; } }
body.api-first-mode .sidebar { background: #fffffffa; border-color: var(--sky-border); color: var(--ink); }
body.api-first-mode .brand { color: #10283f; }
body.api-first-mode .brand-mark { background: linear-gradient(135deg, #0099ec, #007bc9); color: white; box-shadow: 0 5px 14px #008bdb20; }
body.api-first-mode .brand-sub, body.api-first-mode .nav-caption, body.api-first-mode .sidebar-copy { color: #5c7a94; }
body.api-first-mode .nav-item { color: #486780; }
body.api-first-mode .nav-item.active { background: #e7f5ff; color: #0078c1; box-shadow: inset 3px 0 #0097e7; }
body.api-first-mode .nav-item:hover { background: #f0f9ff; color: #0078c1; }
body.api-first-mode .nav-dot { background: #0095e3; }
body.api-first-mode .api-nav { border-color: #d9edf9; }
body.api-first-mode .nav-rule { background: #e0eef7; }
.api-new { background: #e0f4ff; color: #0079ba; }
body.api-first-mode .workspace-note { background: linear-gradient(145deg, #edfaff, #f7fcff); color: #173f5d; border-color: #d1eaf9; }
body.api-first-mode .workspace-note p, body.api-first-mode .ecosystem { color: #526f88; }
body.api-first-mode .note-link, .note-symbol, .eco-icon { color: #0081c9; }
body.api-first-mode .topbar { background: #fffffff2; border-color: #d9edf8; backdrop-filter: blur(12px); }
body.api-first-mode .breadcrumb { color: #56738b; }
body.api-first-mode .breadcrumb strong { color: #193a53; }
body.api-first-mode .build-badge { background: #edf7ff; color: #416b89; border: 1px solid #d6eaf8; }
body.api-first-mode .account-button { background: white; border-color: #bedff5; color: #0085d0; box-shadow: 0 2px 8px #168dd006; }
body.api-first-mode .account-button:hover { background: #edf8ff; }
body.api-first-mode .icon-button { color: #27769f; }
body.api-first-mode .icon-button:hover { background: #eaf6ff; }
body.api-first-mode footer, body.api-first-mode footer button { color: #58768e; }
body.api-first-mode .footer-brand { color: #007ec4; }
body.api-first-mode footer { border-color: var(--sky-border); }
body.api-first-mode .api-console { color: var(--ink); background: transparent; }
body.api-first-mode .api-titlebar { padding: 17px 0 3px; }
.api-console h1 { color: #10283f; letter-spacing: -1px; }
.api-console p { color: #4d6a83; }
.api-kicker { color: #007dbb; }
.api-console .api-count { color: #0076b7; background: #ffffffdb; border-color: #b8dff5; }
.api-tabs { border-color: #cde6f6; }
.api-tabs button { color: #47667f; }
.api-tabs button:hover { background: #e8f6ff; }
.api-tabs button.active { color: #006fae; background: #ffffffed; box-shadow: 0 3px 11px #1988c20d; }
.api-toolbar input, .api-console select, .playground-work textarea {
  color: #183b55; background: #fff; border-color: #c9e2f4;
  box-shadow: 0 2px 6px #287caf04;
}
.api-console input::placeholder, .playground-work textarea::placeholder { color: #6c859c; }
.api-caption, .api-refresh, .api-console .muted { color: #506f88; }
.api-model-card, .channel-card, .api-stat, .overview-tile,
.api-group-summary, .chart-panel, .price-group, .playground-settings,
.playground-work, .docs-section, .docs-toc {
  background: #ffffffed; border-color: var(--sky-border); box-shadow: 0 7px 25px #2387bf08;
}
.api-model-card h2, .channel-heading h2, .api-empty h2, .api-stat strong,
.channel-metrics strong, .api-console .api-doc-title, .api-console .section-mini-title,
.chart-panel h2, .playground-settings h2, .playground-welcome h2,
.docs-section>h2, .docs-intro h2 { color: #13344f; }
.api-model-label>span:first-child, .channel-icon, .overview-icon, .recent-symbol {
  background: linear-gradient(135deg, #e8f8ff, #c4ebff); color: #0088d3;
}
.api-model-label>small, .api-stat span, .section-mini-title small,
.overview-tile label, .overview-tile small, .group-mini span,
.api-model-prices, .channel-heading small, .channel-metrics label,
.channel-metrics strong small, .channel-availability span, .channel-history-head,
.channel-history-foot, .api-legend, .recent-api-row small, .quick-panel small,
.model-filter-line>label, .price-group>header p, .model-price-table td small,
.playground-settings>label, .playground-form-bottom>span { color: #536f88; }
.api-model-prices, .channel-availability, .model-breakdown>div, .price-tier+.price-tier { border-color: #deedf7; }
.api-model-prices strong, .group-mini b, .model-breakdown span,
.recent-api-row strong, .quick-panel strong, .chat-message>div { color: #183b55; }
.api-console .api-button, .button.dark, .button.primary {
  border: 1px solid #007bc2; background: #007bc2; color: white;
  box-shadow: 0 4px 10px #008bdc14;
}
.api-console .api-button:hover, .button.dark:hover, .button.primary:hover { background: #0079c2; border-color: #0079c2; filter: none; }
.api-console .api-button.secondary, .api-console .api-model-card [data-api-example], .button.outline {
  background: white; color: #0079bd; border-color: #c4e1f5; box-shadow: none;
}
.api-console .api-button.secondary:hover, .button.outline:hover { background: #eff9ff; }
.api-info { background: #eef9ff; color: #385d78; border-color: #cbe6f6; }
.api-empty { background: #ffffffd9; border-color: #bcddef; color: #54728a; }
.api-empty p { color: #54728a; }
.api-table-wrap { border-color: var(--sky-border); background: white; }
.api-console th, .api-console .model-price-table th { background: #eff8ff!important; color: #476a85; }
.api-console td { border-color: #e0eef8; color: #1c405c; }
.api-console tbody tr:hover { background: #f6fbff; }
.api-console code { background: #eaf6ff; color: #006caa; }
.api-console pre { background: #f5faff; color: #174d6d; border-color: #d3e7f5; }
.api-status-controls button { background: white; color: #4c6d86; border-color: #cfe5f5; }
.api-status-controls button.active { background: #e4f4ff; color: #0079bd; border-color: #9ed5f5; }
.channel-metrics>div { background: #f6fbff; border-color: #dcecf7; }
.channel-state { background: #edf4f9; color: #4d6d86; }
.channel-state.operational { background: #e5f7ee; color: #177246; }
.channel-state.degraded { background: #fff4d6; color: #8e5d06; }
.channel-state.error { background: #ffecef; color: #b32c45; }
.channel-availability strong, .api-success { color: #13754d; }
.channel-availability strong.unknown { color: #59758b; }
.channel-bar { background: #dce9f3; }
/* Traffic colors retain their operational meaning. */
.channel-bar.operational { background: #20b889; }
.channel-bar.degraded { background: #e9ad35; }
.channel-bar.error { background: #ed6672; }
.overview-tile strong, .recent-api-row>div:last-child strong { color: #007fc1; }
.overview-icon.color-1 { background: #e1f0ff; color: #277bd2; }
.overview-icon.color-2 { background: #e7f7ed; color: #218456; }
.overview-icon.color-3 { background: #f0eaff; color: #8558cb; }
.group-mini { border-color: #d4e8f6; background: #f9fcff; }
.group-mini strong { color: #24649b!important; }
.dashboard-period { border-color: #d0e6f5; background: #f8fcff; }
.model-breakdown small { color: #0079bd; }
#modelDonut svg>circle:first-child { stroke: #e0eff8; }
#modelDonut text { fill: #53758f; }
#modelDonut text:first-of-type { fill: #183e5a; }
#tokenLineChart line { stroke: #dceaf5; }
#tokenLineChart text { fill: #52758f; }
.chart-legend span:nth-child(1) { color: #286fc2!important; }
.chart-legend span:nth-child(2) { color: #16805d!important; }
.chart-legend span:nth-child(3) { color: #147b96!important; }
.chart-legend span:nth-child(4) { color: #9a6415!important; }
.recent-api-row, .quick-panel>button { background: #f6fbff; border-color: #d8eaf7; color: #3b6685; }
.quick-panel>button>span { color: #0086cf; }
.quick-panel>button:hover { background: #edf8ff; }
.model-filter-line button { color: #4b6b84; border-color: #cbe4f5; background: #ffffffdb; }
.model-filter-line button.active { color: white; background: #007bc2; border-color: #007bc2; }
.price-group>header { background: linear-gradient(110deg, #f0faff, #fff); }
.price-group>header strong, .group-symbol, .model-doc-link { color: #007abf; }
.model-number { color: #19729e; background: #e1f2fd; }
.price-group .api-table-wrap { border-color: #d6eaf7; }
.model-price-table code, .model-copy { color: #486b88; }
.rate-highlight { color: #0079ba!important; }
.price-tier span { color: #176387; }
.price-tier span>small { color: #526f88; }
.price-tier>small.tier-label { color: #4f708a; background: #eef7fd; }
.playground-work form { border-color: #d5e8f6; background: #f9fcff; }
.playground-output { background: linear-gradient(180deg, #fff, #f9fdff); }
.playground-welcome>span { color: #0094df; }
.chat-message { background: #f1f9ff; border-color: #d4e8f7; }
.chat-message.user { background: #e5f4ff; border-color: #b9dff7; }
.chat-message>strong { color: #007bbd; }
.docs-intro { background: linear-gradient(120deg, #e2f7ffcc, #ffffffed); border-color: #bee3f7; box-shadow: 0 9px 30px #168cc209; }
.docs-intro p, .docs-section p, .docs-section li { color: #496b86; }
.docs-section h3 { color: #17628e; }
.docs-toc>strong { color: #5a7b94; }
.docs-toc a { color: #436984; }
.docs-toc a:hover, .docs-toc a:focus-visible { background: #e9f7ff; color: #0079bd; }
.docs-steps strong { color: #1a3d57; }
.docs-steps li:before { background: #e5f5ff; color: #007cc3; border-color: #b9e0f7; }
.docs-code { background: #f7fbff; border-color: #cce5f5; }
.docs-code>div { background: #edf7ff; }
.docs-code>div>span { color: #426a87; }
.docs-code pre code { color: #13577d!important; }
.docs-client-toc { border-color: #c8e4f5; }
.docs-client-toc a { color: #4d7592; }
.docs-client { border-color: #dcecf7; }
.docs-client-links a { background: #f0f9ff; border-color: #cde6f7; color: #0078b9; }
.docs-official { color: #007fc6; text-decoration: underline; text-underline-offset: 3px; }
dialog { background: #fff; color: #18374e; border: 1px solid #cbe4f6; box-shadow: 0 30px 100px #0a568c26; }
dialog::backdrop { background: #10365052; backdrop-filter: blur(5px); }
.dialog-eyebrow, .text-button, .form-links a { color: #007fc4; }
.dialog-title { color: #15374f; }
.dialog-copy, .form-field, .form-hint { color: #526e85; }
.dialog-close { color: #3b7397; background: #f0f8ff; }
.form-field input, .form-field textarea, .form-field select { color: #163b56; background: #fbfdff; border-color: #cce3f4; }
input:focus, textarea:focus, select:focus { outline-color: #44a9e4; }
button:focus-visible, a:focus-visible { outline-color: #44a9e4; }
.cbt-auth-tabs { background: #edf7ff; }
.cbt-auth-tabs button { color: #55738d; }
.cbt-auth-tabs button.active { color: #007cc1; background: #fff; box-shadow: 0 2px 8px #1573af12; }
.cbt-auth-divider { background: #dcecf7; }
.cbt-auth-divider span { color: #61819a; }
.cbt-email-verify { background: #f2faff; border-color: #cce6f6; }
.cbt-consent { color: #506e86; }
.cbt-consent input { accent-color: #008bdc; }
.cbt-consent a { color: #0079bf; }
.api-copy-secret { background: #eef8ff; color: #1b557a; }
.toast { background: #123e5c; color: #fff; box-shadow: 0 8px 30px #126a9d26; }
.empty-state { border-color: #cce5f5; color: #55758d; }
.detail-price { color: #007fc8; }
/* The marketplace's existing components share the palette when opened. */
.hero { background: linear-gradient(120deg, #c8efff, #f1fbff); color: #133a55; }
.hero h2, .hero p { color: #133a55; }
.product-card, .bottom-banner, .order-card, .stat-tile { background: #fff; border-color: #d2e8f7; }
.product-art.api { background: #e4f6ff; }
.product-tag, .category-tab.active { background: #e5f5ff; color: #007bc0; }
@media(max-width:760px) {
  .main-shell::before { height: 410px; }
  .main-shell::after { height: 370px; }
  body.api-first-mode .sidebar { background: #fff; box-shadow: 10px 0 40px #155b861c; }
  body.api-first-mode .api-titlebar { padding-top: 7px; }
}
@media(prefers-reduced-motion:reduce) { .main-shell::after { animation: none; } }
