/* KHN Gudang Bahan — gaya mengikuti KHN Ruang Produksi */
:root {
  --g900: #0b4527; --g800: #0f5a32; --g700: #137a3f; --g600: #1b8f4b; --g500: #3aa64a;
  --g100: #e3f4e8; --g50: #f1faf3;
  --gold: #e8b923; --gold2: #f4cf4a; --amber: #b7791f; --amber-bg: #fdf3d8;
  --red: #c23a2b; --red-bg: #fde7e4;
  --ink: #15201a; --ink2: #3c4a42; --muted: #75837b; --line: #e6ebe8; --bg: #eef1f4; --card: #fff;
  --radius: 16px; --shadow: 0 1px 2px rgba(16, 40, 26, .05), 0 4px 16px rgba(16, 40, 26, .05);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); background: var(--bg); color: var(--ink); }
body.in { padding-bottom: 84px; }
@media (min-width: 900px) { body.in { padding-bottom: 32px; } }
a { color: var(--g700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; font-weight: 700; }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
p { margin: 0 0 .6rem; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.neg { color: var(--red); }
.pos { color: var(--g600); }
.ic { width: 20px; height: 20px; flex: none; }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline; } }

/* ---------- header ---------- */
.hero { background: linear-gradient(100deg, var(--g900) 0%, var(--g700) 38%, #2f9a45 66%, #8cbf3a 84%, var(--gold) 100%);
  color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-radius: 0 0 20px 20px; box-shadow: 0 6px 20px rgba(11, 69, 39, .25); }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 42px; height: 42px; flex: none; border-radius: 11px; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.brand .logo svg { width: 100%; height: 100%; display: block; }
.brand b { font-weight: 800; font-size: 1.08rem; }
.brand i { font-style: normal; opacity: .7; margin: 0 2px; }
.brand small { display: block; font-size: .72rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-right { display: flex; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; background: rgba(8, 50, 28, .45);
  color: #fff; font-weight: 700; font-size: .82rem; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.18); }
.chip:hover { text-decoration: none; background: rgba(8, 50, 28, .6); }
.chip .ic { width: 16px; height: 16px; }
.chip em { font-style: normal; font-weight: 500; opacity: .8; display: none; }
@media (min-width: 640px) { .chip em { display: inline; } .chip em::before { content: '· '; } }
@media (max-width: 520px) { .chip:first-child span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .brand small { display: none; } }

/* ---------- navigation ---------- */
.pillnav { max-width: 1080px; margin: 14px auto 0; padding: 0 14px; display: none; }
.pills { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.pills a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 99px; background: var(--g100); color: var(--g800); font-weight: 700; font-size: .86rem; }
.pills a .ic { width: 16px; height: 16px; }
.pills a:hover { text-decoration: none; background: #d4ecdb; }
.pills a.on { background: var(--g700); color: #fff; }
@media (min-width: 900px) { .pillnav { display: block; } }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--muted); padding: 4px 0; }
.tabbar a:hover { text-decoration: none; }
.tabbar a .ic { width: 23px; height: 23px; }
.tabbar a.on { color: var(--g700); }
.tabbar a.fab .ic { width: 50px; height: 50px; padding: 13px; margin-top: -24px; border-radius: 50%; color: #fff;
  background: linear-gradient(135deg, var(--g700), var(--g500)); box-shadow: 0 6px 16px rgba(19, 122, 63, .4); border: 4px solid #fff; box-sizing: border-box; }
.tabbar a.fab { color: var(--g700); }
@media (min-width: 900px) { .tabbar { display: none; } }

/* ---------- layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 16px 14px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.pagehead .sub { color: var(--muted); margin: 4px 0 0; font-size: .9rem; }
.backlink { display: inline-flex; align-items: center; gap: 2px; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.backlink .ic { width: 16px; height: 16px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 620px; }
.card.soft { background: var(--g50); box-shadow: none; border: 1px dashed #b9dcc4; }
.card.warn { background: #fffaf0; border: 1px solid #f3dfa5; box-shadow: none; }
.card .cardhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.card .cardhead h2 { margin: 0; }
.grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.side { grid-template-columns: 1.2fr 1fr; } }

/* ---------- welcome & app cards ---------- */
.hello { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hello b { font-weight: 800; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--g100); color: var(--g800); font-size: .75rem; font-weight: 700; }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.gray { background: #edf0ee; color: var(--ink2); }
.apps { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
@media (min-width: 760px) { .apps { grid-template-columns: repeat(3, 1fr); } }
.app { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; gap: 12px; align-items: flex-start; color: var(--ink); transition: transform .12s, box-shadow .12s; }
.app:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16, 40, 26, .1); }
.app .tile { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--g100); color: var(--g700); }
.app .tile .ic { width: 22px; height: 22px; }
.app.gold .tile { background: var(--amber-bg); color: var(--amber); }
.app small { display: block; color: var(--g700); font-weight: 800; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.app.gold small { color: var(--amber); }
.app b { display: block; font-weight: 800; font-size: .98rem; line-height: 1.25; }
.app span.d { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
@media (max-width: 520px) { .app { flex-direction: column; gap: 8px; } .app span.d { display: none; } }

.stats { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; border-left: 4px solid var(--g700); color: var(--ink); display: block; }
.stat:hover { text-decoration: none; }
.stat b { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .82rem; }
.stat.red { border-color: var(--red); } .stat.red b { color: var(--red); }
.stat.amber { border-color: var(--gold); } .stat.amber b { color: var(--amber); }
.stat.money b { font-size: 1.25rem; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: 12px; border: 1px solid #d5ddd8;
  background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; min-height: 44px; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--g600); }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: linear-gradient(135deg, var(--g700), var(--g600)); border-color: transparent; color: #fff; box-shadow: 0 3px 10px rgba(19, 122, 63, .25); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #3b2c00; }
.btn.danger { color: var(--red); border-color: #efc2bb; }
.btn.small { min-height: 34px; padding: 5px 11px; font-size: .82rem; border-radius: 10px; }
.btn.big { min-height: 56px; font-size: 1.02rem; border-radius: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }

label { display: block; margin: 0 0 14px; font-weight: 700; font-size: .86rem; color: var(--ink2); }
label small { display: block; font-weight: 500; color: var(--muted); margin-top: 4px; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 13px; font: inherit; font-size: 16px; color: var(--ink);
  border: 1.5px solid #dbe2de; border-radius: 12px; background: #fff; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--g600); box-shadow: 0 0 0 4px rgba(27, 143, 75, .12); }
input[readonly] { background: #f3f5f4; color: var(--muted); }
input.lg { font-size: 1.4rem; font-weight: 800; padding: 12px 14px; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
label.check input, .radio input, .pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--g700); flex: none; }
.radio { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.radio label { display: flex; gap: 10px; align-items: center; margin: 0; font-weight: 600; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; }
fieldset { border: 1.5px solid var(--line); border-radius: 14px; margin: 0 0 14px; padding: 12px 14px 0; }
legend { font-weight: 800; padding: 0 6px; font-size: .9rem; }
.f2, .f3 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .f2 { grid-template-columns: 1fr 1fr; } .f3 { grid-template-columns: 1fr 1fr 1fr; } }
.inputrow { display: flex; gap: 8px; align-items: center; }
.inputrow input { margin: 0; }
.suffix { font-weight: 700; color: var(--muted); white-space: nowrap; }

.searchbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.searchbar .field { position: relative; flex: 1 1 220px; }
.searchbar .field .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbar .field input { padding-left: 40px; margin: 0; }
.searchbar select { flex: 1 1 150px; width: auto; margin: 0; }
.searchbar .btn { flex: none; }

/* ---------- list rows (mobile-friendly) ---------- */
.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.li:last-child { border-bottom: 0; }
a.li:hover { text-decoration: none; background: var(--g50); }
.li .main { flex: 1; min-width: 0; }
.li .t { font-weight: 700; line-height: 1.3; }
.li .m { color: var(--muted); font-size: .8rem; margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.li .r { text-align: right; flex: none; }
.li .r b { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.li .r small { display: block; color: var(--muted); }
.li .chev { color: #b5c0ba; width: 18px; height: 18px; }
.li.low { box-shadow: inset 4px 0 0 var(--red); }
.li.dim { opacity: .55; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--g500); display: inline-block; }
.dot.red { background: var(--red); } .dot.amber { background: var(--gold); } .dot.gray { background: #c2cbc6; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f6f8f7; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; white-space: nowrap; }
tr.sub td { background: var(--g50); font-weight: 700; }
tr.total td { background: var(--g100); font-weight: 800; }
tr.dim td { opacity: .55; }
table.kv th { width: 42%; text-transform: none; letter-spacing: 0; font-size: .85rem; background: none; color: var(--muted); font-weight: 600; white-space: normal; }
table.kv td { font-weight: 600; }

/* ---------- misc ---------- */
.flash { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 14px; margin-bottom: 14px; font-weight: 600; }
.flash.ok { background: #dcf3e4; color: #135c34; }
.flash.err { background: var(--red-bg); color: #8e2318; }
.flash.warn { background: var(--amber-bg); color: #7a5410; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; color: #b5c9bc; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 2px; }
.tabs a { padding: 8px 14px; border-radius: 99px; background: #fff; box-shadow: var(--shadow); color: var(--ink2); white-space: nowrap; font-size: .86rem; font-weight: 700; }
.tabs a:hover { text-decoration: none; }
.tabs a.on { background: var(--g700); color: #fff; }
.progress { height: 10px; background: var(--g100); border-radius: 99px; overflow: hidden; margin: 6px 0 10px; }
.progress div { height: 100%; background: linear-gradient(90deg, var(--g700), var(--g500)); border-radius: 99px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 8px 0 8px 40px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--g100); color: var(--g800); font-weight: 800; font-size: .85rem; }
.steps li.done::before { content: '✓'; background: var(--g700); color: #fff; }
.flow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .8rem; font-weight: 700; color: var(--g800); }
.flow span { background: var(--g100); padding: 5px 11px; border-radius: 99px; }
.flow i { font-style: normal; color: var(--muted); }

.qrbig { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.qrbig svg { width: 112px; height: 112px; flex: none; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; }
.kode { font-weight: 800; font-size: 1.15rem; letter-spacing: .03em; color: var(--g700); }
.stokbig { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.stokbig small { font-size: .85rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }

.bahanhead { display: flex; gap: 14px; align-items: center; }
.bahanhead .tile { width: 52px; height: 52px; border-radius: 14px; background: var(--g100); color: var(--g700); display: grid; place-items: center; flex: none; }
.bahanhead .tile .ic { width: 26px; height: 26px; }
.bahanhead h2 { margin: 2px 0 2px; font-size: 1.15rem; }
.total { font-size: 1.05rem; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--g50); }
.total b { font-size: 1.3rem; }
.rollnew { text-align: center; background: linear-gradient(135deg, #fffaf0, #fff3cc); border: 1.5px solid var(--gold2); box-shadow: none; }
.rollno { font-size: 2.4rem; font-weight: 800; letter-spacing: .05em; color: var(--g800); margin-top: 2px; }
.rollrow { display: flex; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rollrow:last-child { border-bottom: 0; }
.rollrow b { min-width: 98px; }
.rollrow input { max-width: 110px; margin: 0; }

.scanbox #reader { width: 100%; max-width: 460px; margin: 0 auto 10px; border-radius: 16px; overflow: hidden; background: #0d1a13; min-height: 260px; }
.scanbox #reader video { border-radius: 16px; }
.scanbox form { max-width: 460px; margin: 10px auto 0; display: flex; gap: 8px; }
.scanbox form input { margin: 0; }
.scanhint { text-align: center; color: var(--muted); font-size: .9rem; }

.picklist { margin-top: 12px; max-height: 60vh; overflow-y: auto; border-top: 1px solid var(--line); }
.pick { display: flex; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); margin: 0; font-weight: 500; }
details { margin: 10px 0; }
summary { cursor: pointer; font-weight: 700; color: var(--g700); }
.login { max-width: 400px; margin: 36px auto; text-align: center; }
.login .logo { width: 64px; height: 64px; margin: 0 auto 10px; }
.login form { text-align: left; }
body.out .hero { justify-content: center; }
.moneybig { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* perbaikan responsif */
.grid > *, .wrap > * { min-width: 0; }
table.kv td { word-break: break-word; }
.brand > span:last-child { white-space: nowrap; }
@media (max-width: 520px) {
  .hero { padding: 12px 14px; }
  .brand .logo { width: 38px; height: 38px; }
  .brand b { font-size: 1rem; }
  .brand .k, .brand i { display: none; }
  .flow { display: none; }
  .hello + .flow { display: none; }
  h1 { font-size: 1.25rem; }
  .wrap { padding: 14px 12px; }
}
@media (max-width: 520px) { .stat b { font-size: 1.35rem; } .stat.money b { font-size: 1.02rem; } }

/* ---------- datasheet ---------- */
body.wide .wrap { max-width: none; }
body.wide .pillnav { max-width: none; }
.ds-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; max-height: calc(100vh - 260px); min-height: 300px; }
table.ds { border-collapse: separate; border-spacing: 0; font-size: .85rem; width: max-content; min-width: 100%; }
table.ds th { position: sticky; top: 0; z-index: 3; background: #f3f6f4; border-bottom: 2px solid #d9e2dc; border-right: 1px solid var(--line); padding: 8px 8px; font-size: .68rem; }
table.ds td { padding: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: middle; background: #fff; }
table.ds .sticky1 { position: sticky; left: 0; z-index: 2; background: #fafcfb; box-shadow: 1px 0 0 #d9e2dc; }
table.ds th.sticky1 { z-index: 4; background: #f3f6f4; }
table.ds td.ds-k { padding: 6px 8px; font-weight: 700; color: var(--g800); font-size: .8rem; white-space: nowrap; }
table.ds td.ds-s { padding: 6px 8px; color: var(--muted); white-space: nowrap; font-size: .8rem; }
table.ds td input:not([type=checkbox]) { margin: 0; border: 0; border-radius: 0; padding: 7px 8px; font-size: .86rem; background: transparent; width: 100%; min-width: 0; box-shadow: none; }
table.ds td.n input { text-align: right; font-variant-numeric: tabular-nums; }
table.ds td input:focus { outline: 2px solid var(--g600); outline-offset: -2px; background: #fff; box-shadow: none; }
table.ds td.b { text-align: center; }
table.ds td.b input { width: 18px; height: 18px; margin: 0 auto; display: block; accent-color: var(--g700); }
table.ds td.chg, table.ds td.chg input { background: #fff6cf; }
table.ds tr.dirty td.ds-k { box-shadow: inset 4px 0 0 var(--gold), 1px 0 0 #d9e2dc; }
table.ds tr.err td { background: #fff1ef; }
table.ds tr.err td.ds-k { box-shadow: inset 4px 0 0 var(--red), 1px 0 0 #d9e2dc; }
table.ds tbody tr:hover td { background: #f6fbf7; }
table.ds tbody tr:hover td.chg, table.ds tbody tr:hover td.chg input { background: #fff0b8; }
.ds-err { color: var(--red); font-size: .72rem; font-weight: 600; white-space: normal; max-width: 160px; }
@media (max-width: 520px) { .ds-wrap { max-height: calc(100vh - 300px); } }
table.ds .sticky1 { width: 92px; min-width: 92px; max-width: 92px; box-shadow: none; }
table.ds .sticky2 { position: sticky; left: 92px; z-index: 2; background: #fff; box-shadow: 2px 0 0 #d9e2dc; }
table.ds th.sticky2 { z-index: 4; background: #f3f6f4; }
table.ds td.sticky2 input { font-weight: 600; }
table.ds td.ds-k { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { table.ds .sticky2 { position: static; box-shadow: none; } }

/* ---------- foto ---------- */
.thumb { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--g100); color: var(--g700); display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ic { width: 22px; height: 22px; }
.fototile { width: 76px; height: 76px; flex: none; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: var(--g100); color: var(--g700); }
.fototile img { width: 100%; height: 100%; object-fit: cover; }
.fototile.add { border: 2px dashed #a9d2b6; cursor: pointer; margin: 0; align-content: center; gap: 2px; font-weight: 700; }
.fototile.add small { font-size: .7rem; }
.fototile.add .ic { width: 24px; height: 24px; }
.fotobox { margin: -16px -16px 14px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: #f3f6f4; position: relative; }
.fotobox > a img { width: 100%; max-height: 340px; object-fit: contain; display: block; background: #fff; }
.fotoempty { height: 150px; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .85rem; }
.fotoempty .ic { width: 34px; height: 34px; color: #a9c7b3; }
.fotoact { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.fotoact .btn { background: rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(0,0,0,.12); cursor: pointer; margin: 0; }
.fotoact form { margin: 0; }
[data-foto-box].loading { opacity: .5; pointer-events: none; }
[data-foto-box].loading::after { content: 'Mengunggah…'; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--g800); }
.fototile.add.loading { position: relative; }
.ds-ph { width: 26px; height: 26px; border-radius: 7px; border: 1px dashed #a9d2b6; background: var(--g50); padding: 0; margin-right: 6px; vertical-align: middle; cursor: pointer; overflow: hidden; font-size: 9px; color: var(--g700); }
.ds-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
table.ds .sticky1 { width: 118px; min-width: 118px; max-width: 118px; }
table.ds .sticky2 { left: 118px; }
@media (max-width: 520px) { .thumb { width: 40px; height: 40px; border-radius: 10px; } .li { padding: 10px 12px; gap: 10px; } }

[hidden], input[hidden] { display: none !important; }

/* ---------- foto cepat ---------- */
.fc { max-width: 560px; margin: 0 auto; }
.fc-top { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.fc-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fc-filters select, .fc-filters input { margin: 0; flex: 1 1 120px; width: auto; padding: 8px 10px; font-size: 15px; }
.fc-filters .check { margin: 0; flex: none; }
.fc-stage { position: relative; background: #0d1a13; border-radius: 20px; overflow: hidden; aspect-ratio: 3 / 4; max-height: 62vh; width: 100%; }
@media (min-width: 700px) { .fc-stage { aspect-ratio: 4 / 3; } }
.fc-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-stage.flash::after { content: ''; position: absolute; inset: 0; background: #fff; opacity: .85; animation: fcflash .18s ease-out forwards; }
@keyframes fcflash { to { opacity: 0; } }
.fc-label { position: absolute; left: 0; right: 0; top: 0; padding: 14px 16px 28px; background: linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,0)); color: #fff; }
.fc-name { font-size: 1.25rem; font-weight: 800; line-height: 1.2; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.fc-meta { font-size: .85rem; opacity: .9; margin-top: 2px; font-weight: 600; }
.fc-meta .ok { color: #9be7b3; }
.fc-nocam { position: absolute; inset: 0; display: none; place-items: center; text-align: center; color: #cfe3d6; padding: 30px; font-size: .9rem; }
.fc-stage.nocam .fc-nocam { display: grid; }
.fc-stage.nocam video { display: none; }
.fc-torch { position: absolute; right: 12px; bottom: 12px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); font-size: 20px; cursor: pointer; }
.fc-torch.on { background: var(--gold); }
.fc-toast { position: absolute; left: 50%; bottom: 16px; transform: translate(-50%, 20px); opacity: 0; transition: .2s; background: rgba(0,0,0,.75); color: #fff; padding: 8px 16px; border-radius: 99px; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.fc-toast.show { opacity: 1; transform: translate(-50%, 0); }
.fc-toast.ok { background: rgba(19, 122, 63, .92); }
.fc-toast.err { background: rgba(194, 58, 43, .95); }
.fc-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 14px 0 6px; }
.fc-side { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 0; background: #fff; box-shadow: var(--shadow); border-radius: 14px; min-height: 50px; font: inherit; font-weight: 700; color: var(--ink2); cursor: pointer; }
.fc-side .ic { width: 18px; height: 18px; }
.fc-shot { width: 78px; height: 78px; border-radius: 50%; border: 6px solid #fff; background: linear-gradient(135deg, var(--g700), var(--g500)); box-shadow: 0 0 0 3px var(--g700), 0 8px 20px rgba(19,122,63,.35); cursor: pointer; display: grid; place-items: center; color: #fff; margin: 0; padding: 0; }
.fc-shot:active { transform: scale(.94); }
.fc-shot[disabled] { opacity: .35; }
.fc-shot .ic { width: 30px; height: 30px; }
.fc-prog { text-align: center; color: var(--muted); font-size: .85rem; }
.fc-next { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 10px; align-items: center; }
.fc-next .lbl { font-size: .78rem; color: var(--muted); font-weight: 700; }
.fc-next button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 10px; font: inherit; font-size: .78rem; font-weight: 700; color: var(--g800); cursor: pointer; }
.fc-next img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
body.fcpage .wrap { padding-top: 10px; }

/* ---------- produksi & belanja ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chips span { background: var(--g50); border: 1px solid #d3eadb; border-radius: 8px; padding: 1px 7px; font-size: .78rem; font-variant-numeric: tabular-nums; }
.chips b { color: var(--g800); margin-right: 2px; }
table.bomgrid td, table.ukgrid td { padding: 4px; }
table.bomgrid input, table.ukgrid input { margin: 0; padding: 7px 6px; min-width: 64px; text-align: right; font-size: .9rem; border-radius: 8px; }
table.bomgrid input.def { background: var(--g50); border-color: #bfe0ca; font-weight: 700; }
table.bomgrid input::placeholder { color: #b0bab4; }
table.bomgrid th:first-child { min-width: 230px; }
.bomb { display: flex; gap: 8px; align-items: center; }
.bomb small { display: block; }
.thumb.sm { width: 32px; height: 32px; border-radius: 8px; }
.thumb.sm .ic { width: 16px; height: 16px; }
table.ukgrid th { text-align: center; }
.belanja-card .li { align-items: flex-start; }
.calc { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.calc b { color: var(--ink); }
.li.done { background: #f3faf5; }
.li.done .t { text-decoration: line-through; color: var(--muted); }
label.mark { margin: 6px 0 0; justify-content: flex-end; font-size: .8rem; }
.pills { gap: 6px; padding: 8px 10px; }
.pills a { padding: 6px 11px; font-size: .82rem; gap: 6px; }
.pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.pills a { flex: none; }
