/* Inicio de sesión (vista/login_view.php). La cabecera solo carga esta hoja cuando no hay sesión. */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #1e293b;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.55) 0, transparent 40%),
        linear-gradient(135deg, #fde68a 0%, #fbbf24 55%, #f59e0b 100%);
    min-height: 100vh;
}

.lg-pagina {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.lg-tarjeta {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 2rem 1.75rem 1.5rem;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(120, 53, 15, 0.22);
    overflow: hidden;
}

.lg-tarjeta::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #fef3c7;
}

.lg-tarjeta > * {
    position: relative;
}

/* Logo: el huevo rebota suavemente */
.lg-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    margin: 0 auto 0.9rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    font-size: 2.2rem;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
    animation: lg-rebote 3s ease-in-out infinite;
}

@keyframes lg-rebote {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.lg-titulo {
    margin: 0;
    text-align: center;
    font-size: 1.45rem;
    font-weight: 800;
    color: #78350f;
}

.lg-subtitulo {
    margin: 0.35rem 0 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    color: #92400e;
}

/* Alertas de error */
.lg-alerta {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    animation: lg-entrada 0.3s ease;
}

.lg-alerta i {
    font-size: 1.1rem;
    margin-top: 0.05rem;
}

.lg-alerta-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.lg-alerta-aviso {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

@keyframes lg-entrada {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Formulario */
.lg-form {
    display: grid;
    gap: 1rem;
}

.lg-campo {
    display: grid;
    gap: 0.35rem;
}

.lg-campo label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #78350f;
}

.lg-entrada {
    position: relative;
    display: flex;
    align-items: center;
}

.lg-entrada > i {
    position: absolute;
    left: 0.85rem;
    color: #b45309;
    font-size: 1.05rem;
    pointer-events: none;
}

.lg-input {
    width: 100%;
    min-height: 48px;
    padding: 0.7rem 0.9rem 0.7rem 2.55rem;
    border: 1.5px solid #fcd34d;
    border-radius: 12px;
    background: #fffbeb;
    color: #1e293b;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lg-input::placeholder {
    color: #a8a29e;
}

.lg-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.lg-entrada:has(.lg-ver) .lg-input {
    padding-right: 3rem;
}

.lg-ver {
    position: absolute;
    right: 0.4rem;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #92400e;
    cursor: pointer;
}

.lg-ver:focus-visible {
    outline: 3px solid #fcd34d;
    outline-offset: 2px;
}

.lg-fila {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.lg-recordar {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-weight: 600;
    color: #78350f;
    cursor: pointer;
}

.lg-recordar input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #d97706;
}

.lg-enlace {
    color: #b45309;
    font-weight: 700;
    text-decoration: none;
}

.lg-enlace:hover {
    text-decoration: underline;
}

.lg-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 50px;
    margin-top: 0.25rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.lg-boton:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(217, 119, 6, 0.42);
}

.lg-boton:active:not(:disabled) {
    transform: translateY(1px);
}

.lg-boton:disabled {
    opacity: 0.75;
    cursor: wait;
}

.lg-boton:focus-visible {
    outline: 3px solid #fcd34d;
    outline-offset: 3px;
}

.lg-girando {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #ffffff;
    border-right-color: transparent;
    border-radius: 50%;
    animation: lg-girar 0.75s linear infinite;
}

@keyframes lg-girar {
    to {
        transform: rotate(360deg);
    }
}

.lg-pie {
    margin: 1.1rem 0 0;
    text-align: center;
    font-size: 0.88rem;
    color: #92400e;
}

@media (max-width: 480px) {
    .lg-tarjeta {
        padding: 1.6rem 1.25rem 1.25rem;
        border-radius: 18px;
    }

    .lg-titulo {
        font-size: 1.3rem;
    }

    .lg-input {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lg-logo,
    .lg-alerta,
    .lg-girando {
        animation: none;
    }
}
