/* ============================================================================
   ESTILOS HUD - ESTIMADOR BATERÍA 12V (CON CONTRASTES Y COLORES DE BODY SANEADOS)
   ============================================================================ */

/* Estilo y Fondo del Body (Look HUD Premium) */
body {
    background-color: #0f111a !important;
    background-image: radial-gradient(circle at 50% 0, #1a253a, #0f111a) !important;
    color: #e0e0e0;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

body[data-theme="light"] {
    background-color: #f4f7f6 !important;
    background-image: radial-gradient(circle at 50% 0, #e9ecef, #f4f7f6) !important;
    color: #333;
}

:root {
    --bat-blue: #00d2ff;
    --bat-blue-glow: rgba(0, 210, 255, 0.25);
    --bat-bg-card: rgba(20, 25, 32, 0.85);
    --bat-border: rgba(255, 255, 255, 0.08);
    --bat-text-muted: rgba(255, 255, 255, 0.55);
}

/* Tema Claro */
body[data-theme="light"] {
    --bat-blue: #0066cc;
    --bat-blue-glow: rgba(0, 102, 204, 0.15);
    --bat-bg-card: rgba(255, 255, 255, 0.95);
    --bat-border: rgba(0, 0, 0, 0.12);
    --bat-text-muted: #555555;
}

/* Títulos adaptativos */
.bat-title {
    color: #ffffff !important;
    transition: color 0.3s ease;
}
.bat-subtitle {
    color: rgba(255, 255, 255, 0.6) !important;
    transition: color 0.3s ease;
}

body[data-theme="light"] .bat-title {
    color: #111111 !important;
}
body[data-theme="light"] .bat-subtitle {
    color: #444444 !important;
}

/* Contenedor HUD */
.bat-card {
    background: var(--bat-bg-card);
    border: 1px solid var(--bat-border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body[data-theme="light"] .bat-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Inputs de Formulario */
.bat-input {
    background-color: rgba(10, 12, 18, 0.6) !important;
    border: 1px solid var(--bat-border);
    color: #fff !important;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.25s ease;
}

body[data-theme="light"] .bat-input {
    background-color: #ffffff !important;
    border-color: #cccccc;
    color: #222 !important;
}

.bat-input:focus {
    border-color: var(--bat-blue);
    box-shadow: 0 0 12px var(--bat-blue-glow);
    background-color: rgba(0, 0, 0, 0.8) !important;
}

body[data-theme="light"] .bat-input:focus {
    background-color: #fff !important;
    border-color: var(--bat-blue);
}

/* Textos Explicativos Pequeños */
.bat-help-text {
    color: var(--bat-text-muted) !important;
    font-size: 0.82rem;
}

/* Barra de Progreso de Salud */
.health-bar-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 4px;
    border: 1px solid var(--bat-border);
    margin: 1.5rem 0;
}

body[data-theme="light"] .health-bar-container {
    background: rgba(0, 0, 0, 0.05);
}

.health-bar {
    height: 24px;
    border-radius: 16px;
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
    width: 0%;
    transition: width 1s cubic-bezier(0.1, 0.8, 0.1, 1);
    position: relative;
    box-shadow: 0 0 10px rgba(255, 75, 43, 0.3);
}

.health-bar.healthy {
    background: linear-gradient(90deg, #11998e, #38ef7d);
    box-shadow: 0 0 10px rgba(56, 239, 125, 0.3);
}

.health-bar.warning {
    background: linear-gradient(90deg, #f857a6, #ff5858);
    box-shadow: 0 0 10px rgba(255, 88, 88, 0.3);
}

/* Valor Numérico Grande */
.bat-large-val {
    font-family: 'Roboto Mono', monospace;
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--bat-blue);
    text-shadow: 0 0 20px var(--bat-blue-glow);
}

body[data-theme="light"] .bat-large-val {
    text-shadow: none;
    color: var(--bat-blue);
}

/* Bloque de Información General */
.bat-info-block {
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--bat-border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body[data-theme="light"] .bat-info-block {
    background-color: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Leyenda e Iconos */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bat-border);
    padding: 10px 0;
}
.info-row:last-child {
    border-bottom: none;
}
.info-label {
    color: var(--bat-text-muted) !important;
    font-size: 0.9rem;
}
.info-val {
    font-weight: 600;
    color: #fff;
}
body[data-theme="light"] .info-val {
    color: #111;
}

/* Alertas legibles adaptadas a los temas */
body[data-theme="light"] .alert.text-warning {
    color: #856404 !important;
    background-color: #fff3cd !important;
    border-color: #ffeeba !important;
}
body[data-theme="light"] .alert.text-danger {
    color: #721c24 !important;
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
}
body[data-theme="light"] .alert.text-success {
    color: #155724 !important;
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
}

/* Animaciones */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px var(--bat-blue-glow); }
    50% { box-shadow: 0 0 25px var(--bat-blue-glow); }
    100% { box-shadow: 0 0 10px var(--bat-blue-glow); }
}

.glow-panel {
    animation: pulseGlow 3s infinite ease-in-out;
    border-color: var(--bat-blue);
}

/* Unidades de Entrada del Formulario */
.bat-unit-text {
    background-color: rgba(10, 12, 18, 0.8) !important;
    border: 1px solid var(--bat-border) !important;
    color: var(--bat-text-muted) !important;
    transition: all 0.3s ease;
}

body[data-theme="light"] .bat-unit-text {
    background-color: #e9ecef !important;
    border-color: #cccccc !important;
    color: #495057 !important;
}


/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--bat-bg-card);
    border: 1px solid var(--bat-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    color: #fff;
}

body[data-theme="light"] .theme-toggle {
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Cajas de Consejos Informativos */
.bat-tip-box {
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--bat-border);
    border-radius: 8px;
    padding: 1rem;
    height: 100%;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body[data-theme="light"] .bat-tip-box {
    background-color: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
}


