/* =========================================================
 * Termback - login.css
 * Estilos da página de login
 * ========================================================= */

/* ---------------------------------------------------------
 * Page Layout
 * --------------------------------------------------------- */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ---------------------------------------------------------
 * Background Effects
 * --------------------------------------------------------- */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-effects::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(1deg); }
    66% { transform: translate(-20px, 20px) rotate(-1deg); }
}

.grid-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 60px,
            rgba(255,255,255,0.02) 60px,
            rgba(255,255,255,0.02) 61px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 60px,
            rgba(255,255,255,0.02) 60px,
            rgba(255,255,255,0.02) 61px
        );
    pointer-events: none;
}

/* ---------------------------------------------------------
 * Login Container
 * --------------------------------------------------------- */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 48px 40px;
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.05),
        var(--shadow-card),
        0 0 100px rgba(59, 130, 246, 0.1);
    animation: cardAppear 0.6s ease forwards;
}

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

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

.login-logo .logo-icon {
    margin: 0 auto 20px;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { 
        box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4), 
                    0 0 0 1px rgba(255,255,255,0.1) inset; 
    }
    50% { 
        box-shadow: 0 8px 40px rgba(59, 130, 246, 0.6), 
                    0 0 0 1px rgba(255,255,255,0.15) inset; 
    }
}

.login-logo h1 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-logo p {
    color: var(--text-muted);
    font-size: 15px;
}

/* ---------------------------------------------------------
 * Login Form
 * --------------------------------------------------------- */
.login-form .btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.login-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.login-form .btn-primary:hover::before {
    opacity: 1;
}

/* ---------------------------------------------------------
 * Error Message
 * --------------------------------------------------------- */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 24px;
    display: none;
    align-items: center;
    gap: 10px;
}

.error-message.show {
    display: flex;
    animation: shake 0.4s ease;
}

.error-message svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ---------------------------------------------------------
 * Footer
 * --------------------------------------------------------- */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 13px;
}

.login-footer a {
    color: var(--accent-blue);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------------
 * Responsive
 * --------------------------------------------------------- */
@media (max-width: 480px) {
    .login-card {
        padding: 36px 28px;
    }

    .login-logo .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .login-logo h1 {
        font-size: 26px;
    }
}
