:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent-green: #059669;
  --accent-teal: #0d9488;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(37, 99, 235, 0.12);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

button,
input,
textarea,
table {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.hidden {
  display: none !important;
}

.container {
  width: min(1200px, calc(100vw - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
}

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand strong {
  display: block;
  font-size: 15px;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #ffffff;
}

.brand-mark--ai {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.topnav,
.top-actions,
.dashboard-top-actions,
.toolbar,
.session-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topnav a,
.text-btn {
  color: var(--muted);
}

.text-btn,
.primary-btn,
.secondary-btn,
.nav-item,
.auth-tab,
.icon-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: 0.18s ease;
}

.primary-btn,
.secondary-btn,
.text-btn,
.nav-item,
.auth-tab {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
}

.primary-btn {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(36, 87, 255, 0.22);
}

.home-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid rgba(36, 87, 255, 0.18);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  background: linear-gradient(135deg, rgba(36, 87, 255, 0.08), rgba(124, 58, 237, 0.08));
  color: var(--text);
  box-shadow: 0 8px 20px rgba(36, 87, 255, 0.12);
  cursor: pointer;
  transition: 0.18s ease;
}

.home-user-btn:hover {
  border-color: rgba(36, 87, 255, 0.32);
  box-shadow: 0 10px 24px rgba(36, 87, 255, 0.18);
  transform: translateY(-1px);
}

.home-user-btn__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.home-user-btn__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.home-user-btn__text strong,
.home-user-btn__text small {
  display: block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-user-btn__text strong {
  font-size: 14px;
  line-height: 1.2;
}

.home-user-btn__text small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.2;
}

.home-user-btn__arrow {
  color: var(--primary);
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.secondary-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.text-btn:hover,
.topnav a:hover {
  color: var(--text);
}

.secondary-btn:hover,
.nav-item:hover,
.auth-tab:hover {
  background: var(--surface-soft);
}

.full {
  width: 100%;
}

/* —— Landing: Hero —— */
.landing {
  overflow-x: hidden;
}

.hero-section {
  padding: 56px 0 72px;
}

.hero-grid-bg {
  background-color: #fafbfc;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-layout,
.content-grid,
.stats-grid {
  display: grid;
  gap: 20px;
}

.hero-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  align-items: center;
  gap: 48px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid #bfdbfe;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.hero-copy h1 {
  margin: 20px 0 0;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #0c1e4a;
}

.hero-lead {
  margin: 16px 0 0;
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--muted);
  font-weight: 500;
}

.hero-tagline {
  margin: 10px 0 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
}

.hero-text,
.section-heading p,
.inline-message,
.field span,
.profile-list dd,
.bullet-item p,
.table-note,
.balance-panel span,
.user-badge span,
.why-desc,
.faq-item p {
  color: var(--muted);
}

.hero-text {
  max-width: 520px;
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  min-height: 46px;
  border-radius: 10px;
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.hero-cta:hover .btn-arrow {
  transform: translateX(4px);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  min-height: 46px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 40px 0 0;
  padding: 0;
}

.hero-stats div {
  text-align: left;
}

.hero-stats dd {
  margin: 0;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.hero-stats dt {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Floating pills */
.hero-visual {
  position: relative;
  min-height: 420px;
}

.float-stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 420px;
  margin: 0 auto;
}

.float-pill {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  animation: float-bob 5s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.pill-1 {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.pill-2 {
  background: linear-gradient(135deg, #f97316, #ea580c);
}
.pill-3 {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.pill-4 {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
}
.pill-5 {
  background: linear-gradient(135deg, #ec4899, #db2777);
}
.pill-6 {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #1e293b;
}
.pill-7 {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
}
.pill-8 {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}
.pill-9 {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}
.pill-10 {
  background: linear-gradient(135deg, #1e293b, #334155);
  font-size: 18px;
}
.pill-11 {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

@keyframes float-bob {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0) rotate(0deg);
  }
  33% {
    transform: translate(-50%, -50%) translateY(-12px) rotate(1.5deg);
  }
  66% {
    transform: translate(-50%, -50%) translateY(6px) rotate(-1deg);
  }
}

.float-glow {
  position: absolute;
  inset: 20% 10%;
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.12), transparent 70%);
  pointer-events: none;
  animation: glow-pulse 6s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* —— Landing: Why —— */
.section-heading.center {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.section-heading h2,
.cta-copy h2,
.dashboard-top h1 {
  margin: 0;
  line-height: 1.2;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--text);
}

.section-heading.center p {
  margin: 14px 0 0;
  line-height: 1.7;
}

.section-why {
  padding: 72px 0;
  background: var(--surface);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.why-card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-lg);
}

.why-card h3 {
  margin: 16px 0 0;
  font-size: 20px;
}

.why-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
}

.why-icon svg {
  width: 22px;
  height: 22px;
}

.check-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 700;
}

.why-metrics {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.why-metrics strong {
  display: block;
  font-size: 22px;
  color: var(--primary);
}

.why-metrics span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.feature-highlight {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: var(--primary-soft);
  border: 1px solid #bfdbfe;
}

.feature-highlight span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.feature-highlight strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.5;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.online-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.why-card--wide {
  grid-column: span 2;
}

.why-wide-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.why-highlight {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.why-terminal {
  flex-shrink: 0;
  width: 120px;
  height: 100px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--primary);
}

.term-prompt {
  font-size: 20px;
  font-weight: 700;
}

.term-line {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  padding: 0 8px;
}

/* —— Landing: Models —— */
.section-models {
  padding: 72px 0;
  background: #f1f5f9;
}

.section-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.model-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.model-card.is-featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg);
}

.model-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 8px;
}

.model-icon svg {
  width: 22px;
  height: 22px;
}

.model-icon--solid {
  background: var(--primary);
  color: #fff;
}

.model-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.model-desc {
  margin: 4px 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  flex: 1;
}

.model-btn {
  margin-top: auto;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.model-btn:hover {
  background: #1e293b;
}

.models-footnote {
  text-align: center;
  margin-top: 32px;
}

.link-btn {
  border: 0;
  background: none;
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

/* —— Landing: FAQ —— */
.section-faq {
  padding: 72px 0;
  background: var(--surface);
}

.faq-list {
  max-width: 760px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: #bfdbfe;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.faq-item summary {
  padding: 20px 24px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 24px 20px;
  line-height: 1.75;
  font-size: 15px;
}

/* —— Landing: CTA + Footer —— */
.section-cta {
  padding: 48px 0 72px;
}

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 56px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.cta-copy h2 {
  color: #fff;
  font-size: clamp(24px, 3vw, 32px);
}

.cta-copy p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.85);
  max-width: 480px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
}

.cta-actions .primary-btn {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: none;
}

.cta-actions .primary-btn:hover {
  background: #f8fafc;
}

.cta-actions .secondary-btn {
  border-color: rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #fff;
}

.cta-actions .secondary-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.footer-brand strong {
  font-size: 16px;
}

.footer-brand p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 14px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.footer-beian {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  text-align: center;
}

.footer-beian a {
  color: var(--muted);
}

.footer-beian a:hover {
  color: var(--primary);
}

.beian-sep {
  margin: 0 4px;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.modal-panel,
.auth-panel,
.surface-card,
.stat-card,
.cta-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section {
  padding: 48px 0;
}

.section-soft {
  background: #eef2f8;
}

.section-heading {
  max-width: 760px;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.feature-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
}

.stack-panels {
  display: grid;
  gap: 20px;
}

.feature-card h3,
.info-panel h3,
.surface-head h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.feature-card p,
.info-panel p {
  margin: 0;
  line-height: 1.7;
}

.stack-panels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-panel p {
  margin: 12px 0 0;
  color: var(--muted);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
}

.auth-panel {
  width: min(480px, 100%);
  position: relative;
  z-index: 1;
  padding: 22px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.modal-close span {
  position: absolute;
  top: 16px;
  left: 9px;
  width: 16px;
  height: 2px;
  background: var(--text);
}

.modal-close span:first-child {
  transform: rotate(45deg);
}

.modal-close span:last-child {
  transform: rotate(-45deg);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.auth-tab {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
}

.auth-tab.is-active {
  background: var(--primary-soft);
  border-color: #cddcff;
  color: var(--primary);
}

.auth-form h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.field input,
.field textarea,
.token-box textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
}

.field textarea,
.token-box textarea {
  min-height: 140px;
  padding: 14px;
  resize: vertical;
}

.field.compact {
  margin: 0;
  min-width: min(320px, 100%);
}

.inline-message {
  margin-top: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--surface-soft);
}

.inline-message.success {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
}

.inline-message.error {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

.dashboard-body {
  background: #f3f6fb;
}

.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand-sidebar {
  padding: 0 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  text-align: left;
  border: 1px solid transparent;
  color: var(--muted);
}

.nav-item.is-active {
  background: #f6f9ff;
  border-color: #dbe5ff;
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(36, 87, 255, 0.04);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.user-badge {
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 14px;
}

.user-badge strong,
.user-badge span {
  display: block;
}

.user-badge strong {
  margin-bottom: 6px;
}

.dashboard-main {
  padding: 32px;
}

.dashboard-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.dashboard-top h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.dashboard-section {
  display: none;
  margin-top: 24px;
}

.dashboard-section.active {
  display: block;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  padding: 22px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong,
.balance-panel strong,
#points-large {
  display: block;
  margin-top: 12px;
  font-size: clamp(24px, 3vw, 42px);
}

.content-grid {
  grid-template-columns: 1.1fr 0.9fr;
  margin-top: 22px;
}

.content-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.surface-card {
  padding: 24px;
  overflow: hidden;
}

.surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.surface-head h2 {
  margin: 0;
  font-size: 28px;
}

.bullet-list,
.model-list,
.package-grid {
  display: grid;
  gap: 14px;
}

.bullet-item,
.model-item,
.package-card,
.order-detail-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 16px;
}

.bullet-item h3,
.model-item h3,
.package-card h3,
.order-detail-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.bullet-item p,
.model-item p {
  margin: 0;
  line-height: 1.65;
}

.balance-panel {
  margin-bottom: 20px;
}

.balance-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.package-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.package-card.is-selected {
  border-color: #b8cbff;
  background: #f6f9ff;
}

.package-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
}

.package-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: var(--surface);
}

.data-table th,
.data-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table th {
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 600;
}

.table-code {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.success {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.status-pill.pending {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.status-pill.failed {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.profile-list {
  display: grid;
  grid-template-columns: 160px 1fr;
  row-gap: 14px;
  margin: 0;
}

.profile-list dt {
  font-weight: 600;
}

.profile-list dd {
  margin: 0;
}

.token-box {
  margin-top: 18px;
}

.token-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.modal-head {
  padding-right: 28px;
}

.order-modal-panel {
  width: min(440px, 100%);
  padding: 24px 28px 28px;
}

.order-modal-head {
  margin-bottom: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.order-modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.order-modal-body {
  padding-top: 20px;
}

.order-detail-list {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px 20px;
  margin: 0;
}

.order-detail-list dt {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.order-detail-list dd {
  margin: 0;
  line-height: 1.5;
  word-break: break-all;
}

.profile-section-card .profile-list {
  max-width: 640px;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.order-link {
  word-break: break-all;
  color: var(--primary);
}

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-layout,
  .content-grid,
  .content-grid.two-col {
    grid-template-columns: 1fr;
  }

  .model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .why-card--wide {
    grid-column: span 1;
  }

  .why-wide-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 960px) {
  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dashboard-main {
    padding: 24px;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100vw - 28px, 1200px);
  }

  .topbar,
  .top-actions,
  .cta-banner,
  .dashboard-top,
  .dashboard-top-actions,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats,
  .why-grid,
  .model-grid,
  .stats-grid,
  .package-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    padding: 32px 24px;
  }

  .cta-actions {
    width: 100%;
  }

  .cta-actions .primary-btn,
  .cta-actions .secondary-btn {
    flex: 1;
    justify-content: center;
  }

  .float-stage {
    height: 360px;
    max-width: 100%;
  }

  .float-pill {
    font-size: 12px;
    padding: 8px 14px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-wrap: wrap;
  }

  .profile-list {
    grid-template-columns: 1fr;
  }
}
