/* ========================================================================
   ESTILOS KOUCH - PERFIL DE USUARIO (CÓDIGO TOTAL CORREGIDO)
   ======================================================================== */

.kouch-favorite-jobs-list h2,
.kouch-applied-jobs-list h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #5a61f6;
}
.kouch-job-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.kouch-no-results {
    padding: 30px;
    text-align: center;
    font-size: 18px;
    color: #777;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ddd;
}
.kouch-pagination { margin-top: 30px; text-align: center; }
.kouch-pagination .page-numbers {
    padding: 8px 12px;
    margin: 0 3px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #5557B0;
    transition: background-color 0.2s ease;
}
.kouch-pagination .page-numbers.current {
    background-color: #5557B0;
    color: #fff;
    border-color: #5557B0;
}
.kouch-pagination .page-numbers:hover:not(.current) {
    background-color: #f6f6ff;
}

/* --- ESTILOS BASE DE LA TARJETA --- */
.kouch-job-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.kouch-job-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #c7c9ff;
}
.kouch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    margin-bottom: 8px;
}
.kouch-card-title a {
    text-decoration: none;
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
}
.kouch-card-title a:hover { color: #5557B0; }
.kouch-card-company {
    font-weight: 500;
    color: #374151;
    margin-bottom: 10px;
}
.kouch-card-location {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
}
.kouch-card-salary {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 15px;
}
.job-post-time-ago {
    font-size: 12px;
    color: #575757;
    font-weight: 400;
    white-space: nowrap;
}
.kouch-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin-top: 15px;
    padding: 15px 0 0 0;
    border-top: 1px solid #e0e0e0;
}
.kouch-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    align-items: center;
}
.kouch-card-meta span {
    background-color: #F6F6FF;
    color: #5557B0;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 500;
}
.kouch-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.kouch-card-button-vermas {
    padding: 8px 16px;
    background-color: #f1f1f1;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s ease;
}
.kouch-card-button-vermas:hover { background-color: #e0e0e0; }
.kouch-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 10px;
    background-color: #fff;
    width: 44px;
    height: 44px;
}
.kouch-save-btn:hover {
    background-color: #F6F6FF;
    border-color: #c7c9ff;
}
.kouch-save-btn svg {
    width: 24px;
    height: 24px;
    color: #5557B0;
}
.kouch-save-btn .icon-save-filled { color: #5557B0; }
.kouch-save-btn[disabled] { opacity: 0.7; cursor: not-allowed; }
.kouch-save-btn .icon-save-outline { display: none; }
.kouch-save-btn .icon-save-filled { display: inline-block; }

/* --- ESTILOS DE APLICACIONES --- */

.kouch-applied-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

/* Columna Derecha (Estados) */
.kouch-applied-card .job-post-time-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding-top: 5px;
}
.kouch-applied-card .applied-date-line {
    font-size: 14px;
    color: #718096;
    margin: 0;
}
.kouch-applied-card .job-post-status {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none; /* No Mayúsculas */
    color: #374151; /* Color de texto base */
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* ESTILO RECLUTADOR (SUTIL SUAVE) */
.kouch-applied-card .recruiter-status {
    background-color: #E6F0FF;
    color: #2D68C4;
    border: 1px solid #B3C6E6;
}

/* ESTILO CANDIDATO (SIN ESTILO DE BOTÓN, SOLO TEXTO CLICKEABLE) */
.kouch-applied-card .candidate-status-wrapper {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: 0;
    margin-bottom: 0;
}
.kouch-applied-card .status-action-button {
    padding: 0;
    background: none;
    border: none;
    text-decoration: underline;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
    transition: color 0.2s ease;
}
.kouch-applied-card .status-action-button:hover {
    color: #4a4c9a;
}

/* --- COLORES SUTILES PARA ESTADO DEL CANDIDATO (status-action-button) --- */

/* VERDE SUTIL (Progreso Positivo) */
.kouch-applied-card .status-action-button[data-current-status="Postulación enviada"],
.kouch-applied-card .status-action-button[data-current-status="Me contactaron"],
.kouch-applied-card .status-action-button[data-current-status="Tendré una entrevista"],
.kouch-applied-card .status-action-button[data-current-status="Recibi una Carta oferta"],
.kouch-applied-card .status-action-button[data-current-status="Quedé seleccionado"] {
    color: #047857; /* Verde oscuro */
}

/* NARANJA SUTIL (Pausa, Contacto Fallido) */
.kouch-applied-card .status-action-button[data-current-status="Proceso en pausa"],
.kouch-applied-card .status-action-button[data-current-status="El reclutadore me comento que el proceso quedó pausado"],
.kouch-applied-card .status-action-button[data-current-status="No me contactaron"] {
    color: #D97706; /* Naranja oscuro */
}

/* ROJO (Retiro o Final Negativo) */
.kouch-applied-card .status-action-button[data-current-status="Retiro mi postulación"],
.kouch-applied-card .status-action-button[data-current-status="No deseo continuar con el proceso"],
.kouch-applied-card .status-action-button[data-current-status="No quede seleccionado"] {
    color: #B91C1C; /* Rojo oscuro */
}

/* ESTILOS ACCIONES DEL FOOTER */
.kouch-applied-card .kouch-card-footer {
    padding: 15px 24px;
}
.kouch-applied-card .kouch-card-actions {
    flex-direction: row-reverse; 
}
.kouch-applied-card .kouch-card-actions button.kouch-card-button-vermas {
    background-color: #5557B0;
    color: #ffffff;
    border: 1px solid #5557B0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 600; 
    font-size: 15px;
}
.kouch-applied-card .kouch-card-actions button.kouch-card-button-vermas:hover {
    background-color: #4a4c9a;
    border-color: #4a4c9a;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.kouch-applied-card .kouch-card-actions a.kouch-card-button-vermas {
    background-color: #f1f1f1;
    color: #333;
    border: 1px solid #f1f1f1;
    box-shadow: none;
    font-weight: 500;
    font-size: 14px;
}
.kouch-applied-card .kouch-card-actions a.kouch-card-button-vermas:hover {
    background-color: #e0e0e0;
}

/* ESTILOS DE ENTREVISTA */
.kouch-interview-box {
    margin: 20px;
    padding: 20px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background-color: #f9fafb;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}
.kouch-interview-box h4 {
    margin-top: 0;
    font-size: 18px;
    color: #1f2937;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.kouch-interview-details p {
    margin: 6px 0;
    font-size: 15px;
    color: #374151;
}
.kouch-interview-details a {
    color: #3B82F6;
    text-decoration: underline;
}

/* ========================================================================
   ESTILOS KOUCH - PERFIL DE USUARIO (CÓDIGO TOTAL CORREGIDO CON 9 ESTADOS)
   ======================================================================== */

.kouch-favorite-jobs-list h2,
.kouch-applied-jobs-list h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #5a61f6;
}
.kouch-job-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.kouch-no-results {
    padding: 30px;
    text-align: center;
    font-size: 18px;
    color: #777;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ddd;
}
.kouch-pagination { margin-top: 30px; text-align: center; }
.kouch-job-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.kouch-job-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #c7c9ff;
}
.kouch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    margin-bottom: 8px;
}
.kouch-card-title a {
    text-decoration: none;
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
}
.kouch-card-company {
    font-weight: 500;
    color: #374151;
    margin-bottom: 10px;
}
.kouch-card-salary {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 15px;
}
.kouch-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin-top: 15px;
    padding: 15px 0 0 0;
    border-top: 1px solid #e0e0e0;
}
.kouch-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.kouch-card-button-vermas {
    padding: 8px 16px;
    background-color: #f1f1f1;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 14px;
}

/* --- ESTILOS DE APLICACIONES --- */

/* Columna Derecha (Estados) */
.kouch-applied-card .job-post-time-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding-top: 5px;
}
.kouch-applied-card .applied-date-line {
    font-size: 14px;
    color: #718096;
    margin: 0;
}
/* Estilo del Reclutador (Badge sutil, no interactivo) */
.kouch-applied-card .recruiter-status {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    background-color: #E6F0FF; /* Azul sutil */
    color: #2D68C4;
    border: 1px solid #B3C6E6;
}

/* ESTILO CANDIDATO (BADGE INTERACTIVO) */
.kouch-applied-card .candidate-status-wrapper {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: 0;
    margin-bottom: 0;
}

/* El elemento clickeable ahora es un BADGE con estilos prominentes */
.kouch-applied-card .status-action-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px; /* Hazlo más grande como un botón */
    border-radius: 8px;
    font-size: 15px; /* Texto más legible */
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15); /* Sombra para destacarlo */
    transition: background-color 0.2s ease;
    
    /* Colores por defecto (se sobrescribe por los colores semánticos) */
    background-color: #5557B0; 
    color: #FFFFFF;
}
.kouch-applied-card .status-action-button:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* --- COLORES SEMÁNTICOS PARA BADGE DEL CANDIDATO --- */
/* NOTA: Usamos el fondo del color semántico para que se parezca a la imagen de ejemplo */

/* VERDE (Progreso y Éxito) */
.status-action-button[data-current-status="Postulación enviada"],
.status-action-button[data-current-status="Me contactaron"],
.status-action-button[data-current-status="Tendré una entrevista"],
.status-action-button[data-current-status="Recibi una Carta oferta"],
.status-action-button[data-current-status="Quedé seleccionado"] {
    background-color: #c1f2cc; /* Fondo verde muy sutil */
    color: #047857; /* Texto Verde oscuro */
}

/* NARANJA (Pausa, Falta de Contacto) */
.status-action-button[data-current-status="Proceso en pausa"],
.status-action-button[data-current-status="No me contactaron"] {
    background-color: #ffe6c1; /* Fondo naranja sutil */
    color: #D97706; /* Texto Naranja oscuro */
}

/* ROJO (Retiro o Final Negativo) */
.status-action-button[data-current-status="Retiro mi postulación"],
.status-action-button[data-current-status="No quede seleccionado"] {
    background-color: #ffd1d1; /* Fondo rojo sutil */
    color: #B91C1C; /* Texto Rojo oscuro */
}

/* ESTILOS ACCIONES DEL FOOTER */
.kouch-applied-card .kouch-card-footer {
    padding: 15px 24px;
}
.kouch-applied-card .kouch-card-actions {
    flex-direction: row-reverse; 
}
.kouch-applied-card .kouch-card-actions button.kouch-card-button-vermas {
    background-color: #5557B0;
    color: #ffffff;
    border: 1px solid #5557B0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 600; 
    font-size: 15px;
}
.kouch-applied-card .kouch-card-actions button.kouch-card-button-vermas:hover {
    background-color: #4a4c9a;
    border-color: #4a4c9a;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.kouch-applied-card .kouch-card-actions a.kouch-card-button-vermas {
    background-color: #f1f1f1;
    color: #333;
    border: 1px solid #f1f1f1;
    box-shadow: none;
    font-weight: 500;
    font-size: 14px;
}
.kouch-applied-card .kouch-card-actions a.kouch-card-button-vermas:hover {
    background-color: #e0e0e0;
}

/* ESTILOS DE ENTREVISTA */
.kouch-interview-box {
    margin: 20px;
    padding: 20px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background-color: #f9fafb;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}
.kouch-interview-box h4 {
    margin-top: 0;
    font-size: 18px;
    color: #1f2937;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.kouch-interview-details p {
    margin: 6px 0;
    font-size: 15px;
    color: #374151;
}
.kouch-interview-details a {
    color: #3B82F6;
    text-decoration: underline;
}

/* ---------------------------------------------------------------------- */
/* --- ESTILOS DEL MODAL DE ACTUALIZACIÓN DE ESTADO (FINAL) --- */
/* ---------------------------------------------------------------------- */

.kpfl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}
.kpfl-modal-container {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
    position: relative;
    text-align: center;
    animation: fadeInScale 0.3s ease-out;
}
.kpfl-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.2s ease;
}
.kpfl-modal-logo {
    max-width: 120px;
    margin-bottom: 25px;
    display: block; 
    margin-left: auto;
    margin-right: auto;
}
.kpfl-modal-content h3 {
    font-size: 24px;
    color: #2d3748;
    margin-bottom: 20px;
}

/* Contenedor de Opciones */
.kpfl-status-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 25px;
    text-align: left;
}

/* Estilo de cada Opción (Fondo neutro, texto neutro) */
.kpfl-status-radio {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 15px;
    color: #2d3748;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.kpfl-status-radio:hover {
    background-color: #edf2f7;
    border-color: #a0aec0;
}
.kpfl-status-radio .status-label-text {
    font-weight: 500; /* Mantenemos el peso de la letra bajo */
}

/* ---------------------------------------------------------------------- */
/* --- RADIO BUTTONS (Círculos) --- */
/* ---------------------------------------------------------------------- */

.kpfl-status-radio input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border: 2px solid #a0aec0;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background-color: #fff;
}

/* Estilo por defecto del punto central (se sobrescribe por los colores de abajo) */
.kpfl-status-radio input[type="radio"]:checked::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ---------------------------------------------------------------------- */
/* --- COLORES SUTILES SOLO EN EL MARCADOR AL SELECCIONAR (:checked) --- */
/* ---------------------------------------------------------------------- */

/* 🟢 VERDE SUTIL (Todos los estados de progreso y éxito) */
.kpfl-status-radio:has(input[value="Postulación enviada"]) input[type="radio"]:checked,
.kpfl-status-radio:has(input[value="Me contactaron"]) input[type="radio"]:checked,
.kpfl-status-radio:has(input[value="Tendré una entrevista"]) input[type="radio"]:checked,
.kpfl-status-radio:has(input[value="Recibi una Carta oferta"]) input[type="radio"]:checked,
.kpfl-status-radio:has(input[value="Quedé seleccionado"]) input[type="radio"]:checked {
    border-color: #059669; /* Borde y relleno verde */
    background-color: #059669;
}

/* 🟠 NARANJA SUTIL (Pausa, No me contactaron) */
.kpfl-status-radio:has(input[value="No me contactaron"]) input[type="radio"]:checked,
.kpfl-status-radio:has(input[value="Proceso en pausa"]) input[type="radio"]:checked {
    border-color: #D97706; /* Borde y relleno naranja */
    background-color: #D97706;
}

/* 🔴 ROJO (Retiro, No quede seleccionado) */
.kpfl-status-radio:has(input[value="Retiro mi postulación"]) input[type="radio"]:checked,
.kpfl-status-radio:has(input[value="No quede seleccionado"]) input[type="radio"]:checked {
    border-color: #B91C1C; /* Borde y relleno rojo */
    background-color: #B91C1C;
}

.kpfl-modal-btn.primary {
    background-color: #5557B0;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.kpfl-modal-btn.primary:hover {
    background-color: #4a4c9a;
}


/* --- OPTIMIZACIÓN MÓVIL (Mantenemos la corrección de layout) --- */

@media (max-width: 600px) {
    .kouch-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .kouch-card-date-section {
        width: 100%;
        text-align: left;
    }
    .job-post-time-wrapper {
        align-items: flex-start;
        gap: 6px;
    }
    .candidate-status-wrapper {
        justify-content: flex-start;
    }
    .kouch-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .kouch-card-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .kouch-card-actions button.kouch-card-button-vermas,
    .kouch-card-actions a.kouch-card-button-vermas {
        flex-grow: 1; 
        text-align: center;
    }
}
/* --- AÑADIR AL FINAL DE: assets/css/kouch-profile-ui.css --- */

.kouch-applied-jobs-filter {
    margin-bottom: 25px;
}

#kpfl-app-search-input {
    width: 100%;
    padding: 12px 18px;
    font-size: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
#kpfl-app-search-input:focus {
    border-color: #5557B0;
    box-shadow: 0 0 0 3px rgba(85, 87, 176, 0.1);
    outline: none;
}

/* Loader para AJAX */
.kpfl-loader {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #777;
    font-weight: 500;
}
