:root {
    font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
    color: #24262c;
    background: #fff;
    font-synthesis: none;
    --red: #b5121b;
    --red-hover: #960c15;
    --muted: #666b74;
    --line: #e9e9ed;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, p, h1 { margin: 0; }
button, input { font: inherit; }
a { color: var(--red); }
a:hover { color: var(--red-hover); }
:focus-visible { outline: 3px solid #df6670; outline-offset: 4px; }
h1:focus { outline: none; }

svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 100vh;
    min-height: 100svh;
    padding: 14px;
}

.brand-panel {
    --brand-gutter: 44px;
    --orbit-width: 310px;
    --bull-width: 240px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 38px var(--brand-gutter);
    border-radius: 18px;
    color: #fff;
    background: radial-gradient(ellipse at 80% 64%, #d72b35 0, transparent 55%),
        linear-gradient(145deg, #a10914, #bd1722 58%, #9e0a13);
}

.brand-signature { display: flex; align-items: center; gap: 12px; }
.brand-signature img { width: 49px; height: 47px; object-fit: contain; }
.brand-name { font-size: 1.6rem; font-weight: 800; line-height: 1.2; letter-spacing: -1.1px; }

.brand-caption {
    margin-top: 4px;
    color: #ffdbde;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.brand-story { position: relative; z-index: 1; margin-top: 69px; }

.eyebrow {
    color: var(--red);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.brand-story .eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #ffd6d9;
    letter-spacing: .16em;
}

.brand-story .eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; }

.brand-headline {
    margin-top: 22px;
    font-size: clamp(2.1rem, 3.25vw, 3.25rem);
    font-weight: 650;
    line-height: 1.18;
    letter-spacing: -1.7px;
}

.brand-headline span { color: #ffd2d5; }
.brand-description { margin-top: 20px; color: #ffe0e2; line-height: 1.8; }

.bull-orbit {
    position: relative;
    display: grid;
    place-items: center;
    width: var(--orbit-width);
    height: 280px;
    margin: auto auto 0;
}

.brand-bull {
    position: absolute;
    left: 50%;
    /* The PNG has transparent padding below the base. */
    bottom: calc(var(--bull-width) * -.038);
    width: var(--bull-width);
    height: auto;
    transform: translateX(-50%);
    filter: drop-shadow(0 24px 35px #56000855);
}

.orbit-ring { position: absolute; width: 300px; aspect-ratio: 1; border: 1px solid #ffffff15; border-radius: 50%; }
.orbit-ring:nth-child(2) { width: 420px; }
.orbit-ring:nth-child(3) { width: 550px; }

.orbit-caption {
    position: absolute;
    inset-inline: 0;
    top: 0;
    color: #ffdbde;
    font-size: .625rem;
    letter-spacing: .22em;
    text-align: center;
    text-transform: uppercase;
}

.brand-footer, .access-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 12px;
    font-size: .75rem;
}

.brand-footer { position: relative; margin-top: 25px; color: #ffdbde; }
.brand-heart { margin-left: 6px; }

.access { display: flex; flex-direction: column; min-width: 0; padding: 25px 38px 20px; }

.access-topline span {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.access-content { width: min(100%, 380px); margin: auto; padding: 35px 0; }

.welcome-icon {
    display: grid;
    place-items: center;
    width: 49px;
    height: 49px;
    margin-bottom: 25px;
    border: 1px solid #fce3e4;
    border-radius: 14px;
    background: #fff0f0;
    color: var(--red);
}

.welcome-icon svg { width: 24px; height: 24px; }

h1 {
    margin-top: 12px;
    font-size: 2.7rem;
    font-weight: 650;
    line-height: 1.1;
    letter-spacing: -1.5px;
}

.intro { margin: 19px 0 28px; color: var(--muted); line-height: 1.6; }
.field + .field { margin-top: 20px; }
.field label { display: block; margin-bottom: 10px; font-size: .875rem; font-weight: 600; }
.label-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.label-row label { margin-bottom: 0; }
.input-icon { position: relative; display: flex; align-items: center; }
.field-icon { position: absolute; left: 16px; color: #747982; pointer-events: none; }

.field input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px 12px 46px;
    border: 1px solid #dfe1e5;
    border-radius: 10px;
    background: #fff;
    color: inherit;
}

.field input::placeholder { color: var(--muted); opacity: 1; }
.field input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px #b5121b16; }
.password-field input { padding-right: 50px; }

.password-toggle {
    position: absolute;
    right: 5px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.password-toggle:hover, .password-toggle[aria-pressed="true"] { background: #f5f5f7; color: var(--red); }

.forgot-link, .back-link, .first-access a {
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
}

.forgot-link:hover, .back-link:hover, .first-access a:hover { text-decoration: underline; }
.back-link { display: inline-block; margin-bottom: 12px; }
form + .back-link, .simulation + .back-link { margin: 16px 0 0; }

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 49px;
    padding: 11px 18px;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.button-primary { background: var(--red); color: #fff; box-shadow: 0 3px 7px #b5121b12; }
.button-primary:hover { background: var(--red-hover); color: #fff; }
form .button { margin-top: 26px; }
.login-submit { justify-content: space-between; gap: 12px; }
.simulation p { margin-bottom: 12px; color: var(--muted); line-height: 1.5; }

.first-access {
    margin-top: 23px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .875rem;
}

.first-access a { margin-inline-start: 4px; }

.first-access.first-access-warning {
    padding: 8px 12px;
    border: 1px solid #ffecb5;
    border-radius: 8px;
    background: #fff3cd;
    color: #664d03;
}

.first-access-warning a {
    margin-inline-start: 0;
    color: inherit;
    text-decoration: underline;
}

.recuperacao-destino {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f6f7f8;
    color: var(--muted);
    font-size: .875rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.recuperacao-destino strong { color: var(--red-hover); }
button.button:disabled { opacity: .65; cursor: wait; }

.recuperacao-modal {
    width: min(400px, calc(100% - 32px));
    margin: auto;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    color: inherit;
    box-shadow: 0 20px 60px #16181d35;
}

.recuperacao-modal::backdrop { background: #16181d80; }
.recuperacao-modal h2 { margin: 0 0 8px; font-size: 1.25rem; }
.recuperacao-modal p { margin: 0; color: var(--muted); line-height: 1.5; }
.recuperacao-modal progress {
    display: block;
    width: 100%;
    height: 12px;
    margin-top: 20px;
    accent-color: var(--red);
}

.notice {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #f4c6c7;
    border-radius: 8px;
    background: #fff0f0;
    color: var(--red-hover);
    font-size: .875rem;
    line-height: 1.45;
}

.access-help {
    display: grid;
    gap: 7px;
    margin-top: 14px;
    color: var(--muted);
    font-size: .8125rem;
    line-height: 1.55;
}

.access-help a { font-weight: 650; text-underline-offset: .2em; }
.access-help summary { width: fit-content; cursor: pointer; }
.access-help details p { margin-top: .5rem; }
.access-footer { color: var(--muted); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (min-width: 1500px) {
    .brand-panel { --brand-gutter: 64px; --orbit-width: 420px; --bull-width: 300px; padding-block: 48px; }
    .brand-story { margin-top: 90px; }
    .bull-orbit { height: 350px; }
    .access { padding: 35px 50px 25px; }
    .access-content { width: min(100%, 400px); }
}

@media (max-width: 1200px) {
    .brand-footer { flex-direction: column; gap: 5px; }
}

@media (max-width: 1000px) {
    .brand-panel { --brand-gutter: 28px; --orbit-width: 260px; padding-block: 28px; }
    .brand-story { margin-top: 65px; }
    .brand-headline { font-size: 2.25rem; }
    .bull-orbit { height: 260px; }
    .access { padding: 20px 28px; }
}

@media (min-width: 761px) and (max-height: 850px) {
    .brand-panel { --bull-width: clamp(120px, 27svh, 230px); padding-block: clamp(16px, 3.4svh, 29px); }
    .brand-story { margin-top: clamp(20px, 5svh, 44px); }
    .brand-headline { margin-top: 14px; font-size: clamp(1.875rem, min(4.8svh, 4.4vw), 2.65rem); }
    .brand-description { margin-top: 12px; line-height: 1.5; }
    .bull-orbit { height: clamp(140px, 30svh, 250px); }
    .brand-footer { margin-top: 14px; }

    .access { padding-block: 16px 14px; }
    .access-content { padding-block: 16px; }
    .welcome-icon { width: 40px; height: 40px; margin-bottom: 14px; }
    .access h1 { margin-top: 8px; font-size: clamp(1.875rem, 5svh, 2.5rem); }
}

@media (min-width: 761px) and (max-height: 680px) {
    .login-layout { padding-block: 10px; }
    .access-topline, .welcome-icon { display: none; }
    .access-content { padding-block: 8px; }
    .brand-story { margin-top: 20px; }
    .bull-orbit { height: clamp(120px, 26svh, 175px); }
}

@media (max-width: 760px) {
    .login-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; padding: 0; }
    .brand-panel { padding: calc(22px + env(safe-area-inset-top)) 24px 8px; border-radius: 0; background: #fff; color: inherit; }
    .brand-signature img { width: 43px; height: 43px; }
    .brand-caption { color: var(--muted); }
    .brand-story, .bull-orbit, .brand-bull, .brand-footer, .access-topline, .welcome-icon { display: none; }
    .access { padding: 12px 24px calc(20px + env(safe-area-inset-bottom)); }
    .access-content { width: min(100%, 460px); margin: 0 auto auto; padding: 24px 0; }
    h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -.8px; }
    .intro { font-size: .9375rem; }
    .field label { font-size: .9375rem; }
    .field input { min-height: 52px; }
    .button { min-height: 54px; font-size: 1rem; }
}

@media (max-width: 760px) and (max-height: 740px) {
    .brand-panel { padding-top: calc(14px + env(safe-area-inset-top)); }
    .access { padding-top: 8px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
    .access-content { padding-block: 14px; }
}

@media (min-width: 761px) and (max-height: 850px), (max-width: 760px) and (max-height: 740px) {
    .intro { margin-block: 12px 18px; }
    .field + .field { margin-top: 14px; }
    form .button { margin-top: 18px; }
    .first-access { margin-top: 16px; padding-top: 12px; }
    .access-help { margin-top: 10px; }
}

@media (max-width: 760px) and (max-height: 680px) {
    .brand-panel { padding-top: calc(8px + env(safe-area-inset-top)); }
    .access { padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
    .access-content { padding-block: 8px; }
    #login-title br { display: none; }
    .intro { margin-block: 8px 14px; }
}

@media (max-width: 760px) and (max-height: 620px) {
    [data-view="login"] .eyebrow, .access-footer span:last-child { display: none; }
    .brand-signature img { width: 36px; height: 36px; }
    .access { padding-top: 4px; }
    #login-title { font-size: 1.65rem; line-height: 1.15; }
    .field label, .label-row { margin-bottom: 6px; }
    .label-row label { margin-bottom: 0; }
    form .button { margin-top: 14px; }
    .first-access { margin-top: 12px; padding-top: 8px; }
    .field input, .button { min-height: 46px; }
}
