/* Theme preference is applied only on screen; printed documents keep their original palette. */
@media screen {
    .cc-theme-toggle {
        display: flex; align-items: center; gap: 12px; flex-shrink: 0;
        box-sizing: border-box; width: 100%; min-height: 50px; margin: 12px 0 0;
        padding: 10px 12px; border: 1px solid #d9e4ed; border-radius: 12px;
        background: #edf3f8; color: #23465e; font: inherit; font-size: 14px;
        text-align: left; cursor: pointer;
    }
    .cc-theme-icon { width: 22px; height: 22px; flex: 0 0 22px; }
    .cc-theme-track { position: relative; flex: 0 0 38px; width: 38px; height: 22px; margin-left: auto; background: #6b8093; border-radius: 20px; }
    .cc-theme-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
    .cc-theme-toggle[aria-pressed="true"] .cc-theme-track { background: #4b9cd0; }
    .cc-theme-toggle[aria-pressed="true"] .cc-theme-track::after { transform: translateX(16px); }
    .cc-theme-toggle:focus-visible { outline: 3px solid #4b9cd0; outline-offset: 3px; }
    .cc-theme-floating { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 999; width: auto; box-shadow: 0 4px 20px #10253630; }
    html.career-responsive[data-cc-theme="dark"] {
        color-scheme: dark;
        --cc-night-bg: #101923; --cc-night-surface: #192634; --cc-night-raised: #223345;
        --cc-night-border: #3a4f63; --cc-night-text: #e4edf5; --cc-night-muted: #b4c5d5;
        --cc-night-link: #91caff;
    }
    html.career-responsive[data-cc-theme="dark"] body {
        background: var(--cc-night-bg) !important; color: var(--cc-night-text) !important;
    }
    html.career-responsive[data-cc-theme="dark"] body::before { opacity: 0 !important; }
    html.career-responsive[data-cc-theme="dark"] :is(.overlay:not(#overlay), .content, .table-container, .cc-dashboard-mobile, .cc-applications-section) {
        background: var(--cc-night-bg) !important; color: var(--cc-night-text) !important;
    }
    html.career-responsive[data-cc-theme="dark"] :is(.form-wrapper, #application-form, .container, .app-card, .job-card, .form, .cc-resume-card, .cc-record-card, .cc-application-cards tbody tr, .modal-content, .modal2-content, .modal-overlay .modal, .dropdown3-menu, .header-container, .cc-profile-header, .card, .resume-upload-wrapper, .resume-placeholder, .filters-wrapper2, .custom-select-trigger, .custom-options, .attachment-link) {
        background: var(--cc-night-surface) !important; color: var(--cc-night-text) !important;
        border-color: var(--cc-night-border) !important; box-shadow: none;
    }
    html.career-responsive[data-cc-theme="dark"] :is(h1, h2, h3, h4, label, legend, .title, .app-title, .cc-cell-primary, .cc-mobile-profile-copy strong) { color: var(--cc-night-text) !important; }
    html.career-responsive[data-cc-theme="dark"] :is(.todo-content p, .form-field p, .job-card p, .app-meta, .date, .app-id, .status-subtext, .cc-resume-description, .cc-resume-help, .cc-resume-selection, .cc-empty-state p, .cc-mobile-profile-copy span, .p, .job-card .location, .job-card .jobid, .modal-content p, .modal2-content p, .resume-placeholder-text, .agreement-text, .slider-value, #fileName) { color: var(--cc-night-muted) !important; }
    html.career-responsive[data-cc-theme="dark"] :is(.cc-resume-current, .cc-resume-actions a, .attachment-link, .span, .link, .job-card a) { color: var(--cc-night-link) !important; }
    html.career-responsive[data-cc-theme="dark"] :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]), select, textarea, .inputForm) {
        background: #12202d !important; color: var(--cc-night-text) !important; border-color: #50677d !important;
    }
    html.career-responsive[data-cc-theme="dark"] :is(input, textarea)::placeholder { color: #aebfd0; opacity: 1; }
    html.career-responsive[data-cc-theme="dark"] :is(input, select, textarea):disabled { background: #273544 !important; color: #b4c5d5 !important; }
    html.career-responsive[data-cc-theme="dark"] :is(input, select, textarea):focus-visible { outline: 2px solid #91caff; outline-offset: 2px; }
    html.career-responsive[data-cc-theme="dark"] :is(input[type="checkbox"], input[type="radio"]) { accent-color: #6bb5ed; }
    html.career-responsive[data-cc-theme="dark"] input::file-selector-button { background: #2c4660; color: #e4edf5; border-color: #50677d; }
    html.career-responsive[data-cc-theme="dark"] :is(table, tbody, td) { background-color: var(--cc-night-surface) !important; color: var(--cc-night-text) !important; border-color: var(--cc-night-border) !important; }
    html.career-responsive[data-cc-theme="dark"] :is(th, .cc-section-bar, .form-header, .cc-toolbar, .topbar) { background: #233e55 !important; color: #fff !important; border-color: var(--cc-night-border) !important; }
    html.career-responsive[data-cc-theme="dark"] :is(.cc-card-table td::before, .cc-application-cards td::before) { color: var(--cc-night-muted) !important; }
    html.career-responsive[data-cc-theme="dark"] tr:hover td { background-color: #223345 !important; }
    html.career-responsive[data-cc-theme="dark"] :is(.action-btn, .dropdown3-toggle, .dropdown3-menu button, .dropdown3-menu a, .icon-button, .close, .close2) { color: var(--cc-night-link) !important; }
    html.career-responsive[data-cc-theme="dark"] :is(.dropdown3-menu button, .dropdown3-menu a, .icon-button):hover { background: #2b4258 !important; }
    html.career-responsive[data-cc-theme="dark"] :is(.cc-resume-icon, .cc-job-icon, .cc-count-badge, .cc-avatar-fallback, .profile-image-placeholder1, .cc-empty-state) { background: #233e55 !important; color: #c2e2ff !important; border-color: var(--cc-night-border) !important; }
    html.career-responsive[data-cc-theme="dark"] .cc-resume-feedback.is-success { background: #153c30; color: #a4e8c6; border-color: #3c7960; }
    html.career-responsive[data-cc-theme="dark"] .cc-resume-feedback.is-error { background: #482733; color: #ffbec8; border-color: #976170; }
    html.career-responsive[data-cc-theme="dark"] :is(.step, .step span) { color: #b4c5d5 !important; }
    html.career-responsive[data-cc-theme="dark"] :is(.step.active, .step.active span) { color: #91caff !important; }
    html.career-responsive[data-cc-theme="dark"] .cc-theme-toggle { background: #223345; color: #e4edf5; border-color: #3a4f63; }
    html.career-responsive[data-cc-theme="dark"] :is(#sidebar, #sidebar.collapsed, .cc-mobile-bar) { background: #192634 !important; color: #e4edf5; border-color: #3a4f63; }
    html.career-responsive[data-cc-theme="dark"] :is(.cc-mobile-brand, .cc-mobile-menu-button) { color: #c2e2ff !important; }
    html.career-responsive[data-cc-theme="dark"] .cc-mobile-menu-button { background: #223345; border-color: #3a4f63; }
    html.career-responsive[data-cc-theme="dark"] #sidebar a { color: #e4edf5 !important; }
    html.career-responsive[data-cc-theme="dark"] #sidebar a > i { background: #294259; color: #b9ddff; }
    html.career-responsive[data-cc-theme="dark"] #sidebar a:hover { background: #2b4258 !important; }
    html.career-responsive[data-cc-theme="dark"] #sidebar :is(a.active, a.cc-nav-current) { background: #315c80 !important; color: #fff !important; }
    html.career-responsive[data-cc-theme="dark"] #sidebar .admin-card { background: #12202d; border-color: #3a4f63; }
    html.career-responsive[data-cc-theme="dark"] #sidebar .admin-header { color: #b4c5d5; }
    html.career-responsive[data-cc-theme="dark"] #sidebar .dropdown-menu { border-color: #3a4f63; }
    html.career-responsive[data-cc-theme="dark"] #sidebar a.cc-nav-logout { color: #ffbec8 !important; border-color: #3a4f63; }
    html.career-responsive[data-cc-theme="dark"] #sidebar a.cc-nav-logout > i { background: #482733; color: #ffbec8; }
    html.career-responsive[data-cc-theme="dark"] .custom-option:hover { background: #2b4258 !important; }
    html.career-responsive[data-cc-theme="dark"] .field-incomplete { background: #482733; border-color: #dc8195; }
    html.career-responsive[data-cc-theme="dark"] .resume-placeholder-text.success { color: #a4e8c6 !important; }
    html.career-responsive[data-cc-theme="dark"] :is(.input-icon-wrapper i, .inputForm i) { color: #b4c5d5; }
    /* Image banners and status badges retain their own contrasting text/background pair. */
    html.career-responsive[data-cc-theme="dark"] :is(.cc-mobile-page-header, .main-section) :is(h1, h2, h3, p) { color: #fff !important; }
}
@media screen and (min-width: 1025px) {
    #sidebar.collapsed .cc-theme-toggle { justify-content: center; padding: 10px 4px; }
    #sidebar.collapsed .cc-theme-toggle :is(.cc-theme-label, .cc-theme-track) { display: none; }
}
@media print { .cc-theme-toggle { display: none !important; } }
