/*
 * pages/index_login.css — Portal de Acesso (Login SSO)
 * Página standalone — não herda core.css nem components.css.
 * Paleta: vermelhos ANPOLL + slate neutros (mesma do hub.css)
 */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── VARIÁVEIS ── */
:root {
    --red-900:   #7f1d1d;
    --red-800:   #991b1b;
    --red-700:   #b91c1c;
    --red-600:   #dc2626;
    --red-500:   #ef4444;
    --red-400:   #f87171;
    --red-300:   #fca5a5;
    --red-200:   #fecaca;
    --red-100:   #fee2e2;
    --red-50:    #fef2f2;
    --emerald-600: #059669;
    --emerald-50:  #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-700: #047857;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50:  #f8fafc;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
}

/* ── BASE ── */
html, body { height: 100%; }
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--slate-50);
    color: var(--slate-800);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

/* ── LAYOUT RAIZ ── */
.login-root {
    display: flex;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════════
   PAINEL ESQUERDO — institucional
═══════════════════════════════════════════════════ */
.login-aside {
    display: none;
    width: 58.333%;
    flex-shrink: 0;
    background: var(--red-900);
    padding: 64px;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    position: relative;
    overflow: hidden;
}
@media (min-width: 1024px) { .login-aside { display: flex; } }
@media (min-width: 1280px) { .login-aside { padding: 80px; } }

/* Grade geométrica */
.login-aside-bg {
    position: absolute; inset: 0;
    pointer-events: none; overflow: hidden;
}
.login-aside-bg svg { width: 100%; height: 100%; opacity: .05; }

/* Glows */
.login-glow-1, .login-glow-2 {
    position: absolute; border-radius: 50%;
    filter: blur(80px); pointer-events: none;
}
.login-glow-1 {
    width: 400px; height: 400px; background: #dc2626;
    top: -140px; left: -100px; opacity: .18;
}
.login-glow-2 {
    width: 340px; height: 340px; background: #450a0a;
    bottom: -100px; right: -80px; opacity: .4;
}

/* Conteúdo do aside */
.login-aside-content { position: relative; z-index: 2; }
.login-logo-wrap { margin-bottom: 52px; }
.login-logo      { height: 48px; width: auto; filter: brightness(0) invert(1); }
.login-logo-text { font-size: 22px; font-weight: 700; letter-spacing: .1em; color: #fff; }

.login-headline {
    font-size: 42px; font-weight: 300;
    line-height: 1.15; margin-bottom: 20px; color: #fff;
}
.login-headline strong {
    font-weight: 700; display: block;
    color: var(--red-300);
}

.login-tagline {
    font-size: 15px;
    color: rgba(252,165,165,.75);
    font-weight: 400; line-height: 1.75;
    max-width: 340px; margin-bottom: 40px;
}

/* Cards informativos */
.login-info-cards { display: flex; flex-direction: column; gap: 12px; max-width: 380px; }
.login-info-card {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-xl);
    padding: 16px 18px;
    display: flex; align-items: flex-start; gap: 14px;
    backdrop-filter: blur(6px);
}
.login-info-card-icon {
    width: 38px; height: 38px; border-radius: var(--radius-md);
    background: rgba(220,38,38,.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; color: #fff; flex-shrink: 0;
}
.login-info-card h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.login-info-card p  { font-size: 12px; color: rgba(252,165,165,.75); line-height: 1.55; }

/* Copyright */
.login-aside-foot {
    position: relative; z-index: 2;
    font-size: 11px; color: rgba(252,165,165,.3);
    font-weight: 500; line-height: 1.6;
}

/* ═══════════════════════════════════════════════════
   PAINEL DIREITO — interação
═══════════════════════════════════════════════════ */
.login-main {
    flex: 1;
    display: flex; flex-direction: column;
    background: #fff;
    height: 100vh; overflow-y: auto;
}

/* Topbar */
.login-topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 32px;
    border-bottom: 1px solid var(--slate-100);
    flex-shrink: 0;
}
.login-topbar-logo img  { height: 32px; width: auto; }
.login-topbar-logo span { font-size: 16px; font-weight: 700; color: var(--slate-800); }
.login-topbar-help      { font-size: 13px; color: var(--slate-400); }
.login-topbar-help a    { color: var(--red-600); font-weight: 600; text-decoration: none; }
.login-topbar-help a:hover { color: var(--red-800); }
@media (min-width: 1024px) { .login-topbar-logo { display: none; } }

/* Corpo */
.login-body {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 32px 24px;
}
.login-inner {
    width: 100%; max-width: 400px;
    display: flex; flex-direction: column; gap: 0;
}

/* ── STEP INDICATOR ── */
.step-indicator {
    display: flex; align-items: center;
    gap: 0; margin-bottom: 32px;
}
.step-pill {
    display: flex; align-items: center; gap: 7px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
}
.step-num {
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    background: var(--slate-100); color: var(--slate-400);
    transition: all .2s;
}
.step-label { color: var(--slate-400); transition: color .2s; }
.step-pill.active .step-num   { background: var(--red-600); color: #fff; }
.step-pill.active .step-label { color: var(--red-600); }
.step-pill.done  .step-num    { background: var(--emerald-600); color: #fff; }
.step-pill.done  .step-label  { color: var(--emerald-600); }
.step-connector {
    flex: 1; height: 1px;
    background: var(--slate-200);
    margin: 0 10px;
}

/* ── CABEÇALHO DO FORMULÁRIO ── */
.login-form-head { margin-bottom: 24px; }
.login-form-head h2 {
    font-size: 26px; font-weight: 700;
    color: var(--slate-900); margin-bottom: 5px;
}
.login-form-head p { font-size: 14px; color: var(--slate-500); }

/* ── CARDS DE PERFIL (PASSO 1) ── */
.perfil-cards { display: flex; flex-direction: column; gap: 12px; }
.perfil-card {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: all .2s ease-out;
    cursor: pointer;
}
.perfil-card:hover {
    border-color: var(--red-300);
    box-shadow: 0 4px 20px rgba(220,38,38,.1);
    transform: translateY(-2px);
}
.perfil-card-icon {
    width: 44px; height: 44px; border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
    transition: all .2s;
}
.perfil-card.admin .perfil-card-icon    { background: var(--red-50); color: var(--red-600); }
.perfil-card.admin:hover .perfil-card-icon { background: var(--red-100); }
.perfil-card.coord .perfil-card-icon    { background: var(--slate-100); color: var(--slate-600); }
.perfil-card.coord:hover .perfil-card-icon { background: var(--slate-200); }
.perfil-card-text { flex: 1; min-width: 0; }
.perfil-card-super { font-size: 11px; color: var(--slate-400); font-weight: 500; margin-bottom: 2px; }
.perfil-card-title {
    font-size: 16px; font-weight: 700;
    color: var(--slate-800); transition: color .2s;
}
.perfil-card:hover .perfil-card-title { color: var(--red-700); }
.perfil-card-desc { font-size: 12px; color: var(--slate-400); margin-top: 2px; }
.perfil-card-arrow {
    width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid var(--slate-200);
    display: flex; align-items: center; justify-content: center;
    color: var(--slate-400); font-size: 14px;
    transition: all .2s; flex-shrink: 0;
}
.perfil-card:hover .perfil-card-arrow {
    border-color: var(--red-300); color: var(--red-600);
    transform: translateX(2px);
}

/* ── FORMULÁRIO DE LOGIN (PASSO 2) ── */
.btn-back-perfil {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600;
    color: var(--slate-400); text-decoration: none;
    margin-bottom: 20px; transition: color .15s;
    border: none; background: none; cursor: pointer;
    padding: 0;
}
.btn-back-perfil:hover { color: var(--red-600); }
.btn-back-perfil .ti  { font-size: 14px; transition: transform .15s; }
.btn-back-perfil:hover .ti { transform: translateX(-2px); }

.form-fields { display: flex; flex-direction: column; gap: 14px; }

.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-group label {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    color: var(--slate-500);
}
.field-group-top {
    display: flex; justify-content: space-between; align-items: center;
}
.field-inp {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    background: var(--slate-50);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px; color: var(--slate-800);
    outline: none; transition: all .15s;
}
.field-inp:focus {
    border-color: var(--red-400);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(220,38,38,.08);
}
.field-inp::placeholder { color: var(--slate-400); }
.field-inp.mono {
    font-family: 'Roboto Mono', 'Courier New', monospace;
    letter-spacing: .15em;
    text-transform: uppercase;
}

/* Link "Esqueceu a senha?" */
.btn-forgot {
    font-size: 12px; font-weight: 600;
    color: var(--red-600); background: none;
    border: none; cursor: pointer; padding: 0;
    transition: color .15s;
}
.btn-forgot:hover { color: var(--red-800); }

/* ── TOGGLE SENHA (AJUSTADO E BLINDADO) ── */
.password-wrap {
    position: relative;
    display: block;
    width: 100%;
}
.password-wrap .field-inp {
    padding-right: 44px; /* Garante que o texto não sobreponha o ícone */
}
.btn-toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    color: var(--slate-400);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s;
    z-index: 2;
    outline: none;
}
.btn-toggle-pass:hover {
    color: var(--slate-600);
}
.btn-toggle-pass:focus {
    outline: none;
}

/* ── CHECKBOX LEMBRAR-ME ── */
.field-checkbox {
    display: flex; align-items: center; gap: 8px; margin-top: 4px;
}
.field-checkbox input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--red-600); cursor: pointer;
}
.field-checkbox label {
    font-size: 13px; color: var(--slate-600); font-weight: 500;
    cursor: pointer; user-select: none;
    text-transform: none; letter-spacing: normal;
}

/* ── CAPTCHA ── */
.captcha-wrap {
    display: flex; align-items: center; gap: 12px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
}
.captcha-img-wrap {
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--slate-200);
    background: #fff;
    display: flex; align-items: center;
}
.captcha-img { display: block; height: 40px; width: auto; }
.captcha-reload {
    background: none; border: none; cursor: pointer;
    color: var(--slate-400); font-size: 15px;
    padding: 4px; border-radius: var(--radius-md);
    transition: all .15s; line-height: 1;
    display: flex; align-items: center;
}
.captcha-reload:hover { color: var(--red-600); background: var(--red-50); }
.captcha-sep {
    width: 1px; height: 24px;
    background: var(--slate-200); flex-shrink: 0;
}
.captcha-inp {
    flex: 1; border: none; background: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px; color: var(--slate-800);
    outline: none; padding: 0;
    min-width: 0;
}
.captcha-inp::placeholder { color: var(--slate-400); font-size: 13px; }
.captcha-label {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    color: var(--slate-500); margin-bottom: 5px;
    display: block;
}

/* Honey pot — completamente invisível */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    tabindex: -1;
}

/* ── FEEDBACK ── */
.feedback-box {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    border: 1px solid;
    font-size: 13px; font-weight: 500;
    line-height: 1.55;
}
.feedback-box.erro    { background: var(--red-50);     border-color: var(--red-200);     color: #b91c1c; }
.feedback-box.sucesso { background: var(--emerald-50); border-color: var(--emerald-100); color: var(--emerald-700); }
.feedback-box .ti     { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── BOTÃO SUBMIT ── */
.btn-submit {
    width: 100%;
    padding: 12px;
    border: none; border-radius: var(--radius-lg);
    background: var(--red-600);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px; font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background .15s, transform .1s;
    box-shadow: 0 4px 16px rgba(220,38,38,.25);
}
.btn-submit:hover  { background: var(--red-700); }
.btn-submit:active { transform: scale(.985); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Loader spinner inline */
.btn-loader {
    display: none;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Botão "Cancelar recuperação" */
.btn-voltar-login {
    display: none; width: 100%;
    padding: 10px;
    border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
    background: #fff; font-family: 'DM Sans', sans-serif;
    font-size: 13px; font-weight: 600; color: var(--slate-600);
    cursor: pointer; transition: all .15s;
}
.btn-voltar-login:hover { background: var(--slate-50); border-color: var(--slate-300); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .login-body { padding: 24px 16px; }
    .login-headline { font-size: 32px; }
}