/* Login e cadastro enxutos. Seguem o tema (escuro = azul-marinho, claro = ciano).
   Carrega depois de theme-kl.css. Só mexe na aparência de #auth-screen
   (não altera layout, textos nem comportamento). */

#auth-screen {
    background: var(--bg-main);
    color: var(--text-primary);
}

#auth-screen .auth-card {
    background: var(--bg-card);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: none;
    animation: none;
    padding: 2.25rem 2rem;
    max-width: 400px;
}

/* ---------- Cabeçalho ---------- */
#auth-screen .auth-header {
    text-align: left;
    margin-bottom: 1.5rem;
}

#auth-screen .brand-badge {
    background: var(--kl-brand-text, var(--primary-gradient));
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0 0 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    display: inline-block;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

#auth-screen .brand-badge i {
    display: none;
}

#auth-screen .auth-header h2 {
    font-size: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--text-primary);
}

#auth-screen .auth-header p {
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0.4rem 0 0;
    color: var(--text-secondary);
}

/* ---------- Erro ---------- */
#auth-screen .auth-error-box {
    background: none;
    border: 1px solid var(--urgent-color, #ef4444);
    color: var(--urgent-color, #ef4444);
    border-radius: 6px;
    padding: 0.7rem 0.85rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    animation: none;
}

/* ---------- Google ---------- */
#auth-screen .google-auth-block {
    margin: 0 0 1.25rem;
}

#auth-screen .google-btn-container {
    color-scheme: light;
}

/* evita fundo quadrado estranho no botão do Google */
#auth-screen .auth-divider {
    margin: 1.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

#auth-screen .auth-divider::before,
#auth-screen .auth-divider::after {
    background: var(--border);
}

/* ---------- Campos ---------- */
#auth-screen .form-group {
    margin-bottom: 1rem;
}

#auth-screen .form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

#auth-screen .form-group label i {
    display: none;
}

#auth-screen .form-group input:not([type="checkbox"]) {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
    transition: border-color 0.15s;
}

#auth-screen .form-group input:not([type="checkbox"])::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

#auth-screen .form-group input:not([type="checkbox"]):focus {
    border-color: var(--border-highlight);
    box-shadow: none;
    outline: 2px solid var(--kl-focus-ring, rgba(51, 164, 248, 0.45));
    outline-offset: 1px;
}

/* Preenchimento automático do navegador sem o fundo amarelado/claro */
#auth-screen .form-group input:-webkit-autofill,
#auth-screen .form-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    caret-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset;
    transition: background-color 9999s ease-out 0s;
}

#auth-screen .auth-sublink {
    color: var(--text-muted);
    font-size: 0.8rem;
}

#auth-screen .auth-sublink:hover {
    color: var(--kl-link, var(--accent));
}

/* Aceite da LGPD */
#auth-screen #group-lgpd label {
    align-items: flex-start !important;
    gap: 0.6rem !important;
    font-size: 0.8rem !important;
    line-height: 1.45;
    color: var(--text-secondary);
    font-weight: 400;
}

#auth-screen #group-lgpd input[type="checkbox"] {
    width: 1rem !important;
    height: 1rem;
    flex: none;
    margin: 0.15rem 0 0 !important;
    padding: 0;
    accent-color: var(--primary);
}

/* ---------- Botão ---------- */
#auth-screen .btn-submit {
    background: var(--primary-gradient);
    color: #fff;
    border: 0;
    border-radius: 6px;
    box-shadow: none;
    padding: 0.8rem;
    margin-top: 0.25rem;
    font-size: 0.95rem;
    font-weight: 700;
}

#auth-screen .btn-submit:hover {
    filter: brightness(1.08);
    transform: none;
    box-shadow: none;
}

#auth-screen .btn-submit:focus-visible {
    outline: 2px solid var(--border-highlight);
    outline-offset: 2px;
}

#auth-screen .btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: none;
}

/* ---------- Alternar entre entrar / criar conta ---------- */
#auth-screen .auth-toggle {
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

#auth-screen .auth-toggle span {
    color: var(--kl-link, var(--accent));
    font-weight: 600;
    text-underline-offset: 3px;
}

#auth-screen .auth-toggle span:hover {
    opacity: 0.85;
}

@media (max-width: 480px) {
    #auth-screen .auth-card {
        padding: 1.75rem 1.25rem;
    }
}