/* MBG Management System — sistem desain ala Apple (HIG)
   Prinsip: tenang, hierarki jelas lewat ukuran & ruang (bukan garis tebal), satu aksi utama per layar,
   target sentuh ≥ 44px (tablet dapur), kontras teks ≥ 4.5:1. Mode terang saja. */
:root {
  /* aksen — biru Apple. #0071E3 lulus 4.5:1 dengan teks putih; #0066CC untuk teks/tautan. */
  --accent: #0071e3; --accent-hover: #0077ed; --accent-press: #006edb; --accent-text: #0066cc;
  --accent-tint: rgba(0,113,227,.10); --accent-tint-2: rgba(0,113,227,.16); --focus: rgba(0,113,227,.28);

  /* label & permukaan */
  --label: #1d1d1f; --label-2: #424245; --secondary: #6e6e73; --tertiary: #737378;
  --bg: #f5f5f7; --bg-2: #fafafc; --surface: #ffffff; --fill: #e8e8ed; --fill-2: #f0f0f5;
  --sep: #d2d2d7; --hairline: rgba(0,0,0,.08); --hairline-2: rgba(0,0,0,.05);

  /* status (teks gelap / latar tint) */
  --green: #1d7a34; --green-fill: #34c759; --green-bg: #e3f5e8;
  --orange: #c93400; --orange-fill: #ff9500; --orange-bg: #fff1e0;
  --red: #c40012; --red-fill: #ff3b30; --red-bg: #ffe5e7;
  --indigo: #5e5ce6; --indigo-bg: #eeeefd;
  --blue-bg: #e8f1fd;

  /* bentuk, elevasi, gerak */
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 24px 64px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  --ease: cubic-bezier(.25,.1,.25,1); --dur: .18s;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --tap: 44px;
  --side-w: 264px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.47; letter-spacing: -.008em; color: var(--label); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-family: var(--font-display); color: var(--label); }
h1 { font-size: 1.875rem; font-weight: 700; letter-spacing: -.022em; }
h2 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.012em; }
h3 { font-size: .9375rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
small, .small { font-size: .8125rem; }
.muted { color: var(--secondary); } .faint { color: var(--tertiary); }
.mono { font-family: var(--mono); font-size: .85em; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon-sm { width: 14px; height: 14px; vertical-align: -2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
/* Link "Lewati ke konten": tersembunyi sampai mendapat fokus keyboard. */
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600;
  text-decoration: none; transform: translateY(-160%); transition: transform var(--dur) var(--ease); }
.skip-link:focus { transform: none; text-decoration: none; }
#konten:focus { outline: none; }
summary { cursor: pointer; }
::selection { background: rgba(0,113,227,.2); }

/* ------------------------------------------------------------- layout */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: rgba(236,236,241,.82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--hairline); color: var(--label); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: thin; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 18px 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(180deg, #2b8cff, #0062d1); display: grid; place-items: center; color: #fff;
  font-weight: 700; font-size: 11px; letter-spacing: .02em; box-shadow: 0 1px 2px rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.25); flex: none; }
.brand-name { font-weight: 600; color: var(--label); font-size: 14px; line-height: 1.2; letter-spacing: -.01em; }
.brand-tag { font-size: 11px; color: var(--secondary); line-height: 1.3; margin-top: 1px; }
.nav { padding: 4px 10px 20px; flex: 1; }
.nav-group { margin-top: 16px; }
.nav-title { font-size: 11px; font-weight: 600; color: #5e5e63; padding: 4px 10px 4px; letter-spacing: 0; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; min-height: 36px; border-radius: 8px; color: var(--label); font-size: 13.5px; text-decoration: none;
  transition: background var(--dur) var(--ease); }
.nav a + a { margin-top: 1px; }
.nav a .icon { color: var(--accent); width: 18px; height: 18px; }
.nav a:hover { background: rgba(0,0,0,.05); text-decoration: none; }
.nav a.active { background: var(--accent); color: #fff; font-weight: 500; }
.nav a.active .icon { color: #fff; }
.nav .count { margin-left: auto; background: var(--red-fill); color: #fff; font-size: 11px; font-weight: 600; border-radius: 99px; padding: 0 7px; line-height: 18px; min-width: 18px; text-align: center; }
.nav a.active .count { background: #fff; color: var(--accent); }
.scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.32); z-index: 40; }
.side-foot { padding: 12px 18px 16px; font-size: 11px; color: var(--tertiary); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline); display: flex; align-items: center; gap: 8px; padding: 8px 32px; min-height: 56px; }
.topbar .spacer { flex: 1; }
.icon-btn.menu-toggle { display: none; }
.kitchen-switch { position: relative; display: flex; align-items: center; gap: 6px; background: var(--fill-2); border-radius: 10px; padding: 0 4px 0 10px; transition: background var(--dur) var(--ease); }
.kitchen-switch:hover { background: var(--fill); }
.kitchen-switch > .icon { color: var(--accent); }
.kitchen-switch select { border: 0; background: transparent; font-weight: 600; color: var(--label); min-height: 36px; padding: 0 24px 0 2px; font-size: 13.5px; box-shadow: none; width: auto; -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 9l4-4 4 4M8 15l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center; background-size: 14px; }
.kitchen-switch select:focus { box-shadow: none; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--label-2); border: 0; background: transparent; cursor: pointer;
  transition: background var(--dur) var(--ease); }
.icon-btn:hover { background: rgba(0,0,0,.05); text-decoration: none; }
.icon-btn:active { background: rgba(0,0,0,.08); }
.icon-btn .bell-count { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--red-fill); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(180deg, #a1a1a6, #7c7c80); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; letter-spacing: .02em; }
.user-meta { line-height: 1.2; }
.user-meta b { font-size: 13px; font-weight: 600; display: block; }
.user-meta span { font-size: 11.5px; color: var(--secondary); }
.topbar-sep { width: 1px; height: 22px; background: var(--hairline); margin: 0 4px; }
.content { padding: 28px 32px 56px; max-width: 1440px; width: 100%; }

.page-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .crumbs { font-size: 13px; color: var(--secondary); margin-bottom: 6px; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.page-head .crumbs a { color: var(--accent-text); }
.page-head .crumbs .icon { width: 13px; height: 13px; color: var(--tertiary); }
.page-head p { margin: 6px 0 0; color: var(--secondary); max-width: 760px; font-size: 15px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------- komponen */
.card { background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card, .card + .grid, .grid + .card, .grid + .grid { margin-top: 20px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; flex-wrap: wrap; }
.card-h + .card-b { padding-top: 4px; }
.card-h + .tbl-wrap, .card-h + .toolbar + .tbl-wrap { border-top: 1px solid var(--hairline-2); }
.card-h h2 { display: flex; align-items: center; gap: 8px; }
.card-h h2 .icon { color: var(--accent); }
.card-b { padding: 16px 20px 20px; }
.card-f { padding: 14px 20px; border-top: 1px solid var(--hairline-2); background: transparent; border-radius: 0 0 var(--radius) var(--radius); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card-f.end { justify-content: flex-end; } .card-f.between { justify-content: space-between; }
.card-link { color: inherit; text-decoration: none; display: block; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.card-link:hover { text-decoration: none; box-shadow: var(--shadow-md); }
.card-link:active { transform: scale(.99); }
.grid { display: grid; gap: 20px; }
.grid > .card + .card, .grid > .grid + .card, .grid > .card + .grid { margin-top: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
.gap-sm { gap: 12px; }

.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.stat .k { font-size: 13px; color: var(--secondary); display: flex; gap: 7px; align-items: center; font-weight: 500; }
.stat .k .icon { color: var(--accent); width: 16px; height: 16px; }
.stat .v { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 2px; }
.stat .v.sm { font-size: 22px; }
.stat .s { font-size: 12.5px; color: var(--secondary); }
.stat.accent { background: var(--surface); color: var(--label); }
.stat.accent .v { color: var(--accent); }
.stat.accent .k, .stat.accent .s { color: var(--secondary); }

.metric { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; color: var(--label); }
.metric .unit { font-size: 13px; font-weight: 500; color: var(--secondary); letter-spacing: 0; }
.metric-label { font-size: 12.5px; color: var(--secondary); }
a.metric-link { color: inherit; text-decoration: none; border-radius: var(--radius-sm); display: block; }
a.metric-link:hover { text-decoration: none; }
a.metric-link:hover .metric { color: var(--accent); }

/* tombol: gray fill (sekunder), biru (utama), tint, ghost, destruktif */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 0; background: var(--fill); color: var(--label);
  font: 500 14px/1 var(--font); letter-spacing: -.01em; cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
  transition: background var(--dur) var(--ease), transform .1s var(--ease), box-shadow var(--dur) var(--ease); }
.btn:hover { background: #dedee3; text-decoration: none; }
.btn:active { transform: scale(.98); background: #d4d4da; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); }
.btn-tinted { background: var(--accent-tint); color: var(--accent-text); }
.btn-tinted:hover { background: var(--accent-tint-2); }
.btn-tinted:active { background: rgba(0,113,227,.22); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover { background: #ffd6da; }
.btn-danger-fill { background: var(--red); color: #fff; }
.btn-danger-fill:hover { background: #c00013; }
.btn-ok { background: var(--green); color: #fff; }
.btn-ok:hover { background: #1f7a35; }
.btn-ghost { background: transparent; color: var(--accent-text); padding: 0 10px; }
.btn-ghost:hover { background: var(--accent-tint); }
.btn-ghost:active { background: var(--accent-tint-2); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn[disabled], .btn.disabled { opacity: .4; pointer-events: none; }
.btn-block { width: 100%; }
@media (pointer: coarse) { .btn { min-height: var(--tap); } .btn-sm { min-height: 38px; } }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--fill-2); color: var(--label-2); white-space: nowrap; line-height: 1.6; letter-spacing: 0; }
.badge.ok { background: var(--green-bg); color: var(--green); } .badge.warn { background: var(--orange-bg); color: var(--orange); }
.badge.danger { background: var(--red-bg); color: var(--red); } .badge.info { background: var(--blue-bg); color: var(--accent-text); }
.badge.violet { background: var(--indigo-bg); color: var(--indigo); } .badge.brand { background: var(--accent-tint); color: var(--accent-text); }
.badge.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--sep); color: var(--secondary); }
a.badge:hover { text-decoration: none; filter: brightness(.96); }
.badge .icon { width: 12px; height: 12px; }

.alert { display: flex; gap: 12px; padding: 12px 16px; border-radius: 12px; border: 0; margin-bottom: 16px; align-items: flex-start; font-size: 14px; }
.alert > .icon { margin-top: 1px; }
.alert.success { background: var(--green-bg); color: #1c6b30; }
.alert.danger { background: var(--red-bg); color: #a30010; }
.alert.warning { background: var(--orange-bg); color: #9a2800; }
.alert.info { background: var(--blue-bg); color: #00519f; }
.alert b { font-weight: 600; }
.alert a { color: inherit; text-decoration: underline; }
.alert .close { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .55; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 99px; margin: -4px -6px -4px auto; }
.alert .close:hover { opacity: 1; background: rgba(0,0,0,.06); }

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--secondary); padding: 10px 14px; background: transparent; border-bottom: 1px solid var(--hairline); white-space: nowrap; letter-spacing: 0; }
.tbl th.num { text-align: right; }
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 20px; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--hairline-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--dur) var(--ease); }
.tbl tbody tr:hover { background: var(--bg-2); }
.tbl tr.muted-row td { color: var(--tertiary); }
.tbl tfoot td { font-weight: 600; background: var(--bg-2); border-top: 1px solid var(--hairline); border-bottom: 0; }
.tbl .sub { font-size: 12.5px; color: var(--secondary); }
.tbl td.actions-cell { text-align: right; white-space: nowrap; }
.tbl-compact td, .tbl-compact th { padding: 8px 10px; }
.tbl-compact th:first-child, .tbl-compact td:first-child { padding-left: 0; }
.tbl-compact th:last-child, .tbl-compact td:last-child { padding-right: 0; }
.card > .tbl-wrap > .tbl-compact th:first-child, .card > .tbl-wrap > .tbl-compact td:first-child { padding-left: 20px; }
.card > .tbl-wrap > .tbl-compact th:last-child, .card > .tbl-wrap > .tbl-compact td:last-child { padding-right: 20px; }
.row-link { color: var(--label); font-weight: 600; }
.row-link:hover { color: var(--accent-text); }
.tbl td.empty-cell { color: var(--secondary); text-align: center; padding: 28px 14px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 4px 20px 16px; }
.toolbar .field { margin: 0; }
.toolbar .grow { flex: 1; min-width: 200px; }

/* bilah filter */
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 14px 16px; margin-bottom: 20px; }
.filter-bar .field { min-width: 140px; }
.filter-bar .field.grow { flex: 1; min-width: 200px; }
.filter-bar .help { flex-basis: 100%; font-size: 12.5px; color: var(--secondary); }
.filter-bar details.more { display: contents; }
.filter-bar details.more > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--accent-text); font-weight: 500; font-size: 14px; }
.filter-bar details.more > summary::-webkit-details-marker { display: none; }
.filter-bar details.more > summary:hover { background: var(--accent-tint); }
.filter-bar details.more[open] > summary .icon { transform: rotate(180deg); }
.filter-bar .more-fields { flex-basis: 100%; display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 500; color: var(--label-2); }
.field .hint { font-size: 12.5px; color: var(--secondary); }
.req::after { content: " *"; color: var(--red); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=search], input[type=tel], input[type=url], input[type=time], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--sep); border-radius: 10px; background: #fff; font: 15px var(--font); color: var(--label);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
@media (pointer: coarse) { input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=search], input[type=tel], select { min-height: var(--tap); } }
select { -webkit-appearance: none; appearance: none; padding-right: 32px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 9l4-4 4 4M8 15l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; }
select[multiple] { background-image: none; padding-right: 12px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--tertiary); }
input:hover, select:hover, textarea:hover { border-color: #b9b9bf; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }
input[readonly], input:disabled, select:disabled, textarea:disabled { background: var(--fill-2); color: var(--secondary); }
input[type=file] { font: 14px var(--font); }
input[type=file]::file-selector-button { font: 500 13px var(--font); border: 0; background: var(--fill); color: var(--label); border-radius: 8px; padding: 8px 12px; margin-right: 10px; cursor: pointer; }
input.qty { text-align: right; font-variant-numeric: tabular-nums; }
.minw-170 { min-width: 170px; } .minw-190 { min-width: 190px; } .minw-200 { min-width: 200px; } .minw-240 { min-width: 240px; }
.w-130 { width: 130px; } .w-320 { max-width: 320px; }
.pt-0 { padding-top: 0 !important; } .pb-0 { padding-bottom: 0 !important; } .p-0 { padding: 0 !important; }
.tbl-inputs input, .tbl-inputs select { min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.callout > .icon { margin-right: 4px; }
.min-w-0 { min-width: 0; } .text-right { text-align: right; } .text-center { text-align: center; }
.tbl tr.group-row th { background: var(--bg-2); color: var(--label); font-size: 13px; padding-top: 10px; padding-bottom: 10px; }
.tbl tr.group-row th .icon { color: var(--accent); margin-right: 4px; }
.w-qty { width: 110px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; font-size: 14px; }
.check input, input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-toggle { position: relative; }
.chip-toggle input { position: absolute; opacity: 0; }
.chip-toggle span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 99px; cursor: pointer; font-weight: 500; font-size: 14px; background: var(--fill-2); color: var(--label);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.chip-toggle span:hover { background: var(--fill); }
.chip-toggle input:checked + span { background: var(--accent); color: #fff; }
.chip-toggle input:focus-visible + span { box-shadow: 0 0 0 4px var(--focus); }
.chip-toggle input:disabled + span { opacity: .5; cursor: default; }

/* segmented control (menggantikan tab bergaris) */
.tabs, .segmented { display: inline-flex; gap: 2px; padding: 3px; background: var(--fill); border-radius: 10px; margin-bottom: 20px; overflow-x: auto; max-width: 100%; scrollbar-width: none; border: 0; }
.tabs::-webkit-scrollbar, .segmented::-webkit-scrollbar { display: none; }
.tabs a, .segmented a, .segmented button { padding: 0 14px; min-height: 32px; display: inline-flex; align-items: center; gap: 6px; color: var(--label); font-weight: 500; font-size: 13.5px;
  border-radius: 8px; white-space: nowrap; border: 0; background: transparent; cursor: pointer; text-decoration: none; transition: background var(--dur) var(--ease); margin: 0; }
.tabs a .icon, .segmented a .icon { width: 15px; height: 15px; color: var(--secondary); }
.tabs a:hover, .segmented a:hover { text-decoration: none; background: rgba(255,255,255,.55); }
.tabs a.active, .segmented a.active, .segmented button.active { background: #fff; color: var(--label); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
.tabs a.active .icon { color: var(--accent); }

/* daftar ala Settings (grouped inset list) */
.inset-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hairline); overflow: hidden; }
.inset-list > li, .inset-list > .row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; position: relative; }
.inset-list > li + li, .inset-list > .row + .row { box-shadow: inset 0 1px 0 var(--hairline-2); }
.inset-list .grow { flex: 1; min-width: 0; }
.inset-list .meta { font-size: 12.5px; color: var(--secondary); }
.inset-list > a.link-row { align-items: center; color: var(--label); text-decoration: none; min-height: 48px; transition: background var(--dur) var(--ease); }
.inset-list > a.link-row:hover { background: var(--bg-2); }
.inset-list > a.link-row:active { background: var(--fill-2); }
.inset-list > a.link-row + a.link-row { box-shadow: inset 0 1px 0 var(--hairline-2); }
.inset-list .chev { width: 16px; height: 16px; color: #c7c7cc; stroke-width: 2.2; }
.step-icon { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.step-icon.ok { color: var(--green); } .step-icon.wait { color: var(--orange); } .step-icon.no { color: var(--red); } .step-icon.idle { color: var(--tertiary); }
.box { border-radius: 12px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hairline); padding: 14px; }
.box + .box { margin-top: 10px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 9px 20px; font-size: 14px; margin: 0; }
.kv dt { color: var(--secondary); }
.kv dd { margin: 0; font-weight: 500; }
.empty { text-align: center; padding: 44px 20px; color: var(--secondary); font-size: 14px; }
.empty .icon { width: 40px; height: 40px; color: #c7c7cc; margin: 0 auto 10px; display: block; stroke-width: 1.4; }
.empty b { display: block; color: var(--label); font-size: 15px; margin-bottom: 2px; }
.divider { height: 1px; background: var(--hairline); margin: 16px 0; border: 0; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: -2px; width: 1.5px; background: var(--sep); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 1px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px #fff; }
.timeline li.future::after { background: #fff; box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 3px #fff; }
.timeline li.pending::after { background: var(--orange-fill); }
.timeline .t-head { font-weight: 600; font-size: 14px; }
.timeline .t-meta { font-size: 12.5px; color: var(--secondary); }

.progress { height: 6px; background: var(--fill); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s var(--ease); }
.progress > span.over, .hbar > span.over { background: var(--red-fill); }
.progress > span.low, .hbar > span.low { background: var(--orange-fill); }
.meter-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }

.callout { background: var(--blue-bg); padding: 12px 16px; border-radius: 12px; font-size: 14px; color: #00519f; border: 0; }
.callout.warn { background: var(--orange-bg); color: #9a2800; }
.lock { color: var(--tertiary); }
.diff-add { background: #e9f8ed; } .diff-del { background: #fdecee; }

/* teks status & utilitas spasi (pengganti inline style) */
.text-danger { color: var(--red); } .text-warn { color: var(--orange); } .text-ok { color: var(--green); } .text-accent { color: var(--accent-text); }
.strong { font-weight: 600; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; }
.stack { display: grid; gap: 12px; align-content: start; } .stack-sm { display: grid; gap: 8px; align-content: start; }
.col-stack { display: grid; gap: 20px; align-content: start; grid-template-columns: minmax(0, 1fr); }
.row-flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .row-flex.end { justify-content: flex-end; } .row-flex.between { justify-content: space-between; }
.self-start { align-self: start; } .grow { flex: 1; }
.list-plain { margin: 4px 0 0; padding-left: 18px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--secondary); }
.legend-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--accent); }
.legend-swatch.orange { background: var(--orange-fill); }
.chart { width: 100%; max-height: 170px; margin-top: 8px; display: block; }
.chart .bar { fill: var(--accent); } .chart .bar-2 { fill: var(--orange-fill); } .chart .axis { stroke: var(--sep); } .chart text { fill: var(--secondary); }
.hbar { height: 8px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.hbar > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.hbar-target { position: relative; overflow: visible; }
.hbar-target > i { position: absolute; left: 90%; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--label); }
.acc-row { display: grid; grid-template-columns: 60px 1fr 64px; gap: 10px; align-items: center; font-size: 12.5px; }
.link-more { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 500; color: var(--accent-text); }
.link-more .icon { width: 14px; height: 14px; }

/* utilitas atomik — pengganti inline style lama di template */
.d-grid { display: grid; } .d-flex { display: flex; } .d-none { display: none !important; } .d-inline { display: inline; }
.jc-end { justify-content: flex-end; } .jc-between { justify-content: space-between; } .ac-start { align-content: start; }
.ai-start { align-items: flex-start; } .ai-center { align-items: center; } .wrap { flex-wrap: wrap; }
.cols-1 { grid-template-columns: minmax(0, 1fr); } .cols-2 { grid-template-columns: 1fr 1fr; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-14 { gap: 14px; } .gap-16 { gap: 16px; } .gap-18 { gap: 18px; }
.m-0 { margin: 0 !important; } .b-0 { border: 0 !important; } .break-all { word-break: break-all; }
.fs-11 { font-size: 11px; } .fs-115 { font-size: 11.5px; } .fs-12 { font-size: 12px; } .fs-125 { font-size: 12.5px; } .fs-13 { font-size: 13px; } .fs-15 { font-size: 15px; } .fs-16 { font-size: 16px; }
.fs-20 { font-size: 20px; } .fs-22 { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.mh-36 { min-height: 36px; } .mh-50 { min-height: 50px; } .mh-56 { min-height: 56px; } .mh-60 { min-height: 60px; } .mh-70 { min-height: 70px; } .mh-80 { min-height: 80px; }
.maxw-110 { max-width: 110px; } .maxw-180 { max-width: 180px; } .maxw-190 { max-width: 190px; } .maxw-320 { max-width: 320px; } .maxw-340 { max-width: 340px; }
.maxw-440 { max-width: 440px; } .maxw-640 { max-width: 640px; } .maxw-720 { max-width: 720px; } .maxw-760 { max-width: 760px; } .maxw-820 { max-width: 820px; } .maxw-860 { max-width: 860px; } .maxw-960 { max-width: 960px; }
.minw-180 { min-width: 180px; } .minw-220 { min-width: 220px; } .minw-260 { min-width: 260px; }
.w-28 { width: 28px; } .w-80 { width: 80px; } .w-140 { width: 140px; } .w-200 { width: 200px; }

/* sheet (dialog modal ala iPadOS/macOS) */
dialog.sheet { border: 0; padding: 0; border-radius: 16px; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--label); box-shadow: var(--shadow-lg); overflow: auto; }
dialog.sheet::backdrop { background: rgba(0,0,0,.32); backdrop-filter: blur(2px); }
dialog.sheet[open] { animation: sheet-in .22s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.sheet-h h2 { font-size: 17px; }
.sheet-b { padding: 8px 20px 4px; }
.sheet-f { display: flex; gap: 8px; justify-content: flex-end; padding: 16px 20px 20px; }
.sheet-close { width: 30px; height: 30px; border-radius: 99px; border: 0; background: var(--fill-2); color: var(--secondary); display: grid; place-items: center; cursor: pointer; }
.sheet-close:hover { background: var(--fill); }
.sheet-close .icon { width: 14px; height: 14px; stroke-width: 2.2; }

/* editor resep */
.comp-card { border-radius: var(--radius); background: #fff; box-shadow: inset 0 0 0 1px var(--hairline); margin-bottom: 14px; }
.comp-head { display: grid; grid-template-columns: 220px 1fr auto; gap: 10px; padding: 12px 14px; background: var(--bg-2); border-bottom: 1px solid var(--hairline-2); border-radius: var(--radius) var(--radius) 0 0; align-items: end; }
.comp-body { padding: 8px 14px 14px; }
.ing-table th, .ing-table td { padding: 6px 6px; }
.ing-table th:first-child, .ing-table td:first-child { padding-left: 0; }
.ing-table input, .ing-table select { min-height: 38px; padding: 6px 10px; font-size: 14px; }
.ing-table select { padding-right: 30px; }
.portion-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--hairline); padding: 12px 32px; display: flex; gap: 10px; justify-content: flex-end; margin: 20px -32px -56px; z-index: 5; }

/* kalender */
.cal { overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 10px; font-size: 12px; font-weight: 600; color: var(--secondary); background: transparent; border-bottom: 1px solid var(--hairline); }
.cal-cell { min-height: 118px; border-right: 1px solid var(--hairline-2); border-bottom: 1px solid var(--hairline-2); padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.other { background: var(--bg-2); }
.cal-cell.other .cal-date { color: var(--tertiary); }
.cal-cell.past .cal-entry { opacity: .65; }
.cal-cell.today .cal-date { background: var(--red-fill); color: #fff; border-radius: 99px; min-width: 24px; height: 24px; display: inline-grid; place-items: center; padding: 0 6px; align-self: flex-start; }
.cal-date { font-size: 13px; font-weight: 600; color: var(--label); }
.cal-hol { font-size: 11px; color: var(--orange); background: var(--orange-bg); border-radius: 6px; padding: 2px 6px; }
.cal-entry { display: flex; flex-direction: column; gap: 1px; font-size: 12px; line-height: 1.3; padding: 5px 7px; border-radius: 7px; color: var(--label); text-decoration: none; border-left: 3px solid var(--accent); background: var(--blue-bg);
  transition: filter var(--dur) var(--ease); }
.cal-entry:hover { text-decoration: none; filter: brightness(.97); }
.cal-entry b { font-size: 12.5px; font-weight: 600; }
.cal-entry span { color: var(--label-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cal-entry em { font-style: normal; font-size: 11px; color: var(--indigo); }
.cal-entry small { font-size: 10.5px; color: var(--secondary); }
.cal-entry .cal-over { color: var(--red); font-weight: 600; }
.cal-round { font-size: 10px; color: var(--secondary); font-weight: 600; }
.cal-entry.t-sisipan { background: var(--indigo-bg); border-color: var(--indigo); }
.cal-entry.t-cadangan { background: var(--orange-bg); border-color: var(--orange-fill); }
.cal-entry.t-kosong { background: #fff; border: 1px dashed var(--red); border-left-width: 3px; color: var(--red); }
.cal-entry.over { box-shadow: inset 0 0 0 1px #ffc2c8; }
i.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--blue-bg); border-left: 3px solid var(--accent); }
i.lg.t-sisipan { background: var(--indigo-bg); border-color: var(--indigo); } i.lg.t-cadangan { background: var(--orange-bg); border-color: var(--orange-fill); }
i.lg.t-kosong { background: #fff; border: 1px dashed var(--red); } i.lg.over { background: var(--red-bg); border-color: var(--red); }
.cal-nav { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; }
.cal-nav h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.rec { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hairline); padding: 12px 14px; display: grid; gap: 6px; }
.rec + .rec { margin-top: 10px; }
.rec-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.rec ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--label-2); }
.score { font-weight: 700; font-size: 18px; color: var(--accent-text); }
@media (max-width: 760px) { .cal-cell { min-height: 90px; padding: 3px; } .cal-entry span, .cal-entry em, .cal-entry small { display: none; } }

/* login */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: var(--bg); }
.auth-panel { width: 100%; display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-md); padding: 36px 32px 28px; }
.auth-card h2 { font-size: 1.625rem; font-weight: 700; letter-spacing: -.022em; margin-bottom: 6px; text-align: center; }
.auth-card .lead { text-align: center; color: var(--secondary); margin-bottom: 24px; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 16px; }
.auth-logo .brand-mark { width: 56px; height: 56px; border-radius: 14px; font-size: 15px; }
.auth-foot { text-align: center; font-size: 12px; color: var(--tertiary); margin-top: 20px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--tertiary); font-size: 13px; margin: 20px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.btn-google { width: 100%; background: #fff; box-shadow: inset 0 0 0 1px var(--sep); }
.btn-google:hover { background: var(--bg-2); }

/* cetak */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; font-size: 11pt; letter-spacing: 0; }
  .sidebar, .topbar, .no-print, .flash-area { display: none !important; }
  .app { display: block; } .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
  .tbl th { background: #eee !important; color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tbl td, .tbl th { border: 1px solid #999; padding: 5px 7px !important; }
  a { color: inherit; }
  .page-break { break-before: page; }
  .doc { border: 0; padding: 0; box-shadow: none; }
}
.doc { background: #fff; padding: 32px 36px; border-radius: var(--radius); box-shadow: var(--shadow); }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--label); padding-bottom: 10px; margin-bottom: 16px; gap: 16px; }
.doc-head h1 { font-size: 1.25rem; }
.doc .tbl th:first-child, .doc .tbl td:first-child { padding-left: 10px; }
.doc .tbl th:last-child, .doc .tbl td:last-child { padding-right: 10px; }
.sign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px; text-align: center; font-size: 13px; }
.sign-grid.two { grid-template-columns: repeat(2, 1fr); }
.sign-grid .line { border-bottom: 1px solid #333; height: 64px; margin-bottom: 6px; }

/* ------------------------------------------------------------- responsif (tablet & ponsel) */
@media (max-width: 1180px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 284px; z-index: 50; transform: translateX(-100%); transition: transform .26s var(--ease); box-shadow: var(--shadow-lg);
    background: rgba(242,242,247,.96); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; }
  .icon-btn.menu-toggle { display: inline-grid; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-side { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding: 8px 16px; }
  .content { padding: 24px 20px 48px; }
  .sticky-actions { margin: 20px -20px -48px; padding: 12px 20px; }
}
@media (max-width: 760px) {
  .g2, .g3, .g4, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .user-meta, .topbar-sep, .user-chip { display: none; }
  .topbar { gap: 4px; padding: 8px 12px; }
  .kitchen-switch { min-width: 0; }
  .kitchen-switch select { max-width: 120px; text-overflow: ellipsis; }
  .comp-head { grid-template-columns: 1fr; }
  .portion-row { grid-template-columns: 1fr; }
  .sign-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.5rem; }
  .content { padding: 20px 16px 40px; }
  .sticky-actions { margin: 20px -16px -40px; padding: 12px 16px; }
  .stat .v { font-size: 26px; }
  .filter-bar .field { min-width: 0; flex: 1 1 140px; }
  .auth-card { padding: 28px 20px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
.sign-mark { display: inline-flex; align-items: center; gap: 4px; color: var(--tertiary); margin-right: 8px; white-space: nowrap; }
.sign-mark.on { color: var(--green); }
.section-sep { border-top: 1px solid var(--hairline); padding-top: 12px; }
.waste-row { display: grid; grid-template-columns: 76px 1fr 54px; gap: 8px; align-items: center; font-size: 12.5px; }
.hbar-stack { position: relative; height: 10px; }
.hbar-stack > span { position: absolute; top: 0; left: 0; height: 100%; }
.hbar-stack > span.plate { background: var(--orange-fill); opacity: .9; }
.card-note { padding: 0 20px 16px; margin: 0; }
.filter-inline { gap: 8px; align-items: center; }
.filter-inline .field { flex-direction: row; align-items: center; gap: 8px; }
.w-170 { width: 170px; flex: none; }
.error-code { font-family: var(--font-display); font-size: 56px; font-weight: 700; letter-spacing: -.03em; color: var(--tertiary); line-height: 1; }
.wrap-anywhere { white-space: normal; word-break: break-all; }
.h-30 { height: 30px; }
.bg-danger, .tbl tr.bg-danger td { background: var(--red-bg); }
.filter-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 4px 0 16px; }
.check-lg { width: 22px !important; height: 22px !important; }
.btn-ghost.text-danger { color: var(--red); }
.btn-ghost.text-danger:hover { background: var(--red-bg); }
.comp-head.comp-head-2 { grid-template-columns: 1fr auto; }
.report-item { break-inside: avoid; margin-bottom: 18px; }
.report-item-h { border-bottom: 1px solid var(--sep); padding-bottom: 4px; margin-bottom: 6px; }
.filter-inline select, .filter-inline input { width: auto; min-width: 180px; max-width: 100%; }

/* ---------------- Produksi & Evaluasi v2 (2026-10-30) ---------------- */
.stepper { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.stepper li { display: grid; gap: 6px; font-size: 12.5px; color: var(--secondary); min-width: 0; }
.stepper li i { height: 4px; border-radius: 2px; background: var(--sep); display: block; }
.stepper li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper li.done { color: var(--green); } .stepper li.done i { background: var(--green-fill); }
.stepper li.now { color: var(--accent-text); font-weight: 600; } .stepper li.now i { background: var(--accent); }
.next-step { margin-bottom: 16px; }
.next-step .card-b { display: grid; gap: 12px; }
.next-step h2 { margin: 0; }
.eyebrow { font-size: 12px; color: var(--secondary); font-weight: 600; letter-spacing: .02em; }
.task-list { list-style: none; margin: 0; padding: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hairline); overflow: hidden; }
.task-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; font-size: 14px; }
.task-list li + li { box-shadow: inset 0 1px 0 var(--hairline-2); }
.task-list .meta { font-size: 12px; color: var(--secondary); }
.task-list .who { font-size: 12.5px; text-align: right; font-weight: 500; }
.task-list .who.done { color: var(--green); } .task-list .who.you, .task-list .who.helper { color: var(--accent-text); font-weight: 600; }
.task-list .who.wait { color: var(--orange); } .task-list .who.optional { color: var(--secondary); }
.dot { width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; }
.dot .icon { width: 12px; height: 12px; }
.dot.ok { background: var(--green-fill); color: #fff; } .dot.wait { box-shadow: inset 0 0 0 2px var(--orange-fill); }
.dot.idle { box-shadow: inset 0 0 0 2px var(--sep); } .dot.you { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-tint); }
.segmented .count { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 6px; line-height: 17px; }
.turn-tabs { margin-bottom: 12px; }
.prod-list { display: grid; }
.prod-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 14px 18px; }
.prod-row + .prod-row { box-shadow: inset 0 1px 0 var(--hairline); }
.prod-row.today { background: linear-gradient(90deg, var(--accent-tint), transparent 60%); }
.prod-row .date b { display: block; font-size: 14px; } .prod-row .date span { font-size: 12px; color: var(--secondary); }
.prod-row .menu { min-width: 0; }
.prod-row .state { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-items: center; }
.turn-text { color: var(--accent-text); font-size: 12.5px; font-weight: 600; }
.wait-text { color: var(--secondary); font-size: 12.5px; }
.brief { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hairline); overflow: hidden; }
.brief > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 12px; padding: 12px 14px; font-size: 14px; }
.brief > div + div { box-shadow: inset 0 1px 0 var(--hairline); }
.brief > div.chg { background: var(--orange-bg); }
.brief .bb { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.brief .badge { margin-left: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-mini { background: var(--fill-2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.stat-mini .k { font-size: 12px; color: var(--secondary); } .stat-mini .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.inline-form { display: grid; gap: 12px; background: var(--fill-2); border-radius: 12px; padding: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chg-mark { color: var(--orange); font-weight: 600; }
.portion-grid td.same { text-align: center; }
.hist-list { display: grid; }
.hist-list > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding: 8px 0; font-size: 14px; }
.hist-list > div + div { box-shadow: inset 0 1px 0 var(--hairline); }
details.fold { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hairline); }
details.fold > summary { cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-weight: 600; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > .in { padding: 0 14px 14px; display: grid; gap: 10px; min-width: 0; }
/* Checklist Divisi: satu lipatan per produksi di dalam kartu */
details.cl-fold { box-shadow: none; }
details.cl-fold > summary { padding: 14px 20px; }
details.cl-fold > summary > .chev { flex: none; color: var(--secondary); transition: transform var(--dur) var(--ease); }
details.cl-fold[open] > summary > .chev { transform: rotate(180deg); }
details.cl-fold > .in { padding: 0 0 8px; }
.cl-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; flex: 1; min-width: 0; }
.cl-sum > .btn { margin-left: auto; }
/* Dokumen Produksi: baris lipatan "Semua dokumen" di bawah setiap berkas */
.tbl tr.sub-row > td { padding-top: 0; }
.tbl tr.sub-row details.fold { box-shadow: none; }
.tbl tr.sub-row details.fold > summary { padding: 4px 0; font-weight: 500; color: var(--accent-text); }
.tbl tr.sub-row details.fold > .in { padding: 0 0 6px; }
.signer-badge { white-space: normal; text-align: left; max-width: 100%; }
input.missing { border-color: var(--orange-fill); background: #fffaf3; }
@media (max-width: 760px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .prod-row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; }
  .prod-row .date { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; }
  .brief > div, .hist-list > div { grid-template-columns: minmax(0, 1fr); }
  .task-list li { grid-template-columns: 22px minmax(0, 1fr); }
  .task-list .who { grid-column: 2; text-align: left; }
}
