:root {
  --bg: #F5F3EE;
  --card: #ECE8E1;
  --surface: #FFFFFF;
  --ink: #2A1B14;
  --muted: #6E6259;
  --line: #E5DFD6;
  --field: #DDD6CC;
  --soft: #F5EFE4;
  --ok: #1F4D2A;
  --okbg: #DCEAD8;
  --warn: #6B4A1F;
  --warnbg: #F3E4C8;
  --err: #8A1F1F;
  --errbg: #FDECEC;
  --font: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'SF Pro Text', Arial, system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
a:hover { color: #7A4A30; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #7A4A30; outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { max-width: 1360px; margin: 0 auto; padding: 16px max(24px, env(safe-area-inset-right, 0px)) 72px max(24px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 28px; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.right { text-align: right; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tombol */
.btn { height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; gap: 8px; }
.btn:hover { color: #fff; opacity: .9; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--card); }
.btn.sm { height: 36px; padding: 0 14px; }
.btn.block { width: 100%; }
.btn:disabled { background: #E2DCD3; border-color: #E2DCD3; color: #8C8178; cursor: not-allowed; opacity: 1; }
.link-btn { border: 0; background: none; padding: 4px 0; color: var(--muted); font-size: 12px; text-decoration: underline; cursor: pointer; }

/* Pill */
.pill { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.dark { background: var(--ink); color: #fff; }
.pill.light { background: var(--card); color: var(--ink); }
.pill.white { background: #fff; color: var(--ink); }
.pill.draft { background: var(--card); color: var(--ink); }
.pill.paid { background: var(--okbg); color: var(--ok); }
.pill.processing { background: var(--warnbg); color: var(--warn); }
.pill.shipped { background: var(--ink); color: #fff; }

/* Tab */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid #CFC6BA; background: transparent; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Form */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.input { height: 46px; border: 1px solid var(--field); border-radius: 10px; padding: 0 14px; background: #fff; width: 100%; min-width: 0; }
textarea.input { height: auto; padding: 10px 14px; resize: vertical; }
select.input { padding: 0 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--ink); }

.card { background: var(--surface); border-radius: 16px; padding: 22px; }
.note { border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.note.ok { background: var(--okbg); color: var(--ok); }
.note.err { background: var(--errbg); color: var(--err); }
.note.warn { background: var(--soft); color: #6B4A2B; }
.row { display: flex; justify-content: space-between; gap: 12px; }
.divider { border-top: 1px solid var(--line); padding-top: 12px; }

/* Tabel */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 16px; white-space: nowrap; }
td { padding: 14px 16px; border-top: 1px solid #F1EDE6; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
th.center, td.center { text-align: center; }
th.right, td.right { text-align: right; }

/* Bukti transfer lewat WhatsApp (pengganti upload foto) */
.wa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #1F8F4E; border-color: #1F8F4E; color: #fff; }
.wa-btn:hover { background: #197842; border-color: #197842; }
.must { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #B5543A; color: #fff; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px; }
