:root {
  --primary: #06B6D4;
  --highlight: #2563EB;
  --secondary: #1E3A8A;
  --surface: #FFFFFF;
  --background: #F8FAFC;

  --ink: #0F172A;
  --muted: #687083;
  --line: #e7e9ee;
  --highlight: #2563EB;
  --secondary: #1E3A8A;
  --panel: #F8FAFC;
}

* { box-sizing: border-box; }

body {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "DM Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.auth-layout { height: 100%; display: grid; grid-template-columns: minmax(420px, 1fr) minmax(480px, 1fr); overflow: hidden; }

.brand-panel {
  position: relative;
  overflow: hidden;
  height: 100%;
  padding: 42px clamp(42px, 7.3vw, 124px);
  color: #fff;
  background: #1E3A8A;
  isolation: isolate;
}

.brand-panel::before, .brand-panel::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.brand-panel::before { width: 620px; height: 620px; left: -245px; top: 112px; background: radial-gradient(circle, #2563EB 0, #2563EB 42%, transparent 70%); opacity: .86; }
.brand-panel::after { width: 560px; height: 560px; right: -280px; bottom: -165px; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 0 0 54px rgba(255,255,255,.025), 0 0 0 109px rgba(255,255,255,.02); }

.brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; font-family: Manrope, sans-serif; font-size: 23px; font-weight: 800; text-decoration: none; letter-spacing: -1.2px; }
.brand-mark { display: inline-grid; place-items: center; width: 31px; height: 31px; color: #CFFAFE; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-dot { color: #CFFAFE; }

.brand-copy { max-width: 530px; margin-top: clamp(100px, 15vh, 170px); }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 23px; color: #CFFAFE; font-size: 12px; font-weight: 700; letter-spacing: 1.45px; text-transform: uppercase; }
.eyebrow i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #06B6D4; box-shadow: 0 0 0 5px rgba(37, 99, 235, .16); }
.brand-copy h1 { max-width: 500px; margin: 0; font-family: Manrope, sans-serif; font-size: clamp(42px, 4.5vw, 66px); font-weight: 700; line-height: 1.11; letter-spacing: -3.1px; }
.brand-copy em { color: #CFFAFE; font-style: normal; }
.brand-copy p { max-width: 450px; margin: 24px 0 0; color: #CFFAFE; font-size: 17px; line-height: 1.65; }

.metric-card { width: min(100%, 366px); margin-top: clamp(44px, 8vh, 94px); padding: 19px 20px 16px; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: rgba(255,255,255,.08); box-shadow: 0 20px 50px rgba(37, 99, 235, .2); backdrop-filter: blur(10px); }
.metric-card__top, .metric-card__footer { display: flex; align-items: center; justify-content: space-between; color: #d8d4e6; font-size: 12px; }
.trend { color: #aef2c2; font-weight: 700; }
.metric-card strong { display: block; margin: 9px 0 13px; color: #fff; font-family: Manrope, sans-serif; font-size: 24px; letter-spacing: -.8px; }
.chart { display: flex; align-items: end; gap: 7px; height: 53px; margin: 0 -2px 10px; }
.chart span { flex: 1; min-width: 7px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #CFFAFE, #06B6D4 90%); opacity: .86; }
.chart span:nth-child(3n) { opacity: .46; }
.metric-card__footer { padding-top: 11px; border-top: 1px solid rgba(255,255,255,.11); color: #06B6D4; font-size: 10px; }
.login-panel { display: grid; place-items: center; padding: 48px 30px; background: #fff; }
.login-content { width: min(100%, 408px); }
.mobile-brand { display: none; color: #1E3A8A; font-family: Manrope, sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -1px; }
.login-heading { margin-bottom: 31px; }
.login-heading p { margin: 0 0 7px; color: var(--muted); font-size: 14px; }
.login-heading h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 30px; line-height: 1.2; letter-spacing: -1.35px; }

.recovery-brand-panel .brand-copy { margin-top: clamp(90px, 12vh, 135px); }
.security-card { display: flex; align-items: center; gap: 15px; width: min(100%, 380px); margin-top: clamp(38px, 6vh, 66px); padding: 17px 19px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(255,255,255,.08); box-shadow: 0 20px 50px rgba(37, 99, 235, .18); backdrop-filter: blur(10px); }
.security-icon { display: grid; flex: 0 0 auto; place-items: center; width: 39px; height: 39px; border-radius: 12px; color: #CFFAFE; background: rgba(37, 99, 235,.17); }
.security-icon svg, .recovery-note svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.security-card strong { display: block; color: #fff; font-size: 13px; }
.security-card p { margin: 4px 0 0; color: #CFFAFE; font-size: 12px; line-height: 1.45; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: #656c7c; font-size: 13px; font-weight: 600; text-decoration: none; transition: color .18s ease, transform .18s ease; }
.back-link span { font-size: 18px; line-height: 0; }
.back-link:hover { color: var(--highlight); transform: translateX(-2px); }
.recovery-heading { margin: 27px 0 12px; }
.recovery-heading h2 { font-size: 29px; }
.recovery-description { max-width: 390px; margin: 0 0 25px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.recovery-note { display: flex; align-items: flex-start; gap: 8px; margin: 20px 0 0; color: #737b8c; font-size: 12px; line-height: 1.5; }
.recovery-note svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; color: #06B6D4; }
.signup-brand-panel .brand-copy { margin-top: clamp(86px, 11vh, 128px); }
.benefit-card { display: flex; align-items: center; gap: 15px; width: min(100%, 390px); margin-top: clamp(36px, 5vh, 62px); padding: 17px 19px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(255,255,255,.08); box-shadow: 0 20px 50px rgba(37, 99, 235, .18); backdrop-filter: blur(10px); }
.benefit-icon { display: grid; flex: 0 0 auto; place-items: center; width: 39px; height: 39px; border-radius: 12px; color: #CFFAFE; background: rgba(37, 99, 235,.17); font-size: 24px; font-weight: 700; }
.benefit-card strong { display: block; color: #fff; font-size: 13px; }
.benefit-card p { margin: 4px 0 0; color: #CFFAFE; font-size: 12px; line-height: 1.45; }
.signup-heading { margin: 26px 0 24px; }
.signup-heading h2 { font-size: 29px; }
.terms-row { display: flex; align-items: flex-start; gap: 9px; margin: 1px 0 21px; color: #646b7c; font-size: 12px; line-height: 1.45; cursor: pointer; user-select: none; }
.terms-row input { position: absolute; opacity: 0; }
.terms-row .custom-check { flex: 0 0 auto; margin-top: 1px; }
.terms-row a, .login-prompt a { color: var(--highlight); font-weight: 700; text-decoration: none; }
.terms-row a:hover, .login-prompt a:hover { text-decoration: underline; }
.terms-row input:focus-visible + .custom-check { outline: 3px solid rgba(37, 99, 235,.2); outline-offset: 2px; }
.login-prompt { margin: 22px 0 0; color: #767d8d; font-size: 13px; text-align: center; }

.google-button, .submit-button { display: flex; align-items: center; justify-content: center; width: 100%; border-radius: 11px; cursor: pointer; font-weight: 600; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease; }
.google-button { gap: 11px; height: 52px; border: 1px solid #dfe2e9; color: #0F172A; background: #fff; }
.google-button svg { width: 19px; height: 19px; }
.google-button:hover { border-color: #cbd0da; background: #F8FAFC; box-shadow: 0 5px 16px rgba(28,31,41,.07); }
.google-button:active, .submit-button:active { transform: translateY(1px); }

.divider { display: flex; align-items: center; gap: 13px; margin: 25px 0 23px; color: #969baa; font-size: 12px; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }

.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 8px; color: #0F172A; font-size: 13px; font-weight: 700; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a, .signup a { color: var(--highlight); font-size: 12px; font-weight: 700; text-decoration: none; }
.label-row a:hover, .signup a:hover { text-decoration: underline; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 15px; width: 18px; height: 18px; fill: none; stroke: #9299a8; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; pointer-events: none; }
.input-wrap input { width: 100%; height: 52px; padding: 0 45px; border: 1px solid #dfe2e9; border-radius: 11px; outline: none; color: var(--ink); background: #fff; font-size: 14px; transition: border .18s, box-shadow .18s; }
.input-wrap input::placeholder { color: #a9afbb; }
.input-wrap input:focus { border-color: #06B6D4; box-shadow: 0 0 0 4px rgba(37, 99, 235,.11); }
.password-toggle { position: absolute; right: 10px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; color: #777f90; background: transparent; cursor: pointer; }
.password-toggle:hover { color: var(--highlight); background: #F8FAFC; }
.password-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.password-toggle .eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.check-row { display: flex; align-items: center; gap: 9px; margin: 2px 0 25px; color: #646b7c; font-size: 12px; cursor: pointer; user-select: none; }
.check-row input { position: absolute; opacity: 0; }
.custom-check { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #cbd0d9; border-radius: 5px; color: transparent; font-size: 12px; font-weight: 800; transition: background .15s, border .15s; }
.check-row input:checked + .custom-check, .terms-row input:checked + .custom-check { border-color: var(--highlight); color: #fff; background: var(--highlight); }
.check-row input:focus-visible + .custom-check { outline: 3px solid rgba(37, 99, 235,.2); outline-offset: 2px; }

.submit-button { gap: 11px; height: 53px; border: 1px solid var(--highlight); color: #fff; background: var(--highlight); box-shadow: 0 9px 18px rgba(37, 99, 235,.2); }
.submit-button span { font-size: 19px; line-height: 0; transition: transform .18s; }
.submit-button:hover { border-color: var(--secondary); background: var(--secondary); box-shadow: 0 11px 24px rgba(37, 99, 235,.28); }
.submit-button:hover span { transform: translateX(3px); }
.signup { margin: 24px 0 0; color: #767d8d; font-size: 13px; text-align: center; }

.toast { position: fixed; z-index: 5; bottom: 24px; left: 50%; max-width: calc(100vw - 32px); padding: 13px 17px; border-radius: 9px; color: #fff; background: #0F172A; box-shadow: 0 12px 35px rgba(37, 99, 235,.22); font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .login-panel { height: 100%; }
  .mobile-brand { display: flex; align-items: center; margin-bottom: 54px; }
  .mobile-brand .brand-mark { width: 28px; height: 28px; margin-right: 6px; color: var(--highlight); }
}

@media (max-width: 480px) {
  .login-panel { align-items: start; padding: 30px 22px; }
  .mobile-brand { margin-bottom: 42px; }
  .login-heading h2 { font-size: 27px; }
}

@media (max-height: 760px) and (min-width: 861px) {
  .brand-panel { padding-top: 30px; padding-bottom: 30px; }
  .brand-copy { margin-top: clamp(46px, 9vh, 72px); }
  .brand-copy h1 { font-size: clamp(38px, 4vw, 54px); }
  .brand-copy p { margin-top: 17px; font-size: 15px; }
  .metric-card { margin-top: clamp(25px, 4vh, 40px); padding: 15px 17px 13px; }
  .metric-card strong { margin: 6px 0 9px; font-size: 21px; }
  .chart { height: 40px; margin-bottom: 8px; }
  .security-card { margin-top: 30px; padding: 14px 16px; }
  .benefit-card { margin-top: 28px; padding: 14px 16px; }
  .signup-heading { margin: 18px 0 16px; }
  .signup-content .divider { margin: 16px 0; }
  .signup-content .field { margin-bottom: 13px; }
  .signup-content .input-wrap input, .signup-content .google-button, .signup-content .submit-button { height: 47px; }
  .signup-content .terms-row { margin-bottom: 15px; }
  .signup-content .login-prompt { margin-top: 14px; }
}

@media (max-height: 620px) and (min-width: 861px) {
  .brand-panel { padding: 20px clamp(42px, 7.3vw, 124px); }
  .brand-copy { margin-top: 30px; }
  .eyebrow { margin-bottom: 13px; }
  .brand-copy h1 { font-size: 35px; letter-spacing: -2px; }
  .brand-copy p { margin-top: 10px; line-height: 1.45; }
  .metric-card { width: min(100%, 320px); margin-top: 18px; }
  .security-card { margin-top: 20px; }
  .benefit-card { margin-top: 18px; }
  .signup-heading { margin: 13px 0; }
  .signup-content .divider { margin: 11px 0; }
  .signup-content .field { margin-bottom: 9px; }
  .signup-content .input-wrap input, .signup-content .google-button, .signup-content .submit-button { height: 42px; }
  .signup-content .terms-row { margin-bottom: 10px; }
  .signup-content .login-prompt { margin-top: 10px; }
}

@media (max-height: 700px) and (max-width: 860px) {
  .login-panel { padding-top: 20px; padding-bottom: 20px; }
  .mobile-brand { margin-bottom: 26px; }
  .login-heading { margin-bottom: 20px; }
  .login-heading h2 { font-size: 26px; }
  .divider { margin: 16px 0; }
  .field { margin-bottom: 13px; }
  .input-wrap input, .google-button, .submit-button { height: 46px; }
  .check-row { margin-bottom: 16px; }
  .signup { margin-top: 16px; }
  .recovery-heading { margin-top: 18px; }
  .recovery-description { margin-bottom: 17px; }
  .recovery-note { margin-top: 14px; }
  .signup-heading { margin: 17px 0; }
  .terms-row { margin-bottom: 14px; }
  .login-prompt { margin-top: 15px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }

/* Identidade MaxAfiliados */
.brand-mark, .app-brand__mark { flex: 0 0 44px; width: 44px; height: 44px; }
.brand-mark img, .app-brand__mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.standalone-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; color: var(--secondary); font-size: 24px; font-weight: 800; text-decoration: none; }
.standalone-brand img { object-fit: contain; }

body { background: var(--background); overflow: auto; }
.brand-panel { background: linear-gradient(145deg, #1E3A8A 0%, #2563EB 100%); }
.brand-panel::before { background: radial-gradient(circle, #06B6D4 0%, transparent 70%); }
.brand-copy em, .eyebrow { color: #CFFAFE; }
.brand-copy p, .security-card p, .benefit-card p { color: #F8FAFC; }
.eyebrow i { background: var(--primary); }
.chart span { background: linear-gradient(180deg, #06B6D4, #2563EB); }
.submit-button { background: var(--primary); border-color: var(--primary); color: #0F172A; font-weight: 700; }
.submit-button:hover { background: var(--highlight); border-color: var(--highlight); color: #FFFFFF; }
.input-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(6,182,212,.15); }
.login-panel { background: var(--background); }
.auth-card { max-width: 560px; margin: 8vh auto; padding: 32px; background: #FFFFFF; border: 1px solid #CFFAFE; border-radius: 20px; line-height: 1.6; }
.auth-card button { padding: 14px 22px; background: var(--primary); color: #0F172A; border: 0; border-radius: 10px; cursor: pointer; font-weight: 700; }
.auth-card button:disabled { opacity: .5; cursor: wait; }
@media(max-width:860px) { .auth-layout { min-height: 100dvh; height: auto; overflow: visible; } .mobile-brand .brand-mark { width: 44px; height: 44px; } }
@media(max-width:600px) { .auth-card { margin: 24px 16px; padding: 24px; } }
