:root{--blue:#000C52;--cream:#EEEAE2;--line:#d7daeb;--white:#fff;--muted:#5c6178;--red:#810f12}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--cream);color:var(--blue);font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:15px;line-height:1.5}
main{max-width:1050px;margin:0 auto;padding:32px 20px 70px}.brand{margin-bottom:24px}.eyebrow{font-size:12px;font-weight:750;letter-spacing:.16em;text-transform:uppercase;margin:0 0 6px}.brand h1{margin:0;font-size:clamp(28px,4.8vw,42px);line-height:1.16}.brand p{color:var(--muted);margin:12px 0 0}
.card{background:var(--white);border-radius:18px;padding:clamp(20px,4vw,32px);box-shadow:0 4px 24px #000c520b;margin-bottom:20px}.card h2{font-size:22px;line-height:1.25;margin:0 0 12px}.card h3{font-size:17px;margin:20px 0 14px}.card p{margin-top:0}.muted{color:var(--muted)}.notice{background:#f5f4ef;border:1px solid #e4dfd4;border-radius:10px;padding:12px 15px;color:#484762;font-size:13px;margin:12px 0 22px}.status{min-height:20px;white-space:pre-wrap;font-size:14px;font-weight:650;overflow-wrap:anywhere;margin:16px 0 0}
label{display:block;font-weight:650;margin:0 0 6px}input,select,button{font:inherit}input:not([type=checkbox]),select{display:block;width:100%;min-height:48px;padding:12px 13px;background:white;border:1px solid #c8cce0;border-radius:10px;color:var(--blue);margin:0 0 18px}input:focus,select:focus{outline:2px solid #7a8ac0;outline-offset:1px}.field{margin-bottom:2px}.checkline{display:flex;gap:10px;align-items:flex-start;margin:4px 0 20px;font-size:14px}.checkline input{margin-top:4px;accent-color:var(--blue);flex-shrink:0}.checkline label{font-weight:550;margin:0}
button,.button-link{display:inline-flex;justify-content:center;align-items:center;gap:8px;border:1px solid var(--blue);background:var(--blue);color:white;min-height:46px;padding:11px 18px;border-radius:10px;cursor:pointer;text-decoration:none;font-weight:650;line-height:1.3}button:hover,.button-link:hover{filter:brightness(1.14)}button:disabled{opacity:.55;cursor:wait}.outline{color:var(--blue);background:white}.button-link.outline:hover{background:#f6f7fd}.full{width:100%}.hidden{display:none!important}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.grid.primary{grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr)}.button-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.button-row>*{flex:1 1 auto}.hq-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.hq-header button{min-width:135px}.table-scroll{overflow-x:auto;margin-top:12px}table{border-collapse:collapse;width:100%;font-size:14px;min-width:560px}th,td{text-align:left;padding:12px;border-bottom:1px solid #e2e5ef;vertical-align:top}th{font-weight:750;background:#f6f7fb}tbody tr:last-child td{border-bottom:0}.small-btn{font-size:12px;min-height:32px;padding:6px 10px}.qr-box{display:flex;align-items:center;justify-content:center;border-radius:12px;background:#fff;border:1px solid var(--line);padding:12px;margin:12px 0}.qr-box img{width:min(100%,240px);height:auto;aspect-ratio:1;display:block}.url-text{word-break:break-all;color:var(--muted);font-size:13px}.footer{color:var(--muted);font-size:12px;margin-top:20px;text-align:center}
@media(max-width:700px){main{padding:22px 13px 50px}.grid,.grid.primary{grid-template-columns:1fr}.hq-header{flex-direction:column}.hq-header button{width:100%}.card{border-radius:14px}.button-row{flex-direction:column}.button-row>*{width:100%}.brand h1{font-size:30px}}

/* HQ per-event reset: destructive action has a clear warning style. */
button.danger{background:#810F12;border-color:#810F12;color:white}
button.danger:hover{filter:brightness(1.1)}

/* Keep individual action buttons readable in horizontally scrollable HQ participant table. */
.table-scroll .button-row{flex-direction:row;flex-wrap:nowrap;justify-content:flex-start}
.table-scroll .button-row>*{flex:0 0 auto;width:auto}
.table-scroll table{min-width:790px}

/* Mobile-friendly registration confirmation. Keep PDAR's exact brand palette. */
.receipt-wrap{max-width:710px;padding-top:50px}
.receipt-brand{text-align:center;margin-bottom:24px}
.receipt-brand p:last-child{font-size:13px;margin-top:4px}
.receipt-card{text-align:center;padding:clamp(24px,5vw,42px)}
.success-symbol{width:74px;height:74px;display:grid;place-items:center;border-radius:50%;margin:0 auto 22px;background:#000C52;color:white;font-size:43px;font-weight:700;line-height:1}
.receipt-card h1{font-size:clamp(26px,5vw,36px);margin:6px 0 12px;color:#000C52;line-height:1.22}
.receipt-card .success-subtitle{display:block;font-size:clamp(20px,4vw,27px);font-weight:650;margin-top:5px}
.receipt-intro{max-width:500px;margin:0 auto 26px!important;font-size:14px}
.receipt-details{border-radius:13px;border:1px solid #d7daeb;overflow:hidden;text-align:left;margin:24px auto;max-width:560px}
.receipt-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:13px 16px;border-bottom:1px solid #e2e5ef;font-size:13px}
.receipt-row:last-child{border-bottom:0}
.receipt-row span{flex:0 0 34%;color:#5c6178}
.receipt-row strong{flex:1;text-align:right;overflow-wrap:anywhere;color:#000C52}
.receipt-reference{background:#f4f5fa}
.receipt-reference strong{font-size:12px;letter-spacing:.025em}
.receipt-notice{font-size:13px;text-align:left;margin:18px 0!important}
.receipt-whatsapp{max-width:560px;margin:20px auto;padding:22px;border:1px solid #d7daeb;border-radius:14px}
.receipt-wa-title{font-size:17px;font-weight:750;margin:0 0 8px!important;color:#000C52}
.receipt-whatsapp .muted{font-size:13px;margin-bottom:14px}
.whatsapp-button{background:#25D366;border-color:#25D366;color:#0b2c1b;font-weight:750}
.whatsapp-button:hover{background:#1fbf5b;filter:none}
.receipt-wa-hint{font-size:12px;color:#5c6178;margin:10px 0 0!important}
.receipt-hint{font-size:12px;margin:22px auto 18px!important;max-width:500px}
.receipt-actions{max-width:560px;margin:18px auto 0}
@media(max-width:700px){.receipt-wrap{padding-top:30px}.receipt-card{padding:24px 18px}.receipt-row{display:block;padding:11px 14px}.receipt-row span,.receipt-row strong{display:block;text-align:left}.receipt-row strong{margin-top:3px}.receipt-whatsapp{padding:18px 14px}}
@media print{body{background:#fff}.receipt-wrap{padding:0}.receipt-card{box-shadow:none;border:1px solid #d7daeb}.receipt-actions,.receipt-whatsapp{display:none!important}.success-symbol{print-color-adjust:exact;-webkit-print-color-adjust:exact}}

/* HQ-only manual receipt verification: distinguish a checked receipt from payment processing. */
.payment-verified{display:inline-block;padding:5px 9px;border-radius:8px;border:1px solid #000C52;color:#000C52;background:#EEEAE2;font-size:12px;font-weight:750;white-space:nowrap}
.payment-note{display:block;margin-top:5px;color:#5c6178;font-size:11px;line-height:1.35;min-width:120px}

/* Private QMS check-in QR on the original Event Registration Tahniah receipt. */
.receipt-checkin-qr{margin:22px auto;padding:19px 15px;border-radius:16px;border:1px dashed #9ba2c4;text-align:center;background:#f8f9fc}
.receipt-checkin-qr h2{font-size:17px;color:#000C52;margin:6px 0 12px}
.receipt-checkin-qr img{display:block;margin:0 auto 12px;max-width:100%;object-fit:contain;border-radius:9px}
.receipt-checkin-qr a{font-size:13px;font-weight:700;color:#000C52}
.receipt-checkin-qr p{max-width:340px;margin:10px auto}
@media print{.receipt-checkin-qr{page-break-inside:avoid}.receipt-checkin-qr a{display:none}}

/* Secure bank-transfer and receipt UI */
.payment-panel,.receipt-payment{padding:19px;margin:16px 0 22px;border-radius:13px;border:1px solid #d7daeb;background:#fafbfe}
.payment-panel h3,.receipt-payment h2{font-size:18px;margin:0 0 11px;color:#000C52}
.bank-information{border:1px solid #d7daeb;border-radius:11px;overflow:hidden;margin:15px 0;background:white}
.bank-information>div{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:10px 14px;border-bottom:1px solid #e4e6ee}
.bank-information>div:last-child{border-bottom:0}
.bank-information span{color:#5c6178;font-size:13px;min-width:35%}
.bank-information strong{font-size:14px;text-align:right;overflow-wrap:anywhere;color:#000C52}
.payment-panel .field{margin-top:15px}
.payment-panel input[type=file],#lateReceiptFile{background:#fff;padding:11px 12px;height:auto}
#lateReceiptPanel{margin-top:15px}
.receipt-payment{max-width:560px;margin:20px auto;text-align:left}
.receipt-payment h2{text-align:center}
@media(max-width:700px){.bank-information>div{display:block}.bank-information strong{display:block;text-align:left;margin-top:4px}}

/* HQ desktop: use available screen width and wrap participant columns instead of horizontal scrolling. */
@media (min-width: 1100px) {
  body:has(#admin) main { max-width: 1900px; width: 100%; padding-left: 24px; padding-right: 24px; }
  #admin .table-scroll { overflow-x: visible; }
  #admin #registrations { overflow-wrap: anywhere; }
  #admin #registrations:empty { min-height: 1px; }
  #admin .table-scroll:has(#registrations) table { width: 100%; min-width: 0; table-layout: fixed; font-size: 12px; }
  #admin .table-scroll:has(#registrations) th,
  #admin .table-scroll:has(#registrations) td { padding: 10px 7px; overflow-wrap: anywhere; }
  #admin .table-scroll:has(#registrations) th:nth-child(1) { width: 14%; }
  #admin .table-scroll:has(#registrations) th:nth-child(2) { width: 12%; }
  #admin .table-scroll:has(#registrations) th:nth-child(3) { width: 8%; }
  #admin .table-scroll:has(#registrations) th:nth-child(4) { width: 11%; }
  #admin .table-scroll:has(#registrations) th:nth-child(5) { width: 9%; }
  #admin .table-scroll:has(#registrations) th:nth-child(6) { width: 15%; }
  #admin .table-scroll:has(#registrations) th:nth-child(7) { width: 11%; }
  #admin .table-scroll:has(#registrations) th:nth-child(8) { width: 20%; }
  #admin .table-scroll:has(#registrations) .button-row { flex-wrap: wrap; gap: 5px; }
  #admin .table-scroll:has(#registrations) .small-btn { white-space: normal; font-size: 11px; padding: 5px 7px; min-height: 30px; text-align: center; }
  #admin .table-scroll:has(#registrations) .payment-note { min-width: 0; }
}
