/* pay-ui.css — Frenzon member portal: the Payments page (redesign, 5 Nov 2026).
   Hero, payment tiles, step cards, pay-with tiles, payment details "ticket",
   month cards, sticky send bar, history, fines, renewals.
   Reads theme.css tokens and the fund colours from account-ui.css.
   Load after style.css, payment-instructions.css and account-ui.css.
   No inline styles are used anywhere (the portal CSP is style-src 'self'). */

:root {
  --pay-ink: #0d2a1e;
  --pay-gold: #e0b04a;
  --pay-gold-soft: #f6e3b0;
  --pay-card: #ffffff;
  --pay-line: #dde7e2;
  --pay-glow: 0 18px 40px -22px rgba(20, 67, 47, .55);
}

/* ============ HERO ============ */
.pay-hero { position: relative; overflow: hidden; margin: 2px 0 14px; padding: 20px 18px 18px; border-radius: 24px; color: #fff;
  background:
    radial-gradient(90% 120% at 100% -10%, rgba(224, 176, 74, .38) 0, rgba(224, 176, 74, 0) 55%),
    radial-gradient(120% 140% at 0% 110%, #2b8a62 0, rgba(43, 138, 98, 0) 60%),
    linear-gradient(160deg, #14432f 0%, #0b2c1e 100%);
  box-shadow: var(--pay-glow); }
.pay-hero-glow { position: absolute; right: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 0 0 26px rgba(255,255,255,.04), 0 0 0 54px rgba(255,255,255,.03); pointer-events: none; }
.pay-hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: rgba(255,255,255,.14);
  font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #f6e3b0; }
.pay-hero-badge svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pay-hero-title { margin: 12px 0 4px; max-width: 22ch; font-size: 1.55rem; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.pay-hero-sub { margin: 0; max-width: 40ch; font-size: .9rem; color: #cfe8da; line-height: 1.45; }
.pay-how { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.pay-how li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: rgba(255,255,255,.12);
  font-size: .8rem; font-weight: 700; backdrop-filter: blur(4px); }
.pay-how li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pay-gold); color: #3b2a02; font-size: .76rem; font-weight: 800; }

/* ============ CHIPS (hero + history filters) ============ */
.pay-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pay-chips:empty { display: none; }
.pay-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 13px; border: 0; border-radius: 99px; font: inherit; font-size: .8rem; font-weight: 750;
  color: #fff; background: rgba(255,255,255,.16); cursor: pointer; transition: transform .12s, background .15s; }
button.pay-chip:hover { background: rgba(255,255,255,.26); }
button.pay-chip:active { transform: scale(.97); }
.pay-chip.warn { background: rgba(224,176,74,.9); color: #3b2a02; }
.pay-chip.bad { background: #ffd9d4; color: #8a1a10; }
.pay-chip.info { background: rgba(255,255,255,.9); color: #174a85; }
.pay-chip.good { background: rgba(255,255,255,.18); color: #d9f5e6; cursor: default; }
.pay-chip.good::before { content: "\2713"; font-weight: 900; }
.pay-chips-light { margin: 0 0 12px; }
.pay-chips-light .pay-chip { background: var(--bg-subtle); color: var(--text-main); border: 1px solid var(--border-dark); }
.pay-chips-light .pay-chip b { font-variant-numeric: tabular-nums; color: var(--text-muted); }
.pay-chips-light .pay-chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.pay-chips-light .pay-chip.on b { color: #cfe8da; }

/* ============ TILES (the tab bar) ============ */
.pay-tabs-wrap { margin: 0 -16px 14px; }
.tabs.pay-tabs { gap: 10px; margin: 0; padding: 4px 16px 12px; background: none; border-radius: 0; scroll-snap-type: x proximity; }
.tabs.pay-tabs .tab-button.pay-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px;
  width: 132px; min-height: 104px; padding: 12px; text-align: left; white-space: normal; background: var(--pay-card); color: var(--text-main);
  border: 1.5px solid var(--pay-line); border-radius: 20px; box-shadow: var(--shadow-sm); scroll-snap-align: center;
  transition: transform .14s, box-shadow .18s, border-color .18s, background .18s; }
.tabs.pay-tabs .tab-button.pay-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tabs.pay-tabs .tab-button.pay-tile:active { transform: scale(.97); }
.tabs.pay-tabs .tab-button.pay-tile:focus-visible { outline: 3px solid rgba(31,107,74,.35); outline-offset: 2px; }
.pay-tile-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: #fff;
  background: linear-gradient(145deg, var(--fc), color-mix(in srgb, var(--fc) 70%, #000)); box-shadow: 0 8px 14px -8px var(--fc); }
.pay-tile-ic svg, .pay-pane-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pay-tile-txt { display: grid; gap: 1px; min-width: 0; }
.pay-tile-t { font-size: .88rem; font-weight: 800; line-height: 1.15; }
.pay-tile-s { font-size: .7rem; font-weight: 600; color: var(--text-muted); line-height: 1.25; }
.tabs.pay-tabs .tab-button.pay-tile.active { border-color: transparent; color: #fff; transform: translateY(-2px);
  background: radial-gradient(120% 120% at 100% 0%, #2b8a62 0, rgba(43,138,98,0) 60%), linear-gradient(160deg, #14432f, #0b2c1e); box-shadow: var(--pay-glow); }
.tabs.pay-tabs .tab-button.pay-tile.active .pay-tile-s { color: #bfe3cf; }
.tabs.pay-tabs .tab-button.pay-tile.active .pay-tile-ic { background: rgba(255,255,255,.18); box-shadow: none; }
.pay-tile-badge { position: absolute; top: 9px; right: 9px; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 99px;
  background: var(--danger); color: #fff; font-size: .72rem; font-weight: 800; box-shadow: 0 0 0 3px var(--pay-card); }
.pay-tile.active .pay-tile-badge { box-shadow: 0 0 0 3px #14432f; }
.pay-tile-badge.hidden { display: none; }

/* ============ PANE HEAD ============ */
.pay-pane-head { display: flex; align-items: center; gap: 12px; margin: 2px 2px 14px; }
.pay-pane-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; color: #fff; background: var(--fc, var(--primary-500)); }
.pay-pane-title { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.pay-pane-sub { margin: 2px 0 0; font-size: .86rem; color: var(--text-muted); }

/* ============ FORM STEPS ============ */
.pay-form { display: grid; gap: 12px; }
.pay-step { position: relative; padding: 16px 16px 6px; background: var(--pay-card); border: 1px solid var(--pay-line); border-radius: 22px; box-shadow: var(--shadow-sm);
  animation: pay-rise .35s ease both; }
.pay-step:nth-child(2) { animation-delay: .05s; } .pay-step:nth-child(3) { animation-delay: .1s; }
@keyframes pay-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pay-step-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.pay-n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 800; font-size: .92rem; color: #fff;
  background: linear-gradient(145deg, #2b8a62, #14432f); box-shadow: 0 8px 14px -8px #14432f; }
.pay-step-title { margin: 0; font-size: 1.02rem; font-weight: 800; line-height: 1.25; }
.pay-step-hint { margin: 2px 0 0; font-size: .82rem; color: var(--text-muted); line-height: 1.4; }
.pay-opt { margin-left: 4px; font-size: .72rem; font-weight: 600; color: var(--text-muted); }
.pay-form .form-label { font-weight: 750; }
.pay-form .form-control { border-radius: 14px; min-height: 48px; }
.pay-form textarea.form-control { min-height: 76px; }
.pay-ref { font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.pay-subhead { margin: 2px 0 8px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }

/* money input with a UGX tag */
.pay-money { display: flex; align-items: stretch; border: 1px solid var(--border-dark); border-radius: 14px; background: var(--surface); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.pay-money:focus-within { border-color: var(--primary-500); box-shadow: var(--shadow-focus); }
.pay-money > span { display: grid; place-items: center; padding: 0 12px; background: var(--bg-subtle); color: var(--text-muted); font-size: .78rem; font-weight: 800; border-right: 1px solid var(--border-color); }
.pay-form .pay-money .form-control { flex: 1; min-width: 0; border: 0; border-radius: 0; box-shadow: none; font-weight: 750; font-variant-numeric: tabular-nums; }
.pay-money-lg .form-control { font-size: 1.25rem; min-height: 56px; }
.pay-extras { display: grid; gap: 0 14px; margin-top: 14px; }
@media (min-width: 560px) { .pay-extras { grid-template-columns: 1fr 1fr; } }

/* ============ PAY-WITH TILES ============ */
.pay-native-hidden { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.pay-channels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .pay-channels { grid-template-columns: repeat(4, 1fr); } }
.pay-ch { position: relative; display: grid; gap: 2px; justify-items: start; padding: 12px; text-align: left; font: inherit; cursor: pointer; color: var(--text-main);
  background: var(--surface); border: 1.5px solid var(--border-dark); border-radius: 18px; transition: transform .12s, border-color .15s, box-shadow .15s, background .15s; }
.pay-ch:hover { border-color: var(--primary-500); }
.pay-ch:active { transform: scale(.98); }
.pay-ch:focus-visible { outline: 3px solid rgba(31,107,74,.35); outline-offset: 2px; }
.pay-ch-badge { display: inline-grid; place-items: center; min-width: 46px; height: 26px; padding: 0 9px; margin-bottom: 8px; border-radius: 99px; font-size: .7rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.ch-mtn .pay-ch-badge { background: #ffcc00; color: #1d1d1b; }
.ch-airtel .pay-ch-badge { background: #e4002b; color: #fff; }
.ch-bank .pay-ch-badge { background: #1f5fa8; color: #fff; }
.ch-other .pay-ch-badge { background: #6b7280; color: #fff; }
.pay-ch-t { font-size: .9rem; font-weight: 800; line-height: 1.15; }
.pay-ch-s { font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.pay-ch-tick { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-dark); background: var(--surface); transition: all .15s; }
.pay-ch.on { border-color: var(--primary-500); background: linear-gradient(180deg, #f2fbf6, #e6f6ed); box-shadow: 0 0 0 3px rgba(31,107,74,.16), var(--shadow-sm); }
.pay-ch.on .pay-ch-tick { border-color: var(--primary-500); background: var(--primary-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 12.5 4.3 4.3L18.5 8'/%3E%3C/svg%3E") center / 80% no-repeat; }

/* ============ PAYMENT DETAILS "TICKET" ============ */
body .pi-panel { position: relative; margin: 14px 0 12px; padding: 16px; color: #fff; border: 0; border-radius: 20px; overflow: hidden;
  background: radial-gradient(110% 150% at 100% 0%, rgba(224,176,74,.28) 0, rgba(224,176,74,0) 55%), linear-gradient(160deg, #14432f, #0b2c1e);
  box-shadow: var(--pay-glow); animation: pay-rise .3s ease both; }
body .pi-panel::before, body .pi-panel::after { content: ""; position: absolute; top: 56px; width: 18px; height: 18px; border-radius: 50%; background: var(--pay-card); }
body .pi-panel::before { left: -9px; } body .pi-panel::after { right: -9px; }
body .pi-warn { background: linear-gradient(160deg, #7a4504, #4d2b02); }
body .pi-error { background: linear-gradient(160deg, #8a1a10, #5b0f08); }
body .pi-loading { background: linear-gradient(160deg, #2a5b45, #173b2c); }
body .pi-head { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 2px dashed rgba(255,255,255,.22); }
body .pi-badge { background: var(--pay-gold); color: #3b2a02; font-weight: 900; }
body .pi-title { margin: 0; font-size: .98rem; font-weight: 800; color: #fff; }
body .pi-list { display: grid; gap: 12px; margin: 0; }
body .pi-row { display: grid; gap: 3px; }
body .pi-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #bfe3cf; }
body .pi-value-wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }
body .pi-value { font-size: 1.3rem; font-weight: 800; letter-spacing: .03em; font-variant-numeric: tabular-nums; color: #fff; overflow-wrap: anywhere; }
body .pi-missing { color: #f6e3b0; font-weight: 700; }
body .pi-btn { min-height: 36px; padding: 0 14px; border: 0; border-radius: 99px; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; background: var(--pay-gold); color: #3b2a02; }
body .pi-btn:active { transform: scale(.96); }
body .pi-btn.is-copied { background: #fff; color: #0e5a3a; }
body .pi-msg { margin: 14px 0 0; font-size: .8rem; line-height: 1.5; color: #d3eddf; }
body .pi-warn .pi-msg, body .pi-error .pi-msg { color: #ffe9bd; }
.modal-body .pi-panel::before, .modal-body .pi-panel::after { background: var(--surface); }

/* ============ MONTH CARDS ============ */
.pay-months-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.pay-link { flex: none; padding: 6px 12px; border: 1px solid var(--primary-500); border-radius: 99px; background: var(--surface); color: var(--primary); font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.pay-link:hover { background: var(--primary-light); }
.pay-form .month-picker { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
.pay-form .month-year { grid-column: 1 / -1; margin: 8px 2px 0; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
@media (min-width: 640px) { .pay-form .month-picker { grid-template-columns: repeat(2, 1fr); } }
.pay-form .month-row { position: relative; padding: 12px 14px; border: 1.5px solid var(--border-dark); border-radius: 18px; background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s; }
.pay-form .month-row.selected { border-color: var(--primary-500); background: linear-gradient(180deg, #f2fbf6, #e8f6ee); box-shadow: 0 0 0 3px rgba(31,107,74,.14); }
.pay-form .month-check { display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; }
.pay-form .month-cb { position: absolute; opacity: 0; width: 1px; height: 1px; }
.month-box { flex: none; width: 26px; height: 26px; border: 2px solid var(--border-dark); border-radius: 9px; background: var(--surface); transition: all .15s; }
.month-cb:checked + .month-box { border-color: var(--primary-500); background: var(--primary-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 12.5 4.3 4.3L18.5 8'/%3E%3C/svg%3E") center / 80% no-repeat; }
.month-cb:focus-visible + .month-box { outline: 3px solid rgba(31,107,74,.35); outline-offset: 2px; }
.month-cb:disabled + .month-box { opacity: .4; }
.month-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.pay-form .month-name { font-weight: 800; font-size: 1rem; }
.pay-form .month-hint { margin: 0; font-size: .76rem; color: var(--text-muted); }
.pay-form .month-amount { margin: 10px 0 2px; }
.pay-form .month-amount .pay-money { max-width: none; }
.pay-month-summary { display: inline-flex; margin-top: 12px; padding: 7px 14px; border-radius: 99px; background: var(--primary-light); color: var(--primary); font-size: .84rem; font-weight: 800; }
.pay-month-total { margin: 8px 2px 0; font-size: .8rem; color: var(--text-muted); min-height: 1em; }

/* ============ STICKY SEND BAR ============ */
.pay-bar { position: sticky; z-index: 20; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 2px; padding: 12px 12px 12px 18px; border: 1px solid var(--pay-line); border-radius: 22px;
  background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 18px 40px -16px rgba(16,35,27,.45); }
@media (min-width: 900px) { .pay-bar { bottom: 16px; } }
.pay-bar-sum { display: grid; gap: 1px; min-width: 0; }
.pay-bar-l { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.pay-bar-amt { font-size: 1.35rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--primary); }
.pay-bar-note { font-size: .92rem; }
.pay-bar-sub { font-size: .72rem; color: var(--text-muted); overflow-wrap: anywhere; }
.pay-bar-sub:empty { display: none; }
.pay-bar .pay-send { flex: none; min-height: 52px; padding: 0 24px; border-radius: 16px; font-size: .98rem; font-weight: 800;
  background: linear-gradient(160deg, #e9bd57, #d19a1f); color: #3b2a02; box-shadow: 0 10px 18px -10px #b27d0b; }
.pay-bar .pay-send:hover { background: linear-gradient(160deg, #efc666, #d8a22b); }
.pay-bar .pay-send:disabled { opacity: .6; }
.pay-form .alert { border-radius: 16px; }
.pay-form .alert-success { font-weight: 700; }
.pay-form .support-inline { margin: 0; }

/* ============ LISTS: fines, renewals, rejected, history ============ */
.pay-list { display: grid; gap: 10px; }
.pay-list-gap { margin-top: 10px; }
.pay-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px; background: var(--pay-card); border: 1px solid var(--pay-line); border-left: 5px solid var(--border-dark); border-radius: 18px; box-shadow: var(--shadow-sm); }
.pay-item.is-due { border-left-color: #e0a43a; background: linear-gradient(90deg, #fffbf1, var(--pay-card) 55%); }
.pay-item.is-bad { border-left-color: var(--danger); background: linear-gradient(90deg, #fff6f5, var(--pay-card) 55%); }
.pay-item-ic, .ph-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: #fff; background: var(--fc, var(--f-other)); }
.pay-item-ic svg, .ph-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pay-item-main { flex: 1; min-width: 0; }
.pay-item-t { font-weight: 800; font-size: .96rem; }
.pay-item-s { margin-top: 2px; font-size: .78rem; color: var(--text-muted); overflow-wrap: anywhere; }
.pay-item-kv { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; font-size: .74rem; color: var(--text-muted); }
.pay-item-kv b { color: var(--text-main); font-weight: 700; }
.pay-item-side { flex: none; display: grid; gap: 6px; justify-items: end; text-align: right; }
.pay-item-amt { font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; }
.pay-more { margin-top: 12px; border: 1px solid var(--pay-line); border-radius: 18px; background: var(--pay-card); overflow: hidden; }
.pay-more > summary { cursor: pointer; padding: 13px 16px; font-size: .86rem; font-weight: 800; color: var(--primary); list-style: none; }
.pay-more > summary::-webkit-details-marker { display: none; }
.pay-more[open] > summary { border-bottom: 1px solid var(--pay-line); }
.pay-more .pay-list { padding: 10px; }
.pay-allgood { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; background: var(--success-light); color: #0e5a3a; }
.pay-allgood svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pay-allgood div { display: grid; }
.pay-allgood span { font-size: .82rem; }
.pay-rejected { margin-bottom: 14px; padding: 14px; border-radius: 22px; background: var(--danger-light); border: 1px solid #f4c3be; }
.pay-rejected-head { display: grid; gap: 2px; margin-bottom: 10px; color: #8a1a10; font-size: .84rem; }
.pay-rejected-head b { font-size: 1rem; }

.pay-card { border-left: 0; border-radius: 22px; margin-top: 14px; }
.pay-hist-tools { margin-bottom: 4px; }
.pay-hist { display: grid; gap: 0; }
.ph-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px; padding: 13px 2px; border-bottom: 1px solid var(--pay-line); }
.ph-item:last-child { border-bottom: 0; }
.ph-main { min-width: 0; }
.ph-title { font-weight: 800; font-size: .94rem; }
.ph-sub { margin-top: 1px; font-size: .76rem; color: var(--text-muted); overflow-wrap: anywhere; }
.ph-reason { margin-top: 3px; font-size: .76rem; color: #8a1a10; }
.ph-side { display: grid; gap: 4px; justify-items: end; text-align: right; }
.ph-amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.ph-act { grid-column: 2 / -1; }
.history-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.loan-pay-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* the dialog used for fines and renewals */
.pay-dlg-sum { display: grid; gap: 2px; margin-bottom: 12px; padding: 14px; border-radius: 16px; background: var(--primary-light); color: var(--primary); }
.pay-dlg-sum span { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.pay-dlg-sum b { font-size: 1rem; }
.pay-dlg-sum em { font-style: normal; font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.modal .pay-channels { margin-bottom: 4px; }

/* ============ DESKTOP ============ */
@media (min-width: 900px) {
  .pay-hero { padding: 28px 30px 24px; }
  .pay-hero-title { font-size: 2rem; max-width: 26ch; }
  .pay-tabs-wrap { margin: 0 0 18px; }
  .tabs.pay-tabs { flex-wrap: wrap; overflow: visible; padding: 4px 0 8px; }
  .tabs.pay-tabs .tab-button.pay-tile { width: calc((100% - 60px) / 7); min-width: 118px; flex: 1 1 118px; }
  .pay-step { padding: 20px 22px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .pay-step, body .pi-panel { animation: none; }
  .tabs.pay-tabs .tab-button.pay-tile, .pay-ch, .pay-chip { transition: none; }
}

/* phone tidy-ups */
@media (max-width: 520px) {
  .pay-months-top { flex-direction: column; align-items: stretch; }
  .pay-link { align-self: flex-start; }
  .pay-item { flex-wrap: wrap; }
  .pay-item-main { flex: 1 1 60%; }
  .pay-item-side { flex: 1 1 100%; grid-auto-flow: column; justify-content: space-between; align-items: center; justify-items: start; text-align: left; }
  .pay-item-side .btn { justify-self: end; }
}

/* details ticket: keep every part dark-on-green, override older panel styles */
body .pi-panel .pi-row { padding: 0; border: 0; background: none; }
body .pi-panel .pi-row + .pi-row { padding-top: 12px; border-top: 1px solid rgba(255,255,255,.14); }
body .pi-panel.pi-ok .pi-msg, body .pi-panel.pi-warn .pi-msg, body .pi-panel.pi-error .pi-msg, body .pi-panel .pi-msg {
  padding: 10px 12px; border: 0; border-radius: 12px; background: rgba(255,255,255,.1); color: #e3f4ea; }
body .pi-panel.pi-warn .pi-msg, body .pi-panel.pi-error .pi-msg { color: #ffe9bd; }
body .pi-panel .pi-list { margin: 0; }
.pay-bar-amt { white-space: nowrap; }
@media (max-width: 520px) {
  .pay-bar { padding: 10px 10px 10px 14px; }
  .pay-bar-amt { font-size: 1.15rem; }
  .pay-bar .pay-send { padding: 0 16px; font-size: .92rem; }
}

/* ============ ADDITIONS (Continuation 11, second pass) ============ */

/* The 7 tiles roll by themselves on a phone; snapping is switched off so the slow scroll is smooth. */
.tabs.pay-tabs.is-rolling { scroll-snap-type: none; scrollbar-width: none; }
.tabs.pay-tabs.is-rolling::-webkit-scrollbar { display: none; }

/* Months: folded away until the member opens them; ticked months always show */
.pay-months-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-link-solid { background: var(--primary); color: #fff; border-color: var(--primary); }
.pay-link-solid:hover { background: var(--primary); filter: brightness(1.12); }
.pay-form .month-picker.is-collapsed { margin-top: 6px; }
.pay-form .month-picker.is-collapsed .month-year,
.pay-form .month-picker.is-collapsed .month-row:not(.selected) { display: none; }
.pay-hint { margin-top: 6px; font-size: .76rem; font-weight: 700; color: var(--text-muted); }
.pay-hint.hidden { display: none; }
@media (max-width: 520px) { .pay-months-btns { width: 100%; } }

/* Account statement: heading banner */
.stmt-card { padding: 0 18px 18px; overflow: hidden; }
.stmt-head { position: relative; display: flex; align-items: center; gap: 14px; margin: 0 -18px 16px; padding: 20px 18px; color: #fff; overflow: hidden;
  background:
    radial-gradient(90% 140% at 100% -20%, rgba(224, 176, 74, .42) 0, rgba(224, 176, 74, 0) 55%),
    radial-gradient(120% 140% at 0% 120%, #2b8a62 0, rgba(43, 138, 98, 0) 60%),
    linear-gradient(160deg, #14432f 0%, #0b2c1e 100%); }
.stmt-glow { position: absolute; right: -34px; top: -34px; width: 130px; height: 130px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 0 0 22px rgba(255,255,255,.04), 0 0 0 46px rgba(255,255,255,.03); pointer-events: none; }
.stmt-ic { position: relative; flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; color: #3b2a02;
  background: linear-gradient(145deg, #f6e3b0, #e0b04a); box-shadow: 0 10px 18px -10px rgba(0,0,0,.6); }
.stmt-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stmt-txt { position: relative; min-width: 0; }
.stmt-kicker { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #f6e3b0; }
.stmt-title { margin: 3px 0 2px; font-size: 1.35rem; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.stmt-sub { margin: 0; font-size: .84rem; line-height: 1.4; color: #cfe8da; }

/* Statement: money in / money out joined to the transactions below */
.ms-flow { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--pay-line); border-bottom: 0; border-radius: 18px 18px 0 0; background: var(--surface); }
.ms-flowbox { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ic l" "v v" "s s"; align-items: center; gap: 2px 10px; padding: 14px 14px 13px; }
.ms-flowbox.in { background: linear-gradient(180deg, #e6f7ee, #f5fcf8); }
.ms-flowbox.out { background: linear-gradient(180deg, #fdebe8, #fff7f6); border-left: 1px solid var(--pay-line); }
.ms-flowic { grid-area: ic; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; }
.ms-flowbox.in .ms-flowic { background: #1c7c54; }
.ms-flowbox.out .ms-flowic { background: #b42318; }
.ms-flowic svg { width: 16px; height: 16px; }
.ms-flowl { grid-area: l; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ms-flowbox.in .ms-flowl { color: #14603f; }
.ms-flowbox.out .ms-flowl { color: #8a1a10; }
.ms-flowv { grid-area: v; margin-top: 6px; font-size: clamp(1.1rem, 5.2vw, 1.5rem); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ms-flowbox.in .ms-flowv { color: #1c7c54; }
.ms-flowbox.out .ms-flowv { color: #b42318; }
.ms-flows { grid-area: s; font-size: .74rem; font-weight: 600; color: var(--text-muted); }
.ms-subhead-flat { border-radius: 0; }
.ms-subhead-gap { margin-top: 18px; }
.ms-totals-profit { margin: 0; padding: 10px; border: 1px solid var(--pay-line); border-top: 0; border-radius: 0 0 12px 12px; }

/* Small dots under a sideways row of tiles (Payments tiles, Home Quick Actions) */
.roll-dots { display: flex; justify-content: center; align-items: center; gap: 7px; padding: 2px 0 8px; }
.roll-dots.hidden { display: none; }
.roll-dot { position: relative; width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px; background: rgba(20, 67, 47, .22); cursor: pointer;
  transition: width .25s ease, background .25s ease; }
.roll-dot::after { content: ""; position: absolute; inset: -9px -4px; }   /* bigger tap area */
.roll-dot.on { width: 22px; background: var(--primary); }
@media (prefers-reduced-motion: reduce) { .roll-dot { transition: none; } }
