/* ============================================================
   ARCHIVO: estilos.css
   Módulo: Interfaz Ciberpunk, Grids y Componentes UI
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Michroma&display=swap');

/* --- 1. RESET Y FONDO GLOBAL --- */
body {
    background-color: #050505;
    background-image: linear-gradient(rgba(5, 5, 5, 0.4), rgba(5, 5, 5, 0.4)), url('/static/fondo.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #fff;
    font-family: 'Michroma', sans-serif;
    margin: 0;
    padding: 20px;
    height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
}

#canvas-fondo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* --- 2. ESTRUCTURA PRINCIPAL (DASHBOARD Y CONTROLES) --- */
.tablero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 100%;
    width: 100%;
    gap: 2px;
    background-color: transparent;
}

.panel {
    background-color: rgba(24, 24, 24, 0.75) !important;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    position: relative;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.contenedor-video {
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 4px;
}

#video-stream {
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 16 / 9;
    border: 2px solid #555;
    box-sizing: border-box;
    pointer-events: none;
}

/* --- 3. TEXTOS Y TIPOGRAFÍAS --- */
.titulo-panel {
    font-size: 12px;
    letter-spacing: 2px;
    color: #aaa;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.letras-barras {
    font-size: 8px;
    letter-spacing: 1px;
    color: #aaa;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.datos-mando {
    margin-top: auto;
    font-size: 11px;
    color: #888;
    line-height: 1.8;
}

#status-mando { color: #f39c12; font-weight: bold; }
#info-motores { color: #aaa; }
#latencia-pantalla { color: #7f8c8d; font-size: 11px; }

/* --- 4. BARRAS DE ESTADO (TELEMETRÍA) --- */
.indicador { margin-bottom: 12px; width: 90%; }

.estado-brazo { font-weight: bold; transition: color 0.1s ease; }

.barra-fondo {
    width: 100%;
    height: 4px;
    background-color: #222;
    border-radius: 2px;
    margin-top: 5px;
}

.barra-progreso { height: 100%; border-radius: 2px; }

/* Colores de sensores */
.bateria { width: 45%; background-color: #2ecc71; } 
.agua { width: 70%; background-color: #3498db; }    
.velocidad { width: 0%; background-color: #f39c12; transition: width 0.1s ease-out; }

/* --- 5. BOTONES Y CONTROLES UI --- */
.btn-accion {
    font-family: inherit;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid #3498db;
    color: #3498db;
    transition: all 0.3s ease;
    outline: none;
}

.btn-accion:hover { filter: brightness(1.3); transform: scale(1.02); }

.btn-interfaz-modo {
    font-family: inherit;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid #bdc3c7;
    color: #bdc3c7;
    transition: all 0.3s ease;
    outline: none;
    margin-bottom: 10px;
}

.btn-interfaz-modo:hover { background-color: rgba(255, 255, 255, 0.1); }

.btn-logout {
    color: #e74c3c;
    text-decoration: none;
    font-size: 10px;
    letter-spacing: 1px;
    border: 1px solid #e74c3c;
    padding: 4px 10px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.btn-logout:hover { background-color: #e74c3c; color: #000; font-weight: bold; }

/* ============================================================
   6. ESTILOS EXCLUSIVOS DE LA PÁGINA DE LOGIN
============================================================ */
.body-login {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    background-color: #050505 !important;
    background-image: none !important;
}

.login-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 380px;
}

.panel-login {
    background-color: rgba(15, 15, 15, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 40px 30px;
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.titulo-login {
    color: #fff;
    font-size: 14px;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.input-stx {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    color: #fff;
    font-family: 'Michroma', sans-serif;
    font-size: 11px;
    padding: 15px;
    margin-bottom: 20px;
    box-sizing: border-box;
    outline: none;
    transition: 0.3s;
}

.input-stx:focus {
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

.btn-acceso {
    width: 100%;
    background-color: transparent;
    border: 1px solid #2ecc71;
    border-radius: 5px;
    color: #2ecc71;
    font-family: 'Michroma', sans-serif;
    font-size: 12px;
    padding: 15px;
    cursor: pointer;
    transition: 0.3s;
    letter-spacing: 1px;
    margin-top: 10px;
}

.btn-acceso:hover {
    background-color: rgba(46, 204, 113, 0.1);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.3);
}

.error-msg {
    color: #e74c3c;
    font-size: 10px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #e74c3c;
    border-radius: 4px;
    padding: 10px;
    background-color: rgba(231, 76, 60, 0.1);
}


/* --- ESTILOS DEL MAPA GPS (Integrado y Expandido al 100%) --- */
#mapa-gps {
    width: 100%;
    /* 🚀 LA SOLUCIÓN: Cambiamos '200px' por '100%' para que ocupe todo el alto disponible de su cajita */
    height: 100%; 
    background-color: #000;
    
    /* Quitamos los bordes internos para que parezca parte del panel original */
    border: none; 
    border-radius: 0; 
    
    /* Importante: Nos aseguramos de que no tenga márgenes que lo achiquen */
    margin: 0;
    padding: 0;
}


/* El punto rojo se mantiene igual */
.punto-rojo-robot {
    background-color: #ff0000;
    border-radius: 50%;
    box-shadow: 0 0 8px #ff0000, 0 0 20px #ff0000;
    border: 2px solid #fff; 
}