/* ============================================
   JobBridge Shared Styles
   Common styles used across all pages
   ============================================ */

/* CSS Variables - Light Theme (Default) */
:root,
html[data-theme="light"] {
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --bg-tertiary: rgba(0, 0, 0, 0.05);
    --bg-card: #ffffff;
    --bg-input: rgba(0, 0, 0, 0.03);
    --bg-hover: rgba(0, 0, 0, 0.08);
    --border-color: rgba(0, 0, 0, 0.1);
    --border-color-hover: rgba(0, 0, 0, 0.15);
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --text-placeholder: #9ca3af;
    --text-inverse: #ffffff;

    /* Brand Colors */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.1);
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --purple: #60a5fa;
    --purple-light: rgba(59, 130, 246, 0.1);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6, #2563eb);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Header */
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-border: rgba(0, 0, 0, 0.08);

    /* Modal */
    --modal-overlay: rgba(0, 0, 0, 0.5);

    /* Skeleton colors */
    --skeleton-base: #f3f4f6;
    --skeleton-shine: #e5e7eb;
}

/* CSS Variables - Dark Theme */
html[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: rgba(255, 255, 255, 0.05);
    --bg-card: #1e293b;
    --bg-input: rgba(255, 255, 255, 0.05);
    --bg-hover: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-hover: rgba(255, 255, 255, 0.2);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-placeholder: #64748b;
    --text-inverse: #0f172a;

    /* Brand Colors - same in dark mode */
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-light: rgba(59, 130, 246, 0.2);
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.2);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.2);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.2);
    --purple: #60a5fa;
    --purple-light: rgba(59, 130, 246, 0.2);

    /* Shadows - darker in dark mode */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);

    /* Gradients - adjusted for dark mode */
    --gradient-primary: linear-gradient(135deg, #3b82f6, #60a5fa);
    --gradient-hero: linear-gradient(135deg, #1e3a5f 0%, #2d1f4a 100%);

    /* Header */
    --header-bg: rgba(30, 41, 59, 0.95);
    --header-border: rgba(255, 255, 255, 0.08);

    /* Modal */
    --modal-overlay: rgba(0, 0, 0, 0.7);

    /* Skeleton colors */
    --skeleton-base: #1e293b;
    --skeleton-shine: #334155;
}

/* Apply theme colors to body */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}


/* ============================================
   Skeleton Loading Styles
   ============================================ */
@keyframes shimmer {
    0% { background-position: -468px 0; }
    100% { background-position: 468px 0; }
}

.skeleton-text,
.skeleton-icon,
.skeleton-circle,
.skeleton-button,
.skeleton-input,
.skeleton-select,
.skeleton-chart {
    background: linear-gradient(
        90deg,
        var(--skeleton-base) 25%,
        var(--skeleton-shine) 50%,
        var(--skeleton-base) 75%
    );
    background-size: 936px 104px;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

.skeleton-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
}

.skeleton-circle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.skeleton-button {
    width: 100%;
    height: 36px;
    margin-top: 16px;
    border-radius: 6px;
}

.skeleton-input {
    width: 100%;
    height: 44px;
    border-radius: 8px;
}

.skeleton-select {
    width: 100%;
    height: 44px;
    border-radius: 8px;
}

.skeleton-chart {
    border-radius: 8px;
}

/* ============================================
   Common Animations
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   Common Button Styles
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--danger);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

/* ============================================
   Back Button (navigation)
   ============================================ */
.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.back-button:hover {
    background: var(--bg-hover);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
    transform: translateX(-4px);
}

/* ============================================
   Modal Styles
   ============================================ */

/* Independent modal elements - no nesting */
.modal-backdrop-only {
    position: fixed;
    inset: 0;
    background: var(--modal-overlay);
    backdrop-filter: blur(8px);
    z-index: 9998;
    animation: fadeIn 0.2s ease;
}

.modal-dialog-only {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    z-index: 9999;
    animation: modalFadeIn 0.2s ease;
    box-shadow: var(--shadow-lg);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.modal-wrapper {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: var(--modal-overlay);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease;
    z-index: 1;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-overlay);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-dialog {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    animation: slideUp 0.3s ease;
    z-index: 2;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 8px;
}

.modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-close:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.modal-dialog.small {
    max-width: 320px;
}

.modal-dialog.large {
    max-width: 600px;
}

.modal-dialog.full-width {
    max-width: 90%;
    width: 800px;
}

/* ============================================
   Accessibility & Focus Styles
   ============================================ */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skip to main content link (for screen readers) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    z-index: 10000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Form Inputs
   ============================================ */
.form-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--border-color-hover);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-input::placeholder {
    color: var(--text-placeholder);
}

/* ============================================
   Card Styles
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ============================================
   Spinner/Loading
   ============================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.spinner-lg {
    width: 48px;
    height: 48px;
    border-width: 3px;
}

/* ============================================
   Empty State with Illustration
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-illustration {
    width: 200px;
    height: 160px;
    margin: 0 auto 32px;
    position: relative;
}

.empty-state-illustration svg {
    width: 100%;
    height: 100%;
}

.empty-state svg {
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Action Buttons (icon buttons)
   ============================================ */
.action-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* ============================================
   Onboarding Tour Styles
   ============================================ */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

.onboarding-spotlight {
    position: absolute;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    transition: all 0.3s ease;
}

.onboarding-tooltip {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    width: 320px;
    z-index: 10000;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.onboarding-tooltip h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.onboarding-tooltip p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 16px;
    line-height: 1.5;
}

.onboarding-tooltip-arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-right: none;
    border-bottom: none;
    transform: rotate(45deg);
}

.onboarding-progress {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.onboarding-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.2s ease;
}

.onboarding-progress-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

.onboarding-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.onboarding-skip {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.onboarding-skip:hover {
    color: var(--text-primary);
}

.onboarding-next {
    padding: 8px 20px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.onboarding-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ============================================
   Responsive Utilities - Mobile First
   ============================================ */

/* Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
    /* Modal adjustments */
    .modal-dialog {
        width: 95%;
        margin: 16px auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-content {
        padding: 16px;
        border-radius: 12px;
    }

    .modal-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 8px;
    }

    .modal-footer button {
        width: 100%;
    }

    /* Section headers */
    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .section-title {
        font-size: 1.25rem;
    }

    /* Onboarding tooltip */
    .onboarding-tooltip {
        width: calc(100vw - 32px);
        left: 16px !important;
        right: 16px !important;
    }

    /* Cards */
    .card, .stat-card {
        padding: 16px;
        margin-bottom: 12px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        min-width: 100%;
    }

    /* Forms */
    .form-group {
        margin-bottom: 16px;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .form-actions {
        flex-direction: column;
        gap: 8px;
    }

    .form-actions button {
        width: 100%;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 12px;
    }

    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    /* Buttons */
    .btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .btn-group {
        flex-direction: column;
        gap: 8px;
    }

    .btn-group .btn {
        width: 100%;
    }

    /* Navigation/Headers */
    .page-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .nav-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        gap: 4px;
    }

    .nav-tabs .nav-item {
        flex-shrink: 0;
    }

    /* Sidebar */
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .sidebar-overlay.open {
        display: block;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    /* Lists */
    .list-item {
        padding: 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .list-item-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Dashboard specific */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dashboard-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Typography */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Spacing utilities */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .content-wrapper {
        padding: 16px;
    }

    /* Flex utilities */
    .flex-mobile-column {
        flex-direction: column;
    }

    .hidden-mobile {
        display: none !important;
    }

    /* Text utilities */
    .text-truncate-mobile {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Interview history */
    .interview-card {
        flex-direction: column;
        gap: 12px;
    }

    .interview-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Dropdown menus */
    .dropdown-menu {
        position: fixed;
        left: 16px !important;
        right: 16px !important;
        width: auto !important;
        max-height: 70vh;
        overflow-y: auto;
    }

    /* Filter panels */
    .filter-panel {
        flex-direction: column;
        gap: 12px;
    }

    .filter-group {
        width: 100%;
    }

    /* Charts/Analytics */
    .chart-container {
        min-height: 250px;
    }

    /* Admin panel */
    .admin-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-actions {
        flex-direction: column;
        gap: 8px;
    }

    /* Date pickers */
    .date-range-picker {
        flex-direction: column;
        gap: 8px;
    }

    /* Search bars */
    .search-container {
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .pagination-item {
        min-width: 36px;
    }

    /* Toast/Notifications */
    .toast-container {
        left: 16px;
        right: 16px;
        width: auto;
    }

    /* Profile page */
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    /* Settings page */
    .settings-section {
        padding: 16px;
    }

    .settings-row {
        flex-direction: column;
        gap: 12px;
    }
}

/* ============================================
   Tablet Breakpoints
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .stat-card {
        min-width: calc(50% - 12px);
    }

    .modal-dialog {
        width: 80%;
        max-width: 600px;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .stat-card {
        min-width: calc(33.333% - 12px);
    }
}

/* ============================================
   Accessibility - Reduced Motion
   For users who prefer reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .spinner,
    .loading-spinner,
    .pulse,
    .floating {
        animation: none !important;
    }
}

/* ============================================
   Accessibility - High Contrast Mode
   ============================================ */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-primary: #000000;
        --text-secondary: #000000;
        --bg-primary: #ffffff;
        --bg-secondary: #ffffff;
    }

    .btn-primary,
    .primary-action-button {
        border: 2px solid currentColor;
    }

    .form-input:focus {
        outline: 3px solid var(--primary);
        outline-offset: 2px;
    }
}

/* ============================================
   Accessibility - Focus Visible
   Better keyboard navigation indicators
   ============================================ */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Remove default focus outline when using mouse */
:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .app-header,
    .burger-btn,
    .slide-menu,
    .back-btn,
    .theme-toggle,
    .modal-overlay {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .page-content {
        padding: 0 !important;
    }
}

/* ============================================
   Dark Mode Global Overrides
   These override hardcoded colors in components
   ============================================ */

/* Dashboard & Page Containers */
html[data-theme="dark"] .dashboard-container,
html[data-theme="dark"] .page-container,
html[data-theme="dark"] .main-content {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Cards & Sections */
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .quick-action-card,
html[data-theme="dark"] .recent-card,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .goals-card,
html[data-theme="dark"] .achievements-card,
html[data-theme="dark"] .prep-card,
html[data-theme="dark"] .recommendation-card,
html[data-theme="dark"] .interview-card,
html[data-theme="dark"] .history-card,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .card {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Headers & Titles */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .stat-value,
html[data-theme="dark"] .welcome-text h1 {
    color: var(--text-primary);
}

/* Text & Paragraphs */
html[data-theme="dark"] p,
html[data-theme="dark"] .description,
html[data-theme="dark"] .subtitle,
html[data-theme="dark"] .welcome-text p,
html[data-theme="dark"] .card-description,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .meta-info,
html[data-theme="dark"] .company-name,
html[data-theme="dark"] .position-title,
html[data-theme="dark"] .interview-meta {
    color: var(--text-secondary);
}

/* Muted Text */
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .date-text,
html[data-theme="dark"] .time-ago,
html[data-theme="dark"] .secondary-text,
html[data-theme="dark"] .hint-text {
    color: var(--text-muted);
}

/* Forms & Inputs */
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .form-input,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-control {
    background: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: var(--text-placeholder);
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Modals */
html[data-theme="dark"] .modal-dialog,
html[data-theme="dark"] .modal-content {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
    border-color: var(--border-color);
}

html[data-theme="dark"] .modal-header h3,
html[data-theme="dark"] .modal-title {
    color: var(--text-primary);
}

html[data-theme="dark"] .modal-body p {
    color: var(--text-secondary);
}

/* Secondary Buttons */
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .secondary-button {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .secondary-button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Loading Overlay */
html[data-theme="dark"] .loading-overlay {
    background: rgba(15, 23, 42, 0.9);
}

html[data-theme="dark"] .loading-content {
    color: var(--text-primary);
}

html[data-theme="dark"] .loading-content p {
    color: var(--text-secondary);
}

/* Backdrop */
html[data-theme="dark"] .menu-backdrop,
html[data-theme="dark"] .modal-backdrop {
    background: rgba(0, 0, 0, 0.7);
}

/* Tables */
html[data-theme="dark"] table,
html[data-theme="dark"] .data-table {
    background: var(--bg-card);
    color: var(--text-primary);
}

html[data-theme="dark"] th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

html[data-theme="dark"] td {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] tr:hover {
    background: var(--bg-hover);
}

/* Tags & Badges */
html[data-theme="dark"] .tag,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .achievement-badge {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

/* Dividers & Borders */
html[data-theme="dark"] hr,
html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .menu-divider {
    border-color: var(--border-color);
    background-color: var(--border-color);
}

/* Dashboard specific */
html[data-theme="dark"] .dashboard-content {
    background: var(--bg-primary);
}

html[data-theme="dark"] .welcome-section {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .quick-start-tip {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .stats-grid .stat-card {
    background: var(--bg-card);
}

html[data-theme="dark"] .recent-interviews-card,
html[data-theme="dark"] .interview-item {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .interview-item:hover {
    background: var(--bg-hover);
}

/* Form labels */
html[data-theme="dark"] label,
html[data-theme="dark"] .form-label {
    color: var(--text-secondary);
}

/* Icon buttons */
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .action-btn {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-muted);
}

html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Empty states */
html[data-theme="dark"] .empty-state {
    color: var(--text-muted);
}

html[data-theme="dark"] .empty-state h2 {
    color: var(--text-primary);
}

html[data-theme="dark"] .empty-state p {
    color: var(--text-muted);
}

/* Dropdowns */
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .dropdown-content {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .dropdown-item {
    color: var(--text-secondary);
}

html[data-theme="dark"] .dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Tooltips */
html[data-theme="dark"] .tooltip,
html[data-theme="dark"] .tooltip-inner {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* Progress bars background */
html[data-theme="dark"] .progress-bar-bg,
html[data-theme="dark"] .progress-track {
    background: var(--bg-tertiary);
}

/* Interview history */
html[data-theme="dark"] .history-item,
html[data-theme="dark"] .session-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .history-item:hover,
html[data-theme="dark"] .session-card:hover {
    background: var(--bg-hover);
}

/* Analytics charts background */
html[data-theme="dark"] .chart-container,
html[data-theme="dark"] .analytics-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

/* Profile page */
html[data-theme="dark"] .profile-section,
html[data-theme="dark"] .settings-section {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .profile-header {
    background: var(--bg-secondary);
}

/* Tabs */
html[data-theme="dark"] .tab-list,
html[data-theme="dark"] .tabs-container {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .tab-item,
html[data-theme="dark"] .tab-button {
    color: var(--text-muted);
}

html[data-theme="dark"] .tab-item:hover,
html[data-theme="dark"] .tab-button:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

html[data-theme="dark"] .tab-item.active,
html[data-theme="dark"] .tab-button.active {
    color: var(--primary);
    background: var(--primary-light);
}

/* Scrollbars */
html[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-color);
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Dashboard specific dark mode */
html[data-theme="dark"] .dashboard-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .action-card,
html[data-theme="dark"] .recent-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .stat-content h3,
html[data-theme="dark"] .stat-change {
    color: var(--text-muted);
}

html[data-theme="dark"] .stat-value {
    color: var(--text-primary);
}

html[data-theme="dark"] .welcome-text h1 {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

html[data-theme="dark"] .welcome-text p {
    color: var(--text-muted);
}

html[data-theme="dark"] .quick-start-tip {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.15));
    border-color: rgba(59, 130, 246, 0.3);
}

html[data-theme="dark"] .tip-content strong {
    color: var(--text-primary);
}

html[data-theme="dark"] .tip-content span {
    color: var(--text-secondary);
}

html[data-theme="dark"] .user-dropdown {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .user-name {
    color: var(--text-primary);
}

html[data-theme="dark"] .user-email {
    color: var(--text-muted);
}

html[data-theme="dark"] .user-menu-button {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html[data-theme="dark"] .user-menu-button:hover {
    background: var(--bg-hover);
}

html[data-theme="dark"] .action-card h2 {
    color: var(--text-primary);
}

html[data-theme="dark"] .action-card p {
    color: var(--text-secondary);
}

html[data-theme="dark"] .action-button.secondary {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .action-button.secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

html[data-theme="dark"] .recent-header h3,
html[data-theme="dark"] .recent-card h3 {
    color: var(--text-primary);
}

html[data-theme="dark"] .recent-details p,
html[data-theme="dark"] .recent-card p {
    color: var(--text-secondary);
}

html[data-theme="dark"] .view-button {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .view-button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

html[data-theme="dark"] .view-all-button {
    color: var(--text-muted);
}

html[data-theme="dark"] .view-all-button:hover {
    color: var(--primary);
}

html[data-theme="dark"] .section-header h2 {
    color: var(--text-primary);
}

/* Goals & Achievements dark mode */
html[data-theme="dark"] .goals-card,
html[data-theme="dark"] .achievements-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .section-header-inline h2 {
    color: var(--text-primary);
}

html[data-theme="dark"] .add-goal-btn {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .add-goal-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

html[data-theme="dark"] .progress-item .progress-label {
    color: var(--text-muted);
}

html[data-theme="dark"] .progress-item .progress-value {
    color: var(--text-primary);
}

html[data-theme="dark"] .goal-item {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .goal-type {
    color: var(--text-secondary);
}

html[data-theme="dark"] .goal-description {
    color: var(--text-muted);
}

html[data-theme="dark"] .progress-bar {
    background: var(--bg-tertiary);
}

html[data-theme="dark"] .progress-text {
    color: var(--text-muted);
}

html[data-theme="dark"] .empty-goals p,
html[data-theme="dark"] .empty-achievements p {
    color: var(--text-muted);
}

/* Recommendations dark mode */
html[data-theme="dark"] .recommendation-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .rec-content h3 {
    color: var(--text-primary);
}

html[data-theme="dark"] .rec-content p {
    color: var(--text-secondary);
}

/* Active session card */
html[data-theme="dark"] .active-session-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border-color: rgba(16, 185, 129, 0.3);
}

/* Form elements in dark mode */
html[data-theme="dark"] .form-group label {
    color: var(--text-secondary);
}

/* Login/Register pages */
html[data-theme="dark"] .auth-container,
html[data-theme="dark"] .login-container,
html[data-theme="dark"] .register-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .register-card {
    background: transparent;
    border-color: transparent;
}

html[data-theme="dark"] .auth-card h1,
html[data-theme="dark"] .auth-card h2 {
    color: var(--text-primary);
}

html[data-theme="dark"] .auth-card p {
    color: var(--text-secondary);
}

/* Interview setup/history */
html[data-theme="dark"] .setup-container,
html[data-theme="dark"] .history-container,
html[data-theme="dark"] .analytics-container,
html[data-theme="dark"] .profile-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .setup-card,
html[data-theme="dark"] .filter-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .setup-card h2,
html[data-theme="dark"] .filter-card h3 {
    color: var(--text-primary);
}

/* ============================================
   Landing Page Dark Mode
   ============================================ */
html[data-theme="dark"] .landing-page {
    background: var(--bg-primary);
}

html[data-theme="dark"] .hero-section {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

html[data-theme="dark"] .hero-content h1 {
    color: var(--text-primary);
}

html[data-theme="dark"] .hero-content > p {
    color: var(--text-muted);
}

html[data-theme="dark"] .btn-secondary-lg {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .btn-secondary-lg:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

html[data-theme="dark"] .trusted-section {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .trusted-label {
    color: var(--text-muted);
}

html[data-theme="dark"] .company-logo {
    color: var(--text-muted);
}

html[data-theme="dark"] .company-logo:hover {
    color: var(--text-primary);
}

html[data-theme="dark"] .use-cases-section,
html[data-theme="dark"] .features-section,
html[data-theme="dark"] .how-it-works-section,
html[data-theme="dark"] .testimonials-section,
html[data-theme="dark"] .pricing-section,
html[data-theme="dark"] .cta-section {
    background: var(--bg-secondary);
}

html[data-theme="dark"] .section-title h2,
html[data-theme="dark"] .use-cases-section h2,
html[data-theme="dark"] .features-section h2,
html[data-theme="dark"] .how-it-works-section h2,
html[data-theme="dark"] .testimonials-section h2,
html[data-theme="dark"] .pricing-section h2 {
    color: var(--text-primary);
}

html[data-theme="dark"] .section-title p,
html[data-theme="dark"] .use-cases-section p,
html[data-theme="dark"] .features-section p {
    color: var(--text-secondary);
}

html[data-theme="dark"] .use-case-card,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .step-card,
html[data-theme="dark"] .testimonial-card,
html[data-theme="dark"] .pricing-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .use-case-card h3,
html[data-theme="dark"] .feature-card h3,
html[data-theme="dark"] .step-card h3,
html[data-theme="dark"] .testimonial-card h4,
html[data-theme="dark"] .pricing-card h3 {
    color: var(--text-primary);
}

html[data-theme="dark"] .use-case-card p,
html[data-theme="dark"] .feature-card p,
html[data-theme="dark"] .step-card p,
html[data-theme="dark"] .testimonial-card p {
    color: var(--text-secondary);
}

html[data-theme="dark"] .avatar {
    border-color: var(--bg-primary);
}

html[data-theme="dark"] .proof-text {
    color: var(--text-muted);
}

html[data-theme="dark"] .proof-text strong {
    color: var(--text-primary);
}

html[data-theme="dark"] .footer {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .footer-link,
html[data-theme="dark"] .footer-text {
    color: var(--text-muted);
}

html[data-theme="dark"] .footer-link:hover {
    color: var(--text-primary);
}

/* ============================================
   Dashboard Dark Mode Extensions
   ============================================ */
html[data-theme="dark"] .dashboard-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .dashboard-header {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .interview-mode-card,
html[data-theme="dark"] .interview-mode-card.real-interview,
html[data-theme="dark"] .interview-mode-card.mock-interview {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .interview-mode-card h2,
html[data-theme="dark"] .mode-title {
    color: var(--text-primary);
}

html[data-theme="dark"] .mode-description,
html[data-theme="dark"] .interview-mode-card p {
    color: var(--text-secondary);
}

html[data-theme="dark"] .mode-features li,
html[data-theme="dark"] .feature-list li {
    color: var(--text-muted);
}

html[data-theme="dark"] .quick-link-card,
html[data-theme="dark"] .link-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .quick-link-card:hover,
html[data-theme="dark"] .link-card:hover {
    background: var(--bg-hover);
}

html[data-theme="dark"] .quick-link-card h3,
html[data-theme="dark"] .link-card h3 {
    color: var(--text-primary);
}

html[data-theme="dark"] .quick-link-card p,
html[data-theme="dark"] .link-card p {
    color: var(--text-muted);
}

html[data-theme="dark"] .recent-session-item,
html[data-theme="dark"] .session-item {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .recent-session-item:hover,
html[data-theme="dark"] .session-item:hover {
    background: var(--bg-hover);
}

html[data-theme="dark"] .session-type,
html[data-theme="dark"] .session-title {
    color: var(--text-primary);
}

html[data-theme="dark"] .session-meta,
html[data-theme="dark"] .session-date {
    color: var(--text-muted);
}

/* ============================================
   Interview Setup Dark Mode
   ============================================ */
html[data-theme="dark"] .interview-setup-container,
html[data-theme="dark"] .setup-page {
    background: var(--bg-primary);
}

html[data-theme="dark"] .step-card,
html[data-theme="dark"] .setup-step,
html[data-theme="dark"] .option-card,
html[data-theme="dark"] .type-card,
html[data-theme="dark"] .mode-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .step-card:hover,
html[data-theme="dark"] .setup-step:hover,
html[data-theme="dark"] .option-card:hover,
html[data-theme="dark"] .type-card:hover,
html[data-theme="dark"] .mode-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-color-hover);
}

html[data-theme="dark"] .option-card.selected,
html[data-theme="dark"] .type-card.selected,
html[data-theme="dark"] .mode-card.selected {
    background: var(--primary-light);
    border-color: var(--primary);
}

html[data-theme="dark"] .step-title,
html[data-theme="dark"] .option-title,
html[data-theme="dark"] .setup-title {
    color: var(--text-primary);
}

html[data-theme="dark"] .step-description,
html[data-theme="dark"] .option-description {
    color: var(--text-secondary);
}

html[data-theme="dark"] .form-section,
html[data-theme="dark"] .input-group {
    background: transparent;
}

html[data-theme="dark"] .input-label,
html[data-theme="dark"] .form-label {
    color: var(--text-secondary);
}

html[data-theme="dark"] .custom-input,
html[data-theme="dark"] .text-input,
html[data-theme="dark"] .select-input,
html[data-theme="dark"] .textarea-input {
    background: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html[data-theme="dark"] .custom-input:focus,
html[data-theme="dark"] .text-input:focus,
html[data-theme="dark"] .select-input:focus,
html[data-theme="dark"] .textarea-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

html[data-theme="dark"] .custom-input::placeholder,
html[data-theme="dark"] .text-input::placeholder,
html[data-theme="dark"] .textarea-input::placeholder {
    color: var(--text-placeholder);
}

/* ============================================
   Interview History Dark Mode
   ============================================ */
html[data-theme="dark"] .history-page,
html[data-theme="dark"] .interview-history-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .filter-toggle-btn,
html[data-theme="dark"] .filter-button {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .filter-toggle-btn:hover,
html[data-theme="dark"] .filter-button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

html[data-theme="dark"] .filter-panel,
html[data-theme="dark"] .filter-dropdown,
html[data-theme="dark"] .filters-container {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-lg);
}

html[data-theme="dark"] .filter-section h4,
html[data-theme="dark"] .filter-label {
    color: var(--text-secondary);
}

html[data-theme="dark"] .filter-option,
html[data-theme="dark"] .filter-chip {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .filter-option:hover,
html[data-theme="dark"] .filter-chip:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

html[data-theme="dark"] .filter-option.active,
html[data-theme="dark"] .filter-chip.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

html[data-theme="dark"] .history-list,
html[data-theme="dark"] .sessions-list {
    background: transparent;
}

html[data-theme="dark"] .history-item,
html[data-theme="dark"] .history-card,
html[data-theme="dark"] .session-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .history-item:hover,
html[data-theme="dark"] .history-card:hover,
html[data-theme="dark"] .session-card:hover {
    background: var(--bg-hover);
}

html[data-theme="dark"] .history-title,
html[data-theme="dark"] .session-title {
    color: var(--text-primary);
}

html[data-theme="dark"] .history-meta,
html[data-theme="dark"] .session-info {
    color: var(--text-muted);
}

html[data-theme="dark"] .history-score,
html[data-theme="dark"] .score-value {
    color: var(--text-primary);
}

/* ============================================
   Analytics Dark Mode
   ============================================ */
html[data-theme="dark"] .analytics-page,
html[data-theme="dark"] .analytics-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .analytics-header h1,
html[data-theme="dark"] .page-title {
    color: var(--text-primary);
}

html[data-theme="dark"] .analytics-header p,
html[data-theme="dark"] .page-subtitle {
    color: var(--text-secondary);
}

html[data-theme="dark"] .analytics-card,
html[data-theme="dark"] .stats-card,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .chart-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .analytics-card h2,
html[data-theme="dark"] .analytics-card h3,
html[data-theme="dark"] .stats-card h3,
html[data-theme="dark"] .metric-card h3,
html[data-theme="dark"] .chart-card h3 {
    color: var(--text-primary);
}

html[data-theme="dark"] .analytics-card p,
html[data-theme="dark"] .metric-label {
    color: var(--text-secondary);
}

html[data-theme="dark"] .metric-value,
html[data-theme="dark"] .stat-number {
    color: var(--text-primary);
}

html[data-theme="dark"] .metric-change,
html[data-theme="dark"] .stat-change {
    color: var(--text-muted);
}

html[data-theme="dark"] .chart-container {
    background: var(--bg-card);
}

html[data-theme="dark"] .legend-item {
    color: var(--text-secondary);
}

html[data-theme="dark"] .date-range-selector,
html[data-theme="dark"] .period-selector {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .date-range-btn,
html[data-theme="dark"] .period-btn {
    background: transparent;
    color: var(--text-secondary);
}

html[data-theme="dark"] .date-range-btn:hover,
html[data-theme="dark"] .period-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

html[data-theme="dark"] .date-range-btn.active,
html[data-theme="dark"] .period-btn.active {
    background: var(--primary-light);
    color: var(--primary);
}

html[data-theme="dark"] .skill-item,
html[data-theme="dark"] .category-item {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .skill-name,
html[data-theme="dark"] .category-name {
    color: var(--text-secondary);
}

html[data-theme="dark"] .skill-score,
html[data-theme="dark"] .category-score {
    color: var(--text-primary);
}

html[data-theme="dark"] .progress-bg,
html[data-theme="dark"] .progress-track {
    background: var(--bg-tertiary);
}

/* ============================================
   Profile Dark Mode
   ============================================ */
html[data-theme="dark"] .profile-page,
html[data-theme="dark"] .profile-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .profile-header-card,
html[data-theme="dark"] .profile-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .profile-name,
html[data-theme="dark"] .user-display-name {
    color: var(--text-primary);
}

html[data-theme="dark"] .profile-email,
html[data-theme="dark"] .user-email {
    color: var(--text-muted);
}

html[data-theme="dark"] .profile-section,
html[data-theme="dark"] .settings-section,
html[data-theme="dark"] .account-section {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .section-title,
html[data-theme="dark"] .settings-title {
    color: var(--text-primary);
}

html[data-theme="dark"] .section-description,
html[data-theme="dark"] .settings-description {
    color: var(--text-secondary);
}

html[data-theme="dark"] .profile-stat {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}
html[data-theme="dark"] .stat-item {
    background: transparent;
    border: none;
}

html[data-theme="dark"] .profile-stat-value,
html[data-theme="dark"] .stat-value {
    color: var(--text-primary);
}

html[data-theme="dark"] .profile-stat-label,
html[data-theme="dark"] .stat-label {
    color: var(--text-muted);
}

html[data-theme="dark"] .token-balance-card,
html[data-theme="dark"] .balance-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #172554 100%);
    border-color: #1e40af;
}

html[data-theme="dark"] .balance-amount,
html[data-theme="dark"] .token-amount {
    color: #60a5fa;
}

html[data-theme="dark"] .transaction-item,
html[data-theme="dark"] .history-row {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .transaction-item:hover,
html[data-theme="dark"] .history-row:hover {
    background: var(--bg-hover);
}

html[data-theme="dark"] .transaction-description,
html[data-theme="dark"] .transaction-type {
    color: var(--text-secondary);
}

html[data-theme="dark"] .transaction-amount {
    color: var(--text-primary);
}

html[data-theme="dark"] .transaction-date,
html[data-theme="dark"] .transaction-time {
    color: var(--text-muted);
}

/* ============================================
   Common Elements Dark Mode
   ============================================ */
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .content-header {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .page-header h1,
html[data-theme="dark"] .content-header h1 {
    color: var(--text-primary);
}

html[data-theme="dark"] .breadcrumb {
    color: var(--text-muted);
}

html[data-theme="dark"] .breadcrumb a {
    color: var(--text-secondary);
}

html[data-theme="dark"] .breadcrumb a:hover {
    color: var(--primary);
}

html[data-theme="dark"] .pagination-btn,
html[data-theme="dark"] .btn-page {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .pagination-btn:hover,
html[data-theme="dark"] .btn-page:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

html[data-theme="dark"] .pagination-btn.active,
html[data-theme="dark"] .btn-page.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

html[data-theme="dark"] .search-box,
html[data-theme="dark"] .search-input-wrapper {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .search-input {
    background: transparent;
    color: var(--text-primary);
}

html[data-theme="dark"] .search-input::placeholder {
    color: var(--text-placeholder);
}

/* Admin Pages Dark Mode */
html[data-theme="dark"] .admin-container,
html[data-theme="dark"] .admin-page {
    background: var(--bg-primary);
}

html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .admin-section {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .admin-card h2,
html[data-theme="dark"] .admin-card h3,
html[data-theme="dark"] .admin-section h2 {
    color: var(--text-primary);
}

html[data-theme="dark"] .users-table-container,
html[data-theme="dark"] .data-table-container {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .tabs {
    background: var(--bg-secondary);
}

html[data-theme="dark"] .tab-content {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .btn-cancel {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .btn-cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

html[data-theme="dark"] .create-role-section,
html[data-theme="dark"] .roles-section {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .modal,
html[data-theme="dark"] .admin-modal-dialog {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

/* Pricing Page Dark Mode */
html[data-theme="dark"] .pricing-page {
    background: var(--bg-primary);
}

html[data-theme="dark"] .pricing-header h1 {
    color: var(--text-primary);
}

html[data-theme="dark"] .pricing-header p {
    color: var(--text-secondary);
}

html[data-theme="dark"] .package-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .package-card:hover {
    border-color: var(--border-color-hover);
}

html[data-theme="dark"] .package-name {
    color: var(--text-primary);
}

html[data-theme="dark"] .package-price {
    color: var(--text-primary);
}

html[data-theme="dark"] .package-description {
    color: var(--text-secondary);
}

html[data-theme="dark"] .feature-item {
    color: var(--text-secondary);
}

/* TokenBalance Component Dark Mode */
html[data-theme="dark"] .token-balance-wrapper {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .token-balance-wrapper:hover {
    background: var(--bg-hover);
    border-color: var(--border-color-hover);
}

html[data-theme="dark"] .token-amount {
    color: var(--text-primary);
}

html[data-theme="dark"] .token-balance-wrapper.balance-critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

html[data-theme="dark"] .token-balance-wrapper.balance-critical .token-amount {
    color: #f87171;
}

/* ============================================
   Additional Dark Mode Overrides - Pages
   ============================================ */

/* Landing Page */
html[data-theme="dark"] .landing-page {
    background: var(--bg-primary);
}

html[data-theme="dark"] .hero-section {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

html[data-theme="dark"] .hero-content h1 {
    color: var(--text-primary);
}

html[data-theme="dark"] .hero-content > p {
    color: var(--text-muted);
}

html[data-theme="dark"] .btn-secondary-lg {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .btn-secondary-lg:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

html[data-theme="dark"] .trusted-section {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .proof-text strong {
    color: var(--text-primary);
}

html[data-theme="dark"] .use-cases-section,
html[data-theme="dark"] .features-section,
html[data-theme="dark"] .how-it-works-section,
html[data-theme="dark"] .testimonials-section,
html[data-theme="dark"] .cta-section,
html[data-theme="dark"] .faq-section {
    background: var(--bg-secondary);
}

html[data-theme="dark"] .section-header h2,
html[data-theme="dark"] .section-title h2 {
    color: var(--text-primary);
}

html[data-theme="dark"] .section-header p,
html[data-theme="dark"] .section-subtitle {
    color: var(--text-muted);
}

html[data-theme="dark"] .use-case-card,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .step-card,
html[data-theme="dark"] .testimonial-card,
html[data-theme="dark"] .faq-item {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .use-case-card h3,
html[data-theme="dark"] .feature-card h3,
html[data-theme="dark"] .step-card h3 {
    color: var(--text-primary);
}

html[data-theme="dark"] .use-case-card p,
html[data-theme="dark"] .feature-card p,
html[data-theme="dark"] .step-card p {
    color: var(--text-secondary);
}

html[data-theme="dark"] .avatar {
    border-color: var(--bg-secondary);
}

/* Dashboard Page */
html[data-theme="dark"] .dashboard-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .dashboard-header {
    background: var(--bg-secondary);
    border-bottom-color: var(--border-color);
}

html[data-theme="dark"] .interview-mode-card,
html[data-theme="dark"] .interview-mode-card.real-interview,
html[data-theme="dark"] .interview-mode-card.mock-interview {
    background: var(--bg-card);
}

html[data-theme="dark"] .interview-mode-card h2,
html[data-theme="dark"] .mode-title {
    color: var(--text-primary);
}

html[data-theme="dark"] .interview-mode-card p,
html[data-theme="dark"] .mode-description {
    color: var(--text-secondary);
}

html[data-theme="dark"] .feature-item {
    color: var(--text-muted);
}

html[data-theme="dark"] .recent-sessions-section h2,
html[data-theme="dark"] .section-header-inline h2 {
    color: var(--text-primary);
}

html[data-theme="dark"] .session-item,
html[data-theme="dark"] .recent-item {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .session-item:hover,
html[data-theme="dark"] .recent-item:hover {
    background: var(--bg-hover);
}

html[data-theme="dark"] .session-company,
html[data-theme="dark"] .company-text {
    color: var(--text-primary);
}

html[data-theme="dark"] .session-date,
html[data-theme="dark"] .session-meta {
    color: var(--text-muted);
}

/* Interview Setup Page */
html[data-theme="dark"] .interview-setup-container,
html[data-theme="dark"] .setup-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .setup-step,
html[data-theme="dark"] .setup-card,
html[data-theme="dark"] .step-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .step-title,
html[data-theme="dark"] .setup-title {
    color: var(--text-primary);
}

html[data-theme="dark"] .step-description {
    color: var(--text-secondary);
}

html[data-theme="dark"] .option-card,
html[data-theme="dark"] .mode-option,
html[data-theme="dark"] .duration-option {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .option-card:hover,
html[data-theme="dark"] .mode-option:hover,
html[data-theme="dark"] .duration-option:hover {
    background: var(--bg-hover);
    border-color: var(--border-color-hover);
}

html[data-theme="dark"] .option-card.selected,
html[data-theme="dark"] .mode-option.selected,
html[data-theme="dark"] .duration-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

html[data-theme="dark"] .option-title {
    color: var(--text-primary);
}

html[data-theme="dark"] .option-description {
    color: var(--text-secondary);
}

/* Interview History Page */
html[data-theme="dark"] .history-container,
html[data-theme="dark"] .interview-history-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .filter-toggle-btn,
html[data-theme="dark"] .filter-btn {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .filter-toggle-btn:hover,
html[data-theme="dark"] .filter-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

html[data-theme="dark"] .filter-panel,
html[data-theme="dark"] .filters-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .filter-panel h3,
html[data-theme="dark"] .filter-section-title {
    color: var(--text-primary);
}

html[data-theme="dark"] .filter-group label {
    color: var(--text-secondary);
}

html[data-theme="dark"] .history-item,
html[data-theme="dark"] .interview-row {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .history-item:hover,
html[data-theme="dark"] .interview-row:hover {
    background: var(--bg-hover);
}

html[data-theme="dark"] .history-title {
    color: var(--text-primary);
}

html[data-theme="dark"] .history-meta {
    color: var(--text-muted);
}

html[data-theme="dark"] .pagination-btn {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .pagination-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Analytics Page */
html[data-theme="dark"] .analytics-container,
html[data-theme="dark"] .analytics-page {
    background: var(--bg-primary);
}

html[data-theme="dark"] .analytics-header h1 {
    color: var(--text-primary);
}

html[data-theme="dark"] .analytics-card,
html[data-theme="dark"] .chart-card,
html[data-theme="dark"] .metric-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .chart-card h3,
html[data-theme="dark"] .metric-title {
    color: var(--text-primary);
}

html[data-theme="dark"] .chart-legend-item,
html[data-theme="dark"] .metric-value {
    color: var(--text-primary);
}

html[data-theme="dark"] .metric-change {
    color: var(--text-muted);
}

html[data-theme="dark"] .overview-stat,
html[data-theme="dark"] .stat-box {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .stat-number {
    color: var(--text-primary);
}

html[data-theme="dark"] .stat-label {
    color: var(--text-muted);
}

html[data-theme="dark"] .topic-item,
html[data-theme="dark"] .skill-item {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .topic-name,
html[data-theme="dark"] .skill-name {
    color: var(--text-primary);
}

html[data-theme="dark"] .progress-track {
    background: var(--bg-tertiary);
}

/* Profile Page */
html[data-theme="dark"] .profile-container,
html[data-theme="dark"] .profile-page {
    background: var(--bg-primary);
}

html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .profile-section {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .profile-name {
    color: var(--text-primary);
}

html[data-theme="dark"] .profile-email {
    color: var(--text-muted);
}

html[data-theme="dark"] .profile-stats h3 {
    color: var(--text-primary);
}

html[data-theme="dark"] .profile-stats p {
    color: var(--text-muted);
}

html[data-theme="dark"] .settings-section,
html[data-theme="dark"] .settings-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .settings-section h3 {
    color: var(--text-primary);
}

html[data-theme="dark"] .setting-item {
    border-color: var(--border-color);
}

html[data-theme="dark"] .setting-label {
    color: var(--text-secondary);
}

html[data-theme="dark"] .setting-description {
    color: var(--text-muted);
}

html[data-theme="dark"] .token-card,
html[data-theme="dark"] .balance-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .token-balance-value {
    color: var(--text-primary);
}
html[data-theme="dark"] .balance-amount {
    color: #3b82f6;
    -webkit-text-fill-color: #3b82f6;
}

html[data-theme="dark"] .token-package,
html[data-theme="dark"] .package-card {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .token-package:hover,
html[data-theme="dark"] .package-card:hover {
    background: var(--bg-hover);
}

html[data-theme="dark"] .package-name {
    color: var(--text-primary);
}

html[data-theme="dark"] .package-price {
    color: var(--text-primary);
}

html[data-theme="dark"] .package-tokens {
    color: var(--text-muted);
}

html[data-theme="dark"] .transaction-item,
html[data-theme="dark"] .history-row {
    border-color: var(--border-color);
}

html[data-theme="dark"] .transaction-description {
    color: var(--text-primary);
}

html[data-theme="dark"] .transaction-date {
    color: var(--text-muted);
}

/* Interview Statistics - Profile */
html[data-theme="dark"] .interview-statistics,
html[data-theme="dark"] .statistics-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .interview-statistics h3 {
    color: var(--text-primary);
}

html[data-theme="dark"] .statistics-value,
html[data-theme="dark"] .stat-big-number {
    color: var(--text-primary);
}

/* Mock Interview Page */
html[data-theme="dark"] .mock-interview-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .mock-card,
html[data-theme="dark"] .question-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .question-text {
    color: var(--text-primary);
}

html[data-theme="dark"] .answer-input,
html[data-theme="dark"] .response-textarea {
    background: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Screen Share / Form Page */
html[data-theme="dark"] .screen-share-container,
html[data-theme="dark"] .form-page-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .chat-panel,
html[data-theme="dark"] .ai-panel {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .chat-message {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

html[data-theme="dark"] .ai-response {
    background: var(--bg-card);
    border-color: var(--border-color);
}

/* About / Pricing Pages */
html[data-theme="dark"] .about-page,
html[data-theme="dark"] .pricing-page {
    background: var(--bg-primary);
}

html[data-theme="dark"] .about-card,
html[data-theme="dark"] .pricing-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .pricing-card h3 {
    color: var(--text-primary);
}

html[data-theme="dark"] .pricing-card .price {
    color: var(--text-primary);
}

html[data-theme="dark"] .pricing-feature {
    color: var(--text-secondary);
}

/* Admin Pages */
html[data-theme="dark"] .admin-container,
html[data-theme="dark"] .admin-page {
    background: var(--bg-primary);
}

html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .admin-section {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .admin-table {
    background: var(--bg-card);
}

html[data-theme="dark"] .admin-table th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .admin-table td {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .admin-table tr:hover {
    background: var(--bg-hover);
}

html[data-theme="dark"] .search-box {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .search-box input {
    background: transparent;
    color: var(--text-primary);
}

html[data-theme="dark"] .tabs {
    background: var(--bg-secondary);
}

html[data-theme="dark"] .tab-content {
    background: var(--bg-card);
}

html[data-theme="dark"] .btn-page,
html[data-theme="dark"] .btn-cancel {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] .btn-page:hover,
html[data-theme="dark"] .btn-cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

html[data-theme="dark"] .admin-modal .modal,
html[data-theme="dark"] .admin-modal-dialog {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .create-role-section,
html[data-theme="dark"] .roles-section {
    background: var(--bg-card);
}

html[data-theme="dark"] .users-table-container {
    background: var(--bg-card);
}

html[data-theme="dark"] .filter-row select {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Company Research / Career Coach */
html[data-theme="dark"] .company-research-container,
html[data-theme="dark"] .career-coach-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .research-card,
html[data-theme="dark"] .coach-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .research-card h3,
html[data-theme="dark"] .coach-card h3 {
    color: var(--text-primary);
}

/* Calendar Sync / Export Progress */
html[data-theme="dark"] .calendar-sync-container,
html[data-theme="dark"] .export-container {
    background: var(--bg-primary);
}

html[data-theme="dark"] .calendar-card,
html[data-theme="dark"] .export-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

/* Shared components */
html[data-theme="dark"] .page-header h1 {
    color: var(--text-primary);
}

html[data-theme="dark"] .page-description {
    color: var(--text-muted);
}

html[data-theme="dark"] .breadcrumb {
    color: var(--text-muted);
}

html[data-theme="dark"] .breadcrumb a {
    color: var(--text-secondary);
}

html[data-theme="dark"] .breadcrumb a:hover {
    color: var(--primary);
}

/* TokenBalance component in dark mode */
html[data-theme="dark"] .token-balance-wrapper {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .token-balance-wrapper:hover {
    background: var(--bg-hover);
    border-color: var(--border-color-hover);
}

html[data-theme="dark"] .token-amount {
    color: var(--text-primary);
}

html[data-theme="dark"] .token-balance-wrapper.balance-critical {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.3);
}

/* Global text fixes for dark mode */
html[data-theme="dark"] strong,
html[data-theme="dark"] b {
    color: var(--text-primary);
}

html[data-theme="dark"] .text-black,
html[data-theme="dark"] .text-gray-900 {
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .text-gray-700,
html[data-theme="dark"] .text-gray-800 {
    color: var(--text-secondary) !important;
}

html[data-theme="dark"] .text-gray-500,
html[data-theme="dark"] .text-gray-600 {
    color: var(--text-muted) !important;
}

/* Ensure all white backgrounds adapt */
html[data-theme="dark"] [style*="background: #ffffff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background:white"] {
    background: var(--bg-card) !important;
}

/* Fix number colors in statistics */
html[data-theme="dark"] .number,
html[data-theme="dark"] .count,
html[data-theme="dark"] .total {
    color: var(--text-primary);
}
