/* Base Variables */
:root {
  --transition: all 0.3s ease;
  /* Default: Clean White & Blue Theme */
  --bg-primary: #ffffff;
  --bg-secondary: #f0f4f8;
  --bg-card: #ffffff;
  --text-primary: #000000;
  --text-secondary: #000000;
  --text-muted: #000000;
  --accent: #2563eb;
  --border: #cbd5e0;
  --hover: #e6f2ff;
  --modal-backdrop: rgba(0, 0, 0, 0.5);
  /* Status colors with good contrast */
  --success-bg: #10b981;
  --success-dark: #059669;
  --success-light: #d1fae5;
  --warning-bg: #f59e0b;
  --warning-dark: #d97706;
  --warning-light: #fef3c7;
  /* Sidebar specific */
  --sidebar-bg: #1e3a8a;
  --sidebar-text: #ffffff;
  --sidebar-hover: #2563eb;
  --sidebar-active: #3b82f6;
}

/* Light Theme (Default - White & Blue) */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f0f4f8;
  --bg-card: #ffffff;
  --text-primary: #000000;
  --text-secondary: #000000;
  --text-muted: #000000
  --accent: #2563eb;
  --border: #cbd5e0;
  --hover: #e6f2ff;
  --modal-backdrop: rgba(0, 0, 0, 0.5);
  --success-bg: #10b981;
  --success-dark: #059669;
  --success-light: #d1fae5;
  --warning-bg: #f59e0b;
  --warning-dark: #d97706;
  --warning-light: #fef3c7;
  /* Sidebar specific */
  --sidebar-bg: #1e3a8a;
  --sidebar-text: #ffffff;
  --sidebar-hover: #2563eb;
  --sidebar-active: #3b82f6;
}

/* Dark Blue Theme */
[data-theme="dark-blue"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e3a8a;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --border: #334155;
  --hover: #2563eb;
  --modal-backdrop: rgba(15, 23, 42, 0.8);
  --success-bg: #10b981;
  --success-dark: #059669;
  --success-light: #047857;
  --warning-bg: #f59e0b;
  --warning-dark: #d97706;
  --warning-light: #b45309;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --border: #334155;
  --hover: #2563eb;
  --modal-backdrop: rgba(15, 23, 42, 0.8);
  --success-bg: #10b981;
  --success-dark: #059669;
  --success-light: #047857;
  --warning-bg: #f59e0b;
  --warning-dark: #d97706;
  --warning-light: #b45309;
}

/* Olive Gold Theme */
[data-theme="olive-gold"] {
  --bg-primary: #556905;
  --bg-secondary: #6b7f0a;
  --bg-card: #7a9209;
  --text-primary: #ffffff;
  --text-secondary: #f0f0f0;
  --text-muted: #d1d5db;
  --accent: #f1c705;
  --border: #8fa50c;
  --hover: #f1c705;
  --modal-backdrop: rgba(85, 105, 5, 0.8);
  --success-bg: #22c55e;
  --success-dark: #16a34a;
  --success-light: #15803d;
  --warning-bg: #f1c705;
  --warning-dark: #d4af04;
  --warning-light: #b8940f;
}

/* Custom green classes for Vue components */
.custom-green-bg {
  background-color: #f4f6f0 !important;
}

.custom-green-text {
  color: #516425 !important;
}

/* Global Styles */
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  transition: var(--transition);
  margin: 0;
  padding: 0;
}

/* Modals */
.modal {
  background: var(--modal-backdrop) !important;
}

.modal-content {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  color: var(--text-primary) !important;
}

.modal-header {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
}

.modal-title {
  color: var(--text-primary) !important;
}

.modal-body {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

.modal-footer {
  background: var(--bg-secondary) !important;
  border-top: 1px solid var(--border) !important;
}

.btn-close {
  filter: var(--text-primary) #ffffff invert(1) invert(0);
}

/* Alerts */
.alert {
  border-radius: 8px !important;
  border: 1px solid var(--border) !important;
}

.alert-info {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--accent) !important;
}

.alert-success {
  background: #3b82f6 !important;
  color: white !important;
  border-color: #3b82f6 !important;
}

.alert-warning {
  background: #3b82f6 !important;
  color: white !important;
  border-color: #3b82f6 !important;
}

.alert-danger {
  background: #3b82f6 !important;
  color: white !important;
  border-color: #3b82f6 !important;
}

/* Light Theme specific - blue bg with white text */
[data-theme="light"] .alert-success,
[data-theme="light"] .alert-warning,
[data-theme="light"] .alert-danger {
  background: #3b82f6 !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}

/* Dark Theme specific - blue bg with white text */
[data-theme="dark"] .alert-success,
[data-theme="dark"] .alert-warning,
[data-theme="dark"] .alert-danger,
[data-theme="dark-blue"] .alert-success,
[data-theme="dark-blue"] .alert-warning,
[data-theme="dark-blue"] .alert-danger {
  background: #3b82f6 !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}

/* Retake Quiz Button - Black background, white text for all themes */
.btn-retake-quiz {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #000000 !important;
}

.btn-retake-quiz:hover,
.btn-retake-quiz:focus {
  background: #1a1a1a !important;
  color: #ffffff !important;
  border-color: #1a1a1a !important;
}

/* Badges */
.badge {
  background: var(--accent) !important;
  color: var(--text-primary) !important;
}

.bg-success {
  background: var(--success-bg) !important;
}

.bg-primary {
  background: var(--accent) !important;
}

.bg-secondary {
  background: var(--bg-secondary) !important;
}

/* Text Colors */
.text-primary {
  color: var(--text-primary) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

/* Sidebar */
.bg-dark {
  background: var(--sidebar-bg) !important;
}

/* Sidebar text - force white for readability */
.bg-dark .nav-link,
.bg-dark a,
.bg-dark .navbar-brand,
.bg-dark small,
.bg-dark .text-muted {
  color: var(--sidebar-text) !important;
}

/* Sidebar hover state */
.bg-dark .nav-link:hover {
  background: var(--sidebar-hover) !important;
  color: #ffffff !important;
}

/* Sidebar active state */
.bg-dark .nav-link.active,
.bg-dark .nav-link.bg-primary,
.bg-dark .nav-link.rounded {
  background: var(--sidebar-active) !important;
  color: #ffffff !important;
}

/* Fix sidebar overlap */
nav[style*="position: fixed"] {
  z-index: 1000 !important;
  background: var(--sidebar-bg) !important;
}

.container,
.container-fluid {
  position: relative;
  z-index: 1 !important;
}

/* Ensure main content doesn't overlap with sidebar */
main,
.main-content,
[role="main"] {
  margin-left: 280px !important;
  position: relative;
  z-index: 1 !important;
}

/* Responsive buttons */
.btn {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .btn {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
  }

  .btn-group {
    flex-wrap: wrap;
  }

  .btn-group .btn {
    flex: 1 1 auto;
    min-width: 100px;
  }
}

.nav-link {
  color: var(--sidebar-text) !important;
  transition: var(--transition);
  border-radius: 8px;
  margin: 4px 0;
  padding: 12px 16px !important;
}

/* Light theme nav-link override - black text */
[data-theme="light"] .nav-link {
  color: #000000 !important;
}

.nav-link:hover {
  background: var(--sidebar-hover) !important;
  color: #ffffff !important;
  transform: translateX(4px);
}

/* Light theme nav-link hover override */
[data-theme="light"] .nav-link:hover {
  color: #000000 !important;
}

.nav-link.bg-primary,
.nav-link.rounded {
  background: var(--sidebar-active) !important;
  color: #ffffff !important;
}

.navbar-brand {
  color: var(--sidebar-text) !important;
}

small.text-muted {
  color: rgba(255, 255, 255, 0.8) !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

hr {
  border-color: var(--border) !important;
  opacity: 0.3;
}

/* Cards */
.card,
.login-section,
.menu-section {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  color: var(--text-primary) !important;
}

.card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-header {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  font-weight: 600;
}

.card-body {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

.card-title {
  color: var(--text-primary) !important;
  font-weight: 700;
}

.card-text {
  color: var(--text-secondary) !important;
}

/* Ensure all text in cards is readable */
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6 {
  color: var(--text-primary) !important;
}

.card p,
.card span,
.card div {
  color: var(--text-secondary) !important;
}

.card small {
  color: var(--text-muted) !important;
}

/* Forms */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
select,
textarea {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px;
  padding: 12px;
  transition: var(--transition);
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--accent) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.form-label,
label {
  color: var(--text-primary) !important;
  font-weight: 600;
}

/* Checkboxes and Radio Buttons */
.form-check {
  padding-left: 0;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  position: relative;
  padding: 0.65rem 0.75rem 0.65rem 1.25rem;
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: var(--bg-primary);
  border: 1.5px solid transparent;
}

.form-check:hover {
  background-color: var(--hover);
  border-color: var(--accent);
  transform: translateX(2px);
}

/* Checkbox Styling */
.form-check-input[type="checkbox"] {
  cursor: pointer;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-color: var(--bg-secondary) !important;
  border: 2px solid var(--border) !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 4px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  margin: 0 !important;
  float: left;
  margin-left: 0.5em !important;
}

.form-check-input[type="checkbox"]:hover {
  border-color: var(--accent) !important;
  transform: scale(1.05);
}

.form-check-input[type="checkbox"]:checked {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--hover) 100%
  ) !important;
  border-color: var(--accent) !important;
  animation: checkboxCheck 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.form-check-input[type="checkbox"]:checked::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: white;
  font-weight: bold;
  font-size: 14px;
  animation: checkPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.1s forwards;
}

@keyframes checkboxCheck {
  0% {
    transform: scale(0.8) rotate(0deg);
  }
  50% {
    transform: scale(1.15) rotate(180deg);
  }
  100% {
    transform: scale(1) rotate(360deg);
  }
}

@keyframes checkPop {
  0% {
    transform: translate(-50%, -50%) scale(0);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Radio Button Styling */
.form-check-input[type="radio"] {
  cursor: pointer;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-color: var(--bg-secondary) !important;
  border: 2px solid var(--border) !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  margin: 0 !important;
  float: left;
  margin-left: 0.5em !important;
}

.form-check-input[type="radio"]:hover {
  border-color: var(--accent) !important;
  transform: scale(1.05);
}

.form-check-input[type="radio"]:checked {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--hover) 100%
  ) !important;
  border-color: var(--accent) !important;
  animation: radioCheck 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.form-check-input[type="radio"]:checked::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 50%;
  animation: dotPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.1s forwards;
}

@keyframes radioCheck {
  0% {
    transform: scale(0.8) rotate(0deg);
  }
  50% {
    transform: scale(1.15) rotate(180deg);
  }
  100% {
    transform: scale(1) rotate(360deg);
  }
}

@keyframes dotPop {
  0% {
    transform: translate(-50%, -50%) scale(0);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Focus states for accessibility */
.form-check-input:focus {
  border-color: var(--accent) !important;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
}

/* Form check label styling */
.form-check-label {
  margin-left: 0.65rem;
  cursor: pointer;
  user-select: none;
  flex: 1;
  font-weight: 450;
  transition: color 0.3s ease;
  font-size: 0.95rem;
  color: var(--text-secondary) !important;
}

/* Enhanced styling when checked */
.form-check:has(.form-check-input:checked) {
  background-color: rgba(59, 130, 246, 0.06);
  border-color: var(--accent);
}

.form-check:has(.form-check-input:checked) .form-check-label {
  color: var(--accent) !important;
}

/* Bootstrap form-check overrides */
.form-check .form-check-input {
  margin-top: 0 !important;
  margin-left: 0 !important;
}

/* Ensure proper spacing in different contexts */
.form-check + .form-check {
  margin-top: 0.5rem;
}

/* Custom checkbox/radio in different containers */
.card .form-check,
.modal .form-check,
.alert .form-check {
  background-color: transparent;
  border: none;
  padding: 0.5rem 0;
}

.card .form-check:hover,
.modal .form-check:hover,
.alert .form-check:hover {
  background-color: var(--hover);
  border-radius: 6px;
  padding: 0.5rem;
}

/* Registration form radio-group styling */
.radio-group {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.radio-group label {
  font-weight: normal !important;
  margin-bottom: 0 !important;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
}

.radio-group label:hover {
  background-color: var(--hover);
  border-color: var(--accent);
}

.radio-group input[type="radio"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  background-color: var(--bg-secondary) !important;
  border: 2px solid var(--border) !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.radio-group input[type="radio"]:hover {
  border-color: var(--accent) !important;
  transform: scale(1.05);
}

.radio-group input[type="radio"]:checked {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--hover) 100%
  ) !important;
  border-color: var(--accent) !important;
}

.radio-group input[type="radio"]:checked::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 50%;
}

.radio-group input[type="radio"]:checked + span,
.radio-group label:has(input[type="radio"]:checked) {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: var(--accent);
  color: var(--accent) !important;
  font-weight: 600;
}

/* Legacy radio button styling for forms that don't use form-check */
input[type="radio"]:not(.form-check-input) {
  cursor: pointer;
  width: 18px;
  height: 18px;
  background-color: var(--bg-secondary) !important;
  border: 2px solid var(--border) !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

input[type="radio"]:not(.form-check-input):hover {
  border-color: var(--accent) !important;
  transform: scale(1.05);
}

input[type="radio"]:not(.form-check-input):checked {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--hover) 100%
  ) !important;
  border-color: var(--accent) !important;
}

input[type="radio"]:not(.form-check-input):checked::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 50%;
}

/* Legacy checkbox styling for forms that don't use form-check */
input[type="checkbox"]:not(.form-check-input) {
  cursor: pointer;
  width: 18px;
  height: 18px;
  background-color: var(--bg-secondary) !important;
  border: 2px solid var(--border) !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 4px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

input[type="checkbox"]:not(.form-check-input):hover {
  border-color: var(--accent) !important;
  transform: scale(1.05);
}

input[type="checkbox"]:not(.form-check-input):checked {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--hover) 100%
  ) !important;
  border-color: var(--accent) !important;
}

input[type="checkbox"]:not(.form-check-input):checked::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 14px;
}

/* Payment method styling */
.payment-method {
  border: 2px solid var(--border) !important;
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  transition: all 0.3s ease;
}

.payment-method:hover {
  border-color: var(--accent) !important;
  background-color: var(--hover) !important;
}

.payment-method.selected {
  border-color: var(--accent) !important;
  background-color: rgba(59, 130, 246, 0.1) !important;
}

.payment-method input[type="radio"] {
  margin-right: 10px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  background-color: var(--bg-secondary) !important;
  border: 2px solid var(--border) !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.payment-method input[type="radio"]:hover {
  border-color: var(--accent) !important;
  transform: scale(1.05);
}

.payment-method input[type="radio"]:checked {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--hover) 100%
  ) !important;
  border-color: var(--accent) !important;
}

.payment-method input[type="radio"]:checked::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 50%;
}

/* Star rating styling - preserve existing functionality */
.star-rating input[type="radio"] {
  display: none !important;
}

.star-rating label {
  font-size: 2rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.2s;
}

.star-rating input[type="radio"]:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: #ffc107 !important;
}

/* Scale option styling for surveys */
.scale-option input[type="radio"] {
  display: none !important;
}

.scale-option input[type="radio"]:checked + label {
  background-color: var(--accent) !important;
  color: white !important;
  font-weight: bold;
}

/* Form switches */
.form-check-input[type="checkbox"].form-switch {
  width: 3em !important;
  height: 1.5em !important;
  background-color: var(--bg-secondary) !important;
  border: 2px solid var(--border) !important;
  border-radius: 2em !important;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-check-input[type="checkbox"].form-switch:checked {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
}

.form-check-input[type="checkbox"].form-switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.5em - 6px);
  height: calc(1.5em - 6px);
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.form-check-input[type="checkbox"].form-switch:checked::before {
  transform: translateX(calc(3em - 1.5em));
}

/* Registration checkbox-row styling */
.checkbox-row {
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.checkbox-row input[type="checkbox"] {
  cursor: pointer;
  width: 20px;
  height: 20px;
  background-color: var(--bg-secondary) !important;
  border: 2px solid var(--border) !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 4px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.checkbox-row input[type="checkbox"]:hover {
  border-color: var(--accent) !important;
  transform: scale(1.05);
}

.checkbox-row input[type="checkbox"]:checked {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--hover) 100%
  ) !important;
  border-color: var(--accent) !important;
}

.checkbox-row input[type="checkbox"]:checked::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 16px;
}

.checkbox-label {
  color: var(--text-primary) !important;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

/* DICDS forms styling */
.form-group label input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  background-color: var(--bg-secondary) !important;
  border: 2px solid var(--border) !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 4px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.form-group label input[type="checkbox"]:hover {
  border-color: var(--accent) !important;
  transform: scale(1.05);
}

.form-group label input[type="checkbox"]:checked {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--hover) 100%
  ) !important;
  border-color: var(--accent) !important;
}

.form-group label input[type="checkbox"]:checked::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 14px;
}

/* Buttons */
.btn,
.login-btn,
button[type="submit"] {
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

.btn-primary:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: #6b7280 !important;
  color: #ffffff !important;
  border-color: #6b7280 !important;
}

.btn-secondary:hover {
  background: #4b5563 !important;
  border-color: #4b5563 !important;
}

.btn-success {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

.btn-success:hover {
  background: #059669 !important;
  border-color: #059669 !important;
}

.btn-outline-primary {
  background: transparent !important;
  color: #2563eb !important;
  border: 2px solid #2563eb !important;
}

.btn-outline-primary:hover {
  background: #2563eb !important;
  color: #ffffff !important;
}

/* Tables */
table {
  background: var(--bg-card) !important;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  color: var(--text-primary) !important;
}

th {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  font-weight: 600;
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border) !important;
}

td {
  padding: 16px;
  border-top: 1px solid var(--border) !important;
  color: var(--text-secondary) !important;
  background: var(--bg-card) !important;
}

tr:hover td {
  background: var(--hover) !important;
}

/* Progress */
.progress {
  background: var(--bg-secondary) !important;
  border-radius: 8px;
}

.progress-bar {
  background: var(--accent) !important;
}

/* Dropdowns */
.dropdown-menu {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px;
}

.dropdown-item {
  color: var(--text-primary) !important;
}

.dropdown-item:hover {
  background: var(--hover) !important;
  color: var(--text-primary) !important;
}

/* Header Banner */
.header-banner {
  background: linear-gradient(135deg, var(--accent), var(--bg-card));
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
}

/* Menu Items */
.menu-header {
  background: var(--accent) !important;
  color: var(--text-primary) !important;
  padding: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.menu-item {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border) !important;
  transition: var(--transition);
}

.menu-item:hover {
  background: var(--hover) !important;
  padding-left: 20px;
}

.menu-item a {
  color: var(--text-primary) !important;
  text-decoration: none;
}

/* Container */
.login-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 6px;
}

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

/* Chapter Items */
.chapter-item {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
}

.chapter-item:hover {
  background: var(--hover) !important;
}

.chapter-item.active {
  background: var(--accent) !important;
  color: var(--text-primary) !important;
}

.chapter-item.completed {
  background: var(--success-bg) !important;
  color: white !important;
  border-left: 4px solid var(--success-dark) !important;
}

.chapter-item.completed::before {
  color: white !important;
}

.chapter-item.completed .chapter-status {
  color: white !important;
}

.chapter-item.locked {
  background: var(--bg-secondary) !important;
  color: var(--text-muted) !important;
  opacity: 0.6;
}

/* Course content text contrast improvements */
.chapter-text,
#chapter-content {
  color: var(--text-secondary) !important;
}

.chapter-text h1,
.chapter-text h2,
.chapter-text h3,
.chapter-text h4,
.chapter-text h5,
.chapter-text h6,
#chapter-content h1,
#chapter-content h2,
#chapter-content h3,
#chapter-content h4,
#chapter-content h5,
#chapter-content h6 {
  color: var(--text-primary) !important;
}

.chapter-text strong,
.chapter-text b,
#chapter-content strong,
#chapter-content b {
  color: var(--text-primary) !important;
}

/* Remove hardcoded gray highlights and backgrounds */
.chapter-text *[style*="background"],
#chapter-content *[style*="background"] {
  background: transparent !important;
}

.chapter-text *[style*="color: gray"],
.chapter-text *[style*="color: grey"],
#chapter-content *[style*="color: gray"],
#chapter-content *[style*="color: grey"] {
  color: var(--text-secondary) !important;
}

/* Override any hardcoded highlight colors */
.chapter-text mark,
.chapter-text .highlight,
#chapter-content mark,
#chapter-content .highlight {
  background: var(--warning-light) !important;
  color: var(--text-primary) !important;
  padding: 2px 4px;
  border-radius: 3px;
}

/* Ensure good contrast for any remaining colored backgrounds */
.chapter-text *[style*="background-color: #f"],
.chapter-text *[style*="background: #f"],
#chapter-content *[style*="background-color: #f"],
#chapter-content *[style*="background: #f"] {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Lists */
ul,
ol {
  color: var(--text-primary) !important;
}

li {
  color: var(--text-secondary) !important;
}

/* Links */
a {
  color: var(--accent) !important;
  transition: var(--transition);
}

a:hover {
  color: var(--hover) !important;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary) !important;
}

/* Navigation active items - ensure contrast */
.nav-link.active,
.nav-link[style*="background: var(--accent)"] {
  background: var(--accent) !important;
  color: var(--text-primary) !important;
}

/* Dark theme specific nav active items */
[data-theme="dark"] .nav-link.active,
[data-theme="dark"] .nav-link[style*="background: var(--accent)"] {
  background: #404040 !important;
  color: #ffffff !important;
}

/* Light theme specific nav active items */
[data-theme="light"] .nav-link.active,
[data-theme="light"] .nav-link[style*="background: var(--accent)"] {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

/* Dark blue theme specific nav active items */
[data-theme="dark-blue"] .nav-link.active,
[data-theme="dark-blue"] .nav-link[style*="background: var(--accent)"] {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

/* Paragraphs */
p {
  color: var(--text-secondary) !important;
}

/* Global text element overrides */
* {
  color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: var(--text-primary) !important;
}

p,
span,
div,
li,
td,
th,
label,
.text,
.content,
.chapter-text,
#chapter-content,
#chapter-content *,
.card-text,
.form-text {
  color: var(--text-secondary) !important;
}

strong,
b,
.font-weight-bold {
  color: var(--text-primary) !important;
}

small,
.small,
.text-sm {
  color: var(--text-secondary) !important;
  opacity: 0.8;
}
