:root{
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;

  --brand-primary: #0d004c;
  --brand-accent: #f37021;

  --shadow: 0 10px 30px rgba(0,0,0,0.08);
  --radius: 16px;
}

*{ box-sizing: border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1000px 600px at 20% 0%, rgba(13,0,76,0.08), transparent 55%),
              radial-gradient(1000px 600px at 90% 10%, rgba(243,112,33,0.10), transparent 55%),
              var(--bg);
  color: var(--text);
}

.page{
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 40px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}

.brand-logo{
  height: 60px;
  width: auto;
  display:block;
  object-fit: contain;
}

.powered{
  display:flex;
  align-items:center;
  justify-content:flex-end;
}
.powered-pill{
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 12px;
  border-radius: 999px;
}

.merchant-title{
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-primary);
  margin: 10px 0 18px;
}

.grid{
  display:grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px){
  .grid{ grid-template-columns: 1fr 1fr; }
}

.card{
  background: var(--card);
  border: 1px solid rgba(229,231,235,0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.card h2{
  margin: 0 0 14px;
  font-size: 18px;
  color: var(--brand-primary);
}

.field{
  display:flex;
  flex-direction:column;
  gap: 6px;
  margin-bottom: 12px;
}

label{
  font-size: 13px;
  color: var(--muted);
}

input, select{
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--text);
  font-size: 14px;
}
input:focus, select:focus{
  border-color: rgba(13,0,76,0.35);
  box-shadow: 0 0 0 4px rgba(13,0,76,0.10);
}

.two-col{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 520px){
  .two-col{ grid-template-columns: 1fr 1fr; }
}

.payment-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.badge{
  display:inline-flex;
  align-items:center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(13,0,76,0.25);
  background: rgba(13,0,76,0.06);
  color: var(--brand-primary);
  font-weight: 700;
}

.toggles{
  display:flex;
  flex-wrap:wrap;
  gap: 14px;
  margin: 12px 0 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(13,0,76,0.18);
  background: rgba(13,0,76,0.03);
}

.toggle{
  display:flex;
  align-items:center;
  gap: 10px;
}

.toggle-label{
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* Switch */
.switch{
  position: relative;
  width: 48px;
  height: 28px;
  display:inline-block;
}
.switch input{
  opacity: 0;
  width:0;
  height:0;
}
.slider{
  position:absolute;
  cursor:pointer;
  inset:0;
  background:#e5e7eb;
  transition: .2s;
  border-radius: 999px;
}
.slider:before{
  content:"";
  position:absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  transition: .2s;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.switch input:checked + .slider{
  background: rgba(13,0,76,0.65);
}
.switch input:checked + .slider:before{
  transform: translateX(20px);
}

.recurring-box{
  margin: 10px 0 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(243,112,33,0.22);
  background: rgba(243,112,33,0.06);
}

.recurring-title{
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 10px;
}

.preview{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(13,0,76,0.15);
  background: rgba(255,255,255,0.7);
  color: #111827;
  font-size: 13px;
}

.summary{
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.sum-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 6px 0;
  color: #111827;
}
.sum-row span:first-child{ color: var(--muted); font-weight: 600; }
.sum-row.total{
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-primary);
}

.divider{
  height: 1px;
  background: var(--line);
  margin: 8px 0;
}

.fineprint{
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.tokenizer-wrap{
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(229,231,235,0.9);
  background: rgba(255,255,255,0.8);
}

.tokenizer-wrap iframe{
  width: 100%;
  height: 165px;
  border: 0;
  display:block;
  border-radius: 12px;
  background: #fff;
}

.hint{
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.err{
  margin-top: 10px;
  display:none;
  color: #b00020;
  font-size: 13px;
  font-weight: 700;
}

.captcha{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(13,0,76,0.12);
  background: rgba(13,0,76,0.03);
}
.captcha-check{
  display:flex;
  align-items:center;
  gap: 10px;
  color: #111827;
  font-size: 13px;
}
.captcha-check input{
  width: 18px;
  height: 18px;
}

.primary-btn{
  margin-top: 14px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  box-shadow: 0 12px 24px rgba(13,0,76,0.18);
}
.primary-btn:disabled{
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.footer{
  margin-top: 18px;
  text-align:center;
  color: var(--muted);
  font-size: 12px;
  padding: 14px 10px;
}

.card.result{
  max-width: 680px;
  margin: 30px auto 0;
  text-align:left;
}
.card.result h1{
  margin: 0 0 10px;
  font-size: 28px;
}
.card.result h1.ok{ color: #0a7a2f; }
.card.result h1.bad{ color: #b00020; }

.result-msg{
  margin: 0 0 14px;
  color: #111827;
  font-weight: 700;
}

.result-details{
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.detail{
  padding: 6px 0;
  color: #111827;
}

.link{
  display:inline-block;
  margin-top: 14px;
  color: var(--brand-primary);
  font-weight: 800;
  text-decoration: none;
}
.link:hover{ text-decoration: underline; }

.hidden{ display:none !important; }

.ach-help {
  background: #f7f8fb;
  border-left: 4px solid var(--brand-primary);
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 14px;
}

.primary-btn {
  background: var(--brand-primary);
}