:root {
    --accent-primary: #4f46e5;          /* indigo — login page overrides global blue */
    --login-input-bg: var(--q-white-alpha-50);
}

html.dark-mode {
    --accent-primary: #6366f1;
    --login-input-bg: #0f172a99;        /* rgba(15,23,42,0.6) */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.login-scene {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Fundo Animado — fixed para não participar do fluxo do documento,
   overflow: hidden para clipar o elemento rotativo dentro do viewport */
.login-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, var(--bg-color) 0%, var(--bg-color) 100%);
    z-index: -1;
    overflow: hidden;
}

.login-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%, transparent, var(--accent-primary), transparent);
    animation: rotate 20s linear infinite;
    opacity: 0.1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Card de Login */
.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition: background 0.4s ease, border 0.4s ease;
}

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

.login-header {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.login-header .logo {
    justify-content: center;
}


.login-tagline {
    font-size: 18px;
    line-height: 1.3;
    color: var(--text-muted);
    font-weight: 400;
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Botão Google */
.btn-google {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-google:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background: var(--bg-color);
}

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

.btn-google:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-error {
    color: var(--danger);
    font-size: 14px;
    margin-top: 16px;
}

.login-error.is-success {
    color: #34A853;
}

html.dark-mode .login-error.is-success {
    color: #4ade80;
}

.forgot-link {
    text-align: right;
    margin-top: -8px;  /* aproxima do campo senha acima */
    margin-bottom: -8px; /* aproxima do botão submit abaixo */
    font-size: 13px;
}

/* Footer */
.login-footer {
    margin-top: 40px;
}

.login-footer-note {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.login-footer-note a {
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid var(--card-border);
}

.login-footer-note a:hover {
    border-color: var(--text-main);
}

/* Formulário de Email/Senha */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: var(--login-input-bg);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Botão Primário */
.btn-primary {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

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

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: translateY(0);
}

.btn-primary.btn-success {
    background: linear-gradient(135deg, #34A853, #4ade80);
    opacity: 1;
    cursor: default;
}

/* Divisor */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--card-border);
}

.auth-divider span {
    position: relative;
    background: var(--glass-bg);
    padding: 0 12px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Toggle Link */
.auth-toggle {
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent-secondary);
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Responsividade */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
        margin: 16px;
        border-radius: 20px;
    }
    
    .login-header {
        margin-bottom: 30px;
    }
    
    .login-tagline {
        font-size: 16px;
    }
    
    .btn-google, .btn-primary {
        padding: 12px;
        font-size: 15px;
    }
    
    .form-group input {
        padding: 10px 12px;
    }
}
