/* ═══════════════════════════════════════════════════════════
   Entorhino — Design System
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Primary palette */
  --primary: #4F46E5;
  --primary-light: #6366F1;
  --primary-dark: #3730A3;
  --primary-50: #EEF2FF;
  --primary-100: #E0E7FF;

  /* Accent */
  --accent: #10B981;
  --accent-light: #34D399;
  --accent-dark: #059669;

  /* Neutrals */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Status */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  /* Layout */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Reset & Base ─────────────────────────────────────────── */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

/* ── Auth Layout ──────────────────────────────────────────── */

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary-50) 0%, #F0FDFA 50%, var(--primary-100) 100%);
}

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 40px 32px;
  animation: slideUp 0.3s ease-out;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card .logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card .logo h1 {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-card .logo p {
  color: var(--gray-500);
  font-size: 14px;
  margin-top: 4px;
}

/* ── Forms ─────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group input::placeholder {
  color: var(--gray-400);
}

.form-group .error-text {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Buttons ───────────────────────────────────────────────── */

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

.btn:active {
  transform: scale(0.98);
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
}

.btn-success {
  background: var(--accent);
  color: white;
}

.btn-success:hover {
  background: var(--accent-dark);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #DC2626;
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-50);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
}

.btn-ghost:hover {
  background: var(--gray-100);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

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

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ── OTP Input ─────────────────────────────────────────────── */

.otp-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}

.otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s;
}

.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ── Dashboard Layout ─────────────────────────────────────── */

.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--gray-900);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--gray-700);
}

.sidebar-header h2 {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #818CF8, #34D399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-header .user-info {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

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

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  padding: 8px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--gray-300);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.nav-item.active {
  background: var(--primary);
  color: white;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 24px;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.top-bar h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
}

.top-bar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Cards ─────────────────────────────────────────────────── */

.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--gray-100);
}

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

.card-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── Stat Cards ────────────────────────────────────────────── */

.stat-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border: 1px solid var(--gray-100);
  border-left: 4px solid var(--primary);
}

.stat-card.success {
  border-left-color: var(--accent);
}

.stat-card.warning {
  border-left-color: var(--warning);
}

.stat-card.danger {
  border-left-color: var(--danger);
}

.stat-card.info {
  border-left-color: var(--info);
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  margin-top: 4px;
}

.stat-card .stat-sub {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* ── Tables ────────────────────────────────────────────────── */

.table-wrapper {
  overflow-x: auto;
}

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

th,
td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
}

th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-600);
  border-bottom: 2px solid var(--gray-200);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}

tbody tr:hover {
  background: var(--gray-50);
}

/* ── Badges & Status ──────────────────────────────────────── */

.badge-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-pending {
  background: #FEF3C7;
  color: #92400E;
}

.badge-approved {
  background: #D1FAE5;
  color: #065F46;
}

.badge-rejected {
  background: #FEE2E2;
  color: #991B1B;
}

.badge-active {
  background: #DBEAFE;
  color: #1E40AF;
}

/* ── Modals ────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeIn 0.2s ease;
  display: none;
}

.modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  animation: slideUp 0.3s ease-out;
}

.modal h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--gray-900);
}

/* ── Toast ─────────────────────────────────────────────────── */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
  max-width: 380px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-success {
  background: var(--accent);
}

.toast-error {
  background: var(--danger);
}

.toast-info {
  background: var(--info);
}

.toast-warning {
  background: var(--warning);
}

/* ── Empty State ──────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 15px;
  margin-bottom: 16px;
}

/* ── Voice Recording ──────────────────────────────────────── */

.voice-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
}

.voice-btn.recording {
  background: var(--danger);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  50% {
    box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
  }
}

.voice-btn:hover {
  transform: scale(1.05);
}

.transcript-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px;
  min-height: 60px;
  font-size: 14px;
  color: var(--gray-700);
  margin-top: 8px;
}

/* ── Tabs ──────────────────────────────────────────────────── */

.tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab:hover {
  color: var(--gray-700);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ── Alert Banner ─────────────────────────────────────────── */

.alert-banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-banner.info {
  background: #DBEAFE;
  color: #1E40AF;
}

.alert-banner.warning {
  background: #FEF3C7;
  color: #92400E;
}

.alert-banner.danger {
  background: #FEE2E2;
  color: #991B1B;
}

.alert-banner.success {
  background: #D1FAE5;
  color: #065F46;
}

/* ── Loading ──────────────────────────────────────────────── */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Hamburger menu (mobile) ──────────────────────────────── */

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray-700);
  padding: 8px;
}

/* ── Responsive ───────────────────────────────────────────── */

/* Moved to bottom for dark mode + enhanced mobile */

/* ── Utility ──────────────────────────────────────────────── */

.mt-1 {
  margin-top: 4px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 16px;
}

.mt-4 {
  margin-top: 24px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 16px;
}

.mb-4 {
  margin-bottom: 24px;
}

.gap-2 {
  gap: 8px;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

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

.text-sm {
  font-size: 13px;
}

.text-muted {
  color: var(--gray-500);
}

.text-danger {
  color: var(--danger);
}

.text-success {
  color: var(--accent);
}

.font-bold {
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.w-full {
  width: 100%;
}

.multiselect-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  min-height: 40px;
  cursor: pointer;
}

.multiselect-tag {
  background: var(--primary-50);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.multiselect-tag .remove {
  cursor: pointer;
  font-weight: 700;
  opacity: 0.6;
}

.multiselect-tag .remove:hover {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE — Neon Theme
   ═══════════════════════════════════════════════════════════ */

[data-theme="dark"] {
  --primary: #7C6BFF;
  --primary-light: #A78BFA;
  --primary-dark: #6D5AE6;
  --primary-50: rgba(124, 107, 255, 0.1);
  --primary-100: rgba(124, 107, 255, 0.15);

  --accent: #39FF14;
  --accent-light: #66FF44;
  --accent-dark: #2BD10E;

  --gray-50: #12121a;
  --gray-100: #1a1a2e;
  --gray-200: #25253d;
  --gray-300: #3a3a5c;
  --gray-400: #6e6e8a;
  --gray-500: #9494b0;
  --gray-600: #b0b0cc;
  --gray-700: #2a2a42;
  --gray-800: #e0e0f0;
  --gray-900: #f0f0ff;

  --success: #39FF14;
  --warning: #FFD600;
  --danger: #FF3366;
  --info: #00f0ff;

  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);

  --neon-glow: 0 0 10px rgba(0, 240, 255, 0.3), 0 0 20px rgba(0, 240, 255, 0.1);
}

[data-theme="dark"] body {
  background: #0a0a0f;
  color: var(--gray-800);
}

[data-theme="dark"] .auth-container {
  background: linear-gradient(135deg, #0a0a0f 0%, #12121a 50%, #1a1a2e 100%);
}

[data-theme="dark"] .auth-card {
  background: #12121a;
  border: 1px solid var(--gray-200);
}

[data-theme="dark"] .auth-card .logo h1 {
  background: linear-gradient(135deg, #00f0ff, #ff00ea);
  -webkit-background-clip: text;
  background-clip: text;
}

[data-theme="dark"] .sidebar {
  background: #0d0d14;
  border-right: 1px solid rgba(0, 240, 255, 0.1);
}

[data-theme="dark"] .sidebar-header {
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
}

[data-theme="dark"] .sidebar-header h2 {
  background: linear-gradient(135deg, #00f0ff, #39FF14);
  -webkit-background-clip: text;
  background-clip: text;
}

[data-theme="dark"] .nav-item:hover {
  background: rgba(0, 240, 255, 0.08);
}

[data-theme="dark"] .nav-item.active {
  background: linear-gradient(135deg, rgba(124, 107, 255, 0.3), rgba(0, 240, 255, 0.2));
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: var(--neon-glow);
}

[data-theme="dark"] .card {
  background: #12121a;
  border-color: var(--gray-200);
}

[data-theme="dark"] .stat-card {
  background: #12121a;
  border-color: var(--gray-200);
}

[data-theme="dark"] .stat-card .stat-value {
  color: #f0f0ff;
}

[data-theme="dark"] th {
  background: #1a1a2e;
  color: var(--gray-400);
  border-bottom-color: var(--gray-200);
}

[data-theme="dark"] td {
  border-bottom-color: var(--gray-200);
  color: var(--gray-600);
}

[data-theme="dark"] tbody tr:hover {
  background: rgba(0, 240, 255, 0.04);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  background: #1a1a2e;
  border-color: var(--gray-200);
  color: var(--gray-800);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15);
}

[data-theme="dark"] .form-group input::placeholder {
  color: var(--gray-400);
}

[data-theme="dark"] .form-group label {
  color: var(--gray-600);
}

[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #7C6BFF, #00f0ff);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

[data-theme="dark"] .btn-primary:hover {
  background: linear-gradient(135deg, #6D5AE6, #00d4e0);
}

[data-theme="dark"] .btn-success {
  background: linear-gradient(135deg, #39FF14, #00f0ff);
  color: #0a0a0f;
}

[data-theme="dark"] .btn-outline {
  border-color: #00f0ff;
  color: #00f0ff;
}

[data-theme="dark"] .btn-outline:hover {
  background: rgba(0, 240, 255, 0.1);
}

[data-theme="dark"] .btn-ghost {
  color: var(--gray-500);
}

[data-theme="dark"] .btn-ghost:hover {
  background: rgba(0, 240, 255, 0.08);
}

[data-theme="dark"] .modal-overlay {
  background: rgba(0, 0, 0, 0.75);
}

[data-theme="dark"] .modal {
  background: #12121a;
  border: 1px solid rgba(0, 240, 255, 0.15);
}

[data-theme="dark"] .modal h2 {
  color: #f0f0ff;
}

[data-theme="dark"] .top-bar h1 {
  color: #f0f0ff;
}

[data-theme="dark"] .hamburger {
  color: var(--gray-600);
}

[data-theme="dark"] .toast {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .badge-pending {
  background: rgba(255, 214, 0, 0.15);
  color: #FFD600;
}

[data-theme="dark"] .badge-approved {
  background: rgba(57, 255, 20, 0.15);
  color: #39FF14;
}

[data-theme="dark"] .badge-rejected {
  background: rgba(255, 51, 102, 0.15);
  color: #FF3366;
}

[data-theme="dark"] .badge-active {
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
}

[data-theme="dark"] .alert-banner.info {
  background: rgba(0, 240, 255, 0.1);
  color: #00f0ff;
}

[data-theme="dark"] .alert-banner.warning {
  background: rgba(255, 214, 0, 0.1);
  color: #FFD600;
}

[data-theme="dark"] .alert-banner.danger {
  background: rgba(255, 51, 102, 0.1);
  color: #FF3366;
}

[data-theme="dark"] .alert-banner.success {
  background: rgba(57, 255, 20, 0.1);
  color: #39FF14;
}

[data-theme="dark"] .loading-overlay {
  background: rgba(10, 10, 15, 0.85);
}

[data-theme="dark"] .loading-spinner {
  border-color: var(--gray-200);
  border-top-color: #00f0ff;
}

[data-theme="dark"] .empty-state {
  color: var(--gray-400);
}

[data-theme="dark"] .transcript-box {
  background: #1a1a2e;
  border-color: var(--gray-200);
  color: var(--gray-600);
}

[data-theme="dark"] .otp-input {
  background: #1a1a2e;
  border-color: var(--gray-200);
  color: #f0f0ff;
}

[data-theme="dark"] .otp-input:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15);
}

[data-theme="dark"] .tab {
  color: var(--gray-400);
}

[data-theme="dark"] .tab:hover {
  color: var(--gray-600);
}

[data-theme="dark"] .tab.active {
  color: #00f0ff;
  border-bottom-color: #00f0ff;
}

[data-theme="dark"] .multiselect-tag {
  background: rgba(0, 240, 255, 0.1);
  color: #00f0ff;
}

[data-theme="dark"] a {
  color: #00f0ff;
}

[data-theme="dark"] a:hover {
  color: #66f7ff;
}

/* ── Dark Mode Toggle ─────────────────────────────────────── */

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-200);
  background: var(--gray-50);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--primary);
  transform: scale(1.1);
}

[data-theme="dark"] .theme-toggle {
  border-color: rgba(0, 240, 255, 0.3);
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3), 0 0 20px rgba(0, 240, 255, 0.1);
}

/* ── Upload Progress Bar ──────────────────────────────────── */

.upload-progress {
  margin-top: 12px;
  display: none;
}

.upload-progress.active {
  display: block;
}

.upload-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
}

.upload-progress-fill.indeterminate {
  width: 40% !important;
  animation: indeterminate 1.5s ease-in-out infinite;
}

@keyframes indeterminate {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(350%);
  }
}

.upload-progress-text {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.upload-progress-text .spinner-sm {
  width: 12px;
  height: 12px;
  border: 2px solid var(--gray-200);
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

[data-theme="dark"] .upload-progress-fill {
  background: linear-gradient(90deg, #00f0ff, #39FF14);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

/* ── Sidebar Backdrop (Mobile) ────────────────────────────── */

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

[data-theme="dark"] .sidebar-backdrop {
  background: rgba(0, 0, 0, 0.7);
}

/* ═══════════════════════════════════════════════════════════
   Enhanced Responsive
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }

  .main-content {
    margin-left: 0;
    padding: 12px;
  }

  .hamburger {
    display: flex;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .stat-card .stat-value {
    font-size: 22px;
  }

  .stat-card {
    padding: 14px;
  }

  .card {
    padding: 14px;
    margin-bottom: 10px;
  }

  .card-header h3 {
    font-size: 15px;
  }

  .top-bar {
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .top-bar h1 {
    font-size: 20px;
  }

  .top-bar-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

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

  .btn-lg {
    padding: 10px 20px;
    font-size: 14px;
  }

  .nav-item {
    padding: 12px 14px;
    font-size: 15px;
  }

  .table-wrapper {
    margin: 0 -14px;
    padding: 0 14px;
  }

  th,
  td {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .modal {
    max-width: 100%;
    margin: 10px;
    padding: 20px;
    max-height: 90vh;
  }

  .modal-overlay {
    padding: 10px;
  }

  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .toast {
    max-width: 100%;
  }

  .tabs {
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    padding: 10px 14px;
    font-size: 13px;
  }
}

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

  .otp-input {
    width: 40px;
    height: 48px;
    font-size: 20px;
  }

  .main-content {
    padding: 10px;
  }

  .top-bar h1 {
    font-size: 18px;
  }
}