@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700&display=swap');

* { box-sizing: border-box; }

.reg-wrapper {
  display: flex;
  min-height: calc(100vh - 80px);
  background: #f4f9f6;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* -- Sidebar -- */
.reg-sidebar {
  display: none;
}
@media (min-width: 992px) {
  .reg-sidebar {
    display: flex;
    flex-direction: column;
    width: 360px;
    flex-shrink: 0;
    background: #1a5c38;
    padding: 52px 40px;
    color: #fff;
    position: relative;
    overflow: hidden;
  }
}

/* decorative blobs */
.reg-sidebar::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,92,56,0.22) 0%, transparent 70%);
  pointer-events: none;
}
.reg-sidebar::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -60px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,92,56,0.14) 0%, transparent 70%);
  pointer-events: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 44px;
  position: relative;
  z-index: 1;
}
.sidebar-brand-dot {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #1a5c38, #27ae60);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.sidebar-brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
}
.sidebar-brand-name span {
  color: #1a5c38;
}

.sidebar-headline {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.sidebar-headline em {
  font-style: normal;
  color: #1a5c38;
}

.sidebar-sub {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.65;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

/* step nav */
.reg-step-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
}
.step-connector {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.1);
  margin-left: 22px;
}
.reg-step-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 14px;
  cursor: default;
  transition: background 0.25s ease;
}
.reg-step-item.clickable { cursor: pointer; }
.reg-step-item.active {
  background: rgba(26,92,56,0.12);
  border: 1px solid rgba(26,92,56,0.2);
}
.reg-step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.35);
  border: 1.5px solid rgba(255,255,255,0.1);
}
.reg-step-item.active .reg-step-dot {
  background: #1a5c38;
  color: #fff;
  border-color: #1a5c38;
  box-shadow: 0 0 0 4px rgba(26,92,56,0.2);
}
.reg-step-item.completed .reg-step-dot {
  background: rgba(26,92,56,0.2);
  color: #1a5c38;
  border-color: rgba(26,92,56,0.3);
}
.step-text { flex: 1; }
.reg-step-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  display: block;
  transition: color 0.25s;
}
.reg-step-item.active .reg-step-label { color: #fff; }
.reg-step-item.completed .reg-step-label { color: rgba(255,255,255,0.55); }
.reg-step-desc {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.25);
  margin-top: 1px;
}
.reg-step-item.active .reg-step-desc { color: rgba(255,255,255,0.45); }

.sidebar-footer {
  margin-top: auto;
  padding-top: 40px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-footer::before {
  content: '\1F33F';
  font-size: 12px;
}

/* -- Main -- */
.reg-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 80px;
  overflow-y: auto;
}
.reg-card {
  width: 100%;
  max-width: 600px;
}

/* header */
.reg-header {
  margin-bottom: 32px;
}
.reg-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1a5c38;
  margin-bottom: 8px;
}
.reg-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0d1f12;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.reg-header p {
  color: #8a9e8a;
  font-size: 0.875rem;
  margin: 0;
}
.reg-header p a {
  color: #1a5c38;
  font-weight: 600;
  text-decoration: none;
}
.reg-header p a:hover { text-decoration: underline; }

/* segmented progress */
.reg-progress-track {
  display: flex;
  gap: 6px;
  margin-bottom: 36px;
}
.prog-seg {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: #dce9dc;
  overflow: hidden;
  position: relative;
}
.prog-seg-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #1a5c38, #29a56c);
  border-radius: 99px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.prog-seg.done .prog-seg-fill { transform: scaleX(1); }
.prog-seg.active .prog-seg-fill { transform: scaleX(1); background: #1a5c38; }

/* mobile steps */
.reg-steps-mobile {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}
@media (min-width: 992px) {
  .reg-steps-mobile { display: none; }
}
.step-pill {
  flex: 1;
  text-align: center;
  padding: 7px 4px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #aac0aa;
  background: #eaf3ea;
  transition: all 0.25s ease;
  cursor: default;
}
.step-pill.clickable { cursor: pointer; }
.step-pill.active {
  background: #1a5c38;
  color: #fff;
}
.step-pill.completed {
  background: #d4f0e0;
  color: #1a6e42;
}

/* section title */
.reg-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a5c38;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.reg-section-title i { font-size: 14px; }

/* field layout */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 576px) {
  .field-row { grid-template-columns: 1fr; }
}
.field-group {
  margin-bottom: 18px;
}
.field-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a664a;
  margin-bottom: 7px;
  letter-spacing: 0.025em;
}
.field-group label .req {
  color: #e05252;
  margin-left: 2px;
}

/* inputs */
.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="password"],
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #dae8d8;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #0d1f12;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.field-group input::placeholder,
.field-group textarea::placeholder {
  color: #b8ccb8;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: #1a5c38;
  box-shadow: 0 0 0 3.5px rgba(26,92,56,0.12);
  background: #fafffc;
}
.field-group input.field-has-error,
.field-group select.field-has-error {
  border-color: #e05252;
  box-shadow: 0 0 0 3px rgba(224,82,82,0.1);
}
.field-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%2388a888' d='M5 7L0 2h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
  cursor: pointer;
}
.field-group textarea {
  resize: vertical;
  min-height: 82px;
  line-height: 1.6;
}

/* toggle */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: #f4f9f6;
  border: 1.5px solid #e0ede0;
  border-radius: 12px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.toggle-row:hover {
  background: #ecf6f0;
  border-color: #c8dec8;
}
.toggle-switch {
  position: relative;
  width: 42px; height: 22px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0; width: 0; height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #cddccd;
  border-radius: 22px;
  transition: background 0.25s;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.toggle-switch input:checked + .toggle-slider { background: #1a5c38; }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(20px); }
.toggle-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #3a5a3a;
}

/* password */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 13px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer;
  color: #aac0aa; font-size: 15px;
  padding: 4px;
  transition: color 0.2s;
}
.pw-toggle:hover { color: #1a5c38; }

/* address section */
.address-section {
  background: #f4f9f6;
  border: 1.5px solid #dae8d8;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
}
.address-section h5 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3a6a3a;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.address-section h5 i { color: #1a5c38; font-size: 13px; }

.divider {
  border: none;
  border-top: 1px solid #e4ede4;
  margin: 24px 0;
}

/* terms */
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 18px;
  margin-bottom: 4px;
}
.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid #b0ccb0;
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.custom-checkbox:checked {
  background: #1a5c38;
  border-color: #1a5c38;
}
.custom-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 3px; left: 5px;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}
.terms-row label {
  font-size: 0.84rem;
  color: #6a886a;
  cursor: pointer;
  line-height: 1.55;
}
.terms-row label a {
  color: #1a5c38;
  font-weight: 600;
  text-decoration: none;
}
.terms-row label a:hover { text-decoration: underline; }

/* actions */
.reg-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  gap: 12px;
}
.btn-back {
  padding: 11px 22px;
  background: #f4f9f6;
  color: #2d5a3d;
  border: 2px solid #b8ccb8;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-back:hover {
  background: #e8f3ec;
  border-color: #1a5c38;
  color: #1a5c38;
}
.btn-next, .btn-submit {
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
.btn-next {
  background: #1a5c38;
  color: #fff;
  box-shadow: 0 3px 12px rgba(11,46,26,0.25);
}
.btn-next:hover {
  background: #0f3d23;
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(11,46,26,0.3);
}
.btn-submit {
  background: linear-gradient(135deg, #1a5c38 0%, #0d3d22 100%);
  color: #fff;
  box-shadow: 0 3px 14px rgba(26,92,56,0.35);
}
.btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(26,92,56,0.45);
}
.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  background: #6b9b7e;
}
.btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  font-size: 11px;
}

/* ==========================================================================
   MOBILE OPTIMISATION — World-class standards
   44px touch targets, 16px min font on inputs, safe areas, thumb zones
   ========================================================================== */

@media (max-width: 768px) {
  .reg-wrapper {
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px);
  }

  .reg-main {
    padding: 24px 16px 140px;
  }

  .reg-card {
    max-width: 100%;
  }

  /* Header */
  .reg-header {
    margin-bottom: 24px;
  }
  .reg-header h1 {
    font-size: 1.5rem;
    line-height: 1.2;
  }
  .reg-eyebrow {
    font-size: 0.68rem;
  }

  /* Progress */
  .reg-progress-track {
    margin-bottom: 24px;
  }
  .prog-seg {
    height: 4px;
  }

  /* Mobile step pills */
  .reg-steps-mobile {
    gap: 4px;
    margin-bottom: 20px;
  }
  .step-pill {
    padding: 8px 4px;
    font-size: 0.68rem;
    border-radius: 6px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Section titles */
  .reg-section-title {
    font-size: 0.72rem;
    margin-bottom: 16px;
  }

  /* Fields */
  .field-group {
    margin-bottom: 14px;
  }
  .field-group label {
    font-size: 0.75rem;
    margin-bottom: 6px;
  }

  /* Inputs — 16px prevents iOS zoom */
  .field-group input[type="text"],
  .field-group input[type="email"],
  .field-group input[type="password"],
  .field-group input[type="tel"],
  .field-group select,
  .field-group textarea {
    font-size: 16px !important;
    padding: 13px 14px;
    border-radius: 10px;
    min-height: 48px;
  }

  .field-group select {
    min-height: 48px;
  }

  /* Toggle */
  .toggle-row {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
  }
  .toggle-text {
    font-size: 0.82rem;
  }

  /* Address sections */
  .address-section {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 14px;
  }
  .address-section h5 {
    font-size: 0.72rem;
    margin-bottom: 14px;
  }

  /* Password */
  .pw-toggle {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    right: 4px;
  }

  /* Terms */
  .terms-row {
    gap: 10px;
  }
  .custom-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    min-width: 22px;
  }
  .custom-checkbox:checked::after {
    top: 4px;
    left: 7px;
    width: 6px;
    height: 10px;
  }
  .terms-row label {
    font-size: 0.82rem;
    line-height: 1.5;
  }

  /* Actions — sticky bottom bar — must stay on top of footer */
  .reg-actions {
    position: fixed !important;
    bottom: 60px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 14px 16px;
    background: #ffffff !important;
    border-top: 2px solid #d0ddd0;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.18);
    z-index: 99999 !important;
    gap: 10px;
    display: flex;
    isolation: isolate;
  }
  .btn-back {
    padding: 12px 18px;
    min-height: 48px;
    font-size: 0.82rem;
    border-radius: 10px;
  }
  .btn-next, .btn-submit {
    padding: 12px 24px;
    min-height: 48px;
    font-size: 0.85rem;
    border-radius: 10px;
    flex: 1;
    justify-content: center;
  }

  /* Divider */
  .divider {
    margin: 18px 0;
  }
}

/* Small phones */
@media (max-width: 375px) {
  .reg-main {
    padding: 20px 12px 140px;
  }
  .reg-header h1 {
    font-size: 1.3rem;
  }
  .step-pill {
    font-size: 0.62rem;
    padding: 6px 2px;
  }
  .field-group input[type="text"],
  .field-group input[type="email"],
  .field-group input[type="password"],
  .field-group input[type="tel"],
  .field-group select {
    padding: 12px;
  }
}
