[hidden] { display: none !important; }
:root {
  --ink: #172033;
  --ink-2: #4a5160;
  --ink-3: #6b7280;
  --paper: #f6f4ef;
  --card: #fcfbf8;
  --line: #e2ddd2;
  --accent: #b04a15;
  --accent-bg: #fbe9dd;
  --blue: #2b5fc4;
  --blue-bg: #e3ecfb;
  --ok: #1f7a4d;
  --ok-bg: #e2f3ea;
  --warn: #8a5a00;
  --warn-bg: #fdf1d6;
  --bad: #a3302d;
  --bad-bg: #fbe5e4;
  --mute-bg: #ece9e2;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0; display: flex; min-height: 100vh;
  font-family: 'DM Sans', system-ui, sans-serif; font-size: 14px; color: var(--ink); background: var(--paper);
}
.side {
  width: 232px; flex-shrink: 0; background: var(--ink); color: #e9ecf2;
  display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 0 6px 22px; }
.logo { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; font-weight: 700; color: #fff; }
.brand-name { font-weight: 700; font-size: 15px; }
.brand-sub { font-size: 12px; color: #a9b2c3; }
nav a {
  display: block; padding: 9px 12px; border-radius: 8px; color: #c9d0dc; text-decoration: none; margin-bottom: 2px; font-weight: 500;
}
nav a:hover { background: #222d44; color: #fff; }
nav a.on { background: #2a3754; color: #fff; }
.side-foot { margin-top: auto; padding: 0 6px; }
.side-foot p { font-size: 12px; color: #8d97aa; line-height: 1.5; }
main { flex: 1; padding: 28px 36px 60px; min-width: 0; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.sub { color: var(--ink-3); margin: 0 0 22px; }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.metric .label { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.metric .value { font-size: 24px; font-weight: 700; }
.metric .hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.metric.accent .value { color: var(--accent); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid #eeeae2; vertical-align: top; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.p-ok { background: var(--ok-bg); color: var(--ok); }
.p-warn { background: var(--warn-bg); color: var(--warn); }
.p-bad { background: var(--bad-bg); color: var(--bad); }
.p-info { background: var(--blue-bg); color: var(--blue); }
.p-mute { background: var(--mute-bg); color: var(--ink-2); }
.p-acc { background: var(--accent-bg); color: var(--accent); }
button, .btn {
  font: inherit; font-weight: 600; border-radius: 8px; padding: 8px 14px; cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: #26324d; }
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border-color: #cfc8ba; }
button.ghost:hover, .btn.ghost:hover { background: #ece8df; }
.side button.ghost { color: #c9d0dc; border-color: #3a4766; }
.side button.ghost:hover { background: #222d44; }
button.small, .btn.small { padding: 5px 10px; font-size: 12px; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid #cfc8ba; border-radius: 8px; background: #fff; color: var(--ink); min-width: 0;
}
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.form .wide { grid-column: span 2; }
.form .full { grid-column: 1 / -1; }
.bar { height: 8px; background: #ebe6db; border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { background: transparent; color: var(--ink-2); border-color: #d9d2c4; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.steps { display: flex; gap: 8px; margin: 4px 0 18px; flex-wrap: wrap; }
.steps span { font-size: 12px; padding: 5px 10px; border-radius: 99px; background: var(--mute-bg); color: var(--ink-3); font-weight: 600; }
.steps span.on { background: var(--accent-bg); color: var(--accent); }
.steps span.done { background: var(--ok-bg); color: var(--ok); }
.empty { padding: 26px; text-align: center; color: var(--ink-3); }
.err { color: var(--bad); font-size: 13px; margin-top: 8px; }
.note { background: var(--blue-bg); color: #1d3f82; border-radius: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.5; }
.toast { position: fixed; bottom: 22px; right: 22px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-width: 420px; }
.scroll { overflow-x: auto; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.search { display: flex; gap: 10px; }
.search input { flex: 1; font-size: 16px; padding: 11px 14px; }
details summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: 13px; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- tambahan aplikasi produksi ---- */
.login-wrap { flex: 1; display: grid; place-items: center; padding: 24px; }
.login { width: 100%; max-width: 360px; }
.login .logo { margin-bottom: 14px; }
.login form { display: grid; gap: 12px; }
.side .who { font-size: 12px; color: #a9b2c3; margin-bottom: 8px; }
nav .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6f7a90; padding: 14px 12px 4px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters label.f { min-width: 150px; }
.tbl-wrap { overflow-x: auto; }
table.dense td, table.dense th { padding: 6px 8px; font-size: 13px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; }
.block { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.block-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.warn-text { color: var(--warn); font-size: 12px; }
.perlu { border-left: 4px solid var(--warn); }
.perlu-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.items-grid { display: grid; grid-template-columns: 1.4fr 1.8fr .7fr 1fr 1fr auto; gap: 8px; align-items: center; }
.modal-bg { position: fixed; inset: 0; background: rgba(23,32,51,.45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--card); border-radius: 12px; padding: 22px 24px; width: 100%; max-width: 760px; max-height: 90vh; overflow: auto; }
.right { text-align: right; }
.clickable { cursor: pointer; }
.clickable:hover td { background: #f3efe6; }
@media (max-width: 800px) {
  body { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; }
  main { padding: 18px 16px 40px; }
  .g4, .g2, .form { grid-template-columns: 1fr; }
  .form .wide { grid-column: auto; }
}
@media print {
  .side, .no-print, button, .btn { display: none !important; }
  main { padding: 0; }
  body { background: #fff; }
  .card { border: none; padding: 0; }
}
button.link { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; min-height: 0; }
button.link:hover { text-decoration: underline; background: none; }
tr.group td { background: var(--mute-bg); font-weight: 700; }
tr.total td { font-weight: 700; border-top: 2px solid #d9d2c4; }
tr.on td { background: var(--accent-bg); }
