/* Admin RSVP 45 Tahun Yayasan Jantung Indonesia
 * Palet & bentuk mengikuti yayasanjantungindonesia.org: merah YJI, abu terang, huruf geometris (Poppins),
 * tombol pil, kartu bersudut 15px dengan bayangan lembut. Nama variabel lama (navy/maroon) dipertahankan
 * supaya aturan di bawah tidak perlu diubah: --navy = arang (teks & aksi sekunder), --maroon = merah YJI. */
:root {
  --navy: #262626;
  --navy-dark: #0F0F0F;
  --navy-soft: #F1F1F1;
  --maroon: #E31E24;
  --maroon-dark: #C41E3A;
  --maroon-soft: #FDECEC;
  --paper: #F5F5F5;
  --ink: #333333;
  --muted: #666666;
  --sage: #D9D9D9;
  --mist: #EEEEEE;
  --line: #E0E0E0;
  --ok: #1E7A4C;
  --ok-soft: #E4F4EA;
  --amber: #8A6A1F;
  --amber-soft: #FBF1D9;
  --gold: #FFD700;
  --sans: 'Poppins', 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --cond: var(--sans);
  --serif: 'Playfair Display', Georgia, serif;
  --sheet: #FFFFFF;
  --navy-deep: #1A1A1A;
  --radius: 15px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-lift: 0 10px 28px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--maroon); }
a:hover { color: var(--navy); }
code { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 0.92em; letter-spacing: 0.06em; color: var(--navy); background: var(--navy-soft); padding: 1px 6px; border-radius: 8px; }
kbd { font-family: inherit; font-size: 0.85em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 8px; padding: 0 5px; background: #fff; }
[hidden] { display: none !important; }
::selection { background: var(--maroon); color: #fff; }

/* ---------- Kerangka ---------- */
.topbar {
  background: var(--sheet); border-bottom: 2px solid var(--navy);
  position: sticky; top: 0; z-index: 20;
}
.topbar__inner {
  max-width: 1240px; margin: 0 auto; padding: 0 20px; min-height: 64px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 28px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__logo { width: 44px; height: 44px; display: block; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-weight: 700; font-size: 15px; color: var(--ink); letter-spacing: -0.01em; }
.brand__name b { color: var(--maroon); font-weight: 700; }
.brand__tag { font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.mainnav {
  display: flex; gap: 4px; align-self: stretch; overflow-x: auto; scrollbar-width: none;
  font-family: var(--cond); font-weight: 600; font-size: 17px; letter-spacing: 0.02em;
}
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a {
  display: flex; align-items: center; padding: 0 12px; white-space: nowrap;
  color: var(--navy); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.mainnav a:hover { color: var(--maroon); }
.mainnav a.is-active { color: var(--maroon); border-bottom-color: var(--maroon); }
.topbar__user { display: flex; align-items: center; gap: 14px; }
.topbar__user form { margin: 0; }
.topbar__link { font-size: 14px; color: var(--muted); }
.topbar__name {
  font-family: var(--cond); font-weight: 600; font-size: 16px; color: var(--navy);
  max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 860px) {
  .topbar__inner { grid-template-columns: auto auto; padding: 8px 16px 0; }
  .mainnav { grid-column: 1 / -1; grid-row: 2; margin: 0 -16px; padding: 0 4px; min-height: 44px; }
  .topbar__user { justify-self: end; }
  .topbar__link { display: none; }
}
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px 20px 56px; flex: 1; display: flex; flex-direction: column; gap: 20px; }
.admin-footer { text-align: center; color: var(--muted); font-size: 13px; padding: 16px; border-top: 1px solid var(--line); }

/* ---------- Tipografi ---------- */
.eyebrow { font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: 0.24em; color: var(--maroon); }
.eyebrow--danger { color: var(--maroon); }
.page-title { margin: 2px 0 0; font-family: var(--cond); font-weight: 700; font-size: clamp(26px, 4vw, 36px); letter-spacing: 0.02em; color: var(--navy); line-height: 1.1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.page-head p { margin: 6px 0 0; }
.page-head__side { display: flex; gap: 10px; align-items: center; }
.note { margin: -6px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Kartu ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: clamp(16px, 3vw, 24px); }
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card__head--pad { padding: 16px 16px 0; }
.card__title { margin: 0; font-family: var(--cond); font-weight: 700; font-size: 22px; color: var(--navy); letter-spacing: 0.02em; }
.empty { color: var(--muted); padding: 16px; margin: 0; }

/* ---------- Statistik ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat__label { font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.stat__value { font-family: var(--cond); font-weight: 700; font-size: 40px; line-height: 1.05; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat__hint { font-size: 13px; color: var(--muted); }
.stat--hadir { border-top-color: var(--ok); }
.stat--mungkin { border-top-color: var(--amber); }
.stat--tidak { border-top-color: var(--maroon); }
.stat--primary { background: var(--navy); border-color: var(--navy); }
.stat--primary .stat__label, .stat--primary .stat__hint { color: rgba(255, 255, 255, 0.8); }
.stat--primary .stat__value { color: #fff; }
.stat--dashed { border-style: dashed; border-top-style: solid; border-top-color: var(--amber); }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px;
  padding: 8px 18px; border-radius: 8px; border: 1.5px solid transparent; cursor: pointer;
  font-family: var(--cond); font-weight: 600; font-size: 15px; letter-spacing: 0.1em; text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s; white-space: nowrap;
}
.btn--sm { min-height: 34px; padding: 4px 12px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--maroon); color: #fff; }
.btn--primary:hover { background: var(--navy); color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-dark); color: #fff; }
.btn--outline { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { background: var(--mist); color: var(--navy); }
.btn--danger { background: #fff; color: var(--maroon); border-color: var(--maroon); }
.btn--danger:hover { background: var(--maroon); color: #fff; }
.btn--danger-solid { background: var(--maroon); color: #fff; }
.btn--danger-solid:hover { background: var(--maroon-dark); color: #fff; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn:focus-visible, .input:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.actions__end { margin-left: auto; }
.actions-cell { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- Form ---------- */
.form { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--narrow { max-width: 320px; }
.field.is-muted { opacity: 0.5; }
.label { font-family: var(--cond); font-weight: 600; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy); }
.input {
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1.5px solid #CFCFCF; border-radius: 8px;
}
.input--sm { min-height: 36px; width: auto; min-width: min(100%, 260px); font-size: 14px; }
textarea.input { resize: vertical; line-height: 1.5; }
.input.is-invalid { border-color: var(--maroon); background: var(--maroon-soft); }
.error { color: var(--maroon); font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--maroon); margin: 0; flex: none; }
/* Pilihan peran & hak akses (form pengguna) */
.fieldset { border: 0; margin: 0; padding: 0; }
.fieldset legend { padding: 0; margin-bottom: 6px; }
.options { display: flex; flex-direction: column; gap: 10px; }
.options--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px 20px; }
.option { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.option input { margin-top: 3px; }
.option:has(input:checked) { border-color: var(--navy); background: var(--navy-soft); }
.option.is-muted { opacity: 0.6; cursor: not-allowed; }
.perm-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.perm-tag { font-size: 12px; padding: 1px 8px; border-radius: 8px; background: var(--mist); color: var(--navy); white-space: nowrap; }
.checkin-box { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; background: var(--paper); border: 1px solid var(--line); padding: 12px 14px; border-radius: 8px; }

.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { flex: none; width: 46px; height: 26px; border-radius: 13px; background: #CFCFCF; position: relative; transition: background .15s; margin-top: 2px; }
.switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + .switch__track { background: var(--ok); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--navy); outline-offset: 2px; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters__q { flex: 1 1 260px; }
.filters .field:not(.filters__q) { flex: 0 1 200px; }
.filters__actions { display: flex; gap: 8px; }

/* ---------- Pesan ---------- */
.flash { padding: 12px 14px; border-radius: 8px; border-left: 4px solid var(--navy); background: var(--navy-soft); color: var(--navy); }
.flash--success { border-color: var(--ok); background: var(--ok-soft); color: #1F4B37; }
.flash--error { border-color: var(--maroon); background: var(--maroon-soft); color: var(--maroon); }
.flash--info { border-color: var(--navy); }
.warning { margin: 0; color: var(--maroon); background: var(--maroon-soft); padding: 10px 12px; border-radius: 8px; }

/* ---------- Label status ---------- */
.pill { display: inline-block; font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; padding: 2px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.pill--hadir, .pill--ok { background: var(--ok-soft); color: var(--ok); border-color: #BFD9C9; }
.pill--mungkin { background: var(--amber-soft); color: var(--amber); border-color: #E6D3A6; }
.pill--cat { background: #F3F3F3; color: var(--navy); border-color: #DDDDDD; letter-spacing: .04em; }
.pill--tidak_hadir, .pill--closed { background: var(--maroon-soft); color: var(--maroon); border-color: #F6C6C8; }
.pill--pending { background: var(--mist); color: var(--muted); border-color: var(--line); }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); background: #FAFAFA; white-space: nowrap; }
.table th.right { text-align: right; }
.table td { padding: 10px 12px; border-bottom: 1px solid #EEEEEE; vertical-align: top; }
.table tbody tr:hover { background: #FAFAFA; }
.msg { margin-top: 4px; font-size: 13px; color: var(--muted); }
.msg summary { cursor: pointer; color: var(--navy); }
.msg p { margin: 4px 0 0; white-space: pre-line; max-width: 46ch; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.pager__info { color: var(--muted); }
@keyframes flashRow { from { background: #FFF6D6; } to { background: transparent; } }
.flash-row { animation: flashRow 2.2s ease-out; }

/* Tabel menjadi kartu di layar sempit */
@media (max-width: 760px) {
  .table--rsvp thead, .table--scan thead { display: none; }
  .table--rsvp, .table--rsvp tbody, .table--rsvp tr, .table--rsvp td,
  .table--scan, .table--scan tbody, .table--scan tr, .table--scan td { display: block; width: 100%; }
  .table--rsvp tr, .table--scan tr { border-bottom: 1px solid var(--line); padding: 10px 4px; }
  .table--rsvp td, .table--scan td { border: 0; padding: 4px 12px; text-align: left; }
  .table--rsvp td[data-label]::before, .table--scan td[data-label]::before {
    content: attr(data-label); display: block; font-family: var(--cond); font-weight: 600; font-size: 12px;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  }
  .actions-cell { justify-content: flex-start; padding-top: 8px !important; }
  .table--scan td.right { text-align: left; }
}

/* ---------- Scan ---------- */
.scan { display: flex; flex-direction: column; gap: 16px; border-top: 4px solid var(--navy); }
.scan__form { display: flex; flex-direction: column; gap: 6px; }
.scan__row { display: flex; gap: 10px; }
.input--scan { font-family: ui-monospace, Consolas, monospace; font-size: clamp(20px, 3vw, 26px); letter-spacing: 0.14em; text-transform: uppercase; min-height: 56px; }
.scan__row .btn { min-height: 56px; padding: 8px 22px; }
.result { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1.5px solid; }
.result__mark { flex: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--cond); font-weight: 700; font-size: 26px; color: #fff; }
.result__title { font-family: var(--cond); font-weight: 700; font-size: 24px; line-height: 1.15; }
.result__detail { color: var(--ink); margin-top: 2px; }
.result--ok { background: var(--ok-soft); border-color: var(--ok); color: #1F4B37; }
.result--ok .result__mark { background: var(--ok); }
.result--warn { background: var(--amber-soft); border-color: var(--amber); color: #5E4712; }
.result--warn .result__mark { background: var(--amber); }
.result--error { background: var(--maroon-soft); border-color: var(--maroon); color: var(--maroon); }
.result--error .result__mark { background: var(--maroon); }
.result--busy { background: var(--navy-soft); border-color: var(--navy); color: var(--navy); }
.result--busy .result__mark { background: var(--navy); }

/* ---------- Login, konfirmasi, error ---------- */
/* Login: panel merah YJI (logo 45 tahun, garis detak jantung) + panel formulir */
.login-page { background: var(--paper); }
.login { flex: 1; display: grid; grid-template-columns: minmax(360px, 5fr) 7fr; min-height: 100vh; }
.login__art {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(150deg, #E31E24 0%, #C41E3A 55%, #8E1424 100%); color: #fff;
  padding: 40px clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
/* Garis detak jantung (EKG) sebagai motif, data-URI supaya lolos CSP */
.login__art::before {
  content: ''; position: absolute; inset: 34% -10% auto -10%; height: 150px; z-index: -1; opacity: 0.22;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 120' preserveAspectRatio='none'%3E%3Cpath d='M0 60h170l18-30 22 70 26-110 24 92 16-22h324' fill='none' stroke='%23fff' stroke-width='3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.login__art::after {
  content: ''; position: absolute; width: 520px; height: 520px; right: -220px; top: -200px; z-index: -1;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 70%);
}
.login__badge {
  align-self: flex-start; background: #fff; border-radius: var(--radius); padding: 14px 18px;
  box-shadow: 0 14px 34px rgba(80, 0, 0, 0.28);
}
.login__badge img { display: block; width: clamp(180px, 18vw, 240px); height: auto; }
.login__caption { display: flex; flex-direction: column; gap: 10px; max-width: 26em; }
.login__kicker {
  margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
}
.login__title { margin: 0; font-weight: 700; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; letter-spacing: -0.01em; }
.login__tagline { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(17px, 1.5vw, 20px); color: rgba(255, 255, 255, 0.9); }
.login__facts { list-style: none; margin: 8px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.3); display: flex; flex-direction: column; gap: 6px; }
.login__facts li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; color: rgba(255, 255, 255, 0.92); }
.login__facts b { flex: none; width: 64px; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.login__panel { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 24px; padding: 48px 24px; }
.login__form {
  width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(24px, 4vw, 40px);
}
.login__mark { width: 56px; height: 56px; display: block; margin-bottom: 14px; }
.login__heading { margin: 0; font-weight: 700; font-size: 32px; line-height: 1.1; color: var(--ink); letter-spacing: -0.02em; }
.login__lead { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.login .label { text-transform: none; letter-spacing: 0; font-size: 14px; }
.login .input { min-height: 50px; }
.pw { position: relative; }
.pw .input { padding-right: 112px; }
.pw__toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: 8px 12px; cursor: pointer; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 13px; color: var(--maroon);
}
.pw__toggle:hover { background: var(--maroon-soft); }
.pw__toggle:focus-visible { outline: 2px solid var(--maroon); outline-offset: 0; }
.login__submit { min-height: 52px; font-size: 16px; margin-top: 4px; }
.login__foot { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login__art { padding: 20px; gap: 16px; flex-direction: row; align-items: center; justify-content: flex-start; }
  .login__art::before { inset: auto -10% 0 -10%; height: 90px; }
  .login__badge { padding: 8px 10px; border-radius: 12px; }
  .login__badge img { width: 112px; }
  .login__kicker, .login__tagline, .login__facts { display: none; }
  .login__title { font-size: 19px; }
  .login__panel { justify-content: flex-start; padding: 28px 16px 40px; }
  .login__heading { font-size: 28px; }
}
.confirm { max-width: 560px; display: flex; flex-direction: column; gap: 14px; border-top: 4px solid var(--maroon); }
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.summary dt { font-family: var(--cond); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-size: 13px; padding-top: 2px; }
.summary dd { margin: 0; }
.error-card { max-width: 560px; display: flex; flex-direction: column; gap: 10px; }
.error-card__code { font-family: var(--cond); font-weight: 700; font-size: 72px; line-height: 0.9; color: var(--maroon); }

@media (max-width: 520px) {
  .topbar__name { display: none; }
  .brand__tag { display: none; }
  .scan__row { flex-direction: column; }
  .actions__end { margin-left: 0; }
}

/* ---------- Dashboard ---------- */
.num {
  font-family: var(--cond); font-style: normal; font-weight: 700; font-size: 1.06em;
  letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--maroon);
}
.dash-hero {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 32px 56px; align-items: end;
  padding: 8px 0 36px; border-bottom: 1px solid var(--line);
}
.dash-hero__sentence {
  margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(32px, 3.9vw, 54px); line-height: 1.1; color: var(--navy); text-wrap: balance; max-width: 26ch;
}
.dash-hero__line { display: block; }
.dash-hero__line + .dash-hero__line { margin-top: 0.18em; }
.dash-event { border-left: 2px solid var(--navy); padding-left: 20px; display: flex; flex-direction: column; gap: 14px; }
.dash-event__list { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.dash-event__list > div { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: baseline; }
.dash-event__list dt { font-size: 13px; color: var(--muted); }
.dash-event__list dd { margin: 0; font-family: var(--cond); font-weight: 600; font-size: 18px; line-height: 1.25; color: var(--navy); }
.dash-event__status { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--ink); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.status-dot--open { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.status-dot--closed { background: var(--maroon); box-shadow: 0 0 0 3px var(--maroon-soft); }

.dash-block { min-width: 0; }
.dash-block__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-bottom: 10px; margin-bottom: 18px; border-bottom: 2px solid var(--navy);
}
.dash-block__title { margin: 0; font-family: var(--cond); font-weight: 700; font-size: 24px; color: var(--navy); }
.dash-block__meta { font-family: var(--cond); font-weight: 600; font-size: 17px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dash-block__link { font-size: 14px; }
.dash-empty { margin: 0; color: var(--muted); max-width: 52ch; }

/* Bar komposisi RSVP (satu-satunya animasi halaman) */
.comp-bar { display: block; border-radius: 8px; overflow: hidden; transform-origin: left center; animation: comp-grow 0.9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes comp-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.seg--hadir { fill: var(--navy); }
.seg--tidak { fill: var(--sage); }
.comp-legend { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.comp-legend li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.comp-legend__label { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); }
.comp-legend__num { font-family: var(--cond); font-weight: 700; font-size: 40px; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; }
.comp-legend__sub { font-size: 13px; color: var(--muted); }
.swatch { width: 12px; height: 12px; border-radius: 8px; flex: none; }
.swatch--hadir { background: var(--navy); }
.swatch--tidak { background: var(--sage); }
.comp-empty {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding: 20px; border: 1.5px dashed #CFCFCF; border-radius: 8px; color: var(--muted);
}
.comp-empty p { margin: 0; max-width: 56ch; }

.dash-recent { margin-top: 12px; }

/* RSVP terbaru, disusun seperti buku tamu */
.guestbook { list-style: none; margin: 0; padding: 0; }
.entry {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px;
  padding: 14px 0; border-bottom: 1px dotted rgba(51, 51, 51, 0.3);
}
.entry:first-child { padding-top: 0; }
.entry__who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.entry__name { font-family: var(--cond); font-weight: 600; font-size: 21px; line-height: 1.2; color: var(--navy); text-decoration: none; }
.entry__name:hover { color: var(--maroon); text-decoration: underline; text-underline-offset: 3px; }
.entry__org { font-size: 14px; color: var(--muted); }
.entry__time { font-size: 13px; color: var(--muted); white-space: nowrap; padding-top: 4px; }
.entry__status { grid-column: 1 / -1; font-size: 14px; color: var(--ink); }
.entry__msg {
  grid-column: 1 / -1; margin: 6px 0 0; max-width: 60ch;
  font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.35; color: var(--maroon);
}
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.status--hadir::before { background: var(--navy); }
.status--mungkin::before { background: repeating-linear-gradient(45deg, var(--maroon) 0 2px, #FBDADB 2px 4px); box-shadow: inset 0 0 0 1px var(--maroon); }
.status--tidak_hadir::before { background: var(--sage); box-shadow: inset 0 0 0 1px #BDBDBD; }

/* Panel malam peluncuran */

@media (max-width: 860px) {
  .dash-hero { grid-template-columns: 1fr; }
  .dash-hero { padding-bottom: 28px; }
  .dash-hero__sentence { max-width: none; }
}
@media (max-width: 520px) {
  .comp-legend { grid-template-columns: 1fr; gap: 12px; }
  .comp-legend li { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; }
  .comp-legend__num { grid-column: 2; grid-row: 1 / span 2; font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .comp-bar { animation: none; }
}

/* ---------- Kursi tamu ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.seat-actions { display: flex; flex-direction: column; gap: 14px; }
.seat-actions__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px 28px; align-items: start; }
.seat-actions__group { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.seat-actions__group .hint { flex-basis: 100%; }
.seat-import { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.seat-import__row { display: flex; gap: 8px; flex-wrap: wrap; }
.seat-import__row .input { flex: 1 1 180px; min-height: 42px; padding: 6px 8px; font-size: 14px; }
.seat-import .hint, .seat-import .error { margin: 0; }
.seat-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.seat-form { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0; min-width: 220px; }
.seat-form__seats { flex: 1 1 160px; max-width: 260px; min-width: 120px; text-transform: uppercase; }
.seat-form__error { flex-basis: 100%; margin: 0; font-size: 13px; }
.seat-problems { margin: 4px 0 0; padding-left: 16px; color: var(--maroon); font-size: 13px; }
.seat-problems--list { padding-left: 18px; font-size: 15px; line-height: 1.7; }
.seat-confirm { display: flex; flex-direction: column; gap: 12px; border-top: 4px solid var(--navy); }
.seat-confirm p { margin: 0; }
.seat-confirm form { margin: 0; }
.input.is-invalid { border-color: var(--maroon); background: var(--maroon-soft); }

@media (max-width: 760px) {
  .table--seat thead { display: none; }
  .table--seat, .table--seat tbody, .table--seat tr, .table--seat td { display: block; width: 100%; }
  .table--seat tr { border-bottom: 1px solid var(--line); padding: 10px 4px; }
  .table--seat td { border: 0; padding: 4px 12px; }
  .table--seat td[data-label]::before {
    content: attr(data-label); display: block; font-family: var(--cond); font-weight: 600; font-size: 12px;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  }
  .seat-form { min-width: 0; }
  .seat-form__seats { flex: 1 1 100%; max-width: none; }
  .seat-filter .input, .seat-filter .btn { flex: 1 1 auto; min-height: 44px; }
    }
.seat-form__seats::placeholder { text-transform: none; }
.seat-form__saved { font-size: 13px; color: var(--muted); min-height: 1em; }
.seat-form__saved--ok { color: var(--ok); font-weight: 600; }
.seat-form__saved--busy { color: var(--navy); }
.seat-form__saved--error { color: var(--maroon); font-weight: 600; }
.seat-autosave-hint { margin: 2px 0 0; }

/* -------------------------------------------------------------
 * Custom WA blast (/admin/wa-blast)
 * ------------------------------------------------------------- */
.wa-provider { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border: 1px solid #F6C6C8; border-radius: 12px; background: var(--maroon-soft); color: var(--maroon); font-size: 14px; }
.wa-provider.is-ready { border-color: #BFD9C9; background: var(--ok-soft); color: var(--ok); }
.wa-lead { margin: 6px 0 14px; }
.wa-import { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; }
.wa-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.wa-row .input[type="file"] { flex: 1 1 220px; min-height: 42px; padding: 6px 8px; font-size: 14px; }
.wa-row__end { margin-left: auto; }
.wa-compose { max-width: none; }
.wa-message { min-height: 260px; font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 14px; }
.wa-link { background: none; border: 0; padding: 0; font: inherit; color: var(--maroon); text-decoration: underline; cursor: pointer; }
.wa-link:hover { color: var(--navy); }
.wa-msg { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; border: 1px solid var(--line); background: var(--mist); color: var(--navy); }
.wa-msg--ok { border-color: #BFD9C9; background: var(--ok-soft); color: var(--ok); }
.wa-msg--error { border-color: #F6C6C8; background: var(--maroon-soft); color: var(--maroon); }
.wa-msg ul { margin: 6px 0 0; padding-left: 18px; }
.wa-bar { height: 12px; border-radius: 999px; background: #EAEAEA; overflow: hidden; margin: 12px 0 10px; }
.wa-bar span { display: block; height: 100%; width: 0; background: var(--navy); transition: width 0.3s ease; }
.wa-sample-wrap { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.wa-sample { margin: 0; padding: 12px 14px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; background: #F6F9F3; border: 1px solid #DCE6D3; border-radius: 12px; font-family: inherit; font-size: 14px; line-height: 1.5; color: var(--ink); }
.wa-media-note { margin: 0; font-size: 14px; color: var(--navy); word-break: break-word; }
.wa-media-input { min-height: 42px; padding: 6px 8px; font-size: 14px; }
.wa-attach { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #FAFAFA; }
.wa-attach__thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: none; background: #fff; }
.wa-attach__icon { width: 56px; height: 56px; display: grid; place-items: center; flex: none; border-radius: 8px; background: var(--navy); color: #fff; font-family: var(--cond); font-weight: 700; font-size: 14px; letter-spacing: 0.08em; }
.wa-attach__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.wa-attach__text strong { color: var(--navy); overflow-wrap: anywhere; }
.wa-subbox { padding: 16px; border-top: 1px solid var(--line); }
.wa-subbox .hint { margin: 4px 0 10px; }
.wa-subtitle { margin: 0; font-family: var(--cond); font-weight: 700; font-size: 18px; color: var(--navy); }
details.wa-subbox summary { cursor: pointer; }
.table--wa td { font-size: 14px; }
.table--wa .wa-actions { display: flex; flex-wrap: wrap; gap: 6px; }
@media (prefers-reduced-motion: reduce) { .wa-bar span { transition: none; } }
@media (max-width: 760px) {
  .wa-row__end { margin-left: 0; }
  .wa-row .btn { flex: 1 1 auto; min-height: 44px; }
  .wa-attach { flex-wrap: wrap; }
  .wa-attach .btn { flex: 1 1 100%; min-height: 44px; }
  .table--wa thead { display: none; }
  .table--wa, .table--wa tbody, .table--wa tr, .table--wa td { display: block; width: 100%; }
  .table--wa tr { border-bottom: 1px solid var(--line); padding: 10px 4px; }
  .table--wa td { border: 0; padding: 3px 12px; }
  .table--wa td[data-label]::before {
    content: attr(data-label); display: block; font-family: var(--cond); font-weight: 600; font-size: 12px;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  }
}

/* ---- Blast QR (/admin/qr-blast) ---- */
.qr-pad { padding: 0 16px; }
.qr-search { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 6px; }
.qr-search .input { flex: 1 1 260px; }
.qr-subhead { margin-top: 18px; font-size: 18px; }
.qr-phone { flex: 1 1 220px; max-width: 320px; }
.qr-delay { max-width: 160px; }
.qr-thumb { display: inline-grid; place-items: center; width: 64px; height: 80px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: zoom-in; }
.qr-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.qr-thumb:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.qr-thumb--empty { cursor: default; color: var(--muted); background: var(--mist); }
.qr-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.qr-dialog::backdrop { background: rgba(17, 17, 17, 0.55); }
.qr-dialog__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.qr-dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.qr-dialog__grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
.qr-dialog__img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
@media (max-width: 760px) {
  .qr-dialog__grid { grid-template-columns: 1fr; }
  .qr-dialog__img { max-width: 300px; margin: 0 auto; }
}

/* ---- Printer struk goodie bag (Scan masuk, WebUSB) ---- */
.printer { display: flex; flex-direction: column; gap: 10px; }
.printer__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.printer__status { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 15px; color: var(--ink); }
.printer__detail { margin: 4px 0 0 18px; font-size: 12px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.printer__detail[hidden] { display: none; }
.printer__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.printer .hint { margin: 0; }
.result__detail--warn { color: var(--maroon); font-weight: 600; }
@media (max-width: 760px) {
  .printer__actions .btn { flex: 1 1 auto; min-height: 44px; }
}
.qr-progress-inline { font-family: var(--cond); font-weight: 700; font-size: 17px; color: var(--navy); font-variant-numeric: tabular-nums; }
.qr-progress-count { font-weight: 600; color: var(--maroon); font-variant-numeric: tabular-nums; }
.qr-scope { border: 0; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 6px; }
.qr-scope .label { margin-bottom: 2px; }
.qr-delay-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qr-delay-range .qr-delay { max-width: 110px; }
.qr-devices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; margin-top: 10px; }
.qr-device { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: #FAFAFA; }
.qr-device__title { margin: 0; font-family: var(--cond); font-weight: 700; font-size: 18px; color: var(--navy); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qr-device .hint { margin: 0; }
.qr-select { max-width: 220px; }
.qr-progress-row { margin-top: 8px; }
.qr-history-filters { padding: 12px 16px 0; }
.qr-history-filters .qr-history-per { flex: 0 1 120px; }

.import-card { display: flex; flex-direction: column; gap: 12px; }
.import-rules { margin: 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.import-form { display: flex; flex-direction: column; gap: 12px; }
.scan-filters { padding: 12px 16px 0; }
.scan-filters .scan-filters__per { flex: 0 1 120px; }
.scan-pager { padding-bottom: 16px; }

.guest-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 6px; box-shadow: 0 18px 50px rgba(0, 0, 0, .3); color: var(--ink); background: #fff; }
.guest-dialog::backdrop { background: rgba(17, 17, 17, .55); }
.guest-dialog__form { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.guest-dialog__head { display: flex; justify-content: space-between; align-items: center; }
.guest-dialog__close { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.guest-dialog__name { margin: 0; font-family: var(--cond); font-size: 28px; line-height: 1.15; color: var(--navy); overflow-wrap: anywhere; }
.guest-dialog__name:focus { outline: none; }
.guest-dialog__meta { margin: 0; color: var(--muted); font-size: 14px; }
.guest-dialog__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.guest-dialog__facts dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.guest-dialog__facts dd { margin: 2px 0 0; font-family: var(--cond); font-weight: 700; font-size: 22px; color: var(--navy); }
.guest-dialog__count { margin: 0; }
.guest-count { display: flex; align-items: center; gap: 12px; }
.guest-count__input { width: 120px; min-height: 56px; font-family: var(--cond); font-weight: 700; font-size: 30px; text-align: center; }
.guest-count__unit { font-weight: 700; font-size: 20px; color: var(--navy); }
.guest-dialog__actions .btn { width: 100%; min-height: 48px; font-size: 16px; }
.guest-dialog__wide { grid-column: 1 / -1; }
.guest-dialog__wide dd { font-size: 18px; }
.wa-intro { margin: 6px 0 0; color: var(--maroon); }

/* =============================================================
 * Lapisan tema YJI: bentuk & tipografi (warna sudah lewat :root)
 * ============================================================= */
/* Header putih berbayangan, menu aktif merah */
.topbar { border-bottom: 0; box-shadow: var(--shadow); }
.topbar__inner { min-height: 70px; }
.mainnav { font-size: 14px; font-weight: 500; letter-spacing: 0; gap: 2px; }
.mainnav a { color: var(--ink); padding: 0 12px; margin-bottom: 0; border-bottom-width: 3px; }
.mainnav a.is-active { font-weight: 600; }
.topbar__name { font-size: 14px; font-weight: 600; }

/* Judul */
.eyebrow { font-size: 12px; letter-spacing: 0.18em; }
.page-title { font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.card__title, .dash-block__title { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: var(--ink); }
.dash-block__head { border-bottom-color: var(--maroon); }
.dash-event { border-left-color: var(--maroon); }

/* Kartu & statistik: sudut 15px, bayangan lembut */
.card { border-color: transparent; border-radius: var(--radius); box-shadow: var(--shadow); }
.stat { border: 0; border-top: 4px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.stat--hadir { border-top-color: var(--ok); }
.stat--mungkin, .stat--dashed { border-top-color: var(--amber); }
.stat--tidak { border-top-color: var(--maroon); }
.stat--primary { background: linear-gradient(135deg, var(--maroon), var(--maroon-dark)); border-top-color: var(--maroon-dark); }
.stat__label { font-size: 11.5px; letter-spacing: 0.1em; font-weight: 600; }
.stat__value { font-size: 36px; letter-spacing: -0.02em; }
.scan, .confirm, .seat-confirm { border-top: 4px solid var(--maroon); }

/* Tombol pil */
.btn { border-radius: 50px; font-size: 14px; font-weight: 600; letter-spacing: 0.01em; padding: 8px 22px; }
.btn--sm { font-size: 13px; padding: 4px 14px; }
.btn--primary { box-shadow: 0 4px 14px rgba(227, 30, 36, 0.28); }
.btn--primary:hover { background: var(--maroon-dark); }
.btn--outline { border-color: #CFCFCF; color: var(--ink); }
.btn--outline:hover { background: var(--ink); border-color: var(--ink); }
.btn--ghost { color: var(--ink); }
.btn:focus-visible, .input:focus-visible { outline-color: var(--maroon); }

/* Formulir */
.label { font-size: 13px; letter-spacing: 0.02em; text-transform: none; font-weight: 600; color: var(--ink); }
.input { border-radius: 10px; border-width: 1px; border-color: #CFCFCF; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--maroon); box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.15); outline: none; }
.option:has(input:checked) { border-color: var(--maroon); background: var(--maroon-soft); }
.flash { border-radius: 10px; }

/* Tabel */
.table th { font-size: 11.5px; letter-spacing: 0.08em; background: #FAFAFA; border-bottom-width: 1px; }
.table tbody tr:hover { background: #FFF7F7; }
.table--rsvp td[data-label]::before, .table--scan td[data-label]::before,
.table--seat td[data-label]::before, .table--wa td[data-label]::before { font-size: 11px; letter-spacing: 0.08em; }
.summary dt { font-size: 12px; letter-spacing: 0.06em; }
.pill { font-size: 12px; letter-spacing: 0.02em; font-weight: 600; }

/* Dashboard: kehadiran = merah YJI, tidak hadir = abu */
.seg--hadir { fill: var(--maroon); }
.swatch--hadir, .status--hadir::before { background: var(--maroon); }
.dash-hero__sentence { color: var(--ink); }
.num { letter-spacing: -0.02em; }
.wa-bar span { background: linear-gradient(90deg, var(--maroon), var(--maroon-dark)); }

/* Dialog */
.guest-dialog, .qr-dialog { border-radius: var(--radius); }
.guest-dialog__name { font-weight: 700; font-size: 24px; letter-spacing: -0.01em; }
.guest-count__input { font-size: 28px; }

/* Halaman error publik */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.error-page .error-card { width: 100%; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; border-top: 4px solid var(--maroon); }
.error-page__logo { width: 64px; height: 64px; display: block; }
.error-card__code { font-size: 64px; }

.admin-footer { background: #fff; }
