﻿/* Dark Mode Overrides */
html.dark .filter-btn {
    background: #334155;
    color: #94a3b8;
    border-color: #475569;
}
html.dark .filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}
html.dark .glass-card {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(51, 65, 85, 0.6);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.2);
}
html.dark .auth-card {
    background: #1e293b;
    border-color: rgba(51, 65, 85, 0.8);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.05);
}
html.dark .auth-globe {
    background: radial-gradient(circle at 30% 30%, #334155, #1e293b, #0f172a);
}
html.dark .error-msg {
    background: #450a0a;
    border-color: #dc2626;
    color: #fca5a5;
}
html.dark body {
    color: #e2e8f0;
    background-color: #0f172a;
    background-image:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(59, 130, 246, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 10%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        linear-gradient(165deg, #0f172a 0%, #1e293b 100%);
}

html.dark {
    --glass-bg: rgba(30, 41, 59, 0.62);
    --glass-border: rgba(148, 163, 184, 0.2);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
}

html.dark,
html.dark .glass-card,
html.dark main,
html.dark #app-section {
    color: var(--text-primary);
}

html.dark h1, html.dark h2, html.dark h3, html.dark h4,
html.dark .font-bold, html.dark label,
html.dark .text-gray-800, html.dark .text-gray-700, html.dark .text-primary {
    color: #f1f5f9 !important;
}

html.dark .text-gray-500, html.dark .text-gray-400, html.dark .text-gray-600,
html.dark .text-secondary {
    color: #94a3b8 !important;
}

html.dark .filter-glass-group {
    background: rgba(30, 41, 59, 0.65);
    border-color: rgba(148, 163, 184, 0.2);
}

html.dark .filter-btn {
    background: rgba(51, 65, 85, 0.55);
    border-color: rgba(148, 163, 184, 0.25);
    color: #cbd5e1;
}

html.dark .filter-btn:hover {
    background: rgba(71, 85, 105, 0.75);
    color: #f8fafc;
}

html.dark .filter-btn.active {
    color: #fff;
}

html.dark .mobile-nav-shell {
    background: #1e293b;
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.45);
}

html.dark .capsule-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.35);
}

html.dark .chart-panel {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.2) 0%, rgba(30, 41, 59, 0.5) 100%);
}

html.dark .stats-data-table th {
    color: #cbd5e1;
}

html.dark .stats-data-table td {
    color: #e2e8f0;
}

html.dark input, html.dark select, html.dark textarea {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

html.dark header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.85) 100%);
}

html.dark #header-date {
    color: #94a3b8 !important;
}

html.dark #header-clock {
    color: #f1f5f9 !important;
}

/* Utility for hiding elements */
.hidden { display: none !important; }

.section-accordion-card.is-open > .section-accordion-body [data-section-body] {
    display: block !important;
}

.lead-accordion-card.is-open > .lead-accordion-body {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.lead-accordion-body .activity-slots-row,
.lead-accordion-body .prospect-stage-navigator {
    min-height: 2.5rem;
}
