/* ─────────────────────────────────────────────────────────────────────
   pay.blrjmt.com — application styles
   Mobile-first. Customer-facing payment portal. Uses the same token
   set as portal/ so the two sites read as siblings.
   ───────────────────────────────────────────────────────────────────── */

@import url("tokens.css");

/* =========================================================================
 * 1. Reset + body
 * =======================================================================*/

*, *::before, *::after { box-sizing: border-box; }
/* Native-app feel: kill the grey tap-flash on every touch target. */
*, *::before, *::after { -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body-lg);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-dark);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;            /* fallback for old browsers */
  min-height: 100dvh;           /* dynamic vh — no jump when the address bar hides */
  overscroll-behavior-y: none;  /* no rubber-band scroll chaining (feels app-like) */
}

/* Chrome shouldn't be long-press-selectable like a web page. */
.brand, .app-footer, .section__num, .section__title, .btn, .segment label, .chip {
  -webkit-user-select: none; user-select: none;
}
/* Remove the 300ms tap delay + double-tap-zoom on interactive controls. */
.btn, .segment label, .section__edit, a { touch-action: manipulation; }

h1, h2, h3, h4, h5 { margin: 0 0 var(--space-md); font-weight: 700; color: var(--color-text-dark); line-height: 1.2; }
h1 { font-size: var(--fs-display);     letter-spacing: -0.5px; }
h2 { font-size: var(--fs-headline-lg); }
h3 { font-size: var(--fs-headline-md); font-weight: 600; }
h4 { font-size: var(--fs-title-lg);    font-weight: 600; }

p { margin: 0 0 var(--space-md); }
small { font-size: var(--fs-body-sm); color: var(--color-text-medium); }
b, strong { font-weight: 700; }

a { color: var(--color-primary); text-decoration: none; transition: color var(--duration-fast) var(--ease-base); }
a:hover  { color: var(--color-primary-light); }
a:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; border-radius: 2px; }

img, svg { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--color-divider); margin: var(--space-lg) 0; }

/* =========================================================================
 * 2. Page shell
 * =======================================================================*/

.page {
  max-width: var(--container-base);
  margin: 0 auto;
  /* Honour the notch / home-indicator in fullscreen webviews; the base spacing
     is the floor so nothing shrinks on ordinary screens (insets are 0 there). */
  padding:
    max(var(--space-xl), env(safe-area-inset-top))
    max(var(--space-lg), env(safe-area-inset-right))
    max(var(--space-xl), env(safe-area-inset-bottom))
    max(var(--space-lg), env(safe-area-inset-left));
}
@media (min-width: 720px) {
  .page { padding: var(--space-xxxl) var(--space-xl); }
}

/* Brand header - emerald, with subtle gold rule */
.brand {
  background: var(--gradient-emerald);
  color: #fff;
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
}
.brand::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(201, 162, 70, 0)   0%,
    var(--color-gold)       8%,
    var(--color-gold)      92%,
    rgba(201, 162, 70, 0) 100%
  );
}
.brand__mark {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--color-cream-icon);
  border: 2px solid var(--color-gold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18) inset;
  padding: 0;
}
.brand__mark img {
  width: 58px; height: 58px;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}
/* Let the text column shrink so a long Anjuman tag wraps instead of
   overflowing the viewport on narrow phones. */
.brand > div { min-width: 0; }
.brand__name  { font-size: var(--fs-headline-md); font-weight: 800; letter-spacing: 0.02em; }
.brand__tag   { font-size: var(--fs-body-sm); color: #a8d5c2; margin-top: 2px; letter-spacing: 0.08em; text-transform: uppercase; overflow-wrap: anywhere; }

/* Footer */
.app-footer {
  margin-top: var(--space-xxxl);
  padding: var(--space-xl) 0;
  text-align: center;
  font-size: var(--fs-body-sm);
  color: var(--color-text-medium);
  border-top: 1px solid var(--color-divider);
}
.app-footer a { color: var(--color-gold-dark); font-weight: 600; }
.app-footer__legal {
  margin-top: var(--space-md);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-size: var(--fs-body-sm);
}
.app-footer__legal .dot { width: 4px; height: 4px; background: currentColor; border-radius: 50%; opacity: 0.4; }
.app-footer .trust-strip {
  margin-top: var(--space-lg);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  color: var(--color-text-light);
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.app-footer .trust-strip .dot { width: 4px; height: 4px; background: currentColor; border-radius: 50%; opacity: 0.5; }

/* =========================================================================
 * 3. Card
 * =======================================================================*/

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-xxl);
  box-shadow: var(--shadow-subtle);
}
@media (max-width: 600px) {
  .card { padding: var(--space-xl); }
}

.card + .card { margin-top: var(--space-lg); }
.card__title  { font-size: var(--fs-title-lg); font-weight: 700; margin-bottom: var(--space-md); }
.card__lede   { color: var(--color-text-medium); margin-bottom: var(--space-lg); font-size: var(--fs-body); }

/* ── One object: on the payment form the brand band IS the card's header.
   The band keeps its gold ::after hairline, which becomes the divider —
   the same anatomy as the receipt (emerald header / gold rule / white body).
   Scoped to body.pay-home so /Success and other pages are untouched. ── */
.pay-home .brand {
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  margin-bottom: 0;
  box-shadow: var(--shadow-subtle);
}
.pay-home main > .card:first-child {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
}

/* ── Hero greeting at the top of the form card ── */
.pay-hero { margin-bottom: var(--space-xl); }
.pay-hero__eyebrow {
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.pay-hero__title {
  font-size: var(--fs-headline-lg);
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--color-text-dark);
  line-height: 1.2;
  margin: 0;
}
@media (max-width: 480px) {
  .pay-hero__title { font-size: var(--fs-headline-md); }
}

/* =========================================================================
 * 4. Sections (progressive disclosure inside the single-page form)
 * =======================================================================*/

.section {
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-xl);
  margin-top: var(--space-xl);
}
.section:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.section[hidden] { display: none; }
.section__head {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
/* Step number — gold ring = the step you're on, solid emerald ✓ = done,
   neutral = not yet reached. Gold marks STATE, emerald marks ACTION. */
.section__num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-cream-icon);
  border: 2px solid var(--color-gold);
  color: var(--color-gold-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: var(--fs-body-sm);
  flex-shrink: 0;
}
.section.is-done .section__num {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-size: 0;             /* hide the digit… */
}
.section.is-done .section__num::after {
  content: "✓";             /* …show a check instead */
  font-size: var(--fs-body-sm);
}
.section--locked .section__num {
  background: var(--color-card-section);
  border-color: var(--color-card-section);
  color: var(--color-text-light);
}
.section__title { font-size: var(--fs-title-md); font-weight: 700; }
.section__edit {
  margin-left: auto;
  font-size: var(--fs-body-sm);
  color: var(--color-text-medium);
  background: none; border: none; cursor: pointer; padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}
.section__edit:hover { background: var(--color-card-section); color: var(--color-primary); }

.section.is-done .section__body { display: none; }
.section.is-done .section__summary { display: block; }

/* The "Login with ITS →" alt entry-point is only useful BEFORE the user
   has submitted Section 1. Once the section is locked, hide it so only the
   "Change" button is visible in the head. */
.section.is-done .section__edit--alt { display: none; }

/* A step that is NOT YET available collapses to a quiet row — number, title,
   chevron. No dead form fields, no second Continue button competing with the
   live one. The section is also [inert] (markup + pay.js) so keyboard focus
   can never land inside it. pay.js removes the class + inert on reveal. */
.section--locked {
  pointer-events: none;
  user-select: none;
}
.section--locked .section__body,
.section--locked .section__summary {
  display: none;
}
.section--locked .section__head {
  margin-bottom: 0;
  cursor: default;
}
.section--locked .section__title {
  color: var(--color-text-light);
  font-weight: 600;
}
.section--locked .section__head::after {
  content: "›";
  margin-left: auto;
  color: var(--color-text-light);
  font-size: var(--fs-headline-md);
  line-height: 1;
  opacity: 0.6;
}

/* The step that just unlocked eases in instead of popping. */
@keyframes section-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.section:not(.section--locked):not(.is-done) .section__body {
  animation: section-reveal var(--duration-slow) var(--ease-base);
}
@media (prefers-reduced-motion: reduce) {
  .section .section__body { animation: none !important; }
}
.section__summary { display: none; color: var(--color-text-medium); font-size: var(--fs-body); }
.section__summary strong { color: var(--color-text-dark); font-weight: 600; }

/* =========================================================================
 * 5. Forms
 * =======================================================================*/

.field {
  margin-bottom: var(--space-lg);
}
.field label {
  display: block;
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--color-text-medium);
  margin-bottom: var(--space-sm);
}
.field label .optional,
.field label .currency {
  font-weight: 400;
  color: var(--color-text-light);
  font-size: var(--fs-body-sm);
  margin-left: var(--space-xs);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  /* MUST stay >= 16px: iOS auto-zooms the page on focus for any smaller input.
     16px is the threshold that keeps the native-app feel (no zoom lurch). */
  font-size: 16px;
  color: var(--color-text-dark);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border var(--duration-fast) var(--ease-base), box-shadow var(--duration-fast) var(--ease-base);
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(27, 94, 59, 0.12);
}
.field input::placeholder, .field textarea::placeholder { color: var(--color-text-light); }
.field input[readonly] { background: var(--color-card-section); color: var(--color-text-medium); cursor: not-allowed; }
.field textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.field-help  { display: block; margin-top: var(--space-sm); font-size: var(--fs-body-sm); color: var(--color-text-light); }
.field-error { display: block; margin-top: var(--space-sm); font-size: var(--fs-body-sm); color: var(--color-error); }

.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: var(--color-error);
  box-shadow: 0 0 0 4px rgba(176, 0, 32, 0.08);
}

/* Two-column field layout on wider screens */
.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 var(--space-lg);
}
@media (min-width: 600px) {
  .field-grid { grid-template-columns: 1fr 1fr; }
}

/* Amount input with rupee prefix */
.amount-input {
  position: relative;
  display: flex;
  align-items: stretch;
}
.amount-symbol {
  display: flex; align-items: center;
  padding: 0 var(--space-lg);
  background: var(--color-card-section);
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  font-weight: 700;
  color: var(--color-text-medium);
  font-size: var(--fs-headline-md);
}
.amount-input input {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--fs-headline-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Radio segmented control - Mohalla selector, Pay mode, etc. */
.segment {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.segment input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segment label {
  flex: 1;
  min-width: 130px;
  margin: 0 !important;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--color-text-medium);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-base);
}
.segment input[type="radio"]:checked + label {
  background: var(--color-primary-container);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}
.segment input[type="radio"]:focus-visible + label {
  box-shadow: 0 0 0 4px rgba(27, 94, 59, 0.12);
}

/* =========================================================================
 * 6. Buttons
 * =======================================================================*/

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 24px;
  font-family: inherit;
  font-size: var(--fs-body-lg);
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-base), transform var(--duration-fast) var(--ease-base);
}
.btn:hover { background: var(--color-primary-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: var(--color-text-light); cursor: not-allowed; opacity: 0.7; }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px dashed var(--color-primary-container);
}
.btn-ghost:hover { background: var(--color-primary-container); color: var(--color-primary-dark); }
.btn-secondary { background: var(--color-surface); color: var(--color-text-dark); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-card-section); }
.btn-pay {
  background: var(--gradient-emerald);
  font-size: var(--fs-title-md);
  padding: 18px 24px;
  box-shadow: var(--shadow-elevated);
}
.btn-pay:hover { background: var(--color-primary-dark); box-shadow: var(--shadow-medium); }
.btn-pay svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-pay .tabular { font-variant-numeric: tabular-nums; }

/* =========================================================================
 * 7. Amount preview
 * =======================================================================*/

/* Total payable — white surface with an emerald accent bar; the NUMBER is
   the emphasis, not a coloured slab around it. */
.amount-preview {
  background: var(--color-surface);
  padding: var(--space-lg) var(--space-xl);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  margin-bottom: var(--space-lg);
}
.amount-preview label {
  color: var(--color-gold-dark);
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-xs);
  font-weight: 700;
}
.total-line {
  font-size: var(--fs-display);
  font-weight: 900;
  color: var(--color-primary-dark);
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}
.total-line .amount-symbol {
  font-size: var(--fs-headline-md);
  background: none; border: none; padding: 0;
  color: var(--color-primary-dark);
}

/* =========================================================================
 * 9. Alerts + chips
 * =======================================================================*/

.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--fs-body);
  margin-bottom: var(--space-lg);
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}
.alert-error   { background: var(--color-error-bg);   color: var(--color-error);   border-left: 3px solid var(--color-error);   }
.alert-success { background: var(--color-success-bg); color: var(--color-success); border-left: 3px solid var(--color-success); }
.alert-warning { background: var(--color-warning-bg); color: var(--color-warning-ink); border-left: 3px solid var(--color-warning); }
.alert strong { font-weight: 700; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip--success { background: var(--color-success-bg); color: var(--color-success); }
.chip--error   { background: var(--color-error-bg);   color: var(--color-error); }
.chip--warning { background: var(--color-warning-bg); color: var(--color-warning-ink); }
.chip--neutral { background: var(--color-card-section); color: var(--color-text-medium); }

/* =========================================================================
 * 10. Receipt block
 * =======================================================================*/

.receipt {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}
.receipt-header {
  background: var(--gradient-emerald);
  color: #fff;
  padding: var(--space-xl);
  text-align: center;
  border-bottom: 4px double var(--color-gold);
}
.receipt-header.failed { background: linear-gradient(135deg, #7a1f1f 0%, #B00020 50%, #7a1f1f 100%); border-bottom-color: rgba(255,255,255,0.3); }
.receipt-status {
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-sm);
}
.receipt-amount { font-size: var(--fs-receipt); font-weight: 900; font-variant-numeric: tabular-nums; }
.receipt-body { padding: var(--space-xl); }
.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-divider);
  gap: var(--space-lg);
  font-size: var(--fs-body);
}
.receipt-row:last-child { border-bottom: none; }
.receipt-row .label { color: var(--color-text-medium); text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--fs-micro); flex-shrink: 0; }
.receipt-row .value { color: var(--color-text-dark); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; word-break: break-all; }
.receipt-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-md);
  padding: 4px 12px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-pill);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =========================================================================
 * 11. Trust strip (the bottom band: Razorpay logo, security)
 * =======================================================================*/

/* Quiet trust line — plain centered text, no slab (a grey box reads as a
   disabled control; trust cues should whisper). */
.trust-band {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
  padding: var(--space-md) 0 0;
  margin-top: var(--space-md);
  background: transparent;
  border-radius: 0;
  font-size: var(--fs-body-sm);
  color: var(--color-text-light);
  font-size: var(--fs-body-sm);
}
.trust-band__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: nowrap;
}
.trust-band__icon {
  width: 16px; height: 16px;
  color: var(--color-success);
  flex-shrink: 0;
}
.trust-band__rp {
  font-weight: 700;
  color: var(--color-text-medium);
}

/* =========================================================================
 * 12. Identity-summary card (shown above the form when prefilled from JWT/ITS)
 * =======================================================================*/

.identity-card {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-gold-light);
  border: 1px solid var(--color-gold);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: var(--fs-body);
}
.identity-card .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}
.identity-card .meta { flex: 1; }
.identity-card .meta b { display: block; }
.identity-card .meta span { color: var(--color-text-medium); font-size: var(--fs-body-sm); }

/* Locked identity — arrived via a verified external-app link. Read-only, no
   "Change"; a quiet lock chip signals the identity is fixed (greyed feel). */
.identity-card--locked { background: var(--color-card-section); border-color: var(--color-border); }
.identity-card__lock {
  display: inline-flex; align-items: center; gap: 5px;
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--color-success-bg);
  color: var(--color-primary);
  font-size: var(--fs-body-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.identity-card__lock svg { width: 13px; height: 13px; }

/* Per-department note (tblDepartment.Message) — a quiet info callout shown under
   the payee card when a department is selected. */
.dept-note {
  display: flex; gap: var(--space-sm); align-items: flex-start;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-gold-light);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-gold);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: var(--fs-body-sm);
  color: var(--color-text-medium);
  line-height: 1.55;
}
.dept-note svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--color-gold-dark); margin-top: 1px; }

/* ── "Funds settle to" payee transparency panel ──────────────────────────
   Shown when a department is picked and again at the Review step, so the
   payer can verify which trust account receives their money before paying. */
.payee-card {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-success-bg);
  border: 1px solid var(--color-primary-container);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}
.payee-card__icon {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--color-primary-container);
  color: var(--color-primary-dark);
  display: flex; align-items: center; justify-content: center;
}
.payee-card__icon svg { width: 19px; height: 19px; }
.payee-card__body { min-width: 0; flex: 1; }
.payee-card__label {
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 2px;
}
.payee-card__name {
  font-weight: 700;
  color: var(--color-text-dark);
  font-size: var(--fs-body-lg);
  line-height: 1.3;
}
.payee-card__coords {
  margin-top: 3px;
  font-size: var(--fs-body-sm);
  color: var(--color-text-medium);
  line-height: 1.4;
}
.payee-card__coords--soft { color: var(--color-text-light); }
.payee-card__ifsc {
  font-weight: 600;
  color: var(--color-text-dark);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
/* In the Review step it sits inside #review-summary, above the receipt rows. */
.payee-card--review { margin-bottom: var(--space-lg); }

/* =========================================================================
 * 13. Spinner + overlay (during checkout open)
 * =======================================================================*/

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--color-primary-container);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: var(--space-xl) auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.overlay {
  position: fixed; inset: 0;
  background: rgba(13, 61, 38, 0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-base);
}
.overlay.is-visible { opacity: 1; pointer-events: auto; }
.overlay__msg {
  background: var(--color-surface);
  padding: var(--space-xxl);
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: 320px;
  box-shadow: var(--shadow-elevated);
}
.overlay__msg .spinner { margin: 0 auto var(--space-md); }
.overlay__msg p { color: var(--color-text-medium); margin: 0; }

/* =========================================================================
 * 14. Utilities
 * =======================================================================*/

.text-center { text-align: center; }
.text-muted  { color: var(--color-text-medium); }
.tabular     { font-variant-numeric: tabular-nums; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.row   { display: flex; align-items: center; gap: var(--space-md); }
.row--between { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); }
.row--wrap    { flex-wrap: wrap; }
.grow         { flex: 1 1 auto; min-width: 0; }
[hidden]      { display: none !important; }

/* /Success — receipt + actions live in ONE card (fused under the brand band).
   The meta block sits below the embedded receipt paper. */
.success-meta {
  border-top: 1px solid var(--color-divider);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  text-align: center;
}
.success-meta__sent {
  margin: 0 0 var(--space-lg);
  font-size: var(--fs-body);
  color: var(--color-text-dark);
}
.success-meta__countdown {
  margin: var(--space-md) 0 0;
  font-size: var(--fs-body-sm);
  color: var(--color-text-light);
}
.success-meta__countdown a { color: var(--color-gold-dark); font-weight: 600; }

/* Three-button row on the /Success page — never wraps to a second line,
   button text never wraps inside. On narrow viewports we shrink the gap. */
.success-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: nowrap !important;
  margin-top: var(--space-md);
}
.success-actions__btn {
  white-space: nowrap;
  flex: 0 1 auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}
@media (max-width: 480px) {
  .success-actions { gap: 6px !important; }
  .success-actions__btn { padding-left: var(--space-md); padding-right: var(--space-md); font-size: 13px; }
}

/* Print: hide interactive chrome, keep the brand header + receipt */
@media print {
  body { background: #fff; }
  .app-footer, .btn, .section__edit { display: none !important; }
  /* Keep the brand band visible on the printed page but flatten it to be
     printer-friendly (no heavy emerald gradient eating ink) */
  .brand {
    background: #fff !important;
    color: #1A1A2E !important;
    border: 1px solid #C9A246 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    padding: 16px 20px !important;
    margin-bottom: 18px !important;
  }
  .brand::after { display: none !important; }
  .brand__mark { background: #FFFAEC !important; }
  .brand__name { color: #1A1A2E !important; }
  .brand__tag  { color: #94732C !important; }
  .card, .receipt { box-shadow: none !important; border: 1px solid #ccc !important; }
}
