/* Layout: satu kolom sempit seperti warta jemaat; jadwal berupa kartu dengan meter kursi */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #1d2233;
  --muted: #5d6478;
  --line: #dde0ea;
  --accent: #2f3f8f;      /* biru liturgi */
  --accent-ink: #ffffff;
  --gold: #b0852b;
  --ok: #2e7d4f;
  --warn: #b26a00;
  --bad: #b3261e;
  --band: #23306f;
  --band-ink: #eef0fb;
  --f-display: "Literata", Georgia, "Times New Roman", serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141c; --surface: #1b1e2a; --ink: #e8eaf3; --muted: #9da3b8; --line: #2d3142;
    --accent: #8f9ef0; --accent-ink: #12141c; --gold: #d9ac52;
    --ok: #6cc28f; --warn: #e6a64a; --bad: #f08a80; --band: #1a2150; --band-ink: #e8eaf3;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--f-body); }
.wrap { max-width: 760px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.band { background: var(--band); color: var(--band-ink); }
.band .wrap { padding-block: 40px 32px; }
.eyebrow { margin: 0 0 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(28px, 6vw, 40px); line-height: 1.15; margin: 0 0 12px; text-wrap: balance; }
h2 { font-family: var(--f-display); font-weight: 500; font-size: 22px; margin: 0; text-wrap: balance; }
.lede { margin: 0; max-width: 60ch; opacity: .9; }
main.stack { padding-block: 32px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
main.stack { gap: 40px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.svc { text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; min-width: 0; }
.svc:hover:not(:disabled) { border-color: var(--accent); }
.svc.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.svc:disabled { opacity: .6; cursor: not-allowed; }
.svc:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.svc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.svc-time { font-family: var(--f-display); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.svc-title { font-weight: 600; }
.svc-date { color: var(--muted); font-size: 14px; }

.meter { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.meter-top { display: flex; justify-content: space-between; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }
.m-balkon .bar span { background: var(--gold); }
.m-tambahan .bar span { background: var(--warn); }

.pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; border: 1px solid currentColor; }
.pill.ok { color: var(--ok); } .pill.warn { color: var(--warn); } .pill.full { color: var(--bad); }

.form { display: flex; flex-direction: column; gap: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 15px; min-width: 0; }
.opt { color: var(--muted); font-weight: 400; }
input, select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-weight: 500; font-size: 15px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { flex-direction: row; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; cursor: pointer; }
.chip input, .check input { width: auto; }
.chip:has(input:checked) { border-color: var(--accent); color: var(--accent); }
.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.check input { margin-top: 4px; }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
.err { color: var(--bad); margin: 0; font-weight: 500; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

.btn { font: inherit; font-weight: 600; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 12px 18px; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.sm { padding: 6px 10px; font-size: 13px; }

.ticket { background: var(--surface); border: 1.5px dashed var(--accent); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.t-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 30px; font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.ticket dl { margin: 0; display: grid; gap: 8px; }
.ticket dl div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.ticket dt { color: var(--muted); font-size: 14px; }
.ticket dd { margin: 0; }
.small-t { margin-top: 4px; }
.small-t .t-code { font-size: 22px; }
.confirm { display: flex; flex-direction: column; gap: 10px; }
.confirm p { margin: 0; }
.notice { margin: 0; padding: 10px 12px; border-radius: 8px; font-size: 14px; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.notice.bad { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.notice.ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.ci { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ci select { width: auto; padding: 4px 6px; }
label.inline { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; font-size: 14px; }
.panel { display: flex; flex-direction: column; gap: 12px; }
tr.dilepas td { color: var(--muted); }
.foot { padding-block: 24px 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* Admin */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.toolbar label { flex: 1 1 140px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tr.batal td { color: var(--muted); text-decoration: line-through; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.stat b { font-family: var(--f-display); font-size: 24px; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ---------- Halaman petugas ---------- */
.band-slim .wrap { padding-block: 18px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.h-slim { font-size: clamp(22px, 5vw, 28px); margin: 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a, .linkbtn { color: var(--band-ink); text-decoration: none; font: inherit; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 8px; background: none; border: 0; cursor: pointer; opacity: .85; }
.tabs a:hover, .linkbtn:hover { opacity: 1; background: color-mix(in srgb, var(--band-ink) 12%, transparent); }
.tabs a[aria-current="page"] { opacity: 1; background: color-mix(in srgb, var(--band-ink) 18%, transparent); }
.tabs a:focus-visible, .linkbtn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.main-pad { padding-block: 24px 48px; }
main.main-pad { gap: 24px; }
h3 { font-family: var(--f-display); font-weight: 500; font-size: 18px; margin: 0; }
.row.between { justify-content: space-between; align-items: center; }
.row.nowrap { flex-wrap: nowrap; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; resize: vertical; }
details.card > summary { cursor: pointer; list-style-position: inside; }
details.card[open] > summary { margin-bottom: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pill:not(.ok):not(.warn):not(.full) { color: var(--muted); }

/* Login */
.login-page { min-height: 100%; background: var(--band); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding-block: 32px; }
.login-card { width: 100%; max-width: 420px; }
.login-title { color: var(--ink); font-size: 30px; margin: 0; }
.login-card a { text-align: center; }

/* Sintua */
.seatbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.seat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.seat b { font-family: var(--f-display); font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.seat span { font-size: 11px; color: var(--muted); line-height: 1.2; }
@media (max-width: 480px) { .seatbar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sticky-search { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding-block: 8px; display: flex; flex-direction: column; gap: 8px; }
.sticky-search input[type=search] { font-size: 18px; padding: 14px 16px; border-radius: 10px; border: 1.5px solid var(--accent); background: var(--surface); }
.chip-lg { padding: 10px 16px; font-weight: 500; }
.rcard { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.rcard.done { background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.rhead { display: flex; justify-content: space-between; gap: 10px; }
.rnama { font-weight: 600; font-size: 18px; }
.raksi { display: flex; flex-direction: column; gap: 10px; }
.btn-lg { padding: 14px 18px; font-size: 17px; width: 100%; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper .btn { width: 48px; height: 44px; padding: 0; font-size: 22px; line-height: 1; }
.stepper output { min-width: 90px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
tr.draf td { background: color-mix(in srgb, var(--line) 30%, transparent); }
/* Jarak di atas judul saat digulir otomatis */
h2[id] { scroll-margin-top: 16px; }
