:root { 
    --primary-color: #8B0000; 
    --bg-gray: #f4f7f6; 
    --text-dark: #2d3436;
    --nav-bg: #2d3436;
}

body { 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background: var(--bg-gray); 
    margin: 0; 
    padding: 0; 
    color: var(--text-dark); 
    line-height: 1.6;
}

/* --- NAVEGACIÓN --- */
.navbar { 
    background: var(--nav-bg); 
    padding: 0.8rem 2rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    color: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar a { 
    color: #dfe6e9; 
    text-decoration: none; 
    margin-left: 20px; 
    font-weight: 600; 
    font-size: 14px; 
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navbar a:hover { color: var(--primary-color); }

.logo-nav { 
    height: 40px; 
    width: auto; 
    vertical-align: middle; 
    margin-right: 12px; 
    /* Filtro para que el logo luzca impecable sobre fondo oscuro */
    filter: brightness(0) invert(1); 
}

/* --- CONTENEDORES --- */
.main-wrapper { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    min-height: 85vh; 
    padding: 40px 20px; 
}

.container { 
    background: white; 
    width: 100%; 
    max-width: 680px; 
    padding: 50px; 
    border-radius: 20px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.08); 
    border-top: 10px solid var(--primary-color);
    box-sizing: border-box;
    position: relative;
}

/* --- TEXTOS --- */
h1 { 
    margin: 0; 
    color: var(--primary-color); 
    font-size: 30px; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    text-align: center; 
    font-weight: 800;
}

.header-msg { 
    text-align: center; 
    color: #636e72; 
    font-style: italic; 
    margin: 15px 0 40px 0; 
    font-size: 16px;
}

/* --- FORMULARIOS --- */
.form-group { margin-bottom: 25px; }

label { 
    display: block; 
    margin-bottom: 10px; 
    font-weight: 700; 
    color: #4a4a4a; 
    font-size: 12px; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}

select, input { 
    width: 100%; 
    padding: 15px; 
    border: 2px solid #edf2f7; 
    border-radius: 12px; 
    background-color: #f8fafc; 
    font-size: 15px;
    color: var(--text-dark);
    transition: all 0.3s;
    appearance: none; /* Quita estilo nativo en selects */
}

select:focus { 
    border-color: var(--primary-color); 
    outline: none; 
    background: white; 
    box-shadow: 0 0 0 4px rgba(139, 0, 0, 0.1);
}

/* --- BOTONES --- */
.btn { 
    width: 100%; 
    background: var(--primary-color); 
    color: white; 
    border: none; 
    padding: 18px; 
    border-radius: 12px; 
    font-size: 17px; 
    font-weight: 800; 
    cursor: pointer; 
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 10px 20px rgba(139, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 15px 25px rgba(139, 0, 0, 0.3); 
    filter: brightness(1.1);
}

/* --- TABLAS --- */
table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0 12px; 
    margin-top: 20px; 
}

th { 
    text-align: left; 
    padding: 0 15px; 
    color: #b2bec3; 
    font-size: 11px; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}

td { 
    background: #ffffff; 
    padding: 20px; 
    border-top: 1px solid #f1f2f6; 
    border-bottom: 1px solid #f1f2f6; 
    font-weight: 500;
}

td:first-child { border-left: 1px solid #f1f2f6; border-radius: 12px 0 0 12px; }
td:last-child { border-right: 1px solid #f1f2f6; border-radius: 0 12px 12px 0; }

/* --- GRÁFICOS Y ALERTAS --- */
.bar-container { background: #f1f2f6; border-radius: 50px; height: 14px; width: 100%; margin-top: 8px; overflow: hidden; }
.bar-fill { background: var(--primary-color); height: 100%; border-radius: 50px; transition: width 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

.alerta { 
    padding: 20px; 
    border-radius: 12px; 
    margin-bottom: 30px; 
    text-align: center; 
    font-weight: 700; 
}
.alerta-error { background: #fff5f5; color: #c53030; border: 1px solid #feb2b2; }

/* --- ACCESO OCULTO --- */
.footer-lock { margin-top: 50px; text-align: center; }
.lock-icon { cursor: pointer; color: #cbd5e0; font-size: 24px; transition: color 0.3s; }
.lock-icon:hover { color: var(--primary-color); }

#lbox { 
    display: none; 
    margin-top: 20px; 
    background: white; 
    padding: 20px; 
    border-radius: 15px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); 
    border: 1px solid #edf2f7;
}