:root {
  --bg: #ebfdff;
  --bg-alt: #f5fafb;
  --surface: #ffffff;
  --text: #063f56;
  --muted: #6f98a3;
  --line: #c9e3e8;
  --primary: #0d5a79;
  --primary-strong: #05445e;
  --accent: #1f8aa0;
  --success: #4fb86b;
  --warning: #d6ab18;
  --danger: #e44f5e;
  --shadow: 0 26px 52px rgba(5, 68, 94, 0.14);
  --radius-lg: 16px;
  --radius-md: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at -20% -15%, rgba(117, 230, 218, 0.25), transparent 60%),
    radial-gradient(1100px 700px at 120% -10%, rgba(31, 138, 160, 0.18), transparent 58%),
    var(--bg);
}

.auth-navbar {
  width: min(1200px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  border-radius: 999px;
  border: 1px solid rgba(6, 63, 86, 0.12);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
}

.auth-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(150deg, #23a5b8, #0c5d7f);
  box-shadow: 0 10px 20px rgba(12, 93, 127, 0.35);
}

.logo-copy strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 0.84rem;
  line-height: 1.1;
}

.logo-copy span {
  font-size: 0.72rem;
  color: var(--muted);
}

.auth-nav-links {
  display: flex;
  gap: 20px;
}

.auth-nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
}

.auth-nav-links a:hover { color: var(--text); }

.ghost-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

.auth-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 16px auto 26px;
  display: grid;
  grid-template-columns: 1.08fr minmax(420px, 0.92fr);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(6, 63, 86, 0.12);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.auth-left {
  position: relative;
  padding: 52px 44px;
  background:
    radial-gradient(700px 360px at 25% 20%, rgba(117, 230, 218, 0.34), transparent 55%),
    radial-gradient(560px 300px at 88% 84%, rgba(31, 138, 160, 0.22), transparent 52%),
    linear-gradient(145deg, #f5fdff 0%, #eaf9fc 55%, #e6f6fb 100%);
}

.left-glow {
  position: absolute;
  right: -120px;
  top: -90px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 118, 144, 0.24), transparent 65%);
  pointer-events: none;
}

.left-kicker {
  margin: 0 0 16px;
  font-size: 0.8rem;
  color: #12748e;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
}

.auth-left h1 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  line-height: 1.18;
  max-width: 460px;
}

.left-subtext {
  margin: 16px 0 26px;
  max-width: 470px;
  color: #517f8a;
  line-height: 1.62;
}

.trust-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trust-list li {
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.84rem;
  color: #0b5a76;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(11, 90, 118, 0.14);
}

.metric-strip {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.metric-strip article {
  border: 1px solid rgba(6, 63, 86, 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.metric-strip strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
}

.metric-strip span {
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-right {
  background: var(--surface);
  padding: 26px;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(430px, 100%);
}

.card-head h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.54rem;
}

.card-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-view { display: none; margin-top: 20px; }
.auth-view.active { display: block; }

.auth-form { display: grid; gap: 14px; }

.field-wrap { display: grid; gap: 6px; }

label {
  font-size: 0.86rem;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
  outline: none;
  border-color: #1790a6;
  box-shadow: 0 0 0 3px rgba(23, 144, 166, 0.14);
}

.optional-hidden { display: none; }
.optional-hidden.visible { display: block; }

.password-row {
  position: relative;
}

.password-row input { padding-right: 72px; }

.toggle-password {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #10758f;
  font-weight: 700;
  cursor: pointer;
}

.field-error {
  min-height: 16px;
  color: var(--danger);
  font-size: 0.79rem;
}

.social-btn,
.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 12px;
  min-height: 44px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.social-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.social-btn span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f2fafc;
  color: #1a7f98;
}

.primary-btn {
  background: linear-gradient(135deg, #18879e, #0c5a78);
  color: #fff;
}

.primary-btn:hover { filter: brightness(1.03); }
.primary-btn:disabled { opacity: 0.7; cursor: wait; }

/* Google Sign-In (overrides gradient from .primary-btn when both classes are used) */
.google-signin {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  background: #fff !important;
  color: #1f1f1f !important;
  border: 1px solid #dadce0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.google-signin:hover {
  filter: none !important;
  background: #f8f9fa !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-signin-icon {
  flex-shrink: 0;
}

.google-helper {
  text-align: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.secondary-btn {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.divider {
  margin-top: 2px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: var(--line);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.inline-links,
.helper-line {
  font-size: 0.84rem;
  color: var(--muted);
}

.inline-links { display: flex; justify-content: flex-end; }

.text-btn {
  border: none;
  background: transparent;
  color: #0f7894;
  padding: 0;
  cursor: pointer;
  font-weight: 700;
  font: inherit;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.consent-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.strength-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.strength-meter span {
  height: 5px;
  border-radius: 99px;
  background: #e6f1f4;
}

.strength-label {
  margin: 0;
  font-size: 0.77rem;
  color: var(--muted);
}

.strength-meter.score-1 span:nth-child(-n+1) { background: #e67a5f; }
.strength-meter.score-2 span:nth-child(-n+2) { background: #e2aa42; }
.strength-meter.score-3 span:nth-child(-n+3) { background: #57b47a; }
.strength-meter.score-4 span:nth-child(-n+4) { background: #20a468; }

.otp-caption {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.89rem;
}

.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.otp-input {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  padding-inline: 0;
}

.resend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.success-state {
  margin-top: 12px;
  border: 1px solid rgba(79, 184, 107, 0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  background: #f2fcf5;
}

.success-state.hidden { display: none; }

.success-state h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
}

.success-state p {
  margin: 6px 0 14px;
  color: #4f8570;
  font-size: 0.9rem;
}

.onboard-head {
  margin-top: 2px;
}

.onboard-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.onboard-progress {
  margin-top: 8px;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #eaf2f4;
  overflow: hidden;
}

.onboard-progress span {
  display: block;
  width: 33.3%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #26a2b7, #0c5a77);
  transition: width 0.2s ease;
}

.onboard-step { display: none; }
.onboard-step.active { display: block; }

.onboard-step h3 {
  margin: 4px 0 4px;
  font-family: "Sora", sans-serif;
  font-size: 1.12rem;
}

.onboard-step p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.goal-grid {
  display: grid;
  gap: 8px;
}

.goal-grid label {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.goal-grid label:has(input:checked) {
  border-color: #0e748f;
  background: #f1fbfd;
}

.personalize-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fbfeff;
}

.personalize-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.personalize-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
}

.onboard-actions {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
}

.security-foot {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.security-foot span {
  font-size: 0.76rem;
  color: #3e7f8f;
  border-radius: 999px;
  border: 1px solid rgba(6, 63, 86, 0.16);
  padding: 6px 10px;
  background: #f7fcfd;
}

.auth-toast {
  position: fixed;
  right: 22px;
  bottom: 20px;
  min-width: 220px;
  max-width: 360px;
  background: #093f58;
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 30;
}

.auth-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-left {
    display: none;
  }

  .auth-right {
    padding: 22px 16px;
  }
}

@media (max-width: 760px) {
  .auth-navbar {
    width: calc(100% - 18px);
    margin-inline: 9px;
    border-radius: 14px;
    padding: 10px 10px;
    gap: 10px;
  }

  .auth-nav-links,
  .logo-copy span,
  .ghost-btn {
    display: none;
  }

  .auth-shell {
    width: calc(100% - 18px);
    margin-inline: 9px;
    border-radius: 16px;
  }

  .card-head h2 {
    font-size: 1.34rem;
  }
}