@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap");

:root {
  --brand: #0a3ee6;
  --brand-2: #0a3ee6;
  --brand-soft: #eff3ff;
  --brand-ring: rgba(10, 62, 230, 0.14);
  --ink: #0a0f1e;
  --ink-2: #1a2138;
  --muted: #6b7280;
  --muted-2: #9aa1ad;
  --line: #eef0f4;
  --line-2: #f5f6f8;
  --bg: #f3f4f7;
  --card: #ffffff;
  --surface: #f7f8fb;
  --success: #0a9e5c;
  --success-soft: #e7faf1;
  --warn: #c78207;
  --warn-soft: #fff6e1;
  --danger: #d8303c;
  --danger-soft: #fdecee;
}

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

html, body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, #eef2ff 0%, transparent 60%),
    radial-gradient(800px 400px at 90% 110%, #e8f0ff 0%, transparent 60%),
    var(--bg);
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button,
a {
  font: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

@keyframes popIn {
  0%   { transform: scale(0.4); opacity: 0; }
  70%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes ring {
  0%   { box-shadow: 0 0 0 0 var(--brand-ring); }
  100% { box-shadow: 0 0 0 18px rgba(10, 62, 230, 0); }
}

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

@keyframes wave {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.3; }
  40%           { transform: scale(1);   opacity: 1; }
}

@keyframes hover {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.wrap {
  width: 460px;
  max-width: 100%;
  animation: cardIn 0.45s cubic-bezier(0.19, 1, 0.22, 1);
}

/* ─────────────────────── Card ─────────────────────── */
.card {
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow:
    0 1px 2px rgba(10, 15, 30, 0.03),
    0 12px 32px rgba(10, 15, 30, 0.06),
    0 30px 60px -20px rgba(10, 15, 30, 0.08);
}

/* ─────────────────────── Tabs (top) ─────────────────────── */
.tabs {
  display: flex;
  padding: 14px 14px 0;
  gap: 6px;
  background: var(--card);
}

.tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  transition: background 0.18s ease, color 0.18s ease;
  position: relative;
}

.tab:hover { color: var(--ink-2); background: var(--line-2); }

.tab.on {
  color: var(--ink);
  background: var(--surface);
  font-weight: 700;
}

.tab-label {
  display: inline-flex;
  align-items: center;
}

.tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 7px 2.5px 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #b0b5c0;
  background: #f3f4f7;
  border: 1px solid #e8eaf0;
  border-radius: 100px;
  line-height: 1;
  transition: all 0.2s ease;
}

.tab-pill-dot {
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: #c9ccd3;
  animation: breathe 2.6s ease-in-out infinite;
}

.tab.on .tab-pill {
  color: #9aa1ad;
  background: #ececf1;
  border-color: #e3e5ec;
}

.tab.on .tab-pill-dot {
  background: #b0b5c0;
}

.tab-soon {
  position: relative;
  opacity: 0.55;
}

.tab-soon:hover { opacity: 0.8; }

.tab-soon.on { opacity: 0.7; }

/* ─────────────────────── Main ─────────────────────── */
.mn {
  display: flex;
  flex-direction: column;
}

/* Header: merchant + timer */
.hd {
  padding: 18px 22px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.av {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand) 0%, #1e50ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 14px -4px rgba(10, 62, 230, 0.5);
}

.hd-info { flex: 1; min-width: 0; }

.hd-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.hd-email {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
}

/* Timer pill (top right) */
.tmr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 100px;
  background: var(--line-2);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.tmr-d {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand);
  animation: breathe 2s ease-in-out infinite;
}

.tmr-l { color: var(--muted-2); }

.tmr-v {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.tmr.xx { background: var(--danger-soft); color: var(--danger); }
.tmr.xx .tmr-d { background: var(--danger); animation: none; }
.tmr.xx .tmr-v { color: var(--danger); }

/* ─────────────────────── Amount hero ─────────────────────── */
.amt-hero {
  padding: 4px 22px 24px;
  text-align: center;
}

.amt-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 6px;
}

.amt-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 38px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -1.5px;
  line-height: 1.05;
}

.amt-value .cur {
  font-size: 0.55em;
  font-weight: 500;
  color: var(--muted);
  margin-right: 6px;
  vertical-align: 0.2em;
}

/* ─────────────────────── Body ─────────────────────── */
.bd {
  padding: 0 22px 22px;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.25s ease;
}

.bd-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
  padding-left: 2px;
}

.blurb {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--line);
}

/* Account details card */
.acc {
  background: #fcfcfd;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.acc-bank {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px dashed var(--line);
  background: #fff;
}

.acc-bank-ic {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.acc-bank-info { flex: 1; min-width: 0; }

.acc-bank-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.acc-bank-sub {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 1px;
  font-weight: 500;
}

.acc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--success);
  background: var(--success-soft);
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.acc-badge-d {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--success);
}

.acc-row {
  padding: 13px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.acc-row + .acc-row { border-top: 1px dashed var(--line); }

.acc-row-l { flex: 1; min-width: 0; }

.acc-row-k {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.acc-row-v {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  word-break: break-word;
}

.acc-row-v.mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 17px;
  letter-spacing: 0.5px;
}

/* Copy button */
.cp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.cp:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.cp-ok {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.cp-ok:hover { background: var(--brand); color: #fff; }

/* Reference row (outside account card) */
.ref {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.ref-l { min-width: 0; }

.ref-k {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}

.ref-v {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.2px;
  word-break: break-all;
}

/* CTA */
.cta-area { margin-top: 18px; }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  background: #0a0f1e;
  color: #fff;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 6px 16px -4px rgba(10, 15, 30, 0.35);
}

.cta:hover:not(:disabled) {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -6px rgba(10, 15, 30, 0.45);
}

.cta:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 3px 10px -2px rgba(10, 15, 30, 0.3);
}

.cta:disabled {
  background: #dfe2ea;
  color: #9aa1ad;
  cursor: not-allowed;
  box-shadow: none;
}

.cta svg { width: 16px; height: 16px; }

/* Pending */
.pnd {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: var(--brand-soft);
  border-radius: 12px;
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
}

.pnd-ds { display: flex; gap: 5px; }

.pnd-d {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  animation: wave 1.4s ease-in-out infinite;
}

.pnd-d:nth-child(2) { animation-delay: 0.16s; }
.pnd-d:nth-child(3) { animation-delay: 0.32s; }

/* Footer secured */
.sec {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line-2);
  background: var(--card);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted-2);
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sec:hover { color: var(--ink-2); }
.sec:hover .sec-brand { color: var(--brand); }

.sec-brand {
  color: var(--ink-2);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sec svg { color: var(--muted-2); }

/* ─────────────────────── Home / Bpay / State / Success ─────────────────────── */
.bp, .ok, .state, .home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 28px 36px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.bp-mark, .home-mark {
  width: 58px; height: 58px;
  border-radius: 16px;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: hover 3.2s ease-in-out infinite;
  color: var(--brand);
}

.bp-mark svg, .home-mark svg { width: 28px; height: 28px; }

.bp-h, .home-h, .ok-t, .state-t {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.bp-p, .home-p, .ok-s, .state-p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 300px;
  margin-top: 8px;
}

.bp-badge, .home-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.bp-badge-d, .home-tag .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
}

.home-tag .dot {
  background: var(--brand);
  animation: breathe 2s ease-in-out infinite;
}

/* Success */
.ok { padding: 48px 28px 36px; }

.ok-c {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: var(--success);
  animation:
    popIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    ring 1.2s ease-out 0.4s;
  position: relative;
}

.ok-c svg { width: 28px; height: 28px; }

.ok-a {
  font-family: "JetBrains Mono", monospace;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  margin: 20px 0 18px;
  letter-spacing: -1px;
}

.ok-r, .state-r {
  font-size: 10.5px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 8px;
  word-break: break-all;
  text-align: center;
  max-width: 300px;
}

/* State (expired / cancelled / error) */
.state-c {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 24px;
  font-weight: 800;
  background: var(--line-2);
  color: var(--muted);
}

.state-c.state-danger { background: var(--danger-soft); color: var(--danger); }
.state-c.state-warn   { background: var(--warn-soft);   color: var(--warn); }

.state-a {
  font-family: "JetBrains Mono", monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  margin: 18px 0 14px;
  letter-spacing: -0.8px;
}

.state-meta {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.6;
}

.msg {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
}

.msg.msg-error {
  color: var(--danger);
  background: var(--danger-soft);
}

/* Skeleton */
.sk {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.15s ease;
}

.sk-b {
  border-radius: 10px;
  background: linear-gradient(90deg, #eef0f4 25%, #f7f8fb 50%, #eef0f4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.sk-head   { height: 36px; width: 72%; margin-bottom: 8px; }
.sk-row    { height: 58px; width: 100%; }
.sk-row.short { width: 80%; }
.sk-btn    { height: 50px; width: 100%; margin-top: 6px; }

/* ─────────────────────── Responsive ─────────────────────── */
@media (max-width: 520px) {
  .page { padding: 12px 10px; }

  .wrap { width: 100%; }

  .card { border-radius: 16px; }

  .tabs { padding: 10px 10px 0; gap: 4px; }

  .tab { padding: 9px 10px; font-size: 12px; gap: 5px; }

  .hd { padding: 14px 16px 10px; gap: 10px; }

  .av { width: 34px; height: 34px; font-size: 14px; border-radius: 10px; }

  .hd-name { font-size: 13.5px; }

  .hd-email { font-size: 11px; }

  .tmr { padding: 5px 8px; font-size: 10.5px; gap: 5px; }

  .amt-hero { padding: 2px 16px 18px; }

  .amt-label { font-size: 10.5px; letter-spacing: 1px; margin-bottom: 4px; }

  .amt-value { font-size: 32px; letter-spacing: -1.2px; }

  .bd { padding: 0 16px 16px; }

  .bd-label { font-size: 10.5px; margin-bottom: 8px; }

  .blurb { font-size: 12.5px; padding: 10px 12px; margin-bottom: 14px; }

  .acc { border-radius: 12px; }

  .acc-bank { padding: 11px 12px; gap: 9px; }

  .acc-bank-ic { width: 28px; height: 28px; font-size: 11px; border-radius: 7px; }

  .acc-bank-name { font-size: 12.5px; }

  .acc-bank-sub { font-size: 10px; }

  .acc-badge { padding: 2px 7px; font-size: 9px; }

  .acc-row { padding: 11px 12px; gap: 8px; }

  .acc-row-k { font-size: 10px; letter-spacing: 0.7px; margin-bottom: 3px; }

  .acc-row-v { font-size: 14px; }

  .acc-row-v.mono { font-size: 15.5px; letter-spacing: 0.3px; }

  .cp { padding: 5px 9px; font-size: 10.5px; }

  .ref { padding: 9px 12px; margin-top: 12px; gap: 8px; }

  .ref-k { font-size: 9.5px; margin-bottom: 1px; }

  .ref-v { font-size: 11.5px; }

  .cta-area { margin-top: 16px; }

  .cta { height: 48px; font-size: 13.5px; }

  .cta svg { width: 15px; height: 15px; }

  .pnd { padding: 12px; font-size: 12.5px; margin-top: 16px; }

  .sec { padding: 12px 16px 14px; font-size: 10px; }

  .ok, .state, .bp, .home { padding: 36px 22px 28px; }

  .ok-c { width: 54px; height: 54px; }

  .ok-c svg { width: 24px; height: 24px; }

  .ok-a, .state-a { font-size: 26px; margin: 16px 0 14px; letter-spacing: -0.8px; }

  .bp-h, .home-h, .ok-t, .state-t { font-size: 16px; }

  .bp-p, .home-p, .ok-s, .state-p { font-size: 12.5px; }

  .bp-mark, .home-mark { width: 52px; height: 52px; margin-bottom: 18px; }

  .bp-mark svg, .home-mark svg { width: 24px; height: 24px; }
}

@media (max-width: 380px) {
  .page { padding: 10px 8px; }

  .card { border-radius: 14px; }

  .tabs { padding: 8px 8px 0; gap: 3px; }

  .tab {
    padding: 9px 8px;
    font-size: 11.5px;
    gap: 4px;
    flex-wrap: wrap;
    line-height: 1.2;
  }

  .tab-pill { font-size: 8.5px; padding: 2px 6px 2px 5px; gap: 3px; }

  .tab-pill-dot { width: 4px; height: 4px; }

  .hd { padding: 12px 14px 8px; gap: 9px; }

  .av { width: 32px; height: 32px; font-size: 13px; }

  .hd-name { font-size: 13px; }

  .hd-email { font-size: 10.5px; }

  .tmr { padding: 4px 7px; font-size: 10px; gap: 4px; }

  .tmr-d { width: 4px; height: 4px; }

  .amt-hero { padding: 0 14px 16px; }

  .amt-label { font-size: 10px; margin-bottom: 3px; }

  .amt-value { font-size: 28px; letter-spacing: -1px; }

  .bd { padding: 0 14px 14px; }

  .acc-bank { padding: 10px; gap: 8px; }

  .acc-bank-ic { width: 26px; height: 26px; font-size: 10.5px; border-radius: 6px; }

  .acc-bank-name { font-size: 12px; }

  .acc-bank-sub { font-size: 9.5px; }

  .acc-badge { padding: 2px 6px; font-size: 8.5px; gap: 3px; }

  .acc-badge-d { width: 3.5px; height: 3.5px; }

  .acc-row { padding: 10px; gap: 6px; }

  .acc-row-k { font-size: 9.5px; letter-spacing: 0.6px; }

  .acc-row-v { font-size: 13px; }

  .acc-row-v.mono { font-size: 14px; letter-spacing: 0.2px; }

  .cp { padding: 5px 8px; font-size: 10px; gap: 4px; }

  .cp svg { width: 10px; height: 10px; }

  .ref { padding: 8px 10px; margin-top: 10px; flex-wrap: wrap; }

  .ref-v { font-size: 11px; }

  .cta { height: 46px; font-size: 13px; gap: 6px; }

  .cta svg { width: 14px; height: 14px; }

  .sec { padding: 10px 14px 12px; font-size: 9.5px; gap: 4px; }

  .ok, .state, .bp, .home { padding: 32px 18px 24px; }

  .ok-a, .state-a { font-size: 24px; }

  .state-r, .ok-r { font-size: 10px; padding: 7px 12px; }
}

/* Very small devices (≤320px - iPhone 5/SE 1st gen) */
@media (max-width: 320px) {
  .tab { font-size: 11px; padding: 8px 6px; }

  .hd-name { font-size: 12.5px; }

  .amt-value { font-size: 26px; }

  .acc-row-v.mono { font-size: 13px; letter-spacing: 0; }

  .cp { padding: 4px 7px; font-size: 9.5px; }

  .cta { height: 44px; font-size: 12.5px; }
}
