:root {
  /* Light theme (default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --accent-color: #3b82f6;
  --border-color: #e5e7eb;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --text-primary: #f3f4f6;
  --text-secondary: #d1d5db;
  --accent-color: #60a5fa;
  --border-color: #374151;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

.text-gray-800 {
  color: var(--text-primary) !important;
}

.text-gray-600, .text-gray-500 {
  color: var(--text-secondary) !important;
}

.border-gray-200, .border-gray-300 {
  border-color: var(--border-color) !important;
}

.bg-gray-50 {
  background-color: var(--bg-primary) !important;
}

.bg-blue-100 {
  background-color: rgba(96, 165, 250, 0.2) !important;
}

.shadow-md, .shadow-sm, .shadow-lg {
  box-shadow: var(--card-shadow) !important;
}

/* Dark mode toggle styles */
.theme-toggle {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
  margin-left: 1rem;
}

.theme-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.theme-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .theme-slider {
  background-color: #3b82f6;
}

input:checked + .theme-slider:before {
  transform: translateX(30px);
}

.theme-slider:after {
  content: "☀️";
  position: absolute;
  left: 8px;
  top: 3px;
  font-size: 14px;
}

input:checked + .theme-slider:after {
  content: "🌙";
  left: 38px;
}

/* Additional dark mode adjustments */
[data-theme="dark"] .bg-gray-900 {
  background-color: #111827 !important;
}

[data-theme="dark"] .text-gray-400 {
  color: #9ca3af !important;
}

[data-theme="dark"] .border-gray-800 {
  border-color: #374151 !important;
}

[data-theme="dark"] .bg-gradient-to-r.from-blue-500.to-blue-600 {
  background: linear-gradient(to right, #2563eb, #1d4ed8) !important;
}

[data-theme="dark"] .bg-blue-500 {
  background-color: #2563eb !important;
}

[data-theme="dark"] .bg-blue-600 {
  background-color: #1d4ed8 !important;
}

[data-theme="dark"] .hover\:bg-blue-50:hover {
  background-color: rgba(96, 165, 250, 0.1) !important;
}

[data-theme="dark"] .hover\:text-blue-500:hover {
  color: #60a5fa !important;
}

.form-input {
  transition: all 0.3s ease;
  background-color: white;
  color: #1f2937;
}

[data-theme="dark"] .form-input {
  background-color: #374151;
  color: #f3f4f6;
  border-color: #4b5563;
}

.form-input:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .form-input:focus {
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
}