/* HTMX loading indicator */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: block; }
.htmx-request.htmx-indicator  { display: block; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1f2937; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }

/* ─── Light mode overrides ─────────────────────────────────────────── */
html.light body                           { background-color: #f1f5f9 !important; color: #0f172a !important; }
html.light nav                            { background-color: #ffffff !important; border-color: #e2e8f0 !important; }
html.light nav a                          { color: #475569 !important; }
html.light nav a:hover                    { color: #0f172a !important; }
html.light #theme-toggle                  { background-color: #e2e8f0 !important; border-color: #cbd5e1 !important; color: #0f172a !important; }
html.light #theme-toggle:hover            { background-color: #cbd5e1 !important; }

/* Backgrounds */
html.light .bg-gray-950                   { background-color: #f1f5f9 !important; }
html.light .bg-gray-900                   { background-color: #ffffff !important; }
html.light .bg-gray-800                   { background-color: #f1f5f9 !important; }
html.light .bg-gray-700                   { background-color: #e2e8f0 !important; }

/* Alpha/opacity bg variants */
html.light [class*="bg-gray-800\/"]       { background-color: rgba(241,245,249,0.9) !important; }
html.light [class*="bg-gray-900\/"]       { background-color: rgba(255,255,255,0.9) !important; }
html.light [class*="bg-yellow-950\/"]     { background-color: rgba(254,243,199,0.4) !important; }
html.light [class*="bg-yellow-900\/"]     { background-color: rgba(254,243,199,0.5) !important; }
html.light [class*="bg-blue-900\/"]       { background-color: rgba(219,234,254,0.5) !important; }
html.light [class*="bg-green-900\/"]      { background-color: rgba(220,252,231,0.5) !important; }
html.light [class*="bg-red-900\/"]        { background-color: rgba(254,226,226,0.5) !important; }
html.light [class*="bg-purple-950\/"]     { background-color: rgba(245,243,255,0.5) !important; }
html.light [class*="bg-cyan-900\/"]       { background-color: rgba(207,250,254,0.5) !important; }
html.light [class*="bg-orange-900\/"]     { background-color: rgba(255,237,213,0.5) !important; }

/* Borders */
html.light .border-gray-800              { border-color: #e2e8f0 !important; }
html.light .border-gray-700              { border-color: #cbd5e1 !important; }
html.light [class*="border-yellow-800"]  { border-color: #fcd34d !important; }
html.light [class*="border-yellow-600"]  { border-color: #f59e0b !important; }
html.light [class*="border-green-800"]   { border-color: #86efac !important; }
html.light [class*="border-red-800"]     { border-color: #fca5a5 !important; }
html.light [class*="border-blue-800"]    { border-color: #93c5fd !important; }
html.light [class*="border-purple-800"]  { border-color: #c4b5fd !important; }
html.light [class*="border-orange-800"]  { border-color: #fdba74 !important; }

/* Text — white/gray scale */
html.light .text-white                    { color: #0f172a !important; }
html.light .text-gray-100                 { color: #1e293b !important; }
html.light .text-gray-200                 { color: #334155 !important; }
html.light .text-gray-300                 { color: #334155 !important; }
html.light .text-gray-400                 { color: #475569 !important; }
html.light .text-gray-500                 { color: #64748b !important; }
html.light .text-gray-600                 { color: #475569 !important; }
html.light .text-gray-700                 { color: #334155 !important; }
html.light .text-gray-900                 { color: #0f172a !important; }

/* Coloured text — keep vivid but darken slightly for readability */
html.light .text-blue-400                 { color: #2563eb !important; }
html.light .text-blue-300                 { color: #3b82f6 !important; }
html.light .text-green-400                { color: #16a34a !important; }
html.light .text-green-500                { color: #15803d !important; }
html.light .text-red-400                  { color: #dc2626 !important; }
html.light .text-red-500                  { color: #b91c1c !important; }
html.light .text-yellow-400               { color: #d97706 !important; }
html.light .text-yellow-300               { color: #b45309 !important; }
html.light .text-orange-400               { color: #ea580c !important; }
html.light .text-purple-400               { color: #7c3aed !important; }
html.light .text-purple-200               { color: #6d28d9 !important; }
html.light .text-purple-300               { color: #7c3aed !important; }
html.light .text-cyan-400                 { color: #0891b2 !important; }
html.light .text-cyan-300                 { color: #0e7490 !important; }

/* Inputs & selects */
html.light input, html.light select, html.light textarea {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
html.light input::placeholder             { color: #94a3b8 !important; }
html.light select option                  { background-color: #ffffff; color: #0f172a; }

/* Tables */
html.light thead tr                       { background-color: #f8fafc !important; }
html.light tbody tr:hover                 { background-color: #f1f5f9 !important; }
html.light .border-b                      { border-color: #e2e8f0 !important; }

/* Hover states on cards/links */
html.light .hover\:bg-gray-800:hover      { background-color: #e2e8f0 !important; }
html.light .hover\:bg-gray-700:hover      { background-color: #cbd5e1 !important; }

/* Scrollbar in light mode */
html.light ::-webkit-scrollbar-track     { background: #e2e8f0; }
html.light ::-webkit-scrollbar-thumb     { background: #94a3b8; }
