/* Customer pages: layout, cards, form controls, summary, footer. */
:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --bg: #f1f5f9;
  --brand: #0f766e;
  --brand2: #14b8a6;
  --tint: #f0fdfa;
  --ring: rgba(20, 184, 166, .15);
  --bad: #dc2626;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Hind Siliguri', 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

.mono, input[name="phone"], input[name="sender_number"], input[name="trx_id"] {
  font-family: 'Inter', system-ui, sans-serif;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 45%, #0f172a 100%);
  color: #fff;
  padding: 28px 20px 76px;
}
.hero-in { max-width: 1080px; margin: 0 auto; }
.hero .brand { font-weight: 600; font-size: 14px; opacity: .85; margin-bottom: 12px; }
.hero .tag {
  display: inline-block;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
}
.hero .tag-ok { background: rgba(20, 184, 166, .35); }
.hero h1 { font-size: 28px; line-height: 1.3; margin: 10px 0 4px; font-weight: 700; }
.hero p { margin: 0; opacity: .82; font-size: 15px; }

/* ---------- Page grid ---------- */
.page {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: -52px auto 0;
  padding: 0 20px 24px;
}
.page-narrow { max-width: 640px; }

.wrap {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  align-items: start;
}
.col-side { position: sticky; top: 12px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  margin-bottom: 14px;
}
.card h2 { margin: 0 0 14px; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.num {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  display: grid;
  place-items: center;
}
.notice { text-align: center; padding: 28px 18px; }
.notice p { margin: 0 0 14px; }

.alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-weight: 500;
  position: relative;
}

/* ---------- Selectable cards (radios) ---------- */
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.seg-area { margin-bottom: 12px; }
.seg-method { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.opt {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
/* The radio covers its own card invisibly: it never affects layout but stays keyboard-focusable. */
.opt > input[type="radio"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.opt-body b { display: block; font-size: 15px; font-weight: 600; }
.opt-body small { color: var(--muted); font-size: 12.5px; }
.opt-price { font-style: normal; font-weight: 600; color: var(--brand); white-space: nowrap; }
.opt:hover { border-color: #99f6e4; }
/* Two separate rules on purpose: an unsupported :has() would invalidate a combined selector list. is-checked is set by order.js. */
.opt.is-checked { border-color: var(--brand); background: var(--tint); box-shadow: 0 0 0 3px var(--ring); color: var(--brand); }
.opt:has(input:checked) { border-color: var(--brand); background: var(--tint); box-shadow: 0 0 0 3px var(--ring); color: var(--brand); }
.opt:has(input:focus-visible) { outline: 2px solid var(--brand2); outline-offset: 2px; }
.seg-method .opt { justify-content: center; text-align: center; }
/* Receiving numbers: one selectable card per number, with its copy button beside (not inside) the label. */
.paynums { margin-top: 12px; }
.paynums[hidden], .paynum-group[hidden] { display: none; }
.paynum-group + .paynum-group { margin-top: 10px; }
.paynums .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.paynums.js .paynum-method { display: none; }
.paynum { display: flex; align-items: stretch; gap: 8px; margin-top: 8px; }
.paynum .opt-num { flex: 1; min-width: 0; justify-content: flex-start; padding: 10px 12px; }
.paynum-no { font-family: 'Inter', system-ui, sans-serif; font-size: 19px !important; letter-spacing: .5px; overflow-wrap: anywhere; }
.copy, .mini-btn {
  flex: none;
  min-width: 72px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--brand);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 0 12px;
  cursor: pointer;
}
.copy:hover, .mini-btn:hover { border-color: #99f6e4; background: var(--tint); }
.copy:focus-visible, .mini-btn:focus-visible { outline: 2px solid var(--brand2); outline-offset: 2px; }
.f label small { font-weight: 400; }
.receipt-field input[type="file"] { padding: 8px; font-size: 14px; }
.receipt-prev { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.receipt-prev[hidden] { display: none; }
.receipt-prev img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #f8fafc; flex: none; }
.receipt-name { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.receipt-prev .mini-btn { min-height: 36px; color: var(--bad); }
.receipt-retry { display: block; color: #92400e; }
.receipt-ok { margin: 12px 0 0; color: var(--brand); font-weight: 600; font-size: 14px; }
.copy.is-copied { background: var(--brand); border-color: var(--brand); color: #fff; }
.pay-logo { display: block; width: 70px; height: 28px; margin: 0 auto 6px; border-radius: 6px; object-fit: contain; }

/* ---------- Fields ---------- */
.grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.f { min-width: 0; }
.f-gap { margin-top: 10px; }
.f label, .f .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.f input:not([type="radio"]), .f select, .f textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.f textarea { resize: vertical; min-height: 64px; }
.f input:not([type="radio"]):focus, .f select:focus, .f textarea:focus { border-color: var(--brand2); box-shadow: 0 0 0 3px var(--ring); }
.f .is-bad { border-color: var(--bad); }
.f .is-bad:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.err { display: block; color: var(--bad); font-size: 12.5px; margin-top: 4px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.hint-center { text-align: center; }

/* Honeypot: off-screen for people, still present for bots. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Summary & payment ---------- */
.sum { font-size: 15px; }
.sum .r { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; color: var(--muted); }
.sum .r b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.sum .r[hidden] { display: none; }
.sum .r b.addr { white-space: normal; text-align: right; overflow-wrap: anywhere; }
.sum .r .sub { display: block; font-size: 12.5px; }
.sum .tot { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 10px; }
.sum .tot span { color: var(--ink); font-weight: 600; }
.sum .tot b { font-size: 17px; }
.adv {
  background: var(--tint);
  border: 1px solid #99f6e4;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-weight: 600;
}
.adv small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.adv b { font-size: 22px; color: var(--brand); white-space: nowrap; }
.due { color: var(--muted); font-size: 13px; margin: 8px 2px 14px; }
.due b { color: var(--ink); }
.instr {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  color: #78350f;
  margin: 12px 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.courier-line { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #f5f3ff; color: #4c1d95; font-size: 14px; overflow-wrap: anywhere; }
.courier-line a { color: var(--brand); font-weight: 600; text-decoration: none; white-space: nowrap; }
.instr.is-empty { background: #f8fafc; border-color: var(--line); color: var(--muted); }

.cta {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand2), var(--brand));
  box-shadow: 0 8px 20px rgba(15, 118, 110, .35);
  margin-top: 14px;
  transition: transform .1s, box-shadow .15s, opacity .15s;
}
.cta:hover { box-shadow: 0 10px 24px rgba(15, 118, 110, .45); }
.cta:active { transform: translateY(1px); }
.cta:focus-visible { outline: 3px solid #99f6e4; outline-offset: 2px; }
.cta:disabled { opacity: .65; cursor: progress; box-shadow: none; }
.cta-link { display: inline-block; width: auto; padding: 12px 22px; }

.cta-ghost { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); box-shadow: none; }
.cta-ghost:hover { background: var(--tint); box-shadow: none; }
.hero-link { display: inline-block; margin-top: 12px; color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); }
.hero-link:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Order tracker ---------- */
.track-grid { margin-top: 0; }
.track-form .cta { margin-top: 12px; }
.track-meta { margin: -8px 0 12px; color: var(--muted); font-size: 14px; }
.steps { list-style: none; margin: 16px 0 4px; padding: 0; }
.step { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 0; color: var(--muted); font-size: 15px; }
.step .dot { position: relative; z-index: 1; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 13px; line-height: 1; }
/* The line joining each step to the next. */
.step:not(:last-child)::after { content: ''; position: absolute; left: 11px; top: 50%; width: 2px; height: 100%; background: var(--line); }
.step.is-done { color: var(--ink); }
.step.is-done .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.is-done .dot::before { content: '✓'; }
.step.is-done:not(:last-child)::after { background: var(--brand); }
.step.is-current { color: var(--brand); font-weight: 600; }
.step.is-current .dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.step.is-current:not(.is-done) .dot::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.step-label { min-width: 0; overflow-wrap: anywhere; }
.track-cancel { margin: 16px 0 4px; padding: 12px 14px; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-weight: 600; text-align: center; }
.track-courier { margin-top: 12px; padding: 4px 14px 14px; border-radius: 12px; background: #f5f3ff; }
.track-courier .cta-link { margin-top: 6px; }
.site-footer .foot-links { margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { text-align: center; color: var(--muted); font-size: 13px; padding: 18px 16px 26px; }
.site-footer p { margin: 2px 0; }
.site-footer .credit { font-family: 'Inter', system-ui, sans-serif; font-size: 12.5px; }
.site-footer a { color: var(--brand); font-weight: 600; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Phone: one column, preview right after the registration card ---------- */
@media (max-width: 760px) {
  .hero { padding: 22px 16px 70px; }
  .hero h1 { font-size: 23px; }
  .page { padding: 0 14px 18px; }
  .wrap { grid-template-columns: 1fr; gap: 0; }
  .col-main, .col-side { display: contents; }
  .c-veh { order: 1; }
  .c-reg { order: 2; }
  .c-prev { order: 3; }
  .c-del { order: 4; }
  .c-pay { order: 5; }
  .grid2.loc { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .grid, .grid2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
