:root{
  --bg:#F7F8FB;
  --card:#FFFFFF;
  --text:#0F172A;
  --muted:#64748B;
  --border:#E2E8F0;
  --shadow:0 14px 30px rgba(15, 23, 42, .08);
  --shadow2:0 10px 22px rgba(15, 23, 42, .06);
  --primary:#4F46E5;
  --primary2:#2563EB;
  --danger:#DC2626;
  --ok:#16A34A;
  --warn:#F59E0B;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color:var(--text);
}

button, input, select, textarea{
  font-family: inherit;
  font-weight: inherit;
}
button{
  color: inherit;
}


.bgGlow{
  position:fixed;
  inset:-20vh -20vw auto -20vw;
  height:70vh;
  background: radial-gradient(700px 420px at 20% 40%, rgba(79,70,229,.20), transparent 60%),
              radial-gradient(700px 420px at 70% 10%, rgba(37,99,235,.14), transparent 60%);
  pointer-events:none;
  z-index:-1;
}

a{color:var(--primary2);text-decoration:none}
a:hover{text-decoration:underline}

.wrap{max-width:860px;margin:0 auto;padding:24px 18px}

.header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:14px}
.brandRow{display:flex;align-items:center;gap:12px}
.brandMark{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg, rgba(79,70,229,1), rgba(37,99,235,1));box-shadow:var(--shadow2)}
.brand{font-family:"Nunito Sans", ui-sans-serif, system-ui; font-weight: 700;font-size:18px;letter-spacing:.1px;line-height:1}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  padding:20px;
  box-shadow:var(--shadow);
}

.footer{margin-top:14px}

.muted{color:var(--muted)}
.small{font-size:12px}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}

hr{border:0;border-top:1px solid var(--border);margin:18px 0}

.hero h1{font-family:"Nunito Sans", ui-sans-serif, system-ui; font-size:28px;margin:0 0 6px;letter-spacing:-.1px; font-weight:700}
.hero p{margin:0}

.payform{display:flex;flex-direction:column;gap:14px;margin-top:14px}
.field{display:flex;flex-direction:column;gap:8px}
.labelRow{display:flex;justify-content:space-between;align-items:flex-end;gap:10px}
.label{font-size:13px;color:var(--muted);font-weight:600}
.hint{font-size:12px}

.amountWrap{
  display:flex;
  align-items:center;
  background:#F8FAFC;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
  gap:8px;
}
.amountWrap:focus-within{border-color:rgba(79,70,229,.55); box-shadow:0 0 0 4px rgba(79,70,229,.10)}
.prefix{color:var(--muted);font-weight:600}
.amountInput{
  width:100%;
  border:0;
  outline:none;
  background:transparent;
  color:var(--text);
  font-size:18px;
  font-weight: 500;
  padding:0;
}
.amountInput::placeholder{
  color: var(--muted);
  font-weight: 500;
}

.amountInfo{font-size:12px;min-height:16px}

input,select{
  background:#F8FAFC;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  color:var(--text);
  outline:none;
  font-size:14px;
}
input:focus,select:focus{border-color:rgba(79,70,229,.55); box-shadow:0 0 0 4px rgba(79,70,229,.10)}

.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{
  background:#FFFFFF;
  border:1px solid var(--border);
  color:var(--text);
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
  font-size:12px;
  font-weight:700;
}
.chip:hover{border-color:rgba(79,70,229,.35)}
.chip:active{transform:translateY(1px)}

.pill{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#F8FAFC;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
}

.optGrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.optField{display:flex;flex-direction:column;gap:6px}
.optLabel{font-size:12px;color:var(--muted);font-weight:600}
.optFull{grid-column:1 / -1}

.methods{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:8px;
}
@media (max-width:640px){
  .methods{grid-template-columns:1fr}
  .optGrid{grid-template-columns:1fr}
  .wrap{padding:18px 14px}
}

.methodCard{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:12px 12px;
  border-radius:14px;
  background:#FFFFFF;
  border:1px solid var(--border);
  cursor:pointer;
  position:relative;
  transition:transform .05s ease, border-color .12s ease, box-shadow .12s ease;
  outline:none;
}
.methodCard:hover{border-color:rgba(79,70,229,.35); box-shadow:0 10px 18px rgba(15,23,42,.06)}
.methodCard:active{transform:translateY(1px)}
.methodCard.selected{
  border-color:rgba(79,70,229,.75);
  box-shadow:0 0 0 4px rgba(79,70,229,.12);
}
.methodTop{display:flex;justify-content:space-between;align-items:center;gap:10px}
.methodName{font-weight:800}
.methodCode{font-size:12px;color:var(--muted);font-weight:800}
.methodMeta{font-size:12px;color:var(--muted)}
.methodCheck{
  position:absolute;
  top:10px;
  right:10px;
  width:18px;
  height:18px;
  border-radius:999px;
  border:1px solid var(--border);
  display:grid;
  place-items:center;
  color:transparent;
}
.methodCard.selected .methodCheck{
  border-color:rgba(22,163,74,.60);
  background:rgba(22,163,74,.12);
  color:var(--ok);
}

.linkBtn{
  border:0;
  background:transparent;
  color:var(--primary2);
  cursor:pointer;
  padding:0;
  font-size:12px;
  font-weight:700;
}
.linkBtn:hover{text-decoration:underline}

.btn{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  background:var(--primary);
  border:1px solid rgba(79,70,229,.65);
  color:white;
  padding:12px 14px;
  border-radius:14px;
  font-size:14px;
  line-height:1.1;
  font-weight: 600;
  cursor:pointer;
}
.btn:hover{filter:brightness(1.03)}
.btn:active{transform:translateY(1px)}
.btnPrimary{width:100%}
.btn.secondary{background:#FFFFFF;border-color:var(--border);color:var(--text)}
.btn.ghost{background:transparent;border-color:var(--border);color:var(--text)}
.btn[disabled]{opacity:.55;cursor:not-allowed}

.alert{
  border:1px solid rgba(220,38,38,.22);
  background:rgba(220,38,38,.06);
  padding:12px;
  border-radius:12px;
  color:var(--text);
  font-size:13px;
}

.returnTop{display:grid;grid-template-columns:1.4fr .6fr;gap:14px;align-items:start;margin-bottom:14px}
.returnRight{display:flex;justify-content:flex-end}
.returnActions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.returnActions .btn{width:100%}
.statusLine{display:flex;align-items:center;gap:10px;margin-top:10px}
.statusText{font-weight:700}

.dot{width:10px;height:10px;border-radius:999px;display:inline-block;flex:0 0 10px}
.dot.ok{background:var(--ok)}
.dot.warn{background:var(--warn)}
.dot.bad{background:var(--danger)}
.dot.pending{background:#94A3B8}

.summary{border:1px solid var(--border);border-radius:16px;padding:14px;background:#FFFFFF}
.row{display:flex;justify-content:space-between;gap:12px;padding:8px 0}
.row + .row{border-top:1px solid var(--border)}
.k{color:var(--muted);font-size:12px;font-weight:700}
.v{font-size:13px;font-weight:700;text-align:right;max-width:62%}
.statusInline{display:inline-flex;align-items:center;justify-content:flex-end;gap:10px}
.statusInline .statusText{font-weight:700}
.row.total .v{font-size:16px}

.actions{display:flex;flex-direction:column;gap:10px;margin-top:14px}



.receiptTop{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}
.receiptTitle{font-family:"Nunito Sans", ui-sans-serif, system-ui;font-weight:700;font-size:20px;line-height:1.2}
.badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:800;border:1px solid var(--border);background:#F8FAFC;color:var(--muted)}
.badge .dot{margin-right:8px}
.badge.ok{border-color:rgba(22,163,74,.25);background:rgba(22,163,74,.10);color:var(--ok)}
.badge.warn{border-color:rgba(245,158,11,.30);background:rgba(245,158,11,.12);color:var(--warn)}
.badge.bad{border-color:rgba(220,38,38,.25);background:rgba(220,38,38,.08);color:var(--danger)}
.badge.pending{border-color:rgba(148,163,184,.35);background:rgba(148,163,184,.16);color:#475569}

.receiptBox{border:1px solid var(--border);border-radius:16px;padding:14px;background:#FFFFFF}
.divider{height:1px;background:var(--border);margin:10px 0}

@media print{
  body{background:#fff}
  .bgGlow,.header,.footer,.noPrint{display:none !important}
  .wrap{max-width:none;padding:0}
  .card{border:0;box-shadow:none;padding:0}
}

.history{margin-top:18px; padding-top:16px; border-top:1px solid var(--border)}
.historyHead{display:flex;align-items:center;justify-content:space-between;gap:10px}
.history h2{margin:0;font-size:16px;font-weight:700}
.historyList{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.historyItem{border:1px solid var(--border);border-radius:14px;padding:12px;background:linear-gradient(180deg,#FFFFFF, #FBFCFE)}
.historyTop{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.historyTitle{font-weight:700}
.historyMeta{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}
.historyMeta .pill{border:1px solid var(--border);background:#F8FAFC}
.historyActions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.btn.small{padding:8px 10px;border-radius:10px;font-size:13px}

.srOnly{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}

@media (max-width: 720px){
  .returnTop{grid-template-columns:1fr}
  .returnActions{grid-template-columns:1fr 1fr}
}