/* ──────────────────────────────────────────────────────────────────────────
   Telas de autenticação (Login, Recuperar acesso, Redefinir senha, Acesso
   negado). Extraído do <style> inline do Login.cshtml quando as demais telas
   passaram a usar o mesmo split-screen — antes elas usavam o card único
   `sc-auth-*` do site.css, que destoava do login.

   Este arquivo é autossuficiente: as páginas de auth NÃO carregam o site.css
   (não há sidebar nem tema escuro fora da aplicação logada).

   Identidade Top Cintos: azul profundo, laranja de segurança e Poppins.
   ────────────────────────────────────────────────────────────────────────── */
:root {
    --navy-950: #06182d;
    --navy-900: #0a2948; /* azul institucional */
    --navy-700: #17527a;
    --orange: #f4761a;
    --orange-400: #ff9b4a;
    --orange-600: #db6411;
    --ink: #172b45;
    --ink-mut: #65758a;
    --line: #dce5ee;
    --field-bg: #f7f9fc;
    --canvas: #071f38;
    --white: #ffffff;
    --ok: #0f7a4d;
    --danger: #b42318;
    --radius: 18px;
}

* { box-sizing: border-box; }

html { background: var(--navy-950); }

/* O body cresce com o conteúdo: centraliza quando o card cabe e rola quando
   não cabe (o autocadastro é mais alto que a tela). Rodapé na última linha. */
body {
    margin: 0;
    font-family: 'Poppins', system-ui, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(900px 700px at -6% 108%, rgba(20, 111, 148, .48), transparent 66%),
        radial-gradient(720px 520px at 108% -5%, rgba(19, 90, 128, .54), transparent 66%),
        linear-gradient(135deg, var(--navy-950), var(--navy-900));
    background-attachment: fixed;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: 1fr auto;
    justify-items: center;
    align-items: center;
    padding: 24px 24px 0;
    position: relative;
    overflow-x: hidden;
}

/* Linhas topográficas: referência à altura e à operação em campo. */
.altitude {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .78;
    z-index: 0;
}

.shell {
    position: relative;
    z-index: 1;
    width: min(1040px, 100%);
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: var(--white);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 36px 92px -38px rgba(0, 8, 20, .82);
    animation: rise .7s cubic-bezier(.16, 1, .3, 1) both;
}

/* ── Painel de marca (esquerda) ── */
.brand {
    position: relative;
    padding: 48px 46px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    background:
        radial-gradient(440px 280px at 100% 0%, rgba(244, 118, 26, .17), transparent 66%),
        linear-gradient(150deg, #0b3154 0%, var(--navy-950) 100%);
    border-right: 1px solid rgba(255, 255, 255, .10);
    overflow: hidden;
}
.brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(200, 228, 246, .24) 1px, transparent 1px);
    background-size: 23px 23px;
    mask-image: linear-gradient(115deg, #000, transparent 78%);
    opacity: .36;
    pointer-events: none;
}
.brand > * { position: relative; z-index: 1; }

.lockup { display: flex; align-items: center; gap: 14px; }
/* Marca Top Cintos (22/10/2026): mais alta que larga, então a altura manda. */
.lockup .mark { flex: none; width: auto; height: 50px; animation: markPop .6s cubic-bezier(.16, 1, .3, 1) .1s both; }
.lockup .word { line-height: 1; }
.lockup .word b { display: block; font-weight: 800; font-size: 1.35rem; letter-spacing: -.01em; color: #fff; }
.lockup .word span { display: block; font-weight: 600; font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: #9bc4df; margin-top: 4px; }

.headline {
    font-size: clamp(1.9rem, 3.4vw, 2.7rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -.02em;
    margin: 8px 0 0;
    color: #f5f9fc;
}
.headline em { font-style: italic; color: var(--orange-400); }

.lede { color: #b5c9d9; font-size: 1rem; line-height: 1.55; max-width: 42ch; margin: 0; }

.chips { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.chip {
    display: flex; align-items: center; gap: 12px;
    font-size: .92rem; font-weight: 500; color: #e7f0f7;
}
.chip i {
    flex: none; display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 10px;
    color: var(--orange-400);
    background: rgba(244, 118, 26, .12);
    border: 1px solid rgba(255, 155, 74, .28);
}
.chip svg { width: 17px; height: 17px; }

/* ── Painel do formulário (direita) ── */
.panel { padding: 48px 46px; display: flex; flex-direction: column; justify-content: center; background: var(--white); }
/* Abas de acesso do login (17/09/2026): equipe Top Cintos × Cliente, cada conta só entra pela sua. */
.access-tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
    padding: 4px; margin-bottom: 24px;
    background: var(--field-bg); border: 1px solid var(--line); border-radius: 12px;
}
.access-tabs a {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 12px; border-radius: 9px;
    font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ink-mut); text-decoration: none;
    transition: background .15s, color .15s, box-shadow .15s;
}
.access-tabs a svg { width: 17px; height: 17px; }
.access-tabs a:hover { color: var(--navy-900); }
.access-tabs a.active {
    background: var(--navy-900); color: #fff;
    box-shadow: 0 8px 18px -10px rgba(0, 20, 40, .7);
}
.access-tabs a:focus-visible { outline: 2px solid var(--orange-400); outline-offset: 2px; }

.panel-head { margin-bottom: 26px; }
.panel-head h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 6px; letter-spacing: -.01em; }
.panel-head p { margin: 0; color: var(--ink-mut); font-size: .95rem; }

/* Selo acima do título — usado nas telas que não são o login (recuperar
   acesso, redefinir senha, acesso negado) para dar contexto imediato. */
.badge {
    display: grid; place-items: center;
    width: 46px; height: 46px; margin-bottom: 14px;
    border-radius: 14px;
    color: var(--orange-600);
    background: rgba(244, 118, 26, .12);
    border: 1px solid rgba(244, 118, 26, .26);
}
.badge svg { width: 22px; height: 22px; }
.badge.danger {
    color: var(--danger);
    background: rgba(239, 68, 68, .10);
    border-color: rgba(239, 68, 68, .28);
}

.alert {
    display: flex; align-items: flex-start; gap: 10px;
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .4);
    color: var(--danger);
    padding: 12px 14px; border-radius: 12px;
    font-size: .9rem; margin-bottom: 20px;
    line-height: 1.45;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert ul { margin: 0; padding-left: 18px; }
.alert.success {
    background: rgba(16, 185, 129, .12);
    border-color: rgba(16, 185, 129, .38);
    color: var(--ok);
}

.field { margin-bottom: 18px; }
.field > label { display: block; font-size: .82rem; font-weight: 600; color: var(--navy-900); margin-bottom: 8px; }
.control { position: relative; display: flex; align-items: center; }
.control .lead {
    position: absolute; left: 14px; display: grid; place-items: center;
    color: #7b8ea5; pointer-events: none;
}
.control .lead svg { width: 18px; height: 18px; }
.control input {
    width: 100%;
    font: inherit; font-size: .98rem; color: var(--ink);
    background: var(--field-bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 14px 13px 44px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.control:has(.reveal) input { padding-right: 46px; }
.control input::placeholder { color: #8496ab; }
.control input:focus {
    outline: none;
    border-color: var(--navy-700);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(31, 58, 95, .11);
}
.control input:disabled {
    background: #eef2f7;
    color: var(--ink-mut);
    cursor: not-allowed;
}
.control input:-webkit-autofill,
.control input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 1000px var(--white) inset;
    caret-color: var(--ink);
}
/* Erro de um campo (09/10/2026): aparece embaixo dele, sem apagar o que já foi digitado. */
.field-erro { display: block; margin-top: 6px; font-size: .78rem; font-weight: 600; line-height: 1.35; color: var(--danger); }
.control input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(239, 68, 68, .10); }
.reveal {
    position: absolute; right: 8px;
    display: grid; place-items: center;
    width: 32px; height: 32px; padding: 0;
    background: none; border: 0; cursor: pointer;
    color: var(--ink-mut); border-radius: 8px;
    transition: color .15s, background .15s;
}
.reveal:hover { color: var(--navy-900); background: #eef3f7; }
.reveal svg { width: 18px; height: 18px; }

/* Requisitos da senha — acendem em verde/vermelho conforme a digitação. */
.pwhints {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    font-size: .76rem;
    color: var(--ink-mut);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 14px;
}
.pwhints li { display: flex; align-items: center; gap: 7px; }
.pwhints li::before {
    content: "";
    width: 6px; height: 6px; flex: none;
    border-radius: 50%;
    background: var(--ink-mut);
    opacity: .5;
    transition: background .15s, opacity .15s;
}
.pwhints li.is-valid { color: var(--ok); }
.pwhints li.is-valid::before { background: var(--ok); opacity: 1; }
.pwhints li.is-invalid { color: var(--danger); }
.pwhints li.is-invalid::before { background: var(--danger); opacity: 1; }

.row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin: 6px 0 22px;
}
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: .9rem; color: var(--ink-mut); user-select: none; }
.check input {
    appearance: none; width: 18px; height: 18px; flex: none;
    border: 1px solid var(--line); border-radius: 6px;
    background: var(--field-bg); cursor: pointer; position: relative;
    transition: background .15s, border-color .15s;
}
.check input:checked { background: var(--orange); border-color: var(--orange); }
.check input:checked::after {
    content: ""; position: absolute; left: 5px; top: 1px;
    width: 5px; height: 10px; border: solid #fff;
    border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.check input:focus-visible { outline: 2px solid var(--orange-400); outline-offset: 2px; }
.row a { color: var(--navy-700); font-size: .9rem; font-weight: 600; text-decoration: none; }
.row a:hover { color: var(--orange-600); text-decoration: underline; }

.submit {
    width: 100%;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font: inherit; font-weight: 700; font-size: 1rem; color: #fff;
    background: linear-gradient(180deg, var(--orange-400), var(--orange-600));
    border: 0; border-radius: 12px;
    padding: 14px 18px; cursor: pointer;
    text-decoration: none;
    box-shadow: 0 14px 26px -13px rgba(219, 100, 17, .72);
    transition: transform .12s, box-shadow .2s, filter .2s;
}
.submit:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 18px 34px -12px rgba(219, 100, 17, .8); }
.submit:active { transform: translateY(0); }
.submit svg { width: 18px; height: 18px; }

/* Ação secundária (voltar ao login, trocar de conta). */
.submit.ghost {
    color: var(--navy-900);
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: none;
}
.submit.ghost:hover { filter: none; background: #f4f8fb; border-color: #c6d5e4; box-shadow: none; }

/* Pilha de botões nas telas sem formulário. */
.actions { display: flex; flex-direction: column; gap: 10px; }
.actions form { margin: 0; }

.foot-note { margin: 22px 0 0; text-align: center; color: var(--ink-mut); font-size: .84rem; line-height: 1.5; }
.foot-note a { color: var(--navy-700); font-weight: 600; text-decoration: none; }
.foot-note a:hover { color: var(--orange-600); text-decoration: underline; }

.demo {
    margin-top: 22px; padding: 14px 16px;
    background: #f4f8fb;
    border: 1px dashed var(--line); border-radius: 12px;
    font-size: .82rem; color: var(--ink-mut); line-height: 1.7;
}
.demo strong { color: var(--ink); font-weight: 600; }
.demo code { color: var(--orange-600); font-family: ui-monospace, monospace; }

.page-foot { position: relative; padding: 18px 0; text-align: center; color: rgba(205, 222, 235, .64); font-size: .78rem; z-index: 1; }

/* Pares de campos lado a lado (autocadastro); empilham no celular. */
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes markPop { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }

.stagger > * { animation: rise .6s cubic-bezier(.16, 1, .3, 1) both; }
.stagger > *:nth-child(1) { animation-delay: .06s; }
.stagger > *:nth-child(2) { animation-delay: .12s; }
.stagger > *:nth-child(3) { animation-delay: .18s; }
.stagger > *:nth-child(4) { animation-delay: .24s; }
.stagger > *:nth-child(5) { animation-delay: .30s; }
.stagger > *:nth-child(6) { animation-delay: .36s; }

@media (max-width: 860px) {
    /* Alinha ao topo (em vez de centralizar) para não cortar o logo
       quando o conteúdo é mais alto que a tela; a página rola natural. */
    body { align-items: start; padding: 16px 16px 0; }
    .shell { grid-template-columns: 1fr; max-width: 460px; }
    .brand { padding: 30px 26px 22px; gap: 16px; }
    .brand .headline { font-size: 1.5rem; }
    .brand .lede, .brand .chips { display: none; }
    .panel { padding: 26px 26px 34px; }
    .field-pair { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .pwhints { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .shell, .stagger > *, .lockup .mark { animation: none; }
}
