:root {
  --bg: #f5f6f8; --card: #fff; --text: #1b1f24; --muted: #69707a; --line: #e3e6ea;
  --primary: #0b6bcb; --primary-text: #fff; --danger: #c62828; --ok-bg: #e7f6ec; --ok: #1b6e3a;
  --err-bg: #fdecec; --warn-bg: #fff6e0;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111418; --card: #1a1e24; --text: #e6e8eb; --muted: #9aa1ab; --line: #2b3038;
    --primary: #4c9ef0; --primary-text: #0b1520; --danger: #ef6b6b; --ok-bg: #16301f; --ok: #7fd59b;
    --err-bg: #3a1a1a; --warn-bg: #34290f; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--primary); }
h1 { font-size: 1.5rem; margin: 0 0 16px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
main { max-width: 1040px; margin: 0 auto; padding: 20px 16px 60px; }
main.narrow { max-width: 420px; padding-top: 12vh; }
.topbar { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.topbar nav a { padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--muted); }
.topbar nav a.on { background: var(--bg); color: var(--text); font-weight: 600; }
.who { display: flex; gap: 12px; align-items: center; }
.who form { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.center-card { text-align: left; }
.notice { background: var(--warn-bg); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; word-break: break-word; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--danger); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.big { font-size: 1.5rem; font-weight: 700; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; gap: 12px; }
.row.gap { gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
input, select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; min-width: 0; }
input[type=checkbox] { width: 18px; height: 18px; }
input[type=file] { padding: 6px; }
.btn { display: inline-block; font: inherit; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); font-weight: 600; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
tr.dim { opacity: 0.55; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; background: var(--bg); }
.s-menunggu_bayar { background: #eceff3; color: #4a525c; }
.s-menunggu_konfirmasi { background: #fff1cc; color: #7a5600; }
.s-diterima { background: #dcebff; color: #0b4f99; }
.s-selesai { background: #dcf5e4; color: #186b37; }
.s-ditolak { background: #fde0e0; color: #9b1c1c; }
.s-dibatalkan { background: #eceff3; color: #8a9099; text-decoration: line-through; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid2 > .card { margin-bottom: 0; }
.grid2 { margin-bottom: 16px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; margin: 12px 0; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 12px; }
.kv dt { color: var(--muted); font-size: 0.88rem; }
.kv dd { margin: 0; }
.bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.bar span { display: block; height: 100%; background: var(--primary); }
.qris-card { text-align: center; }
img.qris { display: block; width: 100%; max-width: 340px; margin: 12px auto; border-radius: 8px; background: #fff; }
.qris.empty { display: grid; place-items: center; height: 200px; border: 2px dashed var(--line); border-radius: 8px; color: var(--muted); margin: 12px 0; }
details > summary { cursor: pointer; }
details[open] > summary { margin-bottom: 8px; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 6px; } }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.card.inner { background: var(--bg); box-shadow: none; margin: 12px 0; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; overflow-y: auto; }
.modal { width: 100%; max-width: 440px; margin: 0; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal .center { text-align: center; margin-top: 12px; }
.app-name { font-weight: 800; letter-spacing: .02em; color: var(--primary); margin: 0 0 4px; }
/* Casual anti-copy: no text selection outside form fields. */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select { -webkit-user-select: text; user-select: text; }
img { -webkit-user-drag: none; pointer-events: none; }
html.veil body { filter: blur(24px); }
html.veil body * { visibility: hidden; }
.save-qr { width: 100%; margin-top: 12px; }
