/* =====================================================
   CONFIGURACIÓN GENERAL DEL MÓDULO
===================================================== */

*{

    box-sizing: border-box;

}


body.body-modulo{

    min-height: 100vh;
    margin: 0;

    color: #18233a;
    background: #f4f7fb;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

}


/* =====================================================
   ENCABEZADO
===================================================== */

.encabezado-termohigrometros{

    display: flex;
    align-items: center;

    min-height: 64px;
    margin-left: 72px;
    padding: 0 24px;

    color: var(--bio-texto-claro);
    background: var(--bio-fondo-principal);

}


.encabezado-termohigrometros h1{

    margin: 0;

    font-size: 26px;
    font-weight: 500;

}


/* =====================================================
   CONTENIDO PRINCIPAL
===================================================== */

.contenido-termohigrometros{

    margin-left: 72px;
    padding: 20px 24px 32px;

}


/* =====================================================
   BUSCADOR, FILTROS Y BOTÓN NUEVO
===================================================== */

.controles-termohigrometros{

    display: grid;

    grid-template-columns:
        minmax(250px, 1.5fr)
        repeat(3, minmax(150px, 0.75fr))
        auto;

    gap: 12px;
    align-items: end;

}


.campo-control-th{

    display: flex;
    flex-direction: column;
    gap: 7px;

}


.campo-control-th label{

    color: #64748b;

    font-size: 13px;
    font-weight: 600;

}


.campo-control-th input,
.campo-control-th select{

    width: 100%;
    min-height: 42px;
    padding: 9px 12px;

    color: #18233a;
    background: #ffffff;

    border: 1px solid #d6deea;
    border-radius: 9px;

    font-size: 14px;

}


.campo-control-th input:focus,
.campo-control-th select:focus{

    border-color: var(--bio-acento);

    outline: 3px solid
        rgba(
            var(--bio-acento-rgb),
            0.15
        );

}


.btn-nuevo-th{

    min-height: 42px;
    padding: 0 18px;

    color: #ffffff;
    background: var(--bio-acento);

    border: 0;
    border-radius: 9px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    white-space: nowrap;

}


.btn-nuevo-th:hover{

    background: #237db1;

}


.btn-nuevo-th:focus-visible{

    outline: 3px solid
        rgba(
            var(--bio-acento-rgb),
            0.28
        );

    outline-offset: 2px;

}


/* =====================================================
   INDICADORES SUPERIORES
===================================================== */

.resumen-termohigrometros{

    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 12px;

    margin: 18px 0;

}


.indicador-th{

    position: relative;

    display: flex;
    flex-direction: column;
    gap: 5px;

    min-height: 74px;
    padding: 14px 36px 14px 16px;

    background: #ffffff;

    border: 1px solid #dbe3ee;
    border-radius: 11px;

}


.indicador-th span{

    color: #64748b;

    font-size: 13px;

}


.indicador-th strong{

    font-size: 23px;
    font-weight: 600;

}


/*
    Cada indicador utiliza un punto de color.

    El color siempre estará acompañado por texto,
    para que no sea la única forma de identificarlo.
*/
.indicador-th::after{

    position: absolute;
    top: 50%;
    right: 17px;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    content: "";

    transform:
        translateY(-50%);

}


.indicador-total-th::after{

    background: var(--bio-acento);

}


.indicador-vigente-th::after{

    background: #23845c;

}


.indicador-proximo-th::after{

    background: #a27412;

}


.indicador-vencido-th::after{

    background: #c2414b;

}


/* =====================================================
   PANEL DE LA TABLA
===================================================== */

.panel-tabla-th{

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #dbe3ee;
    border-radius: 11px;

}


.encabezado-tabla-th{

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
    padding: 15px 17px;

    border-bottom: 1px solid #dbe3ee;

}


.encabezado-tabla-th h2{

    margin: 0;

    font-size: 18px;
    font-weight: 600;

}


.encabezado-tabla-th span{

    color: #64748b;

    font-size: 13px;

}


/*
    Si la tabla supera el ancho disponible,
    solamente esta zona tendrá desplazamiento horizontal.
*/
.contenedor-tabla-th{

    overflow-x: auto;

}


/* =====================================================
   TABLA
===================================================== */

.tabla-termohigrometros{

    width: 100%;
    min-width: 1350px;

    border-collapse: collapse;

    text-align: left;

}


.tabla-termohigrometros th,
.tabla-termohigrometros td{

    padding: 13px 12px;

    border-bottom: 1px solid #dbe3ee;

    vertical-align: middle;

}


.tabla-termohigrometros th{

    color: #52627a;
    background: #fbfcfe;

    font-size: 12px;
    font-weight: 600;

    text-transform: uppercase;
    white-space: nowrap;

}


.tabla-termohigrometros td{

    color: #18233a;

    font-size: 14px;

}


.tabla-termohigrometros tbody tr:hover{

    background:
        rgba(
            var(--bio-acento-rgb),
            0.06
        );

}


/* =====================================================
   BOTONES PARA ORDENAR
===================================================== */

.btn-orden-tabla-th{

    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 0;

    color: inherit;
    background: transparent;

    border: 0;

    font: inherit;
    text-transform: inherit;

    cursor: pointer;

}


.btn-orden-tabla-th span{

    font-size: 15px;

}


.btn-orden-tabla-th:hover{

    color: var(--bio-acento);

}


/* =====================================================
   ESTADOS DE CALIBRACIÓN
===================================================== */

/*
    Estas clases se utilizarán más adelante
    cuando tablaTh.js construya las filas.
*/
.estado-calibracion-th{

    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 6px 10px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;

}


.estado-calibracion-th::before{

    width: 7px;
    height: 7px;

    background: currentColor;

    border-radius: 50%;

    content: "";

}


/* Más de 60 días */
.estado-vigente-th{

    color: #237a57;
    background: #e8f6ef;

}


/* Entre 1 y 60 días */
.estado-proximo-th{

    color: #93680b;
    background: #fff5d6;

}


/* Fecha alcanzada o superada */
.estado-vencido-th{

    color: #b63843;
    background: #fdebed;

}


/* No tiene calibración registrada */
.estado-sin-calibracion-th{

    color: #64748b;
    background: #edf1f5;

}


/* =====================================================
   ACCIONES DE LAS FILAS
===================================================== */

.acciones-fila-th{

    display: flex;
    gap: 7px;

    white-space: nowrap;

}


.btn-accion-th{

    min-height: 32px;
    padding: 0 10px;

    color: #263750;
    background: #ffffff;

    border: 1px solid #d6deea;
    border-radius: 7px;

    font-size: 13px;

    cursor: pointer;

}


.btn-accion-th:hover{

    color: var(--bio-acento);
    border-color: var(--bio-acento);

}


/* =====================================================
   MENSAJE DE TABLA VACÍA
===================================================== */

.mensaje-tabla-vacia-th{

    margin: 0;
    padding: 42px 20px;

    color: #64748b;

    text-align: center;
    font-size: 14px;

}


/* =====================================================
   ADAPTACIÓN PARA PANTALLAS MÁS PEQUEÑAS
===================================================== */

@media(max-width: 1100px){

    .controles-termohigrometros{

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

    }


    .btn-nuevo-th{

        width: 100%;

    }

}


@media(max-width: 750px){

    .encabezado-termohigrometros{

        padding:
            0
            14px;

    }


    .encabezado-termohigrometros h1{

        font-size: 21px;

    }


    .contenido-termohigrometros{

        padding:
            16px
            14px
            24px;

    }


    .controles-termohigrometros,
    .resumen-termohigrometros{

        grid-template-columns:
            1fr;

    }

}

/* Columna utilizada actualmente para ordenar */
.orden-tabla-activo-th{

    color: var(--bio-acento);

}

/*
    El botón permanecerá deshabilitado hasta que
    la creación esté conectada con Supabase.
*/
.btn-nuevo-th:disabled{

    color: #64748b;
    background: #dbe3ee;

    cursor: not-allowed;
    opacity: 0.8;

}

/* ======================================================
   MODAL PARA CREAR UN TERMOHIGRÓMETRO
====================================================== */

/*
    Cubre la aplicación completa y mantiene
    el formulario por encima del dashboard.
*/
.fondo-modal-th{

    position: fixed;
    inset: 0;
    z-index: 1200;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background:
        rgba(15, 23, 42, 0.68);

    backdrop-filter:
        blur(4px);

}


/*
    El atributo hidden debe ocultar completamente
    el modal cuando no se está utilizando.
*/
.fondo-modal-th[hidden]{

    display: none;

}


/*
    Ventana principal del formulario.
*/
.ventana-modal-th{

    width: min(760px, 100%);
    max-height: calc(100vh - 48px);

    overflow-y: auto;

    background: #ffffff;

    border:
        1px solid
        rgba(
            var(--bio-acento-rgb),
            0.24
        );

    border-radius: 18px;

    box-shadow:
        0 24px 70px
        rgba(15, 23, 42, 0.30);

}


/* ======================================================
   ENCABEZADO DEL MODAL
====================================================== */

.encabezado-modal-th{

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    padding: 24px 26px 20px;

    border-bottom:
        1px solid #e2e8f0;

}


.etiqueta-modal-th{

    display: inline-flex;

    margin-bottom: 6px;

    color: var(--bio-acento);

    font-size: 0.75rem;
    font-weight: 700;

    letter-spacing: 0.08em;
    text-transform: uppercase;

}


.encabezado-modal-th h2{

    margin: 0;

    color: var(--bio-fondo-principal);

    font-size: 1.35rem;

}


.encabezado-modal-th p{

    margin: 6px 0 0;

    color: #64748b;

    font-size: 0.9rem;

}


.btn-cerrar-modal-th{

    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    border: none;
    border-radius: 10px;

    background: #eef2f7;
    color: #475569;

    font-size: 1.55rem;
    line-height: 1;

    cursor: pointer;

}


.btn-cerrar-modal-th:hover{

    background: #e2e8f0;
    color: var(--bio-fondo-principal);

}


/* ======================================================
   CAMPOS DEL FORMULARIO
====================================================== */

.formulario-th{

    padding: 24px 26px 26px;

}


.rejilla-formulario-th{

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;

}


.campo-formulario-th{

    display: flex;
    flex-direction: column;
    gap: 7px;

}


.campo-formulario-th label{

    color: #334155;

    font-size: 0.88rem;
    font-weight: 650;

}


.campo-formulario-th label span{

    color: #94a3b8;

    font-weight: 500;

}


.campo-formulario-th input,
.campo-formulario-th select{

    width: 100%;
    min-height: 42px;

    padding: 9px 11px;

    border: 1px solid #cbd5e1;
    border-radius: 9px;

    background: #ffffff;
    color: #0f172a;

    font: inherit;

    outline: none;

    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;

}


.campo-formulario-th input:focus,
.campo-formulario-th select:focus{

    border-color: var(--bio-acento);

    box-shadow:
        0 0 0 3px
        rgba(
            var(--bio-acento-rgb),
            0.16
        );

}


.campo-formulario-th select:disabled{

    background: #f1f5f9;
    color: #94a3b8;

    cursor: not-allowed;

}


/* ======================================================
   MENSAJES Y ACCIONES
====================================================== */

.mensaje-formulario-th{

    margin: 20px 0 0;

    padding: 11px 13px;

    border-radius: 9px;

    font-size: 0.9rem;

}


.mensaje-formulario-th[hidden]{

    display: none;

}


.mensaje-error-th{

    background: #fff1f2;
    color: #b4232d;

    border: 1px solid #fecdd3;

}


.mensaje-exito-th{

    background: #ecfdf5;
    color: #047857;

    border: 1px solid #a7f3d0;

}


.acciones-formulario-th{

    display: flex;
    justify-content: flex-end;
    gap: 12px;

    margin-top: 24px;
    padding-top: 20px;

    border-top:
        1px solid #e2e8f0;

}


.btn-secundario-th,
.btn-principal-th{

    min-height: 42px;

    padding: 9px 18px;

    border-radius: 9px;

    font: inherit;
    font-weight: 650;

    cursor: pointer;

}


.btn-secundario-th{

    border: 1px solid #cbd5e1;

    background: #ffffff;
    color: #334155;

}


.btn-secundario-th:hover{

    background: #f8fafc;

}


.btn-principal-th{

    border: 1px solid var(--bio-acento);

    background: var(--bio-acento);
    color: #ffffff;

}


.btn-principal-th:hover{

    filter: brightness(0.94);

}


.btn-secundario-th:disabled,
.btn-principal-th:disabled,
.btn-cerrar-modal-th:disabled{

    opacity: 0.55;
    cursor: not-allowed;

}


/* ======================================================
   ADAPTACIÓN PARA PANTALLAS PEQUEÑAS
====================================================== */

@media (max-width: 680px){

    .fondo-modal-th{

        align-items: flex-end;

        padding: 12px;

    }


    .ventana-modal-th{

        max-height: calc(100vh - 24px);

        border-radius: 16px;

    }


    .encabezado-modal-th,
    .formulario-th{

        padding-left: 18px;
        padding-right: 18px;

    }


    .rejilla-formulario-th{

        grid-template-columns: 1fr;

    }


    .acciones-formulario-th{

        flex-direction: column-reverse;

    }


    .btn-secundario-th,
    .btn-principal-th{

        width: 100%;

    }

}

/*
    Evita que la página se desplace por detrás
    mientras el formulario está abierto.
*/
body.modal-th-abierto{

    overflow: hidden;

}

/* ======================================================
   SELECTORES DEL FORMULARIO TH
====================================================== */

/*
    Reemplaza la flecha básica del navegador
    por una más discreta y acorde con BioAssist.
*/
.campo-formulario-th select{

    appearance: none;
    -webkit-appearance: none;

    padding-right: 38px;

    background-image:

        linear-gradient(
            45deg,
            transparent 50%,
            #64748b 50%
        ),

        linear-gradient(
            135deg,
            #64748b 50%,
            transparent 50%
        );

    background-position:

        calc(100% - 17px) 18px,
        calc(100% - 12px) 18px;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat:
        no-repeat;

    cursor: pointer;

}


.campo-formulario-th select:hover{

    border-color:
        rgba(
            var(--bio-acento-rgb),
            0.72
        );

}


/*
    Mantiene colores limpios dentro
    de la lista nativa del navegador.
*/
.campo-formulario-th select option{

    background: #ffffff;
    color: #0f172a;

}


/* ======================================================
   AVISO FLOTANTE DEL CATÁLOGO
====================================================== */

/*
    Aparece sobre la pantalla de la tabla después
    de cerrar el formulario.
*/
.aviso-catalogo-th{

    position: fixed;

    bottom: 24px;
    right: 24px;

    z-index: 1150;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    width: min(420px, calc(100vw - 110px));

    padding: 14px 16px;

    border: 1px solid #a7f3d0;
    border-radius: 12px;

    background: #ecfdf5;
    color: #047857;

    box-shadow:
        0 14px 34px
        rgba(15, 23, 42, 0.18);

    font-size: 0.92rem;
    font-weight: 600;

    animation:
        aparecer-aviso-th
        220ms
        ease-out;

}


.aviso-catalogo-th[hidden]{

    display: none;

}


/*
    Variante utilizada cuando la operación terminó,
    pero el catálogo necesita recargarse.
*/
.aviso-catalogo-advertencia-th{

    border-color: #fde68a;

    background: #fffbeb;
    color: #92400e;

}


.btn-cerrar-aviso-catalogo-th{

    flex: 0 0 auto;

    width: 28px;
    height: 28px;

    border: none;
    border-radius: 7px;

    background: transparent;
    color: currentColor;

    font-size: 1.25rem;
    line-height: 1;

    cursor: pointer;

}


.btn-cerrar-aviso-catalogo-th:hover{

    background:
        rgba(15, 23, 42, 0.07);

}


@keyframes aparecer-aviso-th{

    from{

        opacity: 0;

        transform:
            translateY(-8px);

    }

    to{

        opacity: 1;

        transform:
            translateY(0);

    }

}


@media (max-width: 680px){

    .aviso-catalogo-th{

        bottom: 12px;
        right: 12px;

        width:
            calc(100vw - 96px);

    }

}

/* ======================================================
   DETALLE DEL TERMOHIGRÓMETRO
====================================================== */

.ventana-detalle-th{

    width: min(880px, 100%);

}


.contenido-detalle-th{

    padding: 24px 26px;

}


/*
    Etiquetas del estado administrativo
    y del estado de calibración.
*/
.estados-detalle-th{

    display: flex;
    flex-wrap: wrap;
    gap: 9px;

    margin-bottom: 20px;

}


.estado-detalle-th{

    display: inline-flex;
    align-items: center;

    min-height: 28px;

    padding: 5px 11px;

    border-radius: 999px;

    font-size: 0.78rem;
    font-weight: 700;

}


.detalle-activo-th{

    background: #e8f2fb;
    color: #176b9b;

}


.detalle-inactivo-th{

    background: #fff1f2;
    color: #b4232d;

}


.detalle-vigente-th{

    background: #ecfdf5;
    color: #047857;

}


.detalle-proxima-vencer-th{

    background: #fffbeb;
    color: #92400e;

}


.detalle-vencida-th{

    background: #fff1f2;
    color: #b4232d;

}


.detalle-sin-calibracion-th{

    background: #f1f5f9;
    color: #64748b;

}


/* ======================================================
   INFORMACIÓN GENERAL
====================================================== */

.rejilla-detalle-th{

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

    margin: 0;

}


.rejilla-detalle-th > div{

    min-width: 0;

    padding: 13px 14px;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    background: #f8fafc;

}


.rejilla-detalle-th dt{

    margin-bottom: 5px;

    color: #64748b;

    font-size: 0.76rem;
    font-weight: 700;

    letter-spacing: 0.04em;
    text-transform: uppercase;

}


.rejilla-detalle-th dd{

    margin: 0;

    color: #0f172a;

    font-size: 0.95rem;
    font-weight: 600;

    overflow-wrap: anywhere;

}


/* ======================================================
   HISTORIAL DE CALIBRACIONES
====================================================== */

.historial-calibraciones-th{

    margin-top: 24px;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    overflow: hidden;

}


.encabezado-historial-th{

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 14px 16px;

    background: #f8fafc;

    border-bottom: 1px solid #e2e8f0;

}


.encabezado-historial-th h3{

    margin: 0;

    color: #0f172a;

    font-size: 1rem;

}


.encabezado-historial-th span{

    color: #64748b;

    font-size: 0.82rem;

}


.contenedor-historial-th{

    overflow-x: auto;

}


.tabla-historial-th{

    width: 100%;

    border-collapse: collapse;

}


.tabla-historial-th th,
.tabla-historial-th td{

    padding: 12px 14px;

    text-align: left;
    white-space: nowrap;

    border-bottom: 1px solid #e2e8f0;

}


.tabla-historial-th th{

    background: #ffffff;
    color: #475569;

    font-size: 0.76rem;
    text-transform: uppercase;

}


.tabla-historial-th td{

    color: #334155;

    font-size: 0.88rem;

}


.tabla-historial-th tbody tr:last-child td{

    border-bottom: none;

}


.mensaje-historial-vacio-th{

    margin: 0;

    padding: 22px 16px;

    color: #64748b;

    text-align: center;
    font-size: 0.9rem;

}


.mensaje-historial-vacio-th[hidden]{

    display: none;

}


/*
    Ajusta el pie porque este modal no utiliza
    el elemento form.
*/
.ventana-detalle-th >
.acciones-formulario-th{

    margin: 0;

    padding:
        18px
        26px
        24px;

}


/* ======================================================
   DETALLE EN CELULARES
====================================================== */

@media (max-width: 680px){

    .contenido-detalle-th{

        padding:
            20px
            18px;

    }


    .rejilla-detalle-th{

        grid-template-columns: 1fr;

    }


    .encabezado-historial-th{

        align-items: flex-start;
        flex-direction: column;

    }


    .ventana-detalle-th >
    .acciones-formulario-th{

        padding:
            16px
            18px
            20px;

    }

}

/*
    La calibración necesita una ventana
    más compacta que el formulario de creación.
*/
.ventana-calibrar-th{

    width: min(560px, 100%);

}

/* ======================================================
   CAMBIO DE ESTADO DEL TERMOHIGRÓMETRO
====================================================== */

/*
    Mantiene el modal de confirmación compacto
    para que no se sienta invasivo.
*/
.ventana-estado-th{

    width: min(520px, 100%);

}


/*
    Los controles que no pueden utilizarse
    permanecen visibles, pero claramente deshabilitados.
*/
.btn-accion-th:disabled{

    opacity: 0.42;

    cursor: not-allowed;

}


/*
    Evita aplicar el efecto de selección
    sobre botones deshabilitados.
*/
.btn-accion-th:disabled:hover{

    color: #263750;

    border-color: #d6deea;

}


/*
    Activar utiliza un azul suave
    perteneciente al tema de BioAssist.
*/
.btn-activar-th{

    color: #075985;

    background: #e0f2fe;

    border-color: #7dd3fc;

}


.btn-activar-th:hover{

    color: #0c4a6e;

    background: #bae6fd;

    border-color: #38bdf8;

}


/*
    Desactivar utiliza un rojo controlado.

    El fondo claro conserva legibilidad
    sin llamar demasiado la atención.
*/
.btn-desactivar-th{

    color: #b42318;

    background: #fff1f2;

    border-color: #fda4af;

}


.btn-desactivar-th:hover{

    color: #991b1b;

    background: #ffe4e6;

    border-color: #fb7185;

}


/*
    Dentro del modal, la confirmación de desactivar
    utiliza un botón sólido para señalar la importancia.
*/
.btn-confirmar-desactivar-th{

    color: #ffffff;

    background: #c2413b;

    border-color: #c2413b;

}


.btn-confirmar-desactivar-th:hover{

    background: #a93632;

    border-color: #a93632;

}


/* Administración de servicios y ubicaciones */
.acciones-catalogo-th {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.acciones-catalogo-th > button {
    flex: 1 1 auto;
}

#modal-catalogo-th [hidden] {
    display: none !important;
}

#lista-servicios-catalogo-th {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

@media (max-width: 1100px) {
    .acciones-catalogo-th {
        grid-column: 1 / -1;
    }

    .acciones-catalogo-th > button {
        width: auto;
    }
}

.grupo-servicio-catalogo-th {
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    padding: 12px 14px;
    background: #f8fafc;
    overflow-wrap: anywhere;
}

.grupo-servicio-catalogo-th summary {
    cursor: pointer;
    color: #1e293b;
    font-weight: 600;
}

.grupo-servicio-catalogo-th ul {
    margin: 12px 0 0;
    padding-left: 22px;
}

.grupo-servicio-catalogo-th li {
    padding: 5px 0;
}

.editor-nombre-catalogo-th {
    margin-top: 8px;
}

.editor-nombre-catalogo-th form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
}

.editor-nombre-catalogo-th label {
    display: grid;
    gap: 5px;
    flex: 1 1 180px;
    min-width: 0;
}

.editor-nombre-catalogo-th input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font: inherit;
}

.editor-nombre-catalogo-th button {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #334155;
    cursor: pointer;
}

.editor-nombre-catalogo-th button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}


.editor-nombre-catalogo-th .btn-eliminar-catalogo-th {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff7f7;
}

.editor-nombre-catalogo-th > div {
    margin-top: 8px;
}

.editor-nombre-catalogo-th form > p {
    flex-basis: 100%;
    margin: 8px 0;
    color: #64748b;
}

.advertencia-eliminar-th {
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff7f7;
    color: #991b1b;
    line-height: 1.5;
}

.btn-principal-th.btn-eliminar-definitivo-th {
    background: #b91c1c;
    color: #fff;
}

.btn-principal-th.btn-eliminar-definitivo-th:hover:not(:disabled) {
    background: #991b1b;
}

.btn-principal-th.btn-eliminar-definitivo-th:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fila-confirmacion-codigo-th {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
}

.fila-confirmacion-codigo-th > input {
    flex: 1 1 0;
    min-width: 0;
    width: 0;
}

.fila-confirmacion-codigo-th > button {
    flex: 0 0 auto;
    white-space: nowrap;
    margin: 0;
}