/* ===== SLIDE TOGGLE SWITCH ===== */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    margin: 0 5px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #1e293b;
    border-radius: 30px;
    transition: 0.4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.slider i { font-size: 12px; z-index: 1; transition: color 0.4s; }
.slider .fa-sun { color: #f59e0b; }
.slider .fa-moon { color: #475569; }

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Checked State (Light Mode Toggle) */
input:checked + .slider { background-color: #cbd5e1; }
input:checked + .slider .fa-sun { color: #94a3b8; }
input:checked + .slider .fa-moon { color: #6366f1; }
input:checked + .slider:before { transform: translateX(30px); background-color: #6366f1; }

/* ===== LIGHT MODE CSS VARIABLES (FORCED) ===== */
/* Using !important guarantees they override style.css */
html[data-theme="light"], 
html[data-theme="light"] body {
    --bg-dark: #ffffff !important;
    --bg-body: #f1f5f9 !important;
    --bg-card: #ffffff !important;
    --bg-card-hover: #f8fafc !important;
    --bg-input: #f1f5f9 !important;
    --sidebar-bg: #ffffff !important;
    --text-light: #1e293b !important;
    --text-muted: #475569 !important;
    --text-dim: #94a3b8 !important;
    --border: #e2e8f0 !important;
    --border-light: #cbd5e1 !important;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    --green-bg: rgba(16, 185, 129, 0.1) !important;
    --red-bg: rgba(239, 68, 68, 0.1) !important;
    --blue-bg: rgba(59, 130, 246, 0.1) !important;
    --yellow-bg: rgba(245, 158, 11, 0.1) !important;
}

/* ===== LIGHT MODE LAYOUT OVERRIDES ===== */
html[data-theme="light"] .sidebar { border-right: 1px solid #e2e8f0 !important; background: #ffffff !important; }
html[data-theme="light"] .sidebar-logo span { color: #1e293b !important; }
html[data-theme="light"] .nav-item { color: #475569 !important; }
html[data-theme="light"] .nav-item:hover { background: #f1f5f9 !important; color: #1e293b !important; }
html[data-theme="light"] .nav-item.active { color: #fff !important; background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important; }
html[data-theme="light"] .top-header { border-bottom: 1px solid #e2e8f0 !important; background: rgba(255,255,255,0.95) !important; }
html[data-theme="light"] .menu-toggle { border-color: #e2e8f0 !important; background: #f1f5f9 !important; color: #475569 !important; }
html[data-theme="light"] .notif-btn { background: #f1f5f9 !important; border-color: #e2e8f0 !important; color: #475569 !important; }
html[data-theme="light"] .profile-name { color: #1e293b !important; }
html[data-theme="light"] .header-search input { background: #f1f5f9 !important; border-color: #e2e8f0 !important; color: #1e293b !important; }
html[data-theme="light"] .data-table th { background: #f8fafc !important; color: #475569 !important; }
html[data-theme="light"] .data-table td { border-color: #f1f5f9 !important; color: #334155 !important; }
html[data-theme="light"] .filter-select, html[data-theme="light"] .filter-input { background: #fff !important; border-color: #e2e8f0 !important; color: #1e293b !important; }