:root {
  --ink: #10151f;
  --muted: #667085;
  --paper: #f5f7fb;
  --line: #d9e0ea;
  --white: #fff;
  --teal: #10b7a5;
  --amber: #f4a51c;
  --red: #d84848;
  --blue: #2f6fed;
  --night: #111827;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.home-page {
  min-height: 100vh;
  background: #0c111b;
  color: var(--white);
  overflow-x: hidden;
}

#compute-scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: #0c111b;
}

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--teal);
  color: #051314;
  font-size: 13px;
}

.brand-mark img,
.market-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-mark.has-logo-image,
.market-logo-mark.has-logo-image {
  overflow: hidden;
  background: transparent;
}

.site-header nav, .console-sidebar nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.site-header nav a, .site-header nav button {
  padding: 8px 12px;
  color: rgba(255,255,255,.78);
  border: 0;
  background: transparent;
}

.site-header nav a:hover, .site-header nav button:hover { color: #fff; }

.site-header nav .nav-auth {
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  color: #fff;
}

.hero {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 80px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 44px;
  align-items: center;
  padding-bottom: 72px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(56px, 8vw, 116px);
  line-height: .92;
  letter-spacing: 0;
}

.hero-text {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255,255,255,.78);
  font-size: 20px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.primary-action, .secondary-action, .form-panel button, .inline-form button, .home-auth-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #061313;
  font-weight: 800;
}

.secondary-action, .ghost-button {
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: #fff;
}

.terminal-panel {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(10,16,26,.78);
  box-shadow: 0 24px 80px rgba(0,0,0,.38);
  backdrop-filter: blur(14px);
  border-radius: 8px;
  overflow: hidden;
}

.home-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.home-auth-tabs button {
  min-height: 40px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.74);
}

.home-auth-tabs button.active {
  background: var(--teal);
  color: #061313;
  border-color: var(--teal);
  font-weight: 800;
}

.home-auth-form {
  display: none;
  gap: 12px;
}

.home-auth-form.active {
  display: grid;
}

.home-auth-form h2, .center-header h2 {
  margin: 0;
  font-size: 24px;
}

.home-auth-form p {
  margin: 0 0 4px;
  color: rgba(255,255,255,.64);
  line-height: 1.6;
}

.home-auth-form input {
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.96);
}

.home-auth-message {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #e8fbf8;
  color: #075e55;
  overflow-wrap: anywhere;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5,10,18,.72);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  width: min(520px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,.16);
  background: #0f1624;
  color: #fff;
  box-shadow: 0 30px 100px rgba(0,0,0,.45);
  border-radius: 8px;
  padding: 22px;
}

.center-modal {
  width: min(1040px, 100%);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.center-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-right: 42px;
}

.center-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding-bottom: 12px;
}

.center-tabs button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.72);
}

.center-tabs button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #061313;
  font-weight: 800;
}

.center-panel {
  display: none;
  margin-top: 18px;
}

.center-panel.active {
  display: block;
}

.stat-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.center-modal .stat-grid > div,
.center-modal .table-shell,
.center-modal .settings-form {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}

.center-modal .stat-grid span,
.center-modal th,
.center-modal .settings-form label {
  color: rgba(255,255,255,.64);
}

.center-modal td {
  color: rgba(255,255,255,.86);
}

.copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.copy-row button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #061313;
  font-weight: 800;
  padding: 0 16px;
}

.center-modal input {
  background: rgba(255,255,255,.96);
}

.recharge-form {
  grid-template-columns: 1fr;
}

.recharge-packages {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.recharge-package-card {
  grid-column: auto;
  min-height: 138px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.recharge-package-card span {
  justify-self: start;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #e8fbf8;
  color: #078173;
  font-size: 12px;
  font-weight: 800;
}

.recharge-package-card strong {
  color: var(--ink);
  font-size: 18px;
}

.recharge-package-card em {
  color: var(--teal);
  font-size: 28px;
  font-style: normal;
  font-weight: 900;
}

.recharge-package-card small {
  color: var(--muted);
  font-size: 13px;
}

.recharge-package-card.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(16, 183, 165, .18);
}

.empty-recharge-packages {
  grid-column: 1 / -1;
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.terminal-top {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
}

.terminal-top span:nth-child(2) { background: var(--teal); }
.terminal-top span:nth-child(3) { background: #e76363; }
.terminal-top strong { margin-left: auto; font-size: 12px; color: rgba(255,255,255,.58); }

pre {
  margin: 0;
  padding: 24px;
  overflow: auto;
  color: #dbeafe;
  line-height: 1.65;
  font-size: 14px;
}

.metrics-band {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: -42px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}

.metrics-band div {
  padding: 24px;
  border-right: 1px solid rgba(255,255,255,.12);
}

.metrics-band div:last-child { border-right: 0; }
.metrics-band strong { display: block; font-size: 30px; color: #fff; }
.metrics-band span { color: rgba(255,255,255,.65); }

.content-section {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 86px auto;
}

.section-heading h2, .panel-heading h2, .auth-layout h1, .dashboard-header h1 {
  margin: 0;
  letter-spacing: 0;
}

.section-heading h2 { font-size: 42px; }
.model-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.model-card {
  min-height: 190px;
  padding: 20px;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
}

.model-card h3 { margin: 0 0 12px; font-size: 18px; }
.model-card p { color: rgba(255,255,255,.68); line-height: 1.6; }
.model-card code { color: var(--amber); overflow-wrap: anywhere; }

.price-lines {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: rgba(255,255,255,.68);
  font-size: 13px;
}

.price-lines strong {
  color: var(--amber);
  font-size: 14px;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,.58);
  border-top: 1px solid rgba(255,255,255,.12);
}

.site-icp:empty {
  display: none;
}

.console-page {
  min-height: 100vh;
  display: block;
  background: #eef2f7;
}

.console-page.console-authed {
  display: grid;
  grid-template-columns: 236px 1fr;
}

.console-sidebar {
  min-height: 100vh;
  padding: 22px;
  background: var(--night);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

@media (min-width: 981px) {
  .admin-page.console-authed .console-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow-y: auto;
  }
}

.console-sidebar nav {
  align-items: stretch;
  flex-direction: column;
}

.nav-item {
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,.7);
  text-align: left;
  padding: 0 12px;
}

.nav-item.active, .nav-item:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.console-sidebar small {
  margin-top: auto;
  color: rgba(255,255,255,.45);
}

.console-main {
  padding: 34px;
  min-width: 0;
}

.console-page:not(.console-authed) .console-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.auth-layout {
  width: min(1320px, calc(100vw - 48px));
  min-height: 0;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 28px;
  align-items: center;
}

.admin-login-layout {
  width: min(980px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: center;
}

.admin-login-copy h1 {
  margin: 0;
  font-size: 58px;
  letter-spacing: 0;
}

.admin-login-copy p {
  color: var(--muted);
  line-height: 1.8;
}

.admin-login-form {
  min-height: 280px;
}

.console-page.console-authed .auth-layout {
  min-height: calc(100vh - 68px);
}

.auth-layout h1 { font-size: 54px; }
.auth-layout p { color: var(--muted); line-height: 1.8; }

.auth-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-panel, .dashboard, .stat-grid > div, .table-shell, .model-row, .notice, .settings-form {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
}

.form-panel {
  padding: 22px;
  display: grid;
  gap: 12px;
}

.form-panel h2 { margin: 0 0 6px; }
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 118px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

.dashboard {
  padding: 24px;
}

.hidden { display: none !important; }

.dashboard-header, .panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.balance-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  white-space: nowrap;
}

.balance-pill strong {
  color: var(--ink);
  font-size: 20px;
}

.ghost-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.notice {
  margin: 18px 0;
  padding: 14px;
  color: #075e55;
  background: #e8fbf8;
  overflow-wrap: anywhere;
}

.panel { display: none; margin-top: 22px; }
.panel.active { display: block; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-grid > div {
  padding: 20px;
}

.stat-grid span {
  display: block;
  color: var(--muted);
}

.stat-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
}

.inline-form {
  display: flex;
  gap: 8px;
}

.inline-form input { width: 220px; }

.inline-model-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.inline-model-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.inline-model-form label.wide {
  grid-column: span 2;
}

.inline-model-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #061313;
  font-weight: 800;
  padding: 0 14px;
}

.table-shell {
  margin-top: 14px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

th, td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th { color: var(--muted); font-weight: 700; }
td code { color: var(--blue); }

.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 220px;
}

.row-actions button,
.ghost-light-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.compact-form {
  align-items: end;
}

.model-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.admin-model-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-model-summary div {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.admin-model-summary span {
  color: var(--muted);
  font-size: 13px;
}

.admin-model-summary strong {
  color: var(--ink);
  font-size: 26px;
}

.admin-model-toolbar {
  margin-top: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-model-toolbar h3 {
  margin: 0;
  font-size: 20px;
}

.admin-model-toolbar p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-model-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-model-tabs button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.admin-model-tabs button.active,
.admin-model-tabs button:hover {
  border-color: var(--teal);
  background: #e8fbf8;
  color: #075e55;
}

.admin-price-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-price-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .04);
}

.admin-price-card header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.admin-model-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #0f172a;
  color: #5df1cf;
  font-weight: 900;
}

.admin-price-card h3 {
  margin: 0;
  font-size: 18px;
}

.admin-price-card header p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.admin-model-status {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.admin-model-status.enabled {
  background: #e8fbf8;
  color: #078173;
}

.admin-model-status.disabled {
  background: #fff1f2;
  color: var(--red);
}

.admin-model-route {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f3f7fb;
}

.admin-model-route span {
  display: grid;
  place-items: center;
  min-height: 24px;
  border-radius: 6px;
  background: #e2eaf4;
  color: #31435d;
  font-size: 12px;
  font-weight: 800;
}

.admin-model-route code {
  color: var(--blue);
  overflow-wrap: anywhere;
}

.admin-price-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-price-metrics div {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.admin-price-metrics div.sale {
  border-color: #8fe5d8;
  background: #e8fbf8;
}

.admin-price-metrics span,
.admin-price-metrics em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.admin-price-metrics strong {
  color: var(--ink);
  font-size: 22px;
  overflow-wrap: anywhere;
}

.admin-price-metrics .sale strong {
  color: #078173;
  font-size: 26px;
}

.admin-price-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.admin-price-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.admin-price-form label.wide {
  grid-column: span 3;
}

.admin-price-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #061313;
  font-weight: 800;
  padding: 0 14px;
}

.model-row {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.model-row header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.model-row h3 { margin: 0; font-size: 17px; }
.model-row p { margin: 0; color: var(--muted); line-height: 1.6; }
.model-row pre {
  max-height: 220px;
  background: #111827;
  border-radius: 8px;
  color: #e5e7eb;
}

.console-model-catalog {
  margin-top: 14px;
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 8px;
  background: #07111f;
  color: #d7e7ff;
}

.console-model-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 18px;
  align-items: stretch;
}

.console-model-hero h2 {
  margin: 12px 0 0;
  color: #fff;
  font-size: 32px;
}

.console-model-hero p {
  max-width: 780px;
  margin: 8px 0 0;
  color: #9ab7dc;
  line-height: 1.7;
}

.console-model-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.console-model-stats div {
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid #21334a;
  border-radius: 8px;
  background: #101b2b;
}

.console-model-stats span {
  color: #82a0c2;
  font-size: 13px;
}

.console-model-stats strong {
  color: #fff;
  font-size: 24px;
}

.console-model-filter {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px 130px 62px 72px;
  gap: 8px;
  align-items: center;
  padding: 12px 20px;
  border-radius: 10px;
  background: #111e31;
}

.console-model-filter select,
.console-model-filter button {
  height: 34px;
  border: 1px solid #2b3d56;
  border-radius: 6px;
  background: #101b2b;
  color: #d7e7ff;
  padding: 0 12px;
}

.console-model-filter #console-model-search-btn {
  border-color: #55d7bd;
  background: #55cdb7;
  color: #061313;
  font-weight: 800;
}

.console-model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 16px;
}

.console-model-card {
  box-shadow: none;
}

.user-console-page {
  min-height: 100vh;
  background: #07111f;
}

.user-console-page.console-authed {
  grid-template-columns: 220px 1fr;
  color: #d7e7ff;
}

.user-console-page .console-sidebar {
  min-height: 100vh;
  padding: 0;
  border-right: 1px solid #1d2b3f;
  background: #0b1726;
  color: #d7e7ff;
}

@media (min-width: 961px) {
  .user-console-page.console-authed .console-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 8;
    width: 220px;
    height: 100vh;
    overflow-y: auto;
  }

  .user-console-page.console-authed .console-main {
    grid-column: 2;
  }
}

.user-console-page .console-sidebar .brand {
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid #1d2b3f;
  color: #fff;
}

.user-console-page .brand-mark {
  background: #55cdb7;
  color: #061313;
}

.user-console-page .console-sidebar nav {
  display: grid;
  gap: 5px;
  padding: 18px 8px;
}

.user-console-page .nav-group {
  padding: 14px 8px 8px;
  color: #6481a7;
  font-size: 12px;
}

.user-console-page .nav-item,
.user-console-page .nav-link {
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: #9bb8d8;
  text-align: left;
}

.user-console-page .nav-item.active,
.user-console-page .nav-item:hover,
.user-console-page .nav-link:hover {
  background: #123836;
  color: #5df1cf;
}

.user-console-page .console-sidebar small {
  padding: 0 16px 18px;
  color: #617c9d;
}

.user-console-page .console-main {
  min-height: 100vh;
  padding: 0;
  background: #07111f;
}

.user-console-page .user-console-dashboard {
  min-height: 100vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #07111f;
}

.console-topbar {
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 32px;
  border-bottom: 1px solid #1d2b3f;
  background: #101b2b;
}

.console-topbar nav,
.console-topbar > div {
  display: flex;
  align-items: center;
  gap: 24px;
}

.console-topbar a,
.console-topbar span {
  color: #bfd4f2;
  font-size: 14px;
}

.console-topbar a:hover,
.console-topbar span {
  color: #fff;
}

.user-console-content {
  padding: 30px 32px 50px;
}

.user-console-page .dashboard-header {
  align-items: flex-start;
}

.user-console-header {
  margin-bottom: 22px;
}

.user-console-header h1 {
  margin: 0;
  color: #fff;
  font-size: 34px;
}

.user-console-header p:not(.eyebrow) {
  max-width: 760px;
  margin: 8px 0 0;
  color: #9ab7dc;
  line-height: 1.7;
}

.user-console-page .panel {
  margin-top: 22px;
}

.user-console-page .panel-heading {
  min-height: 72px;
  padding: 18px 20px;
  border: 1px solid #21334a;
  border-radius: 8px;
  background: #101b2b;
}

.user-console-page .panel-heading h2 {
  margin: 0;
  color: #fff;
}

.user-console-page .panel-heading p {
  margin: 6px 0 0;
  color: #82a0c2;
}

.user-stat-grid > div,
.user-console-page .table-shell,
.user-console-page .notice,
.user-console-page .settings-form {
  border-color: #21334a;
  background: #101b2b;
  color: #d7e7ff;
}

.user-stat-grid > div {
  min-height: 128px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.user-stat-grid span {
  color: #82a0c2;
}

.user-stat-grid strong {
  margin: 0;
  color: #fff;
  font-size: 34px;
}

.user-stat-grid em {
  color: #6f8caf;
  font-size: 12px;
  font-style: normal;
}

.user-console-page .table-shell {
  border-radius: 8px;
}

.user-console-page table {
  color: #d7e7ff;
}

.user-console-page th,
.user-console-page td {
  border-bottom-color: #21334a;
}

.user-console-page th {
  color: #82a0c2;
}

.user-console-page td code {
  color: #5df1cf;
}

.user-console-page input {
  border-color: #2b3d56;
  background: #0f1b2d;
  color: #e6f0ff;
}

.user-console-page input::placeholder {
  color: #6f8caf;
}

.user-console-page .inline-form button,
.user-console-page .form-panel button,
.user-console-page .recharge-form > button {
  background: #55cdb7;
  color: #061313;
}

.user-console-page .recharge-package-card {
  border-color: #21334a;
  background: #111e31;
  color: #d7e7ff;
}

.user-console-page .recharge-package-card:hover,
.user-console-page .recharge-package-card.active {
  border-color: #55d7bd;
  background: #102521;
}

.user-console-page .recharge-package-card strong {
  color: #fff;
}

.user-console-page .recharge-package-card em {
  color: #5df1cf;
}

.user-console-page .recharge-package-card small {
  color: #8fa9c9;
}

.user-console-page .recharge-package-card span {
  background: #123836;
  color: #5df1cf;
}

.user-console-page .empty-recharge-packages {
  border-color: #2b3d56;
  color: #8fa9c9;
}

.user-console-page .ghost-button {
  border: 1px solid #2b3d56;
  background: #101b2b;
  color: #d7e7ff;
}

.user-console-page .ghost-button:hover {
  border-color: #55d7bd;
  color: #5df1cf;
}

.user-console-page .danger-button {
  border-color: #65394a;
  background: #2b1420;
  color: #ff8fa3;
}

.key-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.copy-key-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #276f64;
  border-radius: 8px;
  background: #102521;
  color: #5df1cf;
  font-weight: 800;
}

.copy-key-button:disabled {
  cursor: not-allowed;
  border-color: #2b3d56;
  background: #101b2b;
  color: #6f8caf;
  font-weight: 600;
}

.user-console-page .notice {
  color: #5df1cf;
  background: #102521;
}

.user-console-page:not(.console-authed) {
  color: #d7e7ff;
  background: #07111f;
}

.user-console-page:not(.console-authed) .console-main {
  background: #07111f;
}

.user-console-page .auth-layout {
  width: min(1180px, calc(100vw - 48px));
}

.user-console-page .auth-layout h1 {
  color: #fff;
}

.user-console-page .auth-layout p {
  color: #9ab7dc;
}

.user-console-page .form-panel {
  border-color: #21334a;
  background: #101b2b;
  color: #d7e7ff;
}

.user-console-page .form-panel h2 {
  color: #fff;
}

.user-console-page .console-model-catalog {
  padding: 0;
  background: transparent;
}

.user-console-page .market-model-card {
  background: #111e31;
  border-color: #14243a;
}

.user-console-page .market-model-card h2 {
  color: #fff;
}

.settings-form {
  margin-top: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.settings-form .wide,
.settings-form button {
  grid-column: 1 / -1;
}

.settings-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 4px;
}

.settings-section h3 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
}

.settings-form button {
  align-self: end;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #061313;
  font-weight: 800;
}

.settings-form .recharge-package-card {
  grid-column: auto;
  min-height: 138px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 400;
}

.user-console-page .settings-form .recharge-package-card {
  border-color: #21334a;
  background: #111e31;
  color: #d7e7ff;
}

.user-console-page .settings-form .recharge-package-card:hover,
.user-console-page .settings-form .recharge-package-card.active {
  border-color: #55d7bd;
  background: #102521;
}

.danger-button {
  border: 1px solid #f0b8b8;
  color: var(--red);
  background: #fff7f7;
  border-radius: 8px;
  min-height: 34px;
  padding: 0 10px;
}

.admin-page {
  background: #edf2f7;
}

.admin-page.console-authed {
  grid-template-columns: 236px minmax(0, 1fr);
}

.admin-page .console-sidebar {
  background: #101827;
  box-shadow: 12px 0 36px rgba(15, 23, 42, .08);
}

.admin-page .console-sidebar .brand {
  min-height: 62px;
}

.admin-page .nav-item {
  min-height: 40px;
  font-weight: 700;
}

.admin-page .nav-item.active {
  background: #263244;
}

.admin-page .console-main {
  padding: 10px 34px 34px;
}

.admin-page .dashboard {
  min-height: calc(100vh - 20px);
  border-color: #d5deea;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .06);
}

.admin-page .dashboard-header {
  min-height: 96px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
}

.admin-page .dashboard-header h1 {
  font-size: 34px;
}

.admin-page .panel-heading {
  min-height: 72px;
  padding: 18px 20px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-page .panel-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-page .stat-grid > div,
.admin-page .table-shell,
.admin-page .settings-form,
.admin-page .admin-price-card,
.admin-page .admin-model-toolbar {
  border-color: #dce4ef;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .04);
}

.admin-page .table-shell {
  border-radius: 8px;
  background: #fff;
}

.admin-page table {
  min-width: 960px;
}

.admin-page th {
  background: #f8fafc;
  color: #526276;
  font-size: 13px;
}

.admin-page td {
  height: 58px;
}

.admin-page .row-actions button,
.admin-page .ghost-light-button,
.admin-page .admin-card-actions button {
  min-height: 34px;
  border: 1px solid #d3dce8;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 0 12px;
  font-weight: 700;
}

.admin-page .row-actions button:hover,
.admin-page .ghost-light-button:hover,
.admin-page .admin-card-actions button:hover {
  border-color: var(--teal);
  color: #078173;
}

.admin-card-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.admin-page .admin-price-card {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.admin-page .admin-price-card:hover {
  transform: translateY(-2px);
  border-color: #a7f3e5;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 26px;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, .52);
  backdrop-filter: blur(8px);
}

.admin-modal-card {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 30px 100px rgba(15, 23, 42, .26);
}

.admin-modal-card header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
}

.admin-modal-card header span {
  color: #0e9f8c;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-modal-card header h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.admin-modal-close {
  width: 38px;
  height: 38px;
  border: 1px solid #d3dce8;
  border-radius: 8px;
  background: #fff;
  font-size: 24px;
  line-height: 1;
}

.admin-modal-body {
  padding: 22px;
}

.modal-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.modal-form label {
  display: grid;
  gap: 8px;
  color: #526276;
  font-size: 13px;
}

.modal-form .wide,
.modal-form button {
  grid-column: 1 / -1;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  border-color: #d3dce8;
  background: #fff;
}

.modal-form input:disabled {
  background: #f8fafc;
  color: #64748b;
}

.modal-form button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #061313;
  font-weight: 900;
}

.admin-page .row-actions .danger-button,
.admin-page .row-actions .danger-button:hover {
  border-color: #f0b8b8;
  background: #fff7f7;
  color: var(--red);
}

.password-form {
  max-width: 760px;
}

@media (max-width: 960px) {
  .hero, .auth-layout { grid-template-columns: 1fr; }
  .admin-login-layout { grid-template-columns: 1fr; }
  .terminal-panel { align-self: stretch; }
  .metrics-band, .model-grid, .stat-grid, .auth-forms { grid-template-columns: repeat(2, 1fr); }
  .admin-price-grid { grid-template-columns: 1fr; }
  .admin-model-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .console-page { grid-template-columns: 1fr; }
  .console-sidebar {
    min-height: auto;
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .console-sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .console-sidebar small { display: none; }
}

@media (max-width: 640px) {
  .site-header { align-items: flex-start; gap: 14px; flex-direction: column; }
  .site-header nav { flex-wrap: wrap; }
  .hero { min-height: auto; padding-top: 48px; }
  .metrics-band, .model-grid, .stat-grid, .auth-forms, .settings-form, .recharge-packages, .modal-form { grid-template-columns: 1fr; }
  .admin-modal { padding: 14px; }
  .admin-modal-card header { align-items: flex-start; }
  .admin-model-summary, .admin-price-metrics, .admin-price-form { grid-template-columns: 1fr; }
  .admin-model-toolbar { align-items: flex-start; flex-direction: column; }
  .admin-model-tabs { justify-content: flex-start; }
  .admin-price-card header { grid-template-columns: 44px minmax(0, 1fr); }
  .admin-model-status { grid-column: 1 / -1; justify-self: start; }
  .admin-model-route { grid-template-columns: 1fr; }
  .admin-price-form label.wide { grid-column: auto; }
  .metrics-band div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .site-footer, .dashboard-header, .panel-heading { align-items: flex-start; flex-direction: column; }
  .console-main { padding: 20px; }
  .auth-layout h1 { font-size: 38px; }
  .inline-form { width: 100%; flex-direction: column; }
  .inline-form input { width: 100%; }
  .inline-model-form { grid-template-columns: 1fr; }
  .inline-model-form label.wide { grid-column: auto; }
}

.model-market-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px 1fr;
  background: #07111f;
  color: #d7e7ff;
}

.market-sidebar {
  min-height: 100vh;
  border-right: 1px solid #1d2b3f;
  background: #0b1726;
  position: sticky;
  top: 0;
}

.market-logo {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid #1d2b3f;
  color: #fff;
}

.market-logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #57e0c2;
  font-size: 30px;
  line-height: 1;
}

.market-sidebar nav {
  display: grid;
  gap: 4px;
  padding: 18px 8px;
}

.market-sidebar nav span {
  padding: 14px 8px 8px;
  color: #6481a7;
  font-size: 12px;
}

.market-sidebar nav a {
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: #8eabc9;
}

.market-sidebar nav a.active,
.market-sidebar nav a:hover {
  background: #123836;
  color: #5df1cf;
}

.market-main {
  min-width: 0;
}

.market-topbar {
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid #1d2b3f;
  background: #101b2b;
}

.market-topbar nav,
.market-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.market-topbar a {
  color: #bfd4f2;
  font-size: 14px;
}

.market-topbar a.active,
.market-topbar a:hover {
  color: #fff;
}

.market-content {
  padding: 30px 32px 50px;
}

.market-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 18px;
  align-items: stretch;
}

.market-title {
  min-width: 0;
}

.market-kicker {
  display: inline-flex;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #276f64;
  border-radius: 6px;
  background: #102521;
  color: #62efd2;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.market-title h1 {
  margin: 0;
  padding-top: 12px;
  color: #fff;
  font-size: 32px;
}

.market-title p {
  margin: 8px 0 0;
  color: #86a2c3;
  line-height: 1.7;
  max-width: 820px;
}

.market-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.market-stats div {
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid #21334a;
  border-radius: 8px;
  background: #101b2b;
}

.market-stats span {
  color: #82a0c2;
  font-size: 13px;
}

.market-stats strong {
  color: #fff;
  font-size: 24px;
}

.category-tabs {
  margin-top: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-tabs button {
  min-height: 34px;
  border: 1px solid #243850;
  border-radius: 7px;
  background: #101b2b;
  color: #92adcb;
  padding: 0 14px;
  cursor: pointer;
}

.category-tabs button.active,
.category-tabs button:hover {
  border-color: #55d7bd;
  background: #123836;
  color: #67f2d5;
}

.market-filter {
  margin-top: 18px;
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px 130px 62px 72px 48px;
  gap: 8px;
  align-items: center;
  padding: 12px 20px;
  border-radius: 10px;
  background: #111e31;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 280px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #2b3d56;
  border-radius: 8px;
  color: #6f8caf;
}

.search-box input {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d7e7ff;
  outline: 0;
}

.market-filter select,
.market-filter button {
  height: 34px;
  border: 1px solid #2b3d56;
  border-radius: 6px;
  background: #101b2b;
  color: #d7e7ff;
  padding: 0 12px;
}

.market-filter button#model-search-btn,
.grid-toggle {
  border-color: #55d7bd;
  background: #55cdb7;
  color: #061313;
  font-weight: 800;
}

.model-count {
  margin: 18px 0 14px;
  color: #87a3c2;
  font-size: 14px;
}

.market-model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 16px;
}

.market-model-card {
  min-height: 386px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid #14243a;
  border-radius: 10px;
  background: #111e31;
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}

.market-model-card.featured {
  border-color: #35e0bd;
  box-shadow: 0 0 0 1px rgba(53,224,189,.18), 0 16px 40px rgba(0,0,0,.24);
}

.market-model-card header {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
}

.model-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #07111f;
  color: #fff;
  font-weight: 900;
  font-size: 22px;
}

.model-icon.google { color: #56a3ff; background: #152238; }
.model-icon.openai { color: #111; background: #fff; }
.model-icon.xai { color: #fff; background: #05080d; }
.model-icon.ark { color: #54e2ff; background: #12263a; }
.model-icon.human { color: #57e0c2; background: #102a2c; }
.model-icon.voice { color: #f4a51c; background: #2f2614; }

.market-model-card h2 {
  margin: 0 0 2px;
  color: #fff;
  font-size: 16px;
}

.market-model-card code {
  color: #7d97b8;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.model-type {
  align-self: start;
  padding: 3px 8px;
  border: 1px solid #42dbc0;
  border-radius: 6px;
  color: #62efd2;
  font-size: 12px;
}

.model-desc {
  min-height: 48px;
  margin: 16px 0 10px;
  color: #8ea7c7;
  line-height: 1.55;
  font-size: 13px;
}

.price-board,
.model-note,
.model-tags {
  border-radius: 8px;
  background: #19283d;
}

.price-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.price-board > div {
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid #21364d;
  border-radius: 7px;
  background: #111f33;
  padding: 10px;
}

.price-board .primary-price {
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: baseline;
  column-gap: 8px;
  border-color: #276f64;
  background: #102521;
}

.price-board span {
  color: #82a0c2;
  font-size: 12px;
}

.price-board strong {
  color: #fff;
  font-size: 20px;
}

.price-board .primary-price strong {
  color: #5df1cf;
  font-size: 34px;
}

.price-board em {
  color: #7f9abc;
  font-size: 12px;
  font-style: normal;
}

.model-note {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  color: #86a2c3;
  font-size: 12px;
}

.model-note span {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  border-radius: 5px;
  background: #263752;
  color: #dceaff;
  font-weight: 800;
}

.model-note code {
  color: #8eb0d4;
  overflow-wrap: anywhere;
}

.pricing-note {
  min-height: 38px;
  margin: 10px 0 0;
  color: #8fa9c9;
  font-size: 12px;
  line-height: 1.6;
}

.model-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 10px 12px;
}

.model-tags span {
  padding: 3px 7px;
  border-radius: 5px;
  background: #123a42;
  color: #4fe7c9;
  font-size: 12px;
}

.market-model-card footer {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
  color: #6f8caf;
  font-size: 12px;
}

.market-model-card footer a {
  margin-left: auto;
  color: #4fe7c9;
}

.market-model-card footer a + a {
  margin-left: 0;
}

.empty-models {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed #2b3d56;
  border-radius: 8px;
  color: #86a2c3;
  background: #101b2b;
}

.docs-page {
  min-height: 100vh;
  background: #07111f;
  color: #d7e7ff;
}

.docs-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 17, 31, .94);
  border-bottom: 1px solid #1d2b3f;
  backdrop-filter: blur(14px);
}

.docs-header nav a {
  color: #bfd4f2;
}

.docs-header nav a.active,
.docs-header nav a:hover {
  color: #5df1cf;
}

.docs-shell {
  width: min(1500px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 30px 0 42px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
}

.docs-aside {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid #21334a;
  border-radius: 8px;
  background: #101b2b;
}

.docs-aside > span,
.docs-titlebar span {
  color: #5df1cf;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.docs-aside h1 {
  margin: 0;
  color: #fff;
  font-size: 30px;
}

.docs-aside p {
  margin: 0;
  color: #8ea7c7;
  line-height: 1.7;
}

.docs-auth-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #276f64;
  border-radius: 8px;
  background: #102521;
}

.docs-auth-card strong {
  color: #fff;
}

.docs-auth-card code {
  color: #5df1cf;
  overflow-wrap: anywhere;
}

.docs-aside a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2b3d56;
  border-radius: 7px;
  color: #d7e7ff;
  background: #111f33;
}

.docs-aside a:hover {
  border-color: #55d7bd;
  color: #5df1cf;
}

.docs-nav-panel {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid #21334a;
}

.docs-nav-panel > strong {
  color: #fff;
  font-size: 14px;
}

.docs-nav-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 430px);
  overflow: auto;
  padding-right: 4px;
}

.docs-nav-list a {
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas:
    "num cat"
    "num name";
  align-items: center;
  justify-content: stretch;
  column-gap: 10px;
  padding: 10px;
  border: 1px solid #233852;
  border-radius: 7px;
  color: #d7e7ff;
  background: #0b1728;
}

.docs-nav-list a span {
  grid-area: num;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #061313;
  background: #5df1cf;
  font-size: 12px;
  font-weight: 900;
}

.docs-nav-list a em {
  grid-area: cat;
  min-width: 0;
  color: #83a1c5;
  font-size: 12px;
  font-style: normal;
  line-height: 1.2;
}

.docs-nav-list a strong {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 14px;
}

.docs-nav-list a:hover {
  border-color: #5df1cf;
  background: #102521;
}

.docs-content {
  min-width: 0;
  border: 1px solid #21334a;
  border-radius: 8px;
  background: #101b2b;
  overflow: hidden;
}

.docs-titlebar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid #21334a;
  background: #111e31;
}

.docs-titlebar h2 {
  margin: 6px 0 0;
  color: #fff;
  font-size: 22px;
}

.docs-titlebar a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 7px;
  background: #55cdb7;
  color: #061313;
  font-weight: 800;
}

.docs-section-list {
  display: grid;
  gap: 16px;
  min-height: calc(100vh - 230px);
  padding: 18px;
  background: #0b1524;
}

.docs-section {
  overflow: hidden;
  border: 1px solid #21334a;
  border-radius: 8px;
  background: #101b2b;
  scroll-margin-top: 96px;
}

.docs-section header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #21334a;
  background: #111e31;
}

.docs-section header span {
  color: #5df1cf;
  font-size: 12px;
  font-weight: 800;
}

.docs-section h2 {
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 9px;
  color: #fff;
  font-size: 22px;
  letter-spacing: 0;
}

.docs-section h2 small {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid #2f6f68;
  border-radius: 999px;
  color: #5df1cf;
  background: #102521;
  font-size: 12px;
  font-weight: 800;
}

.docs-section header code {
  flex: 0 1 auto;
  max-width: min(420px, 48%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 10px;
  border: 1px solid #2b3d56;
  border-radius: 7px;
  color: #bfe3ff;
  background: #0b1728;
}

.docs-section pre,
.docs-pre {
  margin: 0;
  padding: 20px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  color: #dceaff;
  background: #0b1524;
  font-size: 14px;
  line-height: 1.78;
  font-family: Consolas, Monaco, "Microsoft YaHei", monospace;
}

.docs-footer {
  width: min(1500px, calc(100vw - 48px));
  color: #86a2c3;
}

@media (max-width: 1280px) {
  .market-model-grid { grid-template-columns: repeat(3, minmax(240px, 1fr)); }
  .market-hero { grid-template-columns: 1fr; }
  .console-model-hero { grid-template-columns: 1fr; }
  .console-model-grid { grid-template-columns: repeat(3, minmax(240px, 1fr)); }
}

@media (max-width: 980px) {
  .model-market-page { grid-template-columns: 1fr; }
  .market-sidebar { display: none; }
  .market-model-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .market-filter { grid-template-columns: 1fr 1fr; }
  .market-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .docs-shell { grid-template-columns: 1fr; }
  .docs-aside { position: static; }
  .docs-nav-list { max-height: none; }
  .console-model-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .console-model-filter { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .market-topbar { padding: 0 16px; }
  .market-topbar nav { gap: 12px; overflow: auto; }
  .market-content { padding: 22px 16px 38px; }
  .market-model-grid { grid-template-columns: 1fr; }
  .market-filter { grid-template-columns: 1fr; }
  .search-box { max-width: none; }
  .market-stats { grid-template-columns: 1fr; }
  .price-board { grid-template-columns: 1fr; }
  .price-board .primary-price { grid-template-columns: 1fr; }
  .model-note { grid-template-columns: 1fr; }
  .docs-shell, .docs-footer { width: min(100% - 32px, 1500px); }
  .docs-titlebar { align-items: flex-start; flex-direction: column; }
  .docs-section-list { padding: 12px; }
  .docs-section header { align-items: flex-start; flex-direction: column; padding: 16px; }
  .docs-section h2 { font-size: 19px; }
  .docs-section header code { max-width: 100%; }
  .docs-section pre, .docs-pre { padding: 16px; font-size: 13px; }
  .console-model-catalog { padding: 16px; }
  .console-model-stats, .console-model-grid, .console-model-filter { grid-template-columns: 1fr; }
}
