:root {
  --green: #2F5D3A;
  --green-dark: #1F3F27;
  --amber: #F5A623;
  --amber-dark: #D98A0B;
  --cream: #FFF8EC;
  --text: #1F2A22;
  --muted: #6B7568;
  --border: #E6DCC8;
  --error: #C0392B;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #FFF3DA 0%, #FCE7C0 50%, #F3E9D6 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-x: hidden;
}

.bg-shape { position: fixed; border-radius: 50%; filter: blur(2px); z-index: 0; }
.bg-shape.s1 { width: 380px; height: 460px; background: #F5A62333; top: -120px; left: -100px; border-radius: 50% 50% 48% 52% / 60% 60% 40% 40%; }
.bg-shape.s2 { width: 300px; height: 360px; background: #2F5D3A1f; bottom: -120px; right: -80px; border-radius: 50% 50% 48% 52% / 60% 60% 40% 40%; }

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 940px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(47, 93, 58, .35), 0 8px 20px rgba(0,0,0,.05);
  animation: rise .6s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Brand panel ---------- */
.brand {
  background: radial-gradient(circle at 30% 20%, #3E7A4C 0%, var(--green) 45%, var(--green-dark) 100%);
  color: #fff;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.brand > * { position: relative; z-index: 1; }
.brand::after {
  content: ""; position: absolute; inset: auto -60px -60px auto;
  width: 200px; height: 240px; border-radius: 50% 50% 48% 52% / 60% 60% 40% 40%;
  background: rgba(245, 166, 35, .15);
}
.logo { width: 110px; height: 110px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.3)); margin-bottom: 22px; }
.brand h1 { font-size: 2rem; font-weight: 700; line-height: 1.15; }
.brand h1 span { display: block; color: var(--amber); }
.tagline { margin-top: 10px; opacity: .85; font-size: .98rem; }
.perks { list-style: none; margin-top: 28px; display: grid; gap: 12px; }
.perks li { display: flex; align-items: center; gap: 10px; font-size: .92rem; opacity: .95; }
.perks li::before {
  content: ""; width: 14px; height: 17px; flex: none;
  background: var(--amber); border-radius: 50% 50% 48% 52% / 60% 60% 40% 40%;
}

/* ---------- Form panel ---------- */
.form-wrap { padding: 44px 44px 36px; }
.form-wrap h2 { font-size: 1.6rem; font-weight: 700; color: var(--green-dark); }
.sub { color: var(--muted); font-size: .92rem; margin: 4px 0 22px; }

.alert {
  background: #FDECEA; color: var(--error); border: 1px solid #F5C6C1;
  padding: 12px 14px; border-radius: 12px; font-size: .88rem; margin-bottom: 16px;
}

.alert.info { background: #EAF4EC; color: var(--green-dark); border-color: #C6E0CC; }
.back { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--green); text-decoration: none; margin-bottom: 14px; }
.back:hover { color: var(--amber-dark); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--green-dark); }

.input {
  display: flex; align-items: center; gap: 10px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:focus-within { border-color: var(--amber); background: #fff; box-shadow: 0 0 0 4px rgba(245,166,35,.18); }
.input svg { width: 20px; height: 20px; fill: #A89B80; flex: none; }
.input:focus-within svg { fill: var(--amber-dark); }
.input input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: .95rem; padding: 13px 0; color: var(--text);
}
.input input::placeholder { color: #B5AC98; }

.toggle {
  border: 0; background: none; cursor: pointer; font: inherit;
  font-size: .78rem; font-weight: 600; color: var(--green); padding: 6px 4px;
}
.toggle:hover { color: var(--amber-dark); }

.field.has-error .input { border-color: var(--error); background: #FFF6F5; }
.err { display: block; color: var(--error); font-size: .78rem; margin-top: 5px; min-height: 0; }
.err:empty { display: none; }
.hint { display: block; color: var(--muted); font-size: .76rem; margin-top: 5px; }

.meter { height: 5px; background: #EFE7D6; border-radius: 99px; margin-top: 8px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .3s, background .3s; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-block; text-align: center; text-decoration: none;
  width: 100%; margin-top: 8px; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 1rem; color: #fff;
  padding: 14px; border-radius: 14px;
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
  box-shadow: 0 10px 20px -8px rgba(217,138,11,.6);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 14px 24px -8px rgba(217,138,11,.7); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .7; cursor: wait; }

.foot { text-align: center; font-size: .88rem; color: var(--muted); margin-top: 18px; }
.foot a { color: var(--green); font-weight: 600; text-decoration: none; }
.foot a:hover { text-decoration: underline; }

.success-box { text-align: center; padding: 40px 10px; }
.tick {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2rem; color: #fff;
  background: var(--green); box-shadow: 0 10px 24px -8px rgba(47,93,58,.6);
}
.success-box p { color: var(--muted); margin: 8px 0 24px; }


/* ---------- Landing page / shared extras ---------- */
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.btn-row .btn { margin-top: 0; }
.btn-row .full { grid-column: 1 / -1; }
.btn.ic { display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn.ic svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn-outline {
  background: #fff; color: var(--green);
  border: 1.5px solid var(--green);
  box-shadow: 0 8px 18px -10px rgba(47,93,58,.45);
}
.btn-outline:hover { background: var(--cream); box-shadow: 0 12px 22px -10px rgba(47,93,58,.5); }

.section-title { font-size: 1rem; font-weight: 700; color: var(--green-dark); margin: 28px 0 12px; }
.features { list-style: none; display: grid; gap: 10px; }
.features li {
  display: flex; align-items: center; gap: 14px;
  background: var(--cream); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 12px 14px;
}
.f-icon {
  width: 42px; height: 42px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
}
.f-icon svg { width: 22px; height: 22px; fill: #fff; }
.features strong { display: block; font-size: .9rem; color: var(--green-dark); }
.features small { display: block; font-size: .78rem; color: var(--muted); margin-top: 1px; }

.link-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.soft-link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 10px; border-radius: 12px; text-decoration: none;
  font-size: .82rem; font-weight: 600; color: var(--green);
  background: #EAF4EC; border: 1.5px solid #C6E0CC;
  transition: background .2s, color .2s;
}
.soft-link:hover { background: var(--green); color: #fff; }
.soft-link svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.success-box .btn-row { margin-top: 0; }
button.btn { font-family: inherit; }

/* ---------- Mobile ---------- */
@media (max-width: 780px) {
  .card { grid-template-columns: minmax(0, 1fr); border-radius: 22px; }
  .brand { padding: 30px 24px; text-align: center; align-items: center; }
  .logo { width: 80px; height: 80px; margin-bottom: 12px; }
  .brand h1 { font-size: 1.6rem; }
  .brand h1 span { display: inline; }
  .perks { display: none; }
  .form-wrap { padding: 28px 22px 26px; }
  .home-brand .perks { display: none; }
}
@media (max-width: 380px) {
  .link-row { grid-template-columns: 1fr; }
}

/* ---------- Browser autofill fix (Chrome ka neela background) ---------- */
.input input { padding-left: 4px; padding-right: 4px; }
.input input:-webkit-autofill,
.input input:-webkit-autofill:hover,
.input input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--cream) inset;
  box-shadow: 0 0 0 1000px var(--cream) inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  font-family: inherit;
  transition: background-color 9999s ease-out;
}
.input:focus-within input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  box-shadow: 0 0 0 1000px #fff inset;
}

/* ---------- Live check (username / phone) ---------- */
.status { display: block; font-size: .78rem; margin-top: 5px; font-weight: 500; }
.status:empty { display: none; }
.status.checking { color: var(--amber-dark); }
.status.ok { color: #2F7D46; }
.status.ok::before { content: "✓ "; font-weight: 700; }
.status.taken, .status.invalid { color: var(--error); }
.status.taken::before, .status.invalid::before { content: "✕ "; font-weight: 700; }
.status.idle { color: var(--muted); }

.field.is-checking .input::after {
  content: ""; width: 18px; height: 18px; flex: none;
  border: 2.5px solid #F3DDB0; border-top-color: var(--amber-dark);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.field.is-ok .input { border-color: #6FB283; background: #F3FAF4; }
.field.is-ok .input::after { content: "✓"; color: #2F7D46; font-weight: 700; }
.field.is-taken .input { border-color: var(--error); background: #FFF6F5; }

.btn:disabled:not([aria-busy]) { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- OTP / forgot password ---------- */
.otp-input input { letter-spacing: 8px; font-size: 1.2rem; font-weight: 600; text-align: center; }
.row-links { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 6px; }
.small-link { font-size: .82rem; font-weight: 600; color: var(--green); text-decoration: none; }
.small-link:hover { color: var(--amber-dark); text-decoration: underline; }
.link-btn { background: none; border: 0; font: inherit; font-size: .82rem; font-weight: 600; color: var(--green); cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--amber-dark); text-decoration: underline; }
.dev-note { background: #FFF4DB; border: 1px dashed var(--amber-dark); color: #7A4E00; padding: 10px 12px; border-radius: 12px; font-size: .82rem; margin-bottom: 14px; }
