/* CONFIGURACIÓN GENERAL */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #F4F7FB;
    color: #26352e;
    font-size: 18px;
}

/* ENCABEZADO */
header {
    background: #102A43;
    color: white;
    padding: 30px 20px;
    text-align: center;
}

header h1 {
    font-size: 30px;
    margin-bottom: 8px;
}

header p {
    font-size: 17px;
}

/* CONTENIDO */
main {
    max-width: 650px;
    margin: 35px auto;
    padding: 20px;
}

section {
    background: white;
    padding: 30px 22px;
    border-radius: 16px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    text-align: center;
}

section h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

section p {
    font-size: 19px;
    line-height: 1.5;
    margin-bottom: 25px;
}

/* BOTONES */
button {
    width: 100%;
    min-height: 60px;
    background: #1769AA;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 19px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(16, 42, 67, 0.18);
transition: all 0.25s ease;
    cursor: pointer;
}


.estado-edificio {
    width: auto;
    min-height: 48px;
}
.nombre-edificio {
    width: 100%;
    min-height: 110px;
    background: #E8F1FC;
    color: #34495E;
    border: 1px solid #C5D9F0;
    border-radius: 14px;
    font-size: 21px;
    font-weight: 700;
    text-align: left;
    padding: 20px 16px;
    white-space: normal;
    box-shadow: 0 4px 10px rgba(16, 42, 67, 0.18);
    transition: all 0.25s ease;
    margin-bottom: 12px;
}

.nombre-edificio:hover {
    background: #DCEBFA;
    color: #102A43;
    border-color: #9FC5EC;
    box-shadow: 0 6px 14px rgba(16, 42, 67, 0.18);
    transform: translateY(-2px);
}
button:hover:not(.estado-edificio):not(.opcion-estado):not(.tarjeta-menu):not(.nombre-edificio):not(.volverMenu):not(#volverTerritorios) {
    background: #12558A;

}

.estado-reservado:hover,
.estado-reservado:disabled {
    background: #E9D9AE;
    color: #57451F;
}

/* PIE DE PÁGINA */
footer {
    text-align: center;
    padding: 25px;
    color: #65736b;
    font-size: 15px;
}

/* ADAPTACIÓN A CELULARES */
@media (max-width: 600px) {
    header h1 {
        font-size: 27px;
    }

    main {
        margin: 20px auto;
        padding: 15px;
    }

    section {
        padding: 25px 18px;
    }
}
/* FORMULARIO DE INICIO DE SESION */

#formLogin {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    margin: 25px auto 0;
    text-align: left;
}

#formLogin label {
    font-size: 18px;
    font-weight: bold;
}

#formLogin input {
    width: 100%;
    min-height: 52px;
    padding: 12px;
    border: 1px solid #aaa;
    border-radius: 8px;
    font-size: 18px;
}

#formLogin button {
    margin-top: 12px;
    min-height: 60px;
}

/* Formulario de recuperación */
#formRecuperar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    margin: 25px auto 0;
    text-align: left;
}

#formRecuperar label {
    font-size: 18px;
    font-weight: bold;
}

#formRecuperar input {
    width: 100%;
    min-height: 52px;
    padding: 12px;
    border: 1px solid #aaa;
    border-radius: 8px;
    font-size: 18px;
}

#formRecuperar button {
    margin-top: 12px;
    min-height: 60px;
}


/* ==================================
   LISTA DE EDIFICIOS - TJ EDIFICIOS
================================== */

#listaEdificios {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fila-edificio {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 14px 16px;
    background: #FFFFFF;
    border: 1px solid #DADADA;
    border-radius: 12px;
    box-sizing: border-box;
}

.fila-edificio button:not(.nombre-edificio) {
    width: auto;
    min-height: 42px;
    padding: 10px 18px;
    font-size: 15px;
    align-self: center;
}

.nombre-edificio {
    flex: 1;
    min-width: 0;
    display: flex;
align-items: center;
justify-content: flex-start;justify-content: center;
position: relative;
gap: 16px;
    background: transparent;
    color: #26352F;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    padding: 10px 4px;
    white-space: normal;
}
.icono-edificio {
    width: 42px;
    height: 70px;
    flex-shrink: 0;
    position: absolute;
    left: 16px;
}

.estado-edificio {
    flex-shrink: 0;
    min-width: 125px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
}

.estado-disponible {
    background: #176B50;
    color: #FFFFFF;
}

.estado-reservado {
    background: #E9D9AE;
    color: #57451F;
    cursor: default;
}

/* Adaptación para celulares */
@media (max-width: 480px) {
    .fila-edificio {
        gap: 8px;
        padding: 10px;
    }

    .nombre-edificio {
        font-size: 15px;
    }

    .estado-edificio {
        min-width: 105px;
        padding: 11px 8px;
        font-size: 12px;
    }
}
.titulo-edificio {
    display: block;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
}

.direccion-edificio {
    display: block;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
}

/* =================================
   FICHA DE DEPARTAMENTOS
================================= */

.encabezado-detalle {
    background: #FFFFFF;
    padding: 20px;
    margin: 18px 0;
    border: 1px solid #E1E6E3;
    border-radius: 14px;
}

.encabezado-detalle h2 {
    font-size: 25px;
    color: #174F3D;
    margin: 0 0 5px;
}

.encabezado-detalle p {
    font-size: 17px;
    margin: 0;
    color: #52615B;
}

.seccion-departamentos {
    margin-top: 22px;
}

.encabezado-departamentos {
    margin-bottom: 14px;
}

.encabezado-departamentos h3 {
    font-size: 22px;
    color: #26352F;
    margin: 0 0 5px;
}

.contador-seleccion {
    font-size: 15px;
    color: #176B50;
    font-weight: 600;
    margin: 0;
}

.lista-departamentos {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.departamento-fila {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFFFFF;
    border: 1px solid #E1E6E3;
    border-radius: 11px;
    padding: 13px 12px;
    min-height: 65px;
    box-sizing: border-box;
}

.casilla-departamento {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
    accent-color: #176B50;
}

.informacion-departamento {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.informacion-departamento strong {
    font-size: 17px;
    color: #26352F;
}

.fecha-visita {
    font-size: 12px;
    color: #75817B;
}

/* ESTADOS DE VISITA */

.estado-visita {
    width: auto;
    min-height: 0;
    margin: 0;
    border: none;
    padding: 9px 13px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    min-width: 115px;
}

.columna-estado {
    flex-shrink: 0;
}

.estado-sin-visitar {
    background: #ECEFED;
    color: #52615B;
}

.estado-atendido {
    background: #A8DFC0;
    color: #125638;
}

.estado-no-atendido {
    background: #FFD58A;
    color: #805000;
}

.estado-no-visitar {
    background: #F2AAAA;
    color: #8B2020;
}
/* MENU DE OPCIONES */

.columna-estado {
    position: relative;
}

.menu-estados {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: white;
    border: 1px solid #DADADA;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    min-width: 145px;
}

.menu-estados[hidden] {
    display: none;
}

.opcion-estado {
    border: none;
    border-radius: 7px;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.opcion-estado.estado-atendido {
    background: #A8DFC0;
    color: #125638;
}

.opcion-estado.estado-no-atendido {
    background: #FFD58A;
    color: #805000;
}

.opcion-estado.estado-no-visitar {
    background: #F2AAAA;
    color: #8B2020;
}


/* Adaptación para celulares */
@media (max-width: 480px) {
    .departamento-fila {
        gap: 9px;
        padding: 11px 9px;
    }

    .informacion-departamento strong {
        font-size: 15px;
    }

    .estado-visita {
        font-size: 11px;
        padding: 7px 8px;
    }
}

.menu-estados button:nth-of-type(1):hover {
    background-color: #D9F0E2 !important;
    color: #146B3A !important;
}

.menu-estados button:nth-of-type(2):hover {
    background-color: #FFF0D6 !important;
    color: #95620A !important;
}

.menu-estados button:nth-of-type(3):hover {
    background-color: #F8DDDD !important;
    color: #A52D2D !important;
}


/* =================================
   CARÁTULA DE PRESENTACIÓN
================================= */

#portada {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #102A43;
    border-radius: 18px;
    padding: 30px 20px;
    text-align: center;
    color: #FFFFFF;
}

.portada-contenido {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.portada-icono {
    font-size: 65px;
    margin-bottom: 10px;
}

#portada h1 {
    color: #FFFFFF;
    font-size: 34px;
    letter-spacing: 2px;
    margin: 0;
}

#portada p {
    color: #D8E8DC;
    font-size: 14px;
    letter-spacing: 3px;
    margin: 0;
}

#botonInicio {
    width: 100%;
    max-width: 280px;
    min-height: 58px;
    margin-top: 35px;
    background: #FFFFFF;
    color: #183D30;
    border: none;
    border-radius: 9px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
}

#botonInicio:hover {
    background: #E1EBE4;
    color: #183D30;
}

/* Pantallas */

#inicio[hidden] {
    display: none;
}


/* FORMULARIO DE ACCESO EN LA CARÁTULA */

#formLogin {
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
    padding: 24px;
    background: #FFFFFF;
    color: #26352F;
    border-radius: 12px;
    text-align: left;
}

#formLogin[hidden] {
    display: none;
}

#formLogin label {
    color: #26352F;
    font-size: 15px;
    font-weight: 600;
}

#formLogin input {
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px;
    border: 1px solid #C9D1CC;
    border-radius: 7px;
    font-size: 15px;
    background: #F5F7F5;
    color: #26352F;
}

#formLogin button {
    width: 100%;
    min-height: 52px;
    margin-top: 10px;
    background: #1769AA;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(16, 42, 67, 0.18);
transition: all 0.25s ease;
    cursor: pointer;
}

#formLogin button:hover {
    background: #12558A;
    box-shadow: 0 6px 14px rgba(16, 42, 67, 0.25);
    transform: translateY(-2px);
}

button:hover:not(.estado-edificio):not(.estado-visita):not(.opcion-estado):not(.nombre-edificio):not(.volverMenu) {
    filter: brightness(1.08);
    box-shadow: 0 6px 14px rgba(16, 42, 67, 0.25);
    transform: translateY(-2px);
}

#formLogin a {
    color: #236044;
    text-align: center;
    font-size: 14px;
    margin-top: 5px;
}

#formLogin #mensaje {
    color: #26352F;
    font-size: 13px;
    text-align: center;
    overflow-wrap: anywhere;
}


/* =====================================
   MENÚ PRINCIPAL TJ EDIFICIOS
===================================== */

.encabezado-principal {
    background: #34495E;
    color: #FFFFFF;
    padding: 25px 20px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 28px;
}

.encabezado-principal h1 {
    color: #FFFFFF;
    margin: 0;
    font-size: 28px;
    letter-spacing: 2px;
}

.encabezado-principal p {
    color: #D8E8DC;
    margin: 8px 0 0;
    font-size: 13px;
    letter-spacing: 2px;
}

#menuPrincipal h2 {
    color: #26352F;
    font-size: 23px;
    margin-bottom: 5px;
}

#menuPrincipal > p {
    color: #68736D;
    margin-top: 0;
    margin-bottom: 22px;
}

.menu-tarjetas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.tarjeta-menu {
    width: 100%;
    min-height: 150px;
    padding: 20px 14px;
    background: #E8F1FC;
color: #102A43;
border: 1px solid #C5D9F0;
    border-radius: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    text-align: center;
}

.tarjeta-menu:hover {
    background: #1769AA;
    color: #FFFFFF;
    border-color: #12558A;
}

.tarjeta-menu:hover strong,
.tarjeta-menu:hover small,
.tarjeta-menu:hover .icono-menu {
    color: #FFFFFF;
}

.icono-menu {
    font-size: 34px;
}

.tarjeta-menu strong {
    font-size: 17px;
}

.tarjeta-menu small {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

#seccionTerritorios,
#seccionMisVisitas,
#seccionRegistros,
#seccionMiCuenta {
    background: #FFFFFF;
    padding: 20px;
    border-radius: 13px;
    margin-top: 20px;
    border: 1px solid #E1E7E3;
}

#finalizarJornada {
    background: #183D30;
    color: #FFFFFF;
    margin-top: 20px;
    border-radius: 9px;
}

#finalizarJornada:hover {
    background: #286047;
}

/* Ocultar secciones no seleccionadas */

[hidden] {
    display: none !important;
}

/* Adaptación para celulares */

@media (max-width: 480px) {
    .menu-tarjetas {
        gap: 11px;
    }

    .tarjeta-menu {
        min-height: 140px;
        padding: 15px 9px;
    }

    .encabezado-principal h1 {
        font-size: 24px;
    }
}
/* BOTONES DE NAVEGACIÓN DEL TERRITORIO */

.acciones-territorio {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}



.acciones-territorio .volverMenu {
    flex: 0.7;
}

.acciones-territorio #siguienteTerritorio {
    flex: 1.8;
}

.acciones-territorio button {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    white-space: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 10px;
}

#volverTerritorios {
    width: auto;
    min-width: 180px;
    padding: 12px 18px;
    font-size: 14px;
}

#listaEdificios #siguienteTerritorio {
    width: auto;
    min-width: 200px;
    padding: 12px 18px;
    font-size: 14px;
}

/* COLORES DE NAVEGACIÓN */

#siguienteTerritorio {
    background-color: #176B78;
    color: white;
    border: none;
}

#volverTerritorios {
    background-color: #586574;
    color: white;
    border: none;
}

#siguienteTerritorio:hover {
    background: #1769AA !important;
    color: #FFFFFF !important;
}

#volverTerritorios:hover {
    background: #34495E !important;
    color: #FFFFFF !important;
}

.nombre-edificio:hover {
    background: #1769AA !important;
    color: #FFFFFF !important;
}
#volverTerritorios:hover {
    background: #34495E !important;
    color: #FFFFFF;
}

.volverMenu,
#volverTerritorios {
    background: #34495E;
    color: #FFFFFF;
}

.volverMenu:hover,
#volverTerritorios:hover {
    background: #34495E !important;
    color: #FFFFFF !important;
    filter: brightness(1.08);
}


/* BOTÓN DEVOLVER EDIFICIO */
.boton-devolver {
    background: #455A64 !important;
    color: #FFFFFF !important;
    border: none;
}

.boton-devolver:hover {
    background: #37474F !important;
    color: #FFFFFF !important;
}

/* BOTONES DE NAVEGACIÓN - TERRITORIOS */

#volverTerritorios {
    background: #34495E;
    color: #FFFFFF;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(16, 42, 67, 0.18);
}

#siguienteTerritorio {
    background: #1769AA;
    color: #FFFFFF;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(16, 42, 67, 0.18);
}

#volverTerritorios:hover {
    background: #40586F !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 14px rgba(16, 42, 67, 0.25);
    transform: translateY(-2px);
}

#siguienteTerritorio:hover {
    background: #12558A !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 14px rgba(16, 42, 67, 0.25);
    transform: translateY(-2px);
}

/* BOTONES DE EDIFICIOS */
.nombre-edificio {
    margin-bottom: 12px !important;
}

.nombre-edificio:hover {
    background: #D9ECFF !important;
    color: #102A43 !important;
    border-color: #1769AA !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(16, 42, 67, 0.18);
}

/* CONTROL DE EDIFICIOS: SEPARACIÓN Y EFECTO CELESTE */

#listaTerritoriosAdmin .fila-edificio {
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px;
}

#listaTerritoriosAdmin .nombre-edificio {
    margin-bottom: 0 !important;
    background: #E8F1FC !important;
    color: #102A43 !important;
    border: 1px solid #C5D9F0 !important;
    border-radius: 12px;
    transition: all 0.25s ease;
}

#listaTerritoriosAdmin .nombre-edificio:hover {
    background: #D9ECFF !important;
    color: #102A43 !important;
    border-color: #9FC5EC !important;
    box-shadow: 0 6px 14px rgba(16, 42, 67, 0.18);
    transform: translateY(-2px);
}

/* EFECTO CELESTE AL PASAR EL MOUSE SOBRE LOS EDIFICIOS */
#listaTerritoriosAdmin .fila-edificio {
    transition: background-color 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
}

#listaTerritoriosAdmin .fila-edificio:hover {
    background-color: #D9ECFF !important;
    border-color: #9FC5EC !important;
    box-shadow: 0 4px 10px rgba(16, 42, 67, 0.12);
}

/* BOTONES DEL DETALLE DE EDIFICIO */

.boton-volver-edificios,
#detalleEdificioAdmin button {
    transition: all 0.25s ease;
    box-shadow: 0 3px 8px rgba(16, 42, 67, 0.12);
}

.boton-volver-edificios {
    background: #1769AA !important;
    color: white !important;
    border: 1px solid #12558B !important;
    border-radius: 10px;
    margin-top: 15px;
}

.boton-volver-edificios:hover {
    background: #0F568F !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 42, 67, 0.18);
}

/* SEPARACIÓN DE BOTONES EN DETALLE DE EDIFICIO */
.acciones-detalle-edificio {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.acciones-detalle-edificio button {
    width: 100%;
}


/* =====================================
   FORMULARIO CREAR PUBLICADOR
===================================== */

#formularioCrearPublicador[hidden] {
    display: none !important;
}

#formularioCrearPublicador:not([hidden]) {
    display: block;
    background: #ffffff;
    padding: 25px;
    margin: 20px 0;
    border-radius: 16px;
    border: 1px solid #e1e7ed;
    box-shadow: 0 5px 18px rgba(30, 50, 70, 0.09);
}

#formularioCrearPublicador h3 {
    color: #34495e;
    font-size: 23px;
    margin: 0 0 8px;
}

#formularioCrearPublicador p {
    color: #718096;
    margin-bottom: 22px;
}

#formularioCrearPublicador label {
    display: block;
    color: #34495e;
    font-weight: 600;
    margin: 15px 0 7px;
}

#formularioCrearPublicador input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px;
    border: 1px solid #d5dde5;
    border-radius: 9px;
    font-size: 16px;
    outline: none;
}

#formularioCrearPublicador input:focus {
    border-color: #2476b5;
    box-shadow: 0 0 0 3px rgba(36, 118, 181, 0.12);
}

#formularioCrearPublicador input[readonly] {
    background: #f1f5f9;
    color: #526579;
}

.acciones-formulario {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

#btnGuardarPublicador,
#btnCancelarPublicador {
    flex: 1;
    padding: 14px 10px;
    border: none;
    border-radius: 9px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

#btnGuardarPublicador {
    background: #246fa8;
    color: white;
}

#btnCancelarPublicador {
    background: #e9eef3;
    color: #435466;
}

#btnGuardarPublicador:hover {
    background: #195b8e;
}

#btnCancelarPublicador:hover {
    background: #dce4eb;
}

@media (max-width: 480px) {
    .acciones-formulario {
        flex-direction: column;
    }
}


/* =====================================
   GESTIÓN DE PUBLICADORES - DISEÑO
===================================== */

#volverPublicadoresPrincipal {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 12px 0 14px;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: #286fa5;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(35, 75, 110, 0.15);
    transition: all 0.2s ease;
}

#btnCrearPublicador {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 20px;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: #34495e;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(35, 75, 110, 0.15);
    transition: all 0.2s ease;
}

#volverPublicadoresPrincipal:hover {
    background: #1d5d8c;
    transform: translateY(-1px);
}

#btnCrearPublicador:hover {
    background: #263b50;
    transform: translateY(-1px);
}

/* Separación entre las fichas */

#contenidoPublicadores {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#contenidoPublicadores details {
    margin-bottom: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 7px rgba(30, 50, 70, 0.06);
}


/* BOTONES DE ESTADO DE PUBLICADORES */
.btn-baja-publicador,
.btn-reactivar-publicador {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 13px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-baja-publicador {
    background: #f1e5e5;
    color: #a33b3b;
}

.btn-baja-publicador:hover {
    background: #e8d1d1;
}

.btn-reactivar-publicador {
    background: #e1eee8;
    color: #28734f;
}

.btn-reactivar-publicador:hover {
    background: #cce3d6;
}

.fila-edificio .nombre-edificio {
    position: relative;
    padding-left: 72px !important;
    text-align: left;
}


/* =========================================
   SELECTORES DE TERRITORIOS
   Publicadores y administradores
========================================= */

#listaTerritorios .nombre-edificio,
#listaTerritoriosAdmin .nombre-edificio {
    width: 100%;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 16px;
    margin-bottom: 12px;

    background: #E8F1FC;
    color: #34495E;

    border: 1px solid #C5D9F0;
    border-radius: 14px;

    font-size: 18px;
    font-weight: 650;
    text-align: center;
    line-height: 1.35;

    white-space: normal;
    box-shadow: 0 3px 8px rgba(16, 42, 67, 0.10);

    cursor: pointer;
    transition: all 0.25s ease;
}

#listaTerritorios .nombre-edificio:hover,
#listaTerritoriosAdmin .nombre-edificio:hover {
    background: #D9EAFB;
    border-color: #91BCE5;
    transform: translateY(-2px);
}

/* Territorio seleccionado por el publicador */
#listaTerritorios .nombre-edificio.territorio-seleccionado {
    background: #D2E7FA;
    border: 2px solid #4A90D9;
    color: #1F4E79;
}

/* CORRECCIÓN FINAL: CENTRADO DE TERRITORIOS */

#listaTerritorios .nombre-edificio,
#listaTerritoriosAdmin .nombre-edificio {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 16px !important;
    padding-left: 16px !important;

    text-align: center !important;
    font-size: 23px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

/* GESTIÓN DE TERRITORIOS: TARJETAS COMPACTAS */

#listaAsignacionesTerritorios .fila-edificio {
    padding: 12px 16px;
    margin: 10px 0;
    border: 1px solid #d8e0e7;
    border-radius: 12px;
    background: #ffffff;
    text-align: left;
}

#listaAsignacionesTerritorios .fila-edificio p {
    margin: 4px 0;
    line-height: 1.4;
    font-size: 15px;
}

#listaAsignacionesTerritorios .fila-edificio > strong:first-child {
    display: block;
    margin-bottom: 5px;
    color: #245b78;
    font-size: 15px;
}

#listaAsignacionesTerritorios .fila-edificio > strong:last-child {
    display: block;
    margin-top: 6px;
    font-size: 13px;
}

/* BOTÓN VOLVER: GRIS OSCURO Y SEPARADO */

#volverGestionTerritorios {
    background-color: #45515D !important;
    margin-bottom: 16px;
}

/* SEPARACIÓN DE LAS PESTAÑAS */

#listaAsignacionesTerritorios {
    margin-top: 12px;
}


/* DATOS DE MI CUENTA */
.datos-mi-cuenta {
    margin: 12px 0 18px;
}

.datos-mi-cuenta p {
    margin: 8px 0;
    line-height: 1.4;
}

/* BUSCADOR DE EDIFICIOS */
.filtro-edificios {
    margin: 16px 0;
    text-align: left;
}

.filtro-edificios label {
    display: block;
    margin-bottom: 7px;
    color: #34495E;
    font-size: 15px;
    font-weight: 700;
}

.filtro-edificios input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #C5D9F0;
    border-radius: 9px;
    background: #F8FAFC;
    color: #26352F;
    font-size: 16px;
    box-sizing: border-box;
}

.filtro-edificios input:focus {
    outline: none;
    border-color: #1769AA;
    box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.12);
}


/* =====================================
   MEJORA VISUAL - FICHA DE DEPARTAMENTOS
===================================== */

.departamento-fila {
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
}

.informacion-departamento {
    text-align: left;
    align-items: flex-start;
}

.informacion-departamento strong {
    text-align: left;
    font-size: 18px;
}

.columna-estado {
    width: 145px;
    flex-shrink: 0;
}

.estado-visita {
    width: 100%;
    min-width: 145px;
    min-height: 46px;
    padding: 11px 12px;
    font-size: 14px;
    border-radius: 9px;
}

/* Adaptación para celulares */
@media (max-width: 480px) {
    .departamento-fila {
        gap: 8px;
        padding: 10px 8px;
    }

    .informacion-departamento strong {
        font-size: 16px;
    }

    .columna-estado {
        width: 132px;
    }

    .estado-visita {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 10px 8px;
        font-size: 13px;
    }
}

/* TAMAÑO Y SEPARACIÓN DE DEPARTAMENTOS */

.departamento-fila {
    gap: 22px;
}

.informacion-departamento strong {
    font-size: 22px;
    font-weight: 700;
}

.columna-estado {
    width: 150px;
    flex: 0 0 150px;
}

/* Ajuste para celulares */
@media (max-width: 480px) {
    .departamento-fila {
        gap: 18px;
    }

    .informacion-departamento strong {
        font-size: 20px;
    }
}

/* CENTRAR EL CONJUNTO DE DEPARTAMENTO Y ESTADO */

.departamento-fila {
    display: flex;
    justify-content: center !important;
    align-items: center;
    gap: 22px;
}

.departamento-fila .informacion-departamento {
    flex: 0 0 auto !important;
    width: auto;
    min-width: 65px;
    text-align: center;
    align-items: center;
}

.departamento-fila .columna-estado {
    flex: 0 0 150px;
    width: 150px;
}

/* ALINEACIÓN UNIFORME DE TODAS LAS FILAS */

.departamento-fila .informacion-departamento {
    flex: 0 0 65px !important;
    width: 65px;
    min-width: 65px;
    align-items: center;
    text-align: center;
}

.departamento-fila .columna-estado {
    flex: 0 0 150px;
    width: 150px;
}


/* ===== MENSAJE AL ADMINISTRADOR ===== */

.panel-mensaje-admin {
    margin: 18px 0;
    border: 1px solid #dce2dc;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.06);
}

.panel-mensaje-admin summary {
    background: #465b24;
    color: #ffffff;
    padding: 13px 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.panel-mensaje-admin summary::-webkit-details-marker {
    display: none;
}

.panel-mensaje-admin summary::after {
    content: "＋";
    float: right;
    font-size: 19px;
}

.panel-mensaje-admin[open] summary::after {
    content: "−";
}

.contenido-mensaje-admin {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contenido-mensaje-admin label {
    font-weight: 700;
    color: #263526;
    font-size: 14px;
}

.contenido-mensaje-admin textarea {
    width: 100%;
    min-height: 85px;
    padding: 10px;
    border: 1px solid #cbd2c8;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

#contadorMensajeAdmin {
    text-align: right;
    color: #687268;
    font-size: 12px;
}

#fotosMensajeAdmin {
    width: 100%;
    font-size: 13px;
}

#enviarMensajeAdmin {
    background: #465b24;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 11px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

#enviarMensajeAdmin:hover {
    background: #35471a;
}


/* ===== AJUSTES VISUALES MENSAJE ADMIN ===== */

.contenido-mensaje-admin label {
    align-self: flex-start;
    text-align: left;
}

#fotosMensajeAdmin {
    border: 1px dashed #879477;
    border-radius: 8px;
    padding: 10px;
    background: #f8faf6;
    box-sizing: border-box;
}

#fotosMensajeAdmin::file-selector-button {
    background: #465b24;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    margin-right: 10px;
    cursor: pointer;
    font-weight: 600;
}

/* BOTONES DE MENSAJERÍA EN UNA FILA */

.acciones-mensaje-admin {
    display: flex;
    gap: 10px;
    width: 100%;
}

.acciones-mensaje-admin button {
    flex: 1;
    width: 50%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}