:root {
  --bg: #eef3fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --ink: #0f172a;
  --muted: #55627a;
  --line: rgba(15, 23, 42, 0.12);
  --primary: #1463ff;
  --primary-2: #00a5d8;
  --accent: #ff9b47;
  --success: #157347;
  --error: #b42318;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-lg: 0 26px 54px rgba(15, 23, 42, 0.14);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.1);
  --font: "Sora", "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(circle at 12% 14%, rgba(20, 99, 255, 0.18), transparent 38%),
    radial-gradient(circle at 92% 88%, rgba(0, 165, 216, 0.16), transparent 42%),
    linear-gradient(160deg, #f7faff 0%, #ebf2fb 50%, #e8eef8 100%);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
}

.auth-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5vw, 60px);
  color: #f8fbff;
  display: grid;
  align-content: center;
  gap: 16px;
  background:
    linear-gradient(160deg, #06122c 0%, #0a2154 46%, #0f2f76 100%);
}

.hero-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(173, 209, 255, 0.4);
  background: rgba(248, 251, 255, 0.12);
  padding: 6px 12px;
  animation: riseIn 0.6s ease both;
}

.hero-ribbon span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #0c2a66;
  background: #e4efff;
  border-radius: 999px;
  padding: 3px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-ribbon p {
  margin: 0;
  font-size: 11px;
  color: #dcedff;
}

.auth-hero::before,
.auth-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 10s ease-in-out infinite;
}

.auth-hero::before {
  width: 360px;
  height: 360px;
  top: -120px;
  right: -100px;
  background: radial-gradient(circle, rgba(0, 165, 216, 0.4), rgba(0, 165, 216, 0));
}

.auth-hero::after {
  width: 280px;
  height: 280px;
  left: -90px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(255, 155, 71, 0.32), rgba(255, 155, 71, 0));
  animation-delay: 1.6s;
}

.auth-hero > * {
  position: relative;
  z-index: 1;
  animation: riseIn 0.7s ease both;
}

.hero-logo {
  width: 128px;
  height: auto;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
}

.hero-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #b7d8ff;
  font-weight: 700;
}

.auth-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 4.5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.7px;
}

.auth-hero p {
  margin: 0;
  max-width: 560px;
  color: #d2e5ff;
  line-height: 1.55;
}

.hero-cta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-hero {
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-hero:hover {
  transform: translateY(-2px);
}

.btn-hero.is-primary {
  color: #0b2a69;
  background: linear-gradient(120deg, #f8fbff, #dbeaff);
  box-shadow: 0 10px 22px rgba(3, 20, 52, 0.28);
}

.btn-hero.is-ghost {
  color: #f8fbff;
  border-color: rgba(248, 251, 255, 0.4);
  background: rgba(248, 251, 255, 0.08);
}

.hero-proof {
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-proof span {
  font-size: 11px;
  color: #e2edff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(248, 251, 255, 0.08);
}

.hero-checks {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.hero-checks li {
  font-size: 12px;
  color: #d4e6ff;
  position: relative;
  padding-left: 18px;
}

.hero-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7bc2ff, #9ce8ff);
  box-shadow: 0 0 0 3px rgba(156, 232, 255, 0.14);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-metric {
  border-radius: 12px;
  border: 1px solid rgba(182, 214, 255, 0.24);
  background: rgba(248, 251, 255, 0.08);
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  animation: riseIn 0.7s ease both;
}

.hero-metric strong {
  font-size: 20px;
  color: #f5f9ff;
  letter-spacing: -0.3px;
}

.hero-metric span {
  font-size: 11px;
  color: #d2e3ff;
}

.hero-metric:nth-child(1) {
  animation-delay: 0.14s;
}

.hero-metric:nth-child(2) {
  animation-delay: 0.22s;
}

.hero-metric:nth-child(3) {
  animation-delay: 0.3s;
}

.hero-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-card {
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(7, 24, 59, 0.85), rgba(9, 35, 86, 0.65));
  border: 1px solid rgba(188, 214, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: riseIn 0.7s ease both;
}

.hero-card:nth-child(1) {
  animation-delay: 0.12s;
}

.hero-card:nth-child(2) {
  animation-delay: 0.2s;
}

.hero-card:nth-child(3) {
  animation-delay: 0.28s;
}

.hero-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #f4f8ff;
}

.hero-card p {
  margin: 0;
  font-size: 12px;
  color: #c7dbfb;
}

.hero-quote {
  margin: 6px 0 0;
  max-width: 620px;
  border-radius: 14px;
  border: 1px solid rgba(198, 220, 255, 0.22);
  background: rgba(248, 251, 255, 0.08);
  padding: 12px 14px;
  color: #eaf3ff;
  font-size: 13px;
  line-height: 1.5;
}

.hero-quote cite {
  margin-top: 6px;
  display: block;
  color: #b8d2fb;
  font-size: 12px;
  font-style: normal;
}

.auth-main {
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 36px);
}

.auth-card {
  width: min(540px, 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(20, 99, 255, 0.14);
  padding: clamp(20px, 3vw, 28px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.94));
  box-shadow: var(--shadow-lg);
  animation: riseIn 0.65s ease both;
}

.auth-head h2 {
  margin: 0;
  font-size: clamp(24px, 2.8vw, 32px);
  letter-spacing: -0.3px;
}

.auth-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-offer {
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid rgba(20, 99, 255, 0.2);
  background: linear-gradient(130deg, rgba(20, 99, 255, 0.1), rgba(0, 165, 216, 0.08));
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  animation: riseIn 0.7s ease both;
  animation-delay: 0.1s;
}

.auth-offer strong {
  font-size: 13px;
  color: #1244a8;
}

.auth-offer span {
  font-size: 12px;
  color: #3c4e69;
}

.auth-trust {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-trust span {
  font-size: 11px;
  color: #274468;
  border-radius: 999px;
  border: 1px solid rgba(39, 68, 104, 0.2);
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 9px;
}

.auth-tabs {
  margin-top: 18px;
  display: inline-flex;
  gap: 8px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid rgba(20, 99, 255, 0.2);
  background: #f3f7ff;
}

.auth-tab {
  border: 0;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  background: transparent;
  color: #30425f;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.auth-tab:hover {
  transform: translateY(-1px);
}

.auth-tab.is-active {
  color: #ffffff;
  background: linear-gradient(120deg, var(--primary), #1d79ff 55%, var(--primary-2));
  box-shadow: 0 8px 18px rgba(20, 99, 255, 0.24);
}

.auth-views {
  margin-top: 16px;
}

.auth-view {
  display: none;
}

.auth-view.is-active {
  display: block;
  animation: fadeSection 0.35s ease;
}

.form-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  color: #1f2f4b;
  font-weight: 600;
}

input,
button,
textarea {
  font-family: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid #d5e1f2;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #70a2ff;
  background: #fcfdff;
  box-shadow: 0 0 0 4px rgba(20, 99, 255, 0.12);
}

.btn-primary,
.btn-outline {
  border-radius: var(--radius-sm);
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary:hover,
.btn-outline:hover {
  transform: translateY(-1px);
}

.btn-primary {
  border: 0;
  color: #ffffff;
  background: linear-gradient(120deg, var(--primary), #1d79ff 55%, var(--primary-2));
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border: 1px solid #cfd8e7;
  background: #ffffff;
  color: #11233f;
}

.btn-outline:hover {
  border-color: #9bb9ef;
  background: #f7faff;
}

.status {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;
}

.status.is-success {
  color: var(--success);
}

.status.is-error {
  color: var(--error);
}

.totp-setup-box {
  border: 1px solid rgba(20, 99, 255, 0.2);
  background: linear-gradient(180deg, #f9fcff, #f2f7ff);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.totp-setup-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #0f2f76;
}
.totp-qr-wrap {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px dashed rgba(20, 99, 255, 0.24);
  background: rgba(255, 255, 255, 0.82);
}

.totp-qr-box {
  width: 172px;
  height: 172px;
  border-radius: 10px;
  background: #ffffff;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.totp-qr-box img,
.totp-qr-box canvas {
  width: 156px !important;
  height: 156px !important;
}

.totp-qr-note {
  margin: 0;
  font-size: 11px;
  color: #4b5e79;
}

.totp-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.totp-setup-actions .btn-outline {
  min-height: 32px;
  font-size: 12px;
}

.auth-foot-note {
  margin-top: 14px;
  font-size: 11px;
  color: #6e7b90;
  line-height: 1.45;
}

.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.welcome-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.welcome-overlay__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 16%, rgba(20, 99, 255, 0.2), transparent 40%),
    radial-gradient(circle at 80% 84%, rgba(0, 165, 216, 0.2), transparent 42%),
    rgba(5, 15, 38, 0.86);
  backdrop-filter: blur(4px);
}

.welcome-overlay__card {
  position: relative;
  width: min(420px, calc(100% - 28px));
  border-radius: 24px;
  border: 1px solid rgba(194, 220, 255, 0.32);
  background: linear-gradient(155deg, rgba(6, 22, 58, 0.94), rgba(12, 44, 103, 0.9));
  box-shadow: 0 26px 52px rgba(1, 9, 28, 0.55);
  color: #f1f7ff;
  padding: 26px 20px 24px;
  text-align: center;
  transform: translateY(12px) scale(0.94);
  opacity: 0;
}

.welcome-overlay.is-active .welcome-overlay__card {
  animation: welcomeCardIn 0.56s cubic-bezier(0.2, 0.78, 0.2, 1) forwards;
}

.welcome-overlay__logo {
  width: 92px;
  height: auto;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.35));
}

.welcome-overlay__kicker {
  margin: 10px 0 0;
  color: #cde1ff;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
}

.welcome-overlay__title {
  margin: 6px 0 0;
  font-size: clamp(34px, 7vw, 50px);
  line-height: 1;
  letter-spacing: -0.9px;
  color: #f8fbff;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSection {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes welcomeCardIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1060px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    padding: 36px 22px 14px;
  }

  .hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .auth-hero h1 {
    font-size: 32px;
  }

  .hero-logo {
    width: 112px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .auth-main {
    padding: 16px;
  }

  .auth-card {
    padding: 18px;
  }
}

@media (max-width: 900px) {
  .auth-hero {
    padding: 24px 16px 10px;
    gap: 12px;
  }

  .hero-grid,
  .hero-metrics,
  .hero-checks,
  .hero-quote {
    display: none;
  }

  .auth-hero h1 {
    font-size: 28px;
    max-width: 100%;
  }

  .auth-hero p {
    font-size: 13px;
    line-height: 1.45;
  }
}

@media (max-width: 720px) {
  .auth-hero {
    padding: 16px 12px 6px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
  }

  .hero-ribbon,
  .hero-proof {
    display: none;
  }

  .hero-logo {
    width: 90px;
  }

  .auth-main {
    padding: 10px;
  }

  .auth-card {
    padding: 14px;
    border-radius: 14px;
  }

  .auth-head h2 {
    font-size: 24px;
  }

  .auth-head p {
    margin-top: 6px;
    font-size: 13px;
  }

  .auth-tabs {
    padding: 4px;
    gap: 4px;
  }

  .auth-tab {
    min-height: 34px;
    font-size: 12px;
    border-radius: 10px;
  }

  .form-grid {
    gap: 8px;
  }

  .form-grid label {
    font-size: 12px;
  }

  .btn-primary,
  .btn-outline {
    min-height: 38px;
    font-size: 12px;
  }

  .totp-setup-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .totp-setup-actions {
    grid-template-columns: 1fr;
  }

  .welcome-overlay__card {
    width: min(320px, 92vw);
    padding: 20px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}


