/* ═══════════════════════════════════════════════
   AUTH — telas de login, recuperação e reset de senha
   Fora do layout do painel (HTML standalone)
   ═══════════════════════════════════════════════ */

:root {
    --primary:        #0058be;
    --primary-dark:   #004499;
    --gradient-primary: linear-gradient(135deg, #0058be 0%, #2170e4 100%);
    --sidebar-bg:     #001e40;
    --surface:        #f6fafe;
    --surface-low:    #f0f4f8;
    --surface-high:   #e4e9ed;
    --on-surface:     #171c1f;
    --on-surface-var: #44474e;
    --border:         #e4e9ed;
    --danger:         #DC2626;
    --success:        #16A34A;
    --card-radius:    24px;
    --shadow-card:    0 2px 16px rgba(0,30,64,.08);
    --shadow-amb:     0 8px 40px rgba(0,30,64,.18);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background-color: var(--sidebar-bg);
    background-image:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(0,88,190,.35) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 100%, rgba(33,112,228,.22) 0%, transparent 55%);
}

/* ── Wrapper ── */
.auth-wrap {
    width: 100%;
    max-width: 420px;
    animation: authIn .4s cubic-bezier(.22,1,.36,1);
}
@keyframes authIn {
    from { opacity: 0; transform: translateY(28px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Marca ── */
.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}
.auth-brand-icon {
    width: 64px; height: 64px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    box-shadow: 0 8px 28px rgba(0,88,190,.45);
}
.auth-brand-icon i { font-size: 32px; color: #fff; }
.auth-brand-title {
    font-family: 'Manrope', 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
    line-height: 1.2;
}
.auth-brand-sub {
    font-size: 13px;
    color: rgba(255,255,255,.55);
    margin-top: 5px;
}

/* ── Card ── */
.auth-card {
    background: #ffffff;
    border-radius: var(--card-radius);
    padding: 40px 36px 36px;
    box-shadow: var(--shadow-amb);
}

.auth-card-title {
    font-family: 'Manrope', 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--on-surface);
    letter-spacing: -.02em;
    margin-bottom: 4px;
}
.auth-card-sub {
    font-size: 13px;
    color: var(--on-surface-var);
    margin-bottom: 28px;
    line-height: 1.5;
}

/* ── Formulário ── */
.auth-form-group { margin-bottom: 20px; }
.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 7px;
    color: var(--on-surface);
}

.auth-input-wrap { position: relative; }
.auth-input-wrap > i.auth-icon-left {
    position: absolute;
    left: 14px; top: 50%; transform: translateY(-50%);
    font-size: 18px;
    color: var(--on-surface-var);
    pointer-events: none;
    z-index: 1;
}
.auth-input-wrap input {
    width: 100%;
    padding: 13px 44px 13px 44px;
    border: none;
    border-radius: 1rem;
    font-size: 14px;
    font-family: inherit;
    color: var(--on-surface);
    background: var(--surface-low);
    transition: background .15s, box-shadow .15s;
}
.auth-input-wrap input:focus {
    outline: none;
    background: var(--surface-high);
    box-shadow: 0 0 0 3px rgba(0,88,190,.14);
}
.auth-input-wrap input[readonly] {
    opacity: .65;
    cursor: default;
}
.auth-toggle-pw {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 44px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer;
    color: var(--on-surface-var);
    transition: color .15s;
    border-radius: 0 1rem 1rem 0;
}
.auth-toggle-pw:hover { color: var(--primary); }
.auth-toggle-pw i { font-size: 18px; pointer-events: none; }

.auth-field-hint { font-size: 12px; color: var(--on-surface-var); margin-top: 5px; }
.auth-field-error { font-size: 12px; color: var(--danger); margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.auth-field-error i { font-size: 14px; }

/* ── Alertas ── */
.auth-alert {
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 13px;
    margin-bottom: 24px;
    display: flex; align-items: flex-start; gap: 10px;
    line-height: 1.5;
}
.auth-alert i { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.auth-alert-error   { background: #FEF2F2; border: 1px solid #FECACA; color: #7F1D1D; }
.auth-alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #14532D; }
.auth-alert-warn    { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }

/* ── Linha remember-me / esqueci ── */
.auth-row-extra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 13px;
}
.auth-remember {
    display: flex; align-items: center; gap: 7px;
    cursor: pointer; color: var(--on-surface-var);
    user-select: none;
}
.auth-remember input[type=checkbox] {
    width: 16px; height: 16px;
    accent-color: var(--primary);
    cursor: pointer; flex-shrink: 0;
}
.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.auth-link:hover { text-decoration: underline; }

/* ── Botão principal ── */
.auth-btn-submit {
    width: 100%;
    padding: 13px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 1rem;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: filter .15s, box-shadow .15s, transform .1s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 18px rgba(0,88,190,.3);
    letter-spacing: .01em;
}
.auth-btn-submit:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 24px rgba(0,88,190,.4);
}
.auth-btn-submit:active { transform: scale(.98); }
.auth-btn-submit i { font-size: 18px; }

/* ── Link de volta ── */
.auth-back {
    display: block;
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
    color: var(--on-surface-var);
}

/* ── Rodapé ── */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: rgba(255,255,255,.35);
}
