.apply-content {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.tab-panel.active {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
}

.apply-content-body {
    flex: 1 0 auto;
}

.apply-nav-buttons {
    margin-top: auto;
}

.availability-table input.is-invalid {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
}

/* Controles de scroll táctil en navegación */
.nav-scroll-btn {
    display: none;
}

.apply-nav-scroll-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/* Tablet (768px a 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .apply-sidebar {
        width: 185px !important;
        min-width: 185px !important;
        padding: 20px 0 15px !important;
    }

    .apply-tab-nav li a {
        padding: 9px 12px !important;
        font-size: 13px !important;
        gap: 8px !important;
    }

    .apply-tab-nav li a .tab-icon {
        width: 26px !important;
        height: 26px !important;
        font-size: 11px !important;
    }

    .apply-content-header {
        padding: 16px 20px !important;
    }

    .apply-content-body {
        padding: 20px 22px !important;
    }

    .apply-content-body .form-label-sm {
        font-size: 12.5px !important;
        line-height: 1.35 !important;
        margin-bottom: 5px !important;
    }

    .apply-content-body .form-control,
    .apply-content-body .form-select {
        font-size: 12.5px !important;
        padding: 7px 10px !important;
        height: 38px !important;
    }
}

/* Mobile (hasta 767px) */
@media (max-width: 767px) {
    .content_apply_job {
        margin-top: 30px !important;
    }

    .apply-wrapper {
        flex-direction: column !important;
        border-radius: 16px !important;
        margin-bottom: 25px !important;
    }

    .apply-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        padding: 8px 6px !important;
        background: #f4f6f8 !important;
        border-bottom: 1px solid #e2e8f0;
        position: relative !important;
        box-shadow: none !important;
    }

    .apply-sidebar .sidebar-job-title {
        display: none !important;
    }

    .apply-nav-scroll-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        gap: 4px;
        width: 100%;
    }

    .nav-scroll-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        color: #559318;
        font-size: 11px;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        flex-shrink: 0;
        z-index: 2;
        transition: background 0.2s ease, transform 0.1s ease;
    }

    .nav-scroll-btn:active {
        transform: scale(0.92);
        background: #f0fdf4;
    }

    .apply-tab-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        gap: 6px !important;
        padding: 4px 2px 6px !important;
        margin: 0 !important;
        scrollbar-width: none;
        /* Firefox */
        flex: 1;
    }

    .apply-tab-nav::-webkit-scrollbar {
        display: none;
        /* Chrome / Safari */
    }

    .apply-tab-nav li {
        flex: 0 0 auto !important;
        min-width: 0 !important;
    }

    .apply-tab-nav li a {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 6px 12px !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 30px !important;
        color: #475569 !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        min-height: auto !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
        transition: all 0.2s ease;
    }

    .apply-tab-nav li a .tab-icon {
        width: 22px !important;
        height: 22px !important;
        background: #f1f5f9 !important;
        color: #6cb91f !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 10px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }

    .apply-tab-nav li a .tab-icon i {
        font-size: 10px !important;
    }

    .apply-tab-nav li.active a {
        background: #6cb91f !important;
        border-color: #6cb91f !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        box-shadow: 0 3px 8px rgba(108, 185, 31, 0.35) !important;
    }

    .apply-tab-nav li.active a .tab-icon {
        background: #ffffff !important;
        color: #6cb91f !important;
    }

    .apply-tab-nav li.done a {
        border-color: #cbd5e1 !important;
        color: #1e293b !important;
    }

    .apply-tab-nav li.done a .tab-icon {
        background: #e2f0d9 !important;
        color: #559318 !important;
    }

    .apply-content-header {
        padding: 16px !important;
    }

    .apply-content-header .d-flex {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .step-badge {
        align-self: flex-start !important;
    }

    .apply-content-body {
        padding: 16px 14px !important;
    }

    /* Disponibilidad en móvil: scroll horizontal natural y suave */
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 10px !important;
    }

    .availability-table {
        min-width: 320px !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .availability-table th,
    .availability-table td {
        padding: 8px 6px !important;
        font-size: 13px !important;
    }

    .availability-table .day-name {
        font-weight: 600;
        color: #334155;
        min-width: 85px !important;
        font-size: 12px !important;
    }

    .availability-table input.input_time {
        width: 100px !important;
        max-width: 110px !important;
        font-size: 12px !important;
        padding: 6px 4px !important;
        height: 38px !important;
        margin: 0 auto !important;
        text-align: center !important;
    }

    .apply-nav-buttons {
        padding: 14px 16px !important;
    }
}

/* --- Form Typography & Controls Harmony --- */
.apply-content-body label,
.apply-content-body .form-label-sm {
    display: block;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    line-height: 1.4;
}

.apply-content-body label .text-danger,
.apply-content-body .form-label-sm .text-danger {
    color: #ef4444 !important;
    margin-left: 2px;
    font-size: 13px;
}

.apply-content-body .form-control,
.apply-content-body .form-select {
    font-family: inherit;
    font-size: 13.5px;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 14px;
    height: 40px;
    background-color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.apply-content-body textarea.form-control {
    height: auto;
    min-height: 85px;
    padding: 10px 14px;
}

.apply-content-body .form-control:focus,
.apply-content-body .form-select:focus {
    border-color: #6cb91f;
    box-shadow: 0 0 0 3px rgba(108, 185, 31, 0.18);
    outline: 0;
}

.apply-content-body .form-control::placeholder {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 400;
}

.apply-content-body .form-control:disabled,
.apply-content-body .form-select:disabled {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

/* --- Switch Toggle Group (Compact Pill Switch Control) --- */
.switch-toggle-group {
    display: inline-flex;
    align-items: center;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 2px;
    gap: 2px;
    user-select: none;
    transition: all 0.2s ease;
    width: fit-content;
    max-width: 140px;
}

.switch-toggle-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    margin: 0;
}

.switch-toggle-group .switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 58px;
    height: 26px;
    padding: 0 12px;
    border-radius: 16px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    margin-bottom: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.switch-toggle-group .switch-btn i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.switch-toggle-group .switch-btn:hover {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.6);
}

.switch-toggle-group .switch-btn:active {
    transform: scale(0.96);
}

/* Active Yes - Fresh Green Pill */
.switch-toggle-group input[value="yes"]:checked + .switch-btn-yes,
.switch-toggle-group input[value="Yes"]:checked + .switch-btn-yes {
    background: #6cb91f;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(108, 185, 31, 0.35);
    font-weight: 700;
}

.switch-toggle-group input[value="yes"]:checked + .switch-btn-yes i,
.switch-toggle-group input[value="Yes"]:checked + .switch-btn-yes i {
    transform: scale(1.1);
}

/* Active No - Neutral Slate Pill */
.switch-toggle-group input[value="no"]:checked + .switch-btn-no,
.switch-toggle-group input[value="No"]:checked + .switch-btn-no {
    background: #64748b;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(100, 116, 139, 0.3);
    font-weight: 700;
}

.switch-toggle-group input[value="no"]:checked + .switch-btn-no i,
.switch-toggle-group input[value="No"]:checked + .switch-btn-no i {
    transform: scale(1.1);
}

/* Validation Error State */
.has-error .form-control,
.has-error .form-select {
    border-color: #ef4444 !important;
    background-color: #fff8f8 !important;
}

.has-error .switch-toggle-group {
    border-color: #ef4444 !important;
    background-color: #fff8f8 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15) !important;
}

.help-block {
    display: block;
    color: #ef4444;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}

/* Mobile & Tablet: Maintain compact switch identity, do NOT stretch full width */
@media (max-width: 767px) {
    .switch-toggle-group {
        width: fit-content !important;
        display: inline-flex !important;
        margin-top: 2px;
    }

    .switch-toggle-group .switch-btn {
        min-width: 62px;
        height: 28px;
        font-size: 12px;
        padding: 0 12px;
    }
}





