:root {
  --green: #2e5d2e;
  --green-dark: #1f4a1f;
  --accent: #a4e04a;
  --accent-dark: #8fcf32;
  --blue: #2f5fb3;
  --border: #c9c9c9;
  --border-focus: #2e5d2e;
  --text: #222222;
  --text-muted: #555555;
  --error: #c0392b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: #ffffff;
  min-height: 100vh;
}

/* ---------- Header ---------- */

.topbar {
  border-bottom: 1px solid #e3e3e3;
  padding: 18px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
}

.logo-icon {
  width: 40px;
  height: 40px;
  fill: var(--green);
  flex-shrink: 0;
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
}

/* ---------- Stepper ---------- */

.stepper-bar {
  border-bottom: 1px solid #e3e3e3;
  padding: 24px 20px 28px;
}

.stepper-list {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 92px;
  flex-shrink: 0;
}

.stepper-circle {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.stepper-number {
  font-size: 13px;
  font-weight: 700;
  color: #9a9a9a;
}

.stepper-check {
  display: none;
  width: 16px;
  height: 16px;
  color: #ffffff;
}

.stepper-item[data-state="done"] .stepper-circle,
.stepper-item[data-state="active"] .stepper-circle {
  background: var(--green);
  border-color: var(--green);
}

.stepper-item[data-state="done"] .stepper-number,
.stepper-item[data-state="active"] .stepper-number {
  display: none;
}

.stepper-item[data-state="done"] .stepper-check,
.stepper-item[data-state="active"] .stepper-check {
  display: block;
}

.stepper-label {
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  color: #9a9a9a;
}

.stepper-item[data-state="done"] .stepper-label,
.stepper-item[data-state="active"] .stepper-label {
  color: var(--green);
  font-weight: 700;
}

.stepper-arrow {
  flex: 1 1 auto;
  max-width: 48px;
  height: 2px;
  margin-top: 16px;
  background: var(--border);
  position: relative;
}

.stepper-arrow::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid var(--border);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.stepper-arrow[data-state="done"] {
  background: var(--green);
}

.stepper-arrow[data-state="done"]::after {
  border-left-color: var(--green);
}

@media (max-width: 520px) {
  .stepper-item {
    width: 70px;
  }

  .stepper-label {
    font-size: 10.5px;
  }
}

/* ---------- Layout ---------- */

.content {
  display: flex;
  justify-content: center;
  padding: 60px 20px;
}

.card {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 40px 36px;
  text-align: center;
}

.title {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

.subtitle {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

/* ---------- Floating label field ---------- */

.field {
  position: relative;
  margin-bottom: 8px;
  text-align: left;
}

.field input {
  width: 100%;
  padding: 14px 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: transparent;
  color: var(--text);
  transition: border-color 0.15s ease;
}

.field input:focus {
  border-color: var(--border-focus);
}

.field label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: #8a8a8a;
  background: #ffffff;
  padding: 0 4px;
  pointer-events: none;
  transition: top 0.15s ease, font-size 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.field input:focus + label,
.field input.has-value + label {
  top: 0;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--green);
}

.field.has-error input {
  border-color: var(--error);
}

.field.has-error input:focus + label,
.field.has-error input.has-value + label,
.field.has-error label {
  color: var(--error);
}

/* ---------- Email display (read-only step) ---------- */

.field-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: left;
}

.field-display[hidden] {
  display: none;
}

#email-display-value {
  font-size: 15px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-link {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  text-decoration: underline;
}

.edit-link:hover {
  color: var(--green-dark);
}

/* ---------- Password field ---------- */

.field-password input {
  padding-right: 44px;
}

.toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: #777777;
  cursor: pointer;
  padding: 0;
}

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

.eye-icon {
  width: 20px;
  height: 20px;
}

.forgot-link {
  display: inline-block;
  margin: -8px 0 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  text-decoration: underline;
}

.forgot-link[hidden] {
  display: none;
}

.forgot-link:hover {
  color: var(--green-dark);
}

/* ---------- Error message ---------- */

.error-text {
  display: none;
  align-items: center;
  gap: 6px;
  margin: 6px 0 20px;
  font-size: 13px;
  color: var(--error);
  text-align: left;
}

.error-text.visible {
  display: flex;
}

.error-icon {
  width: 16px;
  height: 16px;
  color: var(--error);
  flex-shrink: 0;
}

/* ---------- Buttons & links ---------- */

.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #1b1b1b;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-primary:active {
  transform: translateY(1px);
}

.register-text {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--text);
}

.register-link {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
}

.register-link:hover {
  color: var(--green-dark);
}

/* ---------- Identity verification card ---------- */

.verify-card {
  position: relative;
  overflow: visible;
  padding-top: 56px;
}

.verify-icon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
}

.verify-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.14));
}

.phone-number {
  margin: -8px 0 24px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.resend-text {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--text);
}

.resend-link {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
}

.resend-link:hover {
  color: var(--green-dark);
}

.resend-link.disabled {
  pointer-events: none;
  color: var(--text-muted);
  text-decoration: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 520px) {
  .content {
    padding: 30px 16px;
  }

  .card {
    padding: 32px 22px;
    border-radius: 14px;
  }

  .logo-text {
    font-size: 20px;
  }

  .title {
    font-size: 17px;
  }
}
