/* Dark mode overrides: apply only when html has class "dark".
   Injected into full-HTML pages and linked from root layout so every student page adapts. */

html.dark body {
  background-color: #111827 !important;
  color: #e5e7eb !important;
}

html.dark .bg-white {
  background-color: #1f2937 !important;
}

html.dark [class*="bg-white/"] {
  background-color: rgba(31, 41, 55, 0.95) !important;
}

html.dark .bg-gray-50 {
  background-color: #111827 !important;
}

html.dark .bg-gray-100 {
  background-color: #1f2937 !important;
}

html.dark .bg-gray-200 {
  background-color: #374151 !important;
}

html.dark .bg-green-50,
html.dark .bg-green-100 {
  background-color: #064e3b !important;
}

html.dark .bg-yellow-50,
html.dark .bg-yellow-100 {
  background-color: #422006 !important;
}

html.dark .bg-blue-50,
html.dark .bg-blue-100 {
  background-color: #1e3a8a !important;
}

html.dark .bg-purple-50,
html.dark .bg-purple-100 {
  background-color: #3b0764 !important;
}

html.dark .bg-amber-50,
html.dark .bg-amber-100 {
  background-color: #422006 !important;
}

html.dark .bg-indigo-50,
html.dark .bg-indigo-100 {
  background-color: #1e1b4b !important;
}

html.dark .bg-red-50,
html.dark .bg-red-100 {
  background-color: #450a0a !important;
}

html.dark .text-gray-900 {
  color: #f3f4f6 !important;
}

html.dark .text-gray-800 {
  color: #e5e7eb !important;
}

html.dark .text-gray-700 {
  color: #d1d5db !important;
}

html.dark .text-gray-600 {
  color: #9ca3af !important;
}

html.dark .text-gray-500 {
  color: #9ca3af !important;
}

html.dark .text-black {
  color: #f3f4f6 !important;
}

html.dark .text-green-600,
html.dark .text-green-700,
html.dark .text-green-800 {
  color: #34d399 !important;
}

html.dark .text-red-500,
html.dark .text-red-600,
html.dark .text-red-700 {
  color: #f87171 !important;
}

html.dark .text-blue-600,
html.dark .text-blue-700 {
  color: #60a5fa !important;
}

html.dark .text-amber-800,
html.dark .text-amber-900 {
  color: #fcd34d !important;
}

html.dark .text-yellow-700,
html.dark .text-yellow-800 {
  color: #fde047 !important;
}

html.dark .text-indigo-600 {
  color: #818cf8 !important;
}

html.dark .text-purple-700,
html.dark .text-purple-800 {
  color: #c4b5fd !important;
}

html.dark nav,
html.dark header {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
}

html.dark nav a,
html.dark header a {
  color: #e5e7eb !important;
}

html.dark nav a:hover,
html.dark header a:hover {
  color: #f9fafb !important;
}

html.dark nav .text-red-500,
html.dark nav .text-green-600,
html.dark header .text-red-500,
html.dark header .text-green-600 {
  color: #f87171 !important;
}

html.dark nav .text-green-600.font-bold,
html.dark header .text-green-600.font-bold {
  color: #34d399 !important;
}

html.dark header .text-green-100,
html.dark header .text-green-50,
html.dark header .text-blue-100,
html.dark header .text-purple-100,
html.dark header .text-purple-50 {
  color: #d1fae5 !important;
}

html.dark input,
html.dark select,
html.dark textarea {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #9ca3af !important;
}

html.dark .border-gray-200,
html.dark .border-gray-100,
html.dark .border-gray-300 {
  border-color: #374151 !important;
}

html.dark .border-green-500,
html.dark .border-green-600,
html.dark .border-green-700 {
  border-color: #047857 !important;
}

html.dark .border-blue-500,
html.dark .border-blue-600,
html.dark .border-blue-700 {
  border-color: #1d4ed8 !important;
}

html.dark .border-amber-500,
html.dark .border-amber-600 {
  border-color: #b45309 !important;
}

html.dark .border-yellow-500 {
  border-color: #a16207 !important;
}

html.dark .border-red-200,
html.dark .border-red-500,
html.dark .border-red-700 {
  border-color: #b91c1c !important;
}

html.dark .border-indigo-100,
html.dark .border-indigo-500 {
  border-color: #3730a3 !important;
}

html.dark .border-purple-200,
html.dark .border-purple-500 {
  border-color: #6d28d9 !important;
}

html.dark .border-orange-500 {
  border-color: #c2410c !important;
}

html.dark .divide-gray-200 > * {
  border-color: #374151 !important;
}

html.dark .shadow-lg,
html.dark .shadow-xl,
html.dark .shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2) !important;
}

html.dark a.text-gray-700,
html.dark a.text-gray-600 {
  color: #d1d5db !important;
}

html.dark a:hover.text-gray-700,
html.dark a:hover.text-gray-600 {
  color: #f3f4f6 !important;
}

/* Cards and panels */
html.dark [class*="rounded-xl"],
html.dark [class*="rounded-lg"] {
  border-color: #374151 !important;
}

/* Darker gradients for heroes and cards (Tailwind from-/to- stop overrides) */
html.dark .from-green-600 {
  --tw-gradient-from: #047857 !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
html.dark .to-emerald-600 {
  --tw-gradient-to: #065f46 !important;
}
html.dark .from-red-500 {
  --tw-gradient-from: #b91c1c !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
html.dark .to-pink-600 {
  --tw-gradient-to: #831843 !important;
}
html.dark .from-blue-600 {
  --tw-gradient-from: #1d4ed8 !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
html.dark .to-cyan-600 {
  --tw-gradient-to: #0e7490 !important;
}
html.dark .from-purple-600 {
  --tw-gradient-from: #5b21b6 !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
html.dark .to-indigo-600 {
  --tw-gradient-to: #3730a3 !important;
}

/* Semi-transparent white overlays (e.g. "From R15" card on header) */
html.dark [class*="bg-opacity-20"],
html.dark [class*="bg-white/20"] {
  background-color: rgba(31, 41, 55, 0.25) !important;
}

/* Legacy pill switch (if any page still uses it) */
html.dark .theme-switch-track {
  background-color: #4b5563 !important;
  overflow: hidden;
}
html.dark .theme-switch-track:focus {
  --tw-ring-color: #4b5563 !important;
  box-shadow: 0 0 0 2px #4b5563 !important;
}

/* Compact theme icon button (header / fixed) */
html.dark .theme-icon-btn:focus {
  --tw-ring-color: #6b7280 !important;
}

/* Disabled form controls */
html.dark input:disabled,
html.dark select:disabled,
html.dark textarea:disabled {
  background-color: #1f2937 !important;
  color: #6b7280 !important;
  opacity: 0.8;
}

/* Custom dashboard colors (mirage, wild-sand) when present */
html.dark .bg-wild-sand {
  background-color: #1f2937 !important;
}
html.dark .text-mirage {
  color: #e5e7eb !important;
}

/* Login & landing: gradient wrapper (from-wild-sand via-white to-wild-sand) → solid dark */
html.dark [class*="from-wild-sand"][class*="to-wild-sand"] {
  background-image: none !important;
  background-color: #111827 !important;
}

/* Signup form pages: light gradient backgrounds → solid dark */
html.dark [class*="from-blue-50"][class*="to-indigo-50"],
html.dark body.bg-gradient-to-br.from-blue-50 {
  background-image: none !important;
  background-color: #111827 !important;
}
html.dark [class*="from-purple-50"][class*="to-indigo-50"] {
  background-image: none !important;
  background-color: #111827 !important;
}

/* Signup (role choice) page: header gradient (from-blaze-orange to-deep-sea-green) → dark header */
html.dark .bg-gradient-to-r.from-blaze-orange.to-deep-sea-green {
  background-image: none !important;
  background-color: #1f2937 !important;
}
html.dark .bg-gradient-to-r.from-blaze-orange.to-deep-sea-green .text-white\/90,
html.dark .bg-gradient-to-r.from-blaze-orange.to-deep-sea-green .text-white\/80 {
  color: rgba(229, 231, 235, 0.9) !important;
}

/* Custom brand text (deep-sea-green) readable in dark mode */
html.dark .text-deep-sea-green {
  color: #5eead4 !important;
}

/* Custom brand border (deep-sea-green) visible in dark mode */
html.dark .border-deep-sea-green {
  border-color: #0d9488 !important;
}
html.dark .hover\:bg-deep-sea-green:hover {
  background-color: #0f766e !important;
}
html.dark .hover\:text-white:hover {
  color: #fff !important;
}

/* Blaze-orange (brand accent) – keep links/buttons visible in dark mode */
html.dark .text-blaze-orange {
  color: #f87171 !important;
}
html.dark .hover\:text-blaze-orange:hover {
  color: #fca5a5 !important;
}

/* ---------------------------------------------------------------------------
   Ride request (and similar) – components styled by inline <style>, not Tailwind
   --------------------------------------------------------------------------- */
html.dark .bottom-sheet {
  background-color: #1f2937 !important;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
}
html.dark .bottom-sheet .sheet-strip {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
}
html.dark .bottom-sheet .sheet-form-body {
  background-color: transparent;
}
html.dark .bottom-sheet-handle {
  background-color: #6b7280 !important;
}
html.dark .bottom-sheet-handle:active {
  background-color: #9ca3af !important;
}
html.dark .sheet-step-dot:not(.active) {
  background-color: #4b5563 !important;
}
/* Location cards (pickup/dropoff) – inline style sets background: white */
html.dark .location-card {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
}
html.dark .location-card.pickup {
  border-left-color: #10b981 !important;
}
html.dark .location-card.dropoff {
  border-left-color: #ef4444 !important;
}
html.dark .location-card:hover {
  border-color: #10b981 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
/* Ride type cards (Standard / Shared) – inline style sets background: white */
html.dark .ride-type-card {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
}
html.dark .ride-type-card.selected {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.15) !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}
html.dark .ride-type-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
/* Trip option rows (Campus run, Casual, Safe After Dark, Moving) – no inline bg; inherit sheet. Border/text handled by global overrides. Selected state often toggled by JS with green bg */
html.dark .trip-option-row {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
}
html.dark .trip-option-row:hover {
  border-color: #10b981 !important;
}
html.dark .trip-option-row.selected {
  background-color: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
}
/* Who's travelling / passenger options */
html.dark .travel-companions-option,
html.dark .passenger-option {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
}
html.dark .travel-companions-option:hover,
html.dark .passenger-option:hover {
  border-color: #10b981 !important;
}
html.dark .travel-companions-option.selected,
html.dark .passenger-option:has(input:checked) {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.15) !important;
}
/* Map FABs and route loading strip on request page */
html.dark .map-option-btn.fab,
html.dark .w-12.rounded-xl.bg-white {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
}
html.dark #routeLoading [class*="bg-white/"] {
  background-color: rgba(31, 41, 55, 0.95) !important;
  border-color: #4b5563 !important;
}

/* Ride + Assist – premium black glow in dark mode */
html.dark .ride-assist-premium {
  background-color: #1f2937 !important;
  border-color: #4b5563 !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 0 24px rgba(0,0,0,0.5), 0 4px 20px rgba(0,0,0,0.3) !important;
}
html.dark .ride-assist-premium.selected,
html.dark .ride-assist-premium.errands-expanded {
  border-color: #6b7280 !important;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08), 0 0 28px rgba(0,0,0,0.6), 0 4px 24px rgba(0,0,0,0.4) !important;
  background: linear-gradient(180deg, #374151 0%, #1f2937 100%) !important;
}
html.dark #errandsSubOptions,
html.dark .errands-sub-option {
  background-color: #111827 !important;
  border-color: #374151 !important;
}
html.dark .errands-sub-option:hover {
  background-color: #1f2937 !important;
}
html.dark .errands-sub-option.bg-green-50 {
  background-color: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
}

/* ---------------------------------------------------------------------------
   Broad pastel coverage – cards that use Tailwind's *-50/*-100 tints (and
   their gradient stops) were rendering near-white in dark mode, while the
   text on top was being brightened by the gray-text overrides above. Result:
   light text on light cards = invisible. Map every common pastel tint to a
   deep, hue-consistent dark tone so brightened text reads properly.
   --------------------------------------------------------------------------- */

/* Flat pastel backgrounds */
html.dark .bg-violet-50,
html.dark .bg-violet-100 { background-color: #2e1065 !important; }
html.dark .bg-fuchsia-50,
html.dark .bg-fuchsia-100 { background-color: #4a044e !important; }
html.dark .bg-pink-50,
html.dark .bg-pink-100 { background-color: #500724 !important; }
html.dark .bg-rose-50,
html.dark .bg-rose-100 { background-color: #4c0519 !important; }
html.dark .bg-orange-50,
html.dark .bg-orange-100 { background-color: #431407 !important; }
html.dark .bg-cyan-50,
html.dark .bg-cyan-100 { background-color: #083344 !important; }
html.dark .bg-sky-50,
html.dark .bg-sky-100 { background-color: #082f49 !important; }
html.dark .bg-teal-50,
html.dark .bg-teal-100 { background-color: #042f2e !important; }
html.dark .bg-emerald-50,
html.dark .bg-emerald-100 { background-color: #022c22 !important; }
html.dark .bg-lime-50,
html.dark .bg-lime-100 { background-color: #1a2e05 !important; }
html.dark .bg-slate-50,
html.dark .bg-slate-100 { background-color: #0f172a !important; }
html.dark .bg-zinc-50,
html.dark .bg-zinc-100 { background-color: #18181b !important; }
html.dark .bg-stone-50,
html.dark .bg-stone-100 { background-color: #1c1917 !important; }
html.dark .bg-neutral-50,
html.dark .bg-neutral-100 { background-color: #171717 !important; }

/* Gradient `from-*` stops at -50/-100 levels (override the CSS var Tailwind
   sets when it sees `from-violet-50`, etc.). Without these the gradient
   keeps its pale colour even when `bg-*` is overridden. */
html.dark .from-violet-50 { --tw-gradient-from: #2e1065 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-violet-100 { --tw-gradient-from: #2e1065 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-fuchsia-50 { --tw-gradient-from: #4a044e !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-fuchsia-100 { --tw-gradient-from: #4a044e !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-pink-50 { --tw-gradient-from: #500724 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-pink-100 { --tw-gradient-from: #500724 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-rose-50 { --tw-gradient-from: #4c0519 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-rose-100 { --tw-gradient-from: #4c0519 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-orange-50 { --tw-gradient-from: #431407 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-orange-100 { --tw-gradient-from: #431407 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-cyan-50 { --tw-gradient-from: #083344 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-cyan-100 { --tw-gradient-from: #083344 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-sky-50 { --tw-gradient-from: #082f49 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-sky-100 { --tw-gradient-from: #082f49 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-teal-50 { --tw-gradient-from: #042f2e !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-teal-100 { --tw-gradient-from: #042f2e !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-emerald-50 { --tw-gradient-from: #022c22 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-emerald-100 { --tw-gradient-from: #022c22 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-green-50 { --tw-gradient-from: #064e3b !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-green-100 { --tw-gradient-from: #064e3b !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-blue-50 { --tw-gradient-from: #1e3a8a !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-blue-100 { --tw-gradient-from: #1e3a8a !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-indigo-50 { --tw-gradient-from: #1e1b4b !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-indigo-100 { --tw-gradient-from: #1e1b4b !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-purple-50 { --tw-gradient-from: #3b0764 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-purple-100 { --tw-gradient-from: #3b0764 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-yellow-50 { --tw-gradient-from: #422006 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-yellow-100 { --tw-gradient-from: #422006 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-amber-50 { --tw-gradient-from: #422006 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-amber-100 { --tw-gradient-from: #422006 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-red-50 { --tw-gradient-from: #450a0a !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-red-100 { --tw-gradient-from: #450a0a !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-slate-50 { --tw-gradient-from: #0f172a !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-slate-100 { --tw-gradient-from: #0f172a !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-gray-50 { --tw-gradient-from: #111827 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-gray-100 { --tw-gradient-from: #1f2937 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
html.dark .from-white { --tw-gradient-from: #1f2937 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }

/* Gradient `to-*` stops at -50/-100 levels */
html.dark .to-violet-50 { --tw-gradient-to: #2e1065 !important; }
html.dark .to-violet-100 { --tw-gradient-to: #2e1065 !important; }
html.dark .to-fuchsia-50 { --tw-gradient-to: #4a044e !important; }
html.dark .to-fuchsia-100 { --tw-gradient-to: #4a044e !important; }
html.dark .to-pink-50 { --tw-gradient-to: #500724 !important; }
html.dark .to-pink-100 { --tw-gradient-to: #500724 !important; }
html.dark .to-rose-50 { --tw-gradient-to: #4c0519 !important; }
html.dark .to-rose-100 { --tw-gradient-to: #4c0519 !important; }
html.dark .to-orange-50 { --tw-gradient-to: #431407 !important; }
html.dark .to-orange-100 { --tw-gradient-to: #431407 !important; }
html.dark .to-cyan-50 { --tw-gradient-to: #083344 !important; }
html.dark .to-cyan-100 { --tw-gradient-to: #083344 !important; }
html.dark .to-sky-50 { --tw-gradient-to: #082f49 !important; }
html.dark .to-sky-100 { --tw-gradient-to: #082f49 !important; }
html.dark .to-teal-50 { --tw-gradient-to: #042f2e !important; }
html.dark .to-teal-100 { --tw-gradient-to: #042f2e !important; }
html.dark .to-emerald-50 { --tw-gradient-to: #022c22 !important; }
html.dark .to-emerald-100 { --tw-gradient-to: #022c22 !important; }
html.dark .to-green-50 { --tw-gradient-to: #064e3b !important; }
html.dark .to-green-100 { --tw-gradient-to: #064e3b !important; }
html.dark .to-blue-50 { --tw-gradient-to: #1e3a8a !important; }
html.dark .to-blue-100 { --tw-gradient-to: #1e3a8a !important; }
html.dark .to-indigo-50 { --tw-gradient-to: #1e1b4b !important; }
html.dark .to-indigo-100 { --tw-gradient-to: #1e1b4b !important; }
html.dark .to-purple-50 { --tw-gradient-to: #3b0764 !important; }
html.dark .to-purple-100 { --tw-gradient-to: #3b0764 !important; }
html.dark .to-yellow-50 { --tw-gradient-to: #422006 !important; }
html.dark .to-yellow-100 { --tw-gradient-to: #422006 !important; }
html.dark .to-amber-50 { --tw-gradient-to: #422006 !important; }
html.dark .to-amber-100 { --tw-gradient-to: #422006 !important; }
html.dark .to-red-50 { --tw-gradient-to: #450a0a !important; }
html.dark .to-red-100 { --tw-gradient-to: #450a0a !important; }
html.dark .to-slate-50 { --tw-gradient-to: #0f172a !important; }
html.dark .to-slate-100 { --tw-gradient-to: #0f172a !important; }
html.dark .to-gray-50 { --tw-gradient-to: #111827 !important; }
html.dark .to-gray-100 { --tw-gradient-to: #1f2937 !important; }
html.dark .to-white { --tw-gradient-to: #1f2937 !important; }

/* Gradient `via-*` stops at -50/-100 levels (rebuild the three-stop list) */
html.dark .via-white { --tw-gradient-stops: var(--tw-gradient-from), #1f2937, var(--tw-gradient-to) !important; }
html.dark .via-gray-50,
html.dark .via-gray-100 { --tw-gradient-stops: var(--tw-gradient-from), #1f2937, var(--tw-gradient-to) !important; }
html.dark .via-violet-50,
html.dark .via-violet-100 { --tw-gradient-stops: var(--tw-gradient-from), #2e1065, var(--tw-gradient-to) !important; }
html.dark .via-cyan-50,
html.dark .via-cyan-100 { --tw-gradient-stops: var(--tw-gradient-from), #083344, var(--tw-gradient-to) !important; }
html.dark .via-blue-50,
html.dark .via-blue-100 { --tw-gradient-stops: var(--tw-gradient-from), #1e3a8a, var(--tw-gradient-to) !important; }
html.dark .via-indigo-50,
html.dark .via-indigo-100 { --tw-gradient-stops: var(--tw-gradient-from), #1e1b4b, var(--tw-gradient-to) !important; }
html.dark .via-pink-50,
html.dark .via-pink-100 { --tw-gradient-stops: var(--tw-gradient-from), #500724, var(--tw-gradient-to) !important; }

/* Pastel border colours (the inner card outlines were still pastel and
   "popped" against the new dark background) */
html.dark .border-violet-100,
html.dark .border-violet-200 { border-color: #4c1d95 !important; }
html.dark .border-fuchsia-100,
html.dark .border-fuchsia-200 { border-color: #701a75 !important; }
html.dark .border-pink-100,
html.dark .border-pink-200 { border-color: #831843 !important; }
html.dark .border-rose-100,
html.dark .border-rose-200 { border-color: #881337 !important; }
html.dark .border-orange-100,
html.dark .border-orange-200 { border-color: #7c2d12 !important; }
html.dark .border-cyan-100,
html.dark .border-cyan-200 { border-color: #155e75 !important; }
html.dark .border-sky-100,
html.dark .border-sky-200 { border-color: #0c4a6e !important; }
html.dark .border-teal-100,
html.dark .border-teal-200 { border-color: #115e59 !important; }
html.dark .border-emerald-100,
html.dark .border-emerald-200 { border-color: #065f46 !important; }
html.dark .border-green-100 { border-color: #065f46 !important; }
html.dark .border-blue-100 { border-color: #1e40af !important; }
html.dark .border-yellow-100,
html.dark .border-yellow-200 { border-color: #854d0e !important; }
html.dark .border-amber-100,
html.dark .border-amber-200 { border-color: #92400e !important; }
html.dark .border-slate-100,
html.dark .border-slate-200 { border-color: #334155 !important; }

/* Pastel text accents (badges, "ago" stamps, etc.) — keep the brand hue
   but lift to dark-mode-readable shades. Existing entries above cover
   gray/blue/green/red/amber/yellow/indigo/purple; fill in the rest. */
html.dark .text-violet-600,
html.dark .text-violet-700,
html.dark .text-violet-800 { color: #c4b5fd !important; }
html.dark .text-fuchsia-600,
html.dark .text-fuchsia-700,
html.dark .text-fuchsia-800 { color: #f0abfc !important; }
html.dark .text-pink-600,
html.dark .text-pink-700,
html.dark .text-pink-800 { color: #f9a8d4 !important; }
html.dark .text-rose-600,
html.dark .text-rose-700,
html.dark .text-rose-800 { color: #fda4af !important; }
html.dark .text-orange-600,
html.dark .text-orange-700,
html.dark .text-orange-800 { color: #fdba74 !important; }
html.dark .text-cyan-600,
html.dark .text-cyan-700,
html.dark .text-cyan-800 { color: #67e8f9 !important; }
html.dark .text-sky-600,
html.dark .text-sky-700,
html.dark .text-sky-800 { color: #7dd3fc !important; }
html.dark .text-teal-600,
html.dark .text-teal-700,
html.dark .text-teal-800 { color: #5eead4 !important; }
html.dark .text-emerald-600,
html.dark .text-emerald-700,
html.dark .text-emerald-800 { color: #6ee7b7 !important; }
html.dark .text-lime-600,
html.dark .text-lime-700,
html.dark .text-lime-800 { color: #bef264 !important; }
html.dark .text-slate-600,
html.dark .text-slate-700,
html.dark .text-slate-800,
html.dark .text-slate-900 { color: #cbd5e1 !important; }

/* ------------------------------------------------------------------
   Social map-first page (/locations)
   ------------------------------------------------------------------
   The Social page is a full-bleed Mapbox canvas overlaid with glass
   chrome. Mapbox swaps to a dark style automatically when html.dark
   is set; the rules below cover the fallback background colors, the
   glass overlays, and the panel text/icon contrast so nothing reads
   like white-on-white during the brief moment before the dark style
   finishes loading.
   ------------------------------------------------------------------ */

/* Canvas behind the Mapbox map — avoids a white flash on dark style swap. */
html.dark #social-canvas { background-color: #0f172a !important; }

/* Glass overlay surfaces (top bar, filter pill, panel) — already inherit
   the .bg-white/85 dark fallback via [class*="bg-white/"], but we tighten
   the contrast specifically on the social glass so the floating chrome
   reads cleanly against the dark map. */
html.dark .social-glass {
  background-color: rgba(17, 24, 39, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e5e7eb !important;
}

/* Tailwind classes used inside the glass that need a manual lift in dark mode. */
html.dark .social-glass .text-gray-700,
html.dark .social-glass .text-gray-800,
html.dark .social-glass .text-gray-900 { color: #f3f4f6 !important; }
html.dark .social-glass .text-gray-500,
html.dark .social-glass .text-gray-600 { color: #cbd5e1 !important; }
html.dark .social-glass .placeholder-gray-500::placeholder { color: #94a3b8 !important; }

/* Inputs inside the glass — keep them transparent so the glass effect
   shows through, but ensure the chevrons/options are visible. */
html.dark .social-glass select,
html.dark .social-glass input[type="text"] {
  color: #f3f4f6 !important;
  background-color: transparent !important;
}
html.dark .social-glass select option { background-color: #1f2937 !important; color: #f3f4f6 !important; }

/* Panel surfaces inside the social shell */
html.dark #social-panel {
  background-color: rgba(17, 24, 39, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html.dark #social-panel .panel-grabber { background-color: #94a3b8 !important; }
html.dark #social-panel .panel-grabber-zone:hover .panel-grabber { background-color: #cbd5e1 !important; }
html.dark #social-panel .border-black\/5 { border-color: rgba(255, 255, 255, 0.08) !important; }
/* Peek-state hint label stays warm-red in both themes; small contrast boost in dark mode. */
html.dark #social-panel .panel-peek-label { color: #fca5a5 !important; }
html.dark #social-panel #panelSnapBtn { background-color: rgba(255,255,255,0.08) !important; color: #f3f4f6 !important; }
html.dark #social-panel #panelSnapBtn:hover { background-color: rgba(255,255,255,0.14) !important; }

/* Venue cards in the panel — give them a lighter dark surface so they
   pop against the panel and so the highlight ring stays visible. */
html.dark .social-venue-card { background-color: #1f2937 !important; color: #e5e7eb !important; }
html.dark .social-venue-card h3 { color: #f3f4f6 !important; }
html.dark .social-venue-card .text-gray-600,
html.dark .social-venue-card .text-gray-700,
html.dark .social-venue-card .text-gray-900 { color: #cbd5e1 !important; }
html.dark .social-venue-card.is-active {
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.35) !important;
  outline-color: rgba(252, 165, 165, 0.7) !important;
}

/* Per-venue popover sheet (#venue-bottom-sheet) — already inherits the
   dark white-bg override, but the body text inside it lives in plain
   text-gray-* classes that should already be covered by the global
   rules above. No extra override needed here. */

/* ---------------------------------------------------------------------------
   Student product shell (StudentChrome) — opacity text + misc utilities
   --------------------------------------------------------------------------- */

html.dark .text-mirage\/50 {
  color: rgba(229, 231, 235, 0.5) !important;
}

html.dark .text-mirage\/55 {
  color: rgba(229, 231, 235, 0.55) !important;
}

html.dark .text-mirage\/60 {
  color: rgba(229, 231, 235, 0.6) !important;
}

html.dark .text-mirage\/70 {
  color: rgba(229, 231, 235, 0.7) !important;
}

html.dark .text-mirage\/75 {
  color: rgba(229, 231, 235, 0.75) !important;
}

html.dark .border-gray-200\/70,
html.dark .border-gray-200\/80 {
  border-color: rgba(55, 65, 81, 0.85) !important;
}

html.dark .hover\:bg-wild-sand:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

html.dark .border-deep-sea-green\/15,
html.dark .border-deep-sea-green\/20,
html.dark .border-deep-sea-green\/25 {
  border-color: rgba(13, 148, 136, 0.35) !important;
}

html.dark .bg-deep-sea-green\/5 {
  background-color: rgba(13, 148, 136, 0.12) !important;
}

html.dark .bg-blaze-orange\/5 {
  background-color: rgba(255, 80, 64, 0.1) !important;
}

html.dark .border-blaze-orange\/20 {
  border-color: rgba(255, 80, 64, 0.35) !important;
}

/* Listing / filter panels on accommodations browse */
html.dark .bg-white\/90 {
  background-color: rgba(22, 35, 42, 0.92) !important;
}

html.dark .border-indigo-100 {
  border-color: #374151 !important;
}
