/* ============================================================
   AIG — Styles
   ============================================================ */

/* ── Modal & Auth Styles ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--bg);
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  animation: slideUp 0.3s ease;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg2);
  border-radius: 50%;
  font-size: 1.25rem;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close-btn:hover {
  background: var(--accent);
  color: white;
}

.auth-form h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.auth-subtitle {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-full {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Dashboard & Admin Styles ─────────────────────────────── */
.dashboard-container,
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-header,
.admin-header {
  margin-bottom: 2rem;
}

.dashboard-header h1,
.admin-header h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.dashboard-header p,
.admin-header p {
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.dashboard-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.dashboard-card h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row strong {
  color: var(--accent);
}

.api-key-hint {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.api-key-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  padding: 0.75rem;
  border-radius: 8px;
}

.api-key-display code {
  flex: 1;
  font-family: monospace;
  font-size: 0.875rem;
}

.code-block {
  background: #1a1a2e;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  color: #a0aec0;
  font-size: 0.75rem;
  white-space: pre-wrap;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.admin-tabs .tab {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-tabs .tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Stat Cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  font-size: 2rem;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Admin Table */
.admin-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.admin-section h3 {
  margin: 0 0 1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge.admin {
  background: #fef3c7;
  color: #92400e;
}

.badge.user {
  background: #dbeafe;
  color: #1e40af;
}

/* User Greeting */
.user-greeting {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  z-index: 2000;
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast-success {
  background: #10b981;
  color: white;
}

.toast-error {
  background: #ef4444;
  color: white;
}

.toast-info {
  background: #3b82f6;
  color: white;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard/Admin Actions */
.dashboard-actions,
.admin-actions {
  margin-top: 2rem;
  text-align: center;
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  margin: 0 0 0.5rem;
  color: var(--text);
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Light Theme */
:root[data-theme="light"] {
  --bg:        #ffffff;
  --bg2:       #f8f9fa;
  --bg3:       #f0f2f5;
  --border:    rgba(0, 0, 0, 0.08);
  --border-h:  rgba(0, 0, 0, 0.15);
  --text:      #1a1a2e;
  --text2:     #4a4a68;
  --text3:     #6b7280;
  --shadow:    0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.12);
}

/* Light theme overrides */
:root[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.9);
}

:root[data-theme="light"] .hero-title,
:root[data-theme="light"] .section-header h2,
:root[data-theme="light"] .provider-name,
:root[data-theme="light"] .provider-models .num,
:root[data-theme="light"] .feature-card h3,
:root[data-theme="light"] .cta-content h2,
:root[data-theme="light"] .stat-num,
:root[data-theme="light"] .model-hero h1,
:root[data-theme="light"] .docs-panel h3 {
  color: var(--text);
}

:root[data-theme="light"] .hero::before {
  background: radial-gradient(ellipse, rgba(108,99,255,0.08) 0%, transparent 70%);
}

:root[data-theme="light"] .hero-bg-grid {
  background-image:
    linear-gradient(rgba(108,99,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,99,255,0.06) 1px, transparent 1px);
}

:root[data-theme="light"] .hero-badge {
  background: rgba(108,99,255,0.08);
  color: var(--accent);
}

:root[data-theme="light"] .provider-logo img {
  filter: none;
}

:root[data-theme="light"] .manufacturer-logo {
  filter: none;
}

:root[data-theme="light"] .code-block {
  background: #1a1a2e;
}

/* Theme toggle button */
.theme-toggle {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}

.theme-toggle:hover {
  background: rgba(108,99,255,0.15);
  border-color: var(--accent);
}

:root[data-theme="light"] .theme-toggle {
  background: var(--bg3);
}

:root[data-theme="light"] .logo-icon {
  color: var(--accent);
}

:root[data-theme="light"] .btn-ghost:hover {
  background: rgba(0,0,0,0.05);
}

:root {
  --bg:        #0a0b0f;
  --bg2:       #111218;
  --bg3:       #16181f;
  --border:    rgba(255,255,255,0.07);
  --border-h:  rgba(255,255,255,0.14);
  --text:      #e8eaf0;
  --text2:     #8b8fa8;
  --text3:     #55596e;
  --accent:    #6c63ff;
  --accent2:   #8b5cf6;
  --accent3:   #06b6d4;
  --green:     #22c55e;
  --yellow:    #f59e0b;
  --red:       #ef4444;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --font:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-h);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.btn-outline:hover { border-color: var(--accent); background: rgba(108,99,255,0.07); }

.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 10px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,11,15,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--text);
}
.logo-icon { font-size: 22px; }

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.nav-actions { display: flex; gap: 8px; margin-left: auto; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 24px 80px;
  text-align: center;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108,99,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,99,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(ellipse, rgba(108,99,255,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 800px; margin: 0 auto; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  color: #a5a0ff;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  color: #fff;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; margin-bottom: 56px; }

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 32px;
}
.stat { display: flex; flex-direction: column; align-items: center; padding: 0 28px; }
.stat-num { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.5px; }
.stat-label { font-size: 12px; color: var(--text3); margin-top: 2px; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 10px;
}
.section-header p { font-size: 15px; color: var(--text2); }

/* ============================================================
   PROVIDERS SECTION
   ============================================================ */
.providers-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 0 0 260px;
}
.search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px 9px 36px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.search-input::placeholder { color: var(--text3); }
.search-input:focus { border-color: var(--accent); }

.filter-tags { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }

.tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
}
.tag:hover { border-color: var(--accent); color: var(--text); }
.tag.active {
  background: rgba(108,99,255,0.15);
  border-color: var(--accent);
  color: #a5a0ff;
}

.sort-wrap { margin-left: auto; }
.sort-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  cursor: pointer;
}

/* Provider Grid */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.provider-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  animation: fadeInUp 0.4s ease both;
}
.provider-card:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.provider-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.provider-logo {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.provider-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  /* PNG icons are already colored, no filter needed */
}

.provider-meta { flex: 1; min-width: 0; }
.provider-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.provider-origin { font-size: 12px; color: var(--text3); }

.provider-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  flex-shrink: 0;
}
.provider-status.online  { background: rgba(34,197,94,0.12); color: var(--green); }
.provider-status.partial { background: rgba(245,158,11,0.12); color: var(--yellow); }
.provider-status.offline { background: rgba(239,68,68,0.12); color: var(--red); }
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.provider-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.provider-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.provider-tag {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--text2);
}

.provider-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.provider-models {
  display: flex;
  flex-direction: column;
}
.provider-models .num { font-size: 18px; font-weight: 700; color: #fff; }
.provider-models .lbl { font-size: 11px; color: var(--text3); }

.provider-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.provider-price .price { font-size: 14px; font-weight: 600; color: var(--green); }
.provider-price .lbl  { font-size: 11px; color: var(--text3); }

.provider-action {
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #a5a0ff;
  cursor: pointer;
  transition: background var(--transition);
}
.provider-action:hover { background: rgba(108,99,255,0.22); }

/* Load more */
.load-more-wrap { text-align: center; margin-top: 40px; }

/* ============================================================
   FEATURES
   ============================================================ */
.features-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.feature-icon { font-size: 28px; margin-bottom: 14px; }

/* Feature card logos */
.feature-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  /* PNG icons are already colored, no filter needed */
}

.feature-card h3 { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.feature-card p  { font-size: 13px; color: var(--text2); line-height: 1.7; }

/* ============================================================
   CTA BANNER
   ============================================================ */

/* ============================================================
   SUCCESS CASES
   ============================================================ */
.case-customer-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg3, #1e293b);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 16px;
  padding: 24px 32px;
  margin-bottom: 36px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.case-customer-logo {
  font-size: 48px;
  flex-shrink: 0;
}
.case-customer-info {
  flex: 1;
}
.case-customer-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.case-customer-desc {
  font-size: 14px;
  color: var(--text2, #94a3b8);
  line-height: 1.6;
}
.case-customer-metrics {
  display: flex;
  gap: 32px;
  flex-shrink: 0;
}
.case-metric {
  text-align: center;
}
.case-metric-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--primary, #6366f1);
  line-height: 1;
}
.case-metric-label {
  font-size: 12px;
  color: var(--text2, #94a3b8);
  margin-top: 4px;
  display: block;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.case-card {
  background: var(--bg3, #1e293b);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s, transform 0.2s;
}
.case-card:hover {
  border-color: var(--primary, #6366f1);
  transform: translateY(-4px);
}
.case-icon {
  font-size: 36px;
  line-height: 1;
}
.case-tag {
  display: inline-block;
  background: rgba(99,102,241,0.15);
  color: var(--primary, #6366f1);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  width: fit-content;
}
.case-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.case-desc {
  font-size: 14px;
  color: var(--text2, #94a3b8);
  line-height: 1.7;
  margin: 0;
}
.case-scenarios {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.case-scenario {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.scenario-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.case-scenario strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}
.case-scenario p {
  font-size: 13px;
  color: var(--text2, #94a3b8);
  margin: 0;
  line-height: 1.6;
}
.case-result {
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.case-result-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary, #6366f1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.case-result-value {
  font-size: 13px;
  color: #3730a3;
  font-weight: 600;
  line-height: 1.5;
}
[data-theme="dark"] .case-result-value {
  color: #c7d2fe;
}

@media (max-width: 900px) {
  .cases-grid { grid-template-columns: 1fr; }
  .case-customer-card { flex-direction: column; text-align: center; }
  .case-customer-metrics { justify-content: center; }
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(108,99,255,0.12) 0%, transparent 70%);
}
.cta-content { position: relative; max-width: 560px; margin: 0 auto; }
.cta-content h2 { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.cta-content p  { font-size: 15px; color: var(--text2); margin-bottom: 32px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 24px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 48px;
  padding-bottom: 40px;
}

.footer-brand { flex: 0 0 220px; }
.footer-brand .logo { margin-bottom: 10px; display: inline-flex; }
.footer-brand p { font-size: 13px; color: var(--text3); margin-top: 8px; }

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

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.footer-col a { font-size: 13px; color: var(--text3); transition: color var(--transition); }
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text3);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  color: var(--text3);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: var(--text2); margin-bottom: 8px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ============================================================
   MODEL PAGE
   ============================================================ */
.model-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

.model-hero {
  text-align: center;
  margin-bottom: 40px;
}

.model-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.model-hero p {
  color: var(--text2);
  margin-bottom: 24px;
}

.model-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.model-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.model-search {
  flex: 1;
  min-width: 200px;
}

.model-summary {
  margin-bottom: 24px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.summary-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.summary-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

.summary-label {
  font-size: 12px;
  color: var(--text3);
  margin-top: 4px;
}

.model-table-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.model-table {
  width: 100%;
  border-collapse: collapse;
}

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

.model-table th {
  background: var(--bg3);
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
}

.model-table tbody tr:hover {
  background: rgba(108, 99, 255, 0.04);
}

.model-table tbody tr:last-child td {
  border-bottom: none;
}

.table-placeholder {
  text-align: center;
  color: var(--text3);
  padding: 48px 16px;
}

.manufacturer-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.manufacturer-logo {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: contain;
  /* PNG icons are already colored, no filter needed */
}

.model-table .tag {
  font-size: 11px;
  padding: 3px 8px;
}

/* Model Name Cell with Copy Button */
.model-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.model-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Modern Copy Button - SVG Icon Style */
.copy-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  padding: 4px 6px;
  color: var(--text3);
  transition: all 0.2s ease;
  min-width: 28px;
  height: 26px;
}

.copy-btn:hover {
  background: var(--bg3);
  border-color: var(--text3);
  color: var(--text1);
}

.copy-btn:active {
  transform: scale(0.95);
}

.copy-btn .copy-icon,
.copy-btn .check-icon {
  width: 14px;
  height: 14px;
  transition: all 0.2s ease;
}

/* Copied state */
.copy-btn.copied {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  color: #10b981;
  pointer-events: none;
}

.copy-btn.copied .check-icon {
  animation: checkmark 0.3s ease forwards;
}

@keyframes checkmark {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Copy Toast Notification - Modern Style */
.copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.copy-toast::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 12px;
}

.copy-toast.fade-out {
  animation: toastSlideDown 0.3s ease forwards;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes toastSlideDown {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
}

/* Inline copy feedback (alternative to toast) */
.copy-feedback {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  animation: feedbackPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.copy-feedback::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #10b981;
}

@keyframes feedbackPop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(5px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Docs Panel */
.docs-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.docs-panel h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.docs-section {
  margin-bottom: 24px;
}

.docs-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.docs-section p {
  color: var(--text2);
  margin: 0 0 12px;
}

.docs-section code {
  background: rgba(108, 99, 255, 0.15);
  color: #a5a0ff;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.875rem;
}

.docs-section .code-block {
  margin-top: 8px;
}

/* Feature card as link */
a.feature-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

a.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* ── 厂商分类按钮（顶部）────────────────────────────────────── */
.provider-filter-section {
  margin-bottom: 24px;
}

.provider-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.provider-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  transition: all 0.2s ease;
}

.provider-filter-btn:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.08);
}

.provider-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.provider-filter-btn .btn-logo {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  object-fit: contain;
}

.provider-filter-btn .btn-text {
  white-space: nowrap;
}

.provider-filter-btn .btn-count {
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.provider-filter-btn.active .btn-count {
  background: rgba(255, 255, 255, 0.25);
}

/* ── 主内容布局（左侧分类 + 右侧表格）────────────────────────── */
.model-content-layout {
  display: flex;
  gap: 24px;
  min-height: 400px;
}

/* ── 左侧模型分类侧边栏 ────────────────────────────────────── */
.model-category-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.category-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text2);
  transition: all 0.15s ease;
  margin-bottom: 4px;
}

.category-item:hover {
  background: var(--bg3);
  color: var(--text1);
}

.category-item.active {
  background: var(--accent);
  color: white;
}

.category-item .category-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.category-item .category-name {
  flex: 1;
}

.category-item .category-count {
  font-size: 12px;
  color: var(--text3);
  background: var(--bg3);
  padding: 2px 6px;
  border-radius: 10px;
}

.category-item.active .category-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* ── 右侧表格区域 ──────────────────────────────────────────── */
.model-content-layout .model-table-wrap {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-stats {
    flex-wrap: wrap;
    gap: 0;
    padding: 16px;
  }
  .stat { padding: 10px 16px; }
  .stat-divider { display: none; }
  .hero-cta { flex-direction: column; align-items: center; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .search-wrap { flex: none; }
  .sort-wrap { margin-left: 0; }
  .footer-inner { flex-direction: column; }
  .footer-links { flex-wrap: wrap; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
  .cta-actions { flex-direction: column; align-items: center; }
  .provider-grid { grid-template-columns: 1fr; }
  
  /* 响应式：模型分类侧边栏 */
  .model-content-layout {
    flex-direction: column;
  }
  .model-category-sidebar {
    width: 100%;
    position: static;
  }
  .category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .category-item {
    padding: 6px 12px;
  }
  .category-item .category-count {
    display: none;
  }
  
  /* 响应式：厂商分类按钮 */
  .provider-filter-tags {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }
  .provider-filter-btn {
    flex-shrink: 0;
  }
}

/* ── 阶梯定价样式（model.html 表格） ──────────────────────── */
.tiered-price-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}
.tiered-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}
.tiered-label {
  color: var(--text-secondary);
  font-size: 11px;
  min-width: 60px;
}
.tiered-val {
  color: var(--text-primary);
  font-weight: 500;
}
.tiered-cache {
  color: var(--accent);
  font-size: 11px;
}
