:root {
  --auth-bg: #020b13;
  --auth-bg-soft: #061724;
  --auth-card: rgba(7, 27, 40, 0.94);
  --auth-card-soft: rgba(11, 36, 52, 0.78);
  --auth-line: rgba(114, 164, 190, 0.22);
  --auth-line-strong: rgba(39, 218, 210, 0.46);
  --auth-white: #f7fbfd;
  --auth-muted: #9eb0bc;
  --auth-teal: #28d9d1;
  --auth-yellow: #ffbd18;
  --auth-yellow-soft: #ffd35c;
  --auth-red: #ff5d58;
  --auth-green: #43dfb1;
  --auth-display: "Archivo Black", Impact, sans-serif;
  --auth-body: "Inter", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--auth-bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--auth-white);
  background:
    radial-gradient(circle at 8% 4%, rgba(40, 217, 209, 0.07), transparent 28%),
    radial-gradient(circle at 92% 90%, rgba(255, 189, 24, 0.05), transparent 25%),
    var(--auth-bg);
  font-family: var(--auth-body);
}

button,
input,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(430px, 0.95fr) minmax(520px, 1.05fr);
}

/* =========================================================
   PAINEL VISUAL
========================================================= */

.auth-visual {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding: 32px clamp(30px, 4vw, 68px) 42px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(4, 19, 30, 0.28), rgba(1, 8, 13, 0.9)),
    radial-gradient(circle at 50% 46%, rgba(32, 159, 175, 0.18), transparent 37%),
    #061722;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-visual::before {
  content: "";
  width: 520px;
  height: 240px;
  position: absolute;
  top: 70px;
  left: -80px;
  opacity: 0.28;
  background-image:
    radial-gradient(circle, rgba(40, 217, 209, 0.45) 1px, transparent 1.5px);
  background-size: 9px 9px;
  mask-image: radial-gradient(ellipse, black, transparent 70%);
  pointer-events: none;
}

.auth-visual::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: 90px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(40, 217, 209, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 55px rgba(40, 217, 209, 0.035),
    0 0 0 115px rgba(40, 217, 209, 0.022);
  pointer-events: none;
}

.auth-logo {
  width: 170px;
  height: 94px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
}

.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.auth-visual-copy {
  max-width: 610px;
  position: relative;
  z-index: 2;
  margin-top: clamp(30px, 5vh, 76px);
}

.auth-kicker,
.auth-eyebrow {
  color: var(--auth-teal);
  font-size: 35px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-visual-copy h2 {
  margin: 15px 0 0;
  font-family: var(--auth-display);
  font-size: clamp(42px, 5vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.auth-visual-copy h2 em {
  color: var(--auth-yellow);
  font-style: normal;
}

.auth-visual-copy p {
  max-width: 550px;
  margin: 23px 0 0;
  color: var(--auth-muted);
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.65;
}

.auth-preview {
  width: min(640px, 100%);
  margin-bottom:10px;
  aspect-ratio: 16 / 9;
  position: relative;
  z-index: 2;
  overflow: hidden;
  margin-top: clamp(32px, 5vh, 62px);
  background: #05121b;
  border: 1px solid rgba(40, 217, 209, 0.34);
  border-radius: 20px;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.42),
    0 0 35px rgba(40, 217, 209, 0.06);
}

.auth-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.auth-preview-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(1, 8, 13, 0.92), transparent 58%),
    linear-gradient(90deg, rgba(1, 8, 13, 0.25), transparent);
}

.auth-preview-label {
  position: absolute;
  left: 22px;
  bottom: 25px;
  display: grid;
}

.auth-preview-label span {
  color: var(--auth-teal);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.auth-preview-label strong {
  margin-top: 6px;
  color: var(--auth-white);
  font-size: clamp(20px, 2vw, 31px);
}

.auth-preview-label small {
  margin-top: 4px;
  color: var(--auth-yellow);
  font-size: 14px;
  font-weight: 700;
}

.auth-preview-progress {
  position: absolute;
  right: 22px;
  bottom: 27px;
  display: flex;
  gap: 7px;
}

.auth-preview-progress i {
  width: 22px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.auth-preview-progress i:first-child {
  width: 42px;
  background: var(--auth-teal);
}

.auth-route {
  max-width: 590px;
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #708794;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.auth-route i {
  flex: 1;
  height: 1px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(40, 217, 209, 0.42) 0 8px,
      transparent 8px 16px
    );
}

.auth-route b {
  color: var(--auth-teal);
  font-size: 18px;
}

/* =========================================================
   FORMULÁRIO
========================================================= */

.auth-form-side {
  min-height: 100vh;
  position: relative;
  padding: 32px clamp(28px, 6vw, 92px) 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.auth-back {
  position: absolute;
  top: 34px;
  right: clamp(28px, 6vw, 92px);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #9fb1bc;
  font-size: 11px;
  font-weight: 800;
}

.auth-back:hover {
  color: var(--auth-teal);
}

.auth-form-card {
  width: min(510px, 100%);
  padding: clamp(28px, 3.8vw, 48px);
  background:
    radial-gradient(circle at 100% 0%, rgba(40, 217, 209, 0.07), transparent 33%),
    var(--auth-card);
  border: 1px solid var(--auth-line);
  border-radius: 24px;
  box-shadow: 0 26px 75px rgba(0, 0, 0, 0.38);
}

.auth-form-header h1 {
  margin: 12px 0 0;
  font-family: var(--auth-display);
  font-size: clamp(31px, 3vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.auth-form-header p {
  margin: 15px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-message {
  margin-top: 23px;
  padding: 13px 15px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.45;
}

.auth-message.error {
  color: #ffd3d1;
  background: rgba(255, 93, 88, 0.09);
  border: 1px solid rgba(255, 93, 88, 0.3);
}

.auth-message.good {
  color: #c8ffea;
  background: rgba(67, 223, 177, 0.08);
  border: 1px solid rgba(67, 223, 177, 0.28);
}

.auth-message-icon {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 4px;
  background: currentColor;
  border-radius: 50%;
}

.auth-form {
  margin-top: 26px;
  display: grid;
  gap: 18px;
}

.auth-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.auth-field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.auth-field label {
  color: #e9f0f4;
  font-size: 11px;
  font-weight: 800;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.auth-label-row a {
  color: var(--auth-teal);
  font-size: 10px;
  font-weight: 700;
}

.auth-input-wrap {
  min-height: 52px;
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.auth-input-wrap:focus-within {
  background: rgba(40, 217, 209, 0.035);
  border-color: var(--auth-line-strong);
  box-shadow: 0 0 0 4px rgba(40, 217, 209, 0.055);
}

.auth-input-icon {
  width: 44px;
  flex: 0 0 auto;
  color: #66828f;
  text-align: center;
  font-size: 13px;
}

.auth-input-wrap input {
  min-width: 0;
  width: 100%;
  height: 50px;
  padding: 0 44px 0 0;
  color: var(--auth-white);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}

.auth-input-wrap input::placeholder {
  color: #687c88;
}

.auth-password-toggle {
  width: 42px;
  height: 42px;
  position: absolute;
  right: 5px;
  color: #77909d;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.auth-password-toggle:hover {
  color: var(--auth-teal);
  background: rgba(255, 255, 255, 0.04);
}

.auth-recaptcha {
  min-height: 78px;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: center;
}

.auth-submit {
  min-height: 54px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: #07131a;
  background: linear-gradient(180deg, var(--auth-yellow-soft), var(--auth-yellow));
  border: 1px solid var(--auth-yellow);
  border-radius: 11px;
  box-shadow: 0 14px 32px rgba(255, 189, 24, 0.15);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(255, 189, 24, 0.21);
}

.auth-submit span {
  font-size: 18px;
}

.auth-info-box {
  padding: 15px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(40, 217, 209, 0.055);
  border: 1px solid rgba(40, 217, 209, 0.2);
  border-radius: 12px;
}

.auth-info-box > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--auth-teal);
  background: #102e40;
  border-radius: 50%;
}

.auth-info-box p {
  margin: 1px 0 0;
  color: #aebdc6;
  font-size: 11px;
  line-height: 1.55;
}

.auth-card-footer {
  margin-top: 25px;
  padding-top: 22px;
  color: #8fa1ac;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  text-align: center;
}

.auth-card-footer a {
  color: var(--auth-teal);
  font-weight: 800;
}

.auth-legal {
  width: min(530px, 100%);
  margin: 18px 0 0;
  color: #5f7480;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

/* Páginas menores */
.auth-forgot .auth-form-card,
.auth-reset .auth-form-card {
  max-width: 500px;
}

@media (max-width: 1080px) {
  .auth-shell {
    grid-template-columns: minmax(360px, 0.78fr) minmax(490px, 1.22fr);
  }

  .auth-visual {
    padding-inline: 32px;
  }

  .auth-visual-copy h2 {
    font-size: 52px;
  }
}

@media (max-width: 860px) {
  .auth-shell {
    display: block;
  }

  .auth-visual {
    min-height: 420px;
    padding: 24px 26px 36px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .auth-logo {
    width: 130px;
    height: 72px;
  }

  .auth-visual-copy {
    margin-top: 20px;
  }

  .auth-visual-copy h2 {
    max-width: 520px;
    font-size: 46px;
  }

  .auth-visual-copy p {
    max-width: 570px;
  }

  .auth-preview {
    display: none;
  }

  .auth-route {
    margin-top: auto;
  }

  .auth-form-side {
    min-height: auto;
    padding: 78px 22px 38px;
  }

  .auth-back {
    top: 25px;
    right: 24px;
  }
}

@media (max-width: 580px) {
  .auth-visual {
    min-height: 350px;
    padding-inline: 20px;
  }

  .auth-visual-copy h2 {
    font-size: 38px;
  }

  .auth-form-side {
    padding-inline: 13px;
  }

  .auth-form-card {
    padding: 26px 20px;
    border-radius: 18px;
  }

  .auth-field-grid {
    grid-template-columns: 1fr;
  }

  .auth-recaptcha {
    transform-origin: left center;
  }
}


/* =========================================================
   AUTH DESKTOP COMPACT — SEM SCROLL VERTICAL
   Mantém o visual original e reduz apenas alturas/espaços.
========================================================= */

@media (min-width: 861px) {
  html,
  body {
    height: 100%;
  }

  body.auth-page {
    overflow: hidden;
  }

  .auth-shell {
    height: 100vh;
    min-height: 0;
  }

  .auth-visual,
  .auth-form-side {
    min-height: 0;
    height: 100vh;
  }

  .auth-visual {
    padding-top: clamp(18px, 2.2vh, 28px);
    padding-bottom: clamp(18px, 2.5vh, 30px);
  }

  .auth-logo {
    width: clamp(128px, 11vw, 156px);
    height: clamp(70px, 7.2vh, 86px);
  }

  .auth-visual-copy {
    margin-top: clamp(14px, 2.6vh, 32px);
  }

  .auth-visual-copy h2 {
    margin-top: 10px;
    font-size: clamp(40px, 4.4vw, 64px);
  }

  .auth-visual-copy p {
    margin-top: 14px;
    font-size: clamp(13px, 1.05vw, 16px);
    line-height: 1.48;
  }

  .auth-preview {
    width: min(590px, 100%);
    margin-top: clamp(16px, 2.8vh, 30px);
    max-height: clamp(220px, 31vh, 315px);
  }

  .auth-preview-label {
    left: 18px;
    bottom: 18px;
  }

  .auth-preview-label strong {
    font-size: clamp(18px, 1.65vw, 27px);
  }

  .auth-preview-label small {
    font-size: 12px;
  }

  .auth-preview-progress {
    right: 18px;
    bottom: 19px;
  }

  .auth-route {
    padding-top: clamp(12px, 1.8vh, 20px);
  }

  .auth-form-side {
    padding-top: clamp(20px, 2.8vh, 34px);
    padding-bottom: clamp(16px, 2.2vh, 26px);
  }

  .auth-back {
    top: clamp(20px, 2.8vh, 32px);
  }

  .auth-form-card {
    padding: clamp(24px, 2.7vw, 36px);
    border-radius: 20px;
  }

  .auth-form-header h1 {
    margin-top: 8px;
    font-size: clamp(30px, 2.55vw, 40px);
  }

  .auth-form-header p {
    margin-top: 9px;
    line-height: 1.45;
  }

  .auth-message {
    margin-top: 14px;
    padding: 10px 13px;
  }

  .auth-form {
    margin-top: 17px;
    gap: 12px;
  }

  .auth-field-grid {
    gap: 10px;
  }

  .auth-field {
    gap: 6px;
  }

  .auth-input-wrap {
    min-height: 46px;
  }

  .auth-input-wrap input {
    height: 44px;
  }

  .auth-password-toggle {
    width: 36px;
    height: 36px;
  }

  .auth-info-box {
    padding: 11px 13px;
  }

  .auth-info-box > span {
    width: 30px;
    height: 30px;
  }

  .auth-info-box p {
    font-size: 10px;
    line-height: 1.42;
  }

  .auth-recaptcha {
    min-height: 72px;
  }

  .auth-submit {
    min-height: 48px;
  }

  .auth-card-footer {
    margin-top: 15px;
    padding-top: 15px;
  }

  .auth-legal {
    margin-top: 10px;
    font-size: 8px;
  }
}

/* Ajuste extra para notebooks/telas com pouca altura. */
@media (min-width: 861px) and (max-height: 850px) {
  .auth-visual {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .auth-logo {
    width: 120px;
    height: 65px;
  }

  .auth-visual-copy {
    margin-top: 10px;
  }

  .auth-visual-copy h2 {
    margin-top: 7px;
    font-size: clamp(36px, 4vw, 54px);
  }

  .auth-visual-copy p {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.4;
  }

  .auth-preview {
    margin-top: 14px;
    max-height: 245px;
  }

  .auth-route {
    padding-top: 10px;
  }

  .auth-form-side {
    padding-top: 16px;
    padding-bottom: 12px;
  }

  .auth-form-card {
    padding: 22px 28px;
  }

  .auth-form-header h1 {
    font-size: 32px;
  }

  .auth-form-header p {
    margin-top: 7px;
    font-size: 11px;
  }

  .auth-form {
    margin-top: 13px;
    gap: 9px;
  }

  .auth-input-wrap {
    min-height: 42px;
  }

  .auth-input-wrap input {
    height: 40px;
  }

  .auth-recaptcha {
    min-height: 68px;
  }

  .auth-submit {
    min-height: 44px;
  }

  .auth-card-footer {
    margin-top: 11px;
    padding-top: 11px;
  }

  .auth-legal {
    margin-top: 7px;
  }
}


/* =========================================================
   AUTH DESKTOP POLISH V4
   Slightly taller preview/card, visible back button,
   centered reCAPTCHA — still without desktop scroll.
========================================================= */

@media (min-width: 861px) {
  .auth-preview {
    max-height: 272px;
    margin-top: 16px;
  }

  .auth-form-card {
    min-height: 550px;
    padding-top: 26px;
    padding-bottom: 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .auth-back {
    top: 24px;
    min-height: 38px;
    padding: 0 14px;
    gap: 8px;
    color: #d6e2e8;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 999px;
    font-size: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
    transition:
      color .18s ease,
      background .18s ease,
      border-color .18s ease,
      transform .18s ease;
  }

  .auth-back:hover {
    color: var(--auth-teal);
    background: rgba(40, 217, 209, 0.08);
    border-color: rgba(40, 217, 209, 0.35);
    transform: translateY(-1px);
  }

  .auth-recaptcha {
    justify-content: center;
    overflow: visible;
  }

  .auth-recaptcha .g-recaptcha {
    margin-inline: auto;
  }
}

@media (min-width: 861px) and (max-height: 820px) {
  .auth-preview {
    max-height: 255px;
  }

  .auth-form-card {
    min-height: 520px;
    padding-top: 22px;
    padding-bottom: 22px;
  }
}

@media (min-width: 861px) and (max-height: 740px) {
  .auth-preview {
    max-height: 230px;
  }

  .auth-form-card {
    min-height: 490px;
  }
}


/* =========================================================
   AUTH V5 — ACTUAL HEIGHT INCREASES
========================================================= */

@media (min-width: 861px) {
  /* The Passport, please image itself is taller. */
  .auth-preview {
    height: 315px;
    max-height: none;
    aspect-ratio: auto;
    margin-top: 18px;
  }

  /* The information box is genuinely taller, not only re-spaced. */
  .auth-form-card {
    min-height: 610px;
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .auth-legal {
    margin-top: 12px;
    font-size: 11px;
    line-height: 1.45;
  }
}

/* Preserve the larger look on regular notebooks without causing scroll. */
@media (min-width: 861px) and (max-height: 900px) {
  .auth-preview {
    height: 285px;
  }

  .auth-form-card {
    min-height: 565px;
    padding-top: 26px;
    padding-bottom: 26px;
  }

  .auth-legal {
    font-size: 10.5px;
  }
}

/* Compact only on genuinely short desktop viewports. */
@media (min-width: 861px) and (max-height: 760px) {
  .auth-preview {
    height: 235px;
  }

  .auth-form-card {
    min-height: 495px;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .auth-legal {
    margin-top: 7px;
    font-size: 10px;
  }
}


/* =========================================================
   AUTH V6 — HEIGHTS REQUESTED BY JESS
   Final overrides: image, form card, route and legal text.
========================================================= */

@media (min-width: 861px) and (max-height: 900px) {
  .auth-preview {
    height: 325px;
    max-height: none;
    aspect-ratio: auto;
  }

  .auth-form-card {
    min-height: 610px;
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .auth-route {
    margin-top: 26px;
    padding-top: 18px;
  }

  .auth-legal {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.45;
  }
}

/* Keep the same visual intention on shorter notebook screens. */
@media (min-width: 861px) and (max-height: 760px) {
  .auth-preview {
    height: 285px;
  }

  .auth-form-card {
    min-height: 555px;
    padding-top: 25px;
    padding-bottom: 25px;
  }

  .auth-route {
    margin-top: 18px;
    padding-top: 12px;
  }

  .auth-legal {
    margin-top: 10px;
    font-size: 11.5px;
  }
}


/* =========================================================
   AUTH V7 — RESERVE SPACE FOR "VOLTAR PARA O INÍCIO"
   Prevents the back button from overlapping the form card.
========================================================= */

@media (min-width: 861px) {
  .auth-form-side {
    justify-content: flex-start;
    padding-top: 118px;
  }

  .auth-back {
    top: 28px;
    z-index: 5;
  }

  .auth-form-card {
    flex: 0 0 auto;
  }
}

@media (min-width: 861px) and (max-height: 900px) {
  .auth-form-side {
    padding-top: 104px;
    padding-bottom: 18px;
  }

  .auth-back {
    top: 24px;
  }
}

@media (min-width: 861px) and (max-height: 760px) {
  .auth-form-side {
    padding-top: 88px;
    padding-bottom: 10px;
  }

  .auth-back {
    top: 18px;
  }
}
