.auth-body {
  min-height: 100vh;
  background: var(--bg);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(380px, 460px) 1fr;
  min-height: 100vh;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 40px;
  background: var(--dark-chip);
  color: #fff;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .auth-brand {
  background: var(--surface-raised);
  color: var(--ink);
  border-right: 1px solid var(--border);
}
.auth-brand::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 40% 40%, #000 0%, transparent 80%);
  mask-image: radial-gradient(circle at 40% 40%, #000 0%, transparent 80%);
}
.auth-brand::after {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle at 50% 50%, rgba(21, 162, 74, 0.18) 0%, transparent 55%);
  animation: orbitGlow 12s ease-in-out infinite;
  pointer-events: none;
}
@keyframes orbitGlow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  50% { transform: translate(6%, -4%) scale(1.1); opacity: 1; }
}

.auth-brand-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.auth-brand .brand { position: relative; color: #fff; }
[data-theme="dark"] .auth-brand .brand { color: var(--ink); }
.auth-brand .brand-name strong { color: #4ADE80; }
[data-theme="dark"] .auth-brand .brand-name strong { color: var(--green); }

.auth-signin-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r-pill);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  transition: var(--t);
  white-space: nowrap;
  flex-shrink: 0;
}
.auth-signin-top i { font-size: 0.8em; }
.auth-signin-top:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.3);
  transform: translateX(2px);
}
[data-theme="dark"] .auth-signin-top {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}
[data-theme="dark"] .auth-signin-top:hover {
  background: var(--bg);
  border-color: var(--green);
  color: var(--green);
}

.auth-brand-copy { position: relative; z-index: 1; max-width: 340px; }
.auth-brand-copy .pill {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
}
[data-theme="dark"] .auth-brand-copy .pill {
  background: var(--green-soft);
  border-color: rgba(21,162,74,0.25);
  color: var(--green);
}
.auth-brand-copy h2 {
  font-size: 34px; font-weight: 800;
  letter-spacing: -1.4px; line-height: 1.08;
  margin: 20px 0 14px;
}
.auth-brand-copy p {
  font-size: 13px; color: rgba(255,255,255,0.6);
  line-height: 1.6;
}
[data-theme="dark"] .auth-brand-copy p { color: var(--ink-2); }

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 32px 0;
  position: relative;
  z-index: 1;
}
.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  animation: featureSlide 0.6s cubic-bezier(.4, 0, .2, 1) backwards;
  transition: transform 0.3s ease, background 0.3s ease;
}
[data-theme="dark"] .auth-feature {
  background: var(--surface);
  border-color: var(--border);
}
.auth-feature:nth-child(1) { animation-delay: 0.1s; }
.auth-feature:nth-child(2) { animation-delay: 0.25s; }
.auth-feature:nth-child(3) { animation-delay: 0.4s; }
.auth-feature:hover {
  transform: translateX(4px);
  background: rgba(255,255,255,0.08);
}
[data-theme="dark"] .auth-feature:hover { background: var(--bg); }

@keyframes featureSlide {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

.auth-feature-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: rgba(74, 222, 128, 0.12);
  color: #4ADE80;
  font-size: 0.9rem;
  flex-shrink: 0;
}
[data-theme="dark"] .auth-feature-icon {
  background: var(--green-soft);
  color: var(--green);
}
.auth-feature-icon.amber {
  background: rgba(245, 166, 35, 0.12);
  color: #F5A623;
}
[data-theme="dark"] .auth-feature-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}
.auth-feature-icon.blue {
  background: rgba(56, 189, 248, 0.12);
  color: #38BDF8;
}
[data-theme="dark"] .auth-feature-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.auth-feature-text {
  display: flex; flex-direction: column;
  line-height: 1.35; min-width: 0;
}
.auth-feature-text strong {
  font-size: 12.5px; font-weight: 700;
  color: #fff;
}
[data-theme="dark"] .auth-feature-text strong { color: var(--ink); }
.auth-feature-text small {
  font-size: 10.5px;
  color: rgba(255,255,255,0.5);
}
[data-theme="dark"] .auth-feature-text small { color: var(--ink-3); }

.auth-brand-foot { position: relative; z-index: 1; }
.auth-trust-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: rgba(255,255,255,0.55);
  font-weight: 600; letter-spacing: 0.3px;
}
[data-theme="dark"] .auth-trust-row { color: var(--ink-3); }
.auth-trust-row i { color: #4ADE80; }
[data-theme="dark"] .auth-trust-row i { color: var(--green); }

.auth-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  background: var(--bg);
  overflow-y: auto;
}
.auth-container { width: 100%; max-width: 400px; }
.auth-container-wide { max-width: 500px; }

.auth-head { margin-bottom: 26px; }
.auth-head-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.auth-logo-mobile { display: none; }
.auth-logo-mobile img { width: 40px; height: 40px; border-radius: 50%; }
.secure-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: var(--r-xs);
  background: var(--green-soft); color: var(--green-deep);
  border: 1px solid rgba(21, 162, 74, 0.2);
  font-size: 9.5px; font-weight: 800; letter-spacing: 1.2px;
}
[data-theme="dark"] .secure-pill { color: var(--green); }

.auth-head h1 {
  font-size: 26px; font-weight: 700;
  letter-spacing: -0.6px; line-height: 1.15;
  margin-bottom: 6px;
}
.auth-head p { font-size: 13px; color: var(--ink-2); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--ink-2);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0 14px;
  transition: var(--t);
}
.field-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(21, 162, 74, 0.12);
}
.field-wrap.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.field-icon { color: var(--ink-3); font-size: 0.85rem; flex-shrink: 0; }
.field-wrap input,
.field-wrap select {
  flex: 1;
  border: none; outline: none; background: transparent;
  padding: 12px 0;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink);
  min-width: 0;
  width: 100%;
}
.field-wrap select { cursor: pointer; appearance: none; -webkit-appearance: none; }
.field-wrap input::placeholder { color: var(--ink-3); }

.field-action {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  color: var(--ink-3); font-size: 0.85rem;
  border-radius: var(--r-xs);
  transition: var(--t);
  flex-shrink: 0;
}
.field-action:hover { background: var(--surface-raised); color: var(--ink); }

.field-error {
  font-size: 10.5px; font-weight: 600;
  color: var(--red);
  letter-spacing: 0.2px;
  min-height: 0;
}
.field-error:empty { display: none; }

.field-hint {
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.2px;
  line-height: 1.5;
}

.auth-options {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 2px;
}
.checkbox {
  display: inline-flex; align-items: flex-start; gap: 10px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}
.checkbox-block { align-items: flex-start; }
.checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox-mark {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: grid; place-items: center;
  transition: var(--t);
  flex-shrink: 0;
  margin-top: 1px;
}
.checkbox-mark::after {
  content: '';
  width: 8px; height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -2px) scale(0);
  transition: transform .15s ease;
}
.checkbox input:checked + .checkbox-mark {
  background: var(--green);
  border-color: var(--green);
}
.checkbox input:checked + .checkbox-mark::after {
  transform: rotate(-45deg) translate(1px, -2px) scale(1);
}
.checkbox-label {
  font-size: 12px; font-weight: 600;
  color: var(--ink-2);
  line-height: 1.5;
}
.checkbox-label a {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
}

.link-btn {
  font-size: 12px; font-weight: 700;
  color: var(--green);
  letter-spacing: 0.2px;
  transition: var(--t);
}
.link-btn:hover { color: var(--green-deep); }

.btn-block { width: 100%; }

.auth-divider {
  position: relative;
  text-align: center;
  margin: 22px 0 18px;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--hairline);
}
.auth-divider span {
  position: relative;
  padding: 0 12px;
  background: var(--bg);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--ink-3);
  text-transform: uppercase;
}
.auth-signup-cta { text-align: center; }
.auth-signup-cta p {
  font-size: 12.5px; color: var(--ink-2);
  margin-bottom: 10px; font-weight: 600;
}

.auth-legal {
  margin-top: 22px;
  text-align: center;
  font-size: 10.5px;
  color: var(--ink-3);
  line-height: 1.6;
  font-weight: 500;
}
.auth-legal a {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
}

.btn.is-loading { pointer-events: none; opacity: 0.85; }
.btn.is-loading::after {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast.toast-error {
  background: var(--red);
  color: #fff;
}
.toast.toast-error i { color: #fff; }

.wizard {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.wizard-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 0 22px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 5;
}

.wizard-back {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--ink-2);
  cursor: pointer;
  transition: var(--t);
  flex-shrink: 0;
  font-size: 0.9rem;
}
.wizard-back:hover {
  border-color: var(--green);
  color: var(--green);
}

.wizard-progress {
  flex: 1;
  display: flex;
  gap: 3px;
}

.wizard-progress span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-raised);
  transition: background 0.3s ease;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .wizard-progress span { background: var(--border); }
.wizard-progress span.is-done {
  background: var(--green);
  animation: progressFill 0.4s ease;
}
@keyframes progressFill {
  from { transform: scaleX(0.3); }
  to { transform: scaleX(1); }
}

.wizard-counter {
  font-size: 11px; font-weight: 800;
  color: var(--ink-3);
  letter-spacing: 0.3px;
  font-feature-settings: "tnum" 1;
  flex-shrink: 0;
  min-width: 32px;
  text-align: right;
}

.wizard-body {
  flex: 1;
  position: relative;
  min-height: 440px;
  padding-bottom: 20px;
}

.wizard-step {
  display: none;
}
.wizard-step.is-active {
  display: block;
  animation: stepForward 0.4s cubic-bezier(.4, 0, .2, 1);
}
.wizard-step.is-active.is-back {
  animation: stepBackward 0.4s cubic-bezier(.4, 0, .2, 1);
}

@keyframes stepForward {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes stepBackward {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: translateX(0); }
}

.wizard-title {
  margin-bottom: 26px;
}
.wizard-title h2 {
  font-size: 26px; font-weight: 700;
  letter-spacing: -0.7px; line-height: 1.15;
  margin-bottom: 8px;
  color: var(--ink);
}
.wizard-title p {
  font-size: 13.5px; color: var(--ink-2);
  line-height: 1.55;
}

.wizard-info {
  display: flex;
  gap: 12px;
  padding: 13px 14px;
  background: var(--amber-soft);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--r-md);
  margin-bottom: 20px;
  animation: fadeIn 0.5s ease 0.1s backwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.wizard-info i {
  color: var(--amber);
  font-size: 0.95rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.wizard-info p {
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.55;
  font-weight: 500;
}

.wizard-foot {
  position: sticky;
  bottom: 0;
  padding: 16px 0 4px;
  background: linear-gradient(to top, var(--bg) 75%, transparent);
  z-index: 5;
}

.wizard-foot .btn { width: 100%; }

.role-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: var(--t);
  text-align: left;
  font-family: var(--mono);
  width: 100%;
  position: relative;
  overflow: hidden;
}
.role-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.25s ease;
}
.role-card:hover {
  border-color: var(--green);
  transform: translateX(3px);
}
.role-card.is-active {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 3px rgba(21, 162, 74, 0.08);
}
.role-card.is-active::before { background: var(--green); }

.role-card-icon {
  width: 46px; height: 46px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.role-card[data-role="Buyer"] .role-card-icon {
  background: var(--green-soft);
  color: var(--green-deep);
}
.role-card[data-role="Seller"] .role-card-icon {
  background: var(--amber-soft);
  color: var(--amber);
}
.role-card[data-role="Middleman"] .role-card-icon {
  background: var(--blue-soft);
  color: var(--blue);
}
[data-theme="dark"] .role-card[data-role="Buyer"] .role-card-icon { color: var(--green); }
.role-card:hover .role-card-icon { transform: scale(1.05) rotate(-4deg); }

.role-card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}
.role-card-text strong {
  font-size: 14px; font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.role-card-text small {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}

.role-card-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: grid; place-items: center;
  color: #fff;
  transition: var(--t);
  flex-shrink: 0;
  background: var(--surface);
}
.role-card-check i {
  font-size: 0.65rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.role-card.is-active .role-card-check {
  background: var(--green);
  border-color: var(--green);
}
.role-card.is-active .role-card-check i { opacity: 1; }

.review-list {
  display: flex; flex-direction: column; gap: 8px;
}
.review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  gap: 12px;
  animation: fadeIn 0.4s ease backwards;
}
.review-row:nth-child(1) { animation-delay: 0.05s; }
.review-row:nth-child(2) { animation-delay: 0.1s; }
.review-row:nth-child(3) { animation-delay: 0.15s; }
.review-row:nth-child(4) { animation-delay: 0.2s; }
.review-row:nth-child(5) { animation-delay: 0.25s; }
.review-row:nth-child(6) { animation-delay: 0.3s; }

.review-row span:first-child {
  color: var(--ink-3);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 9.5px;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.review-row span:last-child {
  color: var(--ink);
  font-weight: 700;
  font-size: 12.5px;
  text-align: right;
  word-break: break-word;
  min-width: 0;
}

.otp-box {
  padding: 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--t);
}
.otp-box.is-verified {
  border-color: var(--green);
  background: var(--green-soft);
}
.otp-box-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.otp-box-head i {
  color: var(--ink-3);
  font-size: 1rem;
}
.otp-box.is-verified .otp-box-head i { color: var(--green); }
.otp-box-head div {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  min-width: 0;
}
.otp-box-head strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}
.otp-box-head small {
  font-size: 11px;
  color: var(--ink-3);
  word-break: break-word;
}
.otp-box-head .otp-check {
  color: var(--green);
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.otp-box.is-verified .otp-check { opacity: 1; }
.otp-row {
  display: flex;
  gap: 8px;
}
.otp-row input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 6px;
  text-align: center;
  color: var(--ink);
  outline: none;
  transition: var(--t);
  min-width: 0;
}
.otp-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(21, 162, 74, 0.12);
}
.otp-row button {
  padding: 0 18px;
  background: var(--green);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  transition: var(--t);
  flex-shrink: 0;
  font-family: var(--mono);
}
.otp-row button:hover { background: var(--green-dark); }
.otp-row button:disabled { opacity: 0.5; cursor: not-allowed; }
.otp-hint {
  font-size: 10.5px;
  color: var(--ink-3);
  text-align: center;
  letter-spacing: 0.2px;
}
.otp-skip {
  display: block;
  margin: 14px auto 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
  text-decoration: underline;
  transition: var(--t);
}
.otp-skip:hover { color: var(--green); }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: 28px 22px; align-items: flex-start; }
  .auth-logo-mobile { display: block; }
  .wizard-top { padding-bottom: 18px; }
  .wizard-body { min-height: 420px; }
}

@media (max-width: 480px) {
  .auth-panel { padding: 20px 16px; }
  .auth-head h1 { font-size: 22px; }
  .auth-head { margin-bottom: 20px; }
  .field-row { grid-template-columns: 1fr; }
  .wizard-title h2 { font-size: 22px; }
  .role-card { padding: 14px; }
  .role-card-icon { width: 42px; height: 42px; font-size: 1.05rem; }
}