/* =========================================================
   Covect UI · pages
   ========================================================= */

/* =========================== HOME =========================== */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 18px;
  align-items: start;
}
.home-main { display: flex; flex-direction: column; min-width: 0; }
.home-rail { display: flex; flex-direction: column; gap: 13px; }

.hello { margin-bottom: 15px; }
.hello h1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.hello .wave { font-size: 19px; line-height: 1; margin-right: -2px; }
.hello-sub { margin-top: 7px; font-size: 11.5px; color: var(--text-2); }
.badge-version {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 9px;
  border: 1px solid rgba(167, 139, 250, 0.32);
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(139, 92, 246, 0.24), rgba(91, 33, 182, 0.16));
  color: #d5c8ff;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
[data-theme="light"] .badge-version { color: #6d3df5; }

/* hero */
.hero {
  position: relative;
  min-height: 202px;
  padding: 26px 28px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.24);
  border-radius: 20px;
  background:
    radial-gradient(120% 150% at 82% 18%, rgba(167, 139, 250, 0.5), transparent 58%),
    radial-gradient(90% 120% at 4% 100%, rgba(76, 29, 149, 0.75), transparent 62%),
    linear-gradient(112deg, #4b1fa1 0%, #35176f 42%, #1d1245 100%);
  box-shadow: 0 34px 80px -56px rgba(109, 40, 217, 1), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(75% 100% at 66% 30%, rgba(0, 0, 0, 0.75), transparent 78%);
  -webkit-mask-image: radial-gradient(75% 100% at 66% 30%, rgba(0, 0, 0, 0.75), transparent 78%);
  opacity: 0.6;
}
.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -120px;
  width: 420px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 181, 253, 0.35), transparent 66%);
  filter: blur(30px);
  z-index: -1;
}
.hero-copy { position: relative; z-index: 2; max-width: 430px; }
.hero-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: rgba(226, 217, 255, 0.6);
}
.hero h2 {
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 26px rgba(76, 29, 149, 0.7);
  line-height: 1.2;
}
.hero p {
  margin-top: 9px;
  font-size: 11px;
  color: rgba(232, 226, 255, 0.72);
  letter-spacing: 0.01em;
}
.hero-feats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
}
.hero-feats li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: rgba(235, 229, 255, 0.78);
}
.hero-feats .ico { width: 12px; height: 12px; color: rgba(221, 214, 254, 0.9); }

.hero-art {
  position: absolute;
  right: 6px;
  top: 0;
  bottom: 0;
  width: 290px;
  display: grid;
  place-items: center;
  perspective: 900px;
  pointer-events: none;
}
.hero-stage { position: relative; width: 250px; height: 210px; transform: translateY(-2px); }
.orbit {
  position: absolute;
  left: 50%;
  top: 54%;
  border: 1px solid rgba(221, 214, 254, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(74deg);
}
.orbit-1 { width: 250px; height: 250px; }
.orbit-2 { width: 176px; height: 176px; border-color: rgba(221, 214, 254, 0.12); }
.orbit-3 { width: 320px; height: 320px; border-color: rgba(221, 214, 254, 0.08); }
.cube {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  transform-style: preserve-3d;
  animation: cubeSpin 26s linear infinite;
}
@keyframes cubeSpin {
  from { transform: rotateX(-22deg) rotateY(-36deg); }
  to { transform: rotateX(-22deg) rotateY(324deg); }
}
.cube .face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(224, 214, 255, 0.5);
  background: linear-gradient(145deg, rgba(196, 181, 253, 0.42), rgba(93, 42, 190, 0.2));
  box-shadow: inset 0 0 26px rgba(196, 181, 253, 0.3), 0 0 18px rgba(167, 139, 250, 0.12);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 34px;
  font-weight: 700;
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.55);
}
.cube .f1 { transform: translateZ(42px); }
.cube .f2 { transform: rotateY(180deg) translateZ(42px); }
.cube .f3 { transform: rotateY(90deg) translateZ(42px); }
.cube .f4 { transform: rotateY(-90deg) translateZ(42px); }
.cube .f5 { transform: rotateX(90deg) translateZ(42px); }
.cube .f6 { transform: rotateX(-90deg) translateZ(42px); }
.hero-platform {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 210px;
  height: 52px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(196, 181, 253, 0.55), rgba(109, 40, 217, 0.2) 52%, transparent 72%);
  filter: blur(7px);
}
.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(20, 12, 46, 0.35);
  color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  transition: 0.18s ease;
}
.hero-nav:hover { background: rgba(139, 92, 246, 0.5); color: #fff; border-color: rgba(221, 214, 254, 0.5); }
.hero-nav.prev { left: 10px; }
.hero-nav.next { right: 10px; }
.hero-nav .ico { width: 13px; height: 13px; }
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 3;
  display: flex;
  gap: 5px;
  transform: translateX(-50%);
}
.hero-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  transition: 0.2s ease;
}
.hero-dots i.on { width: 12px; border-radius: 3px; background: rgba(233, 226, 255, 0.9); }

/* home quick stats */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-top: 13px;
}
.quick-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.quick-stat:hover { transform: translateY(-2px); border-color: rgba(139, 92, 246, 0.42); }
.qs-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 10px;
  flex: none;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 18px -12px rgba(0, 0, 0, 0.9);
}
.qs-icon .ico { width: 16px; height: 16px; }
.qs-icon.t-a { background: linear-gradient(150deg, #8b5cf6, #5b21b6); box-shadow: 0 8px 20px -10px rgba(124, 58, 237, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.qs-icon.t-b { background: linear-gradient(150deg, #38bdf8, #1d4ed8); box-shadow: 0 8px 20px -10px rgba(37, 99, 235, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.qs-icon.t-c { background: linear-gradient(150deg, #2dd4bf, #0f766e); box-shadow: 0 8px 20px -10px rgba(13, 148, 136, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.qs-icon.t-d { background: linear-gradient(150deg, #f472b6, #9d174d); box-shadow: 0 8px 20px -10px rgba(190, 24, 93, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.qs-body { min-width: 0; }
.qs-label { display: block; font-size: 9.5px; color: var(--text-3); white-space: nowrap; }
.qs-value {
  display: block;
  margin-top: 2px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.qs-value small { font-size: 11px; font-weight: 500; color: var(--text-3); }
.qs-arrow { margin-left: auto; color: var(--text-3); opacity: 0.7; }
.qs-arrow .ico { width: 12px; height: 12px; }

/* home models */
.models-panel { margin-top: 13px; }
.models-panel .tabs-row { padding: 11px 16px; }
.model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 0 16px 16px;
}
.model-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
  transition: 0.17s ease;
}
.model-tile:hover {
  border-color: rgba(139, 92, 246, 0.42);
  background: rgba(139, 92, 246, 0.07);
  transform: translateY(-1px);
}
.model-tile-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.m-logo {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 6px;
  flex: none;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 10px -6px var(--c1);
}
.m-name {
  font-size: 11px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.m-desc {
  font-size: 9px;
  line-height: 1.45;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 1px; }
.model-grid.is-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.model-grid.is-list .model-tile { flex-direction: row; align-items: center; }
.model-grid.is-list .model-tile-top { flex: 1; }
.model-grid.is-list .m-desc { display: none; }
.model-grid.is-list .m-foot { margin-top: 0; }

.models-empty {
  grid-column: 1 / -1;
  padding: 26px 10px;
  text-align: center;
  font-size: 10.5px;
  color: var(--text-3);
}

/* home rail */
.rail-card { padding: 15px 16px; }
.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.rail-head h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
.rail-head h3 .ico { width: 13px; height: 13px; color: var(--accent-text); }

.plan-card { overflow: hidden; }
.plan-card .rail-head { margin-bottom: 10px; }
.plan-card .rail-head .ico { color: #fbbf24; }
.plan-row { display: flex; align-items: center; gap: 9px; }
.plan-crown {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.2);
}
.plan-crown .ico { width: 14px; height: 14px; }
.plan-meta { min-width: 0; }
.plan-meta small { display: block; font-size: 9px; color: var(--text-3); }
.plan-meta strong { display: block; font-size: 12px; font-weight: 600; margin-top: 1px; }
.plan-row .btn { margin-left: auto; }

.kv-list { margin-top: 12px; border-top: 1px solid var(--line); }
.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  font-size: 10px;
}
.kv-row + .kv-row { border-top: 1px solid rgba(255, 255, 255, 0.035); }
[data-theme="light"] .kv-row + .kv-row { border-top-color: rgba(24, 18, 54, 0.05); }
.kv-row .k { color: var(--text-3); }
.kv-row .v { color: var(--text-2); display: inline-flex; align-items: center; gap: 5px; }
.kv-row .v .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--success); box-shadow: 0 0 6px var(--success); }

.plan-feats { margin-top: 11px; display: flex; flex-direction: column; gap: 7px; }
.plan-feats li { display: flex; align-items: flex-start; gap: 6px; font-size: 9.5px; color: var(--text-2); line-height: 1.5; }
.plan-feats .ico { width: 11px; height: 11px; margin-top: 1px; color: var(--success); }
.plan-art {
  position: absolute;
  right: -14px;
  bottom: -16px;
  width: 120px;
  height: 90px;
  opacity: 0.32;
  pointer-events: none;
  filter: drop-shadow(0 0 22px rgba(251, 191, 36, 0.35));
}

.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 11px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.022);
  font-size: 9.5px;
  color: var(--text-2);
  transition: 0.17s ease;
}
.tool .ico { width: 14px; height: 14px; color: var(--text-2); }
.tool:hover { border-color: rgba(139, 92, 246, 0.45); background: rgba(139, 92, 246, 0.09); color: var(--text); transform: translateY(-1px); }
.tool:hover .ico { color: var(--accent-text); }

.notice-list { display: flex; flex-direction: column; }
.notice-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 0;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--text-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
[data-theme="light"] .notice-item { border-bottom-color: rgba(24, 18, 54, 0.055); }
.notice-item:last-child { border-bottom: 0; padding-bottom: 0; }
.notice-item:first-child { padding-top: 0; }
.notice-item .dot { width: 4px; height: 4px; margin-top: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.notice-item time { display: block; margin-top: 2px; font-size: 8.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.doc-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: var(--shadow-card);
  transition: 0.18s ease;
}
.doc-card:hover { border-color: rgba(139, 92, 246, 0.4); transform: translateY(-1px); }
.doc-card-ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex: none;
  color: #e6dcff;
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.85), rgba(76, 29, 149, 0.9));
  box-shadow: 0 8px 18px -10px rgba(124, 58, 237, 1);
}
.doc-card-ico .ico { width: 15px; height: 15px; }
.doc-card h4 { font-size: 11px; font-weight: 600; }
.doc-card p { margin-top: 3px; font-size: 8.5px; color: var(--text-3); line-height: 1.4; }
.doc-card > .ico { margin-left: auto; width: 11px; height: 11px; color: var(--text-3); }

/* quick start */
.start-card {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 13px;
  padding: 15px 18px;
  overflow: hidden;
}
.start-art {
  position: relative;
  width: 108px;
  height: 74px;
  flex: none;
  display: grid;
  place-items: center;
}
.chip-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(167, 139, 250, 0.32);
  border-radius: 13px;
  color: #ede9fe;
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.5), rgba(49, 23, 102, 0.9));
  box-shadow: 0 0 26px rgba(124, 58, 237, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: rotate(-6deg);
}
.chip-art .ico { width: 22px; height: 22px; }
.chip-art::before,
.chip-art::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 70px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.45), transparent);
}
.chip-art::before { top: -9px; }
.chip-art::after { bottom: -9px; }
.start-body { min-width: 0; flex: 1; }
.start-body h3 { font-size: 12px; font-weight: 600; margin-bottom: 12px; }
.steps { display: flex; align-items: flex-start; gap: 4px; }
.step { display: flex; align-items: flex-start; gap: 8px; flex: 1; min-width: 0; }
.step-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--accent-text);
}
.step-ico .ico { width: 13px; height: 13px; }
.step h4 { font-size: 10px; font-weight: 550; }
.step p { margin-top: 3px; font-size: 8.5px; line-height: 1.45; color: var(--text-3); }
.step-arrow { width: 12px; height: 12px; margin: 8px 2px 0; flex: none; color: var(--text-3); opacity: 0.6; }

/* =========================== STATS / LOGS =========================== */
.page-stats { margin-bottom: 14px; }

.panel { margin-top: 0; }
.log-card { margin-top: 14px; }

.legend-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* charts */
.charts {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.chart-card { display: flex; flex-direction: column; }
.chart-body {
  position: relative;
  flex: 1;
  min-height: 224px;
  padding: 6px 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.chart-body .empty { padding: 28px 16px 34px; }
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 8px 2px;
  font-size: 10px;
  color: var(--text-3);
}
.chart-legend .lg { display: flex; align-items: center; gap: 5px; }
.chart-legend .lg i { width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.chart-total { font-size: 10px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.chart-total strong { color: var(--text); font-size: 13px; font-weight: 600; }

.bar-list { display: flex; flex-direction: column; gap: 13px; padding: 8px 8px 4px; }
.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10.5px; }
.bar-top .bl { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.bar-top .bl i { width: 5px; height: 5px; border-radius: 50%; }
.bar-top .bv { color: var(--text-3); font-variant-numeric: tabular-nums; }
.bar-track { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.055); overflow: hidden; }
[data-theme="light"] .bar-track { background: rgba(24, 18, 54, 0.07); }
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--b1), var(--b2));
  box-shadow: 0 0 10px -2px var(--b1);
  transform-origin: left;
}

.usage-card { margin-top: 14px; }

/* =========================== KEY =========================== */
.key-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 424px;
  gap: 16px;
  align-items: start;
}
.key-layout-main { display: flex; flex-direction: column; gap: 14px; }

.key-card { overflow: hidden; }
.key-card::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -100px;
  width: 320px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.24), transparent 68%);
  pointer-events: none;
}
.key-head { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 0; }
.key-head-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.95), rgba(76, 29, 149, 0.92));
  box-shadow: 0 12px 26px -14px rgba(124, 58, 237, 1), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.key-head-ico .ico { width: 17px; height: 17px; }
.key-head h2 { font-size: 14px; font-weight: 600; margin-top: 1px; }
.key-head p { margin-top: 4px; font-size: 9.5px; color: var(--text-3); }
.key-head .chip { margin-left: auto; }
.key-spark {
  position: absolute;
  right: 26px;
  top: 12px;
  width: 64px;
  height: 64px;
  color: rgba(167, 139, 250, 0.55);
  filter: drop-shadow(0 0 14px rgba(139, 92, 246, 0.55));
  pointer-events: none;
}

.key-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  margin: 18px 20px 0;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: rgba(4, 3, 10, 0.55);
  transition: border-color 0.2s ease;
}
[data-theme="light"] .key-field { background: rgba(18, 12, 40, 0.05); border-color: rgba(24, 18, 54, 0.14); }
.key-field:hover { border-color: rgba(167, 139, 250, 0.42); }
.key-field code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-2);
}
.key-field .icon-btn-sm { flex: none; }

.key-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 20px 0;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.key-meta div small { display: block; font-size: 9px; color: var(--text-3); }
.key-meta div strong {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text);
  letter-spacing: -0.005em;
}
.key-meta div strong.dim { color: var(--text-2); }
.key-card .notice { margin: 18px 20px 22px; }

.guide-card { overflow: hidden; }
.guide-art {
  position: relative;
  height: 232px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.guide-art::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.26), transparent 66%);
  filter: blur(6px);
}
.guide-art svg { position: relative; width: 218px; height: 158px; overflow: visible; }
.guide-body { padding: 0 24px 24px; text-align: center; }
.guide-body h3 { font-size: 14px; font-weight: 600; }
.guide-body p { margin: 8px auto 14px; max-width: 270px; font-size: 10px; line-height: 1.7; color: var(--text-3); }
.guide-body .btn { margin: 0 auto; }

.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.mini-card { padding: 15px 16px; }
.mini-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-text);
}
.mini-ico .ico { width: 14px; height: 14px; }
.mini-card h4 { font-size: 11px; font-weight: 600; }
.mini-card p { margin-top: 6px; font-size: 10px; line-height: 1.7; color: var(--text-3); }

/* =========================== MODELS =========================== */
.lib-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 166px;
  padding: 26px 30px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(90% 160% at 88% 20%, rgba(167, 139, 250, 0.42), transparent 62%),
    linear-gradient(112deg, #4b20a0 0%, #34176d 46%, #1d1244 100%);
  box-shadow: 0 30px 70px -54px rgba(109, 40, 217, 1), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.lib-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 100% at 80% 50%, rgba(0, 0, 0, 0.8), transparent 76%);
  -webkit-mask-image: radial-gradient(70% 100% at 80% 50%, rgba(0, 0, 0, 0.8), transparent 76%);
  pointer-events: none;
}
.lib-hero-copy { position: relative; z-index: 2; max-width: 520px; }
.lib-hero .tag { border-color: rgba(221, 214, 254, 0.28); background: rgba(255, 255, 255, 0.1); color: #e9e2ff; }
.lib-hero h2 { margin-top: 13px; font-size: 27px; font-weight: 650; letter-spacing: -0.02em; color: #fff; }
.lib-hero p { margin-top: 9px; max-width: 470px; font-size: 10.5px; line-height: 1.75; color: rgba(230, 223, 255, 0.7); }
.lib-art { position: relative; z-index: 2; width: 208px; height: 140px; flex: none; margin-right: 12px; }
.lib-art .layer {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(221, 214, 254, 0.32);
  border-radius: 26px;
  background: linear-gradient(150deg, rgba(196, 181, 253, 0.26), rgba(76, 29, 149, 0.1));
  box-shadow: inset 0 0 30px rgba(196, 181, 253, 0.2), 0 18px 50px -20px rgba(76, 29, 149, 0.9);
  backdrop-filter: blur(3px);
}
.lib-art .l1 { width: 118px; height: 118px; transform: translate(-50%, -50%) rotate(38deg); }
.lib-art .l2 { width: 88px; height: 88px; transform: translate(-50%, -50%) rotate(24deg); opacity: 0.8; }
.lib-art .l3 {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 18px;
  color: #f3ecff;
  background: linear-gradient(150deg, rgba(167, 139, 250, 0.55), rgba(76, 29, 149, 0.55));
  box-shadow: 0 0 34px rgba(167, 139, 250, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.lib-art .l3 .ico { width: 24px; height: 24px; }

.dir-card { padding: 0; }
.dir-head { padding: 16px 18px 0; }
.dir-head h3 { font-size: 13px; font-weight: 600; }
.dir-head p { margin-top: 5px; font-size: 9.5px; color: var(--text-3); }
.dir-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; flex-wrap: wrap; }
.dir-count { font-size: 9.5px; color: var(--text-3); }
.lib-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 0 18px 18px;
}
.lib-model {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.022);
  transition: 0.18s ease;
}
.lib-model:hover {
  border-color: rgba(139, 92, 246, 0.42);
  background: rgba(139, 92, 246, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -30px rgba(124, 58, 237, 0.9);
}
.lm-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lm-top .m-logo { width: 28px; height: 28px; border-radius: 8px; font-size: 10px; }
.lm-id { min-width: 0; flex: 1; }
.lm-id h4 { font-size: 11.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-id p { margin-top: 2px; font-size: 9px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-desc { font-size: 9.5px; color: var(--text-3); line-height: 1.55; }

/* =========================== DOCS =========================== */
.docs-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 168px;
  padding: 28px 30px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(90% 180% at 86% 20%, rgba(167, 139, 250, 0.4), transparent 60%),
    linear-gradient(110deg, #4c20a2 0%, #341670 45%, #1c1142 100%);
  box-shadow: 0 30px 70px -54px rgba(109, 40, 217, 1), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.docs-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 120% at 10% 120%, rgba(76, 29, 149, 0.7), transparent 60%);
  pointer-events: none;
}
.docs-hero-copy { position: relative; z-index: 2; }
.docs-hero .tag { border-color: rgba(221, 214, 254, 0.3); background: rgba(255, 255, 255, 0.1); color: #e9e2ff; }
.docs-hero h2 { margin-top: 13px; font-size: 25px; font-weight: 650; letter-spacing: -0.02em; color: #fff; }
.docs-hero p { margin-top: 8px; max-width: 430px; font-size: 10.5px; line-height: 1.75; color: rgba(232, 226, 255, 0.68); }
.docs-art { position: relative; z-index: 2; width: 190px; height: 130px; flex: none; margin-right: 24px; }
.docs-art .sq {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(221, 214, 254, 0.35);
  border-radius: 26px;
  background: linear-gradient(150deg, rgba(196, 181, 253, 0.3), rgba(76, 29, 149, 0.08));
  box-shadow: inset 0 0 30px rgba(196, 181, 253, 0.22), 0 20px 50px -24px rgba(30, 12, 70, 0.9);
  backdrop-filter: blur(3px);
}
.docs-art .s1 { width: 108px; height: 108px; transform: translate(-50%, -50%) rotate(14deg); opacity: 0.55; }
.docs-art .s2 { width: 88px; height: 88px; transform: translate(-50%, -50%) rotate(3deg); opacity: 0.85; }
.docs-art .s3 {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 20px;
  color: #f5efff;
  background: linear-gradient(150deg, rgba(167, 139, 250, 0.5), rgba(76, 29, 149, 0.5));
  box-shadow: 0 0 32px rgba(167, 139, 250, 0.45);
}
.docs-art .s3 .ico { width: 26px; height: 26px; }

.docs-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.doc-nav-card { padding: 10px; }
.doc-nav-head { padding: 5px 8px 10px; font-size: 11px; font-weight: 600; }
.doc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 33px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 11px;
  text-align: left;
  transition: 0.16s ease;
}
.doc-link .ico { width: 12px; height: 12px; color: var(--text-3); }
.doc-link .arrow { margin-left: auto; width: 11px; height: 11px; opacity: 0.5; }
.doc-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.doc-link.is-active {
  border-color: rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.14);
  color: var(--text);
}
.doc-link.is-active .ico { color: var(--accent-text); }
.doc-hint {
  margin: 10px 4px 4px;
  padding: 11px 10px;
  border-top: 1px solid var(--line);
  font-size: 8.5px;
  line-height: 1.75;
  color: var(--text-3);
}
.doc-content { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.doc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.doc-panel-head h3 { font-size: 12.5px; font-weight: 600; }
.doc-panel-body { padding: 16px 18px; }
.steps-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.step-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
}
.step-num {
  display: inline-grid;
  place-items: center;
  height: 18px;
  min-width: 24px;
  padding: 0 6px;
  margin-bottom: 10px;
  border: 1px solid rgba(167, 139, 250, 0.32);
  border-radius: 5px;
  background: rgba(139, 92, 246, 0.16);
  color: var(--accent-text);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.step-card h4 { font-size: 10.5px; font-weight: 600; }
.step-card p { margin-top: 6px; font-size: 9.5px; line-height: 1.7; color: var(--text-3); }
.doc-panel-foot { margin-top: 12px; font-size: 8.5px; color: var(--text-3); }

/* code */
.code-shell {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: #0a0913;
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.code-tabs { display: flex; align-items: center; gap: 2px; }
.code-tab {
  height: 23px;
  padding: 0 10px;
  border-radius: 6px;
  color: #8b86a3;
  font-size: 9.5px;
  transition: 0.16s ease;
}
.code-tab:hover { color: #d9d3ee; }
.code-tab.is-active {
  color: #fff;
  background: linear-gradient(120deg, #7c3aed, #5b21b6);
  box-shadow: 0 6px 14px -8px rgba(124, 58, 237, 1);
}
.code-copy { color: #8b86a3; }
.code-copy:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
pre.code {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.85;
  color: #cfc9e6;
  tab-size: 2;
}
pre.code code { font-family: inherit; }
.tok-str { color: #86efac; }
.tok-com { color: #67627e; font-style: italic; }
.tok-flag { color: #c4b5fd; }
.tok-key { color: #93c5fd; }
.tok-kw { color: #f0abfc; }

.code-note { margin-top: 11px; font-size: 8.5px; line-height: 1.7; color: var(--text-3); }

.api-table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.api-table th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 500;
  font-size: 9px;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.028);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.api-table th:first-child { border-radius: 7px 0 0 7px; }
.api-table th:last-child { border-radius: 0 7px 7px 0; }
.api-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  vertical-align: top;
  line-height: 1.6;
}
.api-table tr:last-child td { border-bottom: 0; }
.api-table code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 9px;
}
.api-table .method {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--success-soft);
  color: var(--success);
  font-family: var(--mono);
  font-size: 8px;
}
.api-table .method.post { background: rgba(96, 165, 250, 0.12); color: #93c5fd; }

.key-sample {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 11px 12px;
  border: 1px dashed rgba(167, 139, 250, 0.35);
  border-radius: 9px;
  background: rgba(139, 92, 246, 0.06);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-2);
  overflow: hidden;
}
.key-sample span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.faq-list { display: flex; flex-direction: column; gap: 7px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.022);
  overflow: hidden;
}
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  font-size: 10.5px;
  color: var(--text-2);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ico { width: 12px; height: 12px; color: var(--text-3); transition: transform 0.2s ease; }
.faq-item[open] summary { color: var(--text); }
.faq-item[open] summary .ico { transform: rotate(90deg); color: var(--accent-text); }
.faq-item p { padding: 0 12px 12px 32px; font-size: 9.5px; line-height: 1.75; color: var(--text-3); }

/* =========================== ACCOUNT =========================== */
.acct-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 16px;
  align-items: start;
}
.acct-col { display: flex; flex-direction: column; gap: 14px; }

.profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 20px;
  border-bottom: 1px solid var(--line);
}
.profile-id { min-width: 0; }
.profile-id h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.profile-id p { margin-top: 4px; font-size: 10.5px; color: var(--text-3); }
.profile .pill { margin-left: auto; }

.rows { display: flex; flex-direction: column; padding: 0 20px 6px; }
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row-label { font-size: 11.5px; font-weight: 500; color: var(--text); }
.row-desc { margin-top: 3px; font-size: 9.5px; color: var(--text-3); }
.row-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
}
.row-value .ico { width: 11px; height: 11px; color: var(--text-3); }
.row .pill { font-size: 9px; }
.row-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--accent-text);
}
.row-btn .ico { width: 10px; height: 10px; }
.row-btn:hover { text-decoration: underline; }

.security-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 162px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.security-visual::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 64%);
  filter: blur(4px);
}
.security-visual svg { position: relative; width: 118px; height: 110px; overflow: visible; }

.help-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
}
.help-card h3 { font-size: 12px; font-weight: 600; }
.help-card p { margin: 6px 0 0; font-size: 9.5px; line-height: 1.7; color: var(--text-3); }
.help-card .btn { flex: none; }

/* ---------- misc components ---------- */
.qs-body { display: block; }

.table-empty {
  padding: 34px 0;
  text-align: center;
  font-size: 10px;
  color: var(--text-3);
}

.info-strip { margin-top: 14px; padding: 14px 18px; display: flex; align-items: flex-start; gap: 11px; }
.info-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  color: #e6dcff;
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.85), rgba(76, 29, 149, 0.9));
  box-shadow: 0 8px 18px -12px rgba(124, 58, 237, 1);
}
.info-ico .ico { width: 13px; height: 13px; }
.info-strip h3 { font-size: 11px; font-weight: 600; }
.info-strip p { margin-top: 4px; font-size: 10px; line-height: 1.7; color: var(--text-3); }

.filter-wrap { position: relative; }
.filter-menu {
  left: 0;
  right: auto;
  top: calc(100% + 6px);
  width: 158px;
  padding: 5px;
  animation: popIn 0.14s ease;
}
.filter-menu button {
  height: 28px;
  font-size: 10px;
  color: var(--text-2);
}
.filter-menu button.is-on {
  color: var(--accent-text);
  background: rgba(139, 92, 246, 0.14);
}

.lib-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 16px;
}
.lib-empty p { font-size: 10.5px; color: var(--text-3); }

.doc-sub {
  margin: 18px 0 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-2);
}
.doc-panel-body > .key-sample:first-child { margin-top: 0; }

.key-spark { top: 44px; opacity: 0.6; }
.empty-icon { isolation: isolate; }
.plan-card { position: relative; }

.home-rail > :first-child { grid-row: auto; }

/* =========================== RESPONSIVE =========================== */
@media (max-width: 1240px) {
  .home-grid { grid-template-columns: minmax(0, 1fr) 286px; }
  .hero-art { right: -22px; transform: scale(0.9); }
}

@media (max-width: 1140px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .hero-art { right: 8px; }
}

@media (max-width: 1024px) {
  .key-layout,
  .acct-layout { grid-template-columns: 1fr; }
  .charts { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib-art { width: 170px; }
  .docs-art { width: 160px; margin-right: 8px; }
}

@media (max-width: 900px) {
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-grid { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .doc-nav-card { display: flex; flex-direction: column; }
  .doc-nav-list { display: flex; flex-wrap: wrap; gap: 4px; }
  .doc-link { width: auto; }
  .doc-link .arrow { display: none; }
  .doc-hint { display: none; }
  .hero { padding: 22px; }
  .hero-nav { display: none; }
  .hero-art { opacity: 0.5; right: -38px; transform: scale(0.86); }
  .hero-copy { max-width: 100%; position: relative; z-index: 3; }
  .hero-feats { gap: 8px 14px; }
  .docs-hero { padding: 22px; }
  .docs-art { display: none; }
  .lib-hero { padding: 22px; }
  .lib-art { display: none; }
  .steps-3 { grid-template-columns: 1fr; }
  .start-card { flex-direction: column; align-items: stretch; gap: 10px; }
  .start-art { display: none; }
  .steps { flex-direction: column; gap: 11px; }
  .step-arrow { display: none; }
  .home-rail { grid-template-columns: 1fr; }
  .key-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step h4 { font-size: 10.5px; }
  .step p { font-size: 9px; }
}

@media (max-width: 640px) {
  .hello h1 { font-size: 19px; }
  .hero { min-height: 0; padding: 20px 18px 34px; }
  .hero h2 { font-size: 23px; }
  .hero p { font-size: 10.5px; }
  .hero-art { display: none; }
  .hero-feats { gap: 8px 12px; margin-top: 16px; }
  .hero-feats li { font-size: 9.5px; }
  .hero-nav { display: none; }
  .model-grid { gap: 6px; padding: 0 12px 12px; }
  .model-grid.is-list { grid-template-columns: 1fr; }
  .models-panel .tabs-row { padding: 10px 12px; }
  .quick-stat { padding: 10px; gap: 8px; }
  .qs-icon { width: 29px; height: 29px; }
  .qs-icon .ico { width: 14px; height: 14px; }
  .qs-value { font-size: 15px; }
  .plan-art { display: none; }
  .lib-grid { grid-template-columns: 1fr; padding: 0 12px 12px; }
  .dir-head, .dir-tools { padding-left: 12px; padding-right: 12px; }
  .toolbar { padding: 12px; }
  .toolbar-group { width: 100%; }
  .search-sm { width: 100%; }
  .table-foot { padding: 10px 12px; }
  .profile { padding: 15px 14px 16px; }
  .rows { padding: 0 14px 4px; }
  .row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .row-value { white-space: normal; }
  .key-head { padding: 15px 14px 0; }
  .key-field { margin: 13px 14px 0; }
  .key-meta { margin: 15px 14px 0; }
  .key-card .notice { margin: 14px; }
  .guide-body { padding: 0 16px 18px; }
  .security-visual { height: 140px; }
  .steps-3 { gap: 7px; }
  .doc-panel-body { padding: 12px; }
  .api-table { font-size: 9px; }
  .mini-grid { gap: 9px; }
  .chart-body { overflow-x: auto; }
  .chart-body .empty { min-width: 0; }
  .chart-svg { min-width: 520px; }
  .chart-body .chart-legend { min-width: 520px; }
  .acct-layout { gap: 12px; }
}

@media (max-width: 480px) {
  .quick-stats { grid-template-columns: 1fr; }
}

/* =========================================================
   后端接口对齐 · 页面级样式
   ========================================================= */

/* ---------- 概览 ---------- */
.hello {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.home-main { gap: 14px; }
.home-main .page-stats { margin-bottom: 0; }
.hero-compact { min-height: 176px; padding: 22px 26px; }
.hero-compact .hero-copy h2 { font-size: 22px; }
.hero-compact .hero-copy p { max-width: 420px; font-size: 11px; }
.hero-compact .hero-art { transform: scale(0.86); transform-origin: right center; }
.hero-compact .hero-feats { margin-top: 14px; }

/* ---------- 额度 ---------- */
.quota-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.quota-head .chip { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quota-value strong {
  display: block;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.quota-value span { display: block; margin-top: 4px; font-size: 10px; color: var(--text-3); }
.quota-track {
  height: 8px;
  margin: 13px 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
[data-theme="light"] .quota-track { background: rgba(24, 18, 54, 0.07); }
.quota-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #c4b5fd);
  box-shadow: 0 0 12px -2px rgba(139, 92, 246, 0.8);
}
.quota-track.is-unlimited i { background: linear-gradient(90deg, #0ea5e9, #34d399); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.detail-item {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.detail-item small { display: block; font-size: 9.5px; color: var(--text-3); }
.detail-item strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 550;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-item strong.accent { color: var(--success); }
.quota-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 10px;
  color: var(--text-3);
}
.quota-note .ico { width: 12px; height: 12px; }

/* ---------- 我的 Key ---------- */
.key-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.07);
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.key-note .ico { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--accent-text); }
.key-note b { color: var(--text); font-weight: 600; }

.key-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.key-list > .empty, .key-list > .state-error { grid-column: 1 / -1; }
.key-item { position: relative; padding-bottom: 16px; overflow: hidden; }
.key-item::before {
  content: "";
  position: absolute;
  right: -70px;
  top: -90px;
  width: 240px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.18), transparent 68%);
  pointer-events: none;
}
.key-item .key-head { padding: 18px 18px 0; }
.key-head-body { min-width: 0; flex: 1; }
.key-hint {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.key-item .key-head p { margin-top: 5px; font-size: 10px; color: var(--text-3); }
.key-item .key-meta { margin: 16px 18px 0; padding-top: 14px; gap: 8px; }
.key-item .key-meta div strong { font-size: 11.5px; }
.key-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 18px 0; }
.key-actions .btn { flex: 1 1 calc(50% - 4px); }

/* ---------- 调用明细 ---------- */
.log-table { min-width: 900px; }
.err-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 6px rgba(251, 113, 133, 0.7);
  vertical-align: middle;
}
.log-table .row-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-3);
  white-space: nowrap;
}
.log-table .row-toggle:hover { color: var(--accent-text); }
.log-table .row-toggle .ico { width: 11px; height: 11px; }
.log-more td { padding: 0 !important; background: rgba(139, 92, 246, 0.05); }
.kv-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px;
  padding: 14px 16px;
}
.kv-cell { min-width: 0; }
.kv-cell small { display: block; font-size: 9px; letter-spacing: 0.04em; color: var(--text-3); }
.kv-cell span {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--text-2);
  word-break: break-all;
}

/* ---------- 分页 ---------- */
.table-foot .pager-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: auto;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
  color: var(--text-2);
  white-space: nowrap;
}
.table-foot .pager-btn .ico { width: 11px; height: 11px; }
.table-foot .pager-btn:hover:not([disabled]) { color: var(--text); border-color: var(--line-2); background: rgba(139, 92, 246, 0.08); }
.table-foot .pager-btn[disabled] { opacity: 0.4; pointer-events: none; }

/* ---------- 用户管理 ---------- */
.user-table { min-width: 940px; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.mini-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 9px;
  background: linear-gradient(150deg, #8b5cf6, #4c1d95);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.user-cell strong { display: block; font-size: 11.5px; font-weight: 550; color: var(--text); }
.user-cell small { font-size: 9.5px; color: var(--text-3); }
.key-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  transition: 0.16s ease;
}
.key-count:hover { border-color: rgba(167, 139, 250, 0.45); background: rgba(139, 92, 246, 0.08); }
.key-count .chev { display: inline-flex; color: var(--text-3); }
.key-count .chev .ico { width: 11px; height: 11px; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }

.expand-row td { padding: 0 !important; background: rgba(139, 92, 246, 0.04); }
.expand-body { padding: 14px 18px 16px 52px; border-left: 2px solid rgba(139, 92, 246, 0.4); }
.expand-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.expand-head h4 { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; }
.expand-head h4 .ico { width: 13px; height: 13px; color: var(--accent-text); }
.admin-keys { display: flex; flex-direction: column; gap: 8px; }
.admin-key {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.admin-key-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.admin-key-main .mono { font-family: var(--mono); font-size: 11px; }
.admin-key-remark { font-size: 10px; color: var(--text-3); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-key-date { font-size: 9.5px; color: var(--text-3); }
.admin-key-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { color: #fecdd3; }
.expand-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  font-size: 10.5px;
  color: var(--text-3);
}
.expand-empty .ico { width: 13px; height: 13px; }
.expand-empty .btn { margin-left: auto; }
.page-note { margin-top: 10px; font-size: 10px; color: var(--text-3); }

/* ---------- 审计日志 ---------- */
.filter-card { padding: 14px 16px; }
.filter-grid { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.filter-grid .field { flex: 0 0 auto; }
.filter-grid .field input,
.filter-grid .field select { width: 168px; }
.filter-grid .field input[type="datetime-local"] { width: 190px; }
.filter-actions { display: flex; gap: 8px; margin-left: auto; }
.audit-table { min-width: 1040px; }
.user-email { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.detail-cell {
  display: block;
  max-width: 300px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 管理员态提示 ---------- */
.admin-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 9px 12px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.08);
  font-size: 10.5px;
  color: #fbbf24;
}
[data-theme="light"] .admin-strip { color: #b45309; }
.admin-strip .ico { width: 14px; height: 14px; }
.admin-strip .sep { opacity: 0.5; }
.admin-strip .mono { font-family: var(--mono); }
.admin-strip a { margin-left: auto; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 账户 ---------- */
.pwd-form { display: flex; flex-direction: column; gap: 12px; padding: 0 18px 18px; }
.form-hint { font-size: 10px; line-height: 1.65; color: var(--text-3); }
.security-visual { height: 138px; }

/* ---------- 文档 ---------- */
.metric-list { display: flex; flex-direction: column; gap: 10px; }
.metric-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.metric-item h4 { font-size: 11.5px; font-weight: 600; }
.metric-item p { margin-top: 5px; font-size: 10.5px; line-height: 1.75; color: var(--text-3); }
.metric-item code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.12);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent-text);
}
.flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  margin-top: 8px;
}
.flow span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  font-size: 10.5px;
  color: var(--text-2);
}
.flow .ico { width: 13px; height: 13px; color: var(--text-3); }

/* ---------- 响应式 ---------- */
@media (max-width: 1240px) {
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .key-list { grid-template-columns: 1fr; }
}
@media (max-width: 1140px) {
  .kv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hello { align-items: flex-start; flex-direction: column; gap: 10px; }
  .hero-compact .hero-art { opacity: 0.4; right: -30px; }
  .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expand-body { padding-left: 18px; }
  .filter-actions { margin-left: 0; }
}
@media (max-width: 640px) {
  .detail-grid { grid-template-columns: 1fr; }
  .key-actions { flex-direction: column; }
  .quota-value strong { font-size: 25px; }
  .filter-grid .field { flex: 1 1 100%; }
  .filter-grid .field input,
  .filter-grid .field select { width: 100%; }
  .modal-card { padding: 16px; }
  .home-main { gap: 12px; }
}


/* =========================== AUTH =========================== */
.app[hidden],
.auth-shell[hidden] { display: none !important; }

body.is-auth { background: var(--bg); }
body.is-auth .home-scene { display: none; }
body.is-auth .bg-aura { opacity: 0.85; }

.auth-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  min-height: 100vh;
}

.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 34px 46px 26px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(760px 480px at 8% -6%, rgba(124, 58, 237, 0.26), transparent 66%),
    radial-gradient(520px 420px at 100% 96%, rgba(56, 189, 248, 0.09), transparent 72%),
    linear-gradient(158deg, rgba(18, 14, 34, 0.82), rgba(8, 7, 15, 0.35));
}
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(75% 62% at 30% 18%, #000 0%, transparent 78%);
  pointer-events: none;
}
[data-theme="light"] .auth-brand {
  background:
    radial-gradient(700px 460px at 6% -8%, rgba(124, 58, 237, 0.13), transparent 66%),
    radial-gradient(480px 380px at 100% 96%, rgba(56, 189, 248, 0.12), transparent 72%),
    linear-gradient(158deg, rgba(255, 255, 255, 0.86), rgba(244, 241, 251, 0.55));
}
[data-theme="light"] .auth-brand::before {
  background-image:
    linear-gradient(rgba(24, 18, 54, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 18, 54, 0.045) 1px, transparent 1px);
}

.auth-brand-top {
  position: relative;
  z-index: 1;
  padding: 0;
  width: fit-content;
}
.auth-brand-top .brand-text small { letter-spacing: 0.08em; }

.auth-pitch {
  position: relative;
  z-index: 1;
  max-width: 470px;
  margin-top: 18px;
}
.auth-pitch .tag { font-size: 9px; letter-spacing: 0.14em; }
.auth-pitch h1 {
  margin-top: 16px;
  font-size: clamp(30px, 3.1vw, 42px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.auth-pitch > p {
  margin-top: 13px;
  max-width: 430px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--text-2);
}
.auth-feats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 26px;
}
.auth-feats li {
  display: flex;
  align-items: center;
  gap: 11px;
}
.auth-feat-ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.auth-feat-ico .ico { width: 15px; height: 15px; }
.auth-feats b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.005em;
}
.auth-feats small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-3);
}

.auth-art {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 210px;
  display: grid;
  place-items: center;
  padding: 6px 0 0;
}
.auth-art svg {
  width: min(100%, 430px);
  height: auto;
  filter: drop-shadow(0 26px 60px rgba(76, 29, 149, 0.35));
}
[data-theme="light"] .auth-art svg {
  filter: drop-shadow(0 24px 54px rgba(109, 61, 245, 0.14));
}

.auth-brand-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--text-3);
}
.auth-brand-foot i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* ---------- right panel ---------- */
.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 30px;
}
.auth-mobile-brand { display: none; }

.auth-card {
  position: relative;
  width: 100%;
  max-width: 392px;
  padding: 26px 28px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -60px;
  width: 220px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22), transparent 68%);
  pointer-events: none;
}

.auth-card-head { position: relative; }
.auth-eyebrow {
  display: block;
  margin-bottom: 7px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent-text);
}
.auth-card-head h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.auth-card-head p {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--text-3);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 18px 0 16px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.auth-tabs button {
  height: 30px;
  border-radius: 7px;
  font-size: 11.5px;
  color: var(--text-3);
  transition: 0.16s ease;
}
.auth-tabs button:hover { color: var(--text); }
.auth-tabs button.is-active {
  color: var(--text);
  background: rgba(139, 92, 246, 0.17);
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.26);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 14px 0 4px;
  font-size: 11px;
  color: var(--text-3);
  transition: color 0.16s ease;
}
.auth-back:hover { color: var(--text); }
.auth-back .ico { width: 12px; height: 12px; }

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 13px;
  padding: 9px 11px;
  border: 1px solid rgba(251, 113, 133, 0.28);
  border-radius: 9px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11px;
  line-height: 1.6;
}
.auth-alert .ico { width: 13px; height: 13px; margin-top: 2px; }
.auth-alert.is-warn {
  border-color: rgba(251, 191, 36, 0.28);
  background: var(--warn-soft);
  color: var(--warn);
}
.auth-alert.is-ok {
  border-color: rgba(61, 220, 151, 0.26);
  background: var(--success-soft);
  color: var(--success);
}

.auth-form { position: relative; }
.auth-field {
  display: block;
  margin-bottom: 12px;
}
.auth-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 10.5px;
  color: var(--text-2);
}
.auth-input {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-soft);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.auth-input:focus-within {
  border-color: rgba(167, 139, 250, 0.62);
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}
.auth-input > .ico { width: 14px; height: 14px; color: var(--text-3); }
.auth-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
}
.auth-input input::placeholder { color: var(--text-3); opacity: 0.8; }

.auth-input.code-row { padding-right: 5px; gap: 6px; }
.code-input {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  height: 100%;
}
.code-input .ico { width: 14px; height: 14px; color: var(--text-3); }
.code-btn {
  height: 32px;
  min-width: 92px;
  padding: 0 10px;
  flex: none;
  font-size: 10.5px;
  border-radius: 7px;
  white-space: nowrap;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 15px;
}
.auth-tip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  color: var(--text-3);
}
.auth-tip .ico { width: 11px; height: 11px; }

.auth-link {
  font-size: 10.5px;
  color: var(--accent-text);
  transition: color 0.16s ease;
  white-space: nowrap;
}
.auth-link:hover { color: var(--text); }

.auth-submit {
  width: 100%;
  height: 42px;
  margin-top: 2px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
}

.auth-switch {
  margin-top: 15px;
  text-align: center;
  font-size: 10.5px;
  color: var(--text-3);
}
.auth-switch button {
  color: var(--accent-text);
  font-size: 10.5px;
}
.auth-switch button:hover { color: var(--text); }

.auth-legal {
  font-size: 9.5px;
  color: var(--text-3);
  text-align: center;
  max-width: 392px;
  line-height: 1.6;
}

/* ---------- 弹层中的账户信息 ---------- */
.pop-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 8px 5px;
}
.pop-user .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.pop-user strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}
.pop-user small {
  display: block;
  margin-top: 1px;
  font-size: 9.5px;
  color: var(--text-3);
  max-width: 168px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-value.break {
  max-width: 210px;
  text-align: right;
  word-break: break-all;
  font-size: 10.5px;
}

/* ---------- auth 响应式 ---------- */
@media (max-width: 1080px) {
  .auth-brand { padding: 30px 32px 24px; }
  .auth-pitch h1 { font-size: 30px; }
}
@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-main { min-height: 100vh; padding: 30px 20px; justify-content: center; }
  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 392px;
    margin-bottom: 4px;
  }
  .auth-mobile-brand strong { display: block; font-size: 16px; font-weight: 600; }
  .auth-mobile-brand small { display: block; margin-top: 2px; font-size: 9px; color: var(--text-3); }
  .auth-card { max-width: 420px; }
  .auth-legal { max-width: 420px; }
}
@media (max-width: 480px) {
  .auth-main { padding: 22px 14px; }
  .auth-card { padding: 22px 18px 18px; border-radius: 16px; }
  .auth-card-head h2 { font-size: 19px; }
  .code-btn { min-width: 86px; }
  .auth-tip { display: none; }
}

/* Hero 紧凑版：为左右翻页按钮留出安全区，避免压住文案 */
.hero-compact .hero-copy { padding-left: 26px; padding-right: 8px; }
.hero-compact .hero-nav.prev { left: 6px; }

/* 侧栏底部连接地址：单行省略，避免撑破 */
.side-foot {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 9px;
}

[data-theme="light"] .auth-card {
  border-color: rgba(24, 18, 54, 0.1);
  box-shadow: 0 28px 64px -44px rgba(40, 28, 90, 0.5), 0 2px 6px -4px rgba(40, 28, 90, 0.12), inset 0 1px 0 #fff;
}

/* 文档要点列表 */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}
.doc-list li {
  position: relative;
  padding-left: 14px;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--text-3);
}
.doc-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.6);
}
.doc-list code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--panel-2);
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--accent-text);
}

/* 图表卡片允许内部横向滚动，不撑破移动端页面 */
.chart-card { min-width: 0; }
.chart-body { min-width: 0; }

/* ===================== COVECT API REFERENCE ===================== */
.docs-layout-api { grid-template-columns: 252px minmax(0, 1fr); }
.docs-page-full .doc-nav-card {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
  scrollbar-gutter: stable;
}
.docs-page-full .doc-nav-list { display: flex; flex-direction: column; }
.doc-nav-group { margin-top: 9px; }
.doc-nav-group-title {
  padding: 7px 9px 5px;
  color: var(--text-3);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.doc-op-link {
  height: 29px;
  gap: 7px;
  font-size: 10.5px;
}
.doc-op-link > span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-op-link .arrow { display: none; }
.docs-page-full .doc-hint code {
  display: block;
  margin-top: 2px;
  color: var(--accent-text);
  font-family: var(--mono);
  word-break: break-all;
}

.endpoint-doc {
  min-width: 0;
  padding: 24px 26px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-card);
}
.endpoint-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.version-line { display: flex; gap: 7px; margin-bottom: 12px; }
.endpoint-head h2 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.endpoint-head p {
  margin-top: 9px;
  max-width: 760px;
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1.8;
}
.endpoint-head code,
.api-tag-row code,
.doc-section-block code,
.schema-table code,
.auth-note code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 10.5px;
}
.endpoint-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.endpoint-kicker > code {
  padding: 0;
  background: none;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12px;
}
.endpoint-kicker .pill-warn {
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: var(--warn-soft);
  color: var(--warn);
}
.auth-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text-3);
  font-size: 10px;
}
.auth-note .ico { width: 12px; height: 12px; }

.intro-server-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.server-mini {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.server-mini > span { color: var(--text-3); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.server-mini > code { color: var(--text); font-family: var(--mono); font-size: 11.5px; word-break: break-all; }
.server-mini > small { color: var(--text-3); font-size: 9.5px; }
.api-tag-list { display: flex; flex-direction: column; gap: 8px; }
.api-tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.api-tag-row h5 { font-size: 11.5px; font-weight: 600; }
.api-tag-row p { margin-top: 4px; color: var(--text-3); font-size: 10px; line-height: 1.65; }
.api-tag-row > span { flex: none; color: var(--accent-text); font-size: 9.5px; }

.doc-section-block { margin-top: 24px; }
.doc-section-block .doc-sub {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
}
.endpoint-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 24px;
  margin-top: 6px;
}
.endpoint-contract,
.endpoint-example { min-width: 0; }
.endpoint-layout .doc-section-block:first-child { margin-top: 12px; }
.endpoint-example {
  position: sticky;
  top: 14px;
  align-self: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}
.endpoint-example .server-mini { margin-bottom: 12px; }
.endpoint-example .code-shell { border-radius: 9px; }
.endpoint-example pre.code { max-height: 620px; overflow: auto; }

.schema-table-wrap,
.endpoint-contract .api-table { max-width: 100%; overflow-x: auto; }
.schema-table { min-width: 440px; }
.schema-table td,
.schema-table th { vertical-align: top; }
.required-mark {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 4px;
  border: 1px solid rgba(251, 113, 133, 0.3);
  border-radius: 4px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 8px;
  font-weight: 500;
  white-space: nowrap;
}
.schema-type {
  display: inline-block;
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}
.schema-meta {
  display: block;
  margin-top: 4px;
  color: var(--text-3);
  font-size: 9.5px;
  line-height: 1.5;
}
.schema-children { margin-top: 7px; }
.schema-children summary {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent-text);
  font-size: 9.5px;
  cursor: pointer;
}
.schema-children summary .ico { width: 10px; height: 10px; }
.schema-children[open] summary .ico { transform: rotate(90deg); }
.schema-nested { margin-top: 8px; padding-left: 10px; border-left: 1px solid var(--line); }
.schema-caption { margin: 0 0 7px; color: var(--text-2); font-size: 10px; font-weight: 600; }
.schema-simple { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 10px; }
.request-media + .request-media { margin-top: 12px; }
.media-type {
  margin-bottom: 7px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 9.5px;
}
.response-list { display: flex; flex-direction: column; gap: 7px; }
.response-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  overflow: hidden;
}
.response-item > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  color: var(--text-2);
  font-size: 10.5px;
  cursor: pointer;
}
.response-item > summary > .ico { width: 12px; height: 12px; margin-left: auto; color: var(--text-3); }
.response-item[open] > summary > .ico { transform: rotate(90deg); }
.response-body { padding: 0 11px 11px; }
.status-code {
  flex: none;
  min-width: 32px;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--success-soft);
  color: var(--success);
  font-family: var(--mono);
  font-size: 9.5px;
  text-align: center;
}
.status-4 { background: var(--warn-soft); color: var(--warn); }
.status-5 { background: var(--danger-soft); color: var(--danger); }
.response-item .schema-table { min-width: 400px; }
.response-item .schema-table-wrap { overflow-x: auto; }

@media (max-width: 1200px) {
  .endpoint-layout { grid-template-columns: 1fr; }
  .endpoint-example { position: static; }
}
@media (max-width: 900px) {
  .docs-layout-api { grid-template-columns: 1fr; }
  .docs-page-full .doc-nav-card { position: static; max-height: 240px; }
  .docs-page-full .doc-nav-list { flex-direction: column; flex-wrap: nowrap; }
  .doc-nav-group { margin-top: 4px; }
}
@media (max-width: 640px) {
  .endpoint-doc { padding: 18px 14px; }
  .intro-server-grid { grid-template-columns: 1fr; }
  .api-tag-row { align-items: flex-start; }
  .endpoint-head h2 { font-size: 17px; }
  .endpoint-kicker > code { font-size: 10.5px; }
}

/* ===================== 账号可用模型 ===================== */
.models-card { overflow: hidden; }
.models-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px 0;
}
.models-search { width: min(280px, 100%); }
.account-models { padding: 14px 16px 16px; min-width: 0; }

.model-source-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.model-source {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
}
.model-source b {
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
}
.model-source small {
  color: var(--text-3);
  font-size: 9.5px;
  white-space: nowrap;
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 9px;
}
.model-tile {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}
.model-tile:hover {
  border-color: rgba(167, 139, 250, 0.38);
  background: rgba(139, 92, 246, 0.08);
  transform: translateY(-1px);
}
.model-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.model-tile-head b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10.5px;
}
.model-tile-head .pill { flex: none; max-width: 88px; overflow: hidden; text-overflow: ellipsis; }
.model-tile-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--text-3);
  font-size: 9px;
}
.model-tile-meta span + span::before {
  content: "·";
  margin-right: 7px;
  color: var(--text-3);
  opacity: 0.65;
}

.models-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 9px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 10px;
  line-height: 1.65;
}
.models-warning .ico { width: 13px; height: 13px; flex: none; margin-top: 2px; }

.models-foot {
  margin: 12px 0 0;
  color: var(--text-3);
  font-size: 9.5px;
  line-height: 1.7;
}
.models-foot code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 9px;
}

@media (max-width: 640px) {
  .models-toolbar { align-items: stretch; }
  .models-search { width: 100%; }
  .models-grid { grid-template-columns: 1fr; }
  .model-tile-head .pill { max-width: 104px; }
}
