/* =========================================================================
   Auth pages (login / signup / password-reset) design system.

   Premium light-mode, broker-grade two-column layout: a branded panel (left,
   with an auto-rotating marketing slider) + a form card (right). Ported from the
   reference design and made broker-themeable: the brand colour is driven by
   --accent / --accent-strong (set as an inline style attribute on .page from the
   resolved login_design), and soft tints are derived from them via color-mix.

   Fonts (Nunito Sans / Vazirmatn) and the page background base come from
   theme.css; this file is only loaded on the auth pages (body.auth-body).
   ========================================================================= */

.auth-body {
  /* ---- Themeable brand tokens (overridden inline on .page per broker) ---- */
  --accent: #6acc6f;
  --accent-strong: #2e7d32;
  --accent-link: color-mix(in srgb, var(--accent-strong) 72%, var(--accent));
  --accent-050: color-mix(in srgb, var(--accent) 12%, #ffffff);
  --accent-100: color-mix(in srgb, var(--accent) 26%, #ffffff);
  --accent-soft: color-mix(in srgb, var(--accent) 46%, #ffffff);
  --ink-on-brand: color-mix(in srgb, var(--accent-strong) 72%, #000000);

  /* ---- Ink / surfaces ---- */
  --ink: #111111;
  --ink-2: #34392f;
  --ink-3: #66695f;
  --bg: #fcfaf5;
  --card: #ffffff;
  --panel-tint: #f5f2ea;
  --line: #ece7db;
  --line-strong: #d9d3c6;

  /* ---- Feedback ---- */
  --success: #2e7d32;
  --success-bg: #e3f3e4;
  --danger: #c0392b;
  --danger-bg: #fbeae7;
  --warn: #8a6d1f;
  --warn-bg: #f4edd9;

  /* ---- Strength meter ---- */
  --pw-weak: #c0392b;
  --pw-fair: #b7d98f;
  --pw-good: var(--accent);
  --pw-strong: var(--accent-strong);

  /* ---- Radii ---- */
  --r-card: 24px;
  --r-field: 14px;
  --r-pill: 999px;

  /* ---- Shadows / rings ---- */
  --shadow-card: 0 24px 60px -30px rgba(34, 46, 26, 0.22), 0 8px 22px -16px rgba(34, 46, 26, 0.14);
  --shadow-sm: 0 1px 2px rgba(34, 46, 26, 0.06);
  --ring: 0 0 0 4px color-mix(in srgb, var(--accent) 32%, transparent);
  --ring-danger: 0 0 0 4px rgba(192, 57, 43, 0.16);

  position: relative;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 12% -8%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(900px 480px at 100% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 55%),
    radial-gradient(820px 600px at 50% 120%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    var(--bg);
}

.auth-body a {
  color: var(--accent-link);
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-body a:hover {
  color: var(--accent-strong);
}

/* --------------------------- Layout shell ------------------------------- */
.auth-body .page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
}

.auth-shell {
  width: 100%;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-shell--wide {
  max-width: 1140px;
}

.auth-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: visible;
  display: grid;
  grid-template-columns: 1.02fr 1fr;
}

/* ----------------------- Top utility bar ------------------------------- */
.auth-utilitybar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 4px;
  min-height: 34px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.back-link:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.back-link svg {
  flex: none;
}

/* ---------------------------- Brand panel ------------------------------- */
.brand-panel {
  position: relative;
  isolation: isolate;
  color: var(--ink-on-brand);
  padding: clamp(30px, 3.6vw, 52px);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--accent) 78%, #ffffff) 0%,
    var(--accent) 52%,
    color-mix(in srgb, var(--accent) 84%, #000000) 100%
  );
  border-start-start-radius: var(--r-card);
  border-end-start-radius: var(--r-card);
}

.brand-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.brand-decor::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -150px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.45), transparent 64%);
  animation: brandFloatA 18s ease-in-out infinite;
}

.brand-decor::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  left: -120px;
  bottom: -130px;
  border-radius: 50%;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--accent) 36%, #ffffff), transparent 66%);
  animation: brandFloatB 22s ease-in-out infinite;
}

@keyframes brandFloatA {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 16px); }
}

@keyframes brandFloatB {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(18px, -14px); }
}

.brand-inner {
  position: sticky;
  top: 16px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
}

.brand-logo__img {
  height: 48px;
  width: auto;
  max-width: 240px;
  display: block;
  object-fit: contain;
}

.brand-wordmark {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink-on-brand);
}

.brand-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink-on-brand) 62%, transparent);
}

.brand-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Frosted glass card holding the rotating slides. */
.brand-slider {
  position: relative;
  isolation: isolate;
  min-height: 360px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 22px 44px -22px rgba(7, 33, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
  animation: brandCardIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.brand-slider:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 56px -22px rgba(7, 33, 11, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.brand-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: clamp(28px, 3vw, 40px);
  opacity: 0;
  transform: translateX(var(--sx, 22px)) scale(0.985);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.brand-slide.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.brand-slide.is-leaving {
  opacity: 0;
  transform: translateX(calc(-1 * var(--sx, 22px))) scale(0.985);
}

.brand-headline {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.16;
  color: var(--ink-on-brand);
  margin: 0;
}

.brand-sub {
  font-size: 15px;
  line-height: 1.6;
  color: color-mix(in srgb, var(--ink-on-brand) 80%, transparent);
  max-width: 44ch;
  margin: 0;
}

@keyframes brandCardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.slide-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.slide-points li {
  position: relative;
  padding-inline-start: 24px;
  font-size: 14px;
  color: color-mix(in srgb, var(--ink-on-brand) 84%, transparent);
}

.slide-points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 3px;
  width: 15px;
  height: 15px;
  background: var(--accent-strong);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.brand-dots {
  display: flex;
  gap: 8px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink-on-brand) 25%, transparent);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.brand-dot.is-active {
  width: 22px;
  background: var(--ink-on-brand);
}

.brand-foot {
  font-size: 12px;
  color: color-mix(in srgb, var(--ink-on-brand) 55%, transparent);
  margin: 0;
}

/* ---------------------------- Form panel -------------------------------- */
.form-panel {
  padding: clamp(28px, 3.4vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  background: var(--bg);
  border-start-end-radius: var(--r-card);
  border-end-end-radius: var(--r-card);
}

.form-inner {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-inner--wide {
  max-width: 560px;
}

.auth-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-link);
}

.auth-title {
  font-size: clamp(22px, 2.2vw, 27px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0;
}

/* ------------------------------- Forms ---------------------------------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-row--phone {
  display: grid;
  gap: 16px;
  grid-template-columns: 140px 1fr;
  direction: ltr;
}

.field-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.field-label .req {
  color: var(--danger);
  margin-inline-start: 2px;
}

.field-input,
.field-select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-field);
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  appearance: none;
}

.field-input::placeholder {
  color: var(--ink-3);
}

.field-input:hover,
.field-select:hover {
  border-color: var(--accent);
}

.field-input:focus,
.field-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
  background: #fff;
}

.field-input:disabled,
.field-input[readonly] {
  background: var(--panel-tint);
  color: var(--ink-2);
  cursor: not-allowed;
}

.field-input.is-invalid,
.auth-field--error .field-input,
.auth-field--error .field-select {
  border-color: var(--danger);
  box-shadow: var(--ring-danger);
}

.field-select {
  padding-inline-end: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.field-help {
  font-size: 12.5px;
  color: var(--ink-3);
  margin: 0;
}

.field-error,
.auth-field__errors p {
  font-size: 12.5px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.field-error::before,
.auth-field__errors p::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 100 20 10 10 0 000-20zm-1 5h2v7h-2zm0 9h2v2h-2z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 100 20 10 10 0 000-20zm-1 5h2v7h-2zm0 9h2v2h-2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.auth-field__errors {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Password field with show/hide toggle */
.password-field {
  position: relative;
}

.password-field .field-input {
  padding-inline-end: 64px;
}

.password-toggle {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  height: 100%;
  padding: 0 12px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--r-field);
}

.password-toggle:hover {
  color: var(--accent-link);
}

/* Password strength meter */
.pw-meter {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}

.pw-meter__seg {
  height: 5px;
  flex: 1;
  border-radius: var(--r-pill);
  background: var(--line);
  transition: background 0.25s ease;
}

.pw-meter[data-score="1"] .pw-meter__seg:nth-child(-n + 1) { background: var(--pw-weak); }
.pw-meter[data-score="2"] .pw-meter__seg:nth-child(-n + 2) { background: var(--pw-fair); }
.pw-meter[data-score="3"] .pw-meter__seg:nth-child(-n + 3) { background: var(--pw-good); }
.pw-meter[data-score="4"] .pw-meter__seg:nth-child(-n + 4) { background: var(--pw-strong); }

.pw-hint {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 7px;
}

.pw-hint strong {
  color: var(--ink-2);
  font-weight: 600;
}

/* Segmented radio control (client type / gender) */
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.seg {
  display: flex;
  flex: 1 1 0;
  min-width: 96px;
  cursor: pointer;
}

.seg__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.seg__pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-field);
  transition: all 0.15s ease;
  user-select: none;
}

.seg:hover .seg__pill {
  border-color: var(--accent-soft);
}

.seg__input:checked + .seg__pill {
  color: var(--accent-strong);
  background: var(--accent-050);
  border-color: var(--accent);
  box-shadow: var(--ring);
  font-weight: 600;
}

.seg__input:focus-visible + .seg__pill {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Checkbox (remember me / terms) */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}

.checkbox input {
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.checkbox input:hover {
  border-color: var(--accent);
}

.checkbox input:checked {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px no-repeat;
  border-color: var(--accent);
}

/* Inline helper rows */
.row-end {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.link-inline {
  display: inline-block;
  font-weight: 600;
  padding: 6px 4px;
  margin: -6px -4px;
}

/* Password requirements box */
.auth-password-guide {
  border: 1px solid var(--accent-100);
  background: var(--accent-050);
  border-radius: var(--r-field);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ink-2);
}

.auth-password-guide > p {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--ink);
}

.auth-password-guide ul {
  margin: 0;
  padding-inline-start: 18px;
  display: grid;
  gap: 4px;
}

/* ------------------------------ Buttons --------------------------------- */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 15px 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 16px;
  color: color-mix(in srgb, var(--accent-strong) 70%, #000000);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 30%, #ffffff) 0%,
    var(--accent) 100%
  );
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow:
    0 8px 20px -10px color-mix(in srgb, var(--accent) 65%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -1px 0 color-mix(in srgb, var(--accent-strong) 18%, transparent);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.28s ease, background 0.28s ease, filter 0.28s ease, border-color 0.28s ease;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 55%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  z-index: -1;
  pointer-events: none;
}

.btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.05);
  box-shadow:
    0 16px 30px -10px color-mix(in srgb, var(--accent) 80%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.btn:hover::after {
  left: 150%;
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  box-shadow: var(--ring);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--block {
  width: 100%;
}

.btn--lg {
  padding: 16px 24px;
  font-size: 15.5px;
}

.btn--ghost {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent-strong) 28%, transparent);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), color-mix(in srgb, var(--accent) 12%, #ffffff));
  box-shadow: 0 6px 16px -10px color-mix(in srgb, var(--accent-strong) 35%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent-strong) 50%, transparent);
  filter: none;
}

.btn-arrow {
  flex: none;
}

/* ------------------------------ Alerts ---------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border-radius: var(--r-field);
  font-size: 14px;
  border: 1px solid transparent;
}

.alert p {
  margin: 0;
}

.alert--error {
  background: var(--danger-bg);
  color: #a11f1f;
  border-color: #f6cfcf;
}

.alert--success {
  background: var(--success-bg);
  color: #0c7a3d;
  border-color: #c5ebd4;
}

.alert--info {
  background: var(--accent-050);
  color: var(--accent-strong);
  border-color: var(--accent-100);
}

.alert--warn {
  background: var(--warn-bg);
  color: #9a5b00;
  border-color: #f6e0b3;
}

/* --------------------- Status icon / centered states -------------------- */
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.center {
  text-align: center;
}

.status-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.status-icon--success { background: var(--success-bg); color: var(--success); }
.status-icon--info { background: var(--accent-050); color: var(--accent-link); }
.status-icon--warn { background: var(--warn-bg); color: var(--warn); }

.form-footer {
  text-align: center;
  font-size: 14px;
  color: var(--ink-2);
}

.form-footer a {
  font-weight: 600;
}

/* Hidden helper data (e.g. password-strength labels read by auth.js) */
.auth-body [hidden] {
  display: none !important;
}

/* ----------------------------- Responsive ------------------------------- */
@media (max-width: 900px) {
  .auth-shell,
  .auth-shell--wide {
    max-width: 560px;
  }

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

  .brand-panel {
    padding: 20px 24px;
    border-radius: var(--r-card) var(--r-card) 0 0;
  }

  .form-panel {
    border-radius: 0 0 var(--r-card) var(--r-card);
  }

  .brand-inner {
    position: static;
    gap: 0;
  }

  .brand-content,
  .brand-foot {
    display: none;
  }
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .field-row--phone {
    grid-template-columns: 120px 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-body * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .brand-slide {
    --sx: 0px;
  }
}

/* ------------------------------- RTL ------------------------------------ */
html[dir="rtl"] .brand-slide {
  --sx: -22px;
}

/* Phone row stays LTR so the country code is on the left. */
html[dir="rtl"] .field-row--phone .field-label {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .field-select {
  background-position: left 12px center;
}

html[dir="rtl"] .btn-arrow {
  transform: scaleX(-1);
}

/* Graceful degradation where color-mix is unsupported. */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .auth-body {
    --accent-link: var(--accent-strong);
    --accent-050: #eef7ef;
    --accent-100: #d6eada;
    --accent-soft: #aadbaf;
    --ink-on-brand: #07210b;
    --ring: 0 0 0 4px rgba(106, 204, 111, 0.32);
  }

  .brand-panel {
    background: linear-gradient(160deg, #7ed884 0%, var(--accent) 52%, #58bf60 100%);
  }

  .btn {
    background: linear-gradient(145deg, #d6eada 0%, var(--accent) 100%);
    color: #07210b;
  }
}
