/* EduPay · payment UI styling (self-contained, brand-aligned) */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: #0B1D3A; background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { text-decoration: none; }

.site-hd { position: sticky; top: 0; z-index: 50; background: rgba(11,29,58,.92); backdrop-filter: blur(8px); }
.site-hd .hd-inner { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.site-hd .brand { color: #fff; font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.site-hd nav { display: flex; gap: 22px; }
.site-hd nav a { color: rgba(255,255,255,.85); font-size: 14px; font-weight: 600; }
.site-hd nav a:hover { color: #4ADE80; }

.site-ft { background: #0B1D3A; color: rgba(255,255,255,.6); padding: 32px 20px; margin-top: 48px; text-align: center; }
.site-ft .ft-inner { max-width: 1000px; margin: 0 auto; }
.site-ft p { margin: 4px 0; font-size: 13px; }
.site-ft .ft-sub { font-size: 12px; color: rgba(255,255,255,.4); }

:root {
  --navy: #0B1D3A;
  --ocean: #163B6E;
  --teal: #1A6B5A;
  --mint: #4ADE80;
  --surface: #F8FAFB;
  --bd: #E8EDEF;
  --muted: #6B7280;
}

.pay-wrap { max-width: 880px; margin: 0 auto; padding: 0 20px 96px; }
.pay-hero {
  background: linear-gradient(135deg, #0B1D3A 0%, #163B6E 55%, #1A6B5A 100%);
  color: #fff; padding: 120px 20px 56px; text-align: center;
}
.pay-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin: 0 0 12px; }
.pay-hero p { color: rgba(255,255,255,.78); max-width: 620px; margin: 0 auto; font-size: 17px; line-height: 1.6; }
.pay-hero .eyebrow { color: var(--mint); font-weight: 700; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 14px; }
.pay-tabs { display: flex; gap: 10px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pay-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 9999px; border: 1.5px solid rgba(255,255,255,.28); color: rgba(255,255,255,.9); font-weight: 600; font-size: 14px; text-decoration: none; transition: all .2s; }
.pay-tab:hover { background: rgba(255,255,255,.1); }
.pay-tab.active { background: var(--mint); color: var(--navy); border-color: var(--mint); }

.pay-card { background: #fff; border: 1px solid var(--bd); border-radius: 16px; padding: 28px; margin-top: 22px; box-shadow: 0 1px 2px rgba(11,29,58,.04); }
.pay-card h2 { font-size: 20px; font-weight: 700; margin: 0 0 4px; color: var(--navy); }
.pay-card h3 { font-size: 17px; font-weight: 700; margin: 0 0 14px; color: var(--navy); }
.pay-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.hidden { display: none !important; }

.step-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 9999px; background: var(--teal); color: #fff; font-size: 13px; font-weight: 700; margin-right: 8px; }

/* form fields */
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .pf-grid { grid-template-columns: 1fr; } }
.pf-field { display: flex; flex-direction: column; gap: 6px; }
.pf-field.pf-full { grid-column: 1 / -1; }
.pf-field > label { font-size: 13px; font-weight: 600; color: var(--navy); }
.pf-field input[type=text], .pf-field input[type=date], .pf-field input[type=number], .pf-field input[type=email], .pf-field select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--bd); border-radius: 10px; font-size: 15px; color: var(--navy); background: #fff; box-sizing: border-box;
}
.pf-field input:focus, .pf-field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(26,107,90,.12); }
.pf-hint { font-size: 12px; color: var(--muted); margin: 2px 0 0; line-height: 1.5; }
.req { color: #dc2626; }
.pf-group { grid-column: 1 / -1; border: 1px solid var(--bd); border-radius: 12px; padding: 16px; background: var(--surface); }
.pf-group h4 { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--ocean); }
.pf-chk { display: flex; align-items: flex-start; gap: 10px; font-weight: 400 !important; font-size: 13px; color: #374151; line-height: 1.55; cursor: pointer; }
.pf-chk input { width: auto; margin-top: 3px; }
.pf-chk a { color: var(--teal); text-decoration: underline; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 9999px; font-weight: 700; font-size: 15px; border: none; cursor: pointer; transition: all .2s; }
.btn-primary { background: var(--mint); color: var(--navy); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--bd); }
.btn-ghost:hover { border-color: var(--navy); }
.pay-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; align-items: center; }

/* institution search */
.search-box { position: relative; }
.search-results { border: 1px solid var(--bd); border-radius: 12px; margin-top: 8px; max-height: 320px; overflow-y: auto; }
.search-item { padding: 12px 14px; border-bottom: 1px solid var(--bd); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--surface); }
.search-item .nm { font-weight: 600; color: var(--navy); font-size: 15px; }
.search-item .cc { font-size: 12px; color: var(--muted); }
.selected-dest { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--bd); border-radius: 12px; }
.selected-dest .nm { font-weight: 700; color: var(--navy); }

/* OSHC offers */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.offer { border: 1px solid var(--bd); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: all .2s; }
.offer:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(11,29,58,.08); }
.offer .prov { font-weight: 700; color: var(--navy); font-size: 16px; }
.offer .prod { font-size: 13px; color: var(--muted); }
.offer .price { font-size: 24px; font-weight: 800; color: var(--teal); margin: 4px 0; }
.offer .price small { font-size: 12px; color: var(--muted); font-weight: 500; }
.offer .feats { font-size: 12px; color: #374151; line-height: 1.6; border-top: 1px dashed var(--bd); padding-top: 10px; }
.offer .feats span { display: block; }
.offer .tick { color: var(--teal); font-weight: 700; }
.offer .cheapest { display: inline-block; background: var(--mint); color: var(--navy); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 9999px; align-self: flex-start; }

.msg { margin-top: 16px; padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.6; }
.msg.info { background: #EFF6FF; color: #1e3a8a; }
.msg.err { background: #FEF2F2; color: #b91c1c; }
.msg.ok { background: #ECFDF5; color: #065f46; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(11,29,58,.2); border-top-color: var(--teal); border-radius: 50%; animation: sp 0.7s linear infinite; vertical-align: middle; }
@keyframes sp { to { transform: rotate(360deg); } }
.secure-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 16px; }
.secure-note svg { flex-shrink: 0; }
