:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --page: #f5f7f8;
  --panel: #ffffff;
  --brand-panel: #f7f9fa;
  --input: #ffffff;
  --border: #d8e0e6;
  --muted: #657383;
  --text: #17212b;
  --accent: #374151;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--page);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.auth-shell {
  width: min(100%, 1120px);
  min-height: 580px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid #e0e6eb;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 18px 55px rgb(24 39 56 / 8%);
  animation: shell-enter 480ms cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: opacity 320ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 300ms ease;
}

body.is-redirecting .auth-shell {
  opacity: 0.88;
  transform: translateY(-4px) scale(0.992);
  transition: opacity 400ms ease, transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-panel {
  display: flex;
  flex-direction: column;
  padding: 48px;
  border-right: 1px solid #e2e8ec;
  background: var(--brand-panel);
}

.brand-panel .brand {
  animation: brand-fade-in 450ms cubic-bezier(0.16, 1, 0.3, 1) 40ms both;
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe5ea;
  border-radius: 8px;
  background: #edf1f4;
  color: #1f2937;
  font-size: 28px;
  font-weight: 800;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-name {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.brand-region {
  margin-left: 3px;
  padding: 3px 5px;
  border: 1px solid #d4dbe2;
  border-radius: 3px;
  color: #4b5563;
  font-size: 10px;
  font-weight: 650;
  vertical-align: 3px;
}

.brand-caption,
.brand-footer,
.brand-message p {
  color: var(--muted);
}

.brand-caption {
  font-size: 12px;
}

.brand-message {
  margin: auto 0;
  padding: 54px 0;
  animation: brand-fade-in 500ms cubic-bezier(0.16, 1, 0.3, 1) 100ms both;
}

.brand-message h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 4vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.brand-message p {
  max-width: 440px;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

.brand-footer {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid #e2e8ec;
  font-size: 12px;
  animation: brand-fade-in 500ms cubic-bezier(0.16, 1, 0.3, 1) 160ms both;
}

.auth-panel {
  min-width: 0;
  display: flex;
  justify-content: center;
  padding: 24px 40px 28px;
}

.auth-content {
  width: min(100%, 440px);
  margin: auto;
}

.onboarding-header,
.onboarding-header[hidden] {
  display: none;
}

.onboarding-back {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #536273;
  cursor: pointer;
  font-size: 12px;
}

.onboarding-back:hover {
  color: var(--text);
}

.onboarding-back svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.onboarding-back:hover svg {
  transform: translateX(-3px);
}

.onboarding-account {
  justify-self: end;
  color: var(--muted);
  font-size: 11px;
}

.onboarding-back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.language-picker {
  position: relative;
  width: fit-content;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--accent);
}

.language-picker > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.language-picker select {
  max-width: 112px;
  padding: 6px 17px 6px 0;
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
}

.language-picker option {
  background: var(--panel);
}

.language-picker .select-chevron {
  position: absolute;
  right: 7px;
  width: 12px;
  height: 12px;
  color: var(--muted);
  pointer-events: none;
}

.auth-heading {
  margin: 16px 0 18px;
  text-align: center;
}

.auth-heading.text-fade {
  animation: text-fade 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-heading h2 {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.auth-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  border: 1px solid #e1e7eb;
  border-radius: 8px;
  background: #f1f4f6;
  isolation: isolate;
}

.auth-tabs-glider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(24, 39, 56, 0.08), 0 2px 6px rgba(24, 39, 56, 0.04);
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
  pointer-events: none;
}

.auth-tabs[data-active-view="signup"] .auth-tabs-glider {
  transform: translateX(calc(100% + 4px));
}

.auth-tab {
  position: relative;
  z-index: 1;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  transition: color 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-tab:hover:not(.is-active) {
  color: var(--text);
}

.auth-tab.is-active {
  background: transparent;
  color: #1f2937;
}

.auth-tab:focus-visible,
.text-button:focus-visible,
.primary-button:focus-visible,
.google-button:focus-visible,
.password-toggle:focus-visible,
.language-picker:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form[hidden] {
  display: none;
}

.auth-form:not([hidden]) {
  animation: auth-enter 220ms ease-out both;
}

.form-enter-right {
  animation: form-enter-right 260ms cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

.form-enter-left {
  animation: form-enter-left 260ms cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

.step-enter-forward {
  animation: step-enter-forward 260ms cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

.step-enter-backward {
  animation: step-enter-backward 260ms cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

.form-shake {
  animation: form-shake 380ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.signup-form {
  gap: 0;
}

.signup-flow {
  display: grid;
  gap: 20px;
}

.signup-step {
  display: grid;
  gap: 14px;
}

.signup-step[hidden] {
  display: none;
}

.step-heading {
  display: grid;
  gap: 4px;
}

.step-heading h3,
.step-heading p {
  margin: 0;
}

.step-heading h3 {
  font-size: 18px;
  letter-spacing: -0.025em;
}

.step-heading > p:last-child {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.notice-card {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid #e1e7eb;
  border-radius: 8px;
  background: #f8fafb;
  color: #415061;
  font-size: 12px;
  line-height: 1.6;
}

.notice-card p {
  margin: 0;
}

.notice-card a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.consent-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #ffffff;
  color: #344253;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.5;
}

.consent-option input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.consent-option:focus-within {
  border-color: #374151;
}

.optional-label {
  margin-left: 4px;
  color: var(--muted);
  font-size: 10px;
}

.step-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 2px;
}

.step-actions .primary-button,
.step-actions .secondary-button {
  min-height: 40px;
  font-size: 12px;
}

.secondary-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: #344253;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.secondary-button:hover {
  border-color: #aebbc6;
  background: #f3f6f7;
  color: var(--text);
}

.step-actions button:focus-visible,
.interest-chip:focus-visible,
.selected-interest:focus-visible,
.custom-interest .secondary-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.interest-search input,
.custom-interest input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  outline: none;
  background: var(--input);
  color: var(--text);
  font-size: 12px;
}

.interest-search input:focus,
.custom-interest input:focus {
  border-color: #374151;
  box-shadow: 0 0 0 3px rgb(55 65 81 / 12%);
}

.interest-search input::placeholder,
.custom-interest input::placeholder {
  color: #758393;
}

.interest-list {
  max-height: 154px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 7px;
  overflow-y: auto;
  padding: 1px 2px 4px 1px;
}

#interest-list[data-no-matches="true"]::after {
  color: var(--muted);
  content: "No matching suggestions. Add your own below.";
  font-size: 11px;
}

.interest-chip {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #d5dee5;
  border-radius: 18px;
  background: transparent;
  color: #344253;
  cursor: pointer;
  font-size: 10px;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.interest-chip:hover,
.interest-chip[aria-pressed="true"] {
  border-color: #c7d2df;
  background: #eef2f7;
  color: #374151;
}

.custom-interest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.custom-interest .secondary-button {
  min-width: 64px;
}

.selected-interests {
  display: grid;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid #e1e7eb;
}

.selected-interests-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #344253;
  font-size: 11px;
}

.selected-interests-heading span:last-child {
  color: var(--muted);
}

.selected-interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.selected-interest {
  padding: 5px 9px;
  border: 1px solid #c7d2df;
  border-radius: 14px;
  background: #eef2f7;
  color: #374151;
  cursor: pointer;
  font-size: 10px;
}

.verification-notice {
  border-color: #d5dee5;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

body.is-onboarding {
  min-height: 100vh;
  padding: 0;
}

.is-onboarding .auth-shell {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.is-onboarding .brand-panel,
.is-onboarding .language-picker,
.is-onboarding .auth-heading,
.is-onboarding .auth-tabs,
.is-onboarding .divider,
.is-onboarding .google-button,
.is-onboarding .switch-prompt {
  display: none;
}

.is-onboarding .auth-panel {
  display: block;
  padding: 0;
}

.is-onboarding .auth-content {
  width: 100%;
  height: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  margin: 0;
}

.is-onboarding .onboarding-header {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 8px 24px;
  border-bottom: 1px solid #e5eaee;
}

.is-onboarding .onboarding-brand {
  justify-self: center;
  gap: 8px;
}

.is-onboarding .onboarding-brand .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 20px;
}

.is-onboarding .onboarding-brand .brand-name {
  font-size: 15px;
}

.is-onboarding .onboarding-brand .brand-caption {
  font-size: 9px;
}

.is-onboarding .signup-form {
  min-height: 0;
  flex: 1;
  display: flex;
  padding: 16px 24px;
}

.is-onboarding .signup-flow {
  min-height: 100%;
  flex: 1;
  display: flex;
}

.is-onboarding .signup-step:not([hidden]) {
  width: min(100%, 420px);
  margin: auto;
  padding: 20px 0;
}

.is-onboarding .step-heading h3 {
  font-size: 22px;
}

.is-onboarding .step-heading > p:last-child {
  font-size: 13px;
}

.is-onboarding .step-actions .primary-button {
  width: fit-content;
  min-width: 72px;
  padding-inline: 18px;
}

.is-onboarding .form-status:not(:empty) {
  margin: 0 24px 16px;
}

.divider[hidden],
.google-button[hidden] {
  display: none;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.required {
  color: #c2413b;
}

.field input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  outline: none;
  background: var(--input);
  color: var(--text);
  font-size: 12px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input::placeholder {
  color: #758393;
  opacity: 1;
}

.field input:focus {
  border-color: #374151;
  box-shadow: 0 0 0 3px rgb(55 65 81 / 12%);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap > input {
  padding-left: 40px;
}

.input-wrap > input:has(~ .password-toggle) {
  padding-right: 42px;
}

.password-field > input {
  padding-right: 42px;
  padding-left: 12px;
}

.password-guidance {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #f8fafb;
  animation: guidance-enter 180ms ease-out both;
}

.password-guidance[hidden] {
  display: none;
}

.password-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.strength-bars {
  display: flex;
  gap: 3px;
}

.strength-bars i {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: #d8e0e6;
  transition: background-color 180ms ease;
}

.password-strength[data-strength="1"] .strength-bars i:nth-child(1) {
  background: #e36c67;
}

.password-strength[data-strength="2"] .strength-bars i:nth-child(-n+2) {
  background: #e2b95f;
}

.password-strength[data-strength="3"] .strength-bars i:nth-child(-n+3) {
  background: #475569;
}

.password-requirements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  list-style: none;
}

.password-requirements li::before {
  margin-right: 5px;
  color: #748ba8;
  content: "○";
}

.password-requirements li.is-met {
  color: #374151;
}

.password-requirements li.is-missing {
  color: #f08b8b;
}

.password-requirements li.is-missing::before {
  color: #f08b8b;
  content: "×";
}

.password-requirements li {
  transition: color 160ms ease;
}

.password-requirements li.is-met::before {
  color: var(--accent);
  content: "✓";
}

.input-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #758393;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  pointer-events: none;
}

.input-prefix {
  position: absolute;
  left: 12px;
  color: #657383;
  font-size: 14px;
  pointer-events: none;
}

.password-toggle {
  position: absolute;
  right: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #657383;
  cursor: pointer;
  transition: color 140ms ease, transform 140ms ease;
}

.password-toggle:hover {
  color: var(--accent);
  transform: scale(1.08);
}

.password-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
  font-size: 12px;
}

.remember-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.remember-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #374151;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  font-weight: 650;
}

.text-button:hover {
  color: #1f2937;
}

.text-button,
.google-button,
.primary-button {
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.primary-button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 14px;
  border: 0;
  border-radius: 5px;
  background: #374151;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.primary-button:hover:not(:disabled) {
  background: #2a3340;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 51, 64, 0.16);
}

.primary-button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: none;
}

.primary-button.is-loading {
  background: #2a3340;
  cursor: wait;
}

.primary-button.is-success {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

.button-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: button-spin 0.65s linear infinite;
  flex: 0 0 16px;
}

.button-success-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: checkmark-pop 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
  flex: 0 0 17px;
}

.primary-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #758393;
  font-size: 10px;
  white-space: nowrap;
}

.divider::before,
.divider::after {
  height: 1px;
  flex: 1;
  background: #e1e7eb;
  content: "";
}

.google-button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--input);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.google-button:hover {
  border-color: #aebbc6;
  background: #f3f6f7;
}

.google-mark {
  width: 16px;
  height: 16px;
}

.switch-prompt {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.form-status {
  min-height: 0;
  margin: 0;
  color: #374151;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.form-status.is-error {
  color: #b42318;
}

.form-status:not(:empty) {
  margin-top: 12px;
  animation: status-enter 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes shell-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes brand-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auth-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes form-enter-right {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes form-enter-left {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes text-fade {
  from {
    opacity: 0.3;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes step-enter-forward {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes step-enter-backward {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes form-shake {
  0%, 100% {
    transform: translateX(0);
  }
  15%, 45%, 75% {
    transform: translateX(-6px);
  }
  30%, 60%, 90% {
    transform: translateX(6px);
  }
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes checkmark-pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes guidance-enter {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes status-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  body {
    padding: 16px;
  }

  .auth-shell {
    width: min(100%, 440px);
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .brand-panel {
    display: none;
  }

  .auth-panel {
    padding: 20px 24px 24px;
  }

  body.is-onboarding {
    align-items: start;
    padding: 0;
  }

  .is-onboarding .auth-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .is-onboarding .auth-content {
    min-height: 100vh;
  }

  .is-onboarding .onboarding-header {
    min-height: 54px;
    padding: 8px 14px;
  }

  .is-onboarding .signup-form {
    padding: 12px 20px;
  }
}

@media (max-width: 420px) {
  body {
    padding: 8px;
  }

  .auth-panel {
    padding: 16px;
  }

  .is-onboarding .onboarding-header {
    grid-template-columns: 1fr auto 1fr;
    padding-inline: 10px;
  }

  .is-onboarding .onboarding-brand {
    gap: 5px;
  }

  .is-onboarding .onboarding-brand .brand-caption {
    display: none;
  }

  .is-onboarding .onboarding-account {
    font-size: 9px;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .auth-heading h2 {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   AUTH SUBDIALOGS (Forgot Password & Two-Factor Authentication)
───────────────────────────────────────────────────────────────────────────── */
.auth-subdialog {
  width: min(440px, calc(100vw - 28px));
  max-width: 440px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 20px 48px -12px rgba(15, 23, 42, 0.22);
}

.auth-subdialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.auth-subdialog-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.auth-subdialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 16px;
}

.auth-subdialog-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.auth-subdialog-subtitle {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
}

.auth-subdialog-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-subdialog-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.auth-subdialog-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.code-notice-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.45;
}

.code-notice-box strong {
  color: #0f172a;
}

.otp-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.otp-wrap .input-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: #64748b;
  pointer-events: none;
  z-index: 2;
}

.otp-wrap .otp-badge {
  position: absolute;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 7px;
  border-radius: 5px;
  pointer-events: none;
  z-index: 2;
  text-transform: uppercase;
}

.otp-input-clean {
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
  padding: 0 54px 0 42px !important;
  text-align: center !important;
  font-family: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', monospace !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.32em !important;
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
}

.otp-input-clean::placeholder {
  color: #94a3b8 !important;
  letter-spacing: 0.28em !important;
  opacity: 0.7 !important;
  font-weight: 500 !important;
}

.otp-input-clean:focus {
  background: #ffffff !important;
  border-color: #0f172a !important;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.05) !important;
  outline: none !important;
}

.auth-dialog-status {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 2px 0;
}

.auth-dialog-status.is-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.auth-dialog-status.is-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.two-factor-resend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: -4px;
}

.auth-subdialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

