:root {
  --primary: #3ea32e;
  --primary-dark: #2f8221;
  --primary-light: #5cbe4a;
  --accent: #c98a40;
  --accent-light: #e0b070;
  --bg: #f2faf0;
  --bg-alt: #e0f5da;
  --surface: #ffffff;
  --text: #153a0d;
  --text-secondary: #256518;
  --text-light: #5c8f50;
  --border: #bce9b1;
  --border-dark: #8dd67d;
  --success: #2f8221;
  --font-display: 'Lora', serif;
  --font-body: 'Nunito', sans-serif;
  --shadow-sm: 0 8px 24px rgba(46, 130, 28, 0.12);
  --shadow-lg: 0 20px 48px rgba(46, 130, 28, 0.16);
}

.register-page {
  background: #ffffff;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  height: 100vh;
  overflow: hidden;
}

.register-shell {
  display: grid;
  grid-template-columns: minmax(390px, 0.86fr) minmax(500px, 1.14fr);
  height: 100vh;
}

.register-visual {
  background:
    linear-gradient(135deg, rgba(21, 58, 13, 0.9), rgba(47, 130, 33, 0.78)),
    url("https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  padding: 32px 40px;
  position: relative;
}

.register-visual::after {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent 48%);
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.register-brand,
.visual-copy,
.signup-preview {
  position: relative;
  z-index: 1;
}

.register-brand {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  width: fit-content;
}

.register-brand-icon {
  align-items: center;
  background: #ffffff;
  border-radius: 12px;
  color: var(--primary);
  display: flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.register-brand > span:last-child {
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
}

.register-brand > span:last-child span {
  color: var(--accent-light);
}

.visual-copy {
  max-width: 560px;
}

.visual-kicker {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.visual-copy h1 {
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1.08;
  margin-bottom: 18px;
}

.visual-copy p:last-child {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  max-width: 460px;
}

.signup-preview {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 20px;
  display: flex;
  gap: 14px;
  max-width: 430px;
  padding: 18px;
}

.preview-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  display: flex;
  flex-shrink: 0;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.signup-preview strong {
  display: block;
}

.signup-preview small {
  color: rgba(255, 255, 255, 0.74);
  display: block;
  line-height: 1.5;
  margin-top: 3px;
}

.register-panel {
  align-items: center;
  background: linear-gradient(180deg, rgba(242, 250, 240, 0.9), #ffffff 74%);
  display: flex;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: 18px 24px;
}

.register-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  max-width: 590px;
  padding: 20px 30px;
  width: 100%;
}

.register-card-header {
  margin-bottom: 10px;
}

.register-card-header .section-label {
  margin-bottom: 7px;
}

.register-card-header h2 {
  font-family: var(--font-display);
  font-size: 1.62rem;
  margin-bottom: 4px;
}

.register-card-header p:last-child {
  color: var(--text-secondary);
  margin: 0;
}

.register-progress {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 16px;
}

.register-progress span {
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  display: flex;
  font-size: 0.8rem;
  font-weight: 900;
  height: 30px;
  justify-content: center;
}

.register-progress span.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.form-step {
  display: none;
  min-height: 280px;
}

.form-step.active {
  display: block;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group {
  margin-bottom: 12px;
}

.register-section {
  margin-bottom: 14px;
}

.register-section-head {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.register-section-head > span {
  align-items: center;
  background: var(--bg);
  border-radius: 12px;
  color: var(--primary);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.register-section-head .section-label {
  font-size: 0.72rem;
  margin: 0 0 4px;
}

.register-section-head h3 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin: 0;
}

.register-role-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.register-role-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 15px;
  cursor: pointer;
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 12px 40px 12px 12px;
  position: relative;
  transition: var(--transition);
}

.register-role-card:hover,
.register-role-card:has(input:checked) {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(62, 163, 46, 0.12);
}

.register-role-card input {
  accent-color: var(--primary);
  height: 17px;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 17px;
}

.role-card-icon {
  align-items: center;
  background: #ffffff;
  border-radius: 12px;
  color: var(--primary);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.register-role-card strong {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.15;
}

.register-role-card small {
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
}

.current-location-btn {
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 900;
  gap: 8px;
  justify-content: center;
  margin-left: auto;
  min-height: 40px;
  padding: 0 14px;
  transition: var(--transition);
  white-space: nowrap;
}

.current-location-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.current-location-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.form-group label {
  color: var(--text);
  display: block;
  font-size: 0.82rem;
  font-weight: 900;
  margin-bottom: 7px;
}

.register-input-wrap {
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 15px;
  display: flex;
  gap: 10px;
  padding: 0 13px;
  transition: var(--transition);
}

.register-input-wrap:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(62, 163, 46, 0.12);
}

.register-input-wrap > i {
  color: var(--text-light);
}

.register-input-wrap input,
.register-input-wrap select {
  background: transparent;
  color: #0b2606;
  flex: 1;
  font-size: 0.98rem;
  font-weight: 800;
  min-width: 0;
  padding: 12px 0;
}

.register-input-wrap input::placeholder {
  color: rgba(92, 143, 80, 0.64);
  opacity: 1;
}

.phone-input-wrap {
  grid-template-columns: auto 74px 1fr;
}

.phone-input-wrap select {
  appearance: none;
  border: 0;
  border-right: 1.5px solid var(--border);
  cursor: pointer;
  flex: 0 0 68px;
  margin-right: 2px;
  outline: 0;
  padding-right: 10px;
  width: 68px;
}

.phone-input-wrap input {
  flex: 1;
}

.register-input-wrap input:-webkit-autofill,
.register-input-wrap input:-webkit-autofill:hover,
.register-input-wrap input:-webkit-autofill:focus,
.register-input-wrap input:-webkit-autofill:active {
  -webkit-text-fill-color: #0b2606;
  color: #0b2606;
  box-shadow: 0 0 0 1000px var(--bg) inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
}

.register-input-wrap:has(input:-webkit-autofill) {
  background: var(--bg);
}

.register-input-wrap input::selection {
  background: var(--bg-alt);
  color: var(--text);
}

.password-toggle {
  align-items: center;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.password-helper {
  margin: -3px 0 12px;
}

.strength-track {
  background: var(--bg-alt);
  border-radius: 999px;
  display: block;
  height: 7px;
  overflow: hidden;
}

.strength-track span {
  background: var(--accent);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: var(--transition);
  width: 28%;
}

.password-helper small {
  color: var(--text-secondary);
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  margin-top: 6px;
}

.terms-row {
  align-items: center;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 9px;
  margin: 0 0 14px;
}

.terms-row input {
  accent-color: var(--primary);
  height: 16px;
  width: 16px;
}

.terms-row a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.register-divider {
  align-items: center;
  color: var(--text-secondary);
  display: flex;
  font-size: 0.8rem;
  font-weight: 800;
  gap: 12px;
  margin: 11px 0;
}

.register-divider::before,
.register-divider::after {
  background: var(--border);
  content: '';
  flex: 1;
  height: 1px;
}

.google-register-btn {
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 15px;
  color: var(--text);
  display: flex;
  font-size: 0.9rem;
  font-weight: 900;
  gap: 10px;
  justify-content: center;
  min-height: 44px;
  transition: var(--transition);
  width: 100%;
}

.google-register-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.google-mark {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 50%;
  color: #4285f4;
  display: flex;
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.step-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.step-actions .btn {
  font-size: 0.86rem;
  padding: 10px 18px;
}

.step-actions [hidden] {
  display: none;
}

.register-step-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.register-step-actions .btn {
  font-size: 0.86rem;
  justify-content: center;
  min-width: 132px;
  padding: 10px 18px;
}

.register-step-actions [hidden],
.terms-row[hidden] {
  display: none;
}

.register-submit {
  font-weight: 900;
}

.login-callout {
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 10px 14px;
}

.login-callout span {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 800;
}

.login-callout a {
  align-items: center;
  background: var(--primary);
  border-radius: 12px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 900;
  justify-content: center;
  padding: 9px 14px;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .register-visual {
    padding: 28px;
  }

  .visual-copy h1 {
    font-size: 2.12rem;
  }
}

@media (max-width: 960px) {
  .register-page {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .register-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .register-visual {
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .register-visual {
    display: none;
  }

  .register-panel {
    min-height: 100vh;
    overflow: visible;
    padding: 20px 14px;
  }

  .register-card {
    border-radius: 20px;
    padding: 24px 18px;
  }

  .form-step {
    min-height: auto;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .register-role-grid {
    grid-template-columns: 1fr;
  }

  .register-section-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .current-location-btn {
    margin-left: 48px;
  }

  .step-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .step-actions .btn,
  .register-step-actions .btn {
    justify-content: center;
    width: 100%;
  }

  .register-step-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .login-callout {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .login-callout a {
    width: 100%;
  }
}
