/* The Bank page (bank.html / bank.js) */
.bank-main { max-width: 1120px; }
.bank-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 18px; margin-bottom: 18px; align-items: stretch; }
.bank-balance .card-body { padding: 26px; display: flex; flex-direction: column; height: 100%; }
.bal { font: 800 46px/1.1 var(--display); letter-spacing: -.03em; margin: 8px 0 18px; }
.acct-ids { display: flex; gap: 26px; align-items: flex-end; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); }
.acct-ids small, .io small, .bc-bottom small { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.acct-ids b { font: 700 18px/1.3 ui-monospace, 'Cascadia Code', Consolas, monospace; letter-spacing: .04em; }
.acct-ids .btn { margin-left: auto; }
.bank-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 18px; }

.bank-card-wrap { display: flex; flex-direction: column; gap: 12px; }
.bank-card { position: relative; aspect-ratio: 1.586; border-radius: 18px; padding: 22px 24px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, rgba(242,194,0,.35), transparent 55%), linear-gradient(135deg, #12284a 0%, #0a1830 55%, #060d19 100%);
  border: 1px solid rgba(242,194,0,.35); box-shadow: 0 18px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08); display: flex; flex-direction: column; }
.bank-card::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(242,194,0,.07); pointer-events: none; }
.bank-card.frozen { filter: grayscale(.85) brightness(.8); }
.bc-top { display: flex; align-items: center; gap: 10px; }
.bc-logo { width: 34px; height: 34px; border-radius: 9px; }
.bc-brand { font: 800 16px var(--display); letter-spacing: -.01em; }
.bc-brand b { color: var(--gold); }
.bc-kind { margin-left: auto; font: 700 11px var(--font); letter-spacing: .14em; color: var(--gold-3); }
.bc-mid { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 12px; }
.bc-pic { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.55); box-shadow: 0 2px 8px rgba(0,0,0,.35); position: relative; z-index: 1; }
.bc-chip { width: 44px; height: 33px; border-radius: 7px; background: linear-gradient(135deg, #f8e08a, #c9a227 55%, #f2d06a); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.bc-number { font: 600 clamp(17px, 4.6vw, 22px)/1.2 ui-monospace, 'Cascadia Code', Consolas, monospace; letter-spacing: .12em; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.bc-bottom { display: flex; gap: 20px; margin-top: auto; align-items: flex-end; }
.bc-bottom > div:first-child { flex: 1; min-width: 0; }
.bc-bottom b { font: 700 13.5px ui-monospace, 'Cascadia Code', Consolas, monospace; letter-spacing: .06em; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-only { position: absolute; right: 24px; top: 58px; font-size: 10.5px; color: rgba(255,255,255,.55); letter-spacing: .04em; }
.bank-card-side { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bank-card-side .muted { flex-basis: 100%; }
.cap-bar, .cat-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; flex-basis: 100%; }
.cap-bar i, .cat-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 99px; }
.bad-note { border-color: var(--bad) !important; flex-basis: 100%; }

.bank-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: transparent; color: var(--muted); font: 600 12.5px var(--font); padding: 6px 10px; cursor: pointer; }
.seg button.on { background: var(--gold-soft); color: var(--gold); }
.input-sm { height: 32px; padding: 0 10px; font-size: 13px; }
.stmt td { vertical-align: top; }
.stmt .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stmt .ok, .io .ok { color: var(--ok); }
.nowrap { white-space: nowrap; }
.io { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.io b { font: 700 16px var(--display); }
.cat { margin-bottom: 12px; font-size: 13.5px; }
.cat .cat-bar { margin-top: 5px; }
.access-row { justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.access-row select { width: auto; }

.bank-open { max-width: 620px; margin: 30px auto; text-align: center; }
.bank-open .card-body { padding: 40px 34px; }
.bank-open-art img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 8px 26px var(--gold-glow); }
.bank-open h1 { margin-top: 16px; }
.bank-list { text-align: left; display: inline-block; margin: 6px 0 22px; color: var(--text-2); }

@media (max-width: 900px) {
  .bank-hero, .bank-grid { grid-template-columns: minmax(0, 1fr); }
  .bal { font-size: 38px; }
}
@media (max-width: 520px) {
  .acct-ids { gap: 14px; }
  .acct-ids .btn { margin-left: 0; }
  .bank-card { padding: 18px; }
  .io { grid-template-columns: 1fr 1fr; }
}
.recur { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.recur:last-child { border-bottom: 0; padding-bottom: 0; }
.recur.off { opacity: .55; }

/* Smile Pay page (pay.html / pay.js) */
.pay-card { max-width: 440px; }
.pay-brand { display: flex; align-items: center; gap: 10px; font: 800 18px var(--display); margin-bottom: 18px; }
.pay-brand img { width: 34px; height: 34px; border-radius: 9px; }
.pay-brand b { color: var(--gold); }
.pay-sum { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); margin-bottom: 18px; }
.pay-amt { font: 800 30px/1.2 var(--display); margin-top: 6px; }
.pay-amt small { font: 500 13px var(--font); color: var(--muted); margin-left: 6px; }
.pay-one { width: 100%; }
.pay-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin: 16px 0; }
.pay-or::before, .pay-or::after { content: ''; flex: 1; border-top: 1px solid var(--line-2); }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; letter-spacing: .06em; }
#cardForm .btn-primary { width: 100%; }
.pay-foot { margin: 16px 0 0; }
.pay-done { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font: 800 28px var(--font); margin-bottom: 12px; }
.bank-switch { margin-bottom: 16px; }
.bank-switch button { padding: 8px 14px; font-size: 13.5px; }

/* Phones and tablets (2026-10-31: "make it phone ipad all device friendly") */
.bank-grid .card-head { flex-wrap: wrap; gap: 8px; }
.bank-grid .card-head > .row { flex-wrap: wrap; }
@media (max-width: 1024px) {
  .bank-main { padding-left: 18px; padding-right: 18px; }
  .bank-grid { grid-template-columns: minmax(0, 1fr); }
  .bank-grid > .stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
}
@media (max-width: 900px) {
  .bank-card-wrap { max-width: 460px; width: 100%; margin: 0 auto; }
}
@media (max-width: 640px) {
  .bank-main { padding: 18px 14px 56px; }
  .bank-switch { display: flex; width: 100%; }
  .bank-switch button { flex: 1; padding: 10px 8px; }
  .bank-balance .card-body { padding: 20px 18px; }
  .bal { font-size: 34px; margin: 6px 0 14px; }
  .acct-ids { gap: 12px 20px; padding: 12px 14px; }
  .acct-ids b { font-size: 16px; }
  .bank-actions { gap: 8px; }
  .bank-actions .btn { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .bank-card { border-radius: 14px; }
  .bc-only { top: 54px; right: 18px; font-size: 9.5px; }
  .bank-card-side .btn { flex: 1 1 auto; }
  .bank-grid > .stack { grid-template-columns: minmax(0, 1fr); }
  .bank-grid .card-head > .row { width: 100%; }
  .bank-grid .card-head .seg { flex: 1; }
  .bank-grid .card-head .seg button { flex: 1; }
  #stmtQ { flex: 1; width: auto !important; min-width: 0; }
  .io { grid-template-columns: 1fr 1fr; }
  .recur { flex-wrap: wrap; }
  .access-row { flex-wrap: wrap; }
  .modal { max-width: calc(100vw - 20px); }
  .pay-card { padding: 22px 18px; }
  .pay-amt { font-size: 26px; }
}
@media (max-width: 640px) {
  .bank-grid .card-head .seg { flex: 1 1 100%; display: flex; }
  .seg button { white-space: nowrap; }
}

/* Transactions, payees and quick pay (2026-11-01: "make it look more like a bank") */
.modal [hidden], .bank-main [hidden] { display: none !important; }
.ini { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: #fff; font-weight: 800; width: 38px; height: 38px; letter-spacing: .02em; }
.ini-icon { background: var(--surface-3); color: var(--gold); font-size: 18px; }
.ini-icon .i { width: 18px; height: 18px; }
.ini-smile { background: transparent; overflow: hidden; }
.ini-smile img { width: 100%; height: 100%; border-radius: 50%; }
.ini-lg { width: 60px !important; height: 60px !important; font-size: 22px !important; }
.ini-lg .i { width: 26px; height: 26px; }
.tx-list { display: flex; flex-direction: column; }
.tx-empty { padding: 18px 20px; margin: 0; }
.tx-day { position: sticky; top: 0; z-index: 1; padding: 10px 20px 6px; font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--line); }
.tx { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .12s; }
.tx:hover, .tx:focus-visible { background: var(--surface-2); outline: none; }
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tx-main b, .tx-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-amt b { font: 700 15px var(--font); }
.tx-amt b.in, .txd-amt.in { color: var(--ok); }
.txd-head { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding-bottom: 6px; }
.txd-amt { font: 800 32px/1.2 var(--display); letter-spacing: -.02em; margin-top: 8px; }
.txd { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.txd-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.txd-row:last-child { border-bottom: 0; }
.txd-row > span:last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.payee { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.payee:last-child { border-bottom: 0; }
.payee.off { opacity: .55; }
.payee-main { flex: 1; min-width: 0; }
.payee-main b { overflow-wrap: anywhere; }
.payee-btns { display: flex; gap: 4px; flex: none; }
.quick-pay { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.quick-pay small { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.qp-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.qp { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; flex: none; padding: 6px 2px; border: 0; border-radius: 12px; background: transparent; color: var(--text-2); font: 600 12px var(--font); cursor: pointer; }
.qp:hover { background: var(--surface-2); color: var(--text); }
.qp span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-payee { display: flex; flex-wrap: wrap; gap: 6px; }
.pp { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface-2); color: var(--text); font: 600 13px var(--font); cursor: pointer; max-width: 100%; }
.pp span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp.on { border-color: var(--gold); background: var(--gold-soft); }
.payee-shown { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 10px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; accent-color: var(--gold); }
@media (max-width: 640px) {
  .tx { padding: 12px 14px; gap: 12px; }
  .tx-day { padding: 10px 14px 6px; }
  .tx .ini { width: 36px; height: 36px; }
  .txd-amt { font-size: 28px; }
}
.payee-main .mono { white-space: nowrap; }

/* Logos and reported payments (2026-11-01) */
.ini-img { background: transparent; overflow: hidden; }
.ini-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.rep { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 1px 7px; border-radius: 99px; font: 700 10.5px var(--font); letter-spacing: .03em; text-transform: uppercase; background: var(--warn-soft, rgba(250,204,21,.15)); color: var(--warn, #facc15); }
.rep-refunded { background: var(--ok-soft); color: var(--ok); }
.rep-declined { background: var(--bad-soft); color: var(--bad); }
.rep-box { padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface-2); }
.rep-box.rep-open { border-color: rgba(250,204,21,.4); }
.rep-box.rep-refunded { border-color: var(--ok); }
.rep-box.rep-declined { border-color: var(--bad); }
.rep-box .small { margin-top: 2px; color: var(--text-2); }
.rep-btn { width: 100%; justify-content: center; color: var(--muted); }
.rep-btn .i { width: 16px; height: 16px; margin-right: 6px; }
.tx-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tx-name b { min-width: 0; }
.tx-name .rep { margin-left: 0; flex: none; }

/* Smile credit card (bank.js creditSection) */
.bank-card.credit { background: linear-gradient(135deg, #2b1055 0%, #7a2c8f 55%, #d4507a 100%); }
.credit-card { margin-bottom: 16px; }
.credit-card .card-head h3 { display: flex; align-items: center; gap: 8px; }
.credit-card.late { border-color: var(--bad, #e5484d); }
.credit-body { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.credit-left { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.credit-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.credit-bar i { background: linear-gradient(90deg, #7a2c8f, #d4507a); }
.credit-rules { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.credit-warn { border: 1px solid var(--bad, #e5484d); border-radius: 10px; padding: 10px 12px; background: color-mix(in srgb, var(--bad, #e5484d) 10%, transparent); font-size: 14px; }
.credit-warn ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.credit-standing { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ok, #30a46c) 18%, transparent); color: var(--ok, #30a46c); }
.credit-standing.st-overdue, .credit-standing.st-defaulted { background: color-mix(in srgb, var(--bad, #e5484d) 18%, transparent); color: var(--bad, #e5484d); }
.credit-st, .credit-lines { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.credit-lines .tx-main { min-width: 0; }
.credit-lines .tx-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credit-st-row { justify-content: space-between; gap: 10px; font-size: 14px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.credit-st-row > span:first-child { flex: 1; }
.tx.tx-static { cursor: default; padding-left: 0; padding-right: 0; }
.credit-terms summary { cursor: pointer; color: var(--muted); }
.credit-terms .credit-rules { margin-top: 8px; }
.bal-who { display: inline-flex; align-items: center; gap: 8px; }
.who-row { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { .credit-body { grid-template-columns: minmax(0, 1fr); } .credit-main .io { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Credit card tile on the Bank page -> /credit (credit.js) */
.credit-tile { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 16px; color: inherit; text-decoration: none; }
.credit-tile:hover { border-color: var(--gold); }
.credit-tile.late { border-color: var(--bad, #e5484d); }
.credit-tile-art { width: 54px; height: 34px; border-radius: 6px; flex: none; background: linear-gradient(135deg, #2b1055 0%, #7a2c8f 55%, #d4507a 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.credit-tile-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.bad-text { color: var(--bad, #e5484d); }
.credit-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.credit-head h1 { margin: 0; font-size: 26px; }
