/* -------------------------------------------
   ESTILOS GENERALES Y CONFIGURACIÓN BASE
------------------------------------------- */
body {
  font-family: "Arial", sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: #f0f2f5;
  /* Los estilos de centrado del login están en línea en el código Python */
}

/* -------------------------------------------
   ESTILOS DEL DASHBOARD
------------------------------------------- */

.dashboard-card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex: 1;
  text-align: center;
  min-width: 150px;
}

.dashboard-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* -------------------------------------------
   ESTILOS DE LA APLICACIÓN PRINCIPAL (POST-LOGIN)
------------------------------------------- */

/* Cabecera de la Aplicación */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background-color: #1e40af; /* Azul Bayer */
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mensaje de Bienvenida dentro del Div principal */
.welcome-message {
  padding: 10px;
  background: #d1e7dd;
  color: #0f5132;
  border-bottom: 1px solid #a3cfb5;
  font-weight: bold;
}

/* Botón de Logout */
.logout-button {
  padding: 8px 15px;
  background-color: #f44336; /* Rojo */
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.logout-button:hover {
  background-color: #d32f2f;
}

/* Botón de Reset View */
.reset-btn {
  padding: 10px 20px;
  background-color: #1e40af; /* Mismo azul que el header */
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
  margin-top: 10px;
}

.reset-btn:hover {
  background-color: #102a82;
}

/* -------------------------------------------
   ESTILOS DEL MAPA
------------------------------------------- */

#map,
#dashboard-map {
  margin: 20px auto;
  max-width: 95%;
}

/* -------------------------------------------
   NOTAS DE ESTILO DEL LOGIN (Por si quieres volver a las clases)
------------------------------------------- */
/*
NOTA: Los estilos específicos del formulario de login (centrado, tarjeta, inputs y botón de Acceder)
fueron definidos con estilos en línea en el código Python (LOGIN_CARD_STYLE, etc.) para una
implementación más rápida. Si quisieras mover esos estilos aquí, tendrías que reasignar las clases
CSS a los componentes Dash en el `login_layout` de tu código Python.
*/

/* -------------------------------------------
   SEGURIDAD (MITIGACIONES)
------------------------------------------- */

/* Configuración para Impresión (Ctrl+P) */
@media print {
    /* Aseguramos que el cuerpo se vea */
    body {
        display: block !important;
        /* Forzar impresión de fondos/imágenes (Chrome/Safari/Edge/Firefox) */
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Marca de Agua SOLO visible al imprimir */
    body::after {
        content: "";
        background-image: url('/assets/images/netafim_logo.png');
        background-repeat: repeat;
        background-size: 300px;
        opacity: 0.4; /* Más visible para "tapar" el contenido */
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        position: fixed;
        z-index: 2147483647; /* Máximo z-index posible para estar ENCIMA de todo */
        pointer-events: none;
        transform: rotate(-30deg);
    }
}
