*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark:   #0d4a2a;
  --green-mid:    #1a6b3a;
  --green-light:  #2d9e5f;
  --green-pale:   #e8f5ed;
  --cream:        #faf9f5;
  --red:          #c0392b;
  --red-light:    #fdf2f2;
  --red-pale:     #fdecea;
  --success:      #1e7e4a;
  --success-bg:   #edfbf3;
  --border:       #e0ddd4;
  --text:         #1a1a1a;
  --muted:        #6b7280;
  --light:        #9ca3af;
}

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
}

/* ── Layout ── */
.page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

/* ── Left Panel ── */
.left {
  flex: 1 1 55%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.left-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.left-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, #2d9e5f55 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, #0d4a2a88 0%, transparent 50%),
    linear-gradient(160deg, #0d4a2a 0%, #1a6b3a 40%, #2d9e5f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.produce-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 2rem;
  max-width: 360px;
}

.p-item {
  aspect-ratio: 1;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  transition: transform 0.3s;
  animation: floatIn 0.6s ease both;
}

.p-item:hover { transform: scale(1.08) rotate(-3deg); }

@keyframes floatIn {
  from { opacity: 0; transform: translateY(20px) scale(0.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.p-item:nth-child(1)  { animation-delay: 0.1s }
.p-item:nth-child(2)  { animation-delay: 0.15s }
.p-item:nth-child(3)  { animation-delay: 0.2s }
.p-item:nth-child(4)  { animation-delay: 0.25s }
.p-item:nth-child(5)  { animation-delay: 0.3s }
.p-item:nth-child(6)  { animation-delay: 0.35s }
.p-item:nth-child(7)  { animation-delay: 0.4s }
.p-item:nth-child(8)  { animation-delay: 0.45s }
.p-item:nth-child(9)  { animation-delay: 0.5s }
.p-item:nth-child(10) { animation-delay: 0.55s }
.p-item:nth-child(11) { animation-delay: 0.6s }
.p-item:nth-child(12) { animation-delay: 0.65s }

.left-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.10) 0%,
    rgba(0,0,0,0.15) 40%,
    rgba(10,50,25,0.82) 100%
  );
}

.left-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.left-logo {
  display: block;
  margin-bottom: 1.5rem;
}

.left-logo img {
  height: 48px;
  width: auto;
  display: block;
}

.left-logo .logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.left-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 3.2vw, 40px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.left-headline em {
  font-style: italic;
  color: #7eebb5;
}

.left-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.78);
  line-height: 1.6;
  max-width: 380px;
  margin-bottom: 1.5rem;
}

.left-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Right Panel ── */
.right {
  flex: 0 0 420px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 2.75rem;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  animation: slideIn 0.5s cubic-bezier(.4,0,.2,1) both;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 2rem;
}

.logo-row .logo img,
.logo-row img {
  height: 44px;
  width: auto;
}

.logo-row .logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.form-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.form-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

/* ── Steps ── */
.steps-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.75rem;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--light);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.step-dot.active {
  background: var(--green-mid);
  color: #fff;
}

.step-dot.done {
  background: var(--success);
  color: #fff;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background 0.3s;
}

.step-line.done {
  background: var(--success);
}

/* ── Fields ── */
.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}

.req { color: var(--red); font-size: 13px; line-height: 1; }

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  color: var(--text);
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.input-wrap input::placeholder { color: var(--light); }

.input-wrap input:focus {
  border-color: var(--green-mid);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(26,107,58,0.12);
}

.input-wrap input.is-valid {
  border-color: var(--success);
  background: var(--success-bg);
}

.input-wrap input.is-invalid {
  border-color: var(--red);
  background: var(--red-light);
}

.input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 15px;
  color: var(--light);
  user-select: none;
  transition: color 0.2s;
}

.input-icon.valid-icon  { color: var(--success); font-size: 13px; }
.input-icon.invalid-icon { color: var(--red); font-size: 13px; }

.field-msg {
  display: none;
  font-size: 11.5px;
  margin-top: 4px;
  padding: 0 2px;
  font-weight: 500;
}

.field-msg.show { display: flex; align-items: center; gap: 4px; }
.field-msg.err  { color: var(--red); }
.field-msg.ok   { color: var(--success); }

/* ── OTP Box ── */
.otp-wrap {
  display: flex;
  gap: 6px;
  margin-bottom: 0.5rem;
  width: 100%;
}

.otp-wrap input {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  height: 46px;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  caret-color: var(--green-mid);
  padding: 0;
}

.otp-wrap input:focus {
  border-color: var(--green-mid);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(26,107,58,0.12);
}

.otp-wrap input.filled {
  border-color: var(--success);
  background: var(--success-bg);
}

.otp-resend {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.otp-resend a {
  color: var(--green-mid);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.otp-resend a:hover { text-decoration: underline; }
.otp-resend a.disabled { color: var(--light); pointer-events: none; }

/* ── Password strength bar ── */
.strength-bar {
  display: none;
  gap: 4px;
  margin-top: 5px;
}

.strength-bar.show { display: flex; }

.s-seg {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: var(--border);
  transition: background 0.3s;
}

.strength-label {
  font-size: 11px;
  margin-top: 3px;
  font-weight: 500;
  display: none;
}

.strength-label.show { display: block; }

/* ── Buttons ── */
.btn-primary {
  width: 100%;
  height: 44px;
  background: var(--green-mid);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.2s, transform 0.1s;
  margin-bottom: 0.9rem;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover { background: var(--green-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary.loading { pointer-events: none; opacity: 0.8; }

/* ── Back link ── */
.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.75rem;
  width: fit-content;
  transition: color 0.2s;
}

.back-link:hover { color: var(--green-mid); }

.back-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Success state ── */
.success-box {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0;
}

.success-box.show { display: flex; }

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--success-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 28px;
  animation: popIn 0.4s cubic-bezier(.17,.67,.35,1.35) both;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.success-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.success-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 280px;
}

/* ── Panels (steps) ── */
.panel { display: none; }
.panel.active { display: block; }

/* ── Info note ── */
.info-note {
  background: var(--green-pale);
  border: 1px solid rgba(26,107,58,0.2);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 12px;
  color: var(--green-dark);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.info-note span { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* ── Timer ── */
#resend-timer { font-weight: 600; color: var(--green-mid); }

/* ── Toast ── */
.toast {
  position: fixed;
  top: 20px; right: 20px;
  background: var(--green-dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .left { flex: 1 1 45%; }
  .right { flex: 0 0 360px; padding: 2.5rem 2rem; }
}

@media (max-width: 680px) {
  .page { flex-direction: column; }
  .left { flex: 0 0 auto; min-height: 300px; justify-content: center; }
  .left-content {
    padding: 2rem 1.5rem;
    align-items: center;
    text-align: center;
  }
  .left-logo { margin-bottom: 1rem; }
  .left-logo img { height: 44px; }
  .left-headline { font-size: clamp(20px, 5vw, 26px); }
  .left-desc { font-size: 13px; max-width: 100%; }
  .left-badges { justify-content: center; }
  .right {
    flex: none;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
  }
  .logo-row {
    justify-content: center;
  }
  .logo-row .logo img,
  .logo-row img { height: 40px; }
}

@media (max-width: 400px) {
  .right { padding: 1.75rem 1.25rem; }
  .left-content { padding: 1.5rem 1rem; }
  .left-headline { font-size: 18px; }
  .left-logo img { height: 38px; }
  .otp-wrap { gap: 4px; }
  .otp-wrap input { height: 38px; font-size: 15px; border-radius: 8px; }
}
