/* =====================================================================
   DesiERP Sign-up wizard — app theme (blue #2563eb → indigo #4f46e5), matching the
   sign-in page. Same class names and ids as before: signup.js / signup-wizard.js /
   pincode-*.js are untouched.
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
:root {
	--page: #ffffff;
	--panel: #f6f7fb;
	--field: #ffffff;
	--field-bd: #cbd5e1;
	--bd: #e5e9f0;
	--bd-strong: #cbd5e1;
	--ink: #0f172a;
	--ink-soft: #334155;
	--muted: #64748b;
	--accent: #2563eb;
	--accent-600: #1d4ed8;
	--indigo: #4f46e5;
	--focus-bg: #ffffff;
	--focus-bd: #2563eb;
	--focus-ring: rgba(37, 99, 235, .16);
	--err-text: #b91c1c;
	--err-bg: #fef2f2;
	--err-bd: #fecaca;
	--radius: 10px;
	--text-primary: var(--ink);
	--text-muted: var(--muted);
	--border-color: var(--bd);
	--bg-card: var(--page);
	--rp-blue: var(--accent);
	--font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
	margin: 0; min-height: 100vh; font-family: var(--font); font-size: 14px;
	background: #eef2f7; color: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

/* ── shell ──────────────────────────────────────────────────────── */
.signup-shell { display: flex; min-height: 100vh; }

/* ── brand / stepper panel (gradient, like the sign-in page) ─────── */
.wiz-side {
	position: relative; overflow: hidden; width: clamp(300px, 30vw, 380px); flex-shrink: 0; color: #fff;
	background: linear-gradient(160deg, #1d4ed8 0%, var(--accent) 45%, var(--indigo) 100%);
	padding: clamp(28px, 3vw, 40px) clamp(24px, 2.4vw, 36px);
	display: flex; flex-direction: column; justify-content: space-between; gap: 26px;
}
.wiz-side::before, .wiz-side::after {
	content: ""; position: absolute; border-radius: 50%; pointer-events: none;
	background: radial-gradient(closest-side, rgba(255,255,255,.22), rgba(255,255,255,0));
}
.wiz-side::before { width: 420px; height: 420px; right: -180px; top: -160px; }
.wiz-side::after  { width: 380px; height: 380px; left: -160px; bottom: -160px; }
.wiz-side > * { position: relative; }

.wiz-brand { display: flex; align-items: center; gap: 12px; }
.wiz-logo-badge {
	width: 54px; height: 54px; border-radius: 14px; background: #fff; padding: 6px;
	box-shadow: 0 8px 22px rgba(15,23,42,.22); display: flex; align-items: center; justify-content: center;
}
.wiz-logo-badge img { width: 100%; height: 100%; object-fit: contain; }
.wiz-brand-text { display: flex; flex-direction: column; }
.wiz-brand-text .name { font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.wiz-brand-text .tag { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 3px; font-style: normal; }

.wiz-intro h1 { font-size: clamp(20px, 2vw, 25px); line-height: 1.25; font-weight: 800; letter-spacing: -.02em; margin: 30px 0 8px; color: #fff; }
.wiz-intro p { font-size: 13.5px; color: rgba(255,255,255,.82); line-height: 1.6; margin: 0; font-style: normal; }

/* vertical stepper */
.stepper { list-style: none; margin: 30px 0 0; padding: 0; }
.stepper-item { display: flex; gap: 14px; align-items: flex-start; padding: 0 0 26px; position: relative; }
.stepper-item:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 36px; bottom: 2px; width: 2px; background: rgba(255,255,255,.25); }
.stepper-item.done:not(:last-child)::before { background: #a5f3fc; }
.stepper-index {
	width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
	font-size: 13px; font-weight: 800; color: rgba(255,255,255,.85); background: rgba(255,255,255,.14); border: 1.5px solid rgba(255,255,255,.4);
	transition: background .18s, color .18s, transform .18s;
}
.stepper-item.active .stepper-index { background: #fff; color: var(--accent); border-color: #fff; box-shadow: 0 0 0 5px rgba(255,255,255,.18); transform: scale(1.06); }
.stepper-item.done .stepper-index { background: #a5f3fc; color: #0e7490; border-color: #a5f3fc; }
.stepper-item.done .stepper-index::before { content: "\2713"; }
.stepper-item.done .stepper-index { font-size: 0; }
.stepper-item.done .stepper-index::before { font-size: 14px; }
.stepper-text { display: flex; flex-direction: column; padding-top: 6px; }
.stepper-text .t { font-size: 14px; font-weight: 700; color: rgba(255,255,255,.88); }
.stepper-item.active .stepper-text .t { color: #fff; }
.stepper-text .s { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 2px; font-style: normal; }

.wiz-side-foot { font-size: 12.5px; color: rgba(255,255,255,.8); }
.wiz-side-foot a { color: #fff; font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.5); }
.wiz-side-foot a:hover { border-bottom-color: #fff; }

/* ── content side ───────────────────────────────────────────────── */
.wiz-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; background: #eef2f7; }
.wiz-container { width: 100%; max-width: 860px; margin: 0 auto; padding-inline: clamp(20px, 5%, 56px); }

.wiz-topbar { padding-top: clamp(16px, 2vw, 24px); }
.wiz-topbar .count { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.wiz-topbar .count b { color: var(--accent); }
.wiz-progress-track { height: 8px; border-radius: 8px; background: #e2e8f0; margin-top: 10px; overflow: hidden; }
.wiz-progress-fill { height: 100%; width: 25%; background: linear-gradient(90deg, var(--accent), var(--indigo)); border-radius: 8px; transition: width .35s ease; }

.wiz-body { flex: 0 0 auto; padding-top: clamp(18px, 2.4vw, 26px); padding-bottom: 18px; }

/* each step is a white card */
.wiz-step { display: none; animation: stepIn .3s ease; background: #fff; border: 1px solid var(--bd); border-radius: 18px; padding: clamp(22px, 3vw, 34px); box-shadow: 0 12px 34px rgba(15,23,42,.06); }
.wiz-step.active { display: block; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.card-h { margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px dashed var(--bd); }
.card-h .h { font-size: clamp(19px, 2.2vw, 22px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 5px; color: var(--ink); }
.card-h .sub { font-size: 13.5px; color: var(--muted); margin: 0; font-style: normal; }

/* form grid */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.row-group.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 40px; }
.col-span-2 { grid-column: 1 / -1; }

.row { position: relative; margin-bottom: 18px; }
.row label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; text-transform: none; letter-spacing: 0; }
.row input, .row select {
	width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--field-bd); border-radius: var(--radius);
	background: var(--field); color: var(--ink); font-size: 14.5px; font-weight: 500; font-family: inherit;
	transition: border-color .16s, box-shadow .16s, background-color .16s;
}
.row select { cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 36px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
	background-repeat: no-repeat; background-position: right 12px center; }
.row input::placeholder { color: #94a3b8; font-weight: 400; }
.row input:disabled, .row select:disabled { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
.row input:focus, .row select:focus { outline: none; background: #fff; border-color: var(--focus-bd); box-shadow: 0 0 0 3px var(--focus-ring); }

.inline-err { color: var(--err-text); font-size: 11.5px; font-weight: 600; position: absolute; bottom: -16px; left: 2px; display: none; white-space: nowrap; font-style: normal; }
.pin-info { display: block; margin-top: 7px; font-size: 12px; font-weight: 600; min-height: 15px; color: var(--muted); }
.pin-info.ok { color: #15803d; }
.pin-info.error { color: var(--err-text); }
.pin-info.loading { color: var(--muted); }
.input-error { border-color: var(--err-text) !important; background: var(--err-bg) !important; box-shadow: 0 0 0 3px rgba(185, 28, 28, .12) !important; }

.server-err-box { display: flex; align-items: center; gap: 9px; background: var(--err-bg); color: #7f1d1d; border: 1px solid var(--err-bd); border-left: 3px solid #ef4444; padding: 12px 15px; margin-bottom: 18px; border-radius: var(--radius); font-size: 13.5px; font-weight: 600; }
.shake { animation: shake .4s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }

/* PIN boxes */
.pin { display: flex; gap: 10px; }
.pin .pin-box {
	flex: 1 1 0; min-width: 0; width: auto; max-width: 56px; height: 54px; padding: 0; text-align: center; font-size: 22px; font-weight: 700;
	border: 1px solid var(--field-bd); border-radius: 12px; background: #fff; color: var(--ink); transition: border-color .16s, box-shadow .16s;
}
.pin .pin-box:focus { outline: none; border-color: var(--focus-bd); box-shadow: 0 0 0 3px var(--focus-ring); }

/* payment */
.pay-notes { margin: 0 0 18px; padding: 12px 16px 12px 32px; color: var(--ink-soft); font-size: 13px; line-height: 1.75; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; font-style: normal; }
.price { background: #f8fafc; border: 1px solid var(--bd); border-radius: 14px; padding: 18px 20px; margin: 6px 0 18px; }
.amount-row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; color: var(--muted); }
.amount-row strong { color: var(--ink); font-weight: 600; }
.price .total { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 14px; border-top: 1px dashed var(--bd-strong); font-size: 19px; font-weight: 800; color: var(--ink); }
.price .total span:last-child { color: var(--accent); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ink); padding: 12px 14px; border: 1px solid var(--bd); border-radius: 12px; background: #fff; transition: border-color .18s, background .18s; }
.check input { margin-top: 1px; width: 17px; height: 17px; accent-color: var(--accent); }
.check:focus-within { border-color: var(--accent); background: #eff6ff; }
.check i { font-style: normal; }

.alert { display: flex; align-items: center; gap: 8px; background: var(--err-bg); color: var(--err-text); border: 1px solid var(--err-bd); border-radius: var(--radius); padding: 12px 15px; font-size: 13.5px; font-weight: 600; margin-bottom: 18px; }

/* nav */
.wiz-nav { display: flex; align-items: center; gap: 12px; padding-block: 16px; margin-top: 4px; position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(238,242,247,0), #eef2f7 30%); }
.wiz-nav .spacer { flex: 1; }
.wiz-btn { padding: 0 24px; height: 46px; border-radius: 12px; border: 1px solid transparent; font-size: 14.5px; font-weight: 700; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 8px; transition: transform .14s, box-shadow .14s, background .14s; }
.wiz-btn--primary { background: linear-gradient(135deg, var(--accent), var(--indigo)); color: #fff; box-shadow: 0 10px 24px rgba(37,99,235,.30); }
.wiz-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(37,99,235,.38); }
.wiz-btn--primary:disabled { background: #e2e8f0; color: #94a3b8; box-shadow: none; transform: none; cursor: not-allowed; }
.wiz-btn--ghost { background: #fff; color: var(--ink-soft); border-color: var(--bd-strong); }
.wiz-btn--ghost:hover { border-color: #94a3b8; background: #f8fafc; }

.footer { text-align: center; color: var(--muted); padding: 10px 22px 18px; font-size: 12.5px; }
.footer b, .footer strong { color: var(--ink-soft); }

/* modals */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; z-index: 9999; padding: 20px; }
.modal-box { background: #fff; border: 1px solid var(--bd); padding: 26px; border-radius: 16px; max-width: 400px; width: 100%; text-align: center; color: var(--ink); box-shadow: 0 24px 60px rgba(15,23,42,.28); }
.modal-box h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.modal-box p { color: var(--muted); font-size: 14px; margin: 0; }
.modal-box button { margin-top: 18px; padding: 11px 28px; border: none; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--indigo)); color: #fff; font-weight: 700; cursor: pointer; font-family: inherit; }

.tos-link { color: var(--accent); font-weight: 700; text-decoration: underline; cursor: pointer; }
.terms-modal { max-width: 680px; width: 100%; text-align: left; padding: 0; max-height: 85vh; display: flex; flex-direction: column; }
.terms-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--bd); }
.terms-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.terms-x { margin: 0; background: none; border: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.terms-body { padding: 18px 22px; overflow-y: auto; }
.terms-body h4 { font-size: 13.5px; font-weight: 800; margin: 16px 0 6px; color: var(--ink); }
.terms-body h4:first-child { margin-top: 0; }
.terms-body p, .terms-body li { font-size: 13px; line-height: 1.65; color: var(--ink-soft); margin: 0 0 8px; }
.terms-body ul { margin: 0 0 8px; padding-left: 18px; }
.terms-body .eff { color: var(--muted); font-size: 12px; }
.terms-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--bd); }
.terms-foot .wiz-btn { margin: 0; }

.pay-modal { max-width: 430px; width: 100%; text-align: left; padding: 0; }
.pay-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--bd); }
.pay-logo { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--bd); display: flex; align-items: center; justify-content: center; padding: 4px; }
.pay-logo img { width: 100%; height: 100%; object-fit: contain; }
.pay-title { font-weight: 800; font-size: 15px; color: var(--ink); line-height: 1.2; }
.pay-title span { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.pay-amt { margin-left: auto; font-size: 20px; font-weight: 800; color: var(--accent); }
.pay-body { padding: 16px 20px; }
.pay-badge { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 10px; font-size: 11.5px; font-weight: 600; margin-bottom: 12px; }
.pay-body label { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); margin: 10px 0 6px; }
.pay-body input { width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--field-bd); border-radius: 9px; background: #f8fafc; color: var(--ink); font-size: 14px; font-family: inherit; }
.pay-two { display: flex; gap: 12px; }
.pay-two > div { flex: 1; }
.pay-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--bd); }
.pay-foot .wiz-btn { margin: 0; }

/* success */
.success-fullscreen { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; background: linear-gradient(160deg, #1d4ed8 0%, var(--accent) 45%, var(--indigo) 100%); }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* mobile brand bar (shown only when the side panel is hidden) */
.wiz-mobile-brand { display: none; align-items: center; gap: 10px; padding: 12px 16px; color: #fff;
	background: linear-gradient(135deg, #1d4ed8, var(--accent) 50%, var(--indigo)); }
.wiz-mobile-brand img { width: 34px; height: 34px; object-fit: contain; background: #fff; border-radius: 9px; padding: 3px; }
.wiz-mobile-brand .n { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.wiz-mobile-brand .n b { color: #a5f3fc; }
.wiz-mobile-brand .l { margin-left: auto; color: #fff; font-size: 12.5px; font-weight: 700; text-decoration: none; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: 5px 12px; }

/* responsive */
@media (max-width: 980px) {
	.wiz-side { display: none; }
	.wiz-main { background: #eef2f7; justify-content: flex-start; }
	.wiz-mobile-brand { display: flex; }
	.wiz-container { padding-inline: 14px; }
	.wiz-topbar { padding-top: 14px; }
}
@media (max-width: 600px) {
	.form-grid, .row-group.two-col { grid-template-columns: 1fr; gap: 0; }
	.pin .pin-box { height: 48px; font-size: 18px; max-width: 50px; }
	.wiz-btn { padding: 0 18px; font-size: 14px; height: 44px; }
	.wiz-step { padding: 18px 16px; border-radius: 14px; }
	.row { margin-bottom: 16px; }
	.row input, .row select { height: 44px; font-size: 16px; }   /* 16px stops iOS zooming on focus */
	.wiz-nav { padding-block: 12px; }
	.wiz-nav .wiz-btn--primary { flex: 1; justify-content: center; }
	.price { padding: 14px 16px; }
}
@media (max-width: 380px) { .pin .pin-box { height: 46px; font-size: 17px; } }

/* recharge packs at signup: 30 / 180 / 365 days, and your own number */

/* The packs are a full-width control. Without this they are one cell of the two-column
   .form-grid, sharing about 330px between four cards -- which is what made every price wrap. */
.su-pack-row { grid-column: 1 / -1; }

/* Two across, at every width -- the same two-by-two the packs fall into on a phone, asked for
   so the four choices read as one block rather than a strip.

   Two columns and no media query: at 375px that is a 152px card, which is the width the phone
   layout already used and reads fine, and every width above that only makes it roomier. The
   four-across rule this replaces was corrected with viewport media queries, which was the wrong
   question anyway -- a media query asks how wide the WINDOW is, and this grid sits in a
   container that is narrower than the window. */
.su-packs {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px; margin-top: 6px; align-items: stretch;
}
/* Scoped to .su-packs so it outranks `.row label { display: block }`, which is more specific
   than a bare .su-pack and was quietly winning: the card was a block, its spans flowed inline,
   and the only reason they looked stacked was that the card was too narrow to fit two on a
   line. Widen the card and the name and the price sit side by side. */
.su-packs .su-pack {
	position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
	padding: 14px 14px 12px; border: 2px solid var(--bd); border-radius: 14px; background: #fff;
	cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.su-pack:hover { border-color: #93c5fd; }
.su-pack.on { border-color: var(--accent); background: #eff6ff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.su-pack input { position: absolute; opacity: 0; pointer-events: none; }
.su-pack:has(input:focus-visible) { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; }
/* An amount never breaks away from its "Rs", and a rate never splits across lines: at the width
   these had, "Rs 270" was being rendered as "Rs" over "270". */
.su-pack-name {
	font-size: 13px; font-weight: 800; color: var(--ink); text-transform: uppercase;
	letter-spacing: .04em; white-space: nowrap;
}
.su-pack-price { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.2; white-space: nowrap; }
.su-pack-list { font-size: 12px; color: var(--muted); text-decoration: line-through; white-space: nowrap; }
.su-pack-rate { font-size: 12.5px; font-weight: 600; color: var(--accent-600); white-space: nowrap; }
.su-pack-off {
	margin-top: 6px; font-size: 11px; font-weight: 800; color: #15803d; background: #dcfce7;
	padding: 2px 9px; border-radius: 99px; white-space: nowrap;
}
/* The custom card says "1 to 365 days" here rather than a discount, which is not a badge. */
.su-pack-custom .su-pack-off { background: transparent; color: var(--muted); padding: 2px 0; }
.su-pack-tag {
	position: absolute; top: -10px; right: 10px; font-size: 10px; font-weight: 800; letter-spacing: .05em;
	text-transform: uppercase; color: #fff; background: var(--accent); padding: 3px 9px; border-radius: 99px;
}
.su-pack-custom { border-style: dashed; }
.su-pack-custom.on { border-style: solid; }
.su-pack-days { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px; width: 100%; }
.su-pack-days input {
	width: 100%; max-width: 92px; min-width: 0;
	height: 36px; padding: 0 8px; border: 2px solid var(--bd); border-radius: 9px; background: #fff;
	font: inherit; font-size: 17px; font-weight: 800; text-align: center; color: var(--ink); outline: 0;
	position: static; opacity: 1; pointer-events: auto;
}
.su-pack-days input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.su-pack-days input.bad { border-color: #dc2626; }
.su-pack-days span { font-size: 12px; font-weight: 700; color: var(--muted); }
/* No media queries here any more: auto-fit above already reflows on the width the row has,
   which is the thing that actually varies. On a phone that lands at one card across on its own. */

/* Filled from the PIN code, not typed. Shown as something already settled: no caret, no
   focus ring, and a background that says this box is not asking for anything. The value is
   still submitted -- readonly does that where disabled would not. */
.auto-filled,
.row input[readonly] {
	background: #f1f5f9; color: var(--ink); cursor: default;
}
.auto-filled:focus,
.row input[readonly]:focus {
	border-color: var(--bd); box-shadow: none; outline: 0;
}
.auto-filled::placeholder { color: var(--muted); }
