/* ========================================================================
   SEPADZN — Login Page Styles
   Institucional + Glassmorphism + Material Design 3
   ======================================================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0c29 0%, #1a1a3e 40%, #24243e 100%);
    position: relative;
    overflow: hidden;
    padding: 1rem;
}

/* Particles / decorativas de fondo */
.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 60% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Card contenedor */
.login-wrapper {
    position: relative;
    width: 100%;
    max-width: 420px;
    animation: loginFadeIn 0.6s ease-out;
}

@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Avatar circular */
.login-avatar-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
    margin-bottom: -44px;
}

.login-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    background: rgba(255, 255, 255, 0.08);
    padding: 4px;
    transition: transform 0.3s ease;
}

.login-avatar:hover {
    transform: scale(1.05);
}

/* Card principal — glassmorphism */
.login-card {
    background: rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
    padding: 2.5rem 2rem 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 1.75rem;
    padding-top: 0.5rem;
}

.login-title {
    color: #f1f5f9;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
    font-weight: 400;
}

/* Labels */
.login-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

/* Input group */
.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input-group:focus-within {
    border-color: rgba(37, 99, 235, 0.6);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.login-input-icon {
    color: rgba(255, 255, 255, 0.35);
    padding: 0 0.75rem;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: color 0.2s;
}

.login-input-group:focus-within .login-input-icon {
    color: rgba(37, 99, 235, 0.7);
}

.login-input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #e2e8f0 !important;
    padding: 0.7rem 0.4rem;
    width: 100%;
    font-size: 0.95rem;
    box-shadow: none !important;
}

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

.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #e2e8f0 !important;
    -webkit-box-shadow: 0 0 0 30px #1a1a3e inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Toggle password */
.login-toggle-pw {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    padding: 0 0.85rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
    flex-shrink: 0;
}

.login-toggle-pw:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* Botón de submit */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    padding: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 0.25rem;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner dentro del botón */
.login-btn .spinner-border {
    width: 1.1rem;
    height: 1.1rem;
    margin-right: 0.4rem;
    vertical-align: -2px;
}

/* Alertas */
.login-alert {
    border-radius: 10px;
    font-size: 0.85rem;
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
    border: none;
    animation: alertSlideIn 0.3s ease;
}

@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.login-alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.login-alert .btn-close {
    filter: invert(1) opacity(0.5);
}

/* Footer text */
.login-footer {
    text-align: center;
    margin-top: 1.25rem;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.78rem;
}

.login-footer span {
    display: block;
    line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 576px) {
    .login-page {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .login-card {
        padding: 2rem 1.25rem 1.5rem;
        border-radius: 14px;
    }

    .login-avatar {
        width: 72px;
        height: 72px;
    }

    .login-avatar-wrapper {
        margin-bottom: -36px;
    }

    .login-title {
        font-size: 1.15rem;
    }
}
