:root {
  --blue:   #2f66e0;
  --navy:   #00153a;
  --text:   #0f172a;
  --muted:  #64748b;
  --border: #d7dee8;
  --bg:     #f3f4f6;
  --card:   #ffffff;
  --green:  #166534;
  --red:    #991b1b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
.page { max-width: 760px; margin: 0 auto; padding: 22px 16px 48px; }

/* ── Header ── */
.logo-fallback { font-size: 24px; font-weight: 800; color: var(--navy); text-align: center; padding: 12px 0 4px; }
.app-title { text-align: center; font-size: 20px; font-weight: 700; color: var(--navy); margin: 8px 0 24px; line-height: 1.35; }

/* ── Alerts ── */
.alert { border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: 15px; line-height: 1.5; }
.alert-error   { background: #fef2f2; color: var(--red);   border: 1px solid #fecaca; }
.alert-info    { background: #eff6ff; color: #1d4ed8;      border: 1px solid #bfdbfe; }
.alert-success { background: #f0fdf4; color: var(--green); border: 1px solid #bbf7d0; }
.hidden { display: none !important; }

/* ── Cards ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.05); margin-bottom: 0; }
.section-title { font-size: 17px; font-weight: 700; margin-bottom: 12px; color: var(--navy); }
.muted { color: var(--muted); line-height: 1.6; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.5; }

/* ── Org info block ── */
.org-block { background: #f0f4ff; border: 1px solid #c7d6f5; border-radius: 12px; padding: 16px 18px; margin: 14px 0 18px; }
.org-block-title { font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.org-block a { color: var(--blue); }

/* ── Deadline / pricing ── */
.deadline-box { background: #fffdf5; border: 1px solid #eadba3; border-radius: 12px; padding: 14px 16px; margin: 14px 0; font-weight: 600; }
.price-box { background: #fffdf5; border: 1px solid #eadba3; border-radius: 12px; padding: 14px 16px; line-height: 1.6; margin-bottom: 20px; }
.price-box .subtle { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ── Forms ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 7px; }
label.required::after { content: ' *'; color: #dc2626; }
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%; border: 1px solid #cfd8e3; border-radius: 10px;
  padding: 11px 14px; font-size: 16px; background: #fff;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); }
textarea { min-height: 90px; resize: vertical; }
.radio-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-top: 4px; }
.inline-option { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.inline-option input { width: auto; margin: 0; }

/* ── Buttons ── */
.buttons { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
button { border-radius: 10px; font-size: 16px; font-weight: 700; padding: 12px 20px; cursor: pointer; transition: opacity .15s; min-width: 150px; }
.btn-primary   { border: none; background: var(--blue); color: #fff; }
.btn-secondary { border: 1px solid #cfd8e3; background: #fff; color: var(--text); }
.btn-ghost     { border: 1px solid #cfd8e3; background: #f8fafc; color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px 14px; min-width: auto; }
button:disabled { opacity: .55; cursor: not-allowed; }

/* ── Selection cards ── */
.choice-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; background: #fff; }
.choice-card label { font-weight: 600; cursor: pointer; }

/* ── Participant cards ── */
.participant-card { border: 1px solid #d1e3f8; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; background: #f0f7ff; }
.participant-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; flex-wrap: wrap; }
.participant-title { font-weight: 700; color: var(--navy); }
.seat-badge { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.seat-badge.paid { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.seat-badge.free { background: #dcfce7; color: var(--green); border: 1px solid #86efac; }
.seat-badge.unknown { background: #e5e7eb; color: var(--muted); border: 1px solid #d1d5db; }
.daughter-card { border: 1px solid #d1e3f8; border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; background: #f0f7ff; }

/* ── Copy panel (YK "same as RH") ── */
.copy-panel { background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.copy-panel .btn-secondary { min-width: auto; font-size: 14px; padding: 9px 14px; }

/* ── Review ── */
.review-block { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; line-height: 1.65; }
.breakdown-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid #e5e7eb; }
.breakdown-row:last-child { border-bottom: none; }
.breakdown-label { flex: 1; }
.breakdown-amount { font-weight: 700; white-space: nowrap; }
.total-line { font-size: 22px; font-weight: 800; color: #0b3aa4; margin-top: 8px; }

/* ── Thank you / payment ── */
.thankyou-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 16px 18px; margin: 16px 0; }
.payment-panel { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin: 16px 0; background: #fbfdff; }
.env-badge { font-size: 11px; font-weight: 800; background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; border-radius: 6px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }
#banquest-tokenization-frame { min-height: 0; margin: 10px 0; }

/* ── Ping / connection test ── */
.ping-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.ping-result { font-size: 13px; color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 620px) {
  .grid-2 { grid-template-columns: 1fr; }
  .buttons { flex-direction: column; }
  button { width: 100%; }
  .page { padding: 14px 12px 36px; }
  .card { padding: 18px 16px; }
  .app-title { font-size: 17px; }
  .participant-head { flex-direction: column; align-items: flex-start; }
}
