.container,.form-container,.header-container,body{position:relative}
:root {
    --primary:#6366f1;
    --primary-light:#e0e7ff;
    --primary-dark:#4f46e5;
    --secondary:#06b6d4;
    --secondary-light:#cffafe;
    --accent:#f59e0b;
    --success:#10b981;
    --dark:#0f172a;
    --light:#f8fafc;
    --gray-100:#f1f5f9;
    --gray-200:#e2e8f0;
    --gray-300:#cbd5e1;
    --gray-500:#64748b;
    --gray-600:#475569;
    --gray-700:#334155;
    --border-radius:12px; 
    --shadow-sm:0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md:0 4px 6px -1px rgb(0 0 0 / 0.1),0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg:0 10px 15px -3px rgb(0 0 0 / 0.1),0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl:0 20px 25px -5px rgb(0 0 0 / 0.1),0 8px 10px -6px rgb(0 0 0 / 0.1)
}
*{box-sizing:border-box}
body {
    background:linear-gradient(135deg,#667eea 0,#764ba2 100%);
    font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;
    color:var(--dark);
    margin:0;
    font-size:16px;
    line-height:1.6;
    min-height:100vh
}
body::before {
    content:'';
    position:fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    background:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events:none;
    z-index:-1
}
.container {
    z-index:1;
    max-width:none!important;
    width:95%!important;
    padding-left:2rem;
    padding-right:2rem
}
.form-container {
    background:rgba(255,255,255,.95);
    backdrop-filter:blur(20px);
    border:1px solid rgba(255,255,255,.2);
    border-radius:var(--border-radius);
    box-shadow:var(--shadow-xl);
    padding:2.5rem;
    margin:2rem auto;
    max-width:none;
    width:100%;
    overflow:visible;
    z-index:10
}
.form-container::before {
    content:'';
    position:absolute;
    top:0;
    left:0;
    right:0;
    height:4px;
    background:linear-gradient(90deg,var(--primary),var(--secondary),var(--accent))
}
.header-container {
    text-align:center;
    margin:2rem 0 3rem
}
.header-title {
    font-size:clamp(2.5rem, 5vw, 4rem);
    font-weight:900;
    background:linear-gradient(135deg,var(--primary) 0,var(--secondary) 50%,var(--accent) 100%);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    background-clip:text;
    margin-bottom:1rem;
    letter-spacing:-.02em;
    animation:.8s ease-out slideUp
}
.header-subtitle {
    font-size:1.2rem;
    color:var(--gray-600);
    font-weight:400;
    margin-bottom:2rem;
    animation:.8s ease-out .2s both slideUp
}
.filter-section h3,.section-title {
    font-weight:700;
    color:var(--dark)
}
.header-underline {
    width:120px;
    height:4px;
    background:linear-gradient(90deg,var(--primary),var(--secondary));
    margin:0 auto;
    border-radius:2px;
    animation:.8s ease-out .4s both slideUp
}
@keyframes slideUp {
    from{opacity:0;transform:translateY(30px)}
    to{opacity:1;transform:translateY(0)}
}
.section-title {
    font-size:1.5rem;
    margin-bottom:1.5rem;
    display:flex;
    align-items:center;
    gap:.75rem
}
.section-title::before {
    content:'';
    width:4px;
    height:24px;
    background:linear-gradient(to bottom,var(--primary),var(--secondary));
    border-radius:2px
}
.filter-container {
    background:#fff;
    box-shadow:var(--shadow-md);
    padding:1.5rem;
    margin-bottom:2rem;
    border:none;
    position:sticky;
    top:20px;
    z-index:100
}
.worker-type-selector {
    display:flex;
    flex-direction:row;
    align-items:stretch;
    justify-content:space-between;
    gap:1.5rem;
    padding:2rem 2rem 2rem 2.5rem;
    margin-bottom:2rem;
    background:linear-gradient(135deg,var(--primary-light) 0,var(--secondary-light) 100%);
    border-radius:var(--border-radius)
}
.candidate-card,.filter-btn {
    background:#fff;
    position:relative;
    overflow:hidden;
    cursor:pointer
}
.worker-type-image {
    display:flex;
    align-items:stretch;
    flex-shrink:0
}
.worker-type-image img.worker-type-img {
    width:150px;
    height:100%;
    object-fit:cover;
    border-radius:8px
}
.worker-type-content {
    flex-grow:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center
}
#jobTypeFilterButtons {
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:1rem
}
.filter-btn {
    border:none;
    border-radius:40px;
    padding:.4rem .8rem;
    margin:.15rem 0;
    transition:.3s cubic-bezier(.4, 0, .2, 1);
    font-weight:500;
    font-size:.8rem;
    display:inline-flex;
    align-items:center;
    white-space:nowrap;
    width:fit-content
}
.filter-btn i {
    font-size:.75rem;
    margin-right:.3rem
}
.filter-btn::before,.view-profile-btn::before {
    content:'';
    position:absolute;
    top:0;
    left:-100%;
    width:100%;
    height:100%;
    background:linear-gradient(90deg,var(--primary),var(--secondary));
    transition:left .3s;
    z-index:-1
}
.filter-btn:hover {
    transform:translateY(-2px);
    box-shadow:var(--shadow-lg);
    border-color:var(--primary)
}
.filter-btn.active {
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    color:#fff;
    border-color:transparent;
    transform:scale(1.05);
    box-shadow:var(--shadow-lg)
}
.filter-btn.active::before,.view-profile-btn:hover::before {
    left:0
}
.candidate-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
    gap:1rem;
    margin-bottom:1.5rem
}
.candidate-card {
    border:1px solid var(--gray-200);
    border-radius:var(--border-radius);
    padding:.8rem;
    transition:.3s
}
.candidate-image {
    width:70px;
    height:70px;
    border-radius:50%;
    object-fit:cover;
    border:3px solid var(--gray-200);
    transition:.3s;
    margin:0 auto .7rem;
    display:block
}
.candidate-name {
    font-size:1rem;
    font-weight:600;
    color:var(--dark);
    margin-bottom:.3rem;
    text-align:center
}
.candidate-role {
    color:var(--gray-600);
    font-size:.8rem;
    text-align:center;
    margin-bottom:.6rem;
    font-weight:500
}
.candidate-badges {
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:.3rem;
    margin-bottom:.6rem
}
.candidate-badges .badge {
    font-size:.7rem;
    padding:.25rem .4rem
}
.badge {
    padding:.5rem 1rem;
    border-radius:50px;
    font-size:.85rem;
    font-weight:500;
    border:1px solid transparent
}
.badge-primary {
    background:linear-gradient(135deg,var(--primary-light),rgba(99,102,241,.1));
    color:var(--primary-dark);
    border-color:var(--primary-light)
}
.badge-info {
    background:linear-gradient(135deg,var(--secondary-light),rgba(6,182,212,.1));
    color:var(--secondary);
    border-color:var(--secondary-light)
}
.badge-success {
    background:linear-gradient(135deg,rgba(16,185,129,.1),rgba(16,185,129,.05));
    color:var(--success);
    border-color:rgba(16,185,129,.2)
}
.view-profile-btn {
    background:0 0;
    border:2px solid var(--primary);
    color:var(--primary);
    padding:.5rem 1.5rem;
    border-radius:50px;
    font-weight:600;
    font-size:.9rem;
    transition:.3s;
    width:100%;
    position:relative;
    overflow:hidden
}
.view-profile-btn:hover {
    color:#fff;
    transform:translateY(-2px);
    box-shadow:var(--shadow-md)
}
.client-info-card {
    background:#fff;
    border-radius:var(--border-radius);
    box-shadow:var(--shadow-md);
    padding:2rem;
    margin-top:2rem;
    border:1px solid var(--gray-200);
    position:relative;
    overflow:hidden;
    z-index:10
}
.client-info-card::before {
    content:'';
    position:absolute;
    top:0;
    left:0;
    right:0;
    height:4px;
    background:linear-gradient(90deg,var(--success),var(--secondary))
}
.form-control {
    border:2px solid var(--gray-200);
    border-radius:12px;
    padding:.875rem 1rem;
    font-size:1rem;
    transition:.3s;
    background:#fff
}
.form-control:focus {
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(99,102,241,.1);
    outline:0
}
.form-label {
    font-weight:600;
    color:var(--gray-700);
    margin-bottom:.5rem;
    font-size:.95rem
}
.btn-primary,.btn-success {
    font-size:1.1rem;
    position:relative;
    overflow:hidden
}
.btn-primary {
    background:linear-gradient(135deg,var(--primary),var(--primary-dark));
    border:none;
    color:#fff;
    padding:1rem 2rem;
    border-radius:50px;
    font-weight:600;
    transition:.3s
}
.btn-otp,.btn-success {
    border:none;
    font-weight:600;
    color:#fff;
    transition:.3s
}
.btn-danger::before,.btn-primary::before {
    content:'';
    position:absolute;
    top:0;
    left:-100%;
    width:100%;
    height:100%;
    background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);
    transition:left .5s
}
.btn-danger:hover,.btn-primary:hover,.btn-success:hover {
    transform:translateY(-2px);
    box-shadow:var(--shadow-lg)
}
.btn-danger:hover::before,.btn-primary:hover::before {
    left:100%
}
.btn-success {
    background:linear-gradient(135deg,var(--success),#059669);
    padding:1rem 2.5rem;
    border-radius:50px
}
.btn-otp {
    background:linear-gradient(135deg,var(--secondary),#0891b2);
    padding:.75rem 1.5rem;
    border-radius:50px;
    font-size:1rem;
    width:50%
}
.btn-otp:hover {
    transform:translateY(-2px);
    box-shadow:var(--shadow-md)
}
.btn-danger {
    background:linear-gradient(135deg,#ef4444,#b91c1c);
    border:none;
    color:#fff;
    padding:1rem 2rem;
    border-radius:50px;
    font-size:1.1rem;
    font-weight:600;
    transition:.3s;
    position:relative;
    overflow:hidden
}
.loader {
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(15,23,42,.8);
    backdrop-filter:blur(8px);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:1000
}
.loader.modal-open {
    pointer-events:none;
    display:none!important
}
.loader .spinner-wrapper {
    text-align:center;
    color:#fff
}
.filter-group .form-label,.reset-btn {
    color:var(--gray-700);
    font-weight:600
}
.loader .spinner-border {
    width:3rem;
    height:3rem;
    border-width:.3em;
    border-color:var(--primary);
    border-right-color:transparent
}
.loader .loading-text {
    margin-top:1rem;
    font-size:1.1rem;
    font-weight:500
}
.filter-section h3 {
    font-size:1.25rem;
    margin-bottom:1.5rem;
    display:flex;
    align-items:center;
    gap:.5rem
}
.filter-section h3::before {
    content:'';
    width:3px;
    height:20px;
    background:var(--primary);
    border-radius:2px
}
.filter-group {
    margin-bottom:2rem;
    padding:1rem;
    background:var(--gray-100);
    border-radius:12px;
    border:1px solid var(--gray-200)
}
.filter-group .form-label {
    margin-bottom:1rem;
    display:flex;
    align-items:center;
    gap:.5rem
}
.reset-btn {
    background:linear-gradient(135deg,var(--gray-200),var(--gray-300));
    border:none;
    padding:.75rem 1.5rem;
    border-radius:50px;
    transition:.3s;
    width:100%
}
.reset-btn:hover {
    background:linear-gradient(135deg,var(--gray-300),var(--gray-400));
    transform:translateY(-2px);
    box-shadow:var(--shadow-md)
}
.otp-section {
    display:none;
    animation:.3s ease-out slideDown
}
.otp-section.show {
    display:block
}
@keyframes slideDown {
    from{opacity:0;transform:translateY(-10px)}
    to{opacity:1;transform:translateY(0)}
}
.otp-error {
    color:#ef4444;
    font-size:.9rem;
    margin-top:.5rem;
    display:none;
    padding:.5rem;
    background:rgba(239,68,68,.1);
    border-radius:8px;
    border:1px solid rgba(239,68,68,.2)
}
.modal {
    z-index:1050!important
}

.modal-header {
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    color:#fff;
    border:none;
    padding:1rem 1.5rem; 
}
.modal-body {
    padding:1.5rem; 
    max-height:60vh; 
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    font-size:0.9rem; 
}
.modal-footer {
    padding:1rem; 
}
.profile-image-large {
    width:100px; 
    height:100px; 
    object-fit:cover;
    border:3px solid var(--primary-light); 
    border-radius:50%;
    transition:.3s
}
.profile-image-large:hover {
    transform:scale(1.05);
    border-color:var(--primary)
}
.list-group-item {
    border:none;
    border-bottom:1px solid var(--gray-200);
    padding:0.75rem 0; 
    font-size:.85rem; 
    transition:.3s
}
.list-group-item:hover {
    background:var(--gray-100);
    padding-left:0.75rem;
    border-radius:8px
}
.list-group-item i {
    color:var(--primary);
    width:18px; 
}
.experience-timeline {
    position:relative;
    padding-left:20px; 
}
.experience-timeline::before {
    content:'';
    position:absolute;
    left:10px; 
    top:0;
    bottom:0;
    width:2px; 
    background:linear-gradient(to bottom,var(--primary),var(--secondary));
    border-radius:2px
}
.experience-item {
    position:relative;
    margin-bottom:1rem; 
    padding:0.75rem; 
    background:#fff;
    border-radius:10px; 
    box-shadow:var(--shadow-sm);
    border:1px solid var(--gray-200)
}
.experience-item::before {
    content:'';
    position:absolute;
    left:-18px; 
    top:1rem;
    width:10px; 
    height:10px;
    border-radius:50%;
    background:var(--primary);
    border:2px solid #fff;
    box-shadow:var(--shadow-md)
}
@media (max-width:576px) {
    .modal-dialog {
        max-width:90%; 
        left:50% !important;
        transform:translateX(-50%) !important;
        top:5% !important 
    }
    .modal-body {
        padding:1rem; 
        font-size:0.85rem;
    }
    .modal-header {
        padding:0.75rem 1rem;
    }
    .modal-footer {
        padding:0.75rem;
    }
    .profile-image-large {
        width:80px; 
        height:80px;
    }
}
.confirmation-container {
    text-align:center;
    padding:3rem 2rem;
    animation:.6s ease-out fadeInScale
}
@keyframes fadeInScale {
    from{opacity:0;transform:scale(.9) translateY(20px)}
    to{opacity:1;transform:scale(1) translateY(0)}
}
.success-icon {
    width:100px;
    height:100px;
    background:linear-gradient(135deg,var(--success),#059669);
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 auto 2rem;
    position:relative;
    overflow:hidden
}
.success-icon::before {
    content:'';
    position:absolute;
    top:-50%;
    left:-50%;
    width:200%;
    height:200%;
    background:radial-gradient(circle,rgba(255,255,255,.3) 0,transparent 70%);
    animation:2s ease-in-out infinite pulse;
    will-change:transform,opacity
}
@keyframes pulse {
    0%,100%{transform:scale(1);opacity:1}
    50%{transform:scale(1.1);opacity:.7}
}
.success-icon i {
    font-size:3rem;
    color:#fff;
    z-index:1
}
.floating-elements {
    position:absolute;
    top:0;
    left:0;
    right:0;
    bottom:0;
    pointer-events:none;
    overflow:hidden;
    z-index:0
}
.floating-circle {
    position:absolute;
    border-radius:50%;
    background:linear-gradient(135deg,rgba(99,102,241,.1),rgba(6,182,212,.1));
    animation:8s ease-in-out infinite float;
    will-change:transform,opacity
}
.floating-circle:first-child {
    width:60px;
    height:60px;
    top:10%;
    left:10%;
    animation-delay:0s
}
.floating-circle:nth-child(2) {
    width:80px;
    height:80px;
    top:60%;
    right:10%;
    animation-delay:2s
}
.floating-circle:nth-child(3) {
    width:40px;
    height:40px;
    bottom:20%;
    left:20%;
    animation-delay:4s
}
@keyframes float {
    0%,100%{transform:translateY(0) rotate(0)}
    50%{transform:translateY(-20px) rotate(180deg)}
}
.filter-label-icon {
    width:20px;
    height:20px;
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:.8rem
}
.progress-bar {
    height:4px;
    background:var(--gray-200);
    border-radius:2px;
    overflow:hidden;
    margin:1rem 0
}
.progress-fill {
    height:100%;
    background:linear-gradient(90deg,var(--primary),var(--secondary));
    width:0%;
    transition:width .3s
}
.candidate-checkbox,.deployed-candidate-checkbox {
    position:absolute;
    top:10px;
    right:10px;
    width:20px;
    height:20px;
    cursor:pointer;
    z-index:10
}
.candidate-card:has(.candidate-checkbox:checked),.candidate-card:has(.deployed-candidate-checkbox:checked) {
    background:linear-gradient(135deg,var(--success),#a2f7dcff);
    border-color:var(--success);
    color:#fff
}
@media (max-width:768px) {
    .form-container {
        margin:1rem;
        padding:1.5rem
    }
    .candidate-grid,.deployed-candidate-grid {
        grid-template-columns:1fr;
        gap:1rem
    }
    .header-title {
        font-size:2.5rem
    }
    .filter-container {
        position:static
    }
}
@media (max-width:576px) {
    .worker-type-selector {
        flex-direction:column;
        align-items:center
    }
    .worker-type-image {
        margin-bottom:1rem
    }
}
.no-candidates {
    text-align:center;
    padding:3rem 2rem;
    color:var(--gray-500)
}
.no-candidates i {
    font-size:4rem;
    color:var(--gray-300);
    margin-bottom:1rem
}
.selected-count {
    position:fixed;
    bottom:2rem;
    right:2rem;
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    color:#fff;
    padding:1rem 1.5rem;
    border-radius:50px;
    box-shadow:var(--shadow-lg);
    font-weight:600;
    z-index:500;
    transition:.3s;
    transform:scale(0)
}
.selected-count.show {
    transform:scale(1)
}
.selected-count:hover {
    transform:scale(1.05)
}




body.modal-open {
    overflow: auto !important;
    padding-right: 0 !important; 
}




.modal-backdrop {
    background: transparent !important; 
    pointer-events: none !important; 
}


.modal-content {
    pointer-events: auto !important; 
}


.modal-dialog {
    position: fixed !important; 
    transform: none !important; 
}





.form-container {
    overflow: visible !important; /* Key fix: allows fixed/sticky to break out */
}

.main-content-wrapper {
    min-height: calc(100vh - 200px); /* Ensures enough height for sticky to activate at bottom */
    display: flex;
    flex-direction: column;
    padding-bottom: 80px; /* Reduced space since no box */
}

.next-button-wrapper {
    position: sticky;
    bottom: 0;
    background: transparent !important; /* No more white square! */
    padding: 1rem 0;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    margin-top: auto; /* Pushes it to the bottom of the flex column */
}

.next-button-wrapper .btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

@media (min-width: 992px) {
    .next-button-wrapper {
        margin-left: -16.6667%; /* Offsets for the sidebar width so it spans full under content */
        padding-left: calc(16.6667% + 2rem);
    }
}

@media (max-width: 991px) {
    .next-button-wrapper {
        padding: 1rem;
    }
    
    .main-content-wrapper {
        padding-bottom: 80px;
    }
}