/*
 * Portal MTB — Telas de Autenticação
 * Layout dividido: painel de marca (esq.) + formulário (dir.)
 * Aplicado em: login, esqueci-senha, redefinir-senha, solicitar-acesso, cadastro
 */

/* ── Layout raiz ──────────────────────────────────────────────────────────── */
.portal-auth-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .portal-auth-root { flex-direction: row; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   PAINEL DE MARCA — esquerda
══════════════════════════════════════════════════════════════════════════════ */
.portal-auth-brand {
    display: none;
    position: relative;
    overflow: hidden;
    flex: 0 0 42%;
    max-width: 42%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.75rem;
    background: linear-gradient(160deg, #ff5609 0%, #d74400 45%, #822900 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.12);
}

@media (min-width: 992px) {
    .portal-auth-brand { display: flex; }
}

/* Profundidade sobre o gradiente laranja */
.portal-auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 110%  5%, rgba(255, 255, 255, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 55% 45% at -10% 100%, rgba(0, 0, 0, 0.22) 0%, transparent 60%);
    pointer-events: none;
}

/* Conteúdo do painel */
.portal-auth-brand__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 310px;
}

.portal-auth-brand__logo {
    height: 44px;
    margin-bottom: 2.5rem;
    display: block;
}

.portal-auth-brand__title {
    color: #fff;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
    margin-bottom: 0.625rem;
}

.portal-auth-brand__tagline {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.65;
    margin-bottom: 1.875rem;
}

/* Divisor branco */
.portal-auth-brand__divider {
    width: 40px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.20) 100%);
    margin-bottom: 1.875rem;
}

/* Lista de diferenciais */
.portal-auth-brand__features {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.0625rem;
}

.portal-auth-brand__feature {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
}

.portal-auth-brand__feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
}

/* Badge "sistema online" */
.portal-auth-brand__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #7a2800;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 50px;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

.portal-auth-brand__badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 7px rgba(34, 197, 94, 0.7);
    flex-shrink: 0;
    animation: auth-badge-pulse 2.4s ease-in-out infinite;
}

@keyframes auth-badge-pulse {
    0%, 100% { opacity: 1;    transform: scale(1);    }
    50%       { opacity: 0.4; transform: scale(0.82); }
}

/* ══════════════════════════════════════════════════════════════════════════════
   PAINEL DE FORMULÁRIO — direita
══════════════════════════════════════════════════════════════════════════════ */
.portal-auth-form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    min-height: 100vh;
}

@media (min-width: 992px) {
    .portal-auth-form { padding: 2.5rem 3rem; }
}

.portal-auth-form__inner {
    width: 100%;
    max-width: 440px;
}

/* Logo visível apenas no mobile */
.portal-auth-mobile-logo {
    text-align: center;
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .portal-auth-mobile-logo { display: none !important; }
}

/* Cabeçalho do formulário */
.portal-auth-heading {
    margin-bottom: 2rem;
}

.portal-auth-heading__title {
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.3;
    margin-bottom: 0.375rem;
    color: #181c32;
}
[data-bs-theme=dark] .portal-auth-heading__title { color: #fff; }

.portal-auth-heading__sub {
    font-size: 0.9375rem;
    color: var(--bs-gray-500);
    font-weight: 400;
    line-height: 1.55;
    margin: 0;
}

/* Labels */
.portal-auth-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bs-gray-700);
    margin-bottom: 0.5rem;
}
[data-bs-theme=dark] .portal-auth-label { color: var(--bs-gray-500); }

/* Inputs */
.portal-auth-input {
    height: 48px !important;
    font-size: 0.9375rem;
    border-radius: 10px !important;
    padding: 0 1rem !important;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.portal-auth-input:focus {
    border-color: #ff7030 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 112, 48, 0.18) !important;
}

/* Botão principal */
.portal-auth-btn {
    height: 48px;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    letter-spacing: 0.01em;
    background: linear-gradient(130deg, #ff7030 0%, #ff5000 100%) !important;
    border-color: transparent !important;
    transition: transform .15s ease, box-shadow .15s ease;
}
.portal-auth-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(255, 112, 48, 0.40) !important;
}
.portal-auth-btn:active { transform: translateY(0) !important; }

/* Alerta inline */
.portal-auth-alert {
    border-radius: 10px !important;
    font-size: 0.9rem;
    padding: 0.875rem 1rem !important;
}

/* Links de navegação abaixo do form */
.portal-auth-nav {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--bs-gray-500);
}
.portal-auth-nav a,
.portal-auth-link {
    color: #ff7030 !important;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s;
}
.portal-auth-nav a:hover,
.portal-auth-link:hover {
    color: #ff8c55 !important;
    text-decoration: underline;
}

/* Link "esqueci senha" inline com label da senha */
.portal-auth-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.portal-auth-field-header .portal-auth-label { margin-bottom: 0; }
.portal-auth-forgot {
    font-size: 0.8375rem;
    font-weight: 600;
    color: #ff7030 !important;
    text-decoration: none;
    transition: color .15s;
}
.portal-auth-forgot:hover { color: #ff8c55 !important; text-decoration: underline; }

/* ── Acessibilidade ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .portal-auth-brand__badge-dot { animation: none; }
    .portal-auth-btn,
    .portal-auth-input  { transition: none; }
}
