.modal-impuestos {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 30px;

    box-sizing: border-box;
}

.modal-impuestos[aria-hidden="false"] {
    display: flex;
}

.modal-impuestos-overlay {
    position: absolute;
    inset: 0;

    background: rgba(15, 23, 42, 0.55);
}

.modal-impuestos-container {
    position: relative;
    z-index: 1;

    width: 95vw;
    max-width: 1020px;

    height: auto;
    max-height: 90vh;

    display: flex;
    flex-direction: column;

    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);

    overflow: hidden;
}

.modal-impuestos-header {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 16px 20px;

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;
}

.modal-impuestos-title {
    margin: 0;

    color: #1f2937;

    font-size: 17px;
    font-weight: 700;
}

.modal-impuestos-municipio {
    display: block;

    margin-top: 4px;

    color: #6b7280;

    font-size: 10px;
}

.modal-impuestos-close {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    background: #f5f6f7;

    border: none;
    border-radius: 6px;

    color: #6b7280;

    font-size: 20px;

    cursor: pointer;
}

.modal-impuestos-close:hover {
    background: #edf0f2;
    color: #1f2937;
}

.modal-impuestos-body {
    flex: 1;

    min-height: 0;

    padding: 16px;

    overflow: auto;

    background: #f8fafc;
}

.modal-impuestos-loading {
    padding: 30px;

    color: #7b8790;

    font-size: 10px;
    text-align: center;
}

.modal-impuestos-empty {
    padding: 30px;

    color: #7b8790;

    font-size: 10px;
    text-align: center;
}

/* =========================================================
   ACORDEÓN DE IMPUESTOS
   ========================================================= */

.impuestos-acordeon {
    display: flex;
    flex-direction: column;
    gap: 10px;

    width: 100%;
}


/* =========================================================
   SECCIÓN
   ========================================================= */

.impuesto-seccion {
    width: 100%;

    background: #ffffff;

    border: 1px solid #dbe5f0;
    border-radius: 10px;

    overflow: hidden;

    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.impuesto-seccion:hover {
    border-color: #cbd9e8;
}


/* =========================================================
   HEADER DEL IMPUESTO
   ========================================================= */

.impuesto-seccion-header {
    width: 100%;

    min-height: 78px;

    display: flex;
    align-items: center;

    gap: 14px;

    padding: 10px 18px;

    box-sizing: border-box;

    background: #ffffff;

    border: none;

    cursor: pointer;

    text-align: left;

    color: #172554;
}


/* =========================================================
   ICONO
   ========================================================= */

.impuesto-seccion-icon {
    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #e8f2ff;

    color: #0875d1;

    font-size: 24px;
}


/* =========================================================
   INFORMACIÓN
   ========================================================= */

.impuesto-seccion-info {
    flex: 1;

    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 3px;
}


.impuesto-seccion-title {
    display: block;

    color: #172554;

    font-size: 16px;
    font-weight: 750;

    line-height: 1.2;

    letter-spacing: 0.1px;
}


.impuesto-seccion-subtitle {
    display: block;

    color: #64748b;

    font-size: 11px;

    line-height: 1.3;
}


/* =========================================================
   CONTADOR
   ========================================================= */

.impuesto-seccion-count {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;

    min-height: 30px;

    padding: 0 14px;

    border-radius: 999px;

    background: #dcecff;

    color: #0875d1;

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;
}


/* =========================================================
   FLECHA
   ========================================================= */

.impuesto-seccion-arrow {
    width: 24px;
    height: 24px;

    flex: 0 0 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #172554;

    font-size: 18px;

    transition:
        transform 0.2s ease;
}


.impuesto-seccion.is-open
.impuesto-seccion-arrow {
    transform: rotate(180deg);
}


/* =========================================================
   CONTENIDO
   ========================================================= */

.impuesto-seccion-content {
    display: none;

    padding: 0 12px 12px;

    background: #ffffff;
}


.impuesto-seccion.is-open
.impuesto-seccion-content {
    display: block;
}


/* =========================================================
   TABLA INTERNA
   ========================================================= */

.impuesto-detalle-tabla {
    width: 100%;

    border-collapse: separate;
    border-spacing: 0;

    overflow: hidden;

    border: 1px solid #e1e8f0;
    border-radius: 8px;

    background: #ffffff;

    table-layout: fixed;
}


/* =========================================================
   ENCABEZADOS
   ========================================================= */

.impuesto-detalle-tabla thead th {

    padding: 10px 12px;

    background: #f3f7fb;

    border-bottom: 1px solid #dce5ef;

    color: #475569;

    font-size: 10px;
    font-weight: 750;

    text-transform: uppercase;

    letter-spacing: 0.3px;

    text-align: left;
}

.impuesto-detalle-tabla th:nth-child(1),
.impuesto-detalle-tabla td:nth-child(1) {
    width: 25%;
}


.impuesto-detalle-tabla th:nth-child(2),
.impuesto-detalle-tabla td:nth-child(2) {
    width: 25%;
}


.impuesto-detalle-tabla th:nth-child(3),
.impuesto-detalle-tabla td:nth-child(3) {
    width: 70%;
}


.impuesto-detalle-tabla tbody td {

    padding: 9px 12px;

    border-bottom: 1px solid #edf1f5;

    color: #334155;

    font-size: 11px;

    vertical-align: middle;

    line-height: 1.35;
}


.impuesto-detalle-tabla tbody tr:last-child td {
    border-bottom: none;
}


.impuesto-detalle-tabla tbody tr:hover td {
    background: #f8fbff;
}


.concepto-nombre {

    color: #172554;

    font-weight: 700;

}


.detalle-articulo-expandible {
    width: 100%;
}


.detalle-articulo-expandible summary {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;

    cursor: pointer;

    list-style: none;
}


.detalle-articulo-expandible summary::-webkit-details-marker {
    display: none;
}


.articulo-link {

    color: #0875d1;

    font-size: 11px;

    font-weight: 650;

    text-decoration: none;
}


.articulo-link:hover {
    text-decoration: underline;
}


.detalle-articulo-expandible summary ion-icon {

    flex: 0 0 auto;

    color: #172554;

    font-size: 14px;

    transition:
        transform 0.15s ease;
}


.detalle-articulo-expandible[open]
summary ion-icon {

    transform: rotate(90deg);
}

.detalle-articulo-expandible summary ion-icon {
    flex: 0 0 auto;

    color: #64748b;

    font-size: 14px;

    transition: transform 0.15s ease;
}


.detalle-articulo-expandible[open] summary ion-icon {
    transform: rotate(90deg);

    color: #075985;
}


.detalle-articulo-contenido {

    margin-top: 8px;

    padding: 11px;

    background: #f6faff;

    border: 1px solid #dceafa;

    border-radius: 7px;

    color: #475569;

    font-size: 10px;

    line-height: 1.5;
}


.detalle-articulo-titulo {

    margin-bottom: 6px;

    color: #172554;

    font-size: 10px;

    font-weight: 750;
}


.detalle-articulo-texto {
    color: #475569;
}



.detalle-descripcion {

    color: #475569;

}

.sin-informacion {

    color: #a0aec0;

    font-style: italic;

}


.sin-articulo {

    color: #94a3b8;

}

.modal-impuestos-aviso-ia {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    padding: 13px 15px;
    background: #f8fbff;
    border: 1px solid #d7e7f7;
    border-radius: 10px;
    box-sizing: border-box;
}

.modal-impuestos-aviso-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #e7f2ff;
    border-radius: 8px;

    color: #0875d1;
    font-size: 18px;
}

.modal-impuestos-aviso-contenido {
    min-width: 0;
    flex: 1;
}

.modal-impuestos-aviso-titulo {
    margin-bottom: 3px;

    color: #172554;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
}

.modal-impuestos-aviso-texto {
    color: #64748b;
    font-size: 10px;
    line-height: 1.5;
}

.modal-impuestos-aviso-link {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;

    color: #0875d1;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.modal-impuestos-aviso-link:hover {
    color: #075985;
    text-decoration: underline;
}

.modal-impuestos-aviso-sin-info {
    background: #fffbf3;
    border-color: #f3dfb0;
}

.modal-impuestos-aviso-sin-info .modal-impuestos-aviso-icon {
    background: #fff3d6;
    color: #b7791f;
}

.modal-impuestos-aviso-sin-info .modal-impuestos-aviso-titulo {
    color: #7a4f01;
}

.detalle-articulo-fuente {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 10px;
    line-height: 1.4;
    word-break: break-word;
}

.detalle-articulo-fuente strong {
    color: #475569;
}

@media (max-width: 800px) {

    .impuesto-seccion-header {
        padding: 10px 12px;
    }

    .impuesto-seccion-icon {
        width: 40px;
        height: 40px;

        flex-basis: 40px;

        font-size: 20px;
    }

    .impuesto-seccion-title {
        font-size: 14px;
    }

    .impuesto-seccion-subtitle {
        font-size: 10px;
    }

    .impuesto-seccion-count {
        padding: 0 9px;

        font-size: 10px;
    }

    .impuesto-detalle-tabla {
        width: 100%;

        border-collapse: separate;
        border-spacing: 0;

        border: 1px solid #e1e8f0;
        border-radius: 8px;

        background: #ffffff;

        table-layout: fixed;

        overflow-wrap: anywhere;
    }

    .impuesto-detalle-tabla th:nth-child(1),
    .impuesto-detalle-tabla td:nth-child(1) {
        width: 25%;
    }


    .impuesto-detalle-tabla th:nth-child(2),
    .impuesto-detalle-tabla td:nth-child(2) {
        width: 70%;
    }


    .impuesto-detalle-tabla th:nth-child(3),
    .impuesto-detalle-tabla td:nth-child(3) {
        width: 25%;
    }
}