:root {
    color-scheme: light;
    --page-text: #111827;
    --muted: #475569;
    --panel: rgba(255, 255, 255, 0.18);
    --brand-panel: rgba(255, 255, 255, 0.28);
    --field: #ffffff;
    --field-border: #d8dee8;
    --field-shadow: rgba(15, 23, 42, 0.06);
    --blue: #075ff7;
    --blue-strong: #0055f5;
    --icon: #475569;
    --line: rgba(148, 163, 184, 0.35);
    --footer: rgba(255, 255, 255, 0.92);
    --card-shadow: rgba(15, 23, 42, 0.24);
    --wallpaper-background:
        radial-gradient(circle at 9% 26%, rgba(255, 112, 50, 0.95) 0 11%, transparent 27%),
        radial-gradient(circle at 14% 1%, #ff0058 0 22%, transparent 43%),
        linear-gradient(151deg, transparent 0 38%, rgba(2, 117, 229, 0.98) 38.2% 53%, transparent 53.4%),
        linear-gradient(164deg, transparent 0 57%, rgba(232, 241, 255, 0.98) 57.2% 69%, transparent 69.3%),
        linear-gradient(166deg, transparent 0 63%, #ffb321 63.2% 75%, transparent 75.3%),
        linear-gradient(151deg, #ec0a60 0 36%, #0b83dd 36.4% 62%, #ff4a24 62.4% 78%, #f00654 78.5% 100%);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    position: relative;
    isolation: isolate;
    background: #eef2ff;
}

html::before {
    position: fixed;
    inset: -24px;
    content: "";
    z-index: -1;
    background: var(--wallpaper-background);
    filter: blur(30px) saturate(1.08);
    transform: scale(1.08);
}

:root[data-wallpaper="ocean"] {
    --wallpaper-background:
        radial-gradient(circle at 18% 24%, rgba(71, 210, 255, 0.85) 0 12%, transparent 28%),
        radial-gradient(circle at 82% 16%, rgba(56, 189, 248, 0.75) 0 14%, transparent 32%),
        linear-gradient(150deg, #072d8f 0 28%, #0c66ff 28.2% 58%, #29b6f6 58.2% 78%, #b9f1ff 78.3% 100%);
}

:root[data-wallpaper="sunset"] {
    --wallpaper-background:
        radial-gradient(circle at 13% 21%, rgba(255, 223, 128, 0.85) 0 11%, transparent 25%),
        radial-gradient(circle at 85% 18%, rgba(255, 129, 71, 0.75) 0 14%, transparent 30%),
        linear-gradient(145deg, #ff6a3d 0 24%, #ff3f79 24.2% 51%, #ff8352 51.2% 74%, #ffd46e 74.3% 100%);
}

:root[data-wallpaper="midnight"] {
    --wallpaper-background:
        radial-gradient(circle at 14% 20%, rgba(129, 140, 248, 0.55) 0 10%, transparent 24%),
        radial-gradient(circle at 78% 10%, rgba(99, 102, 241, 0.48) 0 12%, transparent 28%),
        linear-gradient(148deg, #020617 0 30%, #0f172a 30.2% 57%, #172554 57.2% 79%, #1d4ed8 79.3% 100%);
}

:root[data-wallpaper="forest"] {
    --wallpaper-background:
        radial-gradient(circle at 16% 18%, rgba(134, 239, 172, 0.6) 0 10%, transparent 26%),
        radial-gradient(circle at 82% 14%, rgba(74, 222, 128, 0.45) 0 12%, transparent 28%),
        linear-gradient(148deg, #052e16 0 26%, #166534 26.2% 55%, #15803d 55.2% 76%, #bbf7d0 76.3% 100%);
}

:root[data-wallpaper="violet"] {
    --wallpaper-background:
        radial-gradient(circle at 14% 18%, rgba(216, 180, 254, 0.72) 0 10%, transparent 26%),
        radial-gradient(circle at 84% 16%, rgba(192, 132, 252, 0.55) 0 12%, transparent 28%),
        linear-gradient(148deg, #2e1065 0 26%, #6d28d9 26.2% 56%, #9333ea 56.2% 77%, #f5d0fe 77.3% 100%);
}

:root[data-wallpaper="ember"] {
    --wallpaper-background:
        radial-gradient(circle at 18% 20%, rgba(253, 186, 116, 0.78) 0 10%, transparent 26%),
        radial-gradient(circle at 84% 18%, rgba(248, 113, 113, 0.58) 0 12%, transparent 28%),
        linear-gradient(148deg, #431407 0 24%, #c2410c 24.2% 54%, #ef4444 54.2% 76%, #fed7aa 76.3% 100%);
}

:root[data-wallpaper="emerald"] {
    --wallpaper-background:
        radial-gradient(circle at 12% 18%, rgba(153, 246, 228, 0.72) 0 10%, transparent 26%),
        radial-gradient(circle at 82% 16%, rgba(45, 212, 191, 0.55) 0 12%, transparent 28%),
        linear-gradient(148deg, #022c22 0 26%, #0f766e 26.2% 56%, #14b8a6 56.2% 77%, #ccfbf1 77.3% 100%);
}

:root[data-wallpaper="rose"] {
    --wallpaper-background:
        radial-gradient(circle at 14% 18%, rgba(253, 164, 175, 0.72) 0 10%, transparent 26%),
        radial-gradient(circle at 84% 16%, rgba(244, 114, 182, 0.56) 0 12%, transparent 28%),
        linear-gradient(148deg, #4c0519 0 24%, #be185d 24.2% 55%, #f472b6 55.2% 77%, #ffe4e6 77.3% 100%);
}

:root[data-wallpaper="sky"] {
    --wallpaper-background:
        radial-gradient(circle at 16% 20%, rgba(125, 211, 252, 0.72) 0 10%, transparent 26%),
        radial-gradient(circle at 82% 14%, rgba(59, 130, 246, 0.52) 0 12%, transparent 28%),
        linear-gradient(148deg, #082f49 0 25%, #0369a1 25.2% 56%, #38bdf8 56.2% 78%, #e0f2fe 78.3% 100%);
}

:root[data-wallpaper="gold"] {
    --wallpaper-background:
        radial-gradient(circle at 15% 18%, rgba(253, 224, 71, 0.72) 0 10%, transparent 26%),
        radial-gradient(circle at 85% 16%, rgba(251, 191, 36, 0.56) 0 12%, transparent 28%),
        linear-gradient(148deg, #422006 0 24%, #b45309 24.2% 54%, #facc15 54.2% 77%, #fef3c7 77.3% 100%);
}

:root[data-wallpaper="graphite"] {
    --wallpaper-background:
        radial-gradient(circle at 15% 20%, rgba(148, 163, 184, 0.48) 0 10%, transparent 26%),
        radial-gradient(circle at 82% 16%, rgba(71, 85, 105, 0.58) 0 12%, transparent 28%),
        linear-gradient(148deg, #020617 0 25%, #1e293b 25.2% 56%, #475569 56.2% 78%, #e2e8f0 78.3% 100%);
}

:root[data-wallpaper="berry"] {
    --wallpaper-background:
        radial-gradient(circle at 14% 18%, rgba(196, 181, 253, 0.7) 0 10%, transparent 26%),
        radial-gradient(circle at 84% 16%, rgba(236, 72, 153, 0.54) 0 12%, transparent 28%),
        linear-gradient(148deg, #3b0764 0 25%, #7e22ce 25.2% 55%, #ec4899 55.2% 78%, #fce7f3 78.3% 100%);
}

:root[data-wallpaper="lagoon"] {
    --wallpaper-background:
        radial-gradient(circle at 16% 18%, rgba(103, 232, 249, 0.68) 0 10%, transparent 26%),
        radial-gradient(circle at 84% 16%, rgba(6, 182, 212, 0.56) 0 12%, transparent 28%),
        linear-gradient(148deg, #083344 0 24%, #0f766e 24.2% 55%, #06b6d4 55.2% 78%, #cffafe 78.3% 100%);
}

:root[data-wallpaper="copper"] {
    --wallpaper-background:
        radial-gradient(circle at 15% 18%, rgba(251, 146, 60, 0.7) 0 10%, transparent 26%),
        radial-gradient(circle at 84% 16%, rgba(180, 83, 9, 0.58) 0 12%, transparent 28%),
        linear-gradient(148deg, #431407 0 24%, #9a3412 24.2% 55%, #fb923c 55.2% 78%, #ffedd5 78.3% 100%);
}

:root[data-wallpaper="lilac"] {
    --wallpaper-background:
        radial-gradient(circle at 14% 18%, rgba(221, 214, 254, 0.72) 0 10%, transparent 26%),
        radial-gradient(circle at 84% 16%, rgba(167, 139, 250, 0.56) 0 12%, transparent 28%),
        linear-gradient(148deg, #312e81 0 24%, #7c3aed 24.2% 55%, #c4b5fd 55.2% 78%, #f5f3ff 78.3% 100%);
}

:root[data-wallpaper="custom"] {
    --wallpaper-background:
        linear-gradient(rgba(15, 23, 42, 0.34), rgba(15, 23, 42, 0.34));
}

.custom-wallpaper-layer {
    position: fixed;
    inset: -24px;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 220ms ease;
}

.custom-wallpaper-layer.is-active {
    opacity: 1;
}

.custom-wallpaper-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(30px) saturate(1.08);
    transform: scale(1.08);
}

body[data-wallpaper="custom"]::before,
body[data-wallpaper="custom"]::after {
    opacity: 0;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', 'ui-sans-serif', 'system-ui', 'Segoe UI', 'Arial', 'sans-serif';
    color: var(--page-text);
    background: transparent;
    overflow-x: hidden;
}

body::before,
body::after {
    position: fixed;
    inset: auto;
    content: "";
    pointer-events: none;
    z-index: 0;
}

body::before {
    top: -14vw;
    right: -8vw;
    width: 78vw;
    height: 44vw;
    border-radius: 0 0 0 100%;
    background: linear-gradient(180deg, rgba(0, 91, 179, 0.86), rgba(23, 139, 231, 0.72));
    filter: blur(18px);
    transform: rotate(9deg) scale(1.04);
}

body::after {
    right: -12vw;
    bottom: 16vw;
    width: 54vw;
    height: 13vw;
    border-radius: 50% 0 0 50%;
    background: linear-gradient(90deg, rgba(236, 243, 255, 0.98), rgba(219, 232, 255, 0.96));
    filter: blur(18px);
    transform: rotate(9deg) scale(1.04);
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.login-page {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px 20px 28px;
}

.login-card {
    position: relative;
    display: grid;
    width: min(100%, 830px);
    height: 700px;
    grid-template-columns: 0.95fr 1.05fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: 0 18px 42px var(--card-shadow);
    backdrop-filter: blur(22px);
    backface-visibility: hidden;
    contain: layout paint;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
}

.theme-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    color: var(--icon);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.09);
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    transform: translateY(-1px);
    color: var(--blue);
    outline: none;
}

body[data-page="cadastro"] .theme-toggle,
body[data-page="recuperar"] .theme-toggle,
body[data-page="legal"] .theme-toggle {
    display: none;
}

.back-button {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    display: none;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    color: var(--icon);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.09);
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.back-button.is-visible {
    display: inline-grid;
}

.back-button.is-visible:hover,
.back-button.is-visible:focus-visible {
    transform: translate3d(0, -2px, 0);
    color: var(--blue);
    background: rgba(255, 255, 255, 0.95);
    outline: none;
}

.back-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.theme-toggle svg,
.input-shell svg,
.benefit svg,
.password-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.input-shell > svg,
.password-toggle svg {
    width: 21px;
    height: 21px;
}

.theme-toggle__icon {
    display: grid;
    grid-area: 1 / 1;
    place-items: center;
    transition: opacity 180ms ease, transform 180ms ease;
}

.theme-toggle__icon--moon,
[data-theme="dark"] .theme-toggle__icon--sun {
    opacity: 0;
    transform: scale(0.72) rotate(-18deg);
}

[data-theme="dark"] .theme-toggle__icon--moon {
    opacity: 1;
    transform: scale(1) rotate(0);
}

.brand-panel {
    display: grid;
    place-items: center;
    padding: 50px 42px;
    background:
        radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.25), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(232, 238, 255, 0.18));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.brand-panel__viewport {
    display: grid;
    width: 100%;
}

.brand-panel__inner {
    width: min(100%, 300px);
}

.brand-mark {
    width: 92px;
    height: 92px;
    margin: 0 auto 14px;
    color: var(--blue);
}

.brand-mark svg {
    width: 100%;
    height: 100%;
}

.brand-mark__document,
.brand-mark__fold,
.brand-mark__line,
.brand-mark__currency {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand-mark__document {
    stroke-width: 8;
}

.brand-mark__fold {
    stroke-width: 8;
}

.brand-mark__line {
    stroke-width: 7;
}

.brand-mark__coin {
    fill: var(--blue);
}

.brand-mark__currency {
    stroke: #ffffff;
    stroke-width: 6;
}

.brand-copy {
    text-align: center;
}

.brand-copy h1,
.form-heading h2 {
    margin: 0;
    line-height: 1.12;
    letter-spacing: 0;
    color: var(--page-text);
}

.brand-copy h1 {
    font-size: 1.82rem;
    font-weight: 800;
}

.brand-copy p {
    margin: 9px 0 0;
    font-size: 1.12rem;
    color: var(--muted);
}

.brand-divider {
    width: 100%;
    height: 1px;
    margin: 34px 0 32px;
    background: var(--line);
}

.benefits {
    display: grid;
    gap: 28px;
}

.benefit {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 16px;
    align-items: center;
}

.benefit__icon {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border-radius: 12px;
    color: var(--icon);
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.benefit__text {
    display: grid;
    gap: 6px;
}

.benefit strong {
    font-size: 0.91rem;
    font-weight: 800;
    color: var(--page-text);
}

.benefit small {
    max-width: 210px;
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--muted);
}

.form-panel {
    display: grid;
    place-items: center;
    align-content: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.94);
}

.form-panel__viewport {
    position: relative;
    display: grid;
    width: min(100%, 356px);
    align-self: center;
}

.login-form {
    width: 100%;
    margin: 0 auto;
}

.panel-view {
    grid-area: 1 / 1;
    width: 100%;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.panel-view.is-active,
.panel-view.is-entering,
.panel-view.is-leaving {
    visibility: visible;
}

.panel-view.is-active {
    opacity: 1;
    pointer-events: auto;
}

.brand-view,
.form-view {
    position: relative;
    align-self: center;
    backface-visibility: hidden;
    will-change: transform, opacity;
}

.legal-screen {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 78px 34px 32px;
    background: rgba(255, 255, 255, 0.94);
}

.legal-screen__inner {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.legal-screen__hero {
    display: grid;
    justify-items: center;
    gap: 16px;
    text-align: center;
}

.legal-screen__icon {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #075ff7, #2563eb);
    box-shadow: 0 12px 24px rgba(0, 91, 248, 0.24);
}

.legal-screen__icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.legal-screen__copy h2 {
    margin: 0;
    font-size: 1.72rem;
    font-weight: 800;
    color: var(--page-text);
}

.legal-screen__copy p {
    margin: 10px 0 0;
    font-size: 1rem;
    color: var(--muted);
}

.legal-tabs {
    display: grid;
    width: min(100%, 680px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 6px;
    border: 1px solid var(--field-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.legal-tab {
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.legal-tab.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #075ff7, #005bf8);
    box-shadow: 0 10px 20px rgba(0, 91, 248, 0.2);
}

.legal-tab:hover,
.legal-tab:focus-visible {
    outline: none;
    transform: translateY(-1px);
}

.legal-content {
    width: min(100%, 680px);
    flex: 1;
    min-height: 0;
    padding: 18px 10px 18px 18px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
    overflow: hidden;
}

.legal-panel {
    display: none;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    padding-right: 12px;
    overflow-y: auto;
}

.legal-panel.is-active {
    display: block;
}

.legal-panel h3 {
    margin: 0 0 10px;
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--page-text);
}

.legal-panel p {
    margin: 0 0 24px;
    font-size: 1.08rem;
    line-height: 1.72;
    color: var(--muted);
}

.legal-panel::-webkit-scrollbar {
    width: 6px;
}

.legal-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #005bf8;
    min-height: 140px;
}

.legal-screen__footer {
    display: flex;
    justify-content: center;
    width: 100%;
}

.primary-button.legal-back-action {
    width: fit-content;
    flex: 0 0 auto;
    align-self: center;
    min-width: 0;
    min-height: 48px;
    gap: 6px;
    padding: 0 14px;
    font-size: 0.88rem;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 91, 248, 0.18);
}

.legal-back-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.panel-view.is-entering,
.panel-view.is-leaving {
    z-index: 2;
}

.form-heading {
    margin-bottom: 30px;
}

.form-heading h2 {
    font-size: 1.82rem;
    font-weight: 800;
}

.form-heading p {
    margin: 9px 0 0;
    font-size: 0.98rem;
    color: var(--muted);
}

.field {
    display: grid;
    gap: 9px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    font-weight: 800;
}

.input-shell {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    gap: 11px;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--field-border);
    border-radius: 12px;
    color: var(--icon);
    background: var(--field);
    box-shadow: 0 4px 12px var(--field-shadow);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.input-shell--no-action {
    grid-template-columns: 24px 1fr;
}

.input-shell:focus-within {
    border-color: rgba(0, 92, 247, 0.72);
    box-shadow: 0 0 0 4px rgba(0, 92, 247, 0.11);
}

.input-shell input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--page-text);
    background: transparent;
}

.input-shell input::placeholder {
    color: #5f6b80;
    font-weight: 400;
    opacity: 1;
}

.password-toggle {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 0;
    color: var(--icon);
    background: transparent;
    cursor: pointer;
}

.password-toggle__hide,
.password-visible .password-toggle__show {
    display: none;
}

.password-visible .password-toggle__hide {
    display: block;
}

.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 94%;
    justify-self: center;
    margin-top: 4px;
}

.password-strength[hidden] {
    display: none;
}

.password-strength__bar {
    display: block;
    flex: 1;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.24);
}

.password-strength__fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #ef4444;
    transition: width 180ms ease, background-color 180ms ease;
}

.password-strength__text {
    flex-shrink: 0;
    min-width: 42px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    text-align: right;
}

.form-options {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 24px;
    font-size: 0.9rem;
}

.remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--page-text);
}

.remember span {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3em;
    white-space: nowrap;
}

.remember span a {
    white-space: nowrap;
}

.remember--terms {
    align-items: flex-start;
    font-size: 13px;
}

.remember--terms span {
    display: block;
    line-height: 1.45;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.remember--terms span a {
    display: inline;
}

/* CHECKBOX PERSONALIZADO */
.remember input {
    -webkit-appearance: none;
    appearance: none;
    background: var(--field); /* Fundo branco no modo claro */
    border: 1px solid #94a3b8; /* Cinza médio: equilíbrio perfeito de visibilidade */
    border-radius: 4px;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background-color 180ms ease, border-color 180ms ease;
}

.remember input:checked {
    background: var(--blue);
    border-color: var(--blue);
}

.remember input:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 0px;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember input:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.text-link {
    font-weight: 700;
    color: var(--blue-strong);
    text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
    text-decoration: underline;
}

.primary-button,
.google-button {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.primary-button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, #075ff7, #005bf8);
    box-shadow: 0 12px 24px rgba(0, 91, 248, 0.24);
}

.primary-button:hover,
.google-button:hover,
.primary-button:focus-visible,
.google-button:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.primary-button:focus-visible {
    box-shadow: 0 0 0 4px rgba(0, 92, 247, 0.18), 0 12px 24px rgba(0, 91, 248, 0.24);
}

.separator {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: center;
    margin: 24px 0 22px;
    color: var(--muted);
    font-size: 0.9rem;
}

.separator span {
    height: 1px;
    background: var(--line);
}

.separator b {
    font-weight: 800;
}

.google-button {
    gap: 10px;
    border: 1px solid var(--field-border);
    color: var(--page-text);
    background: var(--field);
    box-shadow: 0 4px 12px var(--field-shadow);
}

.google-button svg {
    width: 22px;
    height: 22px;
}

.signup-call {
    margin: 28px 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
}

.signup-call .text-link {
    margin-left: 12px;
}

.signup-call--compact {
    margin-top: 22px;
}

.page-footer {
    margin-top: 22px;
    color: var(--footer);
    font-size: 0.92rem;
    text-align: center;
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
}

[data-theme="dark"] {
    color-scheme: dark;
    --page-text: #f8fafc;
    --muted: #cbd5e1;
    --panel: rgba(15, 23, 42, 0.28);
    --brand-panel: rgba(15, 23, 42, 0.36);
    --field: rgba(15, 23, 42, 0.82);
    --field-border: rgba(148, 163, 184, 0.32);
    --field-shadow: rgba(0, 0, 0, 0.16);
    --icon: #cbd5e1;
    --line: rgba(203, 213, 225, 0.18);
    --footer: rgba(248, 250, 252, 0.92);
    --card-shadow: rgba(0, 0, 0, 0.36);
}

[data-theme="dark"] html {
    background: #0f172a;
}

:root[data-theme="dark"][data-wallpaper="aurora"] {
    --wallpaper-background:
        radial-gradient(circle at 10% 28%, rgba(175, 48, 82, 0.94) 0 11%, transparent 27%),
        radial-gradient(circle at 12% 0%, #a80846 0 22%, transparent 43%),
        linear-gradient(151deg, transparent 0 38%, rgba(6, 86, 164, 0.98) 38.2% 53%, transparent 53.4%),
        linear-gradient(164deg, transparent 0 57%, rgba(93, 114, 158, 0.96) 57.2% 69%, transparent 69.3%),
        linear-gradient(166deg, transparent 0 63%, #a97413 63.2% 75%, transparent 75.3%),
        linear-gradient(151deg, #93104a 0 36%, #07518e 36.4% 62%, #9b301e 62.4% 78%, #870439 78.5% 100%);
}

[data-theme="dark"] body::before {
    background: linear-gradient(180deg, rgba(5, 48, 96, 0.92), rgba(16, 92, 153, 0.78));
}

[data-theme="dark"] body::after {
    background: linear-gradient(90deg, rgba(86, 107, 148, 0.92), rgba(70, 91, 139, 0.9));
}

[data-theme="dark"] .brand-panel {
    background:
        radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.08), transparent 30%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.42), rgba(30, 41, 59, 0.24));
}

[data-theme="dark"] .form-panel {
    background: rgba(15, 23, 42, 0.86);
}

[data-theme="dark"] .legal-screen {
    background: rgba(15, 23, 42, 0.92);
}

[data-theme="dark"] .legal-tabs,
[data-theme="dark"] .legal-content {
    background: rgba(15, 23, 42, 0.74);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(15, 23, 42, 0.86);
}

[data-theme="dark"] .back-button {
    background: rgba(15, 23, 42, 0.86);
}

[data-theme="dark"] .benefit__icon {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .input-shell input::placeholder {
    color: #a8b3c4;
}

[data-theme="dark"] .legal-screen__icon {
    box-shadow: 0 12px 24px rgba(0, 91, 248, 0.32);
}

[data-theme="dark"] .legal-tab {
    color: #cbd5e1;
}

[data-theme="dark"] .legal-tab.is-active {
    color: #ffffff;
}

@keyframes slideInRight {
    from {
        opacity: 0.96;
        transform: translate3d(36px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes panelEnterFromRight {
    from {
        opacity: 0;
        transform: translate3d(28px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes panelEnterFromLeft {
    from {
        opacity: 0;
        transform: translate3d(-28px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes panelExitToLeft {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(-28px, 0, 0);
    }
}

@keyframes panelExitToRight {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(28px, 0, 0);
    }
}

.login-card {
    animation: slideInRight 420ms ease-out both;
}

.panel-view.enter-from-right {
    animation: panelEnterFromRight 420ms ease both;
}

.panel-view.enter-from-left {
    animation: panelEnterFromLeft 420ms ease both;
}

.panel-view.leave-to-left {
    animation: panelExitToLeft 420ms ease both;
}

.panel-view.leave-to-right {
    animation: panelExitToRight 420ms ease both;
}

@media (max-width: 1040px) {
    .login-card {
        width: min(100%, 830px);
    }

    .brand-panel,
    .form-panel {
        padding-inline: 38px;
    }
}

@media (max-width: 820px) {
    body {
        background-size: auto;
    }

    .login-page {
        justify-content: flex-start;
        padding: 26px 14px 28px;
    }

    .login-card {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
        border-radius: 18px;
    }

    .brand-panel {
        padding: 56px 30px 36px;
    }

    .brand-panel__inner {
        width: min(100%, 540px);
    }

    .brand-mark {
        width: 112px;
        height: 112px;
        margin-bottom: 14px;
    }

    .brand-divider {
        margin: 28px 0;
    }

    .benefits {
        gap: 18px;
    }

    .benefit {
        grid-template-columns: 58px 1fr;
        gap: 16px;
    }

    .benefit__icon {
        width: 58px;
        height: 58px;
        border-radius: 12px;
    }

    .benefit small {
        max-width: none;
    }

    .form-panel {
        padding: 42px 30px 38px;
    }

    .form-panel__viewport {
        width: min(100%, 420px);
    }

    .legal-screen {
        padding: 72px 24px 28px;
    }

    .legal-tabs,
    .legal-content {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .login-page {
        padding-inline: 10px;
    }

    .theme-toggle {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .brand-panel,
    .form-panel {
        padding-inline: 20px;
    }

    .form-panel__viewport {
        padding-top: 22px;
    }

    .back-button {
        top: 12px;
        left: 12px;
        width: 40px;
        height: 40px;
    }

    .brand-panel {
        padding-top: 54px;
    }

    .brand-copy h1 {
        font-size: 1.9rem;
    }

    .brand-copy p,
    .form-heading p {
        font-size: 1rem;
    }

    .form-heading h2 {
        font-size: 1.72rem;
    }

    .legal-screen {
        padding: 68px 14px 22px;
    }

    .legal-screen__copy h2 {
        font-size: 1.78rem;
    }

    .legal-screen__copy p {
        font-size: 0.96rem;
    }

    .legal-tabs {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .legal-content {
        padding: 16px 8px 16px 14px;
    }

    .legal-panel p {
        font-size: 1rem;
        line-height: 1.64;
    }

    .primary-button.legal-back-action {
        width: auto;
        flex: 0 0 auto;
        min-width: 0;
    }

    .input-shell {
        min-height: 58px;
        gap: 12px;
        padding-inline: 14px;
    }

    .input-shell input {
        font-size: 1rem;
    }

    .form-options {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 28px;
    }

    .primary-button,
    .google-button {
        min-height: 58px;
    }

    .signup-call .text-link {
        display: inline-block;
        margin-left: 6px;
    }

    .page-footer {
        margin-top: 24px;
        font-size: 0.92rem;
    }
}
