.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: 200px !important;
        min-width: 200px !important;
        padding: 20px 0 15px !important;
    }

    .apply-tab-nav li a {
        padding: 10px 14px !important;
        font-size: 14px !important;
        gap: 8px !important;
    }

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

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

    .apply-content-body {
        padding: 20px !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;
    }
}
