/* Lista de Equipos Homologados — consulta pública.
   Se apoya en las clases cm-* de calidad-movil.css (acotadas a .cm-wrap) y aquí solo va lo
   propio del módulo. Paleta institucional verde (la de consultar-imei, imei.css). */

.eh-wrap {
    --eh-primario: #0D4D4D;
    --eh-primario-hover: #0F2A2D;
    --eh-primario-suave: #E8F2F1;
    --eh-borde: #D0D0D0;
    --eh-texto: #000000;
    --eh-texto-suave: #333333;
    --eh-foco: #2D7B8A;
    --eh-exito: #1A4043;
    --eh-exito-hover: #0F2A2D;
    --eh-radio: 10px;
    margin-top: 1rem;
    margin-bottom: 4rem;
    font-size: 15px;
    line-height: 1.5;
}

/* El atributo hidden debe ganar a cualquier display propio del módulo (indicador de carga,
   modales, avisos): sin esto, .eh-cargando { display:flex } vence al [hidden] del navegador. */
.eh-wrap [hidden],
.eh-cargando[hidden],
.eh-modal[hidden] {
    display: none !important;
}

/* Foco visible y consistente en todo el módulo. */
.eh-wrap :focus-visible {
    outline: 3px solid var(--eh-foco);
    outline-offset: 2px;
}

.eh-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Encabezado ---------- */
.eh-head p {
    max-width: 70rem;
}

.eh-ayuda {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: .5rem;
}

/* ---------- Botones ---------- */
.eh-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.2rem;
    border-radius: var(--eh-radio);
    border: 1.5px solid transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color .15s, color .15s, border-color .15s;
}

.eh-btn--primary {
    background: var(--eh-primario);
    border-color: var(--eh-primario);
    color: #fff !important;
}

    .eh-btn--primary:hover,
    .eh-btn--primary:focus-visible {
        background: var(--eh-primario-hover);
        border-color: var(--eh-primario-hover);
        color: #fff !important;
    }

.eh-btn--outline {
    background: #fff;
    border-color: var(--eh-primario);
    color: var(--eh-primario) !important;
}

    .eh-btn--outline:hover,
    .eh-btn--outline:focus-visible {
        background: var(--eh-primario);
        color: #fff !important;
    }

.eh-btn--exito {
    background: var(--eh-exito);
    border-color: var(--eh-exito);
    color: #fff !important;
}

    .eh-btn--exito:hover,
    .eh-btn--exito:focus-visible {
        background: var(--eh-exito-hover);
        border-color: var(--eh-exito-hover);
    }

.eh-btn[disabled],
.eh-btn[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
}

/* ---------- Formulario de filtros ---------- */
.eh-filters {
    margin-bottom: 2rem;
}

.eh-filters__titulo {
    font-size: 24px;
    font-weight: 700;
    color: var(--eh-primario);
    margin: 0 0 .25rem;
}

.eh-filters__ayuda {
    color: var(--eh-texto-suave);
    margin: 0 0 1rem;
}

/* Tres columnas en escritorio, una en móvil (sobre la rejilla cm-filters). */
.eh-wrap .cm-filters.eh-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1rem;
}

@media (max-width: 992px) {
    .eh-wrap .cm-filters.eh-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .eh-wrap .cm-filters.eh-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.eh-wrap .cm-field input,
.eh-wrap .cm-field select {
    min-height: 2.75rem;
}

    .eh-wrap .cm-field input[aria-invalid="true"],
    .eh-wrap .cm-field select[aria-invalid="true"],
    .eh-wrap .cm-field .input-validation-error {
        border-color: #b02a37;
        background-color: #fff8f8;
    }

/* Rangos de fecha: un fieldset que ocupa su celda, con dos campos dentro. */
.eh-rango {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}

    .eh-rango legend {
        font-size: 14px;
        font-weight: 700;
        color: var(--eh-primario);
        margin-bottom: .45rem;
        padding: 0;
        border: 0;
        width: auto;
    }

.eh-rango__campos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

    .eh-rango__campos label {
        font-weight: 600;
        color: var(--eh-texto-suave);
        font-size: 14px;
    }

.eh-ayuda-campo {
    margin: .4rem 0 0;
    font-size: 14px;
    color: var(--eh-texto-suave);
    line-height: 1.4;
}

.eh-error,
.eh-wrap .field-validation-error {
    display: block;
    margin-top: .3rem;
    font-size: 14px;
    color: #9b1c2b;
    font-weight: 600;
}

.eh-wrap .field-validation-valid:empty {
    display: none;
}

.eh-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

/* ---------- Avisos ---------- */
.eh-alert {
    border-radius: var(--eh-radio);
    padding: .9rem 1.1rem;
    margin: 0 0 1rem;
    border: 1px solid;
    font-size: 15px;
}

    .eh-alert ul {
        margin: .25rem 0 0 1.25rem;
        padding: 0;
    }

    .eh-alert .eh-alert__titulo {
        margin: 0;
        font-weight: 700;
    }

    .eh-alert a {
        color: inherit;
        text-decoration: underline;
    }

.eh-alert--error {
    background: #fdecea;
    border-color: #f1b6b2;
    color: #7a1621;
}

.eh-alert--aviso {
    background: #fff6e0;
    border-color: #f0d28a;
    color: #6b4a00;
}

/* El resumen de validación de MVC: oculto cuando no hay errores. */
.eh-resumen.validation-summary-valid {
    display: none;
}

/* ---------- Carga ---------- */
.eh-cargando {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--eh-texto-suave);
    font-weight: 600;
    margin-bottom: .75rem;
}

.eh-spinner {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 3px solid var(--eh-primario-suave);
    border-top-color: var(--eh-primario);
    animation: eh-girar .8s linear infinite;
}

@keyframes eh-girar {
    to {
        transform: rotate(360deg);
    }
}

.eh-resultados[aria-busy="true"] .eh-resultados__contenido {
    opacity: .5;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .eh-spinner {
        animation: none;
    }
}

/* ---------- Barra de resultados ---------- */
.eh-barra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.25rem;
    margin-bottom: 1rem;
}

.eh-wrap .cm-count.eh-conteo {
    font-size: 16px;
    color: var(--eh-texto);
    margin: 0;
    min-height: 1.5em;
}

.eh-barra__acciones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin-left: auto;
}

.eh-form-exportar {
    display: inline;
    margin: 0;
}

.eh-nota {
    color: var(--eh-texto-suave);
    font-size: 14px;
}

.eh-nota--inicio {
    font-size: 15px;
    padding: 1rem 1.25rem;
    background: var(--eh-primario-suave);
    border-radius: var(--eh-radio);
}

.eh-resultados__titulo {
    font-size: 24px;
    font-weight: 700;
    color: var(--eh-primario);
    margin: 0 0 .75rem;
}

    .eh-resultados__titulo:focus {
        outline: none;
    }

    .eh-resultados__titulo:focus-visible {
        outline: 3px solid var(--eh-foco);
        outline-offset: 4px;
    }

.eh-vacio {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--eh-texto-suave);
    background: #fff;
    border: 1px dashed var(--eh-borde);
    border-radius: var(--eh-radio);
    font-size: 16px;
}

/* ---------- Tabla ----------
   El módulo deja de limitarse a los 1240px de .cm-wrap: encabezado y filtros se centran a
   ese ancho, pero los resultados aprovechan todo el ancho del contenedor del portal. */
.cm-wrap.eh-wrap {
    max-width: none !important;
}

.eh-wrap .eh-head,
.eh-wrap .eh-filters,
.eh-wrap .eh-cargando {
    max-width: none !important;
    margin-left: auto;
    margin-right: auto;
}

/* Ningún ancestro del módulo debe recortar la tabla: el único que desplaza es .eh-table-scroll. */
#eh-resultados,
#eh-resultados .eh-resultados__contenido,
#eh-resultados .cm-table-card.eh-table-card {
    overflow: visible !important;
    max-width: none !important;
    width: 100%;
}

.eh-wrap .cm-table-card.eh-table-card {
    padding: 0 !important;
}

#eh-resultados .eh-table-scroll {
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    width: 100%;
}

    /* Barra de desplazamiento siempre visible cuando hay recorte (Chrome/Edge/Safari). */
    #eh-resultados .eh-table-scroll::-webkit-scrollbar {
        height: 12px;
    }

    #eh-resultados .eh-table-scroll::-webkit-scrollbar-thumb {
        background: #3B8082;
        border-radius: 6px;
        border: 2px solid #eef2f2;
    }

    #eh-resultados .eh-table-scroll::-webkit-scrollbar-track {
        background: #eef2f2;
    }

#eh-resultados table.eh-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    table-layout: auto;
    font-size: 14px;
    margin: 0 !important;
}

    #eh-resultados table.eh-table thead th {
        background: var(--eh-primario);
        color: #fff;
        font-size: 15px !important;
        font-weight: 700;
        text-align: center !important;
        padding: .6rem .55rem !important;
        white-space: normal;
        line-height: 1.2;
        vertical-align: bottom;
        cursor: default;
    }

    #eh-resultados table.eh-table tbody td {
        padding: .5rem .55rem !important;
        border-bottom: 1px solid var(--eh-borde);
        vertical-align: top;
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: break-word;
        color: var(--eh-texto);
        line-height: 1.3;
    }

    /* Anchos mínimos por columna (orden: 1 folio, 2 certificado, 3 tipo cert., 4 oficio,
       5 expedición, 6 vigencia, 7 titular, 8 tipo equipo, 9 marca, 10 modelo, 11 estado,
       12 cancelación, 13 causa). */
    #eh-resultados table.eh-table th:nth-child(1) { min-width: 120px; }
    #eh-resultados table.eh-table th:nth-child(2) { min-width: 150px; }
    #eh-resultados table.eh-table th:nth-child(3) { min-width: 120px; }
    #eh-resultados table.eh-table th:nth-child(4) { min-width: 100px; }
    #eh-resultados table.eh-table th:nth-child(5),
    #eh-resultados table.eh-table th:nth-child(6),
    #eh-resultados table.eh-table th:nth-child(12) { min-width: 110px; }
    #eh-resultados table.eh-table th:nth-child(7) { min-width: 170px; }
    #eh-resultados table.eh-table th:nth-child(8) { min-width: 140px; }
    #eh-resultados table.eh-table th:nth-child(9) { min-width: 100px; }
    #eh-resultados table.eh-table th:nth-child(10) { min-width: 150px; }
    #eh-resultados table.eh-table th:nth-child(11) { min-width: 120px; }
    #eh-resultados table.eh-table th:nth-child(13) { min-width: 140px; }

    .eh-wrap table.eh-table tbody tr:nth-child(even) td {
        background: #f6f9f9;
    }

    .eh-wrap table.eh-table tbody tr:hover td {
        background: var(--eh-primario-suave);
    }

.eh-col-fecha,
.eh-col-estado {
    white-space: nowrap !important;
}

.eh-col-certificado {
    font-weight: 600;
}

/* ---------- Responsive: modo tarjeta (< 992px) con los data-label de cada celda ---------- */
@media (max-width: 991.98px) {
    #eh-resultados .eh-table-scroll {
        overflow-x: visible !important;
    }

    #eh-resultados .cm-table-card.eh-table-card {
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    #eh-resultados table.eh-table,
    #eh-resultados table.eh-table tbody,
    #eh-resultados table.eh-table tr {
        display: block !important;
        width: 100% !important;
        border: 0 !important;
    }

    #eh-resultados table.eh-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    #eh-resultados table.eh-table tbody tr {
        margin-bottom: .9rem;
        border: 1px solid #8c8c94 !important;
        border-radius: 8px;
        background: #fff;
        overflow: hidden;
    }

    #eh-resultados table.eh-table tbody tr.eh-fila--vencido {
        border-color: #c9302c !important;
    }

    #eh-resultados table.eh-table tbody td {
        display: grid !important;
        grid-template-columns: minmax(7.5rem, 40%) 1fr;
        gap: .5rem;
        align-items: start;
        border: 0 !important;
        border-bottom: 1px solid #e3e3e8 !important;
        background-color: #fff !important;
        white-space: normal !important;
        min-height: 2.2rem;
    }

        #eh-resultados table.eh-table tbody td:last-child {
            border-bottom: 0 !important;
        }

        #eh-resultados table.eh-table tbody td::before {
            content: attr(data-label);
            font-weight: 700;
            color: var(--eh-primario);
        }

        #eh-resultados table.eh-table tbody td:empty::after {
            content: "—";
            color: var(--eh-texto-suave);
        }

    #eh-resultados table.eh-table tbody tr.eh-fila--vencido td {
        background-color: #fff5f4 !important;
    }

    #eh-resultados table.eh-table tbody tr:nth-child(even) td {
        background-color: #fff !important;
    }
}

/* Bordes visibles en toda la tabla (celdas, encabezado y contorno). Selectores anclados a
   #eh-resultados para vencer a main.css de gob.mx y a calidad-movil.css solo en esta vista. */
#eh-resultados .eh-table-card {
    border: 1px solid #8c8c94;
    border-radius: 6px;
    overflow: hidden;
}

#eh-resultados table.eh-table {
    border-collapse: collapse !important;
    border-spacing: 0;
    border: 1px solid #8c8c94;
}

    #eh-resultados table.eh-table thead th {
        border: 1px solid #0F2A2D !important;
        border-bottom-width: 2px !important;
        background: var(--eh-primario);
        color: #fff;
    }

    #eh-resultados table.eh-table tbody td {
        border: 1px solid #b5b5bd !important;
        background-clip: padding-box;
    }

    #eh-resultados table.eh-table tbody tr:nth-child(even) td {
        background-color: #eef2f2;
    }

    #eh-resultados table.eh-table tbody tr:nth-child(odd) td {
        background-color: #fff;
    }

    #eh-resultados table.eh-table tbody tr:hover td {
        background-color: var(--eh-primario-suave);
    }

/* Fila vencida: tinte suave además del badge, para no depender solo del color. */
#eh-resultados table.eh-table tbody tr.eh-fila--vencido td {
    background-color: #fff5f4;
    border-color: #e8b4b0 !important;
}

#eh-resultados table.eh-table tbody tr.eh-fila--vencido:hover td {
    background-color: #ffecea;
}

/* ---------- Badges de estado ---------- */
.eh-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.4;
    white-space: nowrap;
}

.eh-badge--vigente {
    background: #e6f4ea;
    border-color: #b7dfc2;
    color: #1e6b2f;
}

.eh-badge--vencido {
    background: #fdecea;
    border-color: #f1b6b2;
    color: #8a1c1c;
}

.eh-badge--cancelado {
    background: #eceef1;
    border-color: #d3d7dd;
    color: #4b5563;
}

.eh-badge--neutro {
    background: #eef2f2;
    border-color: #e3dcdf;
    color: #5f5560;
}

/* ---------- Paginador ---------- */
.eh-wrap .pagination-wrapper.eh-paginador {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.25rem;
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--eh-borde);
    border-radius: var(--eh-radio);
}

.eh-wrap .pagination-info {
    color: var(--eh-texto-suave);
    font-size: 14px;
}

.eh-wrap ul.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.eh-wrap .page-item {
    margin: 0;
}

.eh-wrap .page-link {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    min-width: 2.5rem;
    justify-content: center;
    padding: .45rem .75rem;
    border: 1.5px solid var(--eh-borde);
    border-radius: 8px;
    background: #fff;
    color: var(--eh-primario);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background-color .15s, color .15s, border-color .15s;
}

    .eh-wrap .page-link:hover,
    .eh-wrap .page-link:focus-visible {
        background: var(--eh-primario-suave);
        border-color: var(--eh-primario);
        color: var(--eh-primario);
    }

.eh-wrap .page-item.active .page-link {
    background: var(--eh-primario);
    border-color: var(--eh-primario);
    color: #fff;
}

.eh-wrap .page-item.disabled .page-link {
    opacity: .5;
    cursor: not-allowed;
    color: var(--eh-texto-suave);
}

@media (max-width: 640px) {
    .eh-paginador__texto {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .eh-wrap .pagination-wrapper.eh-paginador {
        justify-content: center;
    }
}

/* ---------- Modales ---------- */
.eh-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

    .eh-modal[hidden] {
        display: none;
    }

.eh-modal__fondo {
    position: absolute;
    inset: 0;
    background: rgba(22, 26, 29, .6);
}

.eh-modal__dialogo {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
    overflow: hidden;
    font-size: 15px;
    color: var(--eh-texto);
}

.eh-modal__cabecera {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    background: var(--eh-primario);
    color: #fff;
}

    .eh-modal__cabecera h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 700;
        color: #fff;
        line-height: 1.3;
    }

.eh-modal__cerrar {
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 24px;
    line-height: 0.5;
    cursor: pointer;
}

    .eh-modal__cerrar:hover {
        background: rgba(255, 255, 255, .3);
    }

.eh-modal__cuerpo {
    padding: 1.25rem 1.4rem;
    overflow-y: auto;
}

    .eh-modal__cuerpo p {
        margin: 0 0 .9rem;
    }

.eh-modal__pie {
    display: flex;
    justify-content: flex-end;
    padding: .9rem 1.4rem;
    border-top: 1px solid var(--eh-borde);
    background: #f6f9f9;
}

body.eh-modal-abierto {
    overflow: hidden;
}

.eh-pasos {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}

    .eh-pasos li {
        margin-bottom: .6rem;
    }

@media (max-width: 640px) {
    .eh-modal__cabecera h2 {
        font-size: 16px;
    }
}

/* ---------- Modal de exportación ---------- */
.eh-opcion {
    padding: 1rem;
    border: 1px solid var(--eh-borde);
    border-radius: var(--eh-radio);
    margin-bottom: .9rem;
}

    .eh-opcion h3 {
        margin: 0 0 .6rem;
        font-size: 16px;
        color: var(--eh-primario);
    }

    .eh-opcion .eh-nota {
        margin: .5rem 0 0;
    }

.eh-opcion--inactiva {
    background: #eef2f2;
}

    .eh-opcion--inactiva .eh-btn[aria-disabled="true"] {
        opacity: .5;
        cursor: not-allowed;
        background: #e6e1e3;
        border-color: #c9c2c5;
        color: #5f5560 !important;
    }

.eh-buscar-resultados { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.eh-buscar-resultados label { font-weight: 600; margin: 0; }
.eh-buscar-resultados input[type="search"] { min-width: 18rem; padding: .4rem .6rem; border: 1px solid var(--eh-primario); border-radius: 4px; }

/* ==========================================================================
   Tipografía y paleta institucional (verde de consultar-imei).
   Escala: h1 2.5rem · h2 1.5rem · h3 1.125rem · contenido 16px · controles, notas,
   tabla y paginador 14px como mínimo. Texto de contenido en negro, sin tonos de color.
   ========================================================================== */
.cm-wrap.eh-wrap {
    --guinda: #0D4D4D;
    --guinda-dark: #0F2A2D;
    --guinda-soft: #E8F2F1;
    --guinda-border: #B7D3D0;
    --dorado: #2D7B8A;
    --text: #000000;
    --text-muted: #000000;
    --border: #D0D0D0;
    --cm-fs-label: 15px;
    --cm-fs-control: 16px;
    font-size: 16px;
    line-height: 1.6;
    color: #000;
}

.cm-wrap.eh-wrap .cm-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230D4D4D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

.cm-wrap.eh-wrap .cm-field select:focus,
.cm-wrap.eh-wrap .cm-field input:focus {
    box-shadow: 0 0 0 3px rgba(45, 123, 138, .25);
}

/* Encabezados */
/* Título: h1 con la clase global .titulo-portal (72px, centrado, negro), igual que consultar-imei. */
.eh-wrap .eh-titulo-wrap {
    max-width: 900px;
    margin: 0 auto;
}

.eh-wrap .eh-titulo-wrap .titulo-portal {
    text-wrap: balance;
    margin: 18px 0 22px;
}

/* Introducción dentro de la tarjeta (mismo diseño que .crt-usuarias__card de imei.css). */
.eh-wrap .eh-intro-card {
    width: 100%;
    margin: 30px auto;
    padding: 35px 25px;
    background: #FFFFFF;
    border: 1px solid #017977;
    border-radius: 8px;
    box-shadow: 0 4px 4px 0 #00000040;
}

.eh-wrap .eh-intro-texto,
.eh-wrap .eh-filters__ayuda {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #1B3F42;
    text-align: justify;
    max-width: none;
}

.eh-wrap .eh-filters__ayuda { margin-bottom: 1rem; }

/* Video del tutorial (YouTube), proporción 16:9. */
.eh-wrap .eh-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 1.25rem;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.eh-wrap .eh-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 768px) {
    .eh-wrap .eh-titulo-wrap .titulo-portal { font-size: 40px; }
}

.eh-wrap .eh-filters__titulo,
.eh-wrap .eh-resultados__titulo {
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--eh-primario);
}

.eh-wrap h3 { font-size: 18px; font-weight: 600; color: var(--eh-primario); }

/* Contenido auxiliar: nunca menos de 14px */
.eh-wrap .eh-btn,
.eh-wrap .eh-nota,
.eh-wrap .cm-field .eh-error,
.eh-wrap .eh-alert { font-size: 14px; }
.eh-wrap .eh-btn { font-size: 15px; font-weight: 600; }
.eh-wrap .eh-alert { font-size: 15px; }
.eh-wrap .cm-count.eh-conteo { font-size: 16px; }
.eh-wrap .eh-buscar-resultados label { font-size: 15px; color: #000; }
.eh-wrap .eh-buscar-resultados input[type="search"] { font-size: 16px; }

/* Tabla */
#eh-resultados table.eh-table { font-size: 14px; }
#eh-resultados table.eh-table thead th {
    font-size: 15px !important;
    line-height: 1.25;
    vertical-align: middle;
}
#eh-resultados table.eh-table tbody td { font-size: 14px; line-height: 1.4; color: #000; }

/* Mínimos por columna más ajustados: la suma baja para que quepa mejor al 100% de zoom. */
#eh-resultados table.eh-table th:nth-child(1) { min-width: 92px; }
#eh-resultados table.eh-table th:nth-child(2) { min-width: 115px; }
#eh-resultados table.eh-table th:nth-child(3) { min-width: 95px; }
#eh-resultados table.eh-table th:nth-child(4) { min-width: 80px; }
#eh-resultados table.eh-table th:nth-child(5),
#eh-resultados table.eh-table th:nth-child(6),
#eh-resultados table.eh-table th:nth-child(12) { min-width: 92px; }
#eh-resultados table.eh-table th:nth-child(7) { min-width: 115px; }
#eh-resultados table.eh-table th:nth-child(8) { min-width: 105px; }
#eh-resultados table.eh-table th:nth-child(9) { min-width: 80px; }
#eh-resultados table.eh-table th:nth-child(10) { min-width: 100px; }
#eh-resultados table.eh-table th:nth-child(11) { min-width: 90px; }
#eh-resultados table.eh-table th:nth-child(13) { min-width: 100px; }

/* El portal limita .contenedor-layout con rem de 10px (100rem = 1000px entre 1200 y 1599px de
   viewport, 70rem = 700px entre 768 y 1199px): al 100% de zoom en una laptop la tabla de 13
   columnas se aprieta. Solo esta página usa el ancho disponible, con tope de 1700px. */
.contenedor-layout:has(> #eh) {
    max-width: 1700px !important;
}

/* Reparto del ancho sobrante: Causa va vacía en casi todos los renglones (solo los CANCELADOS la
   llevan), así que se queda angosta y el espacio extra va a las columnas de texto largo. */
#eh-resultados table.eh-table th:nth-child(1) { width: 7%; }
#eh-resultados table.eh-table th:nth-child(2) { width: 8%; }
#eh-resultados table.eh-table th:nth-child(3) { width: 7%; }
#eh-resultados table.eh-table th:nth-child(4) { width: 6%; }
#eh-resultados table.eh-table th:nth-child(5),
#eh-resultados table.eh-table th:nth-child(6),
#eh-resultados table.eh-table th:nth-child(12) { width: 6%; }
#eh-resultados table.eh-table th:nth-child(7) { width: 16%; }
#eh-resultados table.eh-table th:nth-child(8) { width: 10%; }
#eh-resultados table.eh-table th:nth-child(9) { width: 7%; }
#eh-resultados table.eh-table th:nth-child(10) { width: 13%; }
#eh-resultados table.eh-table th:nth-child(11) { width: 6%; }
#eh-resultados table.eh-table th:nth-child(13) { width: 5%; }

/* La caja de desplazamiento no reserva el hueco de la barra vertical (scrollbar-gutter: stable
   dejaba ~15px sin aprovechar a la derecha de la última columna). */
#eh-resultados .eh-table-scroll {
    scrollbar-gutter: auto;
    overflow-y: hidden;
}

/* Encabezado, filtros y avisos centrados con un ancho cómodo; solo la tabla usa todo el ancho. */
.eh-wrap .eh-head,
.eh-wrap .eh-filters,
.eh-wrap .eh-cargando {
    max-width: 1240px !important;
}

/* Barra de resultados (conteo, búsqueda y exportar) con el mismo ancho y borde izquierdo que la
   tarjeta de filtros; el botón de exportar va a la izquierda. */
.eh-wrap .eh-barra {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    justify-content: flex-start;
}

.eh-wrap .eh-barra__acciones {
    order: -1;
    margin-left: 0;
}

.eh-wrap .eh-buscar-resultados { margin-left: auto; }

/* Segunda línea de la barra: conteo total y filas visibles de la tabla, alineados a la izquierda. */
.eh-wrap .eh-barra .eh-conteo { order: 1; flex: 0 0 100%; text-align: left; }
.eh-wrap .eh-barra .eh-busqueda-info { order: 2; flex: 0 0 100%; margin: 0; text-align: left; }
.eh-wrap .eh-barra .eh-busqueda-info:empty { display: none; }

/* Conteo total y filas visibles comparten la segunda línea, a la misma altura. */
.eh-wrap .eh-barra::after { content: ""; order: 1; flex: 0 0 100%; height: 0; }
.eh-wrap .eh-barra .eh-conteo { order: 2; flex: 0 1 auto; max-width: 100%; }
.eh-wrap .eh-barra .eh-busqueda-info { order: 3; flex: 1 1 auto; }

@media (max-width: 640px) {
    .eh-wrap .eh-buscar-resultados { margin-left: 0; width: 100%; }
    .eh-wrap .eh-buscar-resultados input[type="search"] { min-width: 0; width: 100%; }
    .eh-wrap .eh-intro-card { padding: 20px 16px; }
}

.eh-wrap .eh-nota--justificada {
    color: #000;
    text-align: justify;
}
