/* ==========================================================================
   TalentPanda — Cinematic UI & Universal Theming Engine
   Production-grade animations, micro-interactions, and contrast system.
   ========================================================================== */

/* ==========================================================================
   1. THEME TOGGLE BUTTON COMPONENT
   ========================================================================== */

.tp-theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: var(--nc-text-primary, #0F172A);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
    padding: 0;
    flex-shrink: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.tp-theme-toggle-btn:hover {
    transform: scale(1.08) rotate(12deg);
    background: rgba(72, 35, 92, 0.1);
    border-color: rgba(72, 35, 92, 0.3);
    color: var(--nc-primary, #48235C);
    box-shadow: 0 4px 14px rgba(72, 35, 92, 0.2);
}

.tp-theme-toggle-btn:active,
.tp-theme-toggle-btn.tp-theme-btn-active {
    transform: scale(0.9) !important;
}

.tp-theme-icon-sun,
.tp-theme-icon-moon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    position: absolute;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Light mode: Show moon, hide sun */
:root[data-theme="light"] .tp-theme-icon-sun,
:root:not([data-theme="dark"]) .tp-theme-icon-sun {
    opacity: 0;
    transform: translateY(22px) rotate(-90deg) scale(0.4);
    pointer-events: none;
}

:root[data-theme="light"] .tp-theme-icon-moon,
:root:not([data-theme="dark"]) .tp-theme-icon-moon {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
    color: #6B3A85;
}

/* Dark mode: Show glowing sun, hide moon */
:root[data-theme="dark"] .tp-theme-toggle-btn,
[data-bs-theme="dark"] .tp-theme-toggle-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: #F8FAFC;
}

:root[data-theme="dark"] .tp-theme-toggle-btn:hover,
[data-bs-theme="dark"] .tp-theme-toggle-btn:hover {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.4);
    color: #F59E0B;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

:root[data-theme="dark"] .tp-theme-icon-moon,
[data-bs-theme="dark"] .tp-theme-icon-moon {
    opacity: 0;
    transform: translateY(-22px) rotate(90deg) scale(0.4);
    pointer-events: none;
}

:root[data-theme="dark"] .tp-theme-icon-sun,
[data-bs-theme="dark"] .tp-theme-icon-sun {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
    color: #F59E0B;
}

/* ==========================================================================
   2. NAVBAR DROPDOWN & BUTTON CONTRAST FIXES
   ========================================================================== */

.tp-dropdown-title {
    color: var(--nc-heading, #0F172A);
    transition: color 0.15s ease;
}

:root[data-theme="dark"] .tp-dropdown-title,
[data-bs-theme="dark"] .tp-dropdown-title {
    color: #F8FAFC !important;
}

.tp-btn-get-started {
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.tp-circle-arrow {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    transition: transform 0.2s ease, background 0.2s ease;
    background: #FFFFFF;
    color: #0F172A;
}

/* Dark mode Get Started button stands out with high contrast */
:root[data-theme="dark"] .tp-btn-get-started,
[data-bs-theme="dark"] .tp-btn-get-started {
    background: linear-gradient(135deg, #2E1540, #48235C) !important;
    border: 1px solid #6B3A85 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(72, 35, 92, 0.35) !important;
}

:root[data-theme="dark"] .tp-btn-get-started:hover,
[data-bs-theme="dark"] .tp-btn-get-started:hover {
    background: linear-gradient(135deg, #48235C, #6B3A85) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 35, 92, 0.5) !important;
}

:root[data-theme="dark"] .tp-btn-get-started .tp-circle-arrow,
[data-bs-theme="dark"] .tp-btn-get-started .tp-circle-arrow {
    background: #FFFFFF;
    color: #2E1540;
}

.tp-btn-get-started:hover .tp-circle-arrow {
    transform: translate(2px, -2px);
}

/* ==========================================================================
   3. CINEMATIC SCROLL REVEALS & MOTION KEYFRAMES
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* Subtle floating animation */
.tp-float {
    animation: tpFloat 4s ease-in-out infinite;
}

@keyframes tpFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-7px);
    }
}

/* Subtle glow pulse */
.tp-pulse-glow {
    animation: tpPulseGlow 3s ease-in-out infinite;
}

@keyframes tpPulseGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(72, 35, 92, 0.2);
    }
    50% {
        box-shadow: 0 0 28px rgba(72, 35, 92, 0.45);
    }
}

/* Shimmer effect for badges and highlights */
.tp-shimmer-badge {
    position: relative;
    overflow: hidden;
}

.tp-shimmer-badge::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-20deg);
    animation: tpShimmerSweep 4s infinite ease-in-out;
}

@keyframes tpShimmerSweep {
    0% { left: -100%; }
    30%, 100% { left: 200%; }
}

/* ==========================================================================
   4. INTERACTIVE CARD ELEVATION & HOVER DYNAMICS
   ========================================================================== */

.tp-hover-card {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease !important;
}

.tp-hover-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(72, 35, 92, 0.18) !important;
}

:root[data-theme="dark"] .tp-hover-card:hover,
[data-bs-theme="dark"] .tp-hover-card:hover {
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(107, 58, 133, 0.35) !important;
    border-color: rgba(107, 58, 133, 0.4) !important;
}

/* Card titles and body text in dark mode */
:root[data-theme="dark"] .card-title,
[data-bs-theme="dark"] .card-title {
    color: #FFFFFF !important;
}

:root[data-theme="dark"] .card-text,
[data-bs-theme="dark"] .card-text {
    color: #CBD5E1 !important;
}

/* ==========================================================================
   5. COMPREHENSIVE BUTTON VISIBILITY ENGINE (DARK & LIGHT)
   Guarantees zero invisible text on every button style in both modes
   ========================================================================== */

/* Universal button transition */
.btn {
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    letter-spacing: -0.01em;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0) !important;
}

/* Dark Mode Specific Overrides */
:root[data-theme="dark"],
[data-bs-theme="dark"] {
    /* Primary buttons */
    --bs-primary: #6B3A85;
    --bs-primary-rgb: 59, 130, 246;

    /* Secondary outline buttons — eliminates white-on-white bug */
    .btn-outline-secondary {
        background-color: #172338 !important;
        color: #F1F5F9 !important;
        border-color: #2D4160 !important;
    }

    .btn-outline-secondary:hover,
    .btn-outline-secondary:focus {
        background-color: #223452 !important;
        color: #FFFFFF !important;
        border-color: #4B6B99 !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
    }

    /* Light buttons */
    .btn-light {
        background-color: #1A263D !important;
        border-color: #2D4160 !important;
        color: #F8FAFC !important;
    }

    .btn-light:hover,
    .btn-light:focus {
        background-color: #273A5C !important;
        border-color: #6B3A85 !important;
        color: #FFFFFF !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
    }

    /* Outline light buttons */
    .btn-outline-light {
        color: #F8FAFC !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
    }

    .btn-outline-light:hover {
        background-color: rgba(255, 255, 255, 0.15) !important;
        color: #FFFFFF !important;
        border-color: #FFFFFF !important;
    }

    /* Secondary solid buttons */
    .btn-secondary {
        background-color: #27374D !important;
        border-color: #384F6E !important;
        color: #F8FAFC !important;
    }

    .btn-secondary:hover {
        background-color: #334666 !important;
        border-color: #4B6B99 !important;
        color: #FFFFFF !important;
    }

    /* Primary buttons contrast glow */
    .btn-primary {
        background-color: #48235C !important;
        border-color: #48235C !important;
        color: #FFFFFF !important;
        box-shadow: 0 4px 14px rgba(72, 35, 92, 0.35) !important;
    }

    .btn-primary:hover {
        background-color: #3A1C4A !important;
        border-color: #3A1C4A !important;
        color: #FFFFFF !important;
        box-shadow: 0 6px 18px rgba(72, 35, 92, 0.5) !important;
    }

    /* Primary outline buttons */
    .btn-outline-primary {
        color: #B48FD0 !important;
        border-color: #6B3A85 !important;
        background-color: transparent !important;
    }

    .btn-outline-primary:hover {
        background-color: #48235C !important;
        border-color: #48235C !important;
        color: #FFFFFF !important;
        box-shadow: 0 4px 14px rgba(72, 35, 92, 0.35) !important;
    }

    /* Pagination buttons in dark theme */
    .page-link {
        background-color: #111C30 !important;
        border-color: #3A2A48 !important;
        color: #D9C6E6 !important;
    }

    .page-link:hover {
        background-color: #1A2A47 !important;
        border-color: #6B3A85 !important;
        color: #FFFFFF !important;
    }

    .page-item.active .page-link {
        background-color: #48235C !important;
        border-color: #48235C !important;
        color: #FFFFFF !important;
    }

    .page-item.disabled .page-link {
        background-color: #0A111F !important;
        border-color: #2E2040 !important;
        color: #475569 !important;
    }
}

/* ==========================================================================
   6. CINEMATIC GLASSMORPHISM & CONTAINER ALIGNMENT
   ========================================================================== */

.tp-glass-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

:root[data-theme="dark"] .tp-glass-panel,
[data-bs-theme="dark"] .tp-glass-panel {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   7. JOB & COMPANY CARDS DARK THEME ADAPTATION
   ========================================================================== */

:root[data-theme="dark"] .nc-job-card,
[data-bs-theme="dark"] .nc-job-card,
:root[data-theme="dark"] .nc-company-card,
[data-bs-theme="dark"] .nc-company-card {
    background: #0F172A !important;
    border-color: #3A2A48 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

:root[data-theme="dark"] .nc-job-card:hover,
[data-bs-theme="dark"] .nc-job-card:hover,
:root[data-theme="dark"] .nc-company-card:hover,
[data-bs-theme="dark"] .nc-company-card:hover {
    border-color: #6B3A85 !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(107, 58, 133, 0.35) !important;
    transform: translateY(-4px) !important;
}

:root[data-theme="dark"] .nc-job-title a,
[data-bs-theme="dark"] .nc-job-title a,
:root[data-theme="dark"] .nc-company-name,
[data-bs-theme="dark"] .nc-company-name {
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .nc-job-company-name,
[data-bs-theme="dark"] .nc-job-company-name,
:root[data-theme="dark"] .nc-job-meta,
[data-bs-theme="dark"] .nc-job-meta,
:root[data-theme="dark"] .nc-company-industry,
[data-bs-theme="dark"] .nc-company-industry,
:root[data-theme="dark"] .nc-company-location,
[data-bs-theme="dark"] .nc-company-location {
    color: #94A3B8 !important;
}

:root[data-theme="dark"] .nc-job-company-logo,
[data-bs-theme="dark"] .nc-job-company-logo,
:root[data-theme="dark"] .nc-company-logo,
[data-bs-theme="dark"] .nc-company-logo {
    background: #172338 !important;
    border-color: #2D4160 !important;
    color: #B48FD0 !important;
}

:root[data-theme="dark"] .nc-job-pill,
[data-bs-theme="dark"] .nc-job-pill,
:root[data-theme="dark"] .nc-company-meta-item,
[data-bs-theme="dark"] .nc-company-meta-item {
    background: #172338 !important;
    color: #CBD5E1 !important;
    border-color: #3A2A48 !important;
}

/* ==========================================================================
   8. JOB & COMPANY DETAIL PAGES DARK THEME ADAPTATION
   ========================================================================== */

:root[data-theme="dark"] .nc-job-main-card,
[data-bs-theme="dark"] .nc-job-main-card,
:root[data-theme="dark"] .nc-job-sidebar-card,
[data-bs-theme="dark"] .nc-job-sidebar-card,
:root[data-theme="dark"] .nc-company-hero,
[data-bs-theme="dark"] .nc-company-hero {
    background: #0F172A !important;
    border-color: #3A2A48 !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45) !important;
}

:root[data-theme="dark"] .nc-job-header,
[data-bs-theme="dark"] .nc-job-header {
    background: linear-gradient(135deg, #231630 0%, #281A35 100%) !important;
    border-bottom-color: #3A2A48 !important;
}

:root[data-theme="dark"] .nc-job-title,
[data-bs-theme="dark"] .nc-job-title,
:root[data-theme="dark"] .nc-action-heading,
[data-bs-theme="dark"] .nc-action-heading,
:root[data-theme="dark"] .nc-job-section-title,
[data-bs-theme="dark"] .nc-job-section-title {
    color: #FFFFFF !important;
}

:root[data-theme="dark"] .nc-job-description,
[data-bs-theme="dark"] .nc-job-description,
:root[data-theme="dark"] .nc-action-help,
[data-bs-theme="dark"] .nc-action-help,
:root[data-theme="dark"] .nc-company-overview,
[data-bs-theme="dark"] .nc-company-overview {
    color: #CBD5E1 !important;
}

:root[data-theme="dark"] .nc-job-meta-item,
[data-bs-theme="dark"] .nc-job-meta-item,
:root[data-theme="dark"] .nc-owner-note,
[data-bs-theme="dark"] .nc-owner-note {
    background: #172338 !important;
    border-color: #2D4160 !important;
    color: #CBD5E1 !important;
}

:root[data-theme="dark"] .nc-skill-badge,
[data-bs-theme="dark"] .nc-skill-badge {
    background: rgba(107, 58, 133, 0.16) !important;
    border-color: rgba(107, 58, 133, 0.3) !important;
    color: #D9C6E6 !important;
}

:root[data-theme="dark"] .nc-company-card-title,
[data-bs-theme="dark"] .nc-company-card-title {
    color: #FFFFFF !important;
}

:root[data-theme="dark"] .nc-company-description,
[data-bs-theme="dark"] .nc-company-description {
    color: #CBD5E1 !important;
}

:root[data-theme="dark"] .nc-company-link,
[data-bs-theme="dark"] .nc-company-link {
    color: #B48FD0 !important;
}

/* ==========================================================================
   9. DASHBOARDS DARK THEME ADAPTATION
   ========================================================================== */

:root[data-theme="dark"] .nc-stat-card,
[data-bs-theme="dark"] .nc-stat-card,
:root[data-theme="dark"] .nc-dashboard-card,
[data-bs-theme="dark"] .nc-dashboard-card {
    background: #0F172A !important;
    border-color: #3A2A48 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

:root[data-theme="dark"] .nc-stat-value,
[data-bs-theme="dark"] .nc-stat-value,
:root[data-theme="dark"] .nc-card-title,
[data-bs-theme="dark"] .nc-card-title,
:root[data-theme="dark"] .nc-dashboard-welcome h2,
[data-bs-theme="dark"] .nc-dashboard-welcome h2 {
    color: #FFFFFF !important;
}

:root[data-theme="dark"] .nc-stat-label,
[data-bs-theme="dark"] .nc-stat-label {
    color: #94A3B8 !important;
}

/* Review Cards / Company Empty States Dark Mode Contrast */
:root[data-theme="dark"] .nc-company-empty,
[data-bs-theme="dark"] .nc-company-empty {
    background: #0F172A !important;
    border-color: #3A2A48 !important;
    color: #CBD5E1 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
}

:root[data-theme="dark"] .nc-company-empty p,
[data-bs-theme="dark"] .nc-company-empty p {
    color: #CBD5E1 !important;
}

:root[data-theme="dark"] .nc-company-empty .text-muted,
[data-bs-theme="dark"] .nc-company-empty .text-muted {
    color: #94A3B8 !important;
}

/* Navbar Dark Theme Text & Button Visibility */
:root[data-theme="dark"] .app-navbar .user-name,
[data-bs-theme="dark"] .app-navbar .user-name {
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .app-navbar .nav-link,
[data-bs-theme="dark"] .app-navbar .nav-link,
:root[data-theme="dark"] .app-navbar .nc-mega-trigger,
[data-bs-theme="dark"] .app-navbar .nc-mega-trigger,
:root[data-theme="dark"] .app-navbar .login-link,
[data-bs-theme="dark"] .app-navbar .login-link {
    color: #E2E8F0 !important;
}

:root[data-theme="dark"] .app-navbar .nav-link:hover,
[data-bs-theme="dark"] .app-navbar .nav-link:hover,
:root[data-theme="dark"] .app-navbar .nc-mega-trigger:hover,
[data-bs-theme="dark"] .app-navbar .nc-mega-trigger:hover,
:root[data-theme="dark"] .app-navbar .login-link:hover,
[data-bs-theme="dark"] .app-navbar .login-link:hover {
    color: #B48FD0 !important;
    background-color: rgba(107, 58, 133, 0.15) !important;
}

:root[data-theme="dark"] .app-navbar .user-nav-link:hover,
[data-bs-theme="dark"] .app-navbar .user-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* General Button Contrast in Dark Mode (No Invisible Text before Hover) */
:root[data-theme="dark"] .btn-outline-secondary,
[data-bs-theme="dark"] .btn-outline-secondary {
    color: #CBD5E1 !important;
    border-color: #334155 !important;
    background: transparent !important;
}

:root[data-theme="dark"] .btn-outline-secondary:hover,
[data-bs-theme="dark"] .btn-outline-secondary:hover {
    color: #FFFFFF !important;
    background: #334155 !important;
    border-color: #64748B !important;
}

:root[data-theme="dark"] .btn-light,
[data-bs-theme="dark"] .btn-light {
    background: #1E293B !important;
    border-color: #334155 !important;
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .btn-light:hover,
[data-bs-theme="dark"] .btn-light:hover {
    background: #334155 !important;
    color: #FFFFFF !important;
}

/* Profile Drawer (Sider) Cinematic & Dual-Theme Consistency */
.nc-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
}
.nc-drawer-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nc-profile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 410px;
    max-width: 100%;
    z-index: 1061;
    padding: 26px 22px;
    transform: translate3d(100%, 0, 0);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.38s ease;
    overflow-y: auto;
    will-change: transform;
}
.nc-profile-drawer.show {
    transform: translate3d(0, 0, 0);
}

:root[data-theme="dark"] .nc-profile-drawer,
[data-bs-theme="dark"] .nc-profile-drawer {
    background: #0F172A !important;
    border-left-color: #1E293B !important;
    box-shadow: -14px 0 45px rgba(0, 0, 0, 0.75) !important;
}

:root[data-theme="dark"] .nc-drawer-name,
[data-bs-theme="dark"] .nc-drawer-name,
:root[data-theme="dark"] .nc-drawer-section-title,
[data-bs-theme="dark"] .nc-drawer-section-title {
    color: #FFFFFF !important;
}

:root[data-theme="dark"] .nc-drawer-title,
[data-bs-theme="dark"] .nc-drawer-title,
:root[data-theme="dark"] .nc-drawer-section-sub,
[data-bs-theme="dark"] .nc-drawer-section-sub {
    color: #94A3B8 !important;
}

:root[data-theme="dark"] .nc-drawer-perf-card,
[data-bs-theme="dark"] .nc-drawer-perf-card {
    background: #172338 !important;
    border-color: #263852 !important;
}
:root[data-theme="dark"] .nc-drawer-perf-card:hover,
[data-bs-theme="dark"] .nc-drawer-perf-card:hover {
    background: #1E2D47 !important;
    border-color: #6B3A85 !important;
}

:root[data-theme="dark"] .nc-drawer-perf-value,
[data-bs-theme="dark"] .nc-drawer-perf-value {
    color: #B48FD0 !important;
}

:root[data-theme="dark"] .nc-drawer-perf-label,
[data-bs-theme="dark"] .nc-drawer-perf-label {
    color: #94A3B8 !important;
}

:root[data-theme="dark"] .nc-drawer-nav a,
[data-bs-theme="dark"] .nc-drawer-nav a {
    color: #CBD5E1 !important;
}
:root[data-theme="dark"] .nc-drawer-nav a i,
[data-bs-theme="dark"] .nc-drawer-nav a i {
    color: #B48FD0 !important;
}
:root[data-theme="dark"] .nc-drawer-nav a:hover,
[data-bs-theme="dark"] .nc-drawer-nav a:hover {
    background: rgba(72, 35, 92, 0.18) !important;
    color: #D9C6E6 !important;
}

/* ==========================================================================
   UNIVERSAL DARK MODE CARD & CONTAINER GUARDS
   Prevents any card, modal, or dropdown from rendering bright white in dark mode
   ========================================================================== */
:root[data-theme="dark"] .card,
[data-bs-theme="dark"] .card,
:root[data-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-white,
:root[data-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-light,
:root[data-theme="dark"] .modal-content,
[data-bs-theme="dark"] .modal-content,
:root[data-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .dropdown-menu,
:root[data-theme="dark"] .list-group-item,
[data-bs-theme="dark"] .list-group-item,
:root[data-theme="dark"] .job-card,
[data-bs-theme="dark"] .job-card,
:root[data-theme="dark"] .company-card,
[data-bs-theme="dark"] .company-card,
:root[data-theme="dark"] .candidate-card,
[data-bs-theme="dark"] .candidate-card,
:root[data-theme="dark"] .dashboard-card,
[data-bs-theme="dark"] .dashboard-card,
:root[data-theme="dark"] .nc-card,
[data-bs-theme="dark"] .nc-card,
:root[data-theme="dark"] .record-card,
[data-bs-theme="dark"] .record-card,
:root[data-theme="dark"] .form-card,
[data-bs-theme="dark"] .form-card,
:root[data-theme="dark"] .nc-app-card,
[data-bs-theme="dark"] .nc-app-card,
:root[data-theme="dark"] .nc-candidate-row,
[data-bs-theme="dark"] .nc-candidate-row,
:root[data-theme="dark"] .nc-candidate-card,
[data-bs-theme="dark"] .nc-candidate-card,
:root[data-theme="dark"] .kanban-card,
[data-bs-theme="dark"] .kanban-card,
:root[data-theme="dark"] .dropzone,
[data-bs-theme="dark"] .dropzone,
:root[data-theme="dark"] .accordion-item,
[data-bs-theme="dark"] .accordion-item,
:root[data-theme="dark"] .accordion-button,
[data-bs-theme="dark"] .accordion-button {
    background-color: #0F172A !important;
    border-color: #3A2A48 !important;
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .kanban-column,
[data-bs-theme="dark"] .kanban-column,
:root[data-theme="dark"] .kanban-col,
[data-bs-theme="dark"] .kanban-col {
    background-color: #1E1328 !important;
    border-color: #1E2D4A !important;
}

:root[data-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-header,
:root[data-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-header,
:root[data-theme="dark"] .card-footer,
[data-bs-theme="dark"] .card-footer,
:root[data-theme="dark"] .modal-footer,
[data-bs-theme="dark"] .modal-footer,
:root[data-theme="dark"] .accordion-button:not(.collapsed),
[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: #172338 !important;
    border-color: #3A2A48 !important;
    color: #FFFFFF !important;
}

:root[data-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select,
[data-bs-theme="dark"] .form-select {
    background-color: #1E1328 !important;
    border-color: #2D4160 !important;
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-control:focus,
:root[data-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #0F172A !important;
    border-color: #C7A684 !important;
    box-shadow: 0 0 0 3px rgba(170, 137, 106, 0.2) !important;
    color: #FFFFFF !important;
}

:root[data-theme="dark"] .table,
[data-bs-theme="dark"] .table {
    color: #CBD5E1 !important;
    border-color: #1E293B !important;
}

:root[data-theme="dark"] .table thead th,
[data-bs-theme="dark"] .table thead th {
    background-color: #231630 !important;
    color: #94A3B8 !important;
    border-color: #1E293B !important;
}

:root[data-theme="dark"] .table > :not(caption) > * > *,
[data-bs-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent !important;
    border-color: #1E293B !important;
    color: inherit;
}

:root[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > *,
[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

:root[data-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-dark {
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-muted {
    color: #94A3B8 !important;
}

:root[data-theme="dark"] .nav-tabs .nav-link,
[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: #94A3B8 !important;
    border-color: transparent !important;
}

:root[data-theme="dark"] .nav-tabs .nav-link.active,
[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    background-color: #0F172A !important;
    border-color: #3A2A48 #3A2A48 #0F172A !important;
    color: #C7A684 !important;
}

:root[data-theme="dark"] .nav-pills .nav-link.active,
[data-bs-theme="dark"] .nav-pills .nav-link.active {
    background-color: #48235C !important;
    color: #FFFFFF !important;
}

:root[data-theme="dark"] .nc-error-card,
[data-bs-theme="dark"] .nc-error-card,
:root[data-theme="dark"] .record-delete-card,
[data-bs-theme="dark"] .record-delete-card,
:root[data-theme="dark"] .record-form-card,
[data-bs-theme="dark"] .record-form-card {
    background-color: #0F172A !important;
    border-color: #3A2A48 !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45) !important;
}

:root[data-theme="dark"] .record-delete-page,
[data-bs-theme="dark"] .record-delete-page,
:root[data-theme="dark"] .record-form-page,
[data-bs-theme="dark"] .record-form-page {
    background-color: #070B14 !important;
}

:root[data-theme="dark"] .record-delete-card h3,
[data-bs-theme="dark"] .record-delete-card h3,
:root[data-theme="dark"] .record-form-header h3,
[data-bs-theme="dark"] .record-form-header h3 {
    color: #FFFFFF !important;
}

:root[data-theme="dark"] .record-delete-card p,
[data-bs-theme="dark"] .record-delete-card p {
    color: #94A3B8 !important;
}

:root[data-theme="dark"] .record-delete-icon,
[data-bs-theme="dark"] .record-delete-icon {
    background: rgba(220, 53, 69, 0.18) !important;
    color: #F87171 !important;
}

:root[data-theme="dark"] .record-form-header,
[data-bs-theme="dark"] .record-form-header {
    background: #101B30 !important;
    border-color: #3A2A48 !important;
}

:root[data-theme="dark"] .nc-error-code,
[data-bs-theme="dark"] .nc-error-code {
    color: #FFFFFF !important;
}

:root[data-theme="dark"] .nc-error-message,
[data-bs-theme="dark"] .nc-error-message {
    color: #94A3B8 !important;
}

:root[data-theme="dark"] .nc-error-icon,
[data-bs-theme="dark"] .nc-error-icon {
    background: rgba(72, 35, 92, 0.18) !important;
    color: #C7A684 !important;
}


/* ==========================================================================
   UNIVERSAL THEME CONTRAST & STRUCTURE HARDENING (LIGHT & DARK DUAL-ENGINE)
   Eliminates all unreadable text, stark white containers, and misalignments.
   ========================================================================== */

/* 1. Global Dark Mode Text Guardrails (High Specificity) */
:root[data-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-dark,
:root[data-theme="dark"] [class*="text-dark"],
[data-bs-theme="dark"] [class*="text-dark"],
:root[data-theme="dark"] a.text-dark,
[data-bs-theme="dark"] a.text-dark,
:root[data-theme="dark"] h1.text-dark,
[data-bs-theme="dark"] h1.text-dark,
:root[data-theme="dark"] h2.text-dark,
[data-bs-theme="dark"] h2.text-dark,
:root[data-theme="dark"] h3.text-dark,
[data-bs-theme="dark"] h3.text-dark,
:root[data-theme="dark"] h4.text-dark,
[data-bs-theme="dark"] h4.text-dark,
:root[data-theme="dark"] h5.text-dark,
[data-bs-theme="dark"] h5.text-dark,
:root[data-theme="dark"] h6.text-dark,
[data-bs-theme="dark"] h6.text-dark,
:root[data-theme="dark"] strong.text-dark,
[data-bs-theme="dark"] strong.text-dark,
:root[data-theme="dark"] p.text-dark,
[data-bs-theme="dark"] p.text-dark,
:root[data-theme="dark"] span.text-dark,
[data-bs-theme="dark"] span.text-dark,
:root[data-theme="dark"] i.text-dark,
[data-bs-theme="dark"] i.text-dark {
    color: #F8FAFC !important;
}

:root[data-theme="dark"] a.text-dark:hover,
[data-bs-theme="dark"] a.text-dark:hover {
    color: #C7A684 !important;
}

:root[data-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-muted,
:root[data-theme="dark"] .text-body-secondary,
[data-bs-theme="dark"] .text-body-secondary {
    color: #94A3B8 !important;
}

:root[data-theme="dark"] .text-secondary,
[data-bs-theme="dark"] .text-secondary {
    color: #CBD5E1 !important;
}

:root[data-theme="dark"] .text-body,
[data-bs-theme="dark"] .text-body,
:root[data-theme="dark"] .text-body-emphasis,
[data-bs-theme="dark"] .text-body-emphasis {
    color: #F1F5F9 !important;
}

/* 2. Global Dark Mode Container & Surface Guardrails */
:root[data-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-white {
    background-color: #0F172A !important;
    border-color: #3A2A48 !important;
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-light,
:root[data-theme="dark"] .bg-light-subtle,
[data-bs-theme="dark"] .bg-light-subtle {
    background-color: #142036 !important;
    border-color: #3A2A48 !important;
    color: #F8FAFC !important;
}

:root[data-theme="dark"] div.p-3.bg-light,
[data-bs-theme="dark"] div.p-3.bg-light,
:root[data-theme="dark"] div.p-2.bg-light,
[data-bs-theme="dark"] div.p-2.bg-light,
:root[data-theme="dark"] div.border.rounded.bg-light,
[data-bs-theme="dark"] div.border.rounded.bg-light,
:root[data-theme="dark"] div.border.rounded-3.bg-light,
[data-bs-theme="dark"] div.border.rounded-3.bg-light {
    background-color: #142036 !important;
    border-color: #3A2A48 !important;
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .card-header.bg-white,
[data-bs-theme="dark"] .card-header.bg-white,
:root[data-theme="dark"] .card-header.bg-light,
[data-bs-theme="dark"] .card-header.bg-light,
:root[data-theme="dark"] .card-footer.bg-white,
[data-bs-theme="dark"] .card-footer.bg-white,
:root[data-theme="dark"] .card-footer.bg-light,
[data-bs-theme="dark"] .card-footer.bg-light {
    background-color: #111A2E !important;
    border-color: #3A2A48 !important;
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-header,
:root[data-theme="dark"] .modal-footer,
[data-bs-theme="dark"] .modal-footer {
    background-color: #111A2E !important;
    border-color: #3A2A48 !important;
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .border,
[data-bs-theme="dark"] .border,
:root[data-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-top,
:root[data-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-bottom,
:root[data-theme="dark"] .border-start,
[data-bs-theme="dark"] .border-start,
:root[data-theme="dark"] .border-end,
[data-bs-theme="dark"] .border-end,
:root[data-theme="dark"] .border-light,
[data-bs-theme="dark"] .border-light,
:root[data-theme="dark"] .border-light-subtle,
[data-bs-theme="dark"] .border-light-subtle {
    border-color: #3A2A48 !important;
}

/* 3. Global Dark Mode Table & Table-Light Guardrails */
:root[data-theme="dark"] .table,
[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent !important;
    --bs-table-color: #CBD5E1 !important;
    --bs-table-border-color: #3A2A48 !important;
    color: #CBD5E1 !important;
}

:root[data-theme="dark"] .table thead th,
[data-bs-theme="dark"] .table thead th,
:root[data-theme="dark"] .table-light,
[data-bs-theme="dark"] .table-light,
:root[data-theme="dark"] thead.table-light,
[data-bs-theme="dark"] thead.table-light,
:root[data-theme="dark"] thead.table-light th,
[data-bs-theme="dark"] thead.table-light th,
:root[data-theme="dark"] .table thead.table-light th,
[data-bs-theme="dark"] .table thead.table-light th {
    background-color: #142036 !important;
    color: #94A3B8 !important;
    border-bottom: 2px solid #3A2A48 !important;
    --bs-table-bg: #142036 !important;
    --bs-table-color: #94A3B8 !important;
    --bs-table-striped-bg: #281A35 !important;
}

:root[data-theme="dark"] .table-hover > tbody > tr:hover > *,
[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(170, 137, 106, 0.06) !important;
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .table-responsive.bg-white,
[data-bs-theme="dark"] .table-responsive.bg-white {
    background-color: #0F172A !important;
    border-color: #3A2A48 !important;
}

/* 4. Global Dark Mode Badges & Chips */
:root[data-theme="dark"] .badge.bg-light,
[data-bs-theme="dark"] .badge.bg-light,
:root[data-theme="dark"] .badge.bg-white,
[data-bs-theme="dark"] .badge.bg-white,
:root[data-theme="dark"] .badge.text-bg-light,
[data-bs-theme="dark"] .badge.text-bg-light,
:root[data-theme="dark"] .badge.bg-dark-subtle,
[data-bs-theme="dark"] .badge.bg-dark-subtle,
:root[data-theme="dark"] .badge.bg-secondary-subtle,
[data-bs-theme="dark"] .badge.bg-secondary-subtle {
    background-color: #1E293B !important;
    color: #F8FAFC !important;
    border: 1px solid #334155 !important;
}

:root[data-theme="dark"] .badge.bg-warning-subtle,
[data-bs-theme="dark"] .badge.bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.2) !important;
    color: #FCD34D !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

:root[data-theme="dark"] .badge.bg-info-subtle,
[data-bs-theme="dark"] .badge.bg-info-subtle {
    background-color: rgba(170, 137, 106, 0.2) !important;
    color: #E2CFB8 !important;
    border: 1px solid rgba(170, 137, 106, 0.35) !important;
}

:root[data-theme="dark"] .badge.bg-success-subtle,
[data-bs-theme="dark"] .badge.bg-success-subtle {
    background-color: rgba(16, 185, 129, 0.2) !important;
    color: #6EE7B7 !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
}

:root[data-theme="dark"] .badge.bg-danger-subtle,
[data-bs-theme="dark"] .badge.bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.2) !important;
    color: #FCA5A5 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

/* 5. Global Dark Mode Form Controls & Inputs */
:root[data-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select,
[data-bs-theme="dark"] .form-select {
    background-color: #0B1324 !important;
    border-color: #3A2A48 !important;
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-control:focus,
:root[data-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #0F172A !important;
    border-color: #C7A684 !important;
    box-shadow: 0 0 0 3px rgba(170, 137, 106, 0.25) !important;
    color: #FFFFFF !important;
}

:root[data-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] .form-control::placeholder {
    color: #64748B !important;
}

:root[data-theme="dark"] .form-control[readonly],
[data-bs-theme="dark"] .form-control[readonly],
:root[data-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-control:disabled {
    background-color: #141F36 !important;
    color: #CBD5E1 !important;
    border-color: #3A2A48 !important;
}

:root[data-theme="dark"] .input-group-text,
[data-bs-theme="dark"] .input-group-text {
    background-color: #141F36 !important;
    border-color: #3A2A48 !important;
    color: #CBD5E1 !important;
}

:root[data-theme="dark"] .form-check-input,
[data-bs-theme="dark"] .form-check-input {
    background-color: #0B1324 !important;
    border-color: #2D4160 !important;
}

:root[data-theme="dark"] .form-check-input:checked,
[data-bs-theme="dark"] .form-check-input:checked {
    background-color: #48235C !important;
    border-color: #48235C !important;
}

:root[data-theme="dark"] .form-check.border,
[data-bs-theme="dark"] .form-check.border {
    background-color: #111D33 !important;
    border-color: #3A2A48 !important;
}

/* 6. Global Dark Mode Alerts */
:root[data-theme="dark"] .alert.alert-light,
[data-bs-theme="dark"] .alert.alert-light {
    background-color: #142036 !important;
    border-color: #3A2A48 !important;
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .alert.alert-warning,
[data-bs-theme="dark"] .alert.alert-warning {
    background-color: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #FCD34D !important;
}

:root[data-theme="dark"] .alert.alert-warning a,
[data-bs-theme="dark"] .alert.alert-warning a {
    color: #FBBF24 !important;
}

/* 7. ATS Detail & Builder Specific Cinematic Dual-Theme Overrides */
:root[data-theme="dark"] {
    --ats-teal: #10B981;
    --ats-teal-light: rgba(16, 185, 129, 0.15);
    --ats-dark: #F8FAFC;
    --ats-border: #3A2A48;
    --ats-muted: #94A3B8;
    --ats-card-bg: #0F172A;
}

:root[data-theme="dark"] .ats-dashboard-header {
    background: linear-gradient(135deg, #0F172A 0%, #281A35 100%) !important;
    border-color: #3A2A48 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

:root[data-theme="dark"] .ats-score-hero-card,
[data-bs-theme="dark"] .ats-score-hero-card,
:root[data-theme="dark"] .ats-dashboard-card,
[data-bs-theme="dark"] .ats-dashboard-card,
:root[data-theme="dark"] .finding-card,
[data-bs-theme="dark"] .finding-card {
    background-color: #0F172A !important;
    border-color: #3A2A48 !important;
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .ats-score-circle-big .score-number {
    color: #F8FAFC !important;
}

:root[data-theme="dark"] .ats-tab-nav {
    border-bottom-color: #3A2A48 !important;
}

:root[data-theme="dark"] .ats-tab-nav .nav-link {
    color: #94A3B8 !important;
}

:root[data-theme="dark"] .ats-tab-nav .nav-link.active {
    color: #C7A684 !important;
    border-bottom-color: #C7A684 !important;
}

:root[data-theme="dark"] .finding-quote {
    background: rgba(239, 68, 68, 0.12) !important;
    border-left-color: #EF4444 !important;
    color: #FCA5A5 !important;
}

:root[data-theme="dark"] .suggestion-box {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #6EE7B7 !important;
}

:root[data-theme="dark"] .category-progress-track {
    background-color: #1E293B !important;
}

:root[data-theme="dark"] .exp-row,
[data-bs-theme="dark"] .exp-row,
:root[data-theme="dark"] .edu-row,
[data-bs-theme="dark"] .edu-row,
:root[data-theme="dark"] .proj-row,
[data-bs-theme="dark"] .proj-row {
    background-color: #142036 !important;
    border-color: #3A2A48 !important;
}

:root[data-theme="dark"] .template-card,
[data-bs-theme="dark"] .template-card {
    background-color: #0F172A !important;
    border-color: #3A2A48 !important;
}

:root[data-theme="dark"] .template-card.active,
[data-bs-theme="dark"] .template-card.active {
    border-color: #C7A684 !important;
    box-shadow: 0 0 0 2px rgba(170, 137, 106, 0.35) !important;
}

/* 8. Universal Page Alignment, Card Standard, & Container Symmetry */
.container,
.container-fluid {
    transition: background-color 0.25s ease, color 0.25s ease;
}

.table-responsive {
    border-radius: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    vertical-align: middle;
}

.breadcrumb {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .tp-float,
    .tp-pulse-glow,
    .tp-theme-toggle-btn,
    .tp-hover-card,
    .tp-shimmer-badge::after,
    .nc-profile-drawer,
    .nc-drawer-overlay {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}
