/* tasteskill / app.css
   A neutral foundation for app screens (dashboards, admin, settings, inboxes), set to the defaults
   measured in the study of real product screens (references/app-screens.md). Copy it into the project,
   replace the token values with the ones on the app sheet (draw.mjs --app), and build on top.
   Delete what you do not use. It has no brand of its own: neutral grounds, one quiet line, one accent. */

/* ---------- tokens (replace with the dealt style) ---------- */
:root {
  /* token dari app sheet "achromatic-ledger" (seed 125796630), face: tanah batu hangat ala meja makan */
  --ground: #f4f3f1;          /* app chrome dan halaman */
  --surface: #ffffff;         /* panel dan lembar kerja */
  --raised: #eeeeee;          /* isian dalam, hover baris */
  --active: #ededed;          /* pil nav aktif */
  --border: #e6e6e6;          /* tepi panel */
  --rule: #f0f0f0;            /* garis antar baris */
  --control: #d4d4d4;         /* input dan tombol garis */
  --text: #0a0a0a;
  --muted: #6b6b6b;           /* teks sekunder, label */
  --faint: #6b6b6b;           /* meta */
  --accent: #141414;          /* aksen chrome: hitam, bukan warna merek */
  --primary: #141414;         /* tombol utama near-black */
  --primary-ink: #ffffff;
  --positive: #2e7d32; --negative: #c4242a; --warning: #92400e;
  --pill-positive-bg: #dcfae5; --pill-positive-ink: #04250e;
  --pill-negative-bg: #ffedea; --pill-negative-ink: #831c1e;
  --pill-warning-bg: #fffbeb; --pill-warning-ink: #92400e;
  --pill-neutral-bg: #eeeeee; --pill-neutral-ink: #3d3d3d;
  --chart-1: #141414;         /* tinta: lauk */
  --chart-2: #8a8a8a;         /* netral: sayur */
  --chart-3: #1d5fbf;         /* satu hue: data utama (nasi) dan progres piring */
  --chart-muted: #d8d8d8;     /* track piring */
  --chart-mark: #141414;
  --chart-span: 0.06;
  --grid: var(--rule);
  --axis-ink: var(--muted);
  --ink: var(--text);

  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-title: 24px; --fs-section: 16px; --fs-kpi: 30px; --fs-body: 14px; --fs-small: 12px;

  --sidebar-width: 256px;
  --pad: 24px;                /* padding canvas */
  --gap: 12px;                /* satu gutter, horizontal dan vertikal */
  --card-pad: 20px;
  --radius-card: 8px;         /* pasangan rapat: kartu 8, kontrol 6 */
  --radius-control: 6px;
  --control-height: 36px;
  --row-height: 44px;
  --nav-row: 32px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 120ms; --t-hover: 150ms; --t-ui: 200ms;
}
/* dark: one true-neutral ground, elevation by lightness; two greys that read apart (not #aaa beside #969696) */
:root[data-theme="dark"] {
  --ground: #000000; --surface: #111111; --raised: #222222; --active: #222222;
  --border: #1a1a1a; --rule: #161616; --control: #444444;
  --text: #ffffff; --muted: #b4b4b4; --faint: #949494;
  --primary: #ffffff; --primary-ink: #000000;
  --positive: #3fc07a; --negative: #e5566f; --warning: #e5a93b;  /* a green or yellow-green accent is also --positive */
  --pill-positive-bg: #172a1d; --pill-positive-ink: #3fc07a;
  --pill-negative-bg: #2c1a20; --pill-negative-ink: #e5566f;
  --pill-warning-bg: #2b2414; --pill-warning-ink: #e5a93b;
  --pill-neutral-bg: #222222; --pill-neutral-ink: #ffffff;
  --chart-muted: #4a4a4a; --grid: #2b2b2b;
  --chart-span: 0.12;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: var(--fs-body)/20px var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num, table, .kpi-value { font-variant-numeric: tabular-nums; }

/* ---------- shell: sidebar + canvas ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: 2px; padding: 16px 12px; overflow: auto; }
.sidebar .group-label { margin: 20px 8px 6px; font-size: var(--fs-small); color: var(--faint); }
.nav-item { display: flex; align-items: center; gap: 10px; height: var(--nav-row); padding: 0 8px; border-radius: 8px; color: var(--muted); transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.nav-item svg { width: 16px; height: 16px; flex: none; stroke-width: 1.5; }
.nav-item:hover { background: var(--raised); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--active); color: var(--text); }
.sidebar .bottom { margin-top: auto; }

/* produk harus bernama: mark + nama di atas sidebar */
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 0; }
.brand-mark { width: 26px; height: 26px; flex: none; color: var(--text); }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.sidebar-foot { margin-top: auto; padding: 16px 8px 0; }
.side-note { font-size: var(--fs-small); line-height: 1.45; color: var(--faint); }
.mobile-bar { display: none; }
.canvas { min-width: 0; padding: var(--pad); }

/* ---------- title block and filters ---------- */
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.title-row h1 { font-size: var(--fs-title); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.title-row .sub { margin-top: 4px; color: var(--muted); }
.filters { display: flex; align-items: center; gap: 8px; margin-bottom: var(--gap); flex-wrap: wrap; }
.filters .spacer { flex: 1; }
.stamp { color: var(--faint); font-size: var(--fs-small); }

/* ---------- panels and grid ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--card-pad); min-width: 0; }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel h2 { font-size: var(--fs-section); line-height: 1.3; font-weight: 600; }
.panel .meta { color: var(--faint); font-size: var(--fs-small); }
/* paired cards in one row: a card stretches to its neighbour only when it has content to fill. Otherwise it keeps
   its own height (add .top to the row), and only an action or a total may be pinned to a stretched card's bottom */
.grid.top { align-items: start; }

/* a chart's heading row: its title (and legend or period) with a fixed 8px to the svg */
.chart-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; }
.chart-head h3 { font-size: var(--fs-body); line-height: 20px; font-weight: 500; }
.chart { position: relative; min-width: 0; }

/* a link at a card's foot or header ("Show all 7", "Sell-out history"): ink, a 12px chevron, an underline on hover,
   and no inline padding, so its text sits on the card's content edge */
.card-link { display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: none; color: var(--text); font-weight: 500; cursor: pointer; text-underline-offset: 3px; }
.card-link::after { content: ""; width: 12px; height: 12px; flex: none; background: currentColor; -webkit-mask: var(--chevron) center / 12px no-repeat; mask: var(--chevron) center / 12px no-repeat; }
.card-link:hover { text-decoration: underline; }
:root { --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 2.5 8 6l-3.5 3.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* list rows: a rule between rows and none above the first. A rule on a rounded box curls up at both ends, so a row
   that carries a rule has square corners */
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 0; }
.row + .row { border-top: 1px solid var(--rule); border-radius: 0; }

/* KPIs as one divided strip: a label above a number, no icons, no tiles */
.kpis { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.kpi { padding: 16px var(--card-pad); }
.kpi + .kpi { border-left: 1px solid var(--border); }
.kpi-label { color: var(--muted); }
.kpi-value { margin-top: 6px; font-size: var(--fs-kpi); line-height: 1.15; font-weight: 500; letter-spacing: -0.01em; }
.kpi-value small { font-size: 0.55em; color: var(--muted); font-weight: 400; margin-left: 2px; }
.delta { margin-top: 4px; font-size: var(--fs-small); color: var(--muted); }
.delta .up { color: var(--positive); } .delta .down { color: var(--negative); }
/* KPIs as the chart's tabs: the selected one carries a 2px rule and an ink label; the others keep a grey label and
   their value in ink at a lighter weight (a grey value reads as disabled). When the tabs are the per-entity
   breakdown the brief asks for (takings by shop), add .entities: nothing changes but the rule */
.kpis[role="tablist"] .kpi { position: relative; cursor: pointer; }
.kpis[role="tablist"] .kpi[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); }
.kpis[role="tablist"]:not(.entities) .kpi[aria-selected="true"] .kpi-label { color: var(--text); }
.kpis[role="tablist"]:not(.entities) .kpi[aria-selected="false"] .kpi-value { color: var(--text); font-weight: 400; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 36px; padding: 0 12px; text-align: left; font-weight: 400; font-size: var(--fs-small); color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
/* cells share one baseline, so a figure never sits 2px below the name beside it; the row height comes from padding */
td { padding: calc((var(--row-height) - 20px) / 2) 12px; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
tbody tr:last-child td { border-bottom: 0; }
/* no hover that changes the fill; a row that drives a detail pane takes the nav pill's fill when selected */
tbody tr[aria-selected="true"] td { background: var(--active); }
th.n, td.n { text-align: right; }
td .sub { display: block; font-size: var(--fs-small); color: var(--muted); }
.truncate { max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* status pill: a pale tint with dark ink of the same hue, one per row */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-small); font-weight: 500; background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); white-space: nowrap; }
.pill.pos { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill.neg { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-height); padding: 0 12px; border-radius: var(--radius-control); border: 1px solid var(--control); background: var(--surface); font-weight: 500; cursor: pointer; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.btn:hover { background: var(--raised); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn.ghost { border-color: transparent; background: transparent; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; }
.field .hint { color: var(--muted); font-size: var(--fs-small); }
.input, select.input { height: 38px; padding: 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); }
.input::placeholder { color: var(--faint); }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: var(--gap); }
.tabs a { position: relative; padding: 10px 0; color: var(--muted); transition: color var(--t-hover) ease; }
.tabs a[aria-selected="true"] { color: var(--text); }
.tabs a[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); }
/* as wide as its options; full width only on a narrow phone */
.segmented { display: inline-flex; width: max-content; max-width: 100%; padding: 2px; border-radius: 8px; background: var(--raised); }
.segmented button { height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); }
.switch { appearance: none; width: 32px; height: 20px; border-radius: 999px; background: var(--control); position: relative; cursor: pointer; transition: background-color var(--t-ui) ease; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--t-ui) var(--ease-out); }
.switch:checked { background: var(--text); } .switch:checked::after { transform: translateX(12px); }

/* empty and loading states keep the frame; a loading value is a flat grey bar at its real size, with no shimmer */
.empty { display: grid; place-items: center; min-height: 96px; padding: 16px; border: 1px dashed var(--control); border-radius: var(--radius-control); color: var(--muted); text-align: center; }
.skeleton { background: var(--raised); border-radius: 4px; }

/* ---------- phone: the navigation folds away and the canvas takes the width ---------- */
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  /* the menu opens as a full-screen sheet; when closed it is fully inert, not just off-screen */
  .sidebar { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 20; background: var(--surface); transform: translateX(-100%); visibility: hidden; transition: transform var(--t-ui) var(--ease-out), visibility var(--t-ui); }
  .sidebar.open { transform: none; visibility: visible; }
  .menu-toggle { display: inline-flex; }
  .canvas { padding: 16px; }
  .grid > * { grid-column: 1 / -1 !important; }
  .kpis { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi + .kpi { border-left: 0; }
  .kpi:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .kpi:nth-child(2n) { border-left: 1px solid var(--border); }
  /* an odd count leaves no half-empty row: the last cell takes the full width */
  .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* KPI tabs in a 2-up grid: the selected cell takes a fill, never an underline floating mid-grid */
  .kpis[role="tablist"] .kpi[aria-selected="true"] { background: var(--active); }
  .kpis[role="tablist"] .kpi[aria-selected="true"]::after { content: none; }
  .title-row { flex-wrap: wrap; align-items: flex-start; }
}
@media (max-width: 480px) {
  .segmented { display: flex; width: 100%; }
  .segmented button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; } }

/* ============================================================
   Komponen kalkulator diet
   ============================================================ */

/* ---------- piring: elemen khas produk ini ----------
   Piring diisi sesuai komposisi makro: luas sudut protein, karbohidrat, dan
   lemak mengikuti porsinya, jadi grafik ini adalah takaran, bukan hiasan. */
.piring-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.piring-kolom { display: grid; gap: 6px; justify-items: center; }
.piring-svg { flex: none; }
.piring-svg .piring-piring { fill: var(--surface); stroke: var(--border); stroke-width: 1; }
.piring-svg .piring-isi { stroke: none; }
.piring-svg .piring-total { font-size: 13px; font-weight: 600; fill: var(--text); font-family: var(--font); }
.piring-svg .piring-label { font-size: 12px; fill: var(--muted); font-family: var(--font); }
.piring-kolom .piring-total { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.piring-kolom .piring-label { font-size: var(--fs-small); color: var(--muted); }
.piring-kunci { display: grid; gap: 10px; min-width: 180px; flex: 1; }
.piring-kunci li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; list-style: none; }
.piring-kunci .titik { width: 10px; height: 10px; border-radius: 3px; }
.piring-kunci .nama { font-size: var(--fs-body); }
.piring-kunci .nilai { font-size: var(--fs-body); font-weight: 500; }

/* satuan kecil selalu minimal 12px, tidak pernah ikut mengecil <small> */
small { font-size: 12px; }

/* ---------- takaran makro ---------- */
.makro { display: grid; gap: 14px; }
.makro-baris { display: grid; gap: 6px; }
.makro-kepala { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.makro-nama { font-size: var(--fs-body); }
.makro-nilai { font-size: var(--fs-body); font-weight: 500; }
.makro-nilai small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.makro-kcal { font-size: var(--fs-small); color: var(--muted); }
.makro--track { height: 8px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.makro-isi { height: 100%; border-radius: 999px; }

/* ---------- baris rencana makan ---------- */
.slot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.slot { border-top: 1px solid var(--rule); padding: 14px 0; }
.slot:first-child, .slot:nth-child(2) { border-top: 0; padding-top: 0; }
.slot-kepala { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.slot-nama { font-size: var(--fs-body); font-weight: 600; }
.slot-kkal { font-size: var(--fs-small); color: var(--muted); }
.slot-item { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; font-size: var(--fs-body); }
.slot-item .takaran { color: var(--muted); font-size: var(--fs-small); }
.slot-item .kkal { margin-left: auto; color: var(--muted); font-size: var(--fs-small); }

/* ---------- baris isi nilai ---------- */
.nilai-baris { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; }
.nilai-baris + .nilai-baris { border-top: 1px solid var(--rule); }
.nilai-nama { font-size: var(--fs-body); color: var(--muted); }
.nilai-angka { font-size: var(--fs-body); font-weight: 500; }
.nilai-angka small { font-weight: 400; color: var(--muted); margin-left: 3px; }

/* ---------- temuan / catatan ---------- */
.temuan { font-size: var(--fs-body); line-height: 1.5; color: var(--muted); }
.temuan strong { color: var(--text); font-weight: 600; }

/* ---------- baris tanggal diet ---------- */
.tanggal-baris { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; }
.tanggal-baris + .tanggal-baris { border-top: 1px solid var(--rule); }
.tanggal-nama { font-size: var(--fs-body); }
.tanggal-ket { font-size: var(--fs-small); color: var(--muted); }
.tanggal-nilai { font-size: var(--fs-body); font-weight: 500; }
.tanggal-nilai small { font-weight: 400; color: var(--muted); margin-left: 3px; }

/* ---------- panel pengaturan dua kolom ---------- */
.set-row { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 32px; padding: 32px 0; align-items: start; }
.set-row + .set-row { border-top: 1px solid var(--rule); }
.set-label h2 { font-size: var(--fs-section); font-weight: 600; margin-bottom: 6px; }
.set-label p { font-size: var(--fs-body); color: var(--muted); line-height: 1.5; }
.set-panel { background: var(--raised); border-radius: var(--radius-card); padding: var(--card-pad); }
.set-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.set-fields .field.wide { grid-column: 1 / -1; }
.set-panel .hint { margin-top: 12px; font-size: var(--fs-small); color: var(--muted); }
.set-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.set-actions .saved { font-size: var(--fs-small); color: var(--positive); }
.pilih { display: grid; gap: 8px; }
.pilih-opsi { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); cursor: pointer; font-size: var(--fs-body); }
.pilih-opsi input { accent-color: var(--text); margin: 0; }
.pilih-opsi:has(input:checked) { border-color: var(--text); }

/* ---------- baris progres berat ---------- */
.progres-baris { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 9px 0; }
.progres-tgl { font-size: var(--fs-small); color: var(--muted); }
.progres-nilai { font-size: var(--fs-body); font-weight: 500; }
.progres-nilai small { font-weight: 400; color: var(--muted); margin-left: 3px; }
.progres-selisih { font-size: var(--fs-small); color: var(--muted); }

/* ---------- daftar hari ---------- */
.hari-daftar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.hari-tab { flex: none; min-width: 62px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); cursor: pointer; text-align: left; }
.hari-tab .hari-nama { display: block; font-size: var(--fs-small); color: var(--muted); }
.hari-tab .hari-angka { display: block; font-size: var(--fs-body); font-weight: 500; margin-top: 2px; }
.hari-tab[aria-selected="true"] { border-color: var(--text); }
.hari-tab[aria-selected="true"] .hari-nama { color: var(--text); }

/* ---------- target tuple ---------- */
.target-kartu { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--card-pad); }
.target-angka { font-size: 34px; line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; }
.target-angka small { font-size: 0.45em; font-weight: 400; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.target-satuan { font-size: var(--fs-small); color: var(--muted); margin-top: 6px; }

/* ----------kbd helper ---------- */
.kbd { font-size: var(--fs-small); color: var(--faint); }

/* ---------- dialog ---------- */
dialog {
  width: min(420px, calc(100vw - 32px)); padding: var(--card-pad);
  border: 0; border-radius: var(--radius-card); background: var(--surface); color: var(--text);
}
dialog::backdrop { background: rgba(10, 10, 10, 0.32); }
dialog h2 { font-size: var(--fs-section); font-weight: 600; margin-bottom: 16px; }
dialog .field { margin-bottom: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ---------- HP ---------- */
@media (max-width: 860px) {
  .mobile-bar {
    display: flex; align-items: center; gap: 10px; height: 48px;
    margin: -8px -16px 12px; padding: 0 16px;
  }
  .mobile-brand { font-weight: 600; }
  .menu-toggle {
    width: 40px; height: 40px; border: 0; border-radius: 8px; background: none;
    color: var(--text); cursor: pointer; display: grid; place-items: center;
  }
  .menu-toggle svg { width: 18px; height: 18px; }
  .piring-wrap { gap: 16px; flex-direction: column; align-items: stretch; }
  .piring-kolom { justify-items: center; }
  .piring-kunci { min-width: 0; width: 100%; gap: 8px; }
  .piring-kunci li { grid-template-columns: 10px 1fr auto; gap: 8px; }
  .set-row { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 24px 0; }
  .set-fields { grid-template-columns: minmax(0, 1fr); }
  .progres-baris { grid-template-columns: 84px minmax(0, 1fr) auto; gap: 10px; }
  .slot-item .kkal { font-size: var(--fs-small); }
}

/* an empty message spans the block it stands in, never one squeezed column */
.rows .empty, .grid > .empty, li > .empty { grid-column: 1 / -1; width: 100%; }
