/* ============================================
   Dark Mode Overrides
   ============================================ */

[data-theme="dark"] {
  --slate-50: #1E293B;
  --slate-100: #1E293B;
  --slate-200: #334155;
  --slate-300: #475569;
  --slate-400: #64748B;
  --slate-500: #94A3B8;
  --slate-600: #CBD5E1;
  --slate-700: #E2E8F0;
  --slate-800: #F1F5F9;
  --slate-900: #F8FAFC;
  --white: #0F172A;
  --border-color: #334155;

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

[data-theme="dark"] body {
  background-color: #0F172A;
  color: #F8FAFC;
}

[data-theme="dark"] .sidebar {
  background: #020617;
  border-right: 1px solid #1E293B;
}
[data-theme="dark"] .sidebar-header { border-bottom-color: #1E293B; }
[data-theme="dark"] .sidebar-footer { border-top-color: #1E293B; }

[data-theme="dark"] .topbar {
  background: #0F172A;
  border-bottom-color: #1E293B;
}

[data-theme="dark"] .topbar-search {
  background: #1E293B;
  color: #94A3B8;
}
[data-theme="dark"] .topbar-search:hover { background: #334155; }
[data-theme="dark"] .topbar-search kbd {
  background: #334155;
  border-color: #475569;
  color: #94A3B8;
}

[data-theme="dark"] .card,
[data-theme="dark"] .kpi-card,
[data-theme="dark"] .dashboard-chart-card,
[data-theme="dark"] .data-table-wrapper,
[data-theme="dark"] .kanban-card,
[data-theme="dark"] .rpva-message,
[data-theme="dark"] .team-card,
[data-theme="dark"] .invoice-preview {
  background: #1E293B;
  border-color: #334155;
}

[data-theme="dark"] .data-table thead {
  background: #0F172A;
  border-bottom-color: #334155;
}
[data-theme="dark"] .data-table td { border-bottom-color: #1E293B; }
[data-theme="dark"] .data-table tbody tr:hover { background: #334155; }

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

[data-theme="dark"] .calendar-grid,
[data-theme="dark"] .calendar-month,
[data-theme="dark"] .calendar-week { background: #1E293B; border-color: #334155; }
[data-theme="dark"] .calendar-day { border-color: #334155; }
[data-theme="dark"] .calendar-day:hover { background: #334155; }
[data-theme="dark"] .calendar-day.today { background: #1E3A5C; }
[data-theme="dark"] .calendar-day-header,
[data-theme="dark"] .week-day-header { background: #0F172A; border-bottom-color: #334155; color: #94A3B8; }
[data-theme="dark"] .week-time-col { color: #64748B; border-color: #334155; }
[data-theme="dark"] .week-cell { border-color: #334155; }
[data-theme="dark"] .week-header { border-color: #334155; }

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .ai-input {
  background: #1E293B;
  border-color: #475569;
  color: #F8FAFC;
}
[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] .form-textarea:focus {
  border-color: var(--navy-500);
}

[data-theme="dark"] .modal { background: #1E293B; }
[data-theme="dark"] .modal-header { border-bottom-color: #334155; }
[data-theme="dark"] .modal-footer { border-top-color: #334155; }

[data-theme="dark"] .toast { background: #1E293B; border-color: #334155; }

[data-theme="dark"] .btn-secondary {
  background: #1E293B;
  border-color: #475569;
  color: #E2E8F0;
}
[data-theme="dark"] .btn-secondary:hover {
  background: #334155;
  border-color: #64748B;
}

[data-theme="dark"] .btn-ghost { color: #CBD5E1; }
[data-theme="dark"] .btn-ghost:hover { background: #334155; color: #F8FAFC; }

[data-theme="dark"] .pill {
  background: #1E293B;
  border-color: #475569;
  color: #CBD5E1;
}

[data-theme="dark"] .tab { color: #94A3B8; }
[data-theme="dark"] .tab:hover { color: #E2E8F0; }
[data-theme="dark"] .tabs { border-bottom-color: #334155; }

[data-theme="dark"] .table-toolbar { border-bottom-color: #334155; }
[data-theme="dark"] .table-pagination { border-top-color: #334155; }

[data-theme="dark"] .topbar-timer {
  background: rgba(30, 58, 138, 0.2);
  border-color: #334155;
}

[data-theme="dark"] .ai-panel {
  background: #0F172A;
  border-left-color: #1E293B;
}
[data-theme="dark"] .ai-panel-header { border-bottom-color: #1E293B; }
[data-theme="dark"] .ai-input-area { border-top-color: #1E293B; }
[data-theme="dark"] .ai-message.assistant { background: rgba(124, 58, 237, 0.15); }

[data-theme="dark"] .search-dialog { background: #1E293B; }
[data-theme="dark"] .search-overlay { background: rgba(0,0,0,0.7); }

[data-theme="dark"] .doc-folder:hover,
[data-theme="dark"] .doc-file:hover { background: #334155; }

[data-theme="dark"] .activity-item:hover { background: #334155; }

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

[data-theme="dark"] .notification-dot { border-color: #0F172A; }

[data-theme="dark"] .mobile-bottom-nav {
  background: #0F172A;
  border-top-color: #1E293B;
}

[data-theme="dark"] .auth-screen {
  background: linear-gradient(135deg, #020617 0%, #0F172A 50%, #1E293B 100%);
}
[data-theme="dark"] .auth-card { background: #1E293B; }
[data-theme="dark"] .auth-logo h1 { color: var(--navy-400); }

[data-theme="dark"] .loading-screen { background: #0F172A; }
[data-theme="dark"] .loading-text { color: #94A3B8; }
[data-theme="dark"] .loading-bar { background: #334155; }

[data-theme="dark"] .timeline::before { background: #334155; }

[data-theme="dark"] .message-bubble.received { background: #334155; color: #F8FAFC; }

[data-theme="dark"] .week-time-label { border-right-color: #334155; }
[data-theme="dark"] .week-cell { border-color: #334155; }
[data-theme="dark"] .week-cell:hover { background: #334155; }
