:root {
    --login-navy: #052f3f;
    --login-navy-deep: #032531;
    --login-blue: #007dc1;
    --login-blue-dark: #006e9f;
    --login-cyan: #80d7f2;
    --login-orange: #ff9600;
    --login-ink: #073647;
    --login-text: #4f6874;
    --login-muted: #4f6874;
    --login-line: #d7e2e7;
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--login-ink);
    background: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }

body.painel-login-page {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    color: var(--login-ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button, input { font: inherit; }
a { color: var(--login-blue-dark); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid rgb(7 134 193 / 24%); outline-offset: 3px; }

.painel-login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(400px, 46%) minmax(0, 54%);
}

.login-brand-panel {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--login-navy-deep);
    box-shadow: inset -1px 0 rgb(3 37 49 / 18%);
}

@media (min-width: 761px) {
    .login-brand-panel {
        background-image:
            linear-gradient(145deg, rgb(3 37 49 / 8%), rgb(3 37 49 / 20%)),
            url("../imagens/login-access-notebook-ponteiro-v1.png");
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
    }
}

.login-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 15px; color: var(--login-blue-dark); font-size: 11px; font-weight: 800; letter-spacing: .16em; line-height: 1.4; text-transform: uppercase; }
.login-eyebrow > span { flex: 0 0 auto; width: 28px; height: 3px; background: var(--login-orange); }

.login-access-panel {
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 0 clamp(36px, 5.5vw, 86px);
    background: linear-gradient(90deg, rgb(5 61 80 / 3%) 1px, transparent 1px), #fff;
    background-size: 64px 100%;
}

.login-access-header { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--login-line); }
.login-logo-link { display: inline-flex; align-items: center; }
.login-logo { display: block; width: min(248px, 31vw); height: auto; }
.back-to-site { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--login-ink); font-size: 12px; font-weight: 750; text-decoration: none; }
.back-to-site span { color: var(--login-orange); font-size: 18px; transition: transform .18s ease; }
.back-to-site:hover { color: var(--login-blue-dark); text-decoration: none; }
.back-to-site:hover span { transform: translateX(3px); }

.login-form-section { align-self: center; width: min(100%, 440px); margin: 24px auto; }
.login-heading { margin-bottom: 30px; }
.login-heading h1 { margin: 0; color: var(--login-ink); font-size: clamp(32px, 3.1vw, 43px); font-weight: 800; letter-spacing: -.04em; line-height: 1.08; }
.login-heading > p:last-child { margin: 14px 0 0; color: var(--login-text); font-size: 14px; line-height: 1.6; }

.painel-login-form { width: 100%; }
.login-field { margin-bottom: 20px; }
.login-field label { display: block; margin: 0 0 8px; color: var(--login-ink); font-size: 12px; font-weight: 750; }
.login-label-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.login-label-row a { min-height: 32px; display: inline-flex; align-items: center; margin: -7px 0 1px; color: var(--login-blue-dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.login-label-row a:hover { text-decoration: underline; }

.login-field input { width: 100%; min-height: 54px; padding: 13px 15px; color: #102f3b; background: #fbfcfd; border: 1px solid #718792; border-radius: 7px; box-shadow: none; outline: 0; font-size: 15px; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.login-field input::placeholder { color: #8799a2; }
.login-field input:hover { border-color: #617d89; }
.login-field input:focus { border-color: var(--login-blue); background: #fff; box-shadow: 0 0 0 4px rgb(7 134 193 / 11%); }
.login-field input[aria-invalid="true"] { border-color: #c04a4a; }
.password-input-wrap { position: relative; }
.password-input-wrap input { padding-right: 84px; }

.toggle-password { position: absolute; top: 5px; right: 5px; min-width: 70px; min-height: 44px; padding: 8px 10px; color: var(--login-blue-dark); background: transparent; border: 0; border-radius: 5px; font-size: 11px; font-weight: 800; cursor: pointer; }
.toggle-password:hover { background: #edf7fa; }

.login-submit { width: 100%; min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 18px 13px 20px; color: #ffffff; background: var(--login-blue); border: 1px solid var(--login-blue); border-radius: 7px; box-shadow: 0 12px 28px rgb(0 125 193 / 20%); font-size: 14px; font-weight: 800; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.login-submit:hover:not(:disabled) { background: #006da9; border-color: #006da9; box-shadow: 0 15px 32px rgb(0 125 193 / 27%); transform: translateY(-1px); }
.login-submit:disabled { opacity: .68; cursor: wait; box-shadow: none; }
.submit-arrow { font-size: 20px; line-height: 1; }

.login-alert { margin: 0 0 20px; padding: 12px 14px; color: #7f2626; background: #fff6f6; border-left: 3px solid #c83f3f; font-size: 13px; line-height: 1.5; }
.login-security-note { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 0; color: var(--login-muted); font-size: 12px; line-height: 1.5; }
.security-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 4px; background: #31aa69; border-radius: 50%; box-shadow: 0 0 0 4px rgb(49 170 105 / 10%); }

.login-access-footer { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--login-muted); border-top: 1px solid var(--login-line); font-size: 11px; }
.login-access-footer a { color: var(--login-blue-dark); font-weight: 700; }

.painel-recovery-modal .modal-dialog { width: auto; max-width: 470px; margin-inline: auto; }
.painel-recovery-modal .modal-content { overflow: hidden; border: 0; border-radius: 10px; box-shadow: 0 28px 85px rgb(0 30 43 / 30%); }
.painel-recovery-modal .modal-header { align-items: flex-start; padding: 25px 27px 20px; border-bottom: 1px solid var(--login-line); }
.painel-recovery-modal .login-eyebrow { margin-bottom: 8px; }
.painel-recovery-modal .modal-title { color: var(--login-ink); font-size: 25px; font-weight: 800; letter-spacing: -.025em; }
.modal-close { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; margin: -7px -8px 0 15px; padding: 0; color: #58717c; background: #f1f5f6; border: 0; border-radius: 50%; font-size: 25px; line-height: 1; cursor: pointer; }
.painel-recovery-modal .modal-body { padding: 23px 27px 8px; }
.painel-recovery-modal .modal-body > p { margin: 0 0 22px; color: var(--login-text); font-size: 13px; line-height: 1.6; }
.painel-recovery-modal .login-field { margin-bottom: 16px; }
.painel-recovery-modal .modal-footer { justify-content: flex-start; padding: 0 27px 24px; border: 0; }
.recovery-submit { justify-content: center; }
.recovery-cancel { min-height: 44px; padding: 8px 0; color: var(--login-blue-dark); background: transparent; border: 0; font-size: 12px; font-weight: 750; cursor: pointer; }
.painel-recovery-modal .alert { margin: 0 0 16px; border: 0; border-radius: 6px; font-size: 13px; line-height: 1.5; }
.recovery-loading { display: inline-flex; align-items: center; gap: 9px; margin: 12px 0 4px; color: var(--login-muted); font-size: 12px; }
.recovery-loading::before { content: ""; width: 17px; height: 17px; border: 2px solid #cbdbe1; border-top-color: var(--login-blue); border-radius: 50%; animation: recovery-spin .7s linear infinite; }

@media (max-width: 980px) {
    .painel-login-shell { grid-template-columns: minmax(340px, 42%) minmax(0, 58%); }
    .login-brand-panel { background-position: 57% center; }
    .login-access-panel { padding-inline: clamp(28px, 5vw, 54px); }
}

@media (max-width: 760px) {
    .painel-login-shell { display: block; }
    .login-brand-panel { display: none; }
    .login-access-panel { min-height: 100vh; min-height: 100dvh; padding-inline: 24px; }
    .login-access-header { min-height: 72px; }
    .login-logo { width: min(210px, 51vw); }
    .back-to-site { font-size: 11px; }
    .login-form-section { margin-block: 30px; }
    .login-heading { margin-bottom: 24px; }
    .login-heading h1 { font-size: 34px; }
    .login-access-footer { padding-bottom: max(0px, env(safe-area-inset-bottom)); }
}

@media (max-width: 420px) {
    .login-access-panel { min-height: 100vh; min-height: 100dvh; padding-inline: 20px; }
    .login-access-header { min-height: 66px; }
    .login-logo { width: min(184px, 52vw); }
    .back-to-site { gap: 5px; font-size: 10px; }
    .login-form-section { margin-block: 25px; }
    .login-heading h1 { font-size: 31px; }
    .login-heading > p:last-child { font-size: 13px; }
    .login-field { margin-bottom: 17px; }
    .login-field input { min-height: 52px; }
    .login-submit { min-height: 53px; }
    .login-security-note { margin-top: 15px; }
    .login-access-footer { min-height: 58px; }
    .painel-recovery-modal .modal-dialog { margin: 16px; }
    .painel-recovery-modal .modal-header { padding: 22px 21px 18px; }
    .painel-recovery-modal .modal-body { padding: 20px 21px 6px; }
    .painel-recovery-modal .modal-footer { padding: 0 21px 20px; }
}

@media (max-height: 690px) and (min-width: 761px) {
    .login-access-header { min-height: 78px; }
    .login-logo { width: 220px; }
    .login-form-section { margin-block: 18px; }
    .login-heading { margin-bottom: 21px; }
    .login-heading h1 { font-size: 35px; }
    .login-heading > p:last-child { margin-top: 9px; }
    .login-field { margin-bottom: 14px; }
    .login-field input { min-height: 50px; }
    .login-submit { min-height: 51px; }
    .login-security-note { margin-top: 12px; }
    .login-access-footer { min-height: 52px; }
}

@media (prefers-reduced-motion: no-preference) {
    .login-form-section { animation: login-rise .45s .05s both; }
}

@keyframes login-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes recovery-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
