/* ------------------------------
   ESTILO GENERAL
--------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Roboto, sans-serif;
}

body {
    background: #ffffff;
    color: #333;
    line-height: 1.6;
}

/* ------------------------------
   HEADER
--------------------------------*/
header {
    background: #0056b3;
    padding: 2px 5px;
    border-bottom: 2px solid #e3e3e3;
    /* gap: 15px; */
    display: flex;
    justify-content: space-between;
    align-items: center; 
    
}

header p {
    margin-right: 5px;
    font-weight: 400;
    color: #ffffff;
}

header a {
    margin-right: 5px;
    font-weight: 400;
    color: #ffffff;
    text-decoration: none;
}

.header_central { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    padding: 10px 0; 
} 

.logo { 
    height: 50px; 
    width: auto; 
    margin-bottom: 5px; 
}

/* ------------------------------
   BOTÓN DE CERRAR SESIÓN
--------------------------------*/
header button {
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

button, .btn_login {
    background: #28a745; 
}

button, .btn_login:hover {
    background: #218838; 
}

button, .btn_logout {
    background: #d9534f;
}

button, .btn_logout:hover {
    background: #c9302c;
}

.header_right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-right: 5px;
    text-align: right;
}

.header_left {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding-left: 20px;
    text-align: left;
}

/* ------------------------------
   NAV (si lo activas)
--------------------------------*/
nav {
    margin-top: 10px;
    display: flex;
    gap: 15px;
}

nav a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    transition: 0.2s;
}

nav a:hover {
    background: #e8f0ff;
}

/* Icono del medidor */
.icono_medidor {
    width: 20px;
    vertical-align: middle;
    margin-right: 5px;
}

/* ------------------------------
   MAIN
--------------------------------*/
main {
    max-width: 1100px;
    margin: 30px auto;
    background: #FFF8E7;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ------------------------------
   TIPOGRAFÍA GENERAL
--------------------------------*/
h1, h2, h3 {
    color: #222;
    margin-bottom: 15px;
}

p {
    margin-bottom: 12px;
}

/* ------------------------------
   BOTONES GENERALES
--------------------------------*/
button, .btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
}

button:hover, .btn:hover {
    background: #0056b3;
}

.error {
    color: red;
}

/* //////////////////////////// */
/* Fondo del título animado */
.fondo {
    background-image: url("/static/img/fondito.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 500px;
    text-align: center;
}

/* Título SVG */
.titulo {
    font-family: "Bebas Neue", sans-serif;
    font-size: 120px;
    fill: transparent;
    stroke: white;
    stroke-width: 0.1;
}

/* Letras animadas */
.letter {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: draw 1.8s ease forwards, fillIn 2s ease forwards 2.8s;
}

/* Animación de dibujo */
@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Relleno azul */
@keyframes fillIn {
    to {
        fill: #1565c0; /* azul Materialize */
    }
}

/* Delays por letra */
.letter:nth-child(1) { animation-delay: 0s; }
.letter:nth-child(2) { animation-delay: 0.2s; }
.letter:nth-child(3) { animation-delay: 0.4s; }
.letter:nth-child(4) { animation-delay: 0.6s; }
.letter:nth-child(5) { animation-delay: 0.8s; }
.letter:nth-child(6) { animation-delay: 1s; }
.letter:nth-child(7) { animation-delay: 1.2s; }
.letter:nth-child(8) { animation-delay: 1.4s; }
.letter:nth-child(9) { animation-delay: 1.6s; }
.letter:nth-child(10) { animation-delay: 1.8s; }
.letter:nth-child(11) { animation-delay: 2s; }
.letter:nth-child(12) { animation-delay: 2.2s; }
.letter:nth-child(13) { animation-delay: 2.4s; }
.letter:nth-child(14) { animation-delay: 2.6s; }
