/*
 * Orçanet — acesso (login, ativação e painel master)
 * A marca 3D (azul aço + laranja) sobre um painel noturno, com o mesmo brilho azul/laranja das
 * peças da marca atrás do logotipo. O formulário fica em papel claro; o laranja aparece só onde há
 * interação (foco, botão, links), para o olho ir direto ao que precisa ser feito.
 */

@font-face {
    font-family: 'Archivo Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    src: url('../fonts/archivo-latin-wdth-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Archivo Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    src: url('../fonts/archivo-latin-ext-wdth-normal.woff2') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --noite: #0c1730;    /* fundo do painel da marca */
    --noite-2: #142650;
    --aco: #5a7fc0;      /* azul do "orça" */
    --brasa: #ff5a1a;    /* laranja do "net" */
    --brasa-forte: #d9450c; /* laranja com contraste sobre branco (linhas de foco) */
    --papel: #ffffff;
    --tinta: #101828;
    --cinza: #5d6679;
    --linha: #d5dae4;
    --campo: #f6f7fa;
    --font: 'Archivo Variable', 'Archivo', 'Helvetica Neue', Arial, sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body.auth {
    margin: 0;
    min-height: 100vh;
    background: var(--papel);
    color: var(--tinta);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    font-stretch: 100%;
    -webkit-font-smoothing: antialiased;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(380px, 5fr);
}

/* ---------- Marca (lado esquerdo) ---------- */

.auth-brand {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    padding: 44px 56px 40px;
    overflow: hidden;
    background: linear-gradient(160deg, var(--noite-2) 0%, var(--noite) 55%, #08101f 100%);
    color: #dbe3f5;
}

/* Brilho azul e laranja atrás do logotipo, como nas peças 3D da marca. */
.auth-brand::before,
.auth-brand::after {
    content: '';
    position: absolute;
    z-index: -1;
    top: 50%;
    width: 46vw;
    max-width: 680px;
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(20px);
    pointer-events: none;
    animation: brilho 1.4s ease-out .1s both;
}

.auth-brand::before {
    left: -6%;
    transform: translateY(-58%);
    background: radial-gradient(closest-side, rgba(110, 150, 220, .46), rgba(110, 150, 220, 0));
}

.auth-brand::after {
    right: 2%;
    transform: translateY(-44%);
    background: radial-gradient(closest-side, rgba(255, 106, 40, .40), rgba(255, 106, 40, 0));
}

.auth-brand__top {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #a9b6d3;
}

.auth-brand__top img {
    width: 28px;
    height: 28px;
    flex: none;
}

.auth-brand__logo {
    margin: 0;
    line-height: 0;
}

.auth-brand__logo img {
    display: block;
    width: min(100%, 640px);
    height: auto;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35));
    animation: entrada .8s cubic-bezier(.2, .8, .2, 1) .15s both;
}

@keyframes entrada {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

@keyframes brilho {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.auth-brand__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px 40px;
}

.auth-brand__lead {
    max-width: 34ch;
    margin: 0;
    font-size: 19px;
    line-height: 1.45;
    color: #e6ecf8;
}

.auth-brand__maker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 13px;
    color: #a9b6d3;
}

.auth-brand__bar {
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--aco) 0 50%, var(--brasa) 50% 100%);
}

/* ---------- Painel do formulario (lado direito) ---------- */

.auth-panel {
    display: flex;
    flex-direction: column;
    background: var(--papel);
    padding: 44px 56px 40px;
}

.auth-panel__switch {
    align-self: flex-end;
    margin: 0;
    font-size: 15px;
    color: var(--cinza);
}

.auth-panel__switch a {
    color: var(--tinta);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid var(--brasa);
    padding-bottom: 1px;
}

.auth-panel__switch a:hover {
    color: var(--brasa-forte);
}

.auth-panel__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    margin: 48px auto;
}

.auth-title {
    margin: 0;
    font-size: 36px;
    line-height: 1.1;
    font-weight: 700;
    font-stretch: 112%;
    letter-spacing: -0.015em;
}

.auth-title__step {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 500;
    font-stretch: 100%;
    letter-spacing: 0;
    color: var(--cinza);
}

.auth-intro {
    margin: 12px 0 0;
    color: var(--cinza);
    font-size: 16px;
    max-width: 38ch;
}

.auth-form {
    margin-top: 36px;
}

.field {
    position: relative;
    margin-bottom: 26px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tinta);
}

.field input {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--linha);
    border-radius: 10px;
    background: var(--campo);
    color: var(--tinta);
    font: inherit;
    font-size: 17px;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.field input:hover {
    border-color: #b5bdcc;
}

.field input:focus {
    outline: none;
    background: #fff;
    border-color: var(--brasa-forte);
    box-shadow: 0 0 0 3px rgba(255, 90, 26, .18);
}

.field input[type="password"],
.field input[data-password-field] {
    padding-right: 84px;
}

/* Preenchimento automático do navegador: mantém o fundo e a cor do campo
   (sem isso o Chrome pinta o campo de azul e o texto parece colado na borda). */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover {
    -webkit-text-fill-color: var(--tinta);
    caret-color: var(--tinta);
    box-shadow: inset 0 0 0 100px var(--campo);
    transition: background-color 600000s 0s, color 600000s 0s;
}

.field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--tinta);
    box-shadow: inset 0 0 0 100px #fff, 0 0 0 3px rgba(255, 90, 26, .18);
}

.field input:autofill {
    background: var(--campo);
}

.field input[aria-invalid="true"] {
    border-color: #d92d20;
}

.field__hint {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--cinza);
}

.field__toggle {
    position: absolute;
    right: 6px;
    bottom: 8px;
    padding: 6px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--cinza);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.field__toggle:hover {
    color: var(--tinta);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 0 22px;
    border: 2px solid var(--noite);
    border-radius: 10px;
    background: var(--noite);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: inset 0 -3px 0 var(--brasa);
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.button:hover {
    background: var(--noite-2);
    border-color: var(--noite-2);
    box-shadow: inset 0 -5px 0 var(--brasa);
}

.button:focus-visible,
.auth-panel__switch a:focus-visible,
.link-button:focus-visible,
.field__toggle:focus-visible {
    outline: 3px solid var(--brasa);
    outline-offset: 3px;
}

.button--ghost {
    background: transparent;
    color: var(--noite);
    box-shadow: none;
}

.button--ghost:hover {
    background: var(--noite);
    color: #fff;
    box-shadow: none;
}

.button[disabled] {
    opacity: .55;
    cursor: progress;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 34px;
}

.link-button {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    color: var(--cinza);
    font: inherit;
    font-size: 15px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.link-button:hover {
    color: var(--tinta);
}

.notice {
    margin-top: 28px;
    padding: 14px 16px 14px 18px;
    border: 1px solid var(--linha);
    border-left: 4px solid var(--aco);
    border-radius: 10px;
    background: var(--campo);
    font-size: 15px;
    line-height: 1.45;
}

.notice--error { border-left-color: #d92d20; background: #fef3f2; border-color: #fecdca; }
.notice--success { border-left-color: #12805c; background: #ecfdf3; border-color: #abefc6; }

.notice p {
    margin: 0;
}

.notice ul {
    margin: 0;
    padding-left: 18px;
}

.notice__title {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

.notice .button {
    margin-top: 14px;
    min-height: 44px;
    width: auto;
}

.auth-panel__foot {
    margin: 0;
    font-size: 13px;
    color: var(--cinza);
}

.auth-panel__foot a {
    color: inherit;
}

/* Ativacao em duas etapas (sem JS, as duas aparecem juntas) */
.js .step[hidden] {
    display: none;
}

.step {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.step + .step {
    margin-top: 8px;
}

.step legend {
    padding: 0;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 600;
}

.js .step legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* ---------- Responsivo ---------- */

@media (max-width: 960px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        padding: 22px 24px 28px;
        gap: 22px;
    }

    .auth-brand::before,
    .auth-brand::after {
        width: 80vw;
    }

    .auth-brand__logo img {
        width: min(100%, 420px);
    }

    .auth-brand__lead {
        font-size: 16px;
    }

    .auth-panel {
        padding: 24px 24px 32px;
    }

    .auth-panel__switch {
        align-self: flex-start;
    }

    .auth-panel__body {
        margin: 24px 0 32px;
        max-width: none;
    }
}

@media (max-width: 600px) {
    .auth-brand__bottom {
        display: none;
    }
}

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

    .auth-title {
        font-size: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-brand__logo img,
    .auth-brand::before,
    .auth-brand::after {
        animation: none;
    }

    .field input,
    .button {
        transition: none;
    }
}
