:root {
  --teal: #0f5c4d;
  --teal-d: #0a4136;
  --teal-l: #e4f1ed;
  --teal-xl: #f2f8f6;
  --saffron: #f2a33a;
  --orange: #d9822b;
  --paper: #f5f3ee;
  --card: #ffffff;
  --ink: #1c2826;
  --ink-2: #44514e;
  --muted: #6b7873;
  --line: #e1e5de;
  --line-2: #cfd6cf;
  --ok: #1f7a4d;
  --warn-bg: #fff6e0;
  --warn: #86570a;
  --err-bg: #fdebe8;
  --err: #a1261b;
  --info-bg: #e8f0fa;
  --info: #25507f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 40, 35, .05), 0 4px 14px rgba(20, 40, 35, .04);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--paper); }
a { color: var(--teal); }
a:hover { color: var(--teal-d); }
h1 { font-size: 1.55rem; margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: 1.12rem; margin: 0 0 .9rem; }
h3 { font-size: 1rem; margin: 0 0 .6rem; }
code { font-family: var(--mono); font-size: .88em; background: #eef1ed; padding: .05em .35em; border-radius: 4px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.code { font-family: var(--mono); font-size: .82rem; color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ================= layout ================= */
.wrap { width: 100%; margin: 0; padding: 22px clamp(16px, 2vw, 32px) 96px; }
.wrap.wide { max-width: none; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.topbar { background: var(--teal); color: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.topbar-in { margin: 0; padding: 8px clamp(16px, 2vw, 32px); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand img { display: block; border-radius: 8px; }
.brand-word { font-size: 1.3rem; font-weight: 800; letter-spacing: -.3px; }
.brand-word b { color: #fff; font-weight: 800; }
.brand-word i { color: var(--saffron); font-style: normal; font-weight: 800; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.nav a { color: #d6e8e3; text-decoration: none; padding: 6px 12px; border-radius: 8px; font-size: .93rem; }
.nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav a.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.userbox small { color: #b9d6cf; margin-left: 4px; }

/* ================= komponen umum ================= */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow-x: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: .92rem;
  padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { background: #f1f4f0; color: var(--ink); }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-block { width: 100%; padding: 11px; }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-d); color: #fff; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #17633d; color: #fff; }
.btn-soft { background: var(--teal-l); border-color: var(--teal-l); color: var(--teal-d); }
.btn-soft:hover { background: #d3e8e2; color: var(--teal-d); }
.btn-danger { background: #fff; border-color: #e3b1ac; color: var(--err); }
.btn-danger:hover { background: var(--err-bg); color: var(--err); }
.btn-ghost { background: transparent; border-color: transparent; color: inherit; }
.topbar .btn-ghost { color: #d6e8e3; }
.topbar .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; font: inherit; font-size: 1rem;
  border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: #eef1ed; border-color: var(--line); }
.icon-btn.txt { font-size: .82rem; font-weight: 600; }
.icon-btn[disabled] { opacity: .3; cursor: default; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.b-draft { background: #eceee9; color: #4c5853; }
.b-entered { background: #fff0cf; color: #7a5200; }
.b-verified { background: #d9f0e3; color: #17633d; }
.b-returned { background: #fde1dd; color: #9a2a20; }
.flag { color: var(--err); font-weight: 600; font-size: .78rem; }

.flash { padding: 11px 15px; border-radius: 10px; margin-bottom: 14px; border: 1px solid transparent; }
.flash ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.flash-list { margin: 0 !important; padding-left: 1.1rem !important; }
.flash-ok { background: #e1f3e8; color: #17633d; border-color: #bfe3cd; }
.flash-err { background: var(--err-bg); color: var(--err); border-color: #f2c4bf; }
.flash-warn { background: var(--warn-bg); color: var(--warn); border-color: #f1d9a0; }
.flash-info { background: var(--info-bg); color: var(--info); border-color: #c4d7ef; }
.flash summary { cursor: pointer; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty h1 { font-size: 3rem; color: var(--teal); }

/* ================= tabel & daftar ================= */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbf8; white-space: nowrap; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.inactive td { opacity: .55; }
.tbl input[type=text], .tbl input[type=password], .tbl select { padding: 6px 9px; min-height: 0; }
.tbl .actions { white-space: nowrap; }
.tbl-products td.thumb { width: 56px; }
.tbl-products .thumb img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.noimg { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; background: #f0f2ee; border-radius: 6px; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list a { text-decoration: none; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 8px 0 20px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 14px; }
.filters input[type=search] { flex: 1 1 260px; }

/* ================= dashboard ================= */
.big { font-size: 1.9rem; font-weight: 800; color: var(--teal); }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.progress { display: flex; height: 14px; background: #e8ebe5; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; }
.p-verified { background: var(--ok); }
.p-entered { background: var(--saffron); }
.p-returned { background: #d9574a; }
.p-draft { background: #aab5af; }
.p-none { background: transparent; border: 2px solid var(--line); }
.stats { display: flex; gap: 10px 26px; flex-wrap: wrap; margin-top: 14px; }
.stat { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.stat b { font-size: 1.15rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ================= input dasar ================= */
input[type=text], input[type=search], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 12px; min-height: 40px; }
select { padding-right: 8px; }
input::placeholder, textarea::placeholder { color: #9aa5a0; }
input:hover, select:hover, textarea:hover { border-color: #b4beb7; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: 3px solid rgba(15,92,77,.15); outline-offset: 0; }
textarea { resize: vertical; line-height: 1.45; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset[disabled] { opacity: .88; }
.check { display: inline-flex; align-items: flex-start; gap: 8px; font-weight: 400; font-size: .92rem; cursor: pointer; line-height: 1.35; }
.check input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--teal); flex: none; }
.check.sub { margin-top: 8px; color: var(--ink-2); }
label.field, .field > label:first-child, .field > legend { font-weight: 600; font-size: .86rem; color: var(--ink-2); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .95rem; font-weight: 500; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .sw { width: 40px; height: 22px; border-radius: 999px; background: #c5cdc7; position: relative; flex: none; transition: background .15s; }
.switch .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .sw { background: var(--teal); }
.switch input:checked + .sw::after { transform: translateX(18px); }
.switch input:focus-visible + .sw { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ================= form produk ================= */
.pform-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.ph-meta { display: flex; gap: 6px 14px; align-items: center; flex-wrap: wrap; margin-top: 6px; color: var(--muted); font-size: .86rem; }
.show-all { color: var(--ink-2); font-size: .86rem; }
.pform-grid { display: grid; grid-template-columns: minmax(340px, 38%) 1fr; gap: 20px; align-items: start; }

/* panel foto */
.viewer { position: sticky; top: 64px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); max-height: calc(100vh - 150px); overflow: auto; }
.seg { display: flex; align-items: center; gap: 4px; background: #eef1ec; padding: 4px; border-radius: 11px; width: fit-content; max-width: 100%; margin-bottom: 14px; flex-wrap: wrap; }
.viewer .seg { width: 100%; margin-bottom: 10px; }
.seg-b { font: inherit; font-weight: 600; font-size: .9rem; padding: 7px 16px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.seg-b:hover { background: rgba(255,255,255,.7); }
.seg-b.active { background: #fff; color: var(--teal-d); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.mark { width: 8px; height: 8px; border-radius: 50%; background: transparent; display: inline-block; }
.mark.has { background: var(--ok); }
.zoom-ctl { margin-left: auto; display: flex; gap: 2px; }
.vpane, .tabpane { display: none; }
.vpane.active, .tabpane.active { display: block; }
.vbox { overflow: auto; background: #ecefe9; border-radius: 10px; height: min(64vh, 660px); border: 1px solid var(--line); }
.vbox { overscroll-behavior: contain; }
.vbox img { display: block; width: 100%; height: auto; max-width: none; cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.vbox.zoomed img { cursor: grab; }
.vbox.dragging img { cursor: grabbing; }
.vempty { padding: 90px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.vfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.vmeta { font-size: .82rem; color: var(--muted); }
.vnote { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
.upload input[type=file] { display: none; }
.upload { cursor: pointer; }

/* stepper */
.stepper { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 2px 12px; position: sticky; top: 52px; z-index: 12; background: var(--paper); margin: 0 -2px; scrollbar-width: thin; }
.stp { display: inline-flex; align-items: center; gap: 8px; flex: none; font: inherit; font-size: .9rem; font-weight: 600; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.stp:hover { border-color: var(--line-2); background: #fafbf9; }
.stp.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.stp-n { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; background: #eceee9; color: var(--ink-2); flex: none; }
.stp-n[data-state=done] { background: var(--ok); color: #fff; font-size: 0; }
.stp-n[data-state=done]::before { content: "✓"; font-size: .85rem; }
.stp-n[data-state=todo] { background: #fff1d6; color: #8a5a00; box-shadow: inset 0 0 0 1.5px var(--saffron); }
.stp.active .stp-n { background: rgba(255,255,255,.22); color: #fff; box-shadow: none; }
.stp.active .stp-n[data-state=done] { background: #fff; color: var(--ok); }

.step { display: none; margin-bottom: 12px; }
.step.active { display: block; }
#steps.all .step { display: block; }
#steps.all .step-nav { display: none; }
.step-head { margin-bottom: 18px; }
.step-head h2 { margin: 0; font-size: 1.2rem; }
.step-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.step-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 18px; }

/* grid field: 6 kolom supaya rapi dan sejajar */
.fgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 20px; align-items: start; }
.fgrid.tight { gap: 12px 14px; margin-top: 14px; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s6 { grid-column: span 6; }
.field > label:first-child { display: block; margin-bottom: 6px; }
.field > legend { padding: 0; margin-bottom: 4px; }
.req { color: var(--err); font-weight: 700; }
.hint { display: block; font-size: .8rem; color: var(--muted); margin-top: 5px; line-height: 1.35; }
.hint.bad { color: var(--err); }
.hint.good { color: var(--ok); }
.check-cell { align-self: end; padding-bottom: 10px; }
.amount { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.amount select { min-width: 84px; }

.block { margin-bottom: 22px; }
.block:last-child { margin-bottom: 0; }
.block-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.block-head .btn { margin-left: auto; }
.block .num { width: 24px; height: 24px; border-radius: 50%; background: var(--teal-l); color: var(--teal-d); font-size: .8rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* editor bahan */
.ing-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.ing-row { display: grid; grid-template-columns: minmax(0, 1fr) 74px 98px 104px; gap: 8px; align-items: center; }
.ing-row.child { margin-left: 30px; position: relative; }
.ing-row.child::before { content: ""; position: absolute; left: -17px; top: -8px; bottom: 50%; width: 12px; border-left: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2); border-bottom-left-radius: 6px; }
.ing-row input { min-height: 36px; padding: 6px 10px; }
.ing-row.child input.ing-name { background: var(--teal-xl); }
.ing-acts { display: inline-flex; gap: 2px; }
.ing-empty { padding: 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 10px; font-size: .9rem; }
.ing-head { display: grid; grid-template-columns: minmax(0, 1fr) 74px 98px 104px; gap: 8px; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 2px 4px; }

/* gizi */
.basis-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-size: .92rem; color: var(--ink-2); }
.basis-row input { width: 90px; }
.basis-row select { width: 76px; }
table.nut { width: 100%; border-collapse: collapse; margin-bottom: 6px; table-layout: fixed; }
table.nut thead th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 0 8px 6px; }
table.nut th:nth-child(1) { width: 36%; } table.nut th:nth-child(2) { width: 34%; } table.nut th:nth-child(3) { width: 15%; } table.nut th:nth-child(4) { width: 15%; }
table.nut tbody th { text-align: left; font-weight: 600; font-size: .92rem; padding: 6px 8px; vertical-align: middle; }
table.nut tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: .76rem; }
table.nut tbody td { padding: 5px 8px; }
table.nut tbody tr { border-top: 1px solid var(--line); }
table.nut input, table.nut select { min-height: 36px; padding: 5px 9px; }
table.nut .amount { grid-template-columns: minmax(0, 1fr) 118px; }
details.more { margin-top: 14px; }
details.more > summary { cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--teal); padding: 6px 0; }
details.more[open] > summary { margin-bottom: 8px; }

/* alergen */
.allergen-box { background: var(--teal-xl); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 10px; }
.allergen-box > legend { font-size: .95rem; color: var(--ink); padding: 0 6px; margin-left: -6px; }
.allergen-box .hint { margin: 0 0 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span { display: inline-block; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: .88rem; color: var(--ink-2); }
.pill:hover span { border-color: var(--teal); }
.pill input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.pill input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

/* halal & bpom */
.reg-card { background: var(--teal-xl); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 18px; }
.reg-card h3 { margin-bottom: 12px; }

/* baris dinamis */
.rowgrid { display: grid; gap: 8px; align-items: center; margin-bottom: 8px; }
.rg-reg { grid-template-columns: 160px minmax(0, 1fr) auto; }
.rg-org { grid-template-columns: 130px minmax(0, 1.7fr) 150px minmax(0, 1fr) auto; }
.rg-contact { grid-template-columns: 160px minmax(0, 1fr) auto auto; }

.review-box { border-color: var(--saffron); background: #fffdf8; }

.actionbar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-top: 1px solid var(--line); z-index: 25; }
.actionbar-in { margin: 0; padding: 10px clamp(16px, 2vw, 32px); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ================= login ================= */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; background:
  radial-gradient(circle at 15% 10%, rgba(242,163,58,.22), transparent 40%), radial-gradient(circle at 90% 90%, rgba(15,92,77,.18), transparent 45%), var(--paper); }
.login-card { width: 100%; max-width: 380px; background: #fff; padding: 28px; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(20,40,35,.1); }
.login-card .field, .login-card label.field { display: block; margin-bottom: 12px; font-weight: 600; font-size: .86rem; }
.login-card label.field input { margin-top: 5px; }
.login-logo { display: block; margin: 0 auto 8px; max-width: 100%; height: auto; }
.login-sub { text-align: center; color: var(--muted); font-size: .88rem; margin: 0 0 18px; }
.login-foot { text-align: center; color: var(--muted); font-size: .82rem; margin: 14px 0 0; }
label.field { display: block; }
label.field > input, label.field > select, label.field > textarea { margin-top: 5px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 18px; align-items: end; margin-bottom: 10px; }

@media (max-width: 1000px) {
  .pform-grid { grid-template-columns: 1fr; }
  .viewer { position: static; max-height: none; }
  .vbox { height: 50vh; }
  .grid-2 { grid-template-columns: 1fr; }
  .stepper { top: 100px; }
}
@media (max-width: 720px) {
  .s2, .s3, .s4 { grid-column: span 6; }
  .rg-reg, .rg-org, .rg-contact { grid-template-columns: 1fr auto; }
  .rg-reg > :first-child, .rg-org > :first-child, .rg-contact > :first-child { grid-column: 1 / -1; }
  .ing-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ing-row .ing-pct, .ing-row .ing-ins { display: none; }
  .ing-head { display: none; }
  table.nut .amount { grid-template-columns: minmax(0, 1fr); }
  table.nut th:nth-child(1) { width: 34%; }
}
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .topbar-in { gap: 8px; }
  .userbox span { display: none; }
  .wrap { padding: 14px 12px 104px; }
  .card { padding: 16px; }
}

/* ================= admin: kategori & pengguna ================= */
.page-sub { margin: 6px 0 0; max-width: 880px; font-size: .92rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-end; }
.inline-form .field { flex: 1 1 200px; margin: 0; }
.inline-form .field:last-child { flex: 0 0 auto; }
.inline-form .field > label { display: block; font-weight: 600; font-size: .86rem; color: var(--ink-2); margin-bottom: 6px; }

.tag { display: inline-block; flex: none; min-width: 50px; text-align: center; padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.tag-main { background: var(--teal); color: #fff; }
.tag-sub { background: #e9efe9; color: var(--ink-2); }
.cat-name { display: flex; align-items: center; gap: 10px; }
.cat-child .cat-name { padding-left: 34px; position: relative; }
.cat-child .cat-name::before { content: ""; position: absolute; left: 12px; top: -22px; height: 40px; width: 14px; border-left: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2); border-bottom-left-radius: 8px; }
.cat-parent td { background: #f9fbf8; }
.cat-parent .cat-name input { font-weight: 700; }
.cat-tbl td { padding-top: 7px; padding-bottom: 7px; }
.cat-tbl td form { display: none; }
.user-tbl td form { display: none; }
.user-tbl td input[type=text] { min-width: 150px; }
.pw-pop { display: inline-block; position: relative; vertical-align: middle; }
.pw-pop > summary { list-style: none; cursor: pointer; }
.pw-pop > summary::-webkit-details-marker { display: none; }
.pw-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: flex; gap: 6px; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; box-shadow: 0 8px 24px rgba(20,40,35,.16); width: 330px; }
.btn[disabled] { pointer-events: auto; }

/* ================= booth ================= */
.booth-count { text-align: right; line-height: 1.1; }
.booth-count b { display: block; font-size: 2rem; color: var(--teal); }
.booth-count span { font-size: .82rem; color: var(--muted); }
.booth-grid { display: grid; grid-template-columns: minmax(380px, 1.1fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.booth-card .field > label:first-child { font-size: .95rem; }
.barcode-input { font-family: var(--mono); font-size: 1.5rem; letter-spacing: .06em; min-height: 56px; padding: 10px 16px; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.slot { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 280px;
  border: 2px dashed var(--line-2); border-radius: 14px; background: var(--teal-xl); cursor: pointer; overflow: hidden; text-align: center; padding: 10px; }
.slot:hover, .slot.drag { border-color: var(--teal); background: var(--teal-l); }
.slot input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.slot img { max-width: 100%; max-height: 250px; object-fit: contain; border-radius: 8px; }
.slot-empty { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: .9rem; }
.slot-empty b { font-size: 1.05rem; color: var(--ink); }
.slot.filled { border-style: solid; border-color: var(--ok); background: #f4fbf7; }
.slot.filled .slot-empty { display: none; }
.slot-name { color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booth-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.btn-lg { padding: 14px 24px; font-size: 1.02rem; border-radius: 11px; }
.rlist { list-style: none; margin: 0; padding: 0; }
.rlist li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rlist li:last-child { border-bottom: 0; }
.rthumbs { display: flex; gap: 4px; }
.rthumbs img, .rthumbs .noimg { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.noimg.sm { width: 46px; height: 46px; }
.rinfo { min-width: 0; }
.rinfo a { text-decoration: none; }
.rinfo b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1000px) { .booth-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .slots { grid-template-columns: 1fr; } .slot { min-height: 200px; } }

.filters select { width: auto; min-width: 190px; flex: 0 0 auto; }
.filters input[type=search] { width: auto; }

/* ================= menu akun (avatar) ================= */
.user-menu { position: relative; margin-left: auto; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: var(--saffron); color: var(--teal-d);
  font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.avatar:hover, .user-menu:focus-within .avatar { border-color: #fff; }
.user-pop { display: none; position: absolute; right: 0; top: 100%; padding-top: 10px; z-index: 60; }
.user-menu:hover .user-pop, .user-menu:focus-within .user-pop { display: block; }
.up-card { width: 270px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(20,40,35,.22); overflow: hidden; }
.up-head { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--teal-xl); border-bottom: 1px solid var(--line); }
.avatar-lg { width: 46px; height: 46px; font-size: 1.3rem; flex: none; cursor: default; border-color: #fff; box-shadow: 0 0 0 1px var(--line); }
.up-id { min-width: 0; }
.up-name { font-weight: 700; font-size: 1rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-user { color: var(--muted); font-size: .82rem; margin-bottom: 5px; }
.up-role { display: inline-block; background: var(--teal); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .02em; padding: 2px 9px; border-radius: 999px; }
.up-items { padding: 6px; }
.up-items form { margin: 0; }
.up-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; font-size: .93rem; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.up-item svg { width: 19px; height: 19px; fill: currentColor; opacity: .7; flex: none; }
.up-item:hover, .up-item:focus-visible { background: #eef3f0; color: var(--ink); outline: none; }
.up-danger { color: var(--err); }
.up-danger:hover, .up-danger:focus-visible { background: var(--err-bg); color: var(--err); }

/* foto: status pemrosesan di browser */
.vmeta.bad { color: var(--err); font-weight: 600; }
.slot.busy { opacity: .7; }
.slot.bad { border-color: #e3b1ac; background: var(--err-bg); }
.slot.bad .slot-name { color: var(--err); font-weight: 600; white-space: normal; }
