html[data-theme="dark"]{--bg:#0f172a;--surface:#111827;--surface2:#1f2937;--text:#e5e7eb;--muted:#d1d5db;--form-text:#d1d5db;--placeholder:#c4cedd;--border:#374151;--link:#4ea1ff}
html[data-theme="light"]{--bg:#f3f4f6;--surface:#fff;--surface2:#f9fafb;--text:#111827;--muted:#6b7280;--form-text:#6b7280;--placeholder:#6b7280;--border:#d1d5db;--link:#0d6efd}
body{background:var(--bg);color:var(--text);min-height:100vh}.navbar{background:var(--surface);border-color:var(--border)!important}.navbar-brand,.nav-link{color:var(--text)!important}.card,.table,.modal-content{background:var(--surface);color:var(--text);border-color:var(--border)}
.form-control,.form-select,.input-group-text{background:var(--surface2);color:var(--text);border-color:var(--border)}.form-control::placeholder{color:var(--placeholder);opacity:1}.form-control:focus,.form-select:focus{background:var(--surface2);color:var(--text);border-color:#64748b;box-shadow:0 0 0 .2rem rgba(100,116,139,.25)}.form-text{color:var(--form-text)!important;opacity:1}.form-label{color:var(--text)}.table{--bs-table-bg:var(--surface);--bs-table-color:var(--text);--bs-table-border-color:var(--border)}.text-muted{color:var(--muted)!important}
.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}.login-card{width:min(440px,100%)}.stat-card{min-height:130px}
.table-scroll{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-scroll .data-table{min-width:950px}.dataTables_wrapper{width:100%}.dataTables_wrapper .dt-layout-row{gap:.75rem;flex-wrap:wrap}
.desktop-form-modal .modal-dialog{width:min(1200px,96vw);max-width:none;margin:.75rem auto}.desktop-form-modal .modal-content{max-height:94vh;overflow:hidden}.desktop-form-modal .modal-body{overflow:auto;max-height:calc(94vh - 125px)}
.desktop-form-modal .modal-header,.desktop-form-modal .modal-footer{flex-shrink:0}.modal-header .btn-close{background-color:#fff!important;background-image:var(--bs-btn-close-bg)!important;opacity:1;border:2px solid #fff;border-radius:.375rem;padding:.65rem;box-shadow:0 0 0 2px rgba(0,0,0,.35)}html[data-theme="light"] .modal-header .btn-close{background-color:#212529!important;background-image:var(--bs-btn-close-bg)!important;filter:invert(1);border-color:#212529}
.candidate-link{color:var(--link)!important;text-decoration:underline!important;text-underline-offset:2px}.candidate-link:visited,.candidate-link:hover,.candidate-link:active{color:var(--link)!important}
.status-badge{font-weight:600}
@media(max-width:767.98px){
 .container-fluid{padding-left:10px;padding-right:10px}
 .desktop-form-modal .modal-dialog{width:calc(100vw - 12px);max-width:none;margin:.35rem auto}
 .desktop-form-modal .modal-content{min-width:0;width:100%;max-width:100%;max-height:calc(100vh - .7rem);border-radius:.55rem}
 .desktop-form-modal .modal-body{min-width:0;width:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 108px);padding:.9rem}
 .desktop-form-modal .modal-body .row{width:100%;margin-left:0;margin-right:0}
 .desktop-form-modal .modal-header,.desktop-form-modal .modal-footer{padding:.75rem .9rem}
 .desktop-form-modal .form-control,.desktop-form-modal .form-select{width:100%;max-width:100%;}
 .table-scroll .data-table{min-width:950px}
 .page-heading{gap:.75rem;flex-wrap:wrap}
}

.fetch-candidate-btn{height:calc(1.5em + .75rem + 2px);margin-top:0}
@media(max-width:767.98px){.fetch-candidate-btn{height:auto}}

/* Modern flash notifications */
.flash-toast{position:fixed;top:76px;right:20px;z-index:2000;width:min(380px,calc(100vw - 32px));display:flex;align-items:flex-start;gap:.7rem;padding:.8rem .9rem;border:1px solid var(--border);border-left-width:4px;border-radius:.65rem;background:var(--surface);color:var(--text);box-shadow:0 12px 30px rgba(0,0,0,.28);animation:flash-in .22s ease-out both;}
.flash-icon{width:28px;height:28px;min-width:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:1rem;color:#fff;line-height:1;}
.flash-success{border-left-color:#16a34a}.flash-success .flash-icon{background:#16a34a}
.flash-danger{border-left-color:#dc2626}.flash-danger .flash-icon{background:#dc2626}
.flash-warning{border-left-color:#d97706}.flash-warning .flash-icon{background:#d97706}
.flash-info{border-left-color:#2563eb}.flash-info .flash-icon{background:#2563eb}
.flash-message{flex:1;line-height:1.35;font-size:.92rem;word-break:break-word}
.flash-close{border:0;background:transparent;color:var(--muted);font-size:1.35rem;line-height:1;padding:0 .1rem;cursor:pointer}.flash-close:hover{color:var(--text)}
.flash-toast.is-leaving{animation:flash-out .2s ease-in forwards}
@keyframes flash-in{from{opacity:0;transform:translateY(-10px) translateX(12px)}to{opacity:1;transform:none}}
@keyframes flash-out{to{opacity:0;transform:translateY(-8px) translateX(12px)}}

/* Mobile/tablet navigation: visible hamburger and theme toggle beside it */
.navbar-toggler{border:1px solid var(--border)!important;background:var(--surface2)!important;color:var(--text)!important;padding:.35rem .55rem;border-radius:.4rem;box-shadow:none!important}
.navbar-toggler:focus{box-shadow:0 0 0 .2rem rgba(96,165,250,.3)!important}
html[data-theme="dark"] .navbar-toggler-icon{filter:invert(1) grayscale(1) brightness(2)}
html[data-theme="light"] .navbar-toggler-icon{filter:none}

/* Responsive modal/forms: never force a fixed/minimum width on small screens */
.desktop-form-modal .modal-dialog{width:min(1200px,calc(100vw - 1.5rem));max-width:none;margin:.75rem auto}
.desktop-form-modal .modal-content{width:100%;max-width:100%;max-height:calc(100vh - 1.5rem);overflow:hidden}
.desktop-form-modal .modal-body{width:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 130px)}
.desktop-form-modal .modal-body .row{width:100%;margin-left:0;margin-right:0}
@media(max-width:767.98px){
 .desktop-form-modal .modal-dialog{width:calc(100vw - 12px);margin:.35rem auto}
 .desktop-form-modal .modal-content{min-width:0;width:100%;max-width:100%;max-height:calc(100vh - .7rem)}
 .desktop-form-modal .modal-body{min-width:0;width:100%;max-width:100%;max-height:calc(100vh - 108px);overflow-x:hidden;overflow-y:auto}
 .flash-toast{top:66px;right:10px;width:min(360px,calc(100vw - 20px))}
}
