/* ====================================
   DARK MODE COLOR SCHEME
   ==================================== */

body.dark-mode {
  /* Background colors */
  --bs-body-bg: #0f172a;
  --bs-body-bg-rgb: 15, 23, 42;
  --bs-body-color: #e2e8f0;
  --bs-body-color-rgb: 226, 232, 240;

  /* Text colors */
  --bs-heading-color: #f1f5f9;
  --bs-link-color: #93c5fd;
  --bs-link-hover-color: #bfdbfe;

  /* Border colors */
  --bs-border-color: #334155;
  --bs-border-color-translucent: rgba(255, 255, 255, 0.1);

  /* Component colors */
  --bs-primary: #60a5fa;
  --bs-secondary: #94a3b8;
  --bs-success: #4ade80;
  --bs-info: #38bdf8;
  --bs-warning: #facc15;
  --bs-danger: #f87171;
  --bs-light: #1e293b;
  --bs-dark: #f1f5f9;

  /* Gray scale for dark mode */
  --bs-gray: #cbd5e1;
  --bs-gray-100: #1e293b;
  --bs-gray-200: #334155;
  --bs-gray-300: #475569;
  --bs-gray-400: #64748b;
  --bs-gray-500: #94a3b8;
  --bs-gray-600: #cbd5e1;
  --bs-gray-700: #e2e8f0;
  --bs-gray-800: #f1f5f9;
  --bs-gray-900: #f8fafc;

  /* Text adjustments */
  color: #e2e8f0 !important;
  background-color: #0f172a !important;
}

/* ====================================
   MAIN LAYOUT - DARK MODE
   ==================================== */

body.dark-mode main {
  background-color: #0f172a !important;
  color: #e2e8f0 !important;
}

body.dark-mode main.main-content {
  background-color: #0f172a !important;
}

body.dark-mode .container,
body.dark-mode .container-fluid {
  background-color: transparent;
}

/* ====================================
   GLASS COMPONENTS - DARK MODE
   ==================================== */

body.dark-mode .card.glass {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.dark-mode .card.glass:hover {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.25);
}

body.dark-mode aside.glass {
  background: rgba(15, 23, 42, 0.7);
  border-right: 1px solid rgba(148, 163, 184, 0.15);
}

body.dark-mode .fixed-plugin .glass {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* ====================================
   TABLE STYLING - DARK MODE
   ==================================== */

body.dark-mode .table {
  color: #e2e8f0;
  border-color: #334155;
}

body.dark-mode .table thead {
  border-bottom: 1px solid #334155;
  background-color: rgba(30, 41, 59, 0.5);
}

body.dark-mode .table thead th {
  color: #f1f5f9;
  font-weight: 600;
  border-color: #334155;
}

body.dark-mode .table tbody tr {
  border-bottom: 1px solid #334155;
  transition: background-color 0.2s ease;
}

body.dark-mode .table tbody tr:hover {
  background-color: rgba(51, 65, 85, 0.3);
}

body.dark-mode .table tbody td {
  color: #cbd5e1;
  border-color: #334155;
  padding: 0.75rem;
}

body.dark-mode .bg-light {
  background-color: rgba(30, 41, 59, 0.5) !important;
}

/* ====================================
   BADGES & STATUS - DARK MODE
   ==================================== */

body.dark-mode .badge {
  font-weight: 600;
  border-radius: 0.375rem;
}

body.dark-mode .bg-gradient-success {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #fff !important;
}

body.dark-mode .bg-gradient-warning {
  background: linear-gradient(135deg, #eab308, #ca8a04) !important;
  color: #fff !important;
}

body.dark-mode .bg-gradient-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
}

body.dark-mode .bg-gradient-info {
  background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
  color: #fff !important;
}

body.dark-mode .bg-gradient-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color: #fff !important;
}

body.dark-mode .badge-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

/* ====================================
   BUTTONS & FORMS - DARK MODE
   ==================================== */

body.dark-mode .btn {
  border-color: #475569;
}

body.dark-mode .btn-white {
  background-color: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}

body.dark-mode .btn-white:hover {
  background-color: #334155;
  border-color: #64748b;
  color: #f1f5f9;
}

body.dark-mode .btn-light {
  background-color: #334155;
  color: #f1f5f9;
  border-color: #475569;
}

body.dark-mode .btn-light:hover {
  background-color: #475569;
  color: #f8fafc;
}

body.dark-mode .btn-link {
  color: #93c5fd;
}

body.dark-mode .btn-link:hover {
  color: #bfdbfe;
}

body.dark-mode .btn-link.text-danger {
  color: #f87171;
}

body.dark-mode .btn-link.text-danger:hover {
  color: #fca5a5;
}

body.dark-mode .btn-link.text-primary {
  color: #60a5fa;
}

body.dark-mode .btn-link.text-primary:hover {
  color: #93c5fd;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
  background-color: #1e293b;
  color: #e2e8f0;
  border: 1px solid #475569;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
  background-color: #1e293b;
  color: #e2e8f0;
  border-color: #60a5fa;
  box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.25);
}

body.dark-mode .form-control::placeholder {
  color: #94a3b8;
}

/* ====================================
   CARDS & CONTAINERS - DARK MODE
   ==================================== */

body.dark-mode .card {
  background-color: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
}

body.dark-mode .card-header {
  background-color: rgba(30, 41, 59, 0.5);
  border-bottom: 1px solid #334155;
  color: #f1f5f9;
}

body.dark-mode .card-body {
  color: #cbd5e1;
}

body.dark-mode .card-footer {
  background-color: rgba(30, 41, 59, 0.5);
  border-top: 1px solid #334155;
  color: #cbd5e1;
}

/* ====================================
   TEXT & HEADINGS - DARK MODE
   ==================================== */

body.dark-mode h1,
body.dark-mode .h1,
body.dark-mode h2,
body.dark-mode .h2,
body.dark-mode h3,
body.dark-mode .h3,
body.dark-mode h4,
body.dark-mode .h4,
body.dark-mode h5,
body.dark-mode .h5,
body.dark-mode h6,
body.dark-mode .h6 {
  color: #f1f5f9;
}

body.dark-mode .text-muted {
  color: #94a3b8 !important;
}

body.dark-mode .text-secondary {
  color: #94a3b8 !important;
}

body.dark-mode .text-body {
  color: #cbd5e1 !important;
}

body.dark-mode .text-dark {
  color: #e2e8f0 !important;
}

/* ====================================
   FOOTER - DARK MODE
   ==================================== */

body.dark-mode footer {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background-color: rgba(15, 23, 42, 0.5);
  color: #cbd5e1;
}

body.dark-mode footer a {
  color: #93c5fd;
}

body.dark-mode footer a:hover {
  color: #bfdbfe;
}

/* ====================================
   MODAL - DARK MODE
   ==================================== */

body.dark-mode .modal-content {
  background-color: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
}

body.dark-mode .modal-header {
  background-color: rgba(30, 41, 59, 0.5);
  border-bottom: 1px solid #334155;
  color: #f1f5f9;
}

body.dark-mode .modal-footer {
  background-color: rgba(30, 41, 59, 0.5);
  border-top: 1px solid #334155;
}

body.dark-mode .modal-content.glass {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

body.dark-mode .btn-close {
  filter: invert(1);
}

/* ====================================
   DROPDOWN & NAVIGATION - DARK MODE
   ==================================== */

body.dark-mode .dropdown-menu {
  background-color: #1e293b;
  border: 1px solid #334155;
}

body.dark-mode .dropdown-item {
  color: #cbd5e1;
}

body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item:focus {
  background-color: #334155;
  color: #f1f5f9;
}

body.dark-mode .dropdown-divider {
  border-top: 1px solid #334155;
}

/* ====================================
   SCROLLBAR - DARK MODE
   ==================================== */

body.dark-mode ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body.dark-mode ::-webkit-scrollbar-track {
  background: #0f172a;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 4px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ====================================
   ALERTS - DARK MODE
   ==================================== */

body.dark-mode .alert {
  background-color: rgba(51, 65, 85, 0.3);
  border: 1px solid #475569;
  color: #e2e8f0;
}

body.dark-mode .alert-success {
  background-color: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

body.dark-mode .alert-danger {
  background-color: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

body.dark-mode .alert-warning {
  background-color: rgba(250, 204, 21, 0.15);
  border-color: rgba(250, 204, 21, 0.3);
  color: #fde047;
}

body.dark-mode .alert-info {
  background-color: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

/* ====================================
   UTILITY CLASSES - DARK MODE
   ==================================== */

body.dark-mode .bg-gradient-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
}

body.dark-mode .bg-gradient-info {
  background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
}

body.dark-mode .bg-gradient-success {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
}

body.dark-mode .bg-gradient-warning {
  background: linear-gradient(135deg, #eab308, #ca8a04) !important;
}

body.dark-mode .bg-gradient-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

body.dark-mode .text-white {
  color: #f1f5f9 !important;
}

body.dark-mode .border {
  border-color: #334155 !important;
}

body.dark-mode hr {
  border-top: 1px solid #334155;
  opacity: 1;
}
