/* ==========================================
   SMART Waste Management System - Styles
   Main CSS for all custom styling
   ========================================== */

:root {
    --color-primary: #226450;
    --color-secondary: #2d7d66;
    --color-tertiary: #0369a1;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #0ea5e9;
    --color-light: #f3f4f6;
    --color-dark: #1f2937;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #ffffff;
    color: #1f2937;
}

p {
    text-align: justify;
}

/* ==========================================
   Utility Classes
   ========================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* ==========================================
   Gradients
   ========================================== */

.gradient-bg {
    background: linear-gradient(135deg, #2A7B9B 0%, #469E43 33%, #49A13B 66%, #15D422 100%);
    background-attachment: fixed;
}

.siargao-gradient {
    background: linear-gradient(135deg, #2A7B9B 0%, #469E43 33%, #49A13B 66%, #15D422 100%);
}

.delcarmen-gradient {
    background: linear-gradient(135deg, #2A7B9B 0%, #469E43 33%, #49A13B 66%, #15D422 100%);
}

/* ==========================================
   Cards & Containers
   ========================================== */

.card-hover {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.metric-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
}

/* ==========================================
   Impact Cards
   ========================================== */

.impact-positive {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 4px solid #10b981;
}

.impact-negative {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
}

/* ==========================================
   Tabs
   ========================================== */

.tab-active {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.tab-inactive {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    transition: all 0.3s ease;
}

.tab-inactive:hover {
    background: #e5e7eb !important;
    color: #4b5563 !important;
}

.tab-content {
    animation: fadeIn 0.3s ease-out;
}

.tab-content.hidden {
    display: none;
}

/* ==========================================
   Charts & Progress Bars
   ========================================== */

.chart-bar {
    transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
                width 0.8s ease,
                background-color 0.3s ease;
    background: linear-gradient(to top, #3b82f6, #60a5fa);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 20px;
}

.chart-bar:hover {
    filter: brightness(1.15);
}

.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
    border-radius: 8px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    height: 100%;
    gap: 8px;
    padding: 20px;
}

.bar {
    flex: 1;
    background: linear-gradient(to top, #3b82f6, #60a5fa);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bar:hover {
    transform: scaleY(1.05);
    filter: brightness(1.2);
}

.bar-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(8px, 2vw, 12px);
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.bar-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(8px, 2.5vw, 12px);
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
}

/* ==========================================
   Animations
   ========================================== */

.pulse-animation {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.data-point {
    animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   Header Styles
   ========================================== */

header {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: clamp(1.5rem, 5vw, 2rem);
}

/* ==========================================
   Notifications & Alerts
   ========================================== */

.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease-out;
    z-index: 50;
}

.notification.success {
    background: #10b981;
}

.notification.error {
    background: #ef4444;
}

.notification.warning {
    background: #f59e0b;
}

.notification.info {
    background: #0ea5e9;
}

/* ==========================================
   Links & Buttons
   ========================================== */

a {
    color: #0ea5e9;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0284c7;
    text-decoration: underline;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ==========================================
   Accessibility
   ========================================== */

:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* ==========================================
   Scrollbar Styling
   ========================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================
   Loading States
   ========================================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #0ea5e9;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   Button Utility Styles (global)
   Ensure buttons are visible, high-contrast and accessible
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    border: 1px solid transparent;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.btn:focus {
    outline: 3px solid rgba(34,100,80,0.18);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, #226450 0%, #1a6a45 100%);
    color: #ffffff;
    border-color: rgba(0,0,0,0.06);
    box-shadow: 0 6px 14px rgba(34,100,80,0.12);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }

.btn-secondary {
    background: #f3f4f6;
    color: #111827;
    border-color: #e5e7eb;
}
.btn-secondary:hover { transform: translateY(-1px); }

.btn-danger {
    background: #ef4444;
    color: #fff;
    border-color: rgba(0,0,0,0.06);
}
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

.btn-link {
    background: transparent;
    color: #0ea5e9;
    padding: 0;
    font-weight: 600;
}

/* Ensure table action buttons are visible */
.table-container .btn-danger {
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Minimum touch target */
button, .btn { min-height: 40px; }

/* ==========================================
   Form Controls - Ensure high contrast labels and inputs
   Applies sensible defaults for light/dark modes so labels and inputs remain readable
   ========================================== */
label {
    color: #374151; /* dark text for visibility on light backgrounds */
    font-weight: 600;
}

/* Labels on dark/gradient backgrounds need light text */
.gradient-header label,
.bg-gradient-to-r label,
[class*="bg-green"] label,
[class*="bg-blue"] label,
.stat-box label {
    color: #ffffff;
}

input, select, textarea, .form-input {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 10px;
    border-radius: 8px;
}

input::placeholder, textarea::placeholder {
    color: #9ca3af;
}

/* Dark mode - keep inputs WHITE for consistency */
@media (prefers-color-scheme: dark) {
    label {
        color: #374151;
    }
    /* Inputs stay white even in dark mode for professional look */
}

/* Force WHITE background for all input types - clean professional look */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="month"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea {
    color: #374151 !important;
    background-color: #ffffff !important;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="date"]::placeholder,
input[type="time"]::placeholder,
input[type="month"]::placeholder,
input[type="search"]::placeholder,
input[type="tel"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder {
    color: #9ca3af !important;
}

/* ==========================================
   Select Dropdown Styling - Clean white background
   ========================================== */
select {
    background-color: #ffffff !important;
    color: #374151 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 30px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 12px !important;
}

select option {
    background-color: #ffffff !important;
    color: #374151 !important;
    padding: 5px !important;
}

select option:hover {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

select option:checked {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {
    .gradient-bg {
        background: #226450;
    }

    .card-hover {
        box-shadow: none;
    }

    header,
    nav,
    footer {
        display: none;
    }
}

/* ==========================================
   User Dropdown Animation
   ========================================== */

.animate-dropdown {
    animation: dropdownSlide 0.2s ease-out;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item {
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* ==========================================
   Dark Mode - Comprehensive
   ========================================== */

/* ---- Base ---- */
html.dark body {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

html.dark main,
html.dark #main-content,
html.dark #admin-area,
html.dark .max-w-7xl {
    color: #e2e8f0;
}

/* ---- Gradient header ---- */
html.dark .gradient-bg,
html.dark .gradient-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #1a4731 33%, #1a4a2e 66%, #0d7a17 100%);
}

/* ---- ALL white / light backgrounds → dark ---- */
html.dark .bg-white { background-color: #1e293b !important; }
html.dark .bg-gray-50 { background-color: #0f172a !important; }
html.dark .bg-gray-100 { background-color: #1e293b !important; }
html.dark .bg-gray-200 { background-color: #334155 !important; }
html.dark .bg-gray-300 { background-color: #475569 !important; }
html.dark .bg-gray-400 { background-color: #64748b !important; }
html.dark .bg-gray-900 { background-color: #020617 !important; }

/* ---- ALL text colors → white/light ---- */
html.dark .text-gray-900 { color: #f1f5f9 !important; }
html.dark .text-gray-800 { color: #e2e8f0 !important; }
html.dark .text-gray-700 { color: #cbd5e1 !important; }
html.dark .text-gray-600 { color: #94a3b8 !important; }
html.dark .text-gray-500 { color: #94a3b8 !important; }
html.dark .text-gray-400 { color: #94a3b8 !important; }

/* Colored text adjustments for readability on dark */
html.dark .text-green-900 { color: #86efac !important; }
html.dark .text-green-800 { color: #86efac !important; }
html.dark .text-green-700 { color: #4ade80 !important; }
html.dark .text-green-600 { color: #4ade80 !important; }
html.dark .text-red-900 { color: #fca5a5 !important; }
html.dark .text-red-800 { color: #fca5a5 !important; }
html.dark .text-red-700 { color: #f87171 !important; }
html.dark .text-red-600 { color: #f87171 !important; }
html.dark .text-yellow-700 { color: #fcd34d !important; }
html.dark .text-yellow-600 { color: #fcd34d !important; }
html.dark .text-blue-700 { color: #93c5fd !important; }
html.dark .text-blue-600 { color: #60a5fa !important; }
html.dark .text-purple-700 { color: #c4b5fd !important; }
html.dark .text-purple-600 { color: #a78bfa !important; }
html.dark .text-teal-600 { color: #5eead4 !important; }
html.dark .text-emerald-600 { color: #34d399 !important; }

/* ---- ALL borders → dark ---- */
html.dark .border-gray-100 { border-color: #334155 !important; }
html.dark .border-gray-200 { border-color: #334155 !important; }
html.dark .border-gray-300 { border-color: #475569 !important; }
html.dark .border-gray-700 { border-color: #475569 !important; }
html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { border-color: #334155 !important; }
html.dark .border-red-100 { border-color: #7f1d1d !important; }
html.dark .border-red-300 { border-color: #991b1b !important; }
html.dark .border-yellow-100 { border-color: #78350f !important; }
html.dark .border-yellow-300 { border-color: #92400e !important; }
html.dark .border-green-100 { border-color: #14532d !important; }
html.dark .border-green-300 { border-color: #166534 !important; }
html.dark .border-blue-100 { border-color: #1e3a8a !important; }
html.dark .border-blue-300 { border-color: #1d4ed8 !important; }
html.dark .border-purple-100 { border-color: #4c1d95 !important; }
html.dark .border-purple-300 { border-color: #5b21b6 !important; }
html.dark .border-white\/20 { border-color: rgba(255,255,255,0.15) !important; }

/* ---- Tab navigation ---- */
html.dark .tab-inactive {
    color: #94a3b8;
}
html.dark .tab-inactive:hover {
    background-color: #334155;
}

/* ---- Gradient summary cards (waste count) ---- */
html.dark .bg-gradient-to-br.from-red-50 {
    background: linear-gradient(to bottom right, #450a0a, #7f1d1d) !important;
}
html.dark .bg-gradient-to-br.from-yellow-50 {
    background: linear-gradient(to bottom right, #451a03, #78350f) !important;
}
html.dark .bg-gradient-to-br.from-green-50 {
    background: linear-gradient(to bottom right, #052e16, #14532d) !important;
}
html.dark .bg-gradient-to-br.from-blue-50 {
    background: linear-gradient(to bottom right, #0c1a3d, #1e3a8a) !important;
}
html.dark .bg-gradient-to-br.from-purple-50 {
    background: linear-gradient(to bottom right, #2e1065, #4c1d95) !important;
}
html.dark .bg-gradient-to-br.from-indigo-100,
html.dark .bg-gradient-to-br.from-blue-50.to-indigo-100 {
    background: linear-gradient(to bottom right, #0c1a3d, #312e81) !important;
}

/* Chart container gradient background */
html.dark .bg-gradient-to-br.from-gray-50,
html.dark .bg-gradient-to-br.from-gray-50.to-white {
    background: linear-gradient(to bottom right, #1e293b, #0f172a) !important;
}

/* Legend bar gradient */
html.dark .bg-gradient-to-r.from-gray-50,
html.dark .bg-gradient-to-r.from-gray-50.to-gray-100 {
    background: linear-gradient(to right, #1e293b, #334155) !important;
}

/* Gallery background  */
html.dark .bg-gradient-to-br.from-gray-50.to-white {
    background: linear-gradient(to bottom right, #1e293b, #0f172a) !important;
}

/* ---- Colored info cards (del-carmen, impact) ---- */
html.dark .bg-purple-50 { background-color: #2e1065 !important; }
html.dark .bg-blue-50 { background-color: #0c1a3d !important; }
html.dark .bg-green-50 { background-color: #052e16 !important; }
html.dark .bg-red-50 { background-color: #450a0a !important; }
html.dark .bg-green-100 { background-color: #14532d !important; }
html.dark .bg-red-100 { background-color: #7f1d1d !important; }
html.dark .bg-yellow-100 { background-color: #78350f !important; }
html.dark .bg-blue-100 { background-color: #1e3a8a !important; }

/* ---- Table backgrounds in sections (siargao, del-carmen) ---- */
html.dark .bg-green-50 table,
html.dark table .hover\:bg-green-50:hover { background-color: #052e16 !important; }
html.dark table td { color: #e2e8f0 !important; }
html.dark table .text-gray-900 { color: #f1f5f9 !important; }
html.dark table .text-gray-600 { color: #94a3b8 !important; }
html.dark .border-b.border-gray-200 { border-color: #334155 !important; }

/* ---- Select dropdowns everywhere ---- */
html.dark select,
html.dark select.bg-white {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

/* ---- Input fields ---- */
html.dark input[type="text"],
html.dark input[type="email"],
html.dark input[type="password"],
html.dark input[type="number"],
html.dark input[type="time"],
html.dark input[type="tel"],
html.dark textarea {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}
html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #64748b !important;
}

/* ---- Admin-specific: .admin-card ---- */
html.dark .admin-card {
    background-color: #1e293b !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid #334155;
}

/* ---- Admin-specific: .form-input ---- */
html.dark .form-input {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}
html.dark .form-input:focus {
    background-color: #0f172a !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

/* ---- Admin-specific: .table-container ---- */
html.dark .table-container {
    border-color: #334155 !important;
}
html.dark .table-container td {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-bottom-color: #334155 !important;
}
html.dark .table-container th {
    border-bottom-color: #334155 !important;
}
html.dark .table-container tr:hover td {
    background-color: #334155 !important;
}
html.dark .bg-blue-50 {
    background-color: #0c1a3d !important;
}

/* ---- Admin: .stat-box stays gradient, but ensure text is white ---- */
html.dark .stat-box {
    color: white;
}

/* ---- Admin table colored borders ---- */
html.dark .border-2.border-blue-300 { border-color: #1d4ed8 !important; }
html.dark .border-2.border-green-300 { border-color: #166534 !important; }

/* ---- Shadows ---- */
html.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3) !important;
}
html.dark .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3) !important;
}
html.dark .shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}
html.dark .shadow-inner {
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3) !important;
}

/* ---- Section card containers ---- */
html.dark .rounded-2xl.shadow-lg,
html.dark .rounded-lg.shadow-lg {
    border-color: #334155;
}

/* ---- Impact analysis cards ---- */
html.dark .impact-positive {
    background-color: #052e16 !important;
}
html.dark .impact-positive h4,
html.dark .impact-positive p {
    color: #86efac !important;
}
html.dark .impact-negative {
    background-color: #450a0a !important;
}
html.dark .impact-negative h4,
html.dark .impact-negative p {
    color: #fca5a5 !important;
}

/* ---- Metric cards (smart-system) ---- */
html.dark .metric-card {
    background-color: #1e293b !important;
    border: 1px solid #334155;
}

/* ---- Footer ---- */
html.dark footer {
    background-color: #020617 !important;
}
html.dark footer .text-gray-300 { color: #94a3b8 !important; }
html.dark footer .text-gray-400 { color: #64748b !important; }

/* ---- Loading spinner overlay ---- */
html.dark .bg-white\/80 {
    background-color: rgba(30, 41, 59, 0.8) !important;
}

/* ---- Dropdown menus ---- */
html.dark #user-dropdown,
html.dark #admin-user-dropdown {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}
html.dark .dropdown-item:hover {
    background-color: #334155 !important;
}
html.dark .hover\:bg-gray-100:hover {
    background-color: #334155 !important;
}
html.dark .hover\:bg-red-50:hover {
    background-color: rgba(127, 29, 29, 0.3) !important;
}
html.dark .hover\:bg-green-50:hover {
    background-color: rgba(5, 46, 22, 0.5) !important;
}
html.dark .hover\:bg-blue-50:hover {
    background-color: rgba(30, 58, 138, 0.3) !important;
}

/* ---- Settings / Auth modal body ---- */
html.dark .bg-white.dark\:bg-gray-800,
html.dark [class*="dark:bg-gray-800"] {
    background-color: #1e293b !important;
}
html.dark .bg-gray-50.dark\:bg-gray-700,
html.dark [class*="dark:bg-gray-700"] {
    background-color: #334155 !important;
}

/* ---- Labels and small text ---- */
html.dark label {
    color: #cbd5e1 !important;
}
html.dark p {
    color: inherit;
}
html.dark h2, html.dark h3, html.dark h4, html.dark h5 {
    color: #f1f5f9;
}
/* Keep white text on gradient headers white */
html.dark .text-white { color: #ffffff !important; }

/* ---- Auth modal specific ---- */
html.dark .bg-white.rounded-2xl,
html.dark .bg-white.rounded-xl {
    background-color: #1e293b !important;
}

/* ---- Misc bg classes used in gallery/status ---- */
html.dark [class*="hover:bg-green-50"]:hover {
    background-color: rgba(5, 46, 22, 0.5) !important;
}

/* ---- Scroll bar ---- */
html.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}
html.dark ::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

/* ---- Generic catch-all for any remaining white bg ---- */
html.dark [style*="background-color: #ffffff"],
html.dark [style*="background-color:#ffffff"],
html.dark [style*="background: white"],
html.dark [style*="background:white"] {
    background-color: #1e293b !important;
}

/* ---- Ensure admin body also goes dark ---- */
html.dark .bg-gray-50,
html.dark body.bg-gray-50 {
    background-color: #0f172a !important;
}

/* ---- Chart.js canvas container ---- */
html.dark canvas {
    filter: none;
}
