/* Auth Pages CSS - Login & Registration
   Paleta "Charcoal & Ember" — alinhada ao restante do projeto (temas.css).
   Variáveis definidas localmente para manter as páginas de auth autossuficientes,
   já que elas não carregam layout.css/temas.css. */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* ===== VARIÁVEIS — TEMA DARK (padrão, "Charcoal & Ember") ===== */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #171717;
    --bg-tertiary: #0e0e0e;
    --bg-surface: #262626;
    --bg-surface-hover: #2d2d2d;
    --bg-elevated: #1f1f1f;
    --bg-input: #141414;

    --text-strong: #f5f2ef;
    --text-primary: #f5f2ef;
    --text-secondary: #ddd7d2;
    --text-muted: #9c948d;
    --text-faint: #6e6862;

    --accent: #e85d3a;
    --accent-light: #f17a52;
    --accent-strong: #b53d1f;
    --accent-hover: #f17a52;
    --accent-soft: rgba(232, 93, 58, 0.16);
    --accent-softer: rgba(232, 93, 58, 0.09);
    --accent-ring: rgba(232, 93, 58, 0.4);
    --accent-contrast: #ffffff;

    --border: rgba(255, 255, 255, 0.06);
    --border-strong: #3a3a3a;
    --hover-bg: rgba(255, 255, 255, 0.055);

    --success: #3fb27f;
    --error: #e05252;
    --warning: #e0a137;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 6px 20px -6px rgba(0, 0, 0, 0.65);
    --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, 0.8);
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Tema único: a aplicação é dark-only — os defaults :root acima já são o
   tema dark. Não existe bloco de tema claro. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Fundo em camadas de charcoal, com um leve brilho ember no canto */
    background:
        radial-gradient(120% 80% at 80% 0%, var(--accent-softer) 0%, transparent 55%),
        linear-gradient(160deg, var(--bg-tertiary) 0%, var(--bg-secondary) 45%, var(--bg-primary) 100%);
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-secondary);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.auth-card {
    background: var(--bg-elevated);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: var(--accent-contrast);
    box-shadow: 0 8px 24px -8px var(--accent-ring);
}

.auth-header h1 {
    color: var(--text-strong);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.auth-alert {
    background: color-mix(in srgb, var(--error) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--error) 35%, transparent);
    color: var(--error);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.auth-alert.success {
    background: color-mix(in srgb, var(--success) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
    color: var(--success);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    color: var(--accent);
    font-size: 12px;
}

.form-group input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
    background: var(--bg-surface);
}

.form-group input::placeholder {
    color: var(--text-faint);
}

.form-group small {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.auth-btn {
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    color: var(--accent-contrast);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -6px var(--accent-ring);
    filter: brightness(1.05);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.auth-footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s var(--ease);
}

.auth-footer a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ===== AUTH RESPONSIVE ===== */

/* 1440px — Large desktop slight reduction */
@media (max-width: 1440px) {
    .auth-container {
        max-width: 378px;
        padding: 18px;
    }

    .auth-card {
        padding: 36px;
    }

    .auth-logo {
        width: 54px;
        height: 54px;
        font-size: 25px;
        border-radius: 14px;
    }

    .auth-header h1 {
        font-size: 22px;
    }

    .auth-subtitle {
        font-size: 13px;
    }

    .auth-form {
        gap: 18px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input {
        padding: 11px 14px;
        font-size: 13px;
    }

    .auth-btn {
        padding: 11px 22px;
        font-size: 14px;
    }

    .auth-footer {
        margin-top: 22px;
        font-size: 13px;
    }

    .auth-alert {
        padding: 11px 14px;
        font-size: 13px;
    }
}

/* 1366px — Reduce further */
@media (max-width: 1366px) {
    .auth-container {
        max-width: 360px;
        padding: 16px;
    }

    .auth-card {
        padding: 32px;
    }

    .auth-logo {
        width: 50px;
        height: 50px;
        font-size: 23px;
        border-radius: 13px;
    }

    .auth-header h1 {
        font-size: 21px;
    }

    .auth-subtitle {
        font-size: 12.5px;
    }

    .auth-form {
        gap: 16px;
    }

    .form-group label {
        font-size: 12.5px;
    }

    .form-group input {
        padding: 10px 13px;
        font-size: 12.5px;
    }

    .auth-btn {
        padding: 10px 20px;
        font-size: 13.5px;
    }

    .auth-footer {
        margin-top: 20px;
        font-size: 12.5px;
    }

    .auth-alert {
        padding: 10px 13px;
        font-size: 12.5px;
    }
}

/* 768px — Mobile */
@media (max-width: 768px) {
    .auth-container {
        padding: 16px;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 12px;
    }

    .auth-header {
        margin-bottom: 24px;
    }

    .auth-logo {
        width: 50px;
        height: 50px;
        font-size: 24px;
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .auth-header h1 {
        font-size: 20px;
    }

    .auth-subtitle {
        font-size: 13px;
    }

    .auth-form {
        gap: 16px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input {
        padding: 10px 14px;
        font-size: 14px;
    }

    .auth-btn {
        padding: 12px;
        font-size: 15px;
    }

    .auth-footer {
        margin-top: 20px;
        font-size: 13px;
    }

    .auth-alert {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* 480px — Small Mobile */
@media (max-width: 480px) {
    .auth-container {
        padding: 12px;
    }

    .auth-card {
        padding: 24px 16px;
        border-radius: 12px;
    }

    .auth-header {
        margin-bottom: 20px;
    }

    .auth-logo {
        width: 44px;
        height: 44px;
        font-size: 20px;
        border-radius: 10px;
        margin-bottom: 10px;
    }

    .auth-header h1 {
        font-size: 18px;
    }

    .auth-subtitle {
        font-size: 12px;
    }

    .auth-form {
        gap: 14px;
    }

    .form-group label {
        font-size: 12px;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .auth-btn {
        padding: 11px;
        font-size: 14px;
    }

    .auth-footer {
        margin-top: 16px;
        font-size: 12px;
    }
}
