/* ==========================================
   DARK MODE THEME
   ========================================== */
body.dark-mode {
    --bg-main: #0F172A;
    --card-bg: #1E293B;
    --border-color: #334155;
    --text-main: #F1F5F9;
    --text-muted: #94A3B8;
    --bg-light: #0F172A;
}
body.dark-mode .sidebar { background-color: #020617; }
body.dark-mode .sidebar-footer .btn-primary { background: var(--yellow); }
body.dark-mode .top-header { background: #1E293B; border-color: #334155; }
body.dark-mode .search-container input { background: #0F172A; color: #F1F5F9; border-color: #334155; }
body.dark-mode .card { background: #1E293B; border-color: #334155; }
body.dark-mode .icon-btn:hover { background: #334155; color: #F1F5F9; }
body.dark-mode .btn-outline { background: #1E293B; border-color: #334155; color: #F1F5F9; }
body.dark-mode .btn-outline:hover { background: #334155; }
body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
    background: #0F172A !important;
    color: #F1F5F9 !important;
    border-color: #334155 !important;
}
body.dark-mode .progress-bar { background: #334155; }
body.dark-mode .nav-link { color: #94A3B8; }
body.dark-mode .nav-link:hover { background: rgba(255,255,255,0.07); color: #F1F5F9; }
body.dark-mode .nav-link.active { background: var(--yellow); color: #0F172A; }
body.dark-mode .doc-table thead th { background: #0F172A; color: #94A3B8; }
body.dark-mode .doc-table tbody td { color: #F1F5F9; border-color: #334155; }
body.dark-mode .doc-table tr:hover { background: #334155; }
body.dark-mode .summary-stat { background: #0F172A; }
body.dark-mode #profile-dropdown, body.dark-mode #notif-panel { background: #1E293B; border-color: #334155; }
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 { color: #F1F5F9; }
body.dark-mode .stat-details h2 { color: #F1F5F9; }
body.dark-mode .pc-title { color: #F1F5F9; }
body.dark-mode .tl-card h4 { color: #F1F5F9; }
body.dark-mode .page-title { color: #F1F5F9; }
body.dark-mode .badge { color: inherit; }
body.dark-mode .profile-dropdown a { color: #F1F5F9; }
body.dark-mode .settings-row { background: #1E293B; border-color: #334155; }
body.dark-mode .settings-row:hover { border-color: var(--yellow); }

/* Theme Toggle Switch */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    cursor: pointer;
    display: inline-block;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #D1D5DB;
    border-radius: 28px;
    transition: 0.3s;
}
.toggle-slider:before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-slider { background: var(--yellow); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(24px); }

/* Settings & Profile page */
.settings-section { margin-bottom: 32px; }
.settings-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    padding-left: 4px;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--card-bg);
    margin-bottom: 10px;
    transition: var(--transition);
}
.settings-row:hover { border-color: var(--yellow); }
.settings-row-left { display: flex; align-items: center; gap: 14px; }
.settings-row-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}

/* Profile page */
.profile-avatar-large {
    width: 88px; height: 88px; border-radius: 50%;
    background: var(--navy);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 2rem; font-weight: 700;
    flex-shrink: 0;
}
body.dark-mode .profile-avatar-large { background: #334155; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ==========================================
   HIDROS BRAND PANEL (Auth Left)
   ========================================== */
.hidros-brand-panel {
    background: #0D0D0D !important;
    background-image:
        radial-gradient(ellipse at 0% 100%, rgba(255, 193, 7, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse at 100% 0%, rgba(255, 193, 7, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(30, 30, 30, 0.5) 0%, transparent 70%) !important;
    justify-content: flex-start;
    gap: 0;
}

/* Decorative geometric shapes */
.brand-deco {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    pointer-events: none;
}
.brand-deco-1 {
    width: 420px;
    height: 420px;
    background: var(--yellow);
    top: -120px;
    right: -120px;
    border-radius: 50%;
}
.brand-deco-2 {
    width: 240px;
    height: 240px;
    border: 2px solid var(--yellow);
    bottom: 60px;
    right: -60px;
    background: transparent;
    opacity: 0.12;
    border-radius: 50%;
}
.brand-deco-3 {
    width: 160px;
    height: 160px;
    background: var(--yellow);
    bottom: -40px;
    left: 30px;
    border-radius: 50%;
    opacity: 0.04;
}

/* Floating icon badges */
.brand-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    z-index: 5;
    animation: floatBadge 4s ease-in-out infinite;
}
@keyframes floatBadge {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
}

/* Auth-left heading override */
.hidros-brand-panel .auth-left-text h1 {
    color: #FFFFFF !important;
}

/* Custom Prompt Modal Dark Mode Overrides */
body.dark-mode #modal-custom-prompt .card {
    background: #1E293B !important;
}
body.dark-mode #prompt-input-wrapper {
    background: #0F172A !important;
    border-color: #334155 !important;
}
body.dark-mode #prompt-input {
    background: transparent !important;
    color: #F1F5F9 !important;
}
