/*
  Arah: editorial monokrom yang mengikuti foto (jas hitam, kemeja putih, latar abu dingin).
  Warna: tinta + kertas abu dingin dari latar foto; satu aksen bata hanya untuk harga & aksi bayar.
  Huruf: Newsreader (serif editorial) untuk judul dan nomor katalog; system-ui untuk teks karena paling cepat dan terbaca.
  Motif: katalog bernomor 01, 02 dengan garis tipis, seperti daftar isi majalah.
  Bayangan: tidak dipakai; pemisah cukup garis 1px supaya tetap datar dan tenang.
  Radius: 8px untuk panel/kontrol, foto 6px; lingkaran hanya untuk logo wajah.
*/
:root {
  --paper: #f1f2f3;
  --surface: #ffffff;
  --ink: #151515;
  --muted: #53565a;
  --line: #d6d8db;
  --accent: #a3321f;
  --accent-ink: #ffffff;
  --ok-bg: #e1f0e6; --ok: #1c5f38;
  --bad-bg: #f8e3df; --bad: #8f2617;
  --serif: 'Newsreader Variable', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121212; --surface: #1b1b1c; --ink: #ececec; --muted: #a4a7ab; --line: #303235;
    --accent: #f0907a; --accent-ink: #1d0d08;
    --ok-bg: #16301f; --ok: #94d8ad; --bad-bg: #381913; --bad: #f4a796;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121212; --surface: #1b1b1c; --ink: #ececec; --muted: #a4a7ab; --line: #303235;
  --accent: #f0907a; --accent-ink: #1d0d08;
  --ok-bg: #16301f; --ok: #94d8ad; --bad-bg: #381913; --bad: #f4a796;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 16px/1.55 var(--sans);
}
main { flex: 1; }
img { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a, button, label[for], label.check, summary, select, input[type=checkbox], input[type=file] { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2 { font-weight: 600; }
.display { font-family: var(--serif); font-size: clamp(1.9rem, 6vw, 2.6rem); line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 .5rem; }
.rule-title {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 500; margin: 0 0 4px;
  padding-bottom: 10px; border-bottom: 1px solid var(--ink);
}
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .875rem; margin: 0; }
.empty { color: var(--muted); padding: 24px 0; border-top: 1px solid var(--line); }

.wrap { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1000px; padding-top: 32px; padding-bottom: 64px; }
.wrap.narrow { max-width: 400px; padding-top: 12vh; }
.stack { display: grid; gap: 10px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plain { list-style: none; margin: 0; padding: 0; }

/* ---------- Beranda ---------- */
.home { padding-top: 40px; padding-bottom: 32px; }
.intro { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: end; margin-bottom: 48px; }
.portrait { width: 120px; height: 150px; object-fit: cover; border-radius: 6px; background: #e6e7e9; display: block; }
.intro .display { margin-bottom: 8px; }
.bio { margin: 0; color: var(--muted); max-width: 36ch; }
@media (min-width: 560px) {
  .home { padding-top: 64px; }
  .intro { grid-template-columns: 168px 1fr; gap: 28px; margin-bottom: 64px; }
  .portrait { width: 168px; height: 210px; }
}
.block { margin-bottom: 48px; }

.catalog, .links { list-style: none; margin: 0; padding: 0; }
.catalog a {
  display: grid; grid-template-columns: 2.2rem 1fr auto; gap: 12px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.num { font-family: var(--serif); color: var(--muted); font-variant-numeric: tabular-nums; }
.item-body { display: grid; gap: 2px; min-width: 0; }
.item-title { font-family: var(--serif); font-size: 1.3rem; line-height: 1.25; font-weight: 600; overflow-wrap: anywhere; }
.item-desc { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog a:hover .item-title { text-decoration: underline; }
.catalog a:active { background: var(--surface); }

.links a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 56px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600;
}
.link-host { color: var(--muted); font-weight: 400; font-size: .875rem; overflow-wrap: anywhere; text-align: right; }
.links a:hover .link-title { text-decoration: underline; }
.links a:active { background: var(--surface); }

.price { color: var(--accent); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price.big { font-size: 1.5rem; }

/* ---------- Header & footer halaman dalam ---------- */
.brand { padding-top: 20px; padding-bottom: 20px; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; text-decoration: none; }
.brand-link img { border-radius: 50%; }
.brand-link:hover { text-decoration: underline; }
.site-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--line); margin-top: 24px;
  color: var(--muted); font-size: .85rem;
}
.site-foot p { margin: 0; }

/* ---------- Produk & order ---------- */
.product { padding-top: 8px; padding-bottom: 24px; }
.product .price.big { margin: 0 0 20px; }
.desc { margin: 0 0 28px; max-width: 60ch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.order { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 28px 20px; }
.order > * { margin: 0; }
.qris { width: 256px; height: auto; background: #fff; padding: 10px; border-radius: 8px; border: 1px solid var(--line); }
.total { font-size: 1rem; }
.waiting { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- Form ---------- */
label { font-weight: 600; font-size: .95rem; }
.stack > label { margin-top: 6px; }
.stack > label:first-child { margin-top: 0; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; min-height: 44px; }
input, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; min-height: 44px;
}
input:hover, textarea:hover { border-color: var(--muted); }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
input[type=file] { padding: 9px; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; text-decoration: none; text-align: center;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  border-radius: 8px; padding: 11px 18px; min-height: 48px; margin-top: 6px;
  transition: filter .12s;
}
button:hover, .button:hover { filter: brightness(.9); }
button:active, .button:active { filter: brightness(.8); }
button:disabled { opacity: .6; filter: none; }
button.ghost { background: transparent; color: var(--ink); border-color: var(--line); font-weight: 600; }
button.ghost:hover { border-color: var(--ink); filter: none; }
.small-btn { min-height: 44px; padding: 8px 12px; margin: 0; font-size: .875rem; }
.error { color: var(--bad); background: var(--bad-bg); padding: 10px 12px; border-radius: 8px; margin: 0; }
.status { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: .8rem; font-weight: 700; background: var(--paper); border: 1px solid var(--line); }
.status.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.status.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }

/* ---------- Admin ---------- */
.adminbar {
  display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap;
  padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.adminbar nav { display: flex; gap: 2px; flex-wrap: wrap; order: 3; flex-basis: 100%; }
.adminbar .brand-link { flex: 1; }
@media (min-width: 760px) {
  .adminbar nav { order: 0; flex-basis: auto; flex: 1; }
  .adminbar .brand-link { flex: 0 0 auto; margin-right: 8px; }
}
.adminbar nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 6px; text-decoration: none; color: var(--muted); font-weight: 600; }
.adminbar nav a:hover { color: var(--ink); }
.adminbar nav a[aria-current] { color: var(--ink); background: var(--paper); }
.adminbar-end { display: flex; gap: 8px; }
.login-face { border-radius: 50%; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 8px 0 40px; }
.stats .panel { padding: 14px 18px; }
.stats dt { color: var(--muted); font-size: .875rem; }
.stats dd { margin: 4px 0 0; font-family: var(--serif); font-size: 1.8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.wide h2 { margin-top: 40px; }
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; }
.wide form.panel { margin-top: 12px; max-width: 640px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
