/* ===== COMPREHENSIVE DARK MODE STYLESHEET ===== */
/* Loaded last to override all page-specific styles */

[data-theme="dark"] body {
    color: #e2e8f0;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.04), transparent 24%),
        linear-gradient(180deg, #0f1724 0%, #1a2439 100%);
}

/* ===== CARDS ===== */
[data-theme="dark"] .card,
[data-theme="dark"] .glass-panel {
    background: rgba(15, 23, 36, 0.7);
    border-color: rgba(148, 163, 184, 0.12);
}

[data-theme="dark"] .card-header {
    background: transparent;
    border-bottom-color: rgba(148, 163, 184, 0.1);
}

/* ===== TYPOGRAPHY ===== */
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: #f1f5f9;
}

[data-theme="dark"] p { color: #cbd5e1; }
[data-theme="dark"] small, [data-theme="dark"] .small { color: #94a3b8; }
[data-theme="dark"] .text-muted { color: #94a3b8 !important; }
[data-theme="dark"] .form-label { color: #e2e8f0; }
[data-theme="dark"] label { color: #e2e8f0; }

/* ===== FORMS ===== */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: rgba(30, 41, 59, 0.9);
    border-color: rgba(96, 165, 250, 0.5);
    color: #f1f5f9;
}

[data-theme="dark"] .form-control::placeholder { color: #64748b; }
[data-theme="dark"] .input-group-text { background: rgba(30, 41, 59, 0.6); border-color: rgba(148, 163, 184, 0.2); color: #94a3b8; }

/* ===== TABLES ===== */
[data-theme="dark"] table { --bs-table-color: #cbd5e1 !important; --bs-table-bg: transparent !important; }
[data-theme="dark"] .table { color: #e2e8f0 !important; --bs-table-color: #cbd5e1 !important; --bs-table-bg: transparent !important; }
[data-theme="dark"] .table td, [data-theme="dark"] .table th { border-color: rgba(148, 163, 184, 0.08) !important; }
[data-theme="dark"] .table td { color: #cbd5e1 !important; }
[data-theme="dark"] .table tbody td { color: #cbd5e1 !important; }
[data-theme="dark"] .table tbody tr { --bs-table-color: #cbd5e1 !important; }
[data-theme="dark"] .table thead th,
[data-theme="dark"] .table thead { --bs-table-bg: rgba(30, 41, 59, 0.5) !important; --bs-table-color: #94a3b8 !important; }
[data-theme="dark"] .table-light { --bs-table-bg: rgba(30, 41, 59, 0.5) !important; --bs-table-color: #94a3b8 !important; }
[data-theme="dark"] .table-hover tbody tr:hover { background: rgba(59, 130, 246, 0.06) !important; }
[data-theme="dark"] thead th { color: #94a3b8 !important; background: rgba(30, 41, 59, 0.5) !important; }
[data-theme="dark"] tbody td { color: #cbd5e1 !important; }
[data-theme="dark"] tbody tr { border-color: rgba(148, 163, 184, 0.06) !important; }
[data-theme="dark"] .table-responsive { color: #cbd5e1 !important; }

/* ===== BUTTONS ===== */
[data-theme="dark"] .btn-outline-secondary {
    color: var(--ink-soft);
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(30, 41, 59, 0.5);
}

[data-theme="dark"] .btn-outline-primary {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
    background: rgba(30, 41, 59, 0.5);
}

[data-theme="dark"] .btn-outline-danger {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
    background: rgba(30, 41, 59, 0.5);
}

[data-theme="dark"] .btn-close { filter: invert(1); }

/* ===== BADGES ===== */
[data-theme="dark"] .badge.bg-primary {
    background: linear-gradient(135deg, #2563eb, #60a5fa) !important;
}

[data-theme="dark"] .badge.bg-light,
[data-theme="dark"] .badge.bg-secondary {
    background: rgba(30, 41, 59, 0.8) !important;
    color: #e2e8f0 !important;
}

/* ===== ALERTS ===== */
[data-theme="dark"] .alert-success { background: var(--success-soft); color: #86efac; }
[data-theme="dark"] .alert-danger { background: var(--danger-soft); color: #fca5a5; }
[data-theme="dark"] .alert-warning { background: var(--warning-soft); color: #fde68a; }

/* ===== MODALS ===== */
[data-theme="dark"] .modal-content { background-color: #1e293b; color: #e2e8f0; }
[data-theme="dark"] .modal-header { border-bottom-color: rgba(148, 163, 184, 0.1); }
[data-theme="dark"] .modal-footer { border-top-color: rgba(148, 163, 184, 0.1); }

/* ===== DROPDOWNS ===== */
[data-theme="dark"] .dropdown-menu {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.15);
}

[data-theme="dark"] .dropdown-item { color: #e2e8f0; }
[data-theme="dark"] .dropdown-item:hover { background: rgba(59, 130, 246, 0.1); }

/* ===== PAGINATION ===== */
[data-theme="dark"] .pagination .page-link {
    background-color: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--ink);
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--brand);
    border-color: var(--brand);
}

[data-theme="dark"] .pagination .page-item.disabled .page-link {
    background-color: transparent;
    border-color: rgba(148, 163, 184, 0.1);
    color: var(--ink-soft);
}

/* ===== TOAST ===== */
[data-theme="dark"] .toast-item { background: #1e293b; border-color: rgba(148, 163, 184, 0.15); }
[data-theme="dark"] .toast-item .toast-close:hover { background: rgba(255, 255, 255, 0.1); }

/* ===== SKELETON ===== */
[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.8) 25%, rgba(51, 65, 85, 0.5) 50%, rgba(30, 41, 59, 0.8) 75%);
    background-size: 200% 100%;
}

/* ===== BREADCRUMBS ===== */
[data-theme="dark"] .breadcrumb-item a { color: var(--brand); }
[data-theme="dark"] .breadcrumb-item.active { color: var(--ink-soft); }

/* ===== EMPTY STATE ===== */
[data-theme="dark"] .empty-state-title { color: #e2e8f0; }
[data-theme="dark"] .empty-state-text { color: #94a3b8; }

/* ===== PROGRESS ===== */
[data-theme="dark"] .progress { background: rgba(30, 41, 59, 0.8); }

/* ===== CODE ===== */
[data-theme="dark"] code { background: rgba(30, 41, 59, 0.8); color: #93c5fd; }

/* ===== SIDEBAR ===== */
[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, #10233c 0%, #152d4b 45%, #183961 100%);
    border-right-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

[data-theme="dark"] .sidebar::before {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.12) 0%, transparent 100%);
}

[data-theme="dark"] .sidebar .nav-link { color: rgba(228, 238, 255, 0.78); }
[data-theme="dark"] .sidebar .nav-link::after {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
}

[data-theme="dark"] .sidebar .nav-link:hover { color: #fff; }

[data-theme="dark"] .sidebar .nav-link.active {
    background: linear-gradient(135deg, #1f6bff 0%, #3aa0ff 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(7, 51, 139, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .sidebar .nav-link.active::before {
    background: linear-gradient(180deg, #fff, #93c5fd);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .sidebar .nav-link-text,
[data-theme="dark"] .nav-link-text {
    background: linear-gradient(135deg, rgba(230, 239, 255, 0.5), rgba(230, 239, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .sidebar-brand-wrap {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

/* ===== DASHBOARD ===== */
[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .dashboard-sidecard,
[data-theme="dark"] .dashboard-summary-card,
[data-theme="dark"] .dashboard-summary {
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 32%),
        linear-gradient(180deg, rgba(26, 36, 57, 0.97), rgba(15, 23, 36, 0.95));
    border-color: rgba(148, 163, 184, 0.12);
}

[data-theme="dark"] .dashboard-metric,
[data-theme="dark"] .dashboard-list-item,
[data-theme="dark"] .dashboard-sidecard-item,
[data-theme="dark"] .dashboard-stat {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(148, 163, 184, 0.1);
}

[data-theme="dark"] .dashboard-metric-value { color: #e2e8f0; }
[data-theme="dark"] .dashboard-metric-label { color: #94a3b8; }
[data-theme="dark"] .dashboard-metric-note { color: #64748b; }
[data-theme="dark"] .dashboard-kicker { color: #60a5fa; }
[data-theme="dark"] .dashboard-title { color: #f1f5f9; }
[data-theme="dark"] .dashboard-subtitle { color: #94a3b8; }
[data-theme="dark"] .dashboard-sidecard-title { color: #e2e8f0; }
[data-theme="dark"] .dashboard-list-item span:first-child { color: #94a3b8; }
[data-theme="dark"] .dashboard-list-item span:last-child { color: #e2e8f0; }
[data-theme="dark"] .dashboard-spotlight-label { color: rgba(238, 245, 255, 0.72); }
[data-theme="dark"] .dashboard-spotlight-value { color: #f1f5f9; }
[data-theme="dark"] .dashboard-spotlight-copy { color: rgba(241, 247, 255, 0.82); }
[data-theme="dark"] .dashboard-summary-title { color: #e2e8f0; }
[data-theme="dark"] .dashboard-summary-copy { color: #94a3b8; }

/* ===== DASHBOARD stat page (files/index) ===== */
[data-theme="dark"] .dashboard-stat-value { color: #e2e8f0; }
[data-theme="dark"] .dashboard-stat-label { color: #94a3b8; }
[data-theme="dark"] .dashboard-stat-note { color: #64748b; }
[data-theme="dark"] .dashboard-copy { color: #94a3b8; }
[data-theme="dark"] .page-subtitle { color: #94a3b8; }

/* ===== FILES / FOLDERS / COMMON ===== */
[data-theme="dark"] .file-name,
[data-theme="dark"] .folder-file-name,
[data-theme="dark"] .folders-file-name,
[data-theme="dark"] .trash-file-name,
[data-theme="dark"] .section-heading h4,
[data-theme="dark"] .metric-value { color: #f1f5f9 !important; }

[data-theme="dark"] .file-meta,
[data-theme="dark"] .version-meta,
[data-theme="dark"] .folder-version-meta,
[data-theme="dark"] .folder-subtitle,
[data-theme="dark"] .folder-stat,
[data-theme="dark"] .trash-file-size,
[data-theme="dark"] .trash-deleted-date { color: #94a3b8 !important; }

[data-theme="dark"] .section-heading p,
[data-theme="dark"] .trash-subtitle { color: #94a3b8 !important; }

/* ===== TOOLBAR / FILTERS ===== */
[data-theme="dark"] .toolbar-chip {
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(148, 163, 184, 0.15) !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] .files-filter-card .card-body,
[data-theme="dark"] .filter-label,
[data-theme="dark"] .filter-help,
[data-theme="dark"] .files-filter-heading p,
[data-theme="dark"] .batch-form-label { color: #94a3b8 !important; }

/* ===== FILE ICONS / PILLS ===== */
[data-theme="dark"] .file-icon-chip,
[data-theme="dark"] .folder-file-icon,
[data-theme="dark"] .folders-icon-chip {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(148, 163, 184, 0.12) !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] .file-pill {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .permission-pill {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
}

/* ===== FOLDER CARDS ===== */
[data-theme="dark"] .folder-grid-card,
[data-theme="dark"] .folder-stat-card {
    background: rgba(15, 23, 36, 0.7) !important;
    border-color: rgba(148, 163, 184, 0.12) !important;
}

[data-theme="dark"] .folder-grid-icon,
[data-theme="dark"] .folder-stat-icon {
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(148, 163, 184, 0.1) !important;
}

/* ===== FOLDER SEARCH / MODALS ===== */
[data-theme="dark"] .folder-search-card {
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(148, 163, 184, 0.12) !important;
}

[data-theme="dark"] .modal-upload-zone {
    background: rgba(30, 41, 59, 0.5) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: #94a3b8;
}

[data-theme="dark"] .modal-upload-zone:hover {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
}

[data-theme="dark"] .modal-upload-zone i { color: #60a5fa; }

/* ===== ACTION GROUPS ===== */
[data-theme="dark"] .folder-file-actions,
[data-theme="dark"] .folders-action-group {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(148, 163, 184, 0.12) !important;
}

/* ===== BULK ACTION ===== */
[data-theme="dark"] .bulk-action-bar {
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(148, 163, 184, 0.12) !important;
}

/* ===== TRASH ===== */
[data-theme="dark"] .trash-empty-title { color: #e2e8f0 !important; }
[data-theme="dark"] .trash-empty-text { color: #94a3b8 !important; }

/* ===== ADMIN USERS ===== */
[data-theme="dark"] .admin-users-subtitle { color: #94a3b8; }
[data-theme="dark"] .admin-users-card th { color: #94a3b8; }

/* ===== ADMIN SETTINGS ===== */
[data-theme="dark"] .settings-section-title,
[data-theme="dark"] .settings-section-desc,
[data-theme="dark"] .settings-status-label,
[data-theme="dark"] .settings-status-value { color: #e2e8f0 !important; }

[data-theme="dark"] .settings-section { border-color: rgba(148, 163, 184, 0.1) !important; }

[data-theme="dark"] .settings-status-card {
    background: rgba(30, 41, 59, 0.5) !important;
    border-color: rgba(148, 163, 184, 0.1) !important;
}

[data-theme="dark"] .settings-subtitle { color: #94a3b8; }

/* ===== MISSING FILES ===== */
[data-theme="dark"] .missing-subtitle { color: #94a3b8; }
[data-theme="dark"] .missing-count-badge {
    background: rgba(234, 179, 8, 0.2) !important;
    color: #fbbf24 !important;
}

/* ===== FORM SECTIONS (create/edit pages) ===== */
[data-theme="dark"] .user-form-section,
[data-theme="dark"] .folder-form-section,
[data-theme="dark"] .share-form-section,
[data-theme="dark"] .audit-filter-card,
[data-theme="dark"] .activity-filter-card {
    background: rgba(30, 41, 59, 0.5) !important;
    border-color: rgba(148, 163, 184, 0.1) !important;
}

[data-theme="dark"] .user-form-section-title,
[data-theme="dark"] .folder-form-section-title,
[data-theme="dark"] .share-form-section-title {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .permission-preview-card,
[data-theme="dark"] .permission-preview-title {
    background: rgba(30, 41, 59, 0.5) !important;
    color: #e2e8f0 !important;
    border-color: rgba(148, 163, 184, 0.1) !important;
}

[data-theme="dark"] .permission-preview-list { color: #94a3b8; }

/* ===== AUTH CARDS ===== */
[data-theme="dark"] .login-card,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .forgot-card,
[data-theme="dark"] .reset-card,
[data-theme="dark"] .share-card,
[data-theme="dark"] .expired-card,
[data-theme="dark"] .password-card,
[data-theme="dark"] .share-public-card {
    background: rgba(15, 23, 36, 0.85) !important;
}

[data-theme="dark"] .login-title,
[data-theme="dark"] .auth-title,
[data-theme="dark"] .forgot-title,
[data-theme="dark"] .reset-title,
[data-theme="dark"] .share-title,
[data-theme="dark"] .expired-title,
[data-theme="dark"] .password-title {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .login-subtitle,
[data-theme="dark"] .auth-subtitle,
[data-theme="dark"] .forgot-subtitle,
[data-theme="dark"] .reset-subtitle,
[data-theme="dark"] .expired-text,
[data-theme="dark"] .password-subtitle {
    color: #94a3b8 !important;
}

[data-theme="dark"] .login-footer,
[data-theme="dark"] .login-forgot { color: #94a3b8 !important; }
[data-theme="dark"] .login-checkbox-label { color: #e2e8f0 !important; }
[data-theme="dark"] .login-divider-line { background: rgba(148, 163, 184, 0.2) !important; }
[data-theme="dark"] .login-divider-text { color: #64748b !important; }
[data-theme="dark"] .login-input-group .input-icon { color: #64748b; }

[data-theme="dark"] .auth-input-group .input-icon { color: #64748b; }
[data-theme="dark"] .auth-back-link { color: #60a5fa !important; }

/* ===== SHARE PAGES ===== */
[data-theme="dark"] .share-file-name { color: #f1f5f9 !important; }
[data-theme="dark"] .share-meta-item { color: #94a3b8 !important; }
[data-theme="dark"] .share-footer { border-top-color: rgba(148, 163, 184, 0.1); }
[data-theme="dark"] .expired-footer { border-top-color: rgba(148, 163, 184, 0.1); }

/* ===== SHARES INDEX ===== */
[data-theme="dark"] .shares-subtitle { color: #94a3b8; }
[data-theme="dark"] .shares-empty-title { color: #e2e8f0; }
[data-theme="dark"] .shares-empty-text { color: #94a3b8; }

/* ===== STORAGE ===== */
[data-theme="dark"] .storage-title { color: #f1f5f9; }
[data-theme="dark"] .storage-subtitle { color: #94a3b8; }
[data-theme="dark"] .storage-stat-card {
    background: rgba(15, 23, 36, 0.7) !important;
    border-color: rgba(148, 163, 184, 0.12) !important;
}
[data-theme="dark"] .storage-stat-value { color: #e2e8f0; }
[data-theme="dark"] .storage-stat-label { color: #94a3b8; }
[data-theme="dark"] .storage-section-label { color: #94a3b8; }

/* ===== ANALYTICS ===== */
[data-theme="dark"] .analytics-subtitle { color: #94a3b8; }
[data-theme="dark"] .analytics-card .card-header { background: rgba(30, 41, 59, 0.3) !important; }
[data-theme="dark"] .analytics-progress .progress { background: rgba(30, 41, 59, 0.8); }

/* ===== BACKUPS ===== */
[data-theme="dark"] .backup-subtitle { color: #94a3b8; }
[data-theme="dark"] .backup-hero { background: rgba(59, 130, 246, 0.08); }
[data-theme="dark"] .backup-lead { color: #e2e8f0; }
[data-theme="dark"] .backup-card .card-header { background: transparent; }
[data-theme="dark"] .backup-progress-card { background: rgba(30, 41, 59, 0.5); }

/* ===== BATCH ===== */
[data-theme="dark"] .batch-subtitle { color: #94a3b8; }
[data-theme="dark"] .batch-file-count { color: #e2e8f0; }

/* ===== UPLOAD ===== */
[data-theme="dark"] .upload-zone-title { color: #e2e8f0; }
[data-theme="dark"] .upload-zone-subtitle { color: #94a3b8; }
[data-theme="dark"] .upload-zone { border-color: rgba(148, 163, 184, 0.2); }
[data-theme="dark"] .upload-card .card-header { background: transparent; }

/* ===== UPLOAD VERSION ===== */
[data-theme="dark"] .version-info-label { color: #94a3b8; }
[data-theme="dark"] .version-info-value { color: #e2e8f0; }
[data-theme="dark"] .version-card .card-header { background: transparent; }

/* ===== FILE SHOW ===== */
[data-theme="dark"] .file-detail-label { color: #94a3b8; }
[data-theme="dark"] .file-detail-value { color: #e2e8f0; }
[data-theme="dark"] .file-stat-item { background: rgba(30, 41, 59, 0.5); }

/* ===== FILE PREVIEW ===== */
[data-theme="dark"] .preview-title { color: #f1f5f9; }
[data-theme="dark"] .preview-stat-label { color: #94a3b8; }
[data-theme="dark"] .preview-stat-value { color: #e2e8f0; }
[data-theme="dark"] .preview-stat-item { background: rgba(30, 41, 59, 0.5); }
[data-theme="dark"] .preview-audio-wrapper { background: rgba(30, 41, 59, 0.5); }

/* ===== BACKUP UPLOAD ===== */
[data-theme="dark"] .backup-upload-card .card-header { background: transparent; }

/* ===== TAGS ===== */
[data-theme="dark"] .tags-subtitle { color: #94a3b8; }
[data-theme="dark"] .tags-empty-title { color: #e2e8f0; }
[data-theme="dark"] .tags-empty-text { color: #94a3b8; }

[data-theme="dark"] .tag-create-card-header h4,
[data-theme="dark"] .tag-edit-card-header h4 { color: #f1f5f9; }

/* ===== FOLDER CREATE/EDIT ===== */
[data-theme="dark"] .folder-create-card-header h4,
[data-theme="dark"] .folder-edit-card-header h4 { color: #f1f5f9; }

/* ===== AUDIT LOGS ===== */
[data-theme="dark"] .audit-subtitle { color: #94a3b8; }
[data-theme="dark"] .audit-danger-zone { background: rgba(239, 68, 68, 0.1) !important; border-color: rgba(239, 68, 68, 0.2) !important; }
[data-theme="dark"] .audit-action-badge { background: rgba(30, 41, 59, 0.6) !important; border-color: rgba(148, 163, 184, 0.12) !important; color: #e2e8f0; }

/* ===== MY ACTIVITY ===== */
[data-theme="dark"] .activity-subtitle { color: #94a3b8; }
[data-theme="dark"] .activity-action-badge { background: rgba(30, 41, 59, 0.6) !important; border-color: rgba(148, 163, 184, 0.12) !important; color: #e2e8f0; }
[data-theme="dark"] .activity-table th { color: #94a3b8 !important; background: rgba(30, 41, 59, 0.5) !important; }
[data-theme="dark"] .activity-table td { color: #cbd5e1 !important; }
[data-theme="dark"] .activity-filter-card { background: rgba(30, 41, 59, 0.5) !important; border-color: rgba(148, 163, 184, 0.1) !important; }

/* ===== GENERIC: Override all light text on dark bg ===== */
[data-theme="dark"] td { color: #cbd5e1 !important; }
[data-theme="dark"] th { color: #94a3b8 !important; }
[data-theme="dark"] td span { color: #cbd5e1; }
[data-theme="dark"] td small { color: #94a3b8; }
[data-theme="dark"] td code { background: rgba(30, 41, 59, 0.8); color: #93c5fd; }
[data-theme="dark"] p { color: #cbd5e1; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 { color: #f1f5f9; }
[data-theme="dark"] small, [data-theme="dark"] .small { color: #94a3b8; }
[data-theme="dark"] .text-muted { color: #94a3b8 !important; }
[data-theme="dark"] label, [data-theme="dark"] .form-label { color: #e2e8f0; }
[data-theme="dark"] code { color: #93c5fd; background: rgba(30, 41, 59, 0.8); }
[data-theme="dark"] a { color: #60a5fa; }
[data-theme="dark"] a:hover { color: #93c5fd; }

/* ===== API TOKENS ===== */
[data-theme="dark"] .api-subtitle { color: #94a3b8; }

/* ===== TWO-FACTOR ===== */
[data-theme="dark"] .twofa-step-content h6 { color: #e2e8f0; }
[data-theme="dark"] .twofa-step-content p { color: #94a3b8; }
[data-theme="dark"] .twofa-qr-wrapper { background: #fff; }
[data-theme="dark"] .twofa-setup-card .card-header { background: transparent; }

/* ===== BACKUP RESTORE ===== */
[data-theme="dark"] .restore-card { background: rgba(30, 41, 59, 0.5); border-color: rgba(148, 163, 184, 0.12); }

/* ===== STATUS BADGES ===== */
[data-theme="dark"] .status-badge { background: rgba(30, 41, 59, 0.6); color: #e2e8f0; }

/* ===== UNCOVERED INLINE STYLE COLORS ===== */

/* Gray-500 (#6c757d) default folder color in folders/show */
[data-theme="dark"] [style*="color: #6c757d"],
[data-theme="dark"] [style*="color:#6c757d"] {
    color: #94a3b8 !important;
}

/* Slate-500 (#64748b) used inline in settings notes */
[data-theme="dark"] [style*="color: #64748b"],
[data-theme="dark"] [style*="color:#64748b"] {
    color: #94a3b8 !important;
}

/* Preview embed border */
[data-theme="dark"] .preview-embed {
    border-color: rgba(148, 163, 184, 0.12) !important;
}

/* Storage progress bar track */
[data-theme="dark"] .storage-progress {
    background: rgba(30, 41, 59, 0.8) !important;
}

/* Dropdown menus */
[data-theme="dark"] .dropdown-menu {
    background: #1e293b !important;
    border-color: rgba(148, 163, 184, 0.15) !important;
}

/* Dropdown items */
[data-theme="dark"] .dropdown-item {
    color: #e2e8f0 !important;
}

/* Dropdown item hover */
[data-theme="dark"] .dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1) !important;
}

/* Generic link color fix for better contrast */
[data-theme="dark"] .card a:not(.btn):not(.nav-link) {
    color: #60a5fa;
}

[data-theme="dark"] .card a:not(.btn):not(.nav-link):hover {
    color: #93c5fd;
}

/* ===== SIDEBAR USER PROFILE ===== */
[data-theme="dark"] .sidebar-user {
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .sidebar-user-name {
    color: #e2e8f0;
}

[data-theme="dark"] .sidebar-role-admin {
    background: rgba(234, 179, 8, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .sidebar-role-user {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .sidebar-collapse-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

[data-theme="dark"] .sidebar-collapse-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

[data-theme="dark"] .sidebar-logout-btn {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

[data-theme="dark"] .sidebar-logout-btn:hover {
    background: #dc2626;
    color: #fff;
}

[data-theme="dark"] .nav-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

[data-theme="dark"] .nav-badge-warning {
    background: rgba(234, 179, 8, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .nav-badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}
