/* ====================================================================
   Telas de autenticação — shell BRAZ SCHOOL (referência: login do site
   institucional). Aurora sobre preto, logo + overline centrados, card
   petróleo translúcido, título serif 400, inputs dark, CTA dourado pill.
   Requer braz-ui.css (aurora, reveal, overline, input-dark, btn-gold).
   ==================================================================== */

.auth-body {
    min-height: 100svh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    position: relative;
    overflow: hidden;
    background: var(--brand-bg, #000);
    color: var(--brand-text, #efefef);
    font-family: var(--brand-font-body, 'Inter', sans-serif);
    -webkit-font-smoothing: antialiased;
}

.auth-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 448px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 30px; }
.auth-brand img { width: 26px; height: 26px; object-fit: contain; }
.auth-brand span {
    font-family: var(--brand-font-detail, 'Clash Display', 'Inter', sans-serif);
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.3em; text-transform: uppercase;
    color: var(--accent-ink, #e0c193);
}

.auth-overline { margin-bottom: 26px; text-align: center; }

.auth-card {
    width: 100%;
    background: rgba(var(--surface-rgb), 0.55);
    border: 1px solid rgba(var(--brand-accent-rgb, 224, 193, 147), 0.16);
    border-radius: 20px;
    padding: 38px 34px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 30px 60px rgba(var(--shadow-rgb), 0.45);
}

.auth-title {
    font-family: var(--brand-font-display, 'Source Serif 4', Georgia, serif);
    font-weight: 400;
    font-size: 1.8rem;
    line-height: 1.2;
    color: var(--text-strong);
    text-align: center;
    text-wrap: balance;
    margin: 0;
}
.auth-sub {
    text-align: center;
    color: rgba(var(--ink-rgb), 0.55);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 8px 0 26px;
}

.auth-form .form-group { margin-bottom: 18px; }
.auth-form .btn-gold { width: 100%; margin-top: 6px; }

.auth-aux { text-align: right; margin-top: -8px; margin-bottom: 18px; }
.auth-aux a, .auth-links a { color: var(--accent-ink, #e0c193); text-decoration: none; }
.auth-aux a:hover, .auth-links a:hover { text-decoration: underline; }
.auth-aux a { font-size: 0.85rem; }

.auth-links { text-align: center; margin-top: 24px; font-size: 0.9rem; color: rgba(var(--ink-rgb), 0.55); }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; color: rgba(var(--ink-rgb),0.45); text-decoration: none; font-size: 0.85rem; }
.auth-back:hover { color: var(--accent-ink, #e0c193); }
.auth-back .material-icons { font-size: 17px; }

.form-hint { margin-top: 7px; font-size: 0.78rem; line-height: 1.4; color: rgba(var(--ink-rgb), 0.45); }

/* Mensagens (erro/sucesso) — compatível com os JS existentes */
.message { display: none; padding: 13px 15px; border-radius: 12px; margin-bottom: 18px; font-size: 0.88rem; line-height: 1.45; }
.message.error, .auth-card .message .message.error { display: flex; align-items: center; gap: 8px; background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.3); color: rgba(248, 160, 160, 0.95); }
.message.success { display: flex; align-items: center; gap: 8px; background: rgba(80, 220, 120, 0.08); border: 1px solid rgba(80, 220, 120, 0.3); color: rgba(120, 230, 160, 0.95); }
#message:empty { display: none; }
#message .message { margin-bottom: 0; }

/* Loading / spinner (forgot, reset) */
.loading { display: none; text-align: center; padding: 22px 0; }
.loading.active { display: block; }
.spinner {
    width: 38px; height: 38px; margin: 0 auto 14px;
    border: 3px solid rgba(var(--brand-accent-rgb, 224, 193, 147), 0.2);
    border-top-color: var(--accent-ink, #e0c193);
    border-radius: 50%;
    animation: bz-spin 1s linear infinite;
}
@keyframes bz-spin { to { transform: rotate(360deg); } }

/* Força de senha (reset) */
.password-strength { height: 4px; background: rgba(var(--ink-rgb), 0.1); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.password-strength-bar { height: 100%; width: 0; transition: all 0.3s; }
.password-strength-bar.weak { width: 33%; background: #ef4444; }
.password-strength-bar.medium { width: 66%; background: #f59e0b; }
.password-strength-bar.strong { width: 100%; background: #22c55e; }

/* Estados de resultado (reset) */
.error-state, .success-state { text-align: center; padding: 30px 0 10px; }
.error-state .material-icons { font-size: 56px; color: rgba(248, 160, 160, 0.95); margin-bottom: 14px; }
.success-state .material-icons { font-size: 56px; color: rgba(120, 230, 160, 0.95); margin-bottom: 14px; }
.error-state h3, .success-state h3 {
    font-family: var(--brand-font-display, 'Source Serif 4', Georgia, serif);
    font-weight: 400; font-size: 1.3rem; color: var(--text-strong); margin-bottom: 8px;
}
.error-state p, .success-state p { color: rgba(var(--ink-rgb), 0.55); font-size: 0.9rem; }

/* Primeiro acesso (change_password) */
.user-tag { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; color: rgba(var(--ink-rgb),0.65); font-size: 0.85rem; }
.user-tag .material-icons { color: var(--accent-ink, #e0c193); font-size: 18px; }
.hint {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; border-radius: 12px; margin-bottom: 18px;
    background: rgba(var(--brand-accent-rgb, 224, 193, 147), 0.08);
    border: 1px solid rgba(var(--brand-accent-rgb, 224, 193, 147), 0.25);
    color: #f0ddbe; font-size: 0.85rem; line-height: 1.45;
}
.hint .material-icons { font-size: 18px; }
.password-rules { margin-top: 7px; color: rgba(var(--ink-rgb), 0.45); font-size: 0.78rem; line-height: 1.4; }
.input-dark[readonly] { background: rgba(var(--ink-rgb),0.05); color: rgba(var(--ink-rgb),0.7); cursor: not-allowed; }

@media (max-width: 480px) {
    .auth-card { padding: 30px 22px; }
    .auth-title { font-size: 1.55rem; }
}

/* Tema claro: os tons claros de estado (erro/éxito) lavam sobre a superfície clara —
   escurecer texto/ícone p/ contraste (o fundo tint 8% permanece). */
html[data-theme="light"] .message.error,
html[data-theme="light"] .error-state .material-icons { color: #c0392b; }
html[data-theme="light"] .message.success,
html[data-theme="light"] .success-state .material-icons { color: #1b8a4b; }

/* Logo por tema: troca gold↔petróleo via .brand-logo--gold/--dark (regras globais em braz-ui.css). */
