/* ========================================================
   RSB Dispatch Management System - Light Theme Stylesheet
   ======================================================== */

html.light {
  color-scheme: light;
}

html.light body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

/* Base Surfaces */
html.light .bg-slate-950 {
  background-color: #f1f5f9 !important;
}

html.light .bg-slate-900 {
  background-color: #ffffff !important;
}

html.light .bg-slate-900\/70,
html.light .bg-slate-900\/80,
html.light .bg-slate-900\/90 {
  background-color: rgba(255, 255, 255, 0.9) !important;
}

html.light .bg-slate-800 {
  background-color: #f8fafc !important;
}

html.light .bg-slate-800\/80 {
  background-color: rgba(248, 250, 252, 0.9) !important;
}

html.light .bg-slate-800\/60,
html.light .bg-slate-800\/50,
html.light .bg-slate-800\/40,
html.light .bg-slate-800\/30 {
  background-color: rgba(241, 245, 249, 0.75) !important;
}

html.light .bg-slate-700 {
  background-color: #e2e8f0 !important;
}

/* Hover States */
html.light .hover\:bg-slate-800:hover,
html.light .hover\:bg-slate-800\/80:hover,
html.light .hover\:bg-slate-800\/50:hover,
html.light .hover\:bg-slate-800\/30:hover {
  background-color: #f1f5f9 !important;
}

html.light .hover\:bg-slate-700:hover {
  background-color: #e2e8f0 !important;
}

/* Borders */
html.light .border-slate-800 {
  border-color: #e2e8f0 !important;
}

html.light .border-slate-700 {
  border-color: #cbd5e1 !important;
}

html.light .border-slate-600 {
  border-color: #94a3b8 !important;
}

html.light .divide-slate-800 > :not([hidden]) ~ :not([hidden]) {
  border-color: #e2e8f0 !important;
}

html.light .divide-slate-700 > :not([hidden]) ~ :not([hidden]) {
  border-color: #cbd5e1 !important;
}

/* Typography */
html.light .text-white {
  color: #0f172a !important;
}

html.light .text-slate-100 {
  color: #0f172a !important;
}

html.light .text-slate-200 {
  color: #1e293b !important;
}

html.light .text-slate-300 {
  color: #334155 !important;
}

html.light .text-slate-400 {
  color: #64748b !important;
}

html.light .text-slate-500 {
  color: #94a3b8 !important;
}

html.light .hover\:text-white:hover {
  color: #0f172a !important;
}

/* Accent Colors - High Contrast for Light Mode */
html.light .text-teal-400 {
  color: #0d9488 !important;
}

html.light .text-emerald-400 {
  color: #059669 !important;
}

html.light .text-amber-400 {
  color: #d97706 !important;
}

html.light .text-red-400 {
  color: #dc2626 !important;
}

html.light .text-blue-400 {
  color: #2563eb !important;
}

/* Active Nav & Pills */
html.light .bg-teal-600\/20 {
  background-color: #f0fdf4 !important;
}

html.light .bg-teal-500\/10 {
  background-color: #ccfbf1 !important;
}

html.light .bg-emerald-500\/10 {
  background-color: #d1fae5 !important;
}

html.light .bg-amber-500\/10 {
  background-color: #fef3c7 !important;
}

html.light .bg-red-500\/10 {
  background-color: #fee2e2 !important;
}

html.light .bg-blue-500\/10 {
  background-color: #dbeafe !important;
}

/* Buttons - Keep text white on solid colored buttons */
html.light .bg-teal-600,
html.light .bg-teal-500,
html.light .bg-emerald-600,
html.light .bg-emerald-500,
html.light .bg-blue-600,
html.light .bg-blue-500,
html.light .bg-red-600,
html.light .bg-red-500 {
  color: #ffffff !important;
}

html.light .bg-teal-600 *,
html.light .bg-teal-500 *,
html.light .bg-emerald-600 *,
html.light .bg-emerald-500 *,
html.light .bg-blue-600 *,
html.light .bg-blue-500 *,
html.light .bg-red-600 *,
html.light .bg-red-500 * {
  color: #ffffff !important;
}

/* Form Inputs */
html.light input:not([type="checkbox"]):not([type="radio"]),
html.light select,
html.light textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html.light input:focus,
html.light select:focus,
html.light textarea:focus {
  border-color: #0d9488 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15) !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #94a3b8 !important;
}

/* Shadows */
html.light .shadow-xl {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02) !important;
}

html.light .shadow-2xl {
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.08) !important;
}

/* Tables */
html.light table thead tr {
  background-color: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

html.light table tbody tr:hover {
  background-color: #f8fafc !important;
}

/* Scrollbars */
html.light ::-webkit-scrollbar-track {
  background: #f1f5f9;
}

html.light ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

html.light ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Floating Theme Switcher Button */
#theme-toggle-btn {
  position: fixed;
  top: 10px;
  right: 130px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  user-select: none;
}

@media (max-width: 640px) {
  #theme-toggle-btn {
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    font-size: 11px;
  }
  #theme-toggle-btn span.label {
    display: none;
  }
}

html.dark #theme-toggle-btn {
  background-color: rgba(30, 41, 59, 0.9);
  color: #e2e8f0;
  border: 1px solid #475569;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

html.dark #theme-toggle-btn:hover {
  background-color: rgba(51, 65, 85, 0.95);
  color: #ffffff;
}

html.light #theme-toggle-btn {
  background-color: rgba(255, 255, 255, 0.92);
  color: #1e293b;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

html.light #theme-toggle-btn:hover {
  background-color: #ffffff;
  color: #0f172a;
}
