/* Dark Theme Overrides */
[data-theme="dark"] {
  /* Surfaces */
  --bg-body: #0F172A;
  --bg-card: #1E293B;
  --bg-sidebar: #0F172A;
  --bg-topbar: #1E293B;
  --bg-input: #1E293B;
  --bg-hover: #334155;
  --bg-modal-overlay: rgba(0, 0, 0, 0.7);

  /* Text */
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-tertiary: #64748B;

  /* Borders */
  --border-color: #334155;
  --border-color-strong: #475569;

  /* Shadows - subtle in dark mode */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);

  /* Semantic adjustments */
  --color-primary-light: rgba(79, 70, 229, 0.15);
  --color-success-light: rgba(16, 185, 129, 0.15);
  --color-warning-light: rgba(245, 158, 11, 0.15);
  --color-danger-light: rgba(239, 68, 68, 0.15);
  --color-info-light: rgba(59, 130, 246, 0.15);
  --color-gray-100: #1E293B;
  --color-gray-200: #334155;

  /* Sidebar (dark mode) */
  --sidebar-border: #334155;
  --sidebar-text: #94A3B8;
  --sidebar-text-hover: #F1F5F9;
  --sidebar-text-active: #FFFFFF;
  --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
  --sidebar-section-label: #64748B;
  --sidebar-separator: rgba(255, 255, 255, 0.08);
  --sidebar-logo-filter: brightness(0) invert(1);
  --sidebar-user-name: #F1F5F9;
  --sidebar-user-email: #64748B;
  --sidebar-avatar-bg: #334155;
  --sidebar-scrollbar: rgba(255, 255, 255, 0.15);
}

/* Dark mode specific overrides */
[data-theme="dark"] .auth-layout {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
}

[data-theme="dark"] .auth-card {
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .social-btn {
  background: var(--bg-card);
}

[data-theme="dark"] .upload-dropzone {
  background: var(--bg-card);
}

[data-theme="dark"] .payment-card-display {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #334155 25%, #1E293B 50%, #334155 75%);
  background-size: 200% 100%;
}

[data-theme="dark"] .topbar {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .badge-success { color: #34D399; }
[data-theme="dark"] .badge-warning { color: #FBBF24; }
[data-theme="dark"] .badge-danger { color: #F87171; }
[data-theme="dark"] .badge-info { color: #60A5FA; }
[data-theme="dark"] .badge-gray { background: #334155; color: #94A3B8; }

[data-theme="dark"] .table th {
  background: #0F172A;
}

[data-theme="dark"] .builder-choice-card {
  background: var(--bg-card);
}

[data-theme="dark"] .module-card.module-enabled {
  background: rgba(79, 70, 229, 0.1);
}

[data-theme="dark"] .quick-action-card:hover {
  background: rgba(79, 70, 229, 0.1);
}

[data-theme="dark"] .project-list-item:hover {
  background: rgba(79, 70, 229, 0.1);
}

[data-theme="dark"] .module-select-card:hover {
  background: rgba(79, 70, 229, 0.1);
}

[data-theme="dark"] .auth-logo img[src*="logo.svg"] {
  filter: brightness(0) invert(1);
}
