/* MinTIC — IA para el Estado | Formulario de Inscripción */

/* ===================================================
   VARIABLES
=================================================== */
:root {
    --c-primary:       #184fa4;
    --c-primary-dark:  #0d3272;
    --c-primary-mid:   #1d63d4;
    --c-primary-light: #eef2ff;
    --c-primary-ultra: #f5f8ff;
    --c-gold:          #e9b121;
    --c-gold-dark:     #b5880d;
    --c-border:        #ced9f0;
    --c-border-soft:   #e4ebf8;
    --c-text:          #1a2540;
    --c-text-soft:     #60718a;
    --c-white:         #ffffff;
    --c-surface:       #f6f9ff;

    --shadow-card:  0 6px 48px rgba(10, 30, 80, 0.18), 0 1px 6px rgba(10, 30, 80, 0.08);
    --shadow-input: 0 0 0 4px rgba(24, 79, 164, 0.11);

    --radius-xl: 22px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 7px;

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --tr: all 0.22s var(--ease);
}

/* ===================================================
   BASE
=================================================== */
html, body {
    font-family: 'Plus Jakarta Sans', 'Instrument Sans', system-ui, sans-serif;
    color: var(--c-text);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
    background: url('../img/bg-ia.jpg') center center / cover fixed no-repeat;
}

/* Deep blue cinematic overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(
        150deg,
        rgba(7, 22, 60, 0.88) 0%,
        rgba(15, 52, 120, 0.70) 55%,
        rgba(7, 22, 60, 0.86) 100%
    );
    z-index: 0;
    pointer-events: none;
}

/* ===================================================
   LAYOUT
=================================================== */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2.5rem 1rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

main {
    width: 100%;
    max-width: 740px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* ===================================================
   INTRO CARD
=================================================== */
.contenido-formulario-inscripcion {
    background: var(--c-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    margin: 0 0 1.5rem 0;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
}

/* Gradient accent stripe */
.contenido-formulario-inscripcion::before {
    content: '';
    display: block;
    height: 6px;
    flex-shrink: 0;
    background: linear-gradient(
        90deg,
        var(--c-primary-dark) 0%,
        var(--c-primary)      30%,
        var(--c-primary-mid)  65%,
        var(--c-gold)         100%
    );
}

/* Horizontal padding on text children */
.contenido-formulario-inscripcion > strong,
.contenido-formulario-inscripcion > p {
    padding-left: 2.75rem;
    padding-right: 2.75rem;
    box-sizing: border-box;
}

/* === HEADER (logos + title) === */
.contenido-formulario-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    width: 100%;
    padding: 2.5rem 2.75rem 2rem;
    background: linear-gradient(180deg, #f0f5ff 0%, var(--c-white) 100%);
    border-bottom: 1px solid var(--c-border-soft);
    box-sizing: border-box;
    overflow-x: hidden;
}

.contenido-logo-group {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.contenido-img-titulo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: var(--c-white);
    display: block;
    box-shadow: 0 2px 18px rgba(18, 58, 130, 0.12);
    padding: 0.5rem 1.1rem;
    transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.contenido-img-titulo:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 32px rgba(18, 58, 130, 0.22);
}

.contenido-formulario-title {
    font-family: 'Syne', 'Instrument Sans', sans-serif;
    text-align: center;
    font-weight: 800;
    font-size: 1.55rem;
    color: var(--c-primary);
    margin: 0;
    letter-spacing: -0.6px;
    line-height: 1.2;
    width: 100%;
}

.contenido-formulario-inscripcion > strong {
    display: block;
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--c-primary);
    padding-top: 1.5rem;
    padding-bottom: 0;
    width: 100%;
}

.contenido-formulario-inscripcion > p {
    font-size: 0.92rem;
    margin-bottom: 0;
    line-height: 1.72;
    color: var(--c-text-soft);
    text-align: justify;
    width: 100%;
    padding-top: 0.6rem;
}

/* Terms block */
#terminos-condiciones-block {
    margin: 1.25rem 2.75rem 2.25rem !important;
    max-width: 100% !important;
    padding: 1.5rem !important;
    background: var(--c-surface) !important;
    border: 1.5px solid var(--c-border-soft) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: none !important;
    box-sizing: border-box;
}

h4 {
    font-family: 'Syne', sans-serif;
    color: var(--c-primary);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 0.7rem 0;
    letter-spacing: -0.2px;
    width: 100%;
}

/* ===================================================
   FORM CARD
=================================================== */
main > form {
    background: var(--c-white);
    padding: 2.75rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    margin: 0 0 2.5rem 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: visible;
    border-top: 6px solid var(--c-primary);
}

/* Decorative corner orb */
main > form::after {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(24, 79, 164, 0.055) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Form reveal animation */
#formulario-inscripcion {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.6s var(--ease), max-height 0.8s var(--ease);
    width: 100%;
}

#formulario-inscripcion.visible {
    opacity: 1;
    max-height: 9000px;
    overflow: visible;
}

/* ===================================================
   SECTION HEADERS
=================================================== */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0.25rem 0 1.6rem 0;
    padding: 0.85rem 1.2rem;
    background: linear-gradient(135deg, var(--c-primary-light) 0%, #e8effd 100%);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--c-primary);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.section-badge {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-mid) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem;
    box-shadow: 0 3px 10px rgba(24, 79, 164, 0.38);
    flex-shrink: 0;
}

.section-icon {
    color: var(--c-primary);
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.72;
}

.section-title {
    font-family: 'Syne', sans-serif;
    color: var(--c-primary-dark);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

/* ===================================================
   GRID
=================================================== */
.row {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

[class^="col-"] {
    width: 100%;
    padding: 0;
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* ===================================================
   LABELS
=================================================== */
label {
    display: block;
    font-weight: 600;
    font-size: 0.84rem;
    margin-bottom: 0.42em;
    color: var(--c-text);
    letter-spacing: 0.1px;
    text-transform: none;
}

/* ===================================================
   INPUTS & SELECTS
=================================================== */
.form-control,
select,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.65em 0.9em;
    border-radius: var(--radius-sm);
    border: 1.5px solid #cad3e8;
    box-sizing: border-box;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--c-white);
    color: var(--c-text);
    transition: var(--tr);
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23184fa4' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9em center;
    padding-right: 2.6em;
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 88px;
}

/* Hover */
.form-control:hover,
select:hover,
input[type="text"]:hover,
input[type="email"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="tel"]:hover {
    border-color: #a2b8e0;
}

/* Focus */
.form-control:focus,
select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none !important;
    border-color: var(--c-primary) !important;
    box-shadow: var(--shadow-input) !important;
    background: #fafcff;
}

/* ===================================================
   FILE INPUT
=================================================== */
.form-control-file,
input[type="file"] {
    width: 100%;
    padding: 0.5em 0.85em;
    border-radius: var(--radius-sm);
    border: 1.5px solid #cad3e8;
    box-sizing: border-box;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--c-white);
    color: var(--c-text-soft);
    cursor: pointer;
    transition: var(--tr);
    margin: 0;
}

input[type="file"]::-webkit-file-upload-button {
    background: var(--c-primary-light);
    color: var(--c-primary);
    border: 1px solid var(--c-border);
    border-radius: 5px;
    padding: 0.32em 0.9em;
    font-size: 0.84rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-right: 0.75em;
    transition: var(--tr);
}

input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
}

/* ===================================================
   RADIOS / CHECKBOXES
=================================================== */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.55em;
    margin-bottom: 0.32em;
    cursor: pointer;
}

.form-check-input {
    margin-left: 0;
    width: 1.2em;
    height: 1.2em;
    accent-color: var(--c-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-label {
    cursor: pointer;
    font-size: 0.93rem;
    line-height: 1.4;
}

.form-check-input-term {
    width: 1.35em;
    height: 1.35em;
    accent-color: var(--c-primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* ===================================================
   SEPARATORS
=================================================== */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--c-border-soft) 18%, var(--c-border-soft) 82%, transparent 100%);
    margin: 1.75rem 0 1.5rem 0;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ===================================================
   VALIDATION FEEDBACK
=================================================== */
.invalid-feedback,
.invalid-feedback.d-block {
    display: block;
    margin-top: 0.3em;
    font-size: 0.8em;
    color: #d32f2f;
    font-weight: 500;
}

.alert-danger {
    font-size: 0.92rem;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.1rem;
    background: #fff5f5;
    color: #9b1c1c;
    border: 1.5px solid #fecaca;
    display: flex;
    align-items: flex-start;
    gap: 0.7em;
    margin-bottom: 1.25rem;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* ===================================================
   SUBMIT BUTTON
=================================================== */
.btn,
.btn-primary {
    width: 100%;
    margin-top: 1.75rem;
    font-family: 'Syne', 'Instrument Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 0.92em 0;
    border-radius: var(--radius-md) !important;
    border: none !important;
    background: linear-gradient(135deg, var(--c-primary-dark) 0%, var(--c-primary) 45%, var(--c-primary-mid) 100%) !important;
    color: #fff !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 28px rgba(13, 50, 114, 0.42) !important;
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease) !important;
    z-index: 1;
}

/* Shimmer sweep on hover */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -110%;
    width: 65%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.24) 50%, transparent 100%);
    transform: skewX(-18deg);
    transition: left 0.58s var(--ease);
    pointer-events: none;
}

.btn-primary:hover::after {
    left: 160%;
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(13, 50, 114, 0.52) !important;
    outline: none;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 3px 14px rgba(13, 50, 114, 0.32) !important;
}

/* ===================================================
   DIVIPOLA BADGE
=================================================== */
.divipola-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.28em;
    margin-top: 0.38em;
    font-size: 0.78rem;
    color: var(--c-primary);
    background: var(--c-primary-light);
    border: 1px solid var(--c-border);
    border-radius: 5px;
    padding: 0.17em 0.65em;
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* ===================================================
   ENTITY AUTOCOMPLETE
=================================================== */
.col-12.col-md-6.mb-3 {
    position: relative;
}

#entidad_suggestions {
    max-height: 260px;
    overflow-y: auto;
    border: 1.5px solid var(--c-border);
    border-top: none;
    background: var(--c-white);
    box-shadow: 0 10px 32px rgba(13, 50, 114, 0.14);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    width: 100%;
    z-index: 200;
    left: 0;
    right: 0;
}

#entidad_suggestions .list-group-item {
    cursor: pointer;
    font-size: 0.9em;
    white-space: normal;
    padding: 0.55em 1em;
    border: none;
    background: transparent;
    transition: background 0.15s ease, color 0.15s ease;
    width: 100%;
    display: block;
    box-sizing: border-box;
    text-align: left;
    border-bottom: 1px solid #eef3ff;
    color: var(--c-text);
}

#entidad_suggestions .list-group-item:hover,
#entidad_suggestions .list-group-item:focus {
    background: var(--c-primary);
    color: #fff;
}

/* ===================================================
   BADGE YES/NO (terms)
=================================================== */
.dash-badge-yes {
    background: #dcfce7;
    color: #15803d;
    padding: 0.2em 0.6em;
    border-radius: 5px;
    font-size: 0.82em;
    font-weight: 700;
}
.dash-badge-no {
    background: #fee2e2;
    color: #b91c1c;
    padding: 0.2em 0.6em;
    border-radius: 5px;
    font-size: 0.82em;
    font-weight: 700;
}

/* ===================================================
   RESPONSIVE
=================================================== */
@media (max-width: 650px) {
    .container { padding: 1.25rem 0.5rem; }

    .contenido-formulario-inscripcion {
        border-radius: var(--radius-lg);
        margin: 0 0 1.25rem 0;
    }

    .contenido-formulario-header {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .contenido-formulario-inscripcion > strong,
    .contenido-formulario-inscripcion > p {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .contenido-formulario-title { font-size: 1.22rem; }

    .contenido-img-titulo {
        width: 72px;
        height: 72px;
        padding: 0.4rem 0.75rem;
    }

    .contenido-logo-group { gap: 1.5rem; }

    #terminos-condiciones-block {
        margin: 1rem 1.25rem 1.5rem !important;
    }

    main > form {
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius-lg);
        margin-bottom: 1.5rem;
    }

    .section-header { padding: 0.7rem 0.9rem; }
}

@media (max-width: 400px) {
    .container { padding: 0.75rem 0.35rem; }

    .contenido-formulario-title { font-size: 1rem; }

    .contenido-img-titulo {
        width: 56px;
        height: 56px;
        padding: 0.3rem 0.5rem;
    }

    main > form {
        padding: 1.1rem 0.85rem;
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
    }

    label { font-size: 0.82rem; }

    .btn-primary {
        font-size: 0.95rem;
        padding: 0.82em 0;
    }
}

@media (max-width: 576px) {
    #entidad_suggestions { max-height: 200px; }
    #entidad_suggestions .list-group-item {
        padding: 0.5em 0.75em;
        font-size: 0.88em;
    }
}

/* ===================================================
   MULTI-STEP FORM
=================================================== */
.form-step {
    display: none;
    flex-direction: column;
    width: 100%;
    animation: stepFadeIn 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-step.active {
    display: flex;
}

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================================================
   STEPS PROGRESS BAR
=================================================== */
.steps-progress {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    margin-bottom: 2.25rem;
    padding: 0 0.25rem;
    width: 100%;
    box-sizing: border-box;
}

.step-connector {
    position: absolute;
    top: 17px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--c-border-soft);
    z-index: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    flex: 1;
    cursor: default;
}

.step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e8eef7;
    border: 2px solid var(--c-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--c-text-soft);
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
                box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.step-item.active .step-dot {
    background: linear-gradient(135deg, var(--c-primary-dark), var(--c-primary-mid));
    border-color: var(--c-primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(24, 79, 164, 0.45);
    transform: scale(1.12);
}

.step-item.done .step-dot {
    background: var(--c-primary);
    border-color: var(--c-primary-dark);
    color: #fff;
}

.step-item.done .step-dot span { display: none; }

.step-item.done .step-dot::after {
    content: '✓';
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
}

.step-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--c-text-soft);
    font-family: 'Syne', sans-serif;
    text-align: center;
    transition: color 0.3s var(--ease);
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.step-item.active .step-label { color: var(--c-primary); }
.step-item.done .step-label   { color: var(--c-primary-dark); }

/* ===================================================
   STEP NAVIGATION BUTTONS
=================================================== */
.step-nav {
    display: flex;
    gap: 0.85rem;
    margin-top: 2rem;
    width: 100%;
    align-items: stretch;
}

.btn-step {
    font-family: 'Syne', 'Instrument Sans', sans-serif;
    font-size: 0.97rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.78em 1.5em;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55em;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
                background 0.2s var(--ease);
}

.btn-next-step {
    background: linear-gradient(135deg, var(--c-primary-dark), var(--c-primary-mid));
    color: #fff;
    box-shadow: 0 4px 20px rgba(13, 50, 114, 0.38);
    flex: 1;
}

.btn-next-step:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(13, 50, 114, 0.48);
}

.btn-next-step:active:not(:disabled) { transform: translateY(0); }

.btn-next-step:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
    filter: grayscale(0.2);
}

.btn-prev-step {
    background: var(--c-surface);
    color: var(--c-primary);
    border: 1.5px solid var(--c-border);
    min-width: 110px;
}

.btn-prev-step:hover {
    background: var(--c-primary-light);
    border-color: var(--c-primary);
}

/* Submit inside step-nav */
.step-nav .btn-primary.btn-submit-step {
    flex: 1;
    margin-top: 0 !important;
    width: auto !important;
}

/* Shake on invalid */
@keyframes btnShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.btn-shake { animation: btnShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }

/* ===================================================
   STEP PROGRESS RESPONSIVE
=================================================== */
@media (max-width: 500px) {
    .step-label { font-size: 0.62rem; }
    .step-dot   { width: 28px; height: 28px; font-size: 0.78rem; }
    .step-connector { top: 14px; }
    .btn-prev-step { min-width: 80px; font-size: 0.88rem; }
}

/* ===================================================
   PERSONA CARDS
=================================================== */
.persona-card {
    background: var(--c-white);
    border: 1.5px solid var(--c-border-soft);
    border-left: 4px solid var(--c-primary);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(10, 30, 80, 0.08);
    animation: stepFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
}

@keyframes fadeOutCard {
    from { opacity: 1; transform: translateY(0); max-height: 1000px; }
    to   { opacity: 0; transform: translateY(-10px); max-height: 0; overflow: hidden; }
}
.persona-card.removing {
    animation: fadeOutCard 0.3s ease forwards;
}

.persona-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(135deg, var(--c-primary-light) 0%, #e8effd 100%);
    border-bottom: 1.5px solid var(--c-border-soft);
}

.persona-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 0.96rem;
    color: var(--c-primary-dark);
}

.persona-badge-num {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-mid) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.82rem;
    box-shadow: 0 2px 8px rgba(24, 79, 164, 0.35);
    flex-shrink: 0;
}

.btn-remove-persona {
    background: transparent;
    border: 1.5px solid #fca5a5;
    color: #ef4444;
    border-radius: var(--radius-sm);
    padding: 0.28em 0.7em;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--tr);
    display: flex;
    align-items: center;
    gap: 0.3em;
    font-family: inherit;
}

.btn-remove-persona:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

.persona-card-body {
    padding: 1.4rem 1.5rem;
}

.persona-subseccion {
    margin-bottom: 1.4rem;
}

.persona-subseccion-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--c-primary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 0.9rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1.5px solid var(--c-border-soft);
    width: 100%;
}

.persona-subseccion-title i { font-size: 0.86rem; opacity: 0.7; }

.btn-agregar-persona {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55em;
    width: 100%;
    padding: 0.85em;
    background: var(--c-surface);
    border: 2px dashed var(--c-border);
    border-radius: var(--radius-md);
    color: var(--c-primary);
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--tr);
    margin-bottom: 1.75rem;
    box-sizing: border-box;
}

.btn-agregar-persona:hover {
    background: var(--c-primary-light);
    border-color: var(--c-primary);
    transform: translateY(-2px);
}

.info-personas-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: linear-gradient(135deg, #eff6ff 0%, #e0ecff 100%);
    border: 1.5px solid var(--c-border);
    border-left: 4px solid var(--c-primary);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.15rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--c-primary-dark);
    font-weight: 600;
}

input:disabled,
input[disabled] {
    background: #f0f4f8 !important;
    opacity: 0.65;
    cursor: not-allowed;
}

.nit-note {
    font-size: 0.78rem;
    color: var(--c-text-soft);
    margin-top: 0.28em;
}

@media (max-width: 650px) {
    .persona-card-body { padding: 1rem 1.1rem; }
}

/* NIT field flash when enabled */
@keyframes nitFlash {
    0%   { box-shadow: 0 0 0 0 rgba(24,79,164,0.5); border-color: var(--c-primary); }
    50%  { box-shadow: 0 0 0 6px rgba(24,79,164,0.15); border-color: var(--c-primary-mid); }
    100% { box-shadow: none; border-color: var(--c-primary); }
}
.nit-enabled-flash { animation: nitFlash 0.55s ease; }

/* ===================================================
   ENTITY COMBOBOX
=================================================== */
.entidad-combobox-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.entidad-combobox-input {
    cursor: pointer;
    border-radius: var(--radius-sm) !important;
    padding-right: 2.8em !important;
    background-image: none !important;
}

.entidad-combobox-input:not([readonly]) {
    cursor: text;
    background: #fafcff !important;
    border-color: var(--c-primary) !important;
    box-shadow: var(--shadow-input) !important;
}

.entidad-combobox-arrow {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2.5rem;
    background: transparent;
    border: none;
    color: var(--c-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.15s ease;
    z-index: 2;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.entidad-combobox-arrow:hover { color: var(--c-primary-mid); }

#entidad_suggestions {
    max-height: 280px;
    overflow-y: auto;
    border: 1.5px solid var(--c-border);
    border-top: none;
    background: var(--c-white);
    box-shadow: 0 12px 36px rgba(13, 50, 114, 0.16);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

#entidad_suggestions .list-group-item {
    cursor: pointer;
    font-size: 0.88em;
    padding: 0.52em 1em;
    border: none;
    background: transparent;
    transition: background 0.12s ease, color 0.12s ease;
    width: 100%;
    display: block;
    box-sizing: border-box;
    text-align: left;
    border-bottom: 1px solid #f0f4ff;
    color: var(--c-text);
}

#entidad_suggestions .list-group-item:hover,
#entidad_suggestions .list-group-item.kbd-active {
    background: var(--c-primary);
    color: #fff;
}

#entidad_suggestions .list-group-item.kbd-active mark {
    background: #ffe14d;
    color: #184fa4;
}
