/* =============================================
   BaaS by Dapita - Global Styles
   ============================================= */

/* Brand Colors */
:root {
  --primary: #2d8b9e;
  --accent: #d4752c;
  --brand-blue: #1a2744;
  --brand-teal: #2d8b9e;
  --brand-orange: #d4752c;
  --brand-gold: #e3a84b;
  
  /* Light Theme */
  --bg: radial-gradient(900px 600px at -10% -10%, rgba(45,139,158,0.12) 0%, transparent 60%),
        radial-gradient(900px 600px at 110% 0%, rgba(212,117,44,0.08) 0%, transparent 60%),
        linear-gradient(180deg, #ffffff, #f8fafc);
  --glass: rgba(255,255,255,0.8);
  --glass-strong: rgba(255,255,255,0.95);
  --text: #1a2744;
  --muted: #5a6a7a;
  --ok: #16a34a;
  --danger: #ef4444;
  --border: 1px solid rgba(26,39,68,0.1);
  --shadow: 0 10px 30px rgba(26,39,68,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
  --radius: 18px;
  --radius-sm: 12px;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg: radial-gradient(1200px 800px at 20% -10%, rgba(45,139,158,0.25) 0%, transparent 60%),
        radial-gradient(1000px 800px at 120% 10%, rgba(212,117,44,0.1) 0%, transparent 60%),
        linear-gradient(180deg, #0d1520, #0d1520);
  --glass: rgba(255,255,255,0.08);
  --glass-strong: rgba(255,255,255,0.12);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: 1px solid rgba(255,255,255,0.1);
  --shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 1px 1px rgba(255,255,255,0.05);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font: 15px/1.55 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* =============================================
   Header / Navigation
   ============================================= */
.header {
  backdrop-filter: blur(14px);
  background: var(--glass);
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: 22px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 12px;
  z-index: 50;
}

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

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.brand-text {
  font-weight: 800;
  font-size: 20px;
}

.brand-text em {
  color: var(--brand-teal);
  font-style: normal;
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link:hover {
  background: var(--glass-strong);
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* =============================================
   Buttons
   ============================================= */
.btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-blue));
  color: #fff;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45,139,158,0.3);
}

.btn-orange {
  background: linear-gradient(135deg, var(--brand-orange), #c2651f);
  color: #fff;
  border: none;
}

.btn-orange:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212,117,44,0.3);
}

.btn-ghost {
  background: var(--glass);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--glass-strong);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  background: var(--glass);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.icon-btn:hover {
  background: var(--glass-strong);
}

/* =============================================
   Cards
   ============================================= */
.card {
  background: var(--glass);
  border: var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
}

/* =============================================
   Stats
   ============================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--glass);
  border: var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--brand-teal);
}

/* =============================================
   Forms
   ============================================= */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: var(--border);
  background: var(--glass);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus {
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(45,139,158,0.1);
}

.form-input::placeholder {
  color: var(--muted);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232d8b9e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* =============================================
   Tables
   ============================================= */
.table-container {
  overflow-x: auto;
}

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

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

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 600;
}

tr:hover {
  background: var(--glass-strong);
}

/* =============================================
   Badges
   ============================================= */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: rgba(22,163,74,0.15);
  color: var(--ok);
}

.badge-warning {
  background: rgba(212,117,44,0.2);
  color: var(--brand-orange);
}

.badge-danger {
  background: rgba(239,68,68,0.15);
  color: var(--danger);
}

.badge-info {
  background: rgba(45,139,158,0.15);
  color: var(--brand-teal);
}

/* =============================================
   Progress
   ============================================= */
.progress {
  height: 8px;
  background: var(--glass-strong);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-teal), var(--brand-orange));
  border-radius: 4px;
  transition: width 0.3s;
}

/* =============================================
   Modal
   ============================================= */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--glass-strong);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  border: var(--border);
  box-shadow: var(--shadow);
  position: relative;
  backdrop-filter: blur(20px);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* =============================================
   Toast
   ============================================= */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  background: var(--glass-strong);
  border: var(--border);
  box-shadow: var(--shadow);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
  z-index: 1001;
  backdrop-filter: blur(20px);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-left: 4px solid var(--ok);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
}

.hero-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  border-radius: 20px;
}

.hero h1 {
  font-size: 48px;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--brand-blue);
}

[data-theme="dark"] .hero h1 {
  color: var(--text);
}

.hero p {
  font-size: 20px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--brand-teal);
}

.hero-stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =============================================
   Section
   ============================================= */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 36px;
  margin-bottom: 16px;
  color: var(--brand-blue);
}

[data-theme="dark"] .section-title {
  color: var(--text);
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 50px;
}

/* =============================================
   Features Grid
   ============================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--glass);
  border: var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-desc {
  color: var(--muted);
  line-height: 1.6;
}

/* =============================================
   Categories Grid
   ============================================= */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--glass);
  border: var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.category-card:hover {
  transform: translateY(-5px);
  background: var(--glass-strong);
  border-color: var(--brand-teal);
}

.category-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-blue));
  color: white;
}

.category-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-count {
  display: inline-block;
  padding: 4px 12px;
  background: var(--glass-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--brand-teal);
  font-weight: 600;
}

/* =============================================
   Pricing Grid
   ============================================= */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.pricing-card {
  background: var(--glass);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.pricing-card.featured {
  padding-top: 40px;
  margin-top: 12px;
  border-color: var(--brand-teal);
  box-shadow: 0 8px 30px rgba(45, 139, 158, 0.15);
}

.pricing-card .plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pricing-card .plan-header {
  text-align: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

[data-theme="dark"] .pricing-card .plan-header {
  border-color: rgba(255,255,255,0.1);
}

.pricing-card .plan-name {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text);
}

.pricing-card .plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.pricing-card .price-amount {
  font-size: 42px;
  font-weight: 700;
  color: var(--primary);
}

.pricing-card .price-period {
  font-size: 14px;
  color: var(--muted);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.feature-item {
  padding: 8px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-item.included {
  color: var(--text);
}

.feature-item.excluded {
  color: var(--muted);
  text-decoration: line-through;
  opacity: 0.6;
}

.feature-item.muted {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

.feature-item.highlight {
  color: var(--primary);
  font-weight: 500;
}

.feature-item.highlight strong {
  color: var(--accent);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(0,0,0,0.1);
  color: var(--text);
}

[data-theme="dark"] .btn-outline {
  border-color: rgba(255,255,255,0.2);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pricing-note {
  text-align: center;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
}

/* Billing Toggle */
.billing-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--glass);
  padding: 6px;
  border-radius: 12px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.billing-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.billing-btn:hover {
  color: var(--text);
}

.billing-btn.active {
  background: var(--primary);
  color: white;
}

.billing-btn.bonus {
  border: 2px solid var(--ok);
  position: relative;
}

.billing-btn.bonus.active {
  background: var(--ok);
  border-color: var(--ok);
}

.bonus-badge {
  display: block;
  font-size: 10px;
  color: var(--ok);
  font-weight: 600;
  margin-top: 2px;
}

.billing-btn.active .bonus-badge {
  color: white;
}

.price-bonus {
  font-size: 13px;
  color: var(--ok);
  margin-top: 6px;
  font-weight: 600;
}

/* =============================================
   CTA Section
   ============================================= */
.cta {
  text-align: center;
  padding: 80px 40px;
  background: var(--glass);
  border-radius: var(--radius);
  border: var(--border);
  margin: 60px 0;
}

.cta h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.cta p {
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 32px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =============================================
   Footer
   ============================================= */
.footer {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  border-top: var(--border);
  margin-top: 40px;
}

.footer a {
  color: var(--brand-teal);
}

/* =============================================
   Code Block
   ============================================= */
.code-block {
  background: var(--glass-strong);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 13px;
  overflow-x: auto;
  border: var(--border);
  white-space: pre-wrap;
  word-break: break-all;
}

.api-key {
  font-family: monospace;
  background: var(--glass-strong);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  border: var(--border);
}

.api-key-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  user-select: all;
}

/* =============================================
   Loading & Spinner
   ============================================= */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--glass-strong);
  border-top-color: var(--brand-teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =============================================
   Dashboard Layout
   ============================================= */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--glass);
  border-right: var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  backdrop-filter: blur(10px);
}

.main {
  flex: 1;
  margin-left: 260px;
  padding: 24px;
  min-height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 8px;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.sidebar-title {
  font-weight: 700;
  font-size: 16px;
}

.sidebar-title em {
  color: var(--brand-teal);
  font-style: normal;
}

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

.nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--glass-strong);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(45,139,158,0.15), rgba(45,139,158,0.05));
  color: var(--brand-teal);
  font-weight: 600;
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--glass-strong);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-email {
  font-size: 12px;
  color: var(--muted);
}

.page-title {
  font-size: 28px;
  font-weight: 700;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.page-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Dashboard Sections */
.dash-section {
  display: none;
}

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

/* Mobile Header */
.mobile-header {
  display: none;
  padding: 16px 20px;
  background: var(--glass);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

/* =============================================
   Onboarding
   ============================================= */
.onboarding {
  max-width: 500px;
  margin: 80px auto;
  text-align: center;
}

.onboarding-card {
  background: var(--glass);
  border: var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.onboarding h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.onboarding p {
  color: var(--muted);
  margin-bottom: 32px;
}

/* =============================================
   Utilities
   ============================================= */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--muted); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.hidden { display: none !important; }

/* =============================================
   API Docs
   ============================================= */
.api-docs-container {
  display: flex;
  gap: 24px;
  min-height: 600px;
}

.api-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--glass);
  border: var(--border);
  border-radius: var(--radius);
  padding: 16px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.api-nav-section {
  margin-bottom: 20px;
}

.api-nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 600;
}

.api-nav-item {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: 'SF Mono', Monaco, monospace;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 4px;
}

.api-nav-item:hover {
  background: var(--glass-strong);
}

.api-nav-item.active {
  background: linear-gradient(135deg, rgba(45,139,158,0.15), rgba(45,139,158,0.05));
  color: var(--brand-teal);
  font-weight: 600;
}

.api-content {
  flex: 1;
  min-width: 0;
}

.api-endpoint {
  display: none;
  background: var(--glass);
  border: var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.api-endpoint.active {
  display: block;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.method-badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.method-badge.get {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.method-badge.post {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.method-badge.put {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.method-badge.delete {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.endpoint-path {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.endpoint-desc {
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

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

.endpoint-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.params-table th,
.params-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: var(--border);
}

.params-table th {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.params-table code {
  background: var(--glass-strong);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* Sandbox */
.sandbox {
  background: var(--glass-strong);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.sandbox-params {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.sandbox-field {
  flex: 1;
  min-width: 200px;
}

.sandbox-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--muted);
}

.sandbox-field .form-input {
  width: 100%;
}

.sandbox-result {
  margin-top: 16px;
  display: none;
}

.sandbox-result.show {
  display: block;
}

.sandbox-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sandbox-status {
  font-size: 13px;
  font-weight: 600;
}

.sandbox-status.success {
  color: var(--ok);
}

.sandbox-status.error {
  color: var(--danger);
}

.sandbox-time {
  font-size: 12px;
  color: var(--muted);
}

.sandbox-response {
  background: var(--glass);
  border: var(--border);
  border-radius: 8px;
  padding: 16px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 13px;
  overflow-x: auto;
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
}

/* =============================================
   App Header (Dashboard Fixed)
   ============================================= */
.app-header {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  height: 60px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  border: var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.header-title {
  font-weight: 700;
  font-size: 16px;
}

.header-title em {
  color: var(--brand-teal);
  font-style: normal;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.header-org-badge {
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-gold));
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-user-info {
  display: flex;
  flex-direction: column;
}

.header-user-info .user-name {
  font-size: 13px;
  font-weight: 600;
}

.header-user-info .user-email {
  font-size: 11px;
  color: var(--muted);
}

/* Hamburger */
.hamburger {
  display: none;
  background: var(--glass);
  border: var(--border);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  transition: all 0.2s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Sidebar adjustments for fixed header */
.sidebar {
  top: 84px;
  height: calc(100vh - 96px);
  border-radius: 0 18px 18px 0;
}

/* Main adjustments for fixed header */
.main {
  margin-top: 84px;
  min-height: calc(100vh - 84px);
  padding-bottom: 80px;
}

/* =============================================
   App Footer
   ============================================= */
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  margin-top: 40px;
  border-top: var(--border);
  color: var(--muted);
  font-size: 13px;
}

.app-footer a {
  color: var(--brand-teal);
  transition: color 0.2s;
}

.app-footer a:hover {
  color: var(--brand-orange);
}

.footer-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--ok);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* =============================================
   API Key Input Highlight
   ============================================= */
.api-key-input-highlight {
  background: linear-gradient(135deg, rgba(212,117,44,0.1), rgba(45,139,158,0.05));
  border: 2px solid var(--brand-orange);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.api-key-input-highlight .form-label {
  font-size: 14px;
  margin-bottom: 10px;
}

.api-key-input-highlight .form-input {
  background: var(--glass-strong);
  border: 2px solid rgba(212,117,44,0.3);
  font-size: 15px;
}

.api-key-input-highlight .form-input:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(212,117,44,0.15);
}

.api-key-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  margin-bottom: 0;
}

/* =============================================
   API Nav Label Highlight (Getting Started)
   ============================================= */
.api-nav-label-highlight {
  background: linear-gradient(135deg, rgba(212,117,44,0.15), rgba(212,117,44,0.05));
  border-left: 3px solid var(--brand-orange);
  margin: 0 -16px;
  padding: 10px 16px 10px 13px !important;
  color: var(--brand-orange) !important;
  font-weight: 700 !important;
}

/* =============================================
   Hide Mobile Elements
   ============================================= */
.hide-mobile {
  display: inline;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 900px) {
  .nav { display: none; }
  .hamburger { display: flex; }
  
  .header-center {
    display: none;
  }
  
  .header-user-info {
    display: none;
  }
  
  .header-title {
    display: none;
  }
  
  .sidebar {
    position: fixed;
    left: -280px;
    top: 84px;
    width: 260px;
    height: calc(100vh - 96px);
    transition: left 0.3s;
    z-index: 90;
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .main {
    margin-left: 0;
  }
  
  .mobile-header {
    display: none;
  }
  
  .app-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .hide-mobile {
    display: none;
  }
  
  .hero h1 { font-size: 36px; }
  .hero-stats { gap: 30px; }
  .hero-stat-value { font-size: 2rem; }
  .pricing-card.featured { transform: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .api-docs-container { flex-direction: column; }
  .api-sidebar { width: 100%; position: static; }
}

@media (max-width: 600px) {
  .app-header {
    top: 8px;
    left: 8px;
    right: 8px;
    height: 54px;
    padding: 0 12px;
  }
  
  .sidebar {
    top: 70px;
    height: calc(100vh - 82px);
  }
  
  .main {
    margin-top: 70px;
  }
  
  .header-logo {
    width: 32px;
    height: 32px;
  }
  
  .hero h1 { font-size: 28px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; }
  .stats-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; gap: 16px; align-items: flex-start; }
  .cta-buttons { flex-direction: column; align-items: center; }
}
