/* =========================
   CONTENEDOR GENERAL
========================= */
.fte-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    font-family: sans-serif;
}

/* =========================
   TÍTULO
========================= */
.fte-main-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 24px;
    color: #111;
    text-align: left;
}

/* =========================
   LAYOUT PRINCIPAL
========================= */
.fte-layout {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

/* =========================
   COLUMNA IZQUIERDA
========================= */
.fte-left {
    width: 42%;
    min-width: 360px;
}

/* =========================
   DIVISOR
========================= */
.fte-divider {
    width: 1px;
    background: #e5e7eb;
    align-self: stretch;
}

/* =========================
   COLUMNA DERECHA
========================= */
.fte-right {
    width: 58%;
}

/* =========================
   BOTÓN SELECCIONAR CURSO
========================= */
#fte-open-course-modal.fte-btn {
    display: block;
    width: 100%;
    max-width: 420px;
    padding: 14px 16px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 15px;
}

/* =========================
   BOTONES
========================= */
.fte-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.fte-btn:hover {
    background: #1d4ed8;
}

/* =========================
   TARJETA CURSO SELECCIONADO
========================= */
#fte-course-panel {
    width: 100%;
}

#fte-selected-course {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(0,0,0,0.12);
    width: 100%;
    max-width: 420px;
    cursor: pointer;
}

.fte-course-thumb-large {
    width: 100%;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
}

.fte-course-thumb-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fte-course-info {
    text-align: center;
}

.fte-course-name {
    font-size: 16px;
    font-weight: 500;
    color: #111;
}

/* =========================
   MODAL
========================= */
.fte-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    padding: 5% 0;
}

.fte-modal-inner {
    background: #fff;
    max-width: 720px;
    max-height: 85vh;
    margin: auto;
    padding: 32px 30px 30px;
    border-radius: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.fte-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 14px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
}

.fte-modal-inner h3 {
    margin-top: 56px;
    margin-bottom: 18px;
    font-weight: 400;
}

#fte-course-search {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* =========================
   LISTADO CURSOS
========================= */
.fte-course-list {
    flex: 1;
    min-height: 0;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 8px;
}

.fte-course-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 6px;
    background: #fff;
    margin-bottom: 6px;
}

.fte-course-item:hover {
    background: #f3f4f6;
}

.fte-course-thumb {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.fte-course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* =========================
   BUSCADOR DE USUARIOS
========================= */
#fte-user-search {
    width: 100%;
    max-width: 520px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

#fte-enroll-btn.fte-btn {
    display: block;
    width: 100%;
    max-width: 420px;
    padding: 14px 16px;
    font-size: 15px;
    margin-bottom: 20px;
}

#fte-user-section {
    margin-top: -10px;
}

/* =========================
   USUARIOS SELECCIONADOS
========================= */
#fte-selected-users {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.fte-selected-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    font-size: 13px;
    color: #111;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.fte-selected-user:hover {
    background: #f9fafb;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* =========================
   MENSAJE INSCRIPCIÓN
========================= */
#fte-enroll-success {
    display: none;
    max-width: 420px;
    margin: 0 auto 16px auto;
    padding: 14px 16px;
    background: #16a34a;
    color: #fff;
    font-weight: 500;
    text-align: center;
    border-radius: 6px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.12);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 999;
}

#fte-enroll-success.show {
    transform: translateY(0);
    opacity: 1;
}

/* =========================
   TABLA DE ENROLAMIENTOS FLEXIBLE
========================= */
.fte-enroll-container {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

#fte-enroll-log {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* columnas se ajustan al contenido */
    font-size: 14px;
}

/* Anchos recomendados por columna (ajustables) */
#fte-enroll-log th:nth-child(1),
#fte-enroll-log td:nth-child(1) {
    width: 90px; /* Fecha */
}

#fte-enroll-log th:nth-child(2),
#fte-enroll-log td:nth-child(2) {
    width: 200px; /* Nombre */
}

#fte-enroll-log th:nth-child(3),
#fte-enroll-log td:nth-child(3) {
    width: 150px; /* Correo */
}

#fte-enroll-log th:nth-child(4),
#fte-enroll-log td:nth-child(4) {
    width: 400px; /* Curso */
}

#fte-enroll-log th:nth-child(5),
#fte-enroll-log td:nth-child(5) {
    width: 60px; /* Estado */
}

#fte-enroll-log th,
#fte-enroll-log td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    word-wrap: break-word;
    white-space: normal; /* contenido largo se parte en varias líneas */
}

#fte-enroll-log th {
    font-weight: 500;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
    color: #111;
}

#fte-enroll-log td:last-child {
    color: #2563eb;
    font-weight: 500;
}

#fte-enroll-log tbody tr:hover {
    background: #f9fafb;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
    .fte-layout {
        flex-direction: column;
    }

    .fte-divider {
        display: none;
    }

    .fte-left,
    .fte-right {
        width: 100%;
        min-width: 0;
    }

    #fte-open-course-modal,
    #fte-enroll-btn,
    #fte-selected-course {
        max-width: 100%;
    }

    .fte-enroll-container {
        max-height: 250px;
    }
}
