/* ============================================================
   APP KAPITAL V2
   CLIENTES V2 路 FASE 2A
   ESTILO EJECUTIVO PREMIUM
============================================================ */

.client-v2-prototype {
    margin: 20px 0 26px;
    font-family: "Manrope", sans-serif;
}

.client-v2-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 14px 18px;
    border: 1px solid rgba(129, 41, 144, .16);
    border-radius: 14px;
    background: linear-gradient(
        135deg,
        rgba(129, 41, 144, .07),
        rgba(147, 149, 152, .06)
    );
}

.client-v2-notice strong {
    color: #812990;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    white-space: nowrap;
}

.client-v2-notice span {
    color: #66616a;
    font-size: 12px;
    line-height: 1.45;
}


/* ============================================================
   PESTA脩AS
============================================================ */

.client-v2-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.client-v2-tab {
    min-height: 66px;
    padding: 12px 10px;
    border: 1px solid #ded5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #5c5660;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    cursor: pointer;
    transition:
        background .18s ease,
        color .18s ease,
        border-color .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.client-v2-tab:hover {
    border-color: rgba(129, 41, 144, .45);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(50, 30, 55, .08);
}

.client-v2-tab.active {
    border-color: #812990;
    background: linear-gradient(135deg, #812990, #692274);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(129, 41, 144, .20);
}


/* ============================================================
   CONTENIDO DE PESTA脩AS
============================================================ */

.client-v2-panels {
    width: 100%;
}

.client-v2-panel {
    padding: 22px;
    border: 1px solid rgba(129, 41, 144, .14);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(35, 25, 38, .05);
}

.client-v2-panel[hidden] {
    display: none !important;
}

.client-v2-panel.active {
    display: block;
}

.client-v2-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #eee9f0;
}

.client-v2-section-heading .kicker {
    margin: 0 0 5px;
    color: #812990;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
}

.client-v2-section-heading h4 {
    margin: 0;
    color: #252127;
    font-size: 20px;
    font-weight: 800;
}

.client-v2-section-heading p {
    max-width: 720px;
    margin: 7px 0 0;
    color: #726b75;
    font-size: 12px;
    line-height: 1.55;
}

.client-v2-counter {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #f4edf6;
    color: #812990;
    font-size: 11px;
    font-weight: 800;
}

.client-v2-placeholder {
    padding: 22px;
    border: 1px dashed rgba(129, 41, 144, .28);
    border-radius: 14px;
    background: #fcf9fd;
    color: #706774;
    font-size: 13px;
    line-height: 1.6;
}


/* ============================================================
   FORMULARIO V1
   SE CONSERVA EN EL DOM PARA COMPATIBILIDAD CON app.js,
   PERO QUEDA OCULTO VISUALMENTE DURANTE FASE 2A.
============================================================ */

#clientV2Prototype ~ #clientSteps,
#clientV2Prototype ~ #clientForm {
    display: none !important;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media screen and (max-width: 1200px) {

    .client-v2-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-v2-tab:first-child {
        grid-column: span 2;
    }
}

@media screen and (max-width: 700px) {

    .client-v2-prototype {
        margin-top: 14px;
    }

    .client-v2-notice {
        flex-direction: column;
        align-items: flex-start;
    }

    .client-v2-tabs {
        grid-template-columns: 1fr;
    }

    .client-v2-tab:first-child {
        grid-column: auto;
    }

    .client-v2-tab {
        min-height: 52px;
        text-align: left;
        padding: 12px 14px;
    }

    .client-v2-panel {
        padding: 16px;
        border-radius: 14px;
    }

    .client-v2-section-heading {
        flex-direction: column;
        gap: 12px;
    }

    .client-v2-section-heading h4 {
        font-size: 17px;
    }
}
/* ============================================================
   APP KAPITAL V2 · CLIENTES V2 · FASE 2A-04
   CAMPOS REALES · DATOS DEL SOCIO
============================================================ */

.client-v2-form-shell {
    display: grid;
    gap: 18px;
}

.client-v2-form-section {
    padding: 18px;
    border: 1px solid #e6dce9;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fcf9fd 100%);
}

.client-v2-form-section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee7f0;
}

.client-v2-form-section-title h5 {
    margin: 0;
    color: #5f1d69;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .045em;
}

.client-v2-form-section-title p {
    margin: 5px 0 0;
    color: #756e78;
    font-size: 11px;
    line-height: 1.45;
}

.client-v2-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.client-v2-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.client-v2-field.span-2 {
    grid-column: span 2;
}

.client-v2-field > span {
    color: #49424d;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}

.client-v2-field input,
.client-v2-field select,
.client-v2-field textarea {
    width: 100%;
    min-height: 43px;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d9cedd;
    border-radius: 10px;
    background: #ffffff;
    color: #2e2930;
    font: inherit;
    font-size: 12px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.client-v2-field textarea {
    min-height: 84px;
    resize: vertical;
}

.client-v2-field input:focus,
.client-v2-field select:focus,
.client-v2-field textarea:focus {
    border-color: #812990;
    box-shadow: 0 0 0 3px rgba(129, 41, 144, .11);
}

.client-v2-field.auto input,
.client-v2-field.auto textarea {
    background: #f5f3f6;
    color: #6c6670;
    cursor: not-allowed;
}

.client-v2-field small {
    color: #918a95;
    font-size: 9px;
    font-weight: 700;
}

.client-v2-conditional-section {
    border-color: rgba(129, 41, 144, .24);
    background: linear-gradient(180deg, #fff 0%, #faf5fb 100%);
}

.client-v2-conditional-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #efe2f2;
    color: #812990;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    white-space: nowrap;
}

@media screen and (max-width: 1050px) {
    .client-v2-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 700px) {
    .client-v2-form-section {
        padding: 14px;
    }

    .client-v2-form-grid {
        grid-template-columns: 1fr;
    }

    .client-v2-field.span-2 {
        grid-column: auto;
    }

    .client-v2-form-section-title {
        flex-direction: column;
    }
}
/* ============================================================
   APP KAPITAL V2
   CLIENTES V2 · 2A-06C
   CORRECCIÓN LAYOUT + CAMPOS CONDICIONALES
============================================================ */

/* Las secciones principales deben ir una debajo de otra */
#clientV2PanelDatosSocio .client-v2-form-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    width: 100% !important;
}

/* Cada sección ocupa todo el ancho disponible */
#clientV2PanelDatosSocio .client-v2-form-section {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Los campos dentro de cada sección se organizan en 3 columnas */
#clientV2PanelDatosSocio .client-v2-form-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
    align-items: start !important;
}

/* Cada campo correctamente apilado */
#clientV2PanelDatosSocio .client-v2-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    width: 100%;
}

/* Campos que ocupan dos columnas */
#clientV2PanelDatosSocio .client-v2-field.span-2 {
    grid-column: span 2;
}

/* Inputs y selects siempre al ancho disponible */
#clientV2PanelDatosSocio .client-v2-field input,
#clientV2PanelDatosSocio .client-v2-field select,
#clientV2PanelDatosSocio .client-v2-field textarea {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* MUY IMPORTANTE:
   respetar los campos condicionales ocultos por JavaScript */
#clientV2PanelDatosSocio [hidden] {
    display: none !important;
}

#clientV2PanelDatosSocio .client-v2-minor-only[hidden],
#clientV2PanelDatosSocio .client-v2-beneficiary-only[hidden],
#clientV2PanelDatosSocio .client-v2-legal-only[hidden],
#clientV2SpouseBlock[hidden] {
    display: none !important;
}

/* Títulos más claros */
#clientV2PanelDatosSocio .client-v2-form-section-title {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    margin-bottom: 16px !important;
}

/* Tablet */
@media screen and (max-width: 1050px) {
    #clientV2PanelDatosSocio .client-v2-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Móvil */
@media screen and (max-width: 700px) {
    #clientV2PanelDatosSocio .client-v2-form-grid {
        grid-template-columns: 1fr !important;
    }

    #clientV2PanelDatosSocio .client-v2-field.span-2 {
        grid-column: auto !important;
    }
}
