/**
 * Authentication Page Styles
 * Uses design system CSS variables for dark mode support
 */

.login-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background:
        radial-gradient(1200px 600px at 15% -10%, rgba(255, 108, 0, 0.25), transparent 60%),
        radial-gradient(900px 400px at 90% 0%, rgba(35, 70, 160, 0.2), transparent 55%),
        var(--edu-surface);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-card {
    background: var(--edu-paper);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    animation: fadeInUp 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

/* FPT tri-color identity strip, same as the app header. */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--fpt-orange) 0%,
            var(--fpt-orange) 46%,
            var(--fpt-blue) 46%,
            var(--fpt-blue) 73%,
            var(--fpt-green) 73%,
            var(--fpt-green) 100%);
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: var(--gray-500);
    margin: 0;
}

.login-body {
    text-align: center;
}

.login-message {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 30px;
}

.btn-google-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: var(--edu-paper);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-xs);
}

.btn-google-login:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-google-login:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

.btn-google-login svg {
    flex-shrink: 0;
}

.login-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.login-footer small {
    font-size: 13px;
    color: var(--gray-500);
}

/* User Picture Styles */
.user-picture {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-200);
    display: none;
}

.dropdown-toggle .user-picture {
    flex-shrink: 0;
}

.user-icon-default {
    display: inline-block;
}

/* Responsive */
@media (max-width: 576px) {
    .login-card {
        padding: 30px 20px;
    }

    .login-header h1 {
        font-size: 20px;
    }

    .btn-google-login {
        font-size: 14px;
        padding: 12px 20px;
    }

    .login-logo {
        max-width: 160px;
    }
}

/* Hide main content when not authenticated */
body.not-authenticated .main-content,
body.not-authenticated .sidebar,
body.not-authenticated .mobile-bottom-nav {
    display: none !important;
}
