@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&family=Open+Sans:wght@400;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body, html { height: 100%; }

.login-body {
    font-family: 'Open Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #03082e;
    position: relative;
    overflow: hidden;
}

/* Fondos decorativos */
.login-bg-left {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 55%;
    height: 140%;
    background: radial-gradient(ellipse, rgba(0,61,165,0.85) 0%, rgba(0,30,100,0.60) 50%, transparent 80%);
    pointer-events: none;
}
.login-bg-right {
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 50%;
    height: 130%;
    background: radial-gradient(ellipse, rgba(160,0,0,0.75) 0%, rgba(100,0,0,0.45) 50%, transparent 80%);
    pointer-events: none;
}

/* Partículas decorativas */
.login-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

/* CARD */
.login-card {
    position: relative;
    z-index: 10;
    background: rgba(255,255,255,0.97);
    border-radius: 24px;
    padding: 48px 44px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow:
        0 30px 80px rgba(0,0,0,0.45),
        0 0 0 1px rgba(255,255,255,0.08);
    animation: cardEntrar 0.5s cubic-bezier(0.4,0,0.2,1);
}

@keyframes cardEntrar {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* LOGO */
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 16px;
    border: 3px solid #D4AF37;
    box-shadow: 0 0 0 6px rgba(212,175,55,0.15), 0 8px 28px rgba(0,40,138,0.30);
    overflow: hidden;
    background: linear-gradient(135deg, var(--azul), var(--rojo));
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.login-logo h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 30px;
    font-weight: 900;
    color: var(--azul);
    letter-spacing: 3px;
    margin-bottom: 6px;
}

.login-sub-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.login-sub-wrap::before,
.login-sub-wrap::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
}
.login-sub {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 800;
    color: var(--rojo);
    letter-spacing: 3px;
    white-space: nowrap;
}

/* FORM */
.login-form { margin-top: 8px; }

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #555;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-ico-svg {
    position: absolute;
    left: 14px;
    width: 17px;
    height: 17px;
    color: var(--azul);
    pointer-events: none;
    flex-shrink: 0;
}

.input-icon input {
    width: 100%;
    border: 2px solid #e0e6f0;
    border-radius: 10px;
    padding: 13px 14px 13px 44px;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    color: #12182b;
    background: #f8f9ff;
    outline: none;
    transition: all 0.25s;
}

.input-icon input:focus {
    border-color: var(--azul);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0,61,165,0.08);
}

/* BOTÓN */
.btn-login {
    width: 100%;
    padding: 15px;
    margin-top: 6px;
    background: linear-gradient(90deg, var(--azul) 0%, var(--azul-mid) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(0,61,165,0.40);
}

.btn-login:hover {
    background: linear-gradient(90deg, #002880, var(--azul));
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,61,165,0.50);
}

.btn-login:active { transform: translateY(0); }

/* ALERTAS */
.alerta {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 18px;
    border-left: 4px solid;
    animation: entrar 0.3s ease;
}
@keyframes entrar { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.alerta-error { background: #fce4e4; color: var(--rojo-dark); border-color: var(--rojo); }

/* FOOTER */
.login-footer {
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-demo {
    font-size: 12px;
    color: #aaa;
    background: #f8f9ff;
    border-radius: 6px;
    padding: 7px 12px;
    border: 1px dashed var(--gris-borde);
}

.login-volver {
    font-size: 13px;
    font-weight: 700;
    color: var(--azul);
    text-decoration: none;
    transition: color 0.2s;
}
.login-volver:hover { color: var(--rojo); }

/* RESPONSIVE */
@media (max-width: 480px) {
    .login-card { padding: 36px 24px 30px; margin: 16px; }
    .login-logo h1 { font-size: 24px; }
}