:root {
    --edomex-vino: #611232;
    --edomex-vino-dark: #3d0b1f;
    --edomex-dorado: #b38e5d;
    --edomex-gris-bg: #f4f6f9;
}

body {
    background-color: var(--edomex-gris-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

/* =========================================================
   ENCABEZADO INSTITUCIONAL
========================================================= */

.navbar-gobierno {
    background: #ffffff;
    color: #333333;
    border-bottom: 4px solid #D9DDE1;
    /* Línea gris */
    padding: 0;
    margin: 0 auto 2rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Fila principal */

.encabezado-principal {
    min-height: 79px;
    display: flex;
    align-items: center;
    padding: 8px 15px;
    gap: 15px;
}

.encabezado-logo {
    width: 310px;
    min-width: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #dedede;
    padding-right: 15px;
}

.encabezado-logo img {
    width: 100%;
    height: 62px;
    object-fit: contain;
}

.encabezado-titulo {
    flex: 1;
    display: flex;
    align-items: center;
}

.encabezado-titulo h1 {
    color: #8A1C3A;
    font-size: 30px;
    font-weight: 500;
    margin: 0;
}

.encabezado-usuario {
    margin-left: auto;
}

.encabezado-usuario .btn-cerrar-sesion {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #8A1C3A;
    color: #ffffff;
    border-radius: 8px;
    font-size: 17px;
    text-decoration: none;
    transition: all .2s ease;
}

.encabezado-usuario .btn-cerrar-sesion:hover {
    background: #691C32;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Franja inferior */

.encabezado-subtitulo {
    min-height: 39px;
    background: #f7f7f7;
    border-top: 3px solid #8A1C3A;
    /* Línea vino */
    display: flex;
    align-items: center;
    padding-left: 337px;
}

.encabezado-subtitulo span {
    color: #BC955B;
    font-size: 23px;
    font-weight: 300;
}

/* Responsive */

@media (max-width: 768px) {
    .encabezado-principal {
        flex-wrap: wrap;
        padding: 12px;
    }

    .encabezado-logo {
        width: 190px;
        min-width: 150px;
    }

    .encabezado-logo img {
        height: 48px;
    }

    .encabezado-titulo h1 {
        font-size: 20px;
    }

    .encabezado-usuario {
        margin-left: auto;
    }

    .encabezado-subtitulo {
        padding: 8px 15px;
        min-height: 35px;
    }

    .encabezado-subtitulo span {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .encabezado-principal {
        justify-content: center;
    }

    .encabezado-logo {
        width: 100%;
        border-right: none;
        padding: 0;
    }

    .encabezado-titulo {
        justify-content: center;
    }

    .encabezado-usuario {
        margin: 5px auto;
    }

    .encabezado-subtitulo {
        justify-content: center;
    }
}

/* Tarjetas de Secciones / Estilo Proveedores */
.card-seccion {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background: #ffffff;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-top: 4px solid var(--edomex-vino);
}

.card-seccion .card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    color: var(--edomex-vino);
    font-weight: 700;
    padding: 1.1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-seccion .card-body {
    padding: 1.5rem;
}

/* Botones institucionales */
.btn-edomex-primary {
    background-color: var(--edomex-vino);
    color: white;
    border: none;
    font-weight: 600;
    transition: background 0.2s;
    border-radius: 8px;
}

.btn-edomex-primary:hover {
    background-color: var(--edomex-vino-dark);
    color: white;
}

.btn-edomex-accent {
    background-color: var(--edomex-dorado);
    color: white;
    border: none;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.45rem 1rem;
    transition: background-color 0.2s;
}

.btn-edomex-accent:hover {
    background-color: #9a784d;
    color: white;
}

/* Tabla estilizada */
.table th {
    background-color: #f8f9fa;
    color: var(--edomex-vino);
    font-weight: 700;
    border-bottom: 2px solid #dee2e6;
}

/* Modal gubernamental unificado */
.modal-gob .modal-header {
    background: linear-gradient(135deg, var(--edomex-vino), var(--edomex-vino-dark));
    color: #fff;
    border-bottom: 4px solid var(--edomex-dorado);
    padding: 18px 25px;
}


/* =========================================================
   PIE DE PÁGINA INSTITUCIONAL
========================================================= */

.footer-institucional {
    width: 100%;
    margin-top: 45px;
    padding: 0 0 20px;
    background: transparent;
}

.footer-contenido {
    background: #ffffff;
    border-top: 3px solid #8A1C3A;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.footer-principal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 25px max(25px, calc((100% - 1140px) / 2));
}

.footer-identidad {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-icono {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8edf0;
    color: #8A1C3A;
    border-radius: 10px;
    font-size: 20px;
}

.footer-titulo {
    color: #691C32;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.footer-subtitulo {
    color: #777777;
    font-size: 12px;
    margin: 0;
}

.footer-direccion {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #666666;
    font-size: 12px;
    max-width: 390px;
    line-height: 1.6;
}

.footer-direccion i {
    color: #BC955B;
    font-size: 15px;
    margin-top: 2px;
}

.footer-inferior {
    width: 100%;
    background: #f5f6f7;
    border-top: 1px solid #eeeeee;
    padding: 12px max(25px, calc((100% - 1140px) / 2));
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-inferior p {
    color: #858585;
    font-size: 11px;
    margin: 0;
}

.footer-inferior .footer-gobierno {
    color: #8A1C3A;
    font-weight: 600;
}

/* RESPONSIVE */

@media (max-width: 576px) {

    .footer-principal {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .footer-direccion {
        max-width: 100%;
    }

    .footer-inferior {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 20px;
    }

}



/* =========================================================
   LOADER
========================================================= */

.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, .96);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity .4s ease, visibility .4s ease;
}

.spinner-overlay.ocultar {
    opacity: 0;
    visibility: hidden;
}

/* Contenedor del spinner */
.loader-circle {
    position: relative;
    width: 110px;
    height: 110px;
}

/* Spinner */
.spinner {
    width: 110px;
    height: 110px;
    border: 6px solid rgba(188, 149, 91, .25);
    border-top: 6px solid #9F2241;
    border-radius: 50%;
    animation: girar .9s linear infinite;
}

/* Logo */
.image {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 55px;
    height: 55px;
    transform: translate(-50%, -50%);
}

/* Texto */

.loader-texto {
    font-size: 14px;
    font-weight: 600;
    color: #9F2241;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.loader-subtexto {
    font-size: 12px;
    color: #777;
}

/* Animación */

@keyframes girar {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


 /* Botones institucionales */
        .btn-edomex-primary {
            background-color: var(--edomex-vino);
            color: white;
            border: none;
            font-weight: 600;
            transition: background 0.2s;
            border-radius: 8px;
        }

/* Paginación */
        .pagination .page-item .page-link {
            color: var(--edomex-vino);
            border-radius: 6px;
            margin: 0 3px;
        }

/*APARTADO DEL NUEVO*/
        /* Filas de formsets estándar */
        .form-row-item {
            background-color: #fbfbfb;
            border: 1px solid #eaeaea;
            border-radius: 10px;
            padding: 12px 16px;
            margin-bottom: 12px;
            transition: all 0.2s ease;
        }

         .form-row-item:hover {
            background-color: #f4f6f8;
            border-color: #dcdcdc;
        }

           
        /* Estilos de controles e inputs */
        .form-control, .form-select {
            border-radius: 8px;
            border: 1px solid #ced4da;
            padding: 0.6rem 0.75rem;
            font-size: 0.95rem;
        }

          .form-control:focus, .form-select:focus {
            border-color: var(--edomex-dorado);
            box-shadow: 0 0 0 0.25rem rgba(179, 142, 93, 0.2);
        }

        /* Switches estilizados con el color vino institucional */
        .form-check-input:checked {
            background-color: var(--edomex-vino) !important;
            border-color: var(--edomex-vino) !important;
        }

        /*CATALOGO*/

        
        /* Estilo para el paginador de equipamiento (1/5) */
        .pagination-eq {
            background-color: #ffffff;
            border: 1px solid #ced4da;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        }
        .pagination-eq .btn {
            border: none;
            background: transparent;
            color: var(--edomex-vino);
            font-weight: bold;
            padding: 1px 8px;
            transition: background 0.2s;
        }
        .pagination-eq .btn:hover {
            background-color: #f1f3f5;
            color: var(--edomex-vino);
        }
        /* Botón personalizado en color dorado institucional */
        .btn-edomex-dorado {
            color: var(--edomex-vino);
            border: 1px solid var(--edomex-dorado);
            background-color: #faf6f0;
            transition: all 0.2s ease;
        }
        .btn-edomex-dorado:hover {
            background-color: var(--edomex-dorado);
            color: #ffffff;
        }

         /* Contenedor de logotipo limpio (sin recuadro gris punteado) */
        .proveedor-logo-container {
            height: 90px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 12px;
            background-color: transparent;
            border: none;
            border-radius: 8px;
            overflow: hidden;
            padding: 2px;
        }
        .proveedor-logo-container img {
            max-height: 80px;
            max-width: 100%;
            object-fit: contain;
        }
        .equipamiento-viewport {
            min-height: 165px;
            max-height: 185px;
            overflow-y: auto;
            background-color: #fafbfc;
            border: 1px solid #edf0f2;
            border-radius: 8px;
            padding: 10px;
            margin-bottom: 10px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        .badge-vehiculo {
            background-color: #f1f3f5;
            color: #333;
            border: 1px solid #dee2e6;
            border-radius: 6px;
            padding: 4px 2px;
            font-size: 0.75rem;
            font-weight: 600;
        }
        .badge-vehiculo span {
            color: var(--edomex-vino);
            display: block;
            font-size: 0.85rem;
        }
        .card-proveedor {
            border: none;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.06);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            background: #ffffff;
            border-top: 5px solid var(--edomex-vino);
            height: 100% !important;
            display: flex;
            flex-direction: column;
        }
        .card-proveedor:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 20px rgba(97, 18, 50, 0.15);
        }
        .card-body {
            display: flex;
            flex-direction: column;
            flex-grow: 1;
        }