.rv-auth-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: #070c0e;
  color: var(--text);
}

.rv-auth-scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 14%, rgba(27, 191, 174, .16), transparent 32rem),
    radial-gradient(circle at 84% 80%, rgba(0, 107, 95, .22), transparent 34rem),
    linear-gradient(145deg, #071012 0%, #080d0f 48%, #071416 100%);
}

.rv-auth-grid {
  position: absolute;
  inset: -25%;
  opacity: .2;
  background-image:
    linear-gradient(rgba(127, 231, 226, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 231, 226, .08) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: perspective(700px) rotateX(58deg) translateY(18%);
  transform-origin: center bottom;
  animation: rv-grid-move 24s linear infinite;
  mask-image: linear-gradient(to bottom, transparent, #000 26%, #000 72%, transparent);
}

.rv-auth-orb {
  position: absolute;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(72px);
  opacity: .22;
  background: #1bbfae;
  animation: rv-orb-float 16s ease-in-out infinite alternate;
}
.rv-auth-orb.orb-one { top: -10rem; right: 8%; }
.rv-auth-orb.orb-two { bottom: -14rem; left: 4%; width: 34rem; height: 34rem; animation-delay: -7s; background: #006b5f; }
.rv-auth-orb.orb-three { top: 42%; left: 42%; width: 18rem; height: 18rem; opacity: .1; animation-delay: -3s; }

.rv-auth-beam {
  position: absolute;
  height: 1px;
  width: 46vw;
  background: linear-gradient(90deg, transparent, rgba(127,231,226,.42), transparent);
  transform: rotate(-24deg);
  opacity: .26;
  animation: rv-beam 9s ease-in-out infinite alternate;
}
.rv-auth-beam.beam-one { top: 24%; left: -8%; }
.rv-auth-beam.beam-two { right: -12%; bottom: 19%; animation-delay: -4s; }

.rv-auth-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(320px, .82fr) minmax(440px, 1.18fr);
  gap: 28px;
}

.rv-auth-story {
  min-height: calc(100dvh - 56px);
  padding: clamp(30px, 5vw, 68px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(127, 231, 226, .14);
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(17, 35, 38, .78), rgba(8, 18, 20, .48));
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.rv-story-brand,
.rv-mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
}
.rv-story-brand img { width: 54px; height: 54px; }
.rv-mobile-brand img { width: 40px; height: 40px; }
.rv-story-brand span,
.rv-mobile-brand span { display: grid; line-height: 1.25; }
.rv-story-brand strong { font-size: 21px; direction: ltr; text-align: left; }
.rv-mobile-brand strong { font-size: 17px; direction: ltr; text-align: left; }
.rv-story-brand small,
.rv-mobile-brand small { color: var(--muted); font-size: 11px; }

.rv-story-copy { max-width: 460px; }
.rv-story-kicker,
.rv-auth-kicker {
  display: inline-block;
  color: var(--mint);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 10px;
}
.rv-story-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 1.45;
  letter-spacing: -.04em;
}
.rv-story-copy p { max-width: 440px; font-size: 15px; line-height: 2; }
.rv-story-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}
.rv-story-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(69, 217, 170, .1);
}

.rv-auth-main {
  min-width: 0;
  min-height: calc(100dvh - 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rv-auth-topbar {
  width: min(520px, 100%);
  min-height: 54px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.rv-mobile-brand { display: none; }
.rv-theme-button { width: 42px; height: 42px; background: rgba(18,31,34,.72); backdrop-filter: blur(12px); }

.rv-auth-box {
  width: min(520px, 100%);
  margin-block: auto;
  padding-block: 24px;
}

.rv-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(18, 31, 34, .76);
  backdrop-filter: blur(14px);
}
.rv-auth-tabs a {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 500;
}
.rv-auth-tabs a.active { color: var(--text); background: var(--surface-2); }

.rv-auth-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(22px, 4vw, 32px);
  background: rgba(14, 27, 30, .86);
  backdrop-filter: blur(18px);
}
.rv-auth-heading { margin-bottom: 22px; }
.rv-auth-heading h1 { font-size: clamp(24px, 4vw, 31px); margin: 0 0 7px; letter-spacing: -.025em; }
.rv-auth-heading p { line-height: 1.9; }

.rv-auth-form { gap: 15px; }
.rv-auth-form .field { gap: 7px; }
.rv-auth-form .field > span { color: var(--text); font-weight: 500; }
.rv-auth-form input,
.rv-auth-form select,
.rv-auth-form textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(28, 48, 53, .82);
  outline: 0;
  box-shadow: none !important;
  transform: none !important;
  animation: none !important;
  transition: border-color .12s linear, background-color .12s linear;
}
.rv-auth-form input:hover,
.rv-auth-form select:hover,
.rv-auth-form textarea:hover { border-color: rgba(127, 231, 226, .38); }
.rv-auth-form input:focus,
.rv-auth-form select:focus,
.rv-auth-form textarea:focus,
.rv-auth-form input:focus-visible,
.rv-auth-form select:focus-visible,
.rv-auth-form textarea:focus-visible {
  border-color: var(--action);
  outline: 2px solid rgba(27, 191, 174, .12);
  outline-offset: 0;
  box-shadow: none !important;
  transform: none !important;
  animation: none !important;
}
.rv-auth-form input[readonly] { color: var(--muted); cursor: default; background: rgba(20, 37, 40, .74); }
.rv-auth-form input::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }
.rv-auth-form small { line-height: 1.7; }

.rv-password-row { position: relative; }
.rv-password-row input { padding-left: 72px; }
.rv-password-row button {
  position: absolute;
  left: 7px;
  top: 7px;
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  padding-inline: 10px;
  background: transparent;
  color: var(--action);
  cursor: pointer;
}

.rv-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: var(--muted);
  line-height: 1.6;
  cursor: pointer;
  user-select: none;
}
.rv-check input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 18px;
  border: 0;
  border-radius: 4px;
  accent-color: var(--action);
  box-shadow: none !important;
  animation: none !important;
  transform: none !important;
}
.rv-terms { align-items: flex-start; width: 100%; }
.rv-terms input { margin-top: 3px !important; }

.rv-auth-form .button,
.rv-auth-alt,
.rv-google-button {
  min-height: 50px;
  border-radius: 12px;
  font-weight: 500;
}
.rv-auth-alt { margin-top: 11px; }
.rv-auth-switch { margin-top: 16px; text-align: center; color: var(--muted); }
.rv-auth-switch a { color: var(--action); font-weight: 500; }

.rv-google-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .96);
  color: #18201f;
  text-decoration: none;
}
.rv-google-button:hover { background: #fff; border-color: rgba(255,255,255,.7); }
.rv-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 12px;
}
.rv-auth-divider::before,
.rv-auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }

.rv-otp-input {
  text-align: center !important;
  font-size: 25px !important;
  letter-spacing: .35em;
  direction: ltr;
}
.rv-password-strength {
  padding: 12px;
  border: 1px solid var(--border);
  background: rgba(23, 40, 43, .72);
  border-radius: 12px;
}
.rv-password-strength .password-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.rv-auth-card .flash { margin-bottom: 16px; border-radius: 12px; }

.rv-flow-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.rv-flow-progress span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 11px;
  background: var(--surface);
}
.rv-flow-progress span.active,
.rv-flow-progress span.done { border-color: var(--action); color: #041311; background: var(--action); }
.rv-flow-progress i { width: 50px; height: 1px; background: var(--border-strong); }
.rv-flow-progress i.active,
.rv-flow-progress i.done { background: var(--action); }

.rv-wizard-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}
.rv-wizard-nav button {
  min-width: 0;
  border: 0;
  border-radius: 11px;
  padding: 9px 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  background: var(--surface-2);
  cursor: pointer;
}
.rv-wizard-nav button b {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  font-size: 10px;
}
.rv-wizard-nav button.active { color: var(--text); background: rgba(27, 191, 174, .12); }
.rv-wizard-nav button.active b,
.rv-wizard-nav button.done b { background: var(--action); color: #041311; }
.rv-wizard-panel[hidden] { display: none !important; }
.rv-wizard-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  margin-top: 4px;
}
.rv-wizard-actions .button:only-child { grid-column: 1 / -1; }
.rv-wizard-actions .ghost { min-width: 105px; }

.rv-auth-footer {
  padding-top: 16px;
  display: flex;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}
.rv-auth-footer span + span::before { content: "•"; margin-left: 12px; }

@keyframes rv-grid-move {
  from { background-position: 0 0, 0 0; }
  to { background-position: 54px 54px, 54px 54px; }
}
@keyframes rv-orb-float {
  from { transform: translate3d(-18px, -12px, 0) scale(.96); }
  to { transform: translate3d(28px, 24px, 0) scale(1.08); }
}
@keyframes rv-beam {
  from { opacity: .08; transform: rotate(-24deg) translateX(-6%); }
  to { opacity: .32; transform: rotate(-24deg) translateX(9%); }
}

@media (max-width: 900px) {
  .rv-auth-shell { display: block; width: min(580px, 100%); padding: 16px; }
  .rv-auth-story { display: none; }
  .rv-auth-main { min-height: calc(100dvh - 32px); }
  .rv-auth-topbar { justify-content: space-between; }
  .rv-mobile-brand { display: inline-flex; }
  .rv-auth-box { padding-block: 22px; }
}

@media (max-width: 520px) {
  .rv-auth-shell { padding: 10px; }
  .rv-auth-main { min-height: calc(100dvh - 20px); }
  .rv-auth-card { padding: 20px 15px; border-radius: 18px; }
  .rv-auth-heading h1 { font-size: 23px; }
  .rv-auth-tabs { margin-top: 9px; }
  .rv-auth-box { padding-block: 12px; }
  .rv-wizard-nav button span { display: none; }
  .rv-wizard-actions { grid-template-columns: 1fr 1.5fr; }
  .rv-auth-footer { flex-wrap: wrap; }
}

html[data-theme="light"] .rv-auth-body { background: #f3f8f7; }
@media (prefers-color-scheme: light) {
  html[data-theme="system"] .rv-auth-body { background: #f3f8f7; }
  html[data-theme="system"] .rv-auth-scene {
    background:
      radial-gradient(circle at 18% 14%, rgba(27, 191, 174, .14), transparent 32rem),
      radial-gradient(circle at 84% 80%, rgba(0, 107, 95, .12), transparent 34rem),
      linear-gradient(145deg, #eef8f6, #f7fbfa 48%, #eaf6f3);
  }
  html[data-theme="system"] .rv-auth-card,
  html[data-theme="system"] .rv-auth-tabs,
  html[data-theme="system"] .rv-theme-button { background: rgba(255,255,255,.88); }
}
html[data-theme="light"] .rv-auth-scene {
  background:
    radial-gradient(circle at 18% 14%, rgba(27, 191, 174, .14), transparent 32rem),
    radial-gradient(circle at 84% 80%, rgba(0, 107, 95, .12), transparent 34rem),
    linear-gradient(145deg, #eef8f6, #f7fbfa 48%, #eaf6f3);
}
html[data-theme="light"] .rv-auth-card,
html[data-theme="light"] .rv-auth-tabs,
html[data-theme="light"] .rv-theme-button { background: rgba(255,255,255,.88); }

@media (prefers-reduced-motion: reduce) {
  .rv-auth-scene *,
  .rv-auth-body *,
  .rv-auth-body *::before,
  .rv-auth-body *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
