/* Dark Theme Styles */
:root {
  --dark-bg-primary: #0d1b2a;      /* Dark navy blue - primary background */
  --dark-bg-secondary: #1b263b;    /* Slightly lighter navy blue - secondary background */
  --dark-bg-tertiary: #2c3e50;     /* Mid-tone navy blue - tertiary elements */
  --dark-text-primary: #f0f4f8;    /* Very light blue-white - primary text */
  --dark-text-secondary: #d0d6df;  /* Light blue-gray - secondary text */
  --dark-border: #3d5a80;          /* Medium navy blue - borders */
  --dark-hover: #2e5984;           /* Highlight navy blue - hover states */
  --dark-accent: #90e0ef;          /* Light blue - accent color */
  --dark-accent-secondary: #00b4d8; /* Medium blue - secondary accent */
  --dark-error: #ff6b6b;           /* Light red - error states */
  --dark-success: #2ecc71;         /* Light green - success states */
  --dark-warning: #ffbe0b;         /* Light yellow - warning states */
  --dark-info: #48cae4;            /* Light blue - info states */
}

body.dark-theme {
  background-color: var(--dark-bg-primary);
  color: var(--dark-text-primary);
}

/* Navbar styles */
.dark-theme .navbar {
  background-color: var(--dark-bg-primary) !important;
  border-bottom: 1px solid var(--dark-border);
}

.dark-theme .navbar-brand,
.dark-theme .nav-link,
.dark-theme .navbar-text {
  color: var(--dark-text-primary) !important;
}

.dark-theme .nav-link:hover {
  color: var(--dark-accent) !important;
}

/* Card styles */
.dark-theme .card {
  background-color: var(--dark-bg-secondary);
  border-color: var(--dark-border);
  color: var(--dark-text-primary);
}

.dark-theme .card-header,
.dark-theme .card-footer {
  background-color: var(--dark-bg-tertiary);
  border-color: var(--dark-border);
  color: var(--dark-text-primary);
}

/* Override bg-white in dark mode */
.dark-theme .bg-white,
.dark-theme .card-footer.bg-white {
  background-color: var(--dark-bg-tertiary) !important;
  color: var(--dark-text-primary) !important;
}

/* Form controls */
.dark-theme .form-control,
.dark-theme .form-select,
.dark-theme .input-group-text {
  background-color: var(--dark-bg-tertiary);
  border-color: var(--dark-border);
  color: var(--dark-text-primary);
}

.dark-theme .form-control:focus,
.dark-theme .form-select:focus {
  background-color: var(--dark-bg-tertiary);
  border-color: var(--dark-accent);
  box-shadow: 0 0 0 0.25rem rgba(187, 134, 252, 0.25);
  color: var(--dark-text-primary);
}

.dark-theme .form-control::placeholder {
  color: var(--dark-text-secondary);
}

/* Tables */
.dark-theme .table {
  color: var(--dark-text-primary);
  border-color: var(--dark-border);
}

.dark-theme .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: var(--dark-bg-tertiary);
  color: var(--dark-text-primary);
}

.dark-theme .table-hover > tbody > tr:hover > * {
  background-color: var(--dark-hover);
  color: var(--dark-text-primary);
}

.dark-theme .table-bordered,
.dark-theme .table-bordered th,
.dark-theme .table-bordered td {
  border-color: var(--dark-border);
}

/* Buttons */
.dark-theme .btn-primary {
  background-color: var(--dark-accent-secondary);
  border-color: var(--dark-accent-secondary);
  color: var(--dark-bg-primary);
}

.dark-theme .btn-primary:hover,
.dark-theme .btn-primary:focus {
  background-color: var(--dark-accent);
  border-color: var(--dark-accent);
  color: var(--dark-bg-primary);
}

.dark-theme .btn-secondary {
  background-color: var(--dark-bg-tertiary);
  border-color: var(--dark-border);
  color: var(--dark-text-primary);
}

.dark-theme .btn-outline-primary {
  color: var(--dark-accent);
  border-color: var(--dark-accent);
  font-weight: 500;
}

.dark-theme .btn-outline-primary:hover {
  background-color: var(--dark-accent);
  color: var(--dark-bg-primary);
}

.dark-theme .btn-outline-secondary {
  color: var(--dark-text-primary);
  border-color: var(--dark-text-secondary);
  font-weight: 500;
}

.dark-theme .btn-outline-secondary:hover {
  background-color: var(--dark-text-secondary);
  color: var(--dark-bg-primary);
}

.dark-theme .btn-outline-success {
  color: var(--dark-success);
  border-color: var(--dark-success);
}

.dark-theme .btn-outline-info {
  color: var(--dark-info);
  border-color: var(--dark-info);
  font-weight: 500;
}

.dark-theme .btn-outline-info:hover {
  background-color: var(--dark-info);
  color: var(--dark-bg-primary);
  border-color: var(--dark-info);
}

.dark-theme .btn-outline-warning {
  color: var(--dark-warning);
  border-color: var(--dark-warning);
}

.dark-theme .btn-outline-danger {
  color: var(--dark-error);
  border-color: var(--dark-error);
  font-weight: 500;
}

.dark-theme .btn-outline-danger:hover {
  background-color: var(--dark-error);
  color: var(--dark-text-primary);
  border-color: var(--dark-error);
}

/* Modal */
.dark-theme .modal-content {
  background-color: var(--dark-bg-secondary);
  border-color: var(--dark-border);
}

.dark-theme .modal-header,
.dark-theme .modal-footer {
  background-color: var(--dark-bg-tertiary);
  border-color: var(--dark-border);
}

/* Alerts */
.dark-theme .alert-success {
  background-color: rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.5);
  color: var(--dark-success);
}

.dark-theme .alert-info {
  background-color: rgba(33, 150, 243, 0.2);
  border-color: rgba(33, 150, 243, 0.5);
  color: var(--dark-info);
}

.dark-theme .alert-warning {
  background-color: rgba(255, 152, 0, 0.2);
  border-color: rgba(255, 152, 0, 0.5);
  color: var(--dark-warning);
}

.dark-theme .alert-danger {
  background-color: rgba(207, 102, 121, 0.2);
  border-color: rgba(207, 102, 121, 0.5);
  color: var(--dark-error);
}

/* Links */
.dark-theme a {
  color: var(--dark-accent);
}

.dark-theme a:hover {
  color: #a66ffc;
}

/* Light buttons in dark mode */
.dark-theme .btn-light {
  background-color: var(--dark-text-primary);
  border-color: var(--dark-text-primary);
  color: var(--dark-bg-primary);
}

.dark-theme .btn-light:hover,
.dark-theme .btn-light:focus {
  background-color: var(--dark-text-secondary);
  border-color: var(--dark-text-secondary);
  color: var(--dark-bg-primary);
}

/* Progress bar */
.dark-theme .progress {
  background-color: var(--dark-bg-tertiary);
}

/* Footer */
.dark-theme footer {
  background-color: var(--dark-bg-primary) !important;
  color: var(--dark-text-secondary);
  border-top: 1px solid var(--dark-border);
}

/* Badges */
.dark-theme .badge.bg-secondary {
  background-color: var(--dark-bg-tertiary) !important;
}

/* Nav tabs */
.dark-theme .nav-tabs {
  border-bottom-color: var(--dark-border);
}

/* Description, Notes, and Details cards */
.dark-theme .description-card,
.dark-theme .notes-card,
.dark-theme .details-card {
  background-color: var(--dark-bg-secondary);
  color: var(--dark-text-primary);
  border-color: var(--dark-border);
}

.dark-theme .card.border {
  border-color: var(--dark-border) !important;
  background-color: var(--dark-bg-secondary);
}

.dark-theme .nav-tabs .nav-link {
  color: var(--dark-text-secondary);
}

.dark-theme .nav-tabs .nav-link.active {
  background-color: var(--dark-bg-secondary);
  border-color: var(--dark-border) var(--dark-border) var(--dark-bg-secondary);
  color: var(--dark-accent);
}

/* Text colors */
.dark-theme .text-muted {
  color: var(--dark-text-secondary) !important;
}

/* Custom scrollbar for webkit browsers */
.dark-theme::-webkit-scrollbar {
  width: 10px;
}

.dark-theme::-webkit-scrollbar-track {
  background: var(--dark-bg-primary);
}

.dark-theme::-webkit-scrollbar-thumb {
  background: var(--dark-bg-tertiary);
  border-radius: 5px;
}

.dark-theme::-webkit-scrollbar-thumb:hover {
  background: var(--dark-hover);
}

/* Landing Page CTA Section */
.dark-theme .cta-section {
  background-color: var(--dark-navy);
  color: var(--dark-text-primary);
  border-top: 1px solid var(--dark-border);
  border-bottom: 1px solid var(--dark-border);
}

.dark-theme .cta-title {
  color: var(--dark-heading);
}

.dark-theme .cta-description {
  color: var(--dark-text-secondary);
}
