.hg-simulador-page {
    font-family: 'Poppins', sans-serif;
    background: #f6faf7;
}

.hg-credit-hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0 54px;
    background:
        radial-gradient(circle at 86% 60%, rgba(255, 198, 66, 0.18), transparent 24%),
        radial-gradient(circle at 12% 16%, rgba(31, 116, 201, 0.34), transparent 30%),
        linear-gradient(135deg, #073f86 0%, #075d5c 42%, #0f7a4f 100%);
    border-top: 5px solid #18c98b;
}

.hg-credit-hero::before,
.hg-credit-hero::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(215, 166, 47, 0.22);
    border-radius: 50%;
    pointer-events: none;
}

.hg-credit-hero::before {
    width: 360px;
    height: 360px;
    left: -120px;
    top: -160px;
}

.hg-credit-hero::after {
    width: 520px;
    height: 520px;
    right: 260px;
    top: 70px;
}

.hg-credit-hero-box {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.62fr);
    gap: 48px;
    align-items: center;
}

.hg-credit-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border: 1px solid rgba(215, 166, 47, 0.75);
    border-radius: 999px;
    color: #ffc642;
    background: rgba(8, 56, 42, 0.72);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hg-simulador-page .hg-credit-hero-copy h1 {
    margin: 24px 0 18px;
    max-width: 790px;
    color: #ffffff !important;
    font-size: clamp(38px, 4.2vw, 66px);
    line-height: 1.06;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1.4px;
    text-shadow: 0 16px 34px rgba(0, 24, 42, 0.36);
}

.hg-simulador-page .hg-credit-hero-copy h1::after {
    content: "";
    display: block;
    width: 78px;
    height: 5px;
    margin-top: 24px;
    border-radius: 999px;
    background: #ffc642;
}

.hg-simulador-page .hg-credit-hero-copy p {
    max-width: 670px;
    margin: 0;
    color: rgba(255, 255, 255, 0.90) !important;
    font-size: 17px;
    line-height: 1.72;
}

.hg-credit-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
}

.hg-credit-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hg-credit-trust-row i {
    color: #ffc642;
}

.hg-credit-rate-panel {
    padding: 22px;
    border-radius: 24px;
    background: rgba(5, 60, 43, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(8px);
}

.hg-rate-panel-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.hg-rate-logo {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffe28c, #d7a62f);
    color: #0f5132;
    box-shadow: 0 10px 20px rgba(215, 166, 47, 0.18);
}

.hg-rate-panel-head strong {
    display: block;
    color: #ffc642;
    font-size: 26px;
    line-height: 1.1;
}

.hg-rate-panel-head small {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    margin-top: 4px;
}

.hg-rate-list {
    display: grid;
    gap: 8px;
}

.hg-rate-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fffdf2, #f7edcf);
    color: #164737;
    font-weight: 800;
}

.hg-rate-item span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.hg-rate-item i {
    color: #0f6f4c;
    width: 18px;
    text-align: center;
}

.hg-rate-item strong {
    color: #d19922;
    font-size: 19px;
}

.hg-simulador-section {
    padding: 58px 0 74px;
    background: #f6faf7;
}

.hg-simulador-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
    gap: 26px;
    align-items: start;
}

.hg-simulador-form,
.hg-simulador-resultados,
.hg-tabla-wrap {
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(20, 112, 74, 0.12);
    box-shadow: 0 18px 45px rgba(18, 62, 41, 0.10);
}

.hg-simulador-form {
    padding: 28px;
    height: 100%;
}

.hg-simulador-form-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 22px;
    margin-bottom: 22px;
}

.hg-simulador-form-head h2 {
    margin: 0 0 6px;
    color: #103d2d;
    font-size: 25px;
}

.hg-simulador-form-head h2 i {
    color: #d7a62f;
    margin-right: 8px;
}

.hg-simulador-form-head p {
    margin: 0;
    color: #65776e;
    font-size: 13px;
    line-height: 1.55;
}

.hg-mini-rate-box {
    min-width: 130px;
    padding: 12px 15px;
    border-radius: 18px;
    text-align: center;
    background: linear-gradient(135deg, #f7edcf, #fffaf0);
    border: 1px solid rgba(215, 166, 47, 0.42);
}

.hg-mini-rate-box span {
    display: block;
    color: #60746a;
    font-size: 12px;
    margin-bottom: 2px;
}

.hg-mini-rate-box strong {
    color: #0f6f4c;
    font-size: 25px;
}

.hg-form-grid {
    display: grid;
    gap: 18px;
}

.hg-form-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.hg-form-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hg-date-amortizacion-row {
    margin-top: 22px;
    display: grid;
    grid-template-columns: minmax(240px, 0.62fr) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.hg-fecha-box {
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fffdf5, #eef8f2);
    border: 1px solid #dbece2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 14px;
    align-items: center;
}

.hg-fecha-box label {
    display: block;
    font-weight: 800;
    color: #113c2c;
    margin-bottom: 6px;
    font-size: 13px;
}

.hg-fecha-box p {
    margin: 0;
    color: #65776e;
    font-size: 12px;
    line-height: 1.45;
}

.hg-fecha-box input {
    width: 100%;
    height: 46px;
    border-radius: 14px;
    border: 1px solid #d8e7df;
    background: #ffffff;
    padding: 0 12px;
    font-size: 14px;
    color: #173c2f;
    outline: none;
}

.hg-fecha-box input:focus {
    border-color: #0f8f5f;
    box-shadow: 0 0 0 4px rgba(15, 143, 95, 0.11);
}

.hg-field label,
.hg-amortizacion-selector label {
    display: block;
    font-weight: 800;
    color: #113c2c;
    margin-bottom: 8px;
    font-size: 13px;
}

.hg-field input,
.hg-field select,
.hg-readonly-box {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    border: 1px solid #d8e7df;
    background: #fbfdfc;
    padding: 0 14px;
    font-size: 14px;
    color: #173c2f;
    outline: none;
    transition: all 0.2s ease;
}

.hg-field input:focus,
.hg-field select:focus {
    border-color: #0f8f5f;
    box-shadow: 0 0 0 4px rgba(15, 143, 95, 0.11);
}

.hg-amortizacion-selector {
    margin-top: 0;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f9fbf5, #eef8f2);
    border: 1px solid #dbece2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.hg-amortizacion-selector p {
    margin: 0;
    color: #65776e;
    font-size: 13px;
}

.hg-amortizacion-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #d8e7df;
}

.hg-amortizacion-toggle label {
    margin: 0;
    cursor: pointer;
}

.hg-amortizacion-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hg-amortizacion-toggle span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 106px;
    height: 39px;
    padding: 0 20px;
    border-radius: 999px;
    color: #49665b;
    font-weight: 800;
    transition: all 0.18s ease;
}

.hg-amortizacion-toggle input:checked + span {
    background: linear-gradient(135deg, #0d7a50, #13a86d);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(19, 168, 109, 0.20);
}

.hg-descuentos-box {
    margin-top: 22px;
    padding: 20px;
    border-radius: 18px;
    background: #fbfdfc;
    border: 1px solid #dbece2;
}

.hg-descuentos-box h3 {
    margin: 0 0 14px;
    color: #103d2d;
    font-size: 18px;
}

.hg-descuentos-box h3 i {
    color: #d1a02d;
    margin-right: 6px;
}

.hg-descuentos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hg-descuentos-grid span {
    display: block;
    padding: 12px;
    border-radius: 14px;
    background: #ffffff;
    color: #51635b;
    font-size: 13px;
    line-height: 1.45;
    border: 1px solid #eef3ef;
}

.hg-descuentos-grid strong {
    color: #0e6c49;
}

.hg-form-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hg-simular-btn,
.hg-limpiar-btn,
.hg-imprimir-btn {
    border: none;
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hg-simular-btn {
    background: linear-gradient(135deg, #0d7a50, #13a86d);
    color: #ffffff;
    box-shadow: 0 12px 25px rgba(19, 168, 109, 0.22);
}

.hg-limpiar-btn,
.hg-imprimir-btn {
    background: #eef5f1;
    color: #0e6143;
}

.hg-simular-btn:hover,
.hg-limpiar-btn:hover,
.hg-imprimir-btn:hover {
    transform: translateY(-2px);
}

.hg-simulador-resultados {
    padding: 24px;
    min-height: auto;
    height: 100%;
    display: flex;
}

.hg-resultado-placeholder {
    min-height: auto;
    width: 100%;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #60746a;
}

.hg-resultado-placeholder i {
    font-size: 52px;
    color: #d7a62f;
    margin-bottom: 16px;
}

.hg-resultado-card {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.hg-resultado-card h3 {
    margin: 0 0 16px;
    color: #103d2d;
    font-size: 23px;
}

.hg-resultado-kpi {
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, #0f6f4c, #12a06a);
    color: white;
    text-align: center;
    margin-bottom: 18px;
}

.hg-resultado-kpi span {
    display: block;
    opacity: 0.88;
    font-size: 13px;
    margin-bottom: 5px;
}

.hg-resultado-kpi strong {
    display: block;
    font-size: 32px;
    line-height: 1.12;
}

.hg-resultado-kpi small {
    display: block;
    margin-top: 6px;
    opacity: 0.82;
}

.hg-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.hg-metric-card {
    padding: 13px;
    border-radius: 16px;
    background: #f7fbf8;
    border: 1px solid #e2eee7;
}

.hg-metric-card span {
    display: block;
    color: #60746a;
    font-size: 12px;
    line-height: 1.35;
}

.hg-metric-card strong {
    display: block;
    margin-top: 5px;
    color: #0f5132;
    font-size: 16px;
}

.hg-metric-card.hg-total {
    background: linear-gradient(135deg, #fff8df, #ffffff);
    border-color: rgba(215, 166, 47, 0.42);
}

.hg-resumen-lista {
    display: grid;
    gap: 4px;
}

.hg-resumen-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid #eef3ef;
    color: #4c6258;
    font-size: 13px;
}

.hg-resumen-item strong {
    color: #0f5132;
    text-align: right;
}

.hg-nota-simulador {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #f7fbf8;
    font-size: 12px;
    color: #70837a;
    line-height: 1.55;
}

.hg-tabla-wrap {
    margin-top: 28px;
    padding: 22px;
}

.hg-tabla-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.hg-tabla-head h3 {
    margin: 0;
    color: #103d2d;
    font-size: 20px;
}

.hg-tabla-head h3 i {
    color: #d1a02d;
    margin-right: 6px;
}

.hg-tabla-head p {
    margin: 4px 0 0;
    color: #60746a;
    font-size: 13px;
}

.hg-tabla-scroll {
    overflow-x: auto;
}

.hg-amortizacion-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1180px;
    font-size: 13px;
}

.hg-amortizacion-table th {
    background: #0f6f4c;
    color: #ffffff;
    text-align: right;
    padding: 13px 12px;
    white-space: nowrap;
}

.hg-amortizacion-table th:first-child,
.hg-amortizacion-table td:first-child {
    text-align: center;
}

.hg-amortizacion-table td {
    padding: 12px;
    border-bottom: 1px solid #ecf2ee;
    text-align: right;
    color: #385247;
}

.hg-amortizacion-table tr:hover td {
    background: #f8fbf9;
}

.hg-error-simulador {
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff2f0;
    color: #a93525;
    font-weight: 700;
    margin-top: 14px;
}

@media (max-width: 1200px) {
    .hg-form-grid-5,
    .hg-form-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .hg-credit-hero-box,
    .hg-simulador-panel {
        grid-template-columns: 1fr;
    }

    .hg-descuentos-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hg-credit-hero {
        padding: 36px 0 32px;
    }

    .hg-credit-hero-copy h1 {
        font-size: 34px;
    }

    .hg-form-grid-5,
    .hg-form-grid-4,
    .hg-metric-grid {
        grid-template-columns: 1fr;
    }

    .hg-simulador-form,
    .hg-simulador-resultados,
    .hg-tabla-wrap {
        padding: 18px;
        border-radius: 18px;
    }

    .hg-simulador-form-head,
    .hg-amortizacion-selector,
    .hg-tabla-head {
        flex-direction: column;
        align-items: stretch;
    }

    .hg-amortizacion-toggle {
        width: 100%;
    }

    .hg-amortizacion-toggle label,
    .hg-amortizacion-toggle span {
        width: 100%;
    }
}

@media print {
    .topbar,
    .menu-hermes-wrap,
    .hg-footer,
    .scrollup,
    .hg-simulador-form,
    .hg-credit-hero,
    .hg-imprimir-btn {
        display: none !important;
    }

    .hg-simulador-section {
        background: white;
        padding: 0;
    }

    .hg-simulador-panel {
        display: block;
    }

    .hg-simulador-resultados,
    .hg-tabla-wrap {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}


/* ============================================================
   AJUSTE VISUAL V9 - Simulador de créditos
   ============================================================ */
.hg-simulador-page .hg-credit-hero {
    padding: 58px 0 50px;
    background:
        radial-gradient(circle at 82% 54%, rgba(255, 198, 66, 0.16), transparent 25%),
        radial-gradient(circle at 14% 14%, rgba(24, 201, 139, 0.18), transparent 30%),
        linear-gradient(120deg, #073f86 0%, #05516b 34%, #08764d 100%);
}

.hg-simulador-page .hg-credit-hero-box {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
    gap: 42px;
}

.hg-simulador-page .hg-credit-hero-copy h1 {
    max-width: 760px;
    color: #ffffff !important;
    font-size: clamp(36px, 4vw, 60px);
    line-height: 1.08;
    letter-spacing: -1px;
    text-shadow: 0 16px 38px rgba(0, 26, 54, 0.42);
}

.hg-simulador-page .hg-credit-hero-copy p {
    max-width: 660px;
    color: rgba(255, 255, 255, 0.92) !important;
}

.hg-simulador-page .hg-credit-rate-panel {
    background: linear-gradient(150deg, rgba(7, 63, 134, 0.90), rgba(4, 82, 62, 0.92));
}

.hg-simulador-page .hg-rate-item {
    background: linear-gradient(135deg, #ffffff, #edf8f2);
    border: 1px solid rgba(255, 255, 255, 0.58);
}

.hg-credit-config-row {
    margin-top: 22px;
    display: grid;
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.hg-config-date-card,
.hg-config-amort-card {
    min-height: 116px;
    border-radius: 20px;
    border: 1px solid #dbece2;
    background: linear-gradient(135deg, #ffffff, #f2fbf6);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.hg-config-date-card {
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 9px;
}

.hg-config-date-card label,
.hg-config-amort-card label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #103d2d;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
}

.hg-config-date-card label i,
.hg-config-amort-card label i {
    color: #d7a62f;
}

.hg-config-date-card input {
    width: 100%;
    height: 44px;
    border-radius: 14px;
    border: 1px solid #d8e7df;
    background: #ffffff;
    padding: 0 12px;
    color: #173c2f;
    font-size: 14px;
    outline: none;
}

.hg-config-date-card small,
.hg-config-amort-card small {
    display: block;
    color: #65776e;
    font-size: 11px;
    line-height: 1.35;
}

.hg-config-amort-card {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hg-config-amort-info {
    display: grid;
    gap: 7px;
}

.hg-config-amort-card .hg-amortizacion-toggle {
    flex: 0 0 auto;
    min-width: 265px;
}

.hg-config-amort-card .hg-amortizacion-toggle span {
    min-width: 118px;
}

.hg-amortizacion-table {
    min-width: 1040px;
}

@media (max-width: 1200px) {
    .hg-credit-config-row {
        grid-template-columns: 1fr;
    }

    .hg-config-amort-card {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .hg-config-amort-card {
        display: grid;
        gap: 14px;
    }

    .hg-config-amort-card .hg-amortizacion-toggle {
        width: 100%;
        min-width: 0;
    }
}


/* Corrección v10: evitar que el selector Francés/Alemán se salga de la tarjeta */
.hg-credit-config-row {
    grid-template-columns: minmax(205px, 235px) minmax(0, 1fr);
}

.hg-config-amort-card {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(220px, 250px);
    align-items: center;
    gap: 14px;
    overflow: hidden;
}

.hg-config-amort-card .hg-amortizacion-toggle {
    width: 100%;
    min-width: 0;
    max-width: 250px;
    justify-self: end;
    box-sizing: border-box;
}

.hg-config-amort-card .hg-amortizacion-toggle label {
    flex: 1 1 0;
    min-width: 0;
}

.hg-config-amort-card .hg-amortizacion-toggle span {
    width: 100%;
    min-width: 0;
    padding: 0 12px;
    box-sizing: border-box;
    white-space: nowrap;
}

@media (max-width: 1320px) {
    .hg-credit-config-row {
        grid-template-columns: 1fr;
    }

    .hg-config-amort-card {
        grid-template-columns: minmax(150px, 1fr) minmax(220px, 250px);
    }
}

@media (max-width: 560px) {
    .hg-config-amort-card {
        grid-template-columns: 1fr;
    }

    .hg-config-amort-card .hg-amortizacion-toggle {
        max-width: none;
        justify-self: stretch;
    }
}


/* Corrección v11: configuración de fecha/amortización y hero premium */
.hg-simulador-page .hg-credit-hero {
    padding: 58px 0 50px;
    background:
        radial-gradient(circle at 83% 52%, rgba(255, 198, 66, 0.14), transparent 26%),
        radial-gradient(circle at 12% 12%, rgba(25, 201, 139, 0.18), transparent 30%),
        linear-gradient(135deg, #073b7c 0%, #07535e 42%, #0e7a4d 100%) !important;
}

.hg-simulador-page .hg-credit-hero-copy h1 {
    color: #ffffff !important;
    text-shadow: 0 14px 35px rgba(0, 18, 42, 0.45);
    max-width: 720px;
}

.hg-simulador-page .hg-credit-hero-copy p {
    color: rgba(255, 255, 255, 0.94) !important;
    max-width: 650px;
}

.hg-simulador-page .hg-credit-rate-panel {
    background: linear-gradient(145deg, rgba(4, 49, 82, 0.92), rgba(5, 97, 66, 0.90)) !important;
    border: 1px solid rgba(255, 255, 255, 0.20);
}

.hg-credit-config-row {
    margin-top: 20px;
    display: grid !important;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr) !important;
    gap: 16px;
    align-items: stretch;
}

.hg-config-date-card,
.hg-config-amort-card {
    min-width: 0;
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #f1faf5);
    border: 1px solid #d9ece2;
    box-shadow: 0 12px 28px rgba(17, 83, 57, 0.07);
}

.hg-config-date-card {
    padding: 16px 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 155px;
    grid-template-areas:
        "label input"
        "note input";
    gap: 6px 14px;
    align-items: center;
}

.hg-config-date-card label {
    grid-area: label;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #103d2d;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
}

.hg-config-date-card input {
    grid-area: input;
    width: 100%;
    min-width: 0;
    height: 46px;
    border-radius: 12px;
}

.hg-config-date-card small {
    grid-area: note;
    color: #697d73;
    font-size: 11.5px;
    line-height: 1.35;
}

.hg-config-amort-card {
    padding: 16px 18px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 236px) !important;
    align-items: center;
    gap: 14px;
    overflow: visible !important;
}

.hg-config-amort-info {
    min-width: 0;
}

.hg-config-amort-info label {
    margin: 0 0 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #103d2d;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
}

.hg-config-amort-info small {
    color: #697d73;
    font-size: 11.5px;
    line-height: 1.35;
}

.hg-config-amort-card .hg-amortizacion-toggle {
    justify-self: end;
    width: 100% !important;
    max-width: 236px !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    overflow: visible;
    box-sizing: border-box;
}

.hg-config-amort-card .hg-amortizacion-toggle label {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.hg-config-amort-card .hg-amortizacion-toggle span {
    width: 100%;
    min-width: 0 !important;
    height: 40px;
    padding: 0 8px !important;
    font-size: 13px;
    text-align: center;
    box-sizing: border-box;
}

.hg-amortizacion-table {
    min-width: 980px !important;
}

@media (max-width: 1180px) {
    .hg-credit-config-row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 620px) {
    .hg-config-date-card,
    .hg-config-amort-card {
        grid-template-columns: 1fr !important;
    }

    .hg-config-date-card {
        grid-template-areas:
            "label"
            "input"
            "note";
    }

    .hg-config-amort-card .hg-amortizacion-toggle {
        max-width: none !important;
        justify-self: stretch;
    }
}


/* Corrección v12: fecha y sistema de amortización sin textos partidos */
.hg-credit-config-row {
    grid-template-columns: minmax(280px, 0.95fr) minmax(420px, 1.35fr) !important;
    gap: 18px !important;
}

.hg-config-date-card {
    grid-template-columns: minmax(100px, 1fr) 168px !important;
    grid-template-areas:
        "label input"
        "note input" !important;
    column-gap: 16px !important;
    align-items: center !important;
    padding: 18px !important;
}

.hg-config-date-card label,
.hg-config-amort-info label {
    align-items: flex-start !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
}

.hg-config-date-card label i,
.hg-config-amort-info label i {
    margin-top: 2px;
    flex: 0 0 auto;
}

.hg-config-date-card small,
.hg-config-amort-info small {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
}

.hg-config-date-card input {
    width: 168px !important;
    max-width: 100% !important;
}

.hg-config-amort-card {
    grid-template-columns: minmax(150px, 0.8fr) minmax(260px, 1fr) !important;
    gap: 18px !important;
    padding: 18px !important;
}

.hg-config-amort-card .hg-amortizacion-toggle {
    max-width: 300px !important;
    min-width: 260px !important;
    justify-self: end !important;
}

.hg-config-amort-card .hg-amortizacion-toggle span {
    height: 42px !important;
    font-size: 14px !important;
}

@media (max-width: 1180px) {
    .hg-credit-config-row {
        grid-template-columns: 1fr !important;
    }

    .hg-config-date-card {
        grid-template-columns: minmax(120px, 1fr) 180px !important;
    }
}

@media (max-width: 620px) {
    .hg-config-date-card,
    .hg-config-amort-card {
        grid-template-columns: 1fr !important;
    }

    .hg-config-date-card {
        grid-template-areas:
            "label"
            "input"
            "note" !important;
    }

    .hg-config-date-card input {
        width: 100% !important;
    }

    .hg-config-amort-card .hg-amortizacion-toggle {
        min-width: 0 !important;
        max-width: none !important;
        width: 100% !important;
        justify-self: stretch !important;
    }
}


/* Corrección v13: tarjetas de fecha y amortización con texto en una línea */
.hg-credit-config-row {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
}

.hg-config-date-card,
.hg-config-amort-card {
    min-height: auto !important;
}

.hg-config-date-card {
    display: grid !important;
    grid-template-columns: minmax(260px, 1fr) 190px !important;
    grid-template-areas:
        "label input"
        "note input" !important;
    gap: 4px 18px !important;
    align-items: center !important;
    padding: 16px 18px !important;
}

.hg-config-date-card label,
.hg-config-amort-info label {
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

.hg-config-date-card small,
.hg-config-amort-info small {
    display: block;
    max-width: none !important;
    white-space: normal !important;
    line-height: 1.35 !important;
}

.hg-config-date-card input {
    width: 190px !important;
}

.hg-config-amort-card {
    display: grid !important;
    grid-template-columns: minmax(260px, 1fr) 300px !important;
    gap: 18px !important;
    align-items: center !important;
    padding: 16px 18px !important;
}

.hg-config-amort-card .hg-amortizacion-toggle {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    justify-self: end !important;
}

@media (max-width: 720px) {
    .hg-config-date-card,
    .hg-config-amort-card {
        grid-template-columns: 1fr !important;
    }

    .hg-config-date-card {
        grid-template-areas:
            "label"
            "note"
            "input" !important;
    }

    .hg-config-date-card label,
    .hg-config-amort-info label {
        white-space: normal !important;
    }

    .hg-config-date-card input,
    .hg-config-amort-card .hg-amortizacion-toggle {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        justify-self: stretch !important;
    }
}
