/* Cetak Polaroid: satu stylesheet, mobile-first, tanpa framework. */
:root {
  --bg: #faf7f2;
  --surface: #fff;
  --ink: #26221e;
  --muted: #6f665c;
  --line: #ddd5c8;
  --accent: #6b4f2e;
  --accent-ink: #fff;
  --danger: #9b2c2c;
  --ok: #2f6b3a;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap { max-width: 640px; margin-inline: auto; padding-inline: 1rem; }

.topbar { background: var(--surface); border-block-end: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.topbar nav { display: flex; gap: 1rem; align-items: center; }
.topbar a { color: var(--accent); }

h1 { font-size: 1.5rem; line-height: 1.25; margin-block: 1.25rem 0.5rem; }
h2 { font-size: 1.15rem; margin-block: 1.5rem 0.5rem; }
.lede { color: var(--muted); margin-block-start: 0; }

.visually-hidden {
  position: absolute; clip-path: inset(50%); overflow: hidden;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; white-space: nowrap;
}

.banner {
  background: #fdf0e3; border: 1px solid #e8c9a0; border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
.status { color: var(--muted); min-height: 1.5em; }
.status.error { color: var(--danger); }
.hint { color: var(--muted); font-size: 0.9rem; }
.honeypot { display: none; }

.help { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0.5rem 1rem; margin-block-end: 1rem; }
.help summary { cursor: pointer; font-weight: 600; min-height: 48px; display: flex; align-items: center; }
.help ol { margin-block: 0.5rem; padding-inline-start: 1.25rem; }

fieldset {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1rem; margin: 0 0 1rem;
}
legend { font-weight: 700; padding-inline: 0.4rem; }

.field { display: flex; flex-direction: column; gap: 0.25rem; margin-block-end: 1rem; }
.field label, .group-label { font-weight: 600; }
.field .hint { margin: 0; }

input[type="text"], input[type="tel"], input[type="password"], input[type="search"], select, textarea {
  font: inherit; font-size: max(1rem, 1em);
  padding: 0.75rem; min-height: 48px;
  border: 1px solid #767676; border-radius: 8px; background: var(--surface); color: var(--ink);
  width: 100%;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #0b57d0; outline-offset: 2px;
}
input:user-invalid { border-color: var(--danger); }

.choice {
  display: flex; align-items: center; gap: 0.6rem;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 0.6rem 0.75rem; margin-block-end: 0.5rem; cursor: pointer; min-height: 48px;
}
.choice:has(input:checked) { border-color: var(--accent); background: #f7efe4; }
.choice input { accent-color: var(--accent); width: 1.25rem; height: 1.25rem; flex: none; }
.choice-label { flex: 1; }
.choice-price { color: var(--muted); white-space: nowrap; }
.swatch { width: 1.5rem; height: 1.5rem; border: 2px solid; border-radius: 50%; flex: none; }

.btn {
  font: inherit; font-size: max(1rem, 1em); font-weight: 600;
  min-height: 48px; padding: 0.7rem 1.25rem; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--accent); display: inline-block; text-decoration: none; text-align: center;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); width: 100%; }
.btn.secondary { background: var(--surface); color: var(--accent); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.linklike { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

.filepick {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.7rem 1.25rem; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
}

.photo-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.photo-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem; background: var(--surface); }
.photo-card img { width: 100%; height: auto; border-radius: 6px; display: block; background: #eee; }
.photo-card .row { display: flex; gap: 0.5rem; align-items: center; margin-block-start: 0.5rem; }
.photo-card input[type="text"] { flex: 1; min-height: 48px; }
.qty { display: flex; align-items: center; gap: 0.25rem; }
.qty button { width: 48px; height: 48px; font-size: 1.25rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.qty output { min-width: 2.5rem; text-align: center; font-weight: 700; }
.remove-btn { border: 0; background: none; color: var(--danger); font: inherit; cursor: pointer; padding: 0.5rem; min-height: 48px; }

.sheet-preview img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; margin-block-end: 0.75rem; background: #fff; }
.qris-box img { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.total { font-size: 1.15rem; }
.inline-form { display: inline; }

.receipt { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1rem; }
.receipt .code { font-size: 1.6rem; font-weight: 700; letter-spacing: 0.04em; margin: 0 0 0.75rem; }
.receipt dl, .detail { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; margin: 0; }
.receipt dt, .detail dt { color: var(--muted); }
.receipt dd, .detail dd { margin: 0; }

.searchbar { display: grid; gap: 0.5rem; margin-block-end: 1rem; }
.searchbar label { font-weight: 600; }
@media (min-width: 560px) {
  .searchbar { grid-template-columns: 1fr auto auto; align-items: end; }
  .searchbar label { grid-row: 1; }
}

.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.order-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0.75rem 1rem; display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; }
.order-code { font-weight: 700; color: var(--accent); font-size: 1.05rem; }
.order-meta { color: var(--muted); font-size: 0.9rem; width: 100%; }
.badge { font-size: 0.8rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.badge.st-baru { background: #fdf0e3; }
.badge.st-dikonfirmasi { background: #e3edfd; }
.badge.st-dicetak { background: #e9e3fd; }
.badge.st-siap { background: #e3f5e6; }
.badge.st-selesai { background: #e6e6e6; }
.badge.st-dibatalkan { background: #fbe3e3; }
.badge.paid { background: #e3f5e6; }
.badge.unpaid { background: #fdf0e3; }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-end: 1rem; }
.actions .btn { width: auto; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-block: 1.5rem; }
.footer { color: var(--muted); font-size: 0.9rem; border-block-start: 1px solid var(--line); margin-block-start: 2rem; padding-block: 1rem; }
