/* ===== Página de Login ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Fondo animado con orbes */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
body::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(44,80,120,0.25) 0%, transparent 70%);
    top: -150px;
    left: -150px;
    animation: flote 8s ease-in-out infinite;
}
body::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(224,118,46,0.2) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation: flote 10s ease-in-out infinite reverse;
}

@keyframes flote {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 20px); }
}

/* Contenedor */
.login-contenedor {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 24px;
    position: relative;
    z-index: 1;
}

/* Tarjeta central */
.login-tarjeta {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 44px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 32px 64px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
    animation: entrar 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes entrar {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo */
.login-logo {
    text-align: center;
    margin-bottom: 34px;
}

.logo-icon-wrap {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2c5078, #e0762e);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(44,80,120,0.45);
}

.login-logo h1 {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.4px;
    margin-bottom: 6px;
}

.login-logo p {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    font-weight: 400;
}

/* Campos */
.campo-login { margin-bottom: 18px; }

.campo-login label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.campo-login input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    font-size: 14.5px;
    color: #ffffff;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.campo-login input::placeholder { color: rgba(255,255,255,0.25); }

.campo-login input:focus {
    border-color: #2c5078;
    background: rgba(44,80,120,0.08);
    box-shadow: 0 0 0 3px rgba(44,80,120,0.2);
}

.campo-login input.invalido {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}

/* Botón ingresar */
.btn-ingresar {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2c5078, #1e3a5f);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    margin-top: 6px;
    box-shadow: 0 4px 16px rgba(44,80,120,0.4);
    letter-spacing: 0.2px;
}

.btn-ingresar:hover {
    background: linear-gradient(135deg, #1e3a5f, #16304f);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(44,80,120,0.5);
}

.btn-ingresar:active { transform: translateY(0); }
.btn-ingresar:disabled {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.4);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Mensajes de alerta */
.mensaje {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    font-weight: 500;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mensaje-error {
    background: rgba(239,68,68,0.12);
    color: #fca5a5;
    border-color: rgba(239,68,68,0.25);
}

.mensaje-info {
    background: rgba(44,80,120,0.12);
    color: #9db8d0;
    border-color: rgba(44,80,120,0.25);
}

/* Pie del login */
.login-pie {
    text-align: center;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.login-pie a {
    color: #6f94b8;
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.login-pie a:hover { color: #9db8d0; text-decoration: underline; }

.login-pie p {
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    margin-top: 8px;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 480px) {
    .login-tarjeta { padding: 32px 24px; }
    .logo-icon-wrap { width: 54px; height: 54px; font-size: 24px; }
    .login-logo h1 { font-size: 20px; }
}
