/* ==========================================================================
   DXP.Cortes — Telas de acesso (Login, Esqueceu a senha, Nova senha)
   Layout em duas colunas inspirado no Agente de Cobrança, com a identidade
   do DXP.Cortes (mesmos tokens da landing). Carregado depois do tema Velzon
   (bootstrap/app.min.css) e do site.css, que continuam servindo o modal de
   mensagem e o loading usados pelos scripts.
   --------------------------------------------------------------------------
   01. Tokens e base      04. Formulário
   02. Estrutura          05. Responsivo e acessibilidade
   03. Coluna da marca
   ========================================================================== */

/* 01. Tokens e base ======================================================= */
.auth-page {
    --auth-primary: #405189;
    --auth-primary-2: #3577f1;
    --auth-primary-ink: #2c64d4;   /* azul de texto/link com contraste 5,4:1 sobre branco */
    --auth-primary-ink-2: #2350ab;
    --auth-accent: #FF0076;
    --auth-success: #0ab39c;
    --auth-navy-1: #405189;
    --auth-navy-2: #303f6e;
    --auth-navy-3: #253158;
    --auth-ink: #1b2337;
    --auth-text: #3a4459;
    --auth-muted: #5d6779;         /* 5,9:1 sobre branco */
    --auth-line: #e6e9f0;
    --auth-field-border: #8a94a6;  /* 3:1 sobre branco (WCAG 1.4.11) */
    --auth-field-bg: #fff;
    --auth-radius: 12px;
    --auth-ease: cubic-bezier(.2, .7, .2, 1);
    --auth-gutter: clamp(20px, 5vw, 40px);
    background: #fff;
    color: var(--auth-text);
    -webkit-font-smoothing: antialiased;
}

.auth-skip {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 3000;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--auth-ink);
    color: #fff;
    font-weight: 600;
    transition: top .2s var(--auth-ease);
}

.auth-skip:focus {
    top: 16px;
    color: #fff;
}

/* 02. Estrutura =========================================================== */
.auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: #fff;
}

/* Topo: faixa escura com a logo (telas menores). Nas grandes vira só o "Voltar ao site". */
.auth-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 12px var(--auth-gutter);
    background: linear-gradient(135deg, var(--auth-navy-1), var(--auth-navy-3));
}

.auth-top-brand {
    display: inline-flex;
    line-height: 0;
}

.auth-top-brand img {
    width: auto;
    height: 36px;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 4px;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    transition: color .2s var(--auth-ease);
}

.auth-back:hover,
.auth-back:focus {
    color: #fff;
}

.auth-back i {
    font-size: 18px;
    transition: transform .2s var(--auth-ease);
}

.auth-back:hover i {
    transform: translateX(-3px);
}

.auth-content {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 6vh, 64px) var(--auth-gutter);
}

.auth-content:focus {
    outline: none;
}

.auth-panel {
    width: 100%;
    max-width: 420px;
}

.auth-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 18px;
    padding: 20px var(--auth-gutter) 24px;
    border-top: 1px solid var(--auth-line);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    color: var(--auth-muted);
}

.auth-foot p {
    margin: 0;
}

.auth-foot-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px;
}

.auth-foot-links a {
    color: var(--auth-text);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: color .2s var(--auth-ease), text-decoration-color .2s var(--auth-ease);
}

.auth-foot-links a:hover {
    color: var(--auth-ink);
    text-decoration-color: currentColor;
}

/* 03. Coluna da marca (telas grandes) ===================================== */
.auth-aside {
    display: none;
}

.auth-aside-inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
    height: 100%;
    padding: clamp(32px, 3.4vw, 52px);
}

.auth-brand {
    display: inline-flex;
    align-self: flex-start;
    line-height: 0;
}

.auth-brand img {
    width: auto;
    height: 40px; /* mesmo tamanho da logo na landing */
}

.auth-aside-body {
    max-width: 540px;
    margin-block: auto;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .95rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .3px;
    color: #fff;
}

.auth-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--auth-accent);
    box-shadow: 0 0 0 4px rgba(255, 0, 118, .25);
}

.auth-aside-title {
    margin: 22px 0 0;
    font-size: clamp(30px, 2.5vw, 42px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
    color: #fff;
}

.auth-aside-title span {
    display: block;
}

.auth-text-accent {
    background: linear-gradient(90deg, #ff5fae, #8fb6ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-aside-lead {
    margin: 18px 0 0;
    max-width: 470px;
    font-size: 16px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .8);
}

.auth-points {
    display: grid;
    gap: 10px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.auth-points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .9);
}

.auth-points i {
    display: grid;
    place-items: center;
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    background: rgba(10, 179, 156, .22);
    color: #5fe3cf;
    font-size: 14px;
}

.auth-aside-foot {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, .65);
}

.auth-aside-foot strong {
    color: rgba(255, 255, 255, .92);
    font-weight: 600;
}

/* Ilustração: vídeo longo analisado pela IA virando cortes verticais */
.auth-demo {
    max-width: 400px;
    margin-top: 28px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    background: rgba(255, 255, 255, .06);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}

.auth-demo-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-demo-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--auth-primary-2), var(--auth-accent));
    color: #fff;
    font-size: 18px;
}

.auth-demo-file {
    flex: 1;
    min-width: 0;
}

.auth-demo-file strong {
    display: block;
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-demo-file small {
    display: block;
    font-size: 12px;
    line-height: 1.3;
    color: rgba(255, 255, 255, .65);
}

.auth-demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255, 0, 118, .18);
    font-size: 12px;
    font-weight: 600;
    color: #ff8cc4;
}

.auth-demo-track {
    position: relative;
    height: 10px;
    margin: 14px 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
}

.auth-demo-seg {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--auth-primary-2), var(--auth-accent));
    box-shadow: 0 0 12px rgba(255, 0, 118, .45);
}

.auth-demo-clips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.auth-clip {
    position: relative;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    max-height: 150px;
    border-radius: 12px;
    background: linear-gradient(160deg, var(--auth-navy-2), var(--auth-navy-3));
}

.auth-clip img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-clip::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 12, 28, .75) 0%, rgba(8, 12, 28, .1) 50%, rgba(8, 12, 28, 0) 70%);
}

.auth-clip-score {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--auth-success);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.auth-clip-caption {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 1;
    font-size: 11.5px;
    font-weight: 600;
    color: #fff;
}

/* 04. Formulário ========================================================== */
.auth-icon-tile {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: rgba(53, 119, 241, .1);
    color: var(--auth-primary-ink);
    font-size: 26px;
}

.auth-head h1 {
    margin: 0;
    font-size: clamp(26px, 3.2vw, 32px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.03em;
    color: var(--auth-ink);
}

.auth-head p {
    margin: 10px 0 0;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--auth-muted);
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.auth-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-ink);
}

.auth-input {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    font-size: 18px;
    line-height: 1;
    color: var(--auth-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-input input {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 12px 14px 12px 44px;
    border: 1px solid var(--auth-field-border);
    border-radius: var(--auth-radius);
    background: var(--auth-field-bg);
    font-size: 16px;
    line-height: 1.4;
    color: var(--auth-ink);
    transition: border-color .2s var(--auth-ease), box-shadow .2s var(--auth-ease);
    -webkit-appearance: none;
    appearance: none;
}

.auth-input .auth-input-senha {
    padding-right: 52px;
}

/* O Edge desenha o próprio olho de "revelar senha"; fica só o botão da tela. */
.auth-input input::-ms-reveal {
    display: none;
}

.auth-input input::placeholder {
    color: #8790a0;
}

.auth-input input:hover {
    border-color: #6b7487;
}

.auth-input input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: var(--auth-primary-2);
    box-shadow: 0 0 0 4px rgba(53, 119, 241, .18);
}

.auth-input:focus-within .auth-input-icon {
    color: var(--auth-primary-ink);
}

.auth-toggle {
    position: absolute;
    top: 50%;
    right: 3px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-size: 19px;
    color: var(--auth-muted);
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .2s var(--auth-ease), background-color .2s var(--auth-ease);
}

.auth-toggle:hover {
    color: var(--auth-ink);
    background: #f2f4f8;
}

.auth-hint:empty {
    display: none;
}

.auth-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #a15c00;
}

.auth-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 16px;
    margin-top: -4px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    font-size: 14.5px;
    color: var(--auth-text);
    cursor: pointer;
}

.auth-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: none;
    accent-color: var(--auth-primary-2);
    cursor: pointer;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--auth-primary-ink);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: color .2s var(--auth-ease), text-decoration-color .2s var(--auth-ease);
}

.auth-link:hover,
.auth-link:focus {
    color: var(--auth-primary-ink-2);
    text-decoration-color: currentColor;
}

.auth-link i {
    font-size: 16px;
}

.auth-link-voltar {
    margin-bottom: 28px;
}

.auth-link-voltar i {
    transition: transform .2s var(--auth-ease);
}

.auth-link-voltar:hover i {
    transform: translateX(-3px);
}

.auth-link-centro {
    justify-self: center;
}

.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #d6e3fb;
    border-radius: var(--auth-radius);
    background: #f3f7fe;
    font-size: 14px;
    line-height: 1.5;
    color: var(--auth-text);
}

.auth-note i {
    margin-top: 1px;
    font-size: 18px;
    line-height: 1;
    color: var(--auth-primary-ink);
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    padding: 12px 20px;
    border: 0;
    border-radius: var(--auth-radius);
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-ink));
    box-shadow: 0 10px 24px -10px rgba(53, 119, 241, .65);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: transform .2s var(--auth-ease), box-shadow .2s var(--auth-ease), filter .2s var(--auth-ease);
}

.auth-btn:hover {
    filter: brightness(1.07);
    box-shadow: 0 14px 28px -12px rgba(53, 119, 241, .75);
    transform: translateY(-1px);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn i {
    font-size: 18px;
    transition: transform .2s var(--auth-ease);
}

.auth-btn:hover i {
    transform: translateX(3px);
}

/* 05. Responsivo e acessibilidade ========================================= */
.auth-page a:focus-visible,
.auth-page button:focus-visible,
.auth-page input[type="checkbox"]:focus-visible {
    outline: 3px solid rgba(53, 119, 241, .55);
    outline-offset: 2px;
}

.auth-top a:focus-visible {
    outline-color: #fff;
}

@media (min-width: 1024px) {
    .auth {
        grid-template-columns: minmax(440px, 46%) minmax(0, 1fr);
    }

    /* Mesmo fundo do hero da landing: gradiente azul + padrão + brilhos rosa/azul. */
    .auth-aside {
        position: relative;
        isolation: isolate;
        display: block;
        overflow: hidden;
        background:
            linear-gradient(135deg, rgba(64, 81, 137, .97) 0%, rgba(48, 63, 110, .98) 55%, rgba(37, 49, 88, 1) 100%),
            url('../assets/images/cover-pattern.png');
        background-size: cover, 420px;
        color: rgba(255, 255, 255, .8);
    }

    .auth-aside::before {
        content: "";
        position: absolute;
        top: -160px;
        right: -140px;
        z-index: -1;
        width: 460px;
        height: 460px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 0, 118, .32), transparent 68%);
        filter: blur(10px);
    }

    .auth-aside::after {
        content: "";
        position: absolute;
        bottom: -180px;
        left: -120px;
        z-index: -1;
        width: 440px;
        height: 440px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(53, 119, 241, .35), transparent 70%);
    }

    .auth-aside a:focus-visible {
        outline-color: #fff;
    }

    /* Com a coluna da marca visível, o topo fica claro e mostra só o "Voltar ao site". */
    .auth-top {
        justify-content: flex-end;
        min-height: 0;
        padding: 24px clamp(24px, 4vw, 48px) 0;
        background: transparent;
    }

    .auth-top-brand {
        display: none;
    }

    .auth-back {
        color: var(--auth-muted);
    }

    .auth-back:hover,
    .auth-back:focus {
        color: var(--auth-ink);
    }

    .auth-top a:focus-visible {
        outline-color: rgba(53, 119, 241, .55);
    }

    .auth-foot {
        border-top: 0;
    }
}

/* Telas baixas: a ilustração sai para o texto da marca caber sem rolar. */
@media (min-width: 1024px) and (max-height: 920px) {
    .auth-demo {
        display: none;
    }
}

@media (max-width: 479px) {
    .auth-top-brand img {
        height: 32px;
    }

    .auth-back {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        transition: none !important;
    }
}

@media (forced-colors: active) {
    .auth-btn,
    .auth-toggle,
    .auth-note {
        border: 1px solid ButtonText;
    }

    .auth-text-accent {
        color: CanvasText;
        background: none;
    }
}
