
/* ============================================================
   formAgreementEnrollmentExternal.css
   Internacionalizacion — Inscripcion Externa (Salientes)
   Autor : Cl-Sma / 2026-04-12
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    margin: 0;
    background: #f0f2f8;
}

/* -- LOGO EN TOPNAV -- */
#headCompany {
    display: flex;
    align-items: center;
}
#imgLogo {
    height: auto;
    width: auto;
    object-fit: contain;
}

/* -- GLOBAL CONTAINER -- */
.container {
    padding: 24px;
    max-width: 1500px;
    margin: auto;
}

/* -- HEADER -- */
header {
    background: linear-gradient(135deg, #1f3a5f 0%, #2e5f96 100%);
    color: #fff;
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: .3px;
}

/* -- STAT CARDS -- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}
.card {
    background: #fff;
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    border-left: 4px solid #2e5f96;
}
.card h3 {
    margin: 0 0 6px;
    font-size: 12px;
    color: #7a8aaa;
    text-transform: uppercase;
    letter-spacing: .6px;
}
.card span {
    font-size: 30px;
    font-weight: 700;
    color: #1f3a5f;
}

/* -- CONTENT SECTIONS -- */
.section {
    background: #fff;
    padding: 22px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
}
.section h2 {
    margin-top: 0;
    color: #1f3a5f;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #e8ecf4;
    padding-bottom: 10px;
}

/* -- MAP -- */
#map { height: 380px; border-radius: 10px; }

/* ================================================================
   CARDS DE CONVOCATORIAS
   ================================================================ */
.conv-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.conv-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #e8ecf4;
}
.conv-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(31,58,95,.18);
}

.conv-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, #e8ecf4 0%, #d0d8e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.conv-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.conv-card-img .conv-card-no-img {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #9aa8c2;
    font-size: 13px;
}
.conv-card-no-img i {
    font-size: 48px;
    opacity: .5;
}

.conv-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.conv-card-institution {
    font-size: 16px;
    font-weight: 700;
    color: #1f3a5f;
    line-height: 1.3;
    margin: 0;
}

.conv-card-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.conv-card-pou {
    background: #fadada;
    color: #530b0b;
    font-size: 13px;
    border: 1px solid #402626;
}
.conv-card-eou {
    background: #a6eaf8;
    color: #0b1753;
    font-size: 13px;
    border: 1px solid #183443;
}
.conv-card-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #556;
}
.conv-card-detail i {
    color: #2e5f96;
    width: 16px;
    text-align: center;
    font-size: 12px;
}

.conv-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    width: fit-content;
}
.conv-card-badge.vigente {
    background: #eafaf2;
    color: #1a7a47;
    border: 1px solid #a5dfc0;
}
.conv-card-badge.vencido {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}
.conv-card-badge.tramite {
    background: #fef9e7;
    color: #92640d;
    border: 1px solid #f5d780;
}

.conv-card-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #f0f2f8;
    background: #fafbfd;
}

.conv-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.conv-btn-requisitos {
    background: #f0f5ff;
    color: #2e5f96;
    border: 1.5px solid #c5d5f0;
}
.conv-btn-requisitos:hover {
    background: #dbe8ff;
    border-color: #2e5f96;
}

.conv-btn-inscribir {
    background: linear-gradient(135deg, #1f3a5f 0%, #2e5f96 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(31,58,95,.25);
}
.conv-btn-inscribir:hover {
    opacity: .9;
    transform: translateY(-1px);
}

/* ================================================================
   MODAL DE REQUISITOS
   ================================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: modalIn .3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e8ecf4;
    background: linear-gradient(135deg, #1f3a5f 0%, #2e5f96 100%);
    border-radius: 16px 16px 0 0;
    color: #fff;
}
.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.modal-close {
    background: rgba(255,255,255,.2);
    border: none;
    color: #fff;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.modal-close:hover {
    background: rgba(255,255,255,.35);
}

.modal-body {
    padding: 24px;
}

.modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.modal-tab {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    background: #f0f2f8;
    color: #556;
    border: 1.5px solid transparent;
}
.modal-tab.active {
    background: #2e5f96;
    color: #fff;
}
.modal-tab:hover:not(.active) {
    background: #e4edff;
    border-color: #c5d5f0;
}

/* -- REQUISITO ITEM -- */
.requisito-item {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #f0f5ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    transition: background .2s;
}
.requisito-item:hover { background: #e4edff; }

/* ================================================================
   FORMULARIO DE INSCRIPCION — .enr-*
   ================================================================ */

/* Banner superior de la convocatoria seleccionada */
.enr-banner {
    background: linear-gradient(135deg, #1f3a5f 0%, #2e5f96 100%);
    color: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(31,58,95,.25);
}
.enr-banner-icon {
    font-size: 32px;
    opacity: .85;
}
.enr-banner-text h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    padding: 0;
    color: #fff;
}
.enr-banner-text p {
    margin: 0;
    font-size: 13px;
    opacity: .8;
}

/* Seccion del formulario */
.enr-section {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    overflow: hidden;
}
.enr-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #f5f7fb;
    border-bottom: 1px solid #e8ecf4;
}
.enr-section-head i {
    color: #2e5f96;
    font-size: 15px;
}
.enr-section-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f3a5f;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.enr-section-body {
    padding: 20px;
}

/* Grid de campos */
.enr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.enr-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.enr-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

/* Grupo de campo */
.enr-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.enr-field.enr-span2 { grid-column: span 2; }
.enr-field.enr-span3 { grid-column: span 3; }

/* Label */
.enr-label {
    font-size: 11px;
    font-weight: 600;
    color: #7a8aaa;
    text-transform: uppercase;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.enr-label i { color: #2e5f96; font-size: 11px; }

/* Campos obligatorios */
.enr-label.lblReq {
    color: #8b1a1a;
}
.enr-label.lblReq i {
    color: #8b1a1a;
}
.enr-label.lblReq::after {
    content: " *";
    color: #c0392b;
    font-weight: 700;
}

/* Inputs & selects */
.enr-input,
.enr-select {
    padding: 11px 14px;
    border: 1.5px solid #dde3ef;
    border-radius: 8px;
    font-size: 14px;
    color: #2c3e5c;
    background: #fff;
    width: 100%;
    height: auto;
    min-height: 44px;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    box-shadow: none;
}
.enr-input:focus,
.enr-select:focus {
    border-color: #2e5f96;
    box-shadow: 0 0 0 3px rgba(46,95,150,.12);
}
.enr-input:disabled,
.enr-select:disabled,
.enr-input[readonly],
.enr-select[readonly] {
    background: #f5f7fb;
    color: #4a5568;
    cursor: not-allowed;
    border-style: dashed;
    border-color: #c5cfe8;
}
.enr-input::placeholder { color: #b0bccf; }

/* Divisor entre secciones */
.enr-divider {
    border: none;
    border-top: 1px solid #e8ecf4;
    margin: 16px 0;
}

/* Boton enviar */
.enr-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #1f3a5f 0%, #2e5f96 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    box-shadow: 0 4px 14px rgba(31,58,95,.3);
}
.enr-btn-submit:hover { opacity: .9; transform: translateY(-1px); }
.enr-btn-submit:active { transform: translateY(0); }

.enr-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    color: #1f3a5f;
    border: 1.5px solid #c5cfe8;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.enr-btn-back:hover { background: #f0f3fb; }

.enr-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 20px;
    background: #f5f7fb;
    border-top: 1px solid #e8ecf4;
    border-radius: 0 0 12px 12px;
    flex-wrap: wrap;
}

/* Mensaje de exito */
.enr-success {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: #eafaf2;
    border: 1.5px solid #5ac88a;
    border-radius: 8px;
    color: #1a7a47;
    font-weight: 600;
    font-size: 13px;
    margin-left: auto;
}
.enr-success i { color: #1a7a47; }

/* Documentos */
.enr-docs-container {
    display: flex;
    gap: 16px;
    height: 380px;
}
.enr-doc-list {
    width: 36%;
    border-right: 1px solid #e8ecf4;
    overflow-y: auto;
    padding-right: 12px;
}
.enr-docs-pending {
    padding: 16px;
    text-align: center;
    color: #aab4c8;
    font-size: 13px;
    font-style: italic;
}
.enr-doc-item {
    padding: 11px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #e8f0fb;
    cursor: pointer;
    font-size: 13px;
    transition: background .2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.enr-doc-item:hover,
.enr-doc-item.active {
    background: #d0e2f8;
    color: #1f3a5f;
    font-weight: 600;
}

/* -- TARJETA DE DOCUMENTO CARGADO -- */
.enr-doc-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #fff;
    border: 1.5px solid #e4eaf6;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .15s;
    animation: docFadeIn .3s ease;
}
.enr-doc-card:hover {
    border-color: #2e5f96;
    box-shadow: 0 3px 12px rgba(46,95,150,.13);
    transform: translateY(-1px);
}
.enr-doc-card.active {
    border-color: #2e5f96;
    background: #f0f5ff;
    box-shadow: 0 3px 12px rgba(46,95,150,.18);
}
.enr-doc-card-icon {
    font-size: 22px;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fb;
    border-radius: 8px;
}
.enr-doc-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.enr-doc-card-name {
    font-size: 12px;
    font-weight: 600;
    color: #1f3a5f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.enr-doc-card-meta {
    font-size: 10px;
    color: #aab4c8;
    display: flex;
    align-items: center;
    gap: 4px;
}
.enr-doc-card-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    background: #eafaf2;
    color: #1a7a47;
    border: 1px solid #a5dfc0;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Estado vacio elegante */
.enr-doc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px 16px;
    color: #aab4c8;
    font-size: 12px;
    text-align: center;
}
.enr-doc-empty i {
    font-size: 28px;
    opacity: .5;
}

@keyframes docFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.enr-doc-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.enr-preview {
    flex: 1;
    border: 1.5px solid #dde3ef;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafbfd;
    overflow: hidden;
    color: #aab4c8;
    font-size: 13px;
}
.enr-preview iframe { width: 100%; height: 100%; border: none; }
.enr-drop-zone {
    padding: 16px;
    border: 2px dashed #c5cfe8;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: border-color .3s, background .3s;
    font-size: 13px;
    color: #7a8aaa;
    background: #f5f8fe;
}
.enr-drop-zone.dragover {
    border-color: #2e5f96;
    background: #eef3ff;
    color: #1f3a5f;
}

button{
    padding:8px 14px;
    border:none;
    background:#1f3a5f;
    color:white;
    border-radius:6px;
    cursor:pointer;
}

button:hover{
    background:#294e7c;
}

/* -- Responsive -- */
@media (max-width: 768px) {
    .conv-cards-grid {
        grid-template-columns: 1fr;
    }
    .enr-grid-2,
    .enr-grid-3 {
        grid-template-columns: 1fr;
    }
    .enr-field.enr-span2,
    .enr-field.enr-span3 {
        grid-column: span 1;
    }
    .enr-docs-container {
        flex-direction: column;
        height: auto;
    }
    .enr-doc-list {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e8ecf4;
        padding-right: 0;
        padding-bottom: 12px;
        max-height: 200px;
    }
    .cards {
        grid-template-columns: 1fr 1fr;
    }
    .container { padding: 14px; }
    .enr-banner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
    .cards { grid-template-columns: 1fr; }
    header h1 { font-size: 16px; }
}
