/* SeaPay® online banking — Cards. The plastic follows Paymaster's walletKinds.css (.kp): SeaPay wine
   #8a2a4c → #7b2342 → #4f1629, in Night and Day alike. Everything else uses bank.css tokens. */

/* ── the plastic ───────────────────────────────────────────────────────────────────────── */
.kp { --w: 236px; position: relative; width: var(--w); max-width: 100%; aspect-ratio: 1.586; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; overflow: hidden; color: #fff; text-decoration: none; background: linear-gradient(135deg, #8a2a4c 0%, #7b2342 38%, #4f1629 100%); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.14); transition: transform 0.15s ease, box-shadow 0.15s ease; flex: 0 0 auto; }
a.kp:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(79, 22, 41, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
a.kp:focus-visible { outline: 2px solid var(--sp-rose); outline-offset: 3px; }
:root[data-theme='light'] .kp { box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.kp-shine { position: absolute; inset: 0; background: radial-gradient(120% 80% at 85% -10%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 55%), linear-gradient(115deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 45%); pointer-events: none; }
.kp-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kp-issuer { font-family: var(--font-display); font-weight: 400; font-size: 19px; line-height: 1; color: #fff; }
.kp-issuer sup { font-size: 7px; }
.kp-kind { font-size: 8.5px; font-weight: 600; letter-spacing: 0.18em; color: rgba(255, 255, 255, 0.74); padding-top: 3px; white-space: nowrap; }
.kp-mid { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 12px; min-height: 20px; }
.kp-chip { width: 30px; height: 22px; border-radius: 5px; background: linear-gradient(135deg, #e9d29b, #b8964f); position: relative; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); display: inline-block; }
.kp-chip i { position: absolute; background: rgba(0, 0, 0, 0.25); }
.kp-chip i:nth-child(1) { left: 0; right: 0; top: 7px; height: 1px; }
.kp-chip i:nth-child(2) { left: 0; right: 0; top: 14px; height: 1px; }
.kp-chip i:nth-child(3) { top: 0; bottom: 0; left: 11px; width: 1px; }
.kp-nfc { color: rgba(255, 255, 255, 0.78); line-height: 0; }
.kp.big .kp-nfc svg { width: 24px; height: 24px; }
.kp-v { font-size: 9px; font-weight: 600; letter-spacing: 0.22em; color: rgba(255, 255, 255, 0.7); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; padding: 2px 8px; }
.kp-num { position: relative; margin-top: 10px; font-family: var(--mono); font-size: 15px; letter-spacing: 0.14em; white-space: nowrap; color: #fff; }
.kp-num.pan { letter-spacing: 0.08em; cursor: copy; }
.kp-foot { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; margin-top: auto; }
.kp-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 9.5px; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.92); }
.kp-who > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-exp { font-size: 9px; color: rgba(255, 255, 255, 0.72); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kp-net { flex: 0 0 auto; }
.kp-net.visa { font-style: italic; font-weight: 800; font-size: 17px; letter-spacing: 0.02em; color: #fff; }
.kp-net.mc { display: inline-flex; align-items: center; }
.kp-net.mc i { width: 20px; height: 20px; border-radius: 50%; background: #e2474f; opacity: 0.95; display: inline-block; }
.kp-net.mc i + i { background: #f1a13a; opacity: 0.9; margin-left: -9px; mix-blend-mode: screen; }
.kp-over { position: absolute; inset: 0; border-radius: inherit; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 600; background: rgba(16, 16, 20, 0.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); color: #fff; }
.kp-over .spinner { border-color: rgba(255, 255, 255, 0.3); border-top-color: #fff; }
.kp-over.stripes { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0 8px, rgba(255, 255, 255, 0) 8px 16px); -webkit-backdrop-filter: none; backdrop-filter: none; }
.kp-over.stripes span { display: inline-flex; align-items: center; gap: 5px; background: rgba(0, 0, 0, 0.55); padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.kp.blocked, .kp.new { filter: saturate(0.6); }
.kp.blocked .kp-num, .kp.new .kp-num, .kp.activating .kp-num { opacity: 0.18; }
.kp-over.stripes { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0 8px, rgba(255, 255, 255, 0) 8px 16px), rgba(10, 10, 14, 0.28); }
/* the big one (a card's page, the order preview) */
.kp.big { --w: 360px; border-radius: 22px; padding: 22px 24px; }
.kp.big .kp-issuer { font-size: 28px; }
.kp.big .kp-kind { font-size: 10.5px; }
.kp.big .kp-mid { margin-top: 18px; }
.kp.big .kp-chip { width: 40px; height: 29px; border-radius: 6px; }
.kp.big .kp-chip i:nth-child(1) { top: 9px; } .kp.big .kp-chip i:nth-child(2) { top: 19px; } .kp.big .kp-chip i:nth-child(3) { left: 14px; }
.kp.big .kp-num { font-size: 22px; margin-top: 16px; }
.kp.big .kp-num.pan { font-size: 20px; }
.kp.big .kp-who { font-size: 12.5px; }
.kp.big .kp-exp { font-size: 11.5px; }
.kp.big .kp-net.visa { font-size: 26px; }
.kp.big .kp-net.mc i { width: 30px; height: 30px; }
.kp.big .kp-net.mc i + i { margin-left: -13px; }
.kp-ring { position: absolute; right: 16px; top: 54px; display: flex; align-items: center; gap: 6px; color: #fff; font-size: 11px; }
.kp-ring svg { color: rgba(255, 255, 255, 0.95); }
.kp-ring b { position: absolute; left: 0; width: 32px; text-align: center; font-weight: 600; font-size: 10px; }
.kp-hide { font: inherit; font-size: 11px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, 0.16); border: 0; border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.kp-hide:hover { background: rgba(255, 255, 255, 0.26); }

/* ── the cards page ────────────────────────────────────────────────────────────────────── */
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 28px 22px; }
.cd-unit { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cd-unit .kp { width: 100%; }
.cd-under { display: flex; flex-direction: column; gap: 3px; font-size: 12px; padding: 0 2px; }
.cd-under .l1 { display: flex; align-items: center; gap: 8px; color: var(--sp-dim); flex-wrap: wrap; }
.cd-under .l2 { color: var(--sp-muted); letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-bal { margin-left: auto; color: var(--sp-ink); font-variant-numeric: tabular-nums; }
.cd-order-wrap { border: 1px solid var(--sp-line); border-radius: 18px; background: var(--sp-card); margin-bottom: 12px; overflow: hidden; }
.cd-order { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.cd-order:hover { background: var(--sp-hover); }
.cd-order.off { opacity: 0.6; cursor: default; }
.cd-order .chev { color: var(--sp-label); transition: transform 0.2s ease; display: inline-flex; }
.cd-order.open .chev { transform: rotate(180deg); }
.cd-ghost { width: 64px; height: 40px; border-radius: 7px; border: 1.5px dashed var(--sp-rose-line); display: inline-flex; align-items: flex-end; justify-content: flex-end; padding: 4px 6px; font-size: 9px; font-weight: 800; font-style: italic; color: var(--sp-rose); flex: 0 0 auto; }
.cd-order-t { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; font-size: 12.5px; }
.cd-order-t b { color: var(--sp-ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-order-det { padding: 4px 18px 18px 94px; border-top: 1px solid var(--sp-line2); }

/* ── a card's page ─────────────────────────────────────────────────────────────────────── */
.cd-hero { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 30px; }
.cd-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cd-facts { border-top: 1px solid var(--sp-line2); padding-top: 6px; }
.cd-facts .kv { grid-template-columns: 110px minmax(0, 1fr); font-size: 12.5px; }
.cd-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cd-acts { display: flex; flex-direction: column; gap: 8px; }
.cd-act { display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--sp-line); background: var(--sp-card); color: var(--sp-ink); text-align: left; cursor: pointer; transition: border-color 0.15s ease; }
.cd-act:hover { border-color: var(--sp-rose-line); }
.cd-act:disabled { opacity: 0.5; cursor: default; }
.cd-act.is-busy { opacity: 0.7; }
.cd-act-ic { width: 34px; height: 34px; border-radius: 11px; background: var(--sp-rose-soft); color: var(--sp-rose); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cd-act-t { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; font-size: 13.5px; }
.cd-act-t .sub { font-size: 12px; color: var(--sp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-act-go { color: var(--sp-label); display: inline-flex; flex: 0 0 auto; }
.cd-act.danger .cd-act-ic { background: var(--sp-bad-soft); color: var(--sp-bad); }
.cd-act.danger .cd-act-t > span:first-child { color: var(--sp-bad); }
.cd-h2 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 400; font-size: 26px; color: var(--sp-ink); }
.kv.tot { border-top: 1px solid var(--sp-line); }
.kv.tot .k, .kv.tot .v { color: var(--sp-ink); font-weight: 600; }

/* PIN, keypad, done marks */
.cd-pin { display: flex; justify-content: center; gap: 12px; margin: 10px 0 6px; }
.cd-pin span { width: 58px; height: 70px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 40px; color: var(--sp-ink); background: var(--sp-field); border: 1px solid var(--sp-line); }
.cd-dots { display: flex; justify-content: center; gap: 16px; margin: 8px 0 10px; }
.cd-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--sp-label); display: inline-block; }
.cd-dots i.on { background: var(--sp-rose); border-color: var(--sp-rose); box-shadow: var(--sp-glow); }
.cd-keypad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; justify-content: center; }
.cd-keypad button { height: 56px; border-radius: 16px; border: 1px solid var(--sp-line); background: var(--sp-field); color: var(--sp-ink); font-size: 20px; cursor: pointer; }
.cd-keypad button[aria-label='Delete'] { font-size: 12px; color: var(--sp-muted); }
.cd-keypad button:hover { border-color: var(--sp-rose-line); }
.cd-done { width: 60px; height: 60px; border-radius: 50%; margin: 6px auto 0; display: flex; align-items: center; justify-content: center; background: var(--sp-ok-soft); color: var(--sp-ok); }
.cd-done.bad { background: var(--sp-bad-soft); color: var(--sp-bad); }

/* linked accounts */
.cd-las { display: flex; flex-direction: column; border: 1px solid var(--sp-line); border-radius: 16px; overflow: hidden; }
.cd-la { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto 64px; gap: 10px; align-items: center; padding: 11px 12px; border-top: 1px solid var(--sp-line2); font-size: 13px; }
.cd-la:first-child { border-top: 0; }
.cd-la.head { font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sp-label); padding-top: 9px; padding-bottom: 9px; }
.cd-la.blocked { background: var(--sp-bad-soft); }
.cd-la.closed { opacity: 0.65; }
.cd-la-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cd-la-t b { font-weight: 600; color: var(--sp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-la-t .muted { font-size: 12px; }
.cd-la-b { color: var(--sp-ink); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.cd-la > :last-child { justify-self: center; }
.cd-radio { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.cd-radio input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.cd-radio span { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--sp-label); display: inline-block; flex: 0 0 auto; }
.cd-radio input:checked + span { border-color: var(--sp-rose); box-shadow: inset 0 0 0 4px var(--sp-panel), inset 0 0 0 10px var(--sp-rose); }
.cd-radio input:focus-visible + span { outline: 2px solid var(--sp-rose); outline-offset: 2px; }
.cd-radio.inline em { font-style: normal; font-size: 12px; color: var(--sp-muted); }
.cd-linkrow { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; gap: 12px; align-items: end; }
.cd-linkrow .cd-radio { height: 42px; }
.cd-linkrow .ibtn { height: 42px; }

/* 3-D Secure */
.cd-3ds { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--sp-line2); }
.cd-3ds:first-child { border-top: 0; }
.cd-3ds > div { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; }
.cd-3ds .k { font-size: 12px; color: var(--sp-muted); }
.cd-3ds b { color: var(--sp-ink); font-weight: 500; letter-spacing: 0.06em; }
.cd-strength { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--sp-muted); }
.cd-strength i { flex: 1 1 auto; height: 5px; border-radius: 3px; background: var(--sp-chip); position: relative; overflow: hidden; }
.cd-strength i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; transition: width 0.2s ease; }
.cd-strength.s1 i::after { width: 22%; background: var(--sp-bad); }
.cd-strength.s2 i::after { width: 62%; background: var(--sp-warn); }
.cd-strength.s3 i::after { width: 100%; background: var(--sp-ok); }
.cd-crit { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--sp-muted); }
.cd-crit li::before { content: '○'; margin-right: 8px; color: var(--sp-label); }
.cd-crit li.ok { color: var(--sp-dim); }
.cd-crit li.ok::before { content: '✓'; color: var(--sp-ok); }

/* limits */
.cd-bar { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.cd-bar-t { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--sp-dim); }
.cd-bar-b { height: 7px; border-radius: 4px; background: var(--sp-chip); overflow: hidden; }
.cd-bar-b i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #b04068, #7b2342); }
.card .card-h .btn { margin-left: 4px; }

/* activation: four boxes on a card */
.cd-panart { margin: 4px auto 0; }
.cd-pan { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.cd-pan input { width: 100%; height: 40px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(0, 0, 0, 0.22); color: #fff; text-align: center; font-family: var(--mono); font-size: 17px; letter-spacing: 0.08em; outline: none; }
.cd-pan input:focus { border-color: #fff; background: rgba(0, 0, 0, 0.32); }
.cd-pan-err { min-height: 18px; text-align: center; font-size: 12.5px; color: var(--sp-bad); }

/* ── the order wizard ──────────────────────────────────────────────────────────────────── */
.cd-wiz { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 560px); gap: 40px; align-items: start; }
.cd-wiz-prev { position: sticky; top: 0; display: flex; flex-direction: column; gap: 18px; }
.cd-wiz-sum .kv { grid-template-columns: 120px minmax(0, 1fr); font-size: 12.5px; }
.cd-wiz-form { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.cd-sec { display: flex; flex-direction: column; gap: 12px; }
.cd-sec h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 24px; color: var(--sp-ink); }
.cd-sec > p.muted { margin: -6px 0 0; font-size: 12.5px; line-height: 1.5; }
.cd-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.cd-opt { display: flex; flex-direction: column; gap: 4px; padding: 13px 14px; border-radius: 16px; border: 1px solid var(--sp-line); background: var(--sp-card); color: var(--sp-ink); text-align: left; cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.cd-opt b { font-weight: 600; font-size: 13.5px; }
.cd-opt .muted { font-size: 12px; line-height: 1.4; }
.cd-opt:hover { border-color: var(--sp-rose-line); }
.cd-opt.on { border-color: var(--sp-rose); box-shadow: inset 0 0 0 1px var(--sp-rose), 0 8px 24px rgba(123, 35, 66, 0.18); }
.cd-switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 13.5px; color: var(--sp-ink); }
.cd-switch input { position: absolute; opacity: 0; width: 42px; height: 24px; margin: 0; cursor: pointer; }
.cd-switch span { width: 42px; height: 24px; border-radius: 999px; background: var(--sp-chip); border: 1px solid var(--sp-line); position: relative; transition: background 0.15s ease; flex: 0 0 auto; }
.cd-switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--sp-ink); transition: transform 0.15s ease; }
.cd-switch input:checked + span { background: var(--sp-rose); border-color: var(--sp-rose); }
.cd-switch input:checked + span::after { transform: translateX(18px); background: #fff; }
.cd-switch input:focus-visible + span { outline: 2px solid var(--sp-rose); outline-offset: 2px; }
.cd-drop { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 12px; border-radius: 14px; border: 1.5px dashed var(--sp-line); color: var(--sp-muted); font-size: 13px; cursor: pointer; text-align: center; }
.cd-drop:hover, .cd-drop.over { border-color: var(--sp-rose-line); color: var(--sp-ink); }
.cd-drop u { color: var(--sp-rose); text-decoration: none; font-weight: 600; }
.cd-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--sp-dim); cursor: pointer; }
.cd-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--sp-rose); flex: 0 0 auto; }
.cd-nav { justify-content: flex-end; border-top: 1px solid var(--sp-line2); padding-top: 18px; margin-top: 0; }

/* ── phones ────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .cd-hero { grid-template-columns: minmax(0, 1fr); }
  .cd-wiz { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cd-wiz-prev { position: static; flex-direction: row; align-items: flex-start; gap: 20px; }
  .cd-wiz-prev .kp.big { --w: 280px; }
  .cd-wiz-sum { flex: 1 1 auto; min-width: 0; }
}
@media (max-width: 860px) {
  /* a card action's second line wraps on a phone rather than being cut */
  .cd-act-t .sub { white-space: normal; overflow-wrap: break-word; }
  .cd-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .cd-unit .kp { max-width: 340px; }
  .kp.big { --w: 100%; padding: 18px 20px; }
  /* the number fits the card at any phone width (19 characters ≈ 14.2 em with its spacing) */
  .kp.big .kp-num { font-size: min(19px, calc((100vw - 82px) / 14.2)); }
  .kp.big .kp-num.pan { font-size: min(16px, calc((100vw - 82px) / 14.2)); }
  .cd-wiz-prev { flex-direction: column; }
  .cd-wiz-prev .kp.big { --w: 100%; max-width: 340px; }
  .cd-order-det { padding: 4px 14px 16px; }
  .cd-la { grid-template-columns: 40px minmax(0, 1fr) 36px; }
  .cd-la-b { grid-column: 2; grid-row: 2; font-size: 12px; color: var(--sp-muted); }
  .cd-la.head .cd-la-b, .cd-la.head span:nth-child(3) { display: none; }
  .cd-keypad { grid-template-columns: repeat(3, 1fr); }
  .cd-opts { grid-template-columns: minmax(0, 1fr); }
  .cd-linkrow { grid-template-columns: minmax(0, 1fr) auto; }
  .cd-linkrow .ibtn { grid-column: 2; }
  .cd-pan input { font-size: 15px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .kp, a.kp:hover { transition: none; transform: none; }
}
