/* =============================================================================
 * auth.css — Estilos das views de autenticação (login, register, magic-link)
 *
 * Carregado por app/Views/auth/layout.php junto com layout.css (tokens canônicos).
 * Usa as variáveis CSS de layout.css: --brand, --bg, --bg-raised, --fg, --line, etc.
 * Fonte Geist via <link> Google Fonts no auth/layout.php.
 *
 * Padrão estético Anthropic native-AI:
 *  - Card centralizado em paper background
 *  - Hairlines 1px solid var(--line) em vez de shadows pesadas
 *  - Brand #1B59F0 nos primários, fg ink em texto
 *  - Border-radius sutil (6-8px), sem floating labels
 * ============================================================================= */

/* ========== BODY + LAYOUT ========== */

.auth-body
{
    font-family: var(--font-sans, 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    background: var(--bg, #FAFAF7);
    color: var(--fg, #0B0D10);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== TOP NAV (logo + lang switcher) ==========
 * Overrides explicitos do <header> global em layout.css:150
 * (que aplica position:sticky + linear-gradient + box-shadow)
 */

.auth-nav
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    border-bottom: 1px solid var(--line, #E5E4DD);
    position: static;
    background: var(--bg, #FAFAF7);
    box-shadow: none;
    z-index: auto;
}

.auth-logo
{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.auth-logo-mark
{
    width: 28px;
    height: 28px;
    display: block;
}

.auth-logo-text
{
    font-family: var(--font-sans, 'Geist', sans-serif);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -.02em;
    color: var(--fg, #0B0D10);
}

.auth-lang
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono, 'Geist Mono', ui-monospace, monospace);
    font-size: 11px;
    letter-spacing: .08em;
}

.auth-lang-i
{
    color: var(--fg-subtle, #6E6E66);
    text-decoration: none;
    padding: 4px 2px;
    transition: color 120ms ease;
}

.auth-lang-i:hover
{
    color: var(--fg, #0B0D10);
}

.auth-lang-i.on
{
    color: var(--brand, #1B59F0);
}

.auth-lang-sep
{
    color: var(--line-strong, #C9C7BE);
}

/* ========== MAIN AREA + CARD ========== */

.auth-main
{
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px 96px;
}

.auth-card
{
    width: 100%;
    max-width: 440px;
    background: var(--bg-raised, #FFFFFF);
    border: 1px solid var(--line, #E5E4DD);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 1px 0 rgba(15, 23, 41, .02);
}

.auth-card-head
{
    margin-bottom: 28px;
}

.auth-h1
{
    font-family: var(--font-sans, 'Geist', sans-serif);
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -.025em;
    line-height: 1.1;
    color: var(--fg, #0B0D10);
    margin: 0 0 6px;
}

.auth-sub
{
    font-family: var(--font-sans, 'Geist', sans-serif);
    font-size: 14px;
    color: var(--fg-muted, #45464F);
    margin: 0;
}

/* ========== ALERTS ========== */

.auth-alert
{
    font-family: var(--font-sans, 'Geist', sans-serif);
    font-size: 14px;
    line-height: 1.45;
    padding: 12px 14px;
    border: 1px solid var(--line, #E5E4DD);
    border-radius: 6px;
    margin-bottom: 20px;
}

.auth-alert-error
{
    color: #8A1F1A;
    background: #FCEBE9;
    border-color: #F2C7C2;
    border-left: 3px solid #C3322B;
}

.auth-alert-success
{
    color: #0F4F32;
    background: #E6F4EE;
    border-color: #C2E0D2;
    border-left: 3px solid #1F7A4D;
}

/* ========== SSO BUTTONS GROUP ========== */

.auth-sso
{
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.auth-divider
{
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    font-family: var(--font-mono, 'Geist Mono', monospace);
    font-size: 11px;
    letter-spacing: .08em;
    color: var(--fg-subtle, #6E6E66);
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after
{
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line, #E5E4DD);
}

.auth-divider span
{
    flex: none;
}

/* ========== BUTTONS ========== */

.auth-btn
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-sans, 'Geist', sans-serif);
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    padding: 12px 18px;
    border-radius: 6px;
    border: 1px solid var(--line, #E5E4DD);
    background: var(--bg-raised, #FFFFFF);
    color: var(--fg, #0B0D10);
    text-decoration: none;
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.auth-btn:hover
{
    border-color: var(--line-strong, #C9C7BE);
    background: var(--bg, #FAFAF7);
}

.auth-btn-outline
{
    background: var(--bg-raised, #FFFFFF);
    color: var(--fg, #0B0D10);
}

.auth-btn-primary
{
    background: var(--brand, #1B59F0);
    color: #FFFFFF;
    border-color: var(--brand, #1B59F0);
    padding: 13px 20px;
    font-size: 15px;
    box-shadow: 0 1px 2px rgba(27, 89, 240, .25);
}

.auth-btn-primary:hover
{
    background: var(--brand-deep, #0E2F8A);
    border-color: var(--brand-deep, #0E2F8A);
    transform: translateY(-1px);
}

.auth-btn-block
{
    width: 100%;
    margin-top: 8px;
}

/* ========== FORM FIELDS ========== */

.auth-form
{
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field
{
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label
{
    font-family: var(--font-sans, 'Geist', sans-serif);
    font-size: 13px;
    font-weight: 500;
    color: var(--fg, #0B0D10);
    letter-spacing: -.005em;
}

.auth-input
{
    font-family: var(--font-sans, 'Geist', sans-serif);
    font-size: 15px;
    padding: 11px 14px;
    border: 1px solid var(--line, #E5E4DD);
    border-radius: 6px;
    background: var(--bg-raised, #FFFFFF);
    color: var(--fg, #0B0D10);
    width: 100%;
    box-sizing: border-box;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.auth-input::placeholder
{
    color: var(--fg-subtle, #6E6E66);
}

.auth-input:focus
{
    outline: none;
    border-color: var(--brand, #1B59F0);
    box-shadow: 0 0 0 3px rgba(27, 89, 240, .14);
}

.auth-input:disabled
{
    background: var(--bg, #FAFAF7);
    color: var(--fg-muted, #45464F);
    cursor: not-allowed;
}

/* ========== CHECKBOX ========== */

.auth-checkbox
{
    margin-top: -4px;
    margin-bottom: 4px;
}

.auth-checkbox-label
{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans, 'Geist', sans-serif);
    font-size: 13px;
    color: var(--fg-muted, #45464F);
    cursor: pointer;
    user-select: none;
}

.auth-checkbox-input
{
    width: 16px;
    height: 16px;
    border: 1px solid var(--line-strong, #C9C7BE);
    border-radius: 3px;
    accent-color: var(--brand, #1B59F0);
    cursor: pointer;
}

/* ========== FOOT (links: forgot, register, login) ========== */

.auth-foot
{
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line, #E5E4DD);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.auth-foot-line
{
    font-family: var(--font-sans, 'Geist', sans-serif);
    font-size: 13px;
    color: var(--fg-muted, #45464F);
    margin: 0;
}

.auth-link
{
    color: var(--brand, #1B59F0);
    text-decoration: none;
    font-weight: 500;
    transition: color 120ms ease;
}

.auth-link:hover
{
    color: var(--brand-deep, #0E2F8A);
    text-decoration: underline;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 600px)
{
    .auth-nav
    {
        padding: 0 16px;
        height: 56px;
    }

    .auth-main
    {
        padding: 24px 16px 64px;
    }

    .auth-card
    {
        padding: 28px 22px;
        border-radius: 6px;
    }

    .auth-h1
    {
        font-size: 26px;
    }

    .auth-input
    {
        font-size: 16px; /* Evita zoom em iOS Safari ao focar input */
    }
}
