/* ===== Dark Mode ===== */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --hover-bg: #334155;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="dark"] body { background: var(--bg-primary) !important; color: var(--text-primary); }
[data-theme="dark"] .card { background: var(--bg-card) !important; border-color: var(--border-color) !important; box-shadow: var(--shadow) !important; }
[data-theme="dark"] .card-header { border-color: var(--border-color) !important; }
[data-theme="dark"] .stat-card { background: var(--bg-card) !important; box-shadow: var(--shadow) !important; }
[data-theme="dark"] .stat-card .stat-label { color: var(--text-secondary) !important; }
[data-theme="dark"] .table { color: var(--text-primary); }
[data-theme="dark"] .table th { color: var(--text-secondary) !important; border-color: var(--border-color) !important; }
[data-theme="dark"] .table td { border-color: var(--border-color) !important; }
[data-theme="dark"] .table-hover tbody tr:hover { background: var(--hover-bg) !important; }
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select {
    background: var(--bg-input) !important; color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .form-control::placeholder { color: var(--text-muted) !important; }
[data-theme="dark"] .dropdown-menu { background: var(--bg-secondary) !important; border-color: var(--border-color) !important; }
[data-theme="dark"] .dropdown-item { color: var(--text-primary) !important; }
[data-theme="dark"] .dropdown-item:hover { background: var(--hover-bg) !important; }
[data-theme="dark"] .dropdown-divider { border-color: var(--border-color) !important; }
[data-theme="dark"] .text-muted { color: var(--text-secondary) !important; }
[data-theme="dark"] .text-dark { color: var(--text-primary) !important; }
[data-theme="dark"] a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item) { color: #818cf8; }
[data-theme="dark"] .alert-success { background: #052e16 !important; color: #86efac !important; }
[data-theme="dark"] .alert-danger { background: #450a0a !important; color: #fca5a5 !important; }
[data-theme="dark"] .alert-warning { background: #451a03 !important; color: #fcd34d !important; }
[data-theme="dark"] .alert-info { background: #172554 !important; color: #93c5fd !important; }
[data-theme="dark"] .bid-info { background: #052e16 !important; border-color: #166534 !important; }
[data-theme="dark"] .book-cover-placeholder { opacity: 0.9; }
[data-theme="dark"] .form-text { color: var(--text-muted) !important; }
[data-theme="dark"] .earning-card { background: var(--bg-card) !important; border-color: var(--border-color) !important; }
[data-theme="dark"] .genre-badge { background: #312e81 !important; color: #c4b5fd !important; }
[data-theme="dark"] .modal-content { background: var(--bg-secondary) !important; color: var(--text-primary); }
[data-theme="dark"] .list-group-item { background: var(--bg-card) !important; color: var(--text-primary); border-color: var(--border-color) !important; }
[data-theme="dark"] .badge.bg-secondary { background: var(--bg-input) !important; }
[data-theme="dark"] hr { border-color: var(--border-color) !important; }
[data-theme="dark"] .progress { background: var(--bg-input) !important; }
[data-theme="dark"] .page-link { background: var(--bg-card) !important; color: var(--text-primary); border-color: var(--border-color) !important; }
[data-theme="dark"] .page-item.active .page-link { background: #4f46e5 !important; border-color: #4f46e5 !important; }

/* Theme toggle button */
.theme-toggle {
    width: 36px; height: 36px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.1); border: none; color: white;
    cursor: pointer; transition: all 0.2s; font-size: 1rem;
}
.theme-toggle:hover { background: rgba(255,255,255,0.2); transform: scale(1.05); }

/* Notification bell */
.notification-bell {
    position: relative; display: inline-flex; align-items: center;
    justify-content: center; width: 36px; height: 36px; border-radius: 10px;
    background: rgba(255,255,255,0.1); color: white; text-decoration: none;
    transition: all 0.2s; font-size: 1rem;
}
.notification-bell:hover { background: rgba(255,255,255,0.2); color: white; }
.notification-bell .badge-count {
    position: absolute; top: -4px; right: -4px;
    background: #ef4444; color: white; font-size: 0.65rem;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; border: 2px solid transparent;
}
