/* Variables de diseño para fácil mantenimiento */
:root {
    --primary-color: #2563eb;       /* Azul Institucional Vibrante */
    --primary-hover: #1d4ed8;       /* Azul más oscuro para hover */
    --bg-gradient-start: #f1f5f9;   /* Gris muy claro */
    --bg-gradient-end: #cbd5e1;     /* Gris azulado */
    --text-main: #1e293b;           /* Texto oscuro casi negro */
    --text-muted: #64748b;          /* Texto secundario */
    --white: #ffffff;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Figuras geométricas de fondo */
body::before,
body::after {
    content: '';
    position: absolute;
    z-index: 0;
}

/* Figura 1: Círculo difuso superior (Luz ambiental) */
body::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 70%);
    top: -200px;
    left: -200px;
    border-radius: 50%;
    animation: float 10s infinite ease-in-out alternate;
}

/* Figura 2: Cuadrado rotado inferior (Acento geométrico) */
body::after {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 100%);
    bottom: -150px;
    right: -100px;
    border-radius: 60px;
    transform: rotate(35deg);
    animation: float-rotate 14s infinite ease-in-out alternate;
}

.login-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.login-container {
    background: var(--white);
    padding: 3rem 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Animaciones */
@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 70px); }
}

@keyframes float-rotate {
    0% { transform: rotate(35deg) translate(0, 0); }
    100% { transform: rotate(55deg) translate(-50px, -60px); }
}

/* Icono de urna visual usando CSS */
.login-container h1::before {
    content: "🗳️";
    display: block;
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Si hay logo, ocultamos el icono de urna */
.login-container h1.with-logo::before {
    display: none;
}

/* Estilo para la imagen del logo en el login */
.login-logo-img {
    max-width: 150px;
    max-height: 100px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

h1 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-container p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #f8fafc;
    color: var(--text-main);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-login {
    width: 100%;
    padding: 0.875rem;
    margin-top: 1rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-login:hover {
    background-color: #004494;
}

.error-msg {
    color: #dc3545;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    min-height: 20px;
}

/* Estilos para el pie de página del Login */
.login-footer {
    margin-top: 1.5rem;      /* Separa el texto de la caja blanca */
    text-align: center;      /* Centra todo el texto y enlaces */
    color: var(--text-main); /* Asegura contraste legible */
}