/* Prototipe UI Sentosa Truck Parts — gaya kartu lembut biru (referensi Shopeers), sidebar dengan dropdown bergaris pohon. */
:root {
  --bg: #f4f5f8;
  --surface: #fff;
  --soft: #f6f7fa;
  --soft-2: #eff1f5;
  --line: #eceef3;
  --line-2: #e2e5eb;
  --strong: #101828;
  --text: #344054;
  --muted: #667085;
  --faint: #98a2b3;
  --primary: #2b5ff5;
  --primary-2: #1f4fe0;
  --primary-soft: #eef3ff;
  --primary-softer: #f6f8ff;
  --green: #12a150;
  --green-soft: #e7f8ee;
  --red: #e5484d;
  --red-soft: #fdecee;
  --orange: #f2711c;
  --orange-soft: #fff0e5;
  --amber: #b7791f;
  --amber-soft: #fdf4e1;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / .04);
  --shadow: 0 1px 2px rgb(16 24 40 / .04), 0 2px 8px rgb(16 24 40 / .03);
  --shadow-lg: 0 12px 32px rgb(16 24 40 / .10), 0 2px 6px rgb(16 24 40 / .05);
  --font: "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --sidebar-w: 248px;
  --r: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 20px; letter-spacing: -0.1px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; letter-spacing: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.strong { color: var(--strong); font-weight: 600; }
.ph, .ph-fill { line-height: 1; }

/* ================= Sidebar ================= */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; transition: width .2s ease, transform .2s ease; overflow-y: auto; scrollbar-width: none; }
.sb-top { height: 68px; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 20px; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.logo { width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #4f7dff, #1f4fe0); box-shadow: 0 4px 10px rgb(43 95 245 / .3), inset 0 1px 0 rgb(255 255 255 / .25); }
.logo .ph-fill { font-size: 18px; }
.brand b { font-size: 16px; font-weight: 700; color: var(--strong); letter-spacing: -0.4px; white-space: nowrap; }
.brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; line-height: 13px; letter-spacing: 0; }
.collapse-btn { width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.collapse-btn:hover { background: var(--soft); color: var(--text); }
.sb-nav { flex: 1 0 auto; padding: 6px 14px 12px; }
.sb-sep { height: 1px; background: var(--line); margin: 12px 6px; }
.sb-group { margin: 4px 0 6px; padding: 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--faint); }
.sb-item { position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--text); cursor: pointer; user-select: none; transition: background .15s, color .15s; }
.sb-item:hover { background: var(--soft); color: var(--strong); }
.sb-item > .ph { font-size: 19px; color: var(--muted); flex-shrink: 0; }
.sb-item .label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.sb-item.active > .ph { color: var(--primary); }
.sb-item.active::before { content: ""; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.sb-item .caret { font-size: 14px; color: var(--faint); transition: transform .2s ease; }
.sb-item.open .caret { transform: rotate(180deg); }
.sb-item.parent-active { color: var(--strong); font-weight: 600; }
.sb-item.parent-active > .ph { color: var(--strong); }
.nbadge { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--green-soft); color: var(--green); }
.nbadge.red { background: var(--red-soft); color: var(--red); }
.nbadge.beta { background: none; border: 1px dashed var(--line-2); color: var(--muted); font-weight: 500; }
.nbadge.new { background: var(--primary-soft); color: var(--primary); }

/* tree dropdown */
.tree { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.tree.open { grid-template-rows: 1fr; }
.tree > div { overflow: hidden; }
.tree ul { list-style: none; margin: 2px 0 6px; padding: 0 0 0 30px; }
.tree li { position: relative; padding: 2px 0 2px 16px; }
.tree li::before { content: ""; position: absolute; left: 0; top: 0; height: 21px; width: 12px; border-left: 1.5px solid var(--line-2); border-bottom: 1.5px solid var(--line-2); border-bottom-left-radius: 10px; }
.tree li:not(:last-child)::after { content: ""; position: absolute; left: 0; top: 20px; bottom: 0; border-left: 1.5px solid var(--line-2); }
.tree a { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 36px; padding: 0 8px 0 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.tree a:hover { color: var(--strong); background: var(--soft); }
.tree a.active { background: var(--surface); color: var(--strong); font-weight: 600; box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgb(16 24 40 / .08); }
.sq { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 7px; font-size: 12px; font-weight: 600; }
.sq.orange { background: #ffd8c2; color: #9a3a0b; }
.sq.green { background: #cdeedb; color: #146c3a; }

.sb-bottom { padding: 0 14px 14px; }
.promo { position: relative; overflow: hidden; margin-top: 10px; border-radius: 14px; padding: 16px; color: #fff; background: radial-gradient(120% 90% at 100% 0%, #5b86ff 0%, transparent 55%), linear-gradient(160deg, #2b5ff5, #1736a8); box-shadow: 0 8px 20px rgb(31 79 224 / .3); }
.promo::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / .16) 1px, transparent 1px); background-size: 9px 9px; mask-image: linear-gradient(200deg, #000 10%, transparent 60%); pointer-events: none; }
.promo-ic { width: 30px; height: 30px; border-radius: 9px; background: rgb(255 255 255 / .95); color: var(--primary); display: grid; place-items: center; margin-bottom: 10px; }
.promo b { display: block; font-size: 14px; font-weight: 700; }
.promo p { margin: 4px 0 12px; font-size: 12px; line-height: 17px; color: rgb(255 255 255 / .82); }
.promo .btn { width: 100%; position: relative; z-index: 1; background: rgb(255 255 255 / .16); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .3); }
.promo .btn:hover { background: rgb(255 255 255 / .24); }

/* collapsed sidebar */
body.sb-collapsed { --sidebar-w: 78px; }
body.sb-collapsed .brand b, body.sb-collapsed .brand small, body.sb-collapsed .sb-item .label, body.sb-collapsed .sb-item .caret, body.sb-collapsed .sb-item .nbadge, body.sb-collapsed .sb-group, body.sb-collapsed .tree, body.sb-collapsed .promo { display: none; }
body.sb-collapsed .sb-top { padding: 0; justify-content: center; flex-direction: column; gap: 6px; height: 96px; }
body.sb-collapsed .brand { flex: 0; }
body.sb-collapsed .sb-item { justify-content: center; padding: 0; }

/* ================= Main / topbar ================= */
.main { margin-left: var(--sidebar-w); min-width: 0; min-height: 100vh; transition: margin-left .2s ease; }
.topbar { position: sticky; top: 0; z-index: 30; height: 68px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: rgb(255 255 255 / .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.search-pill { display: flex; align-items: center; gap: 10px; width: 320px; max-width: 40vw; height: 40px; padding: 0 8px 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--faint); cursor: pointer; box-shadow: var(--shadow-sm); }
.search-pill:hover { border-color: var(--line-2); }
.search-pill .ph { font-size: 17px; color: var(--muted); }
.search-pill span { flex: 1; text-align: left; font-size: 13.5px; }
.search-pill kbd { font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.top-logo { display: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.round-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text); box-shadow: var(--shadow-sm); }
.round-btn:hover { background: var(--soft); }
.round-btn .ph { font-size: 18px; }
.round-btn .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }
.menu-btn { display: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #7a4a00; background: linear-gradient(145deg, #ffe2a8, #ffc56b); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }

.content { padding: 26px 28px 56px; display: flex; flex-direction: column; gap: 20px; max-width: 1480px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -0.6px; color: var(--strong); display: flex; align-items: center; gap: 10px; }
.page-head .sub { flex-basis: 100%; margin: -6px 0 0; color: var(--muted); font-size: 14px; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn.export-top { display: none; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: -8px; }
.back:hover { color: var(--primary); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); font-size: 13.5px; font-weight: 600; color: var(--strong); cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .1s; }
.btn:hover { background: var(--soft); }
.btn:active { transform: translateY(1px); }
.btn .ph { font-size: 17px; }
.btn.primary { color: #fff; background: linear-gradient(180deg, #3d6dff, #2253ea); box-shadow: 0 0 0 1px #1f4fe0, 0 4px 12px rgb(43 95 245 / .28), inset 0 1px 0 rgb(255 255 255 / .22); }
.btn.primary:hover { background: linear-gradient(180deg, #3566ff, #1d4ad8); }
.btn.sm { height: 32px; padding: 0 11px; border-radius: 10px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.date-range { display: inline-flex; align-items: center; height: 40px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); font-size: 13px; font-weight: 500; color: var(--strong); }
.date-range > span { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; height: 100%; cursor: pointer; }
.date-range > span + span { border-left: 1px solid var(--line); color: var(--text); }
.date-range .ph { font-size: 16px; color: var(--muted); }

/* ================= Cards ================= */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card.flush .card-head { padding: 18px 20px 0; }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--strong); letter-spacing: -0.2px; display: flex; align-items: center; gap: 8px; }
.card-head .more { margin-left: auto; color: var(--faint); font-size: 20px; cursor: pointer; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.card-head .more:hover { background: var(--soft); color: var(--text); }
.card-head a.more { font-size: 18px; }

.grid { display: grid; gap: 20px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); align-items: start; }
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* stat card */
.stat { padding: 18px 20px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 600; color: var(--strong); }
.stat-top .ph-fill { font-size: 20px; color: var(--primary); }
.stat-val { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.stat-val b { font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -0.8px; color: var(--strong); }
.stat-foot { margin-top: 8px; font-size: 12px; color: var(--faint); }
.delta { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--green-soft); color: var(--green); }
.delta.down { background: var(--red-soft); color: var(--red); }
.delta .ph-fill { font-size: 10px; }

/* line chart card */
.profit { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; align-items: center; }
.profit-val b { display: block; font-size: 34px; line-height: 40px; font-weight: 700; letter-spacing: -1.2px; color: var(--strong); margin: 4px 0 10px; }
.profit-val .vs { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); }
.legend { display: flex; gap: 14px; margin-top: 18px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--primary); vertical-align: middle; margin-right: 6px; }
.legend i.dash { background: repeating-linear-gradient(90deg, #c4c9d4 0 4px, transparent 4px 7px); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-size: 11px; fill: var(--faint); font-family: var(--font); }

.segments { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 18px; background: var(--surface); }
.segments .card-head { margin-bottom: 12px; }
.seg-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.seg { position: relative; padding: 2px 0 14px 12px; }
.seg::before { content: ""; position: absolute; left: 0; top: 0; bottom: 6px; width: 2px; border-radius: 2px; background: var(--c); }
.seg::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; border-radius: 0 6px 6px 0; background: linear-gradient(90deg, var(--c) var(--p), var(--soft-2) var(--p)); }
.seg b { display: flex; align-items: center; gap: 7px; font-size: 18px; font-weight: 700; color: var(--strong); letter-spacing: -0.4px; }
.seg b .ph-fill { font-size: 15px; color: var(--c); }
.seg span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* bar chart */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 22px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; cursor: pointer; }
.bar i { position: relative; width: 100%; max-width: 38px; border-radius: 10px; background: linear-gradient(180deg, #f1f3f7, #e6e9ef); transition: background .2s; }
.bar span { font-size: 12px; color: var(--faint); font-weight: 500; }
.bar.on i { background: linear-gradient(180deg, #5a85ff, #2253ea); box-shadow: 0 6px 14px rgb(43 95 245 / .3); }
.bar.on span { color: var(--primary); font-weight: 700; }
.bar i em { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 12px; font-weight: 700; color: var(--strong); opacity: 0; white-space: nowrap; }
.bar.on i em { opacity: 1; }
.bar:hover i em { opacity: 1; }

/* gauge */
.gauge { position: relative; width: 240px; max-width: 100%; margin: 0 auto; }
.gauge svg { width: 100%; display: block; }
.gauge-txt { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; }
.gauge-txt b { display: block; font-size: 32px; line-height: 36px; font-weight: 700; letter-spacing: -1px; color: var(--strong); }
.gauge-txt span { font-size: 11.5px; color: var(--muted); }
.center { display: flex; justify-content: center; margin-top: 8px; }

/* AI assistant */
.ai-card { position: relative; overflow: hidden; }
.ai-stage { position: relative; height: 150px; margin: 0 -20px; display: grid; place-items: center; background: radial-gradient(60% 70% at 50% 100%, #e6edff 0%, transparent 70%); }
.orb { width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #c9d8ff 0%, #6d95ff 18%, #2b5ff5 48%, #1534a6 80%); box-shadow: 0 24px 40px rgb(43 95 245 / .35), inset -8px -10px 24px rgb(10 30 110 / .35); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.ai-input { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.ai-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13px; }
.ai-input .send { width: 32px; height: 32px; border-radius: 9px; border: 0; display: grid; place-items: center; color: #fff; background: var(--primary); cursor: pointer; }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.suggest span { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--primary-softer); color: var(--primary); border: 1px solid #e0e8ff; cursor: pointer; }
.ai-cost { display: flex; justify-content: space-between; margin-top: 14px; font-size: 12px; color: var(--muted); }

/* table */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--text); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--primary-softer); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .ell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.tbl-wrap { overflow-x: auto; }
.thumb { width: 34px; height: 34px; border-radius: 10px; background: var(--soft-2); display: inline-grid; place-items: center; color: var(--strong); flex-shrink: 0; }
.thumb .ph { font-size: 18px; }
.cell-prod { display: flex; align-items: center; gap: 12px; }
.cell-prod b { display: block; font-weight: 600; color: var(--strong); max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
.cell-prod small { color: var(--faint); font-size: 12px; }
.money { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--strong); }
.money .ph-fill { color: var(--green); font-size: 15px; }

/* pills & status */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--soft-2); color: var(--text); }
.pill.blue { background: var(--primary-soft); color: var(--primary); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.orange { background: var(--orange-soft); color: var(--orange); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.line { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-weight: 500; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* list rows (kas, piutang, stok kritis) */
.rows { display: flex; flex-direction: column; }
.rowi { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line-2); }
.rowi:first-child { padding-top: 0; }
.rowi:last-child { border-bottom: 0; padding-bottom: 0; }
.rowi .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; font-size: 19px; }
.rowi .tx { flex: 1; min-width: 0; }
.rowi .tx b { display: block; font-weight: 600; color: var(--strong); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowi .tx small { color: var(--muted); font-size: 12px; }
.rowi .rt { text-align: right; font-size: 13px; }
.rowi .rt b { display: block; color: var(--strong); font-weight: 700; }
.ic.blue { background: var(--primary-soft); color: var(--primary); }
.ic.green { background: var(--green-soft); color: var(--green); }
.ic.orange { background: var(--orange-soft); color: var(--orange); }
.ic.red { background: var(--red-soft); color: var(--red); }
.ic.gray { background: var(--soft-2); color: var(--text); }

.bar-mini { height: 6px; border-radius: 99px; background: var(--soft-2); overflow: hidden; }
.bar-mini i { display: block; height: 100%; border-radius: 99px; background: var(--primary); }

/* reviewer banner */
.notice-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(90deg, var(--primary-softer), #fff 70%); border: 1px solid #e3eaff; }
.notice-card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--primary); box-shadow: var(--shadow); font-size: 20px; flex-shrink: 0; }
.notice-card .tx { flex: 1; min-width: 0; }
.notice-card b { color: var(--strong); font-size: 14px; }
.notice-card p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* ================= Produk ================= */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.search-box { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.search-box:focus-within { border-color: #b9cbff; box-shadow: 0 0 0 4px var(--primary-soft); }
.search-box .ph { font-size: 18px; color: var(--muted); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13.5px; color: var(--strong); }
.search-box input::placeholder { color: var(--faint); }
.select { height: 44px; padding: 0 36px 0 14px; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 256 256'%3E%3Cpath fill='%23667085' d='M213.7 101.7l-80 80a8 8 0 0 1-11.4 0l-80-80a8 8 0 0 1 11.4-11.4L128 164.7l74.3-74.4a8 8 0 0 1 11.4 11.4z'/%3E%3C/svg%3E") no-repeat right 14px center; appearance: none; font-size: 13px; font-weight: 500; color: var(--strong); cursor: pointer; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: #c8d5ff; color: var(--primary); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 10px rgb(43 95 245 / .25); }
.chip small { font-size: 11px; opacity: .7; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #dbe3ff; }
.pcard-img { position: relative; height: 112px; display: grid; place-items: center; background: radial-gradient(70% 90% at 50% 100%, #e8eeff, var(--soft) 70%); color: var(--primary); }
.pcard-img .ph { font-size: 46px; filter: drop-shadow(0 8px 10px rgb(43 95 245 / .2)); }
.pcard-img .pill { position: absolute; top: 12px; }
.pcard-img .pill:first-child { left: 12px; }
.pcard-img .pill:last-child { right: 12px; }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard-body b { color: var(--strong); font-weight: 600; font-size: 14px; line-height: 19px; }
.pcard-body small { color: var(--muted); font-size: 12px; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.pcard-foot .price { font-size: 16px; font-weight: 700; color: var(--strong); letter-spacing: -0.3px; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.stock.warn::before { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.stock.danger::before { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .ph { font-size: 32px; display: block; margin: 0 auto 10px; color: var(--faint); }

/* detail */
.hero { display: flex; gap: 20px; align-items: center; }
.hero-img { width: 96px; height: 96px; border-radius: 20px; display: grid; place-items: center; background: radial-gradient(80% 90% at 50% 100%, #dfe7ff, var(--soft) 75%); color: var(--primary); flex-shrink: 0; }
.hero-img .ph { font-size: 48px; }
.hero h1 { margin: 6px 0 8px; font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -0.5px; color: var(--strong); }
.hero .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: flex; flex-direction: column; gap: 10px; }
.kv div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.kv div span:first-child { color: var(--muted); }
.kv div span:last-child { color: var(--strong); font-weight: 600; }
.price-tiers { display: flex; flex-direction: column; gap: 8px; }
.tier { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.tier span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.tier span .ph { font-size: 16px; }
.tier b { font-size: 15px; font-weight: 700; color: var(--strong); letter-spacing: -0.3px; white-space: nowrap; }
.tier.hl { background: var(--primary-soft); border-color: #d9e3ff; }
.tier.hl span, .tier.hl b { color: var(--primary); }
.tier-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 4px 2px 0; font-size: 12px; color: var(--faint); }
.taglist { display: flex; gap: 8px; flex-wrap: wrap; }

/* flow (detail part) */
.flow { display: grid; grid-template-columns: 1fr 44px 1.15fr 44px 1fr; align-items: center; }
.flow-col { display: flex; flex-direction: column; gap: 12px; }
.fnode { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.fnode-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; color: var(--strong); font-size: 13.5px; }
.fnode-h .nbadge { margin-left: auto; background: var(--soft-2); color: var(--text); }
.fnode-b { padding: 0 14px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.fnode.hub { border-color: #d6e1ff; box-shadow: 0 0 0 4px var(--primary-softer), var(--shadow); }
.fnode.hub .fnode-h .ph { color: var(--primary); }
.fwire { height: 2px; background: repeating-linear-gradient(90deg, #c7d3f5 0 6px, transparent 6px 10px); position: relative; }
.fwire::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left-color: #9fb5f5; }

/* POS */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 20px; align-items: start; }
.pos .pgrid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pitem { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: all .15s; }
.pitem:hover { border-color: #c5d4ff; box-shadow: 0 0 0 4px var(--primary-softer), var(--shadow); }
.pitem-top { display: flex; gap: 10px; align-items: center; }
.pitem b { color: var(--strong); font-weight: 600; font-size: 13px; line-height: 17px; }
.pitem .price { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--strong); font-size: 14.5px; }
.add { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.pitem:hover .add { background: var(--primary); color: #fff; }
.cart { position: sticky; top: 88px; }
.cust { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); margin-bottom: 8px; }
.cust .ph { font-size: 18px; color: var(--muted); }
.cust select { flex: 1; border: 0; background: none; outline: 0; font-weight: 600; color: var(--strong); font-size: 13px; }
.cart-line { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line-2); }
.cart-line .nm { flex: 1; min-width: 0; }
.cart-line .nm b { display: block; font-weight: 600; color: var(--strong); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-line .nm small { color: var(--muted); font-size: 12px; }
.qty { display: inline-flex; align-items: center; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); height: 30px; }
.qty button { width: 28px; height: 28px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; }
.qty button:hover { color: var(--primary); }
.qty span { min-width: 20px; text-align: center; font-size: 13px; font-weight: 600; }
.totals { padding: 14px 0 4px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 20px; font-weight: 700; color: var(--strong); padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line); letter-spacing: -0.4px; }
.paymodes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 12px; padding: 4px; border-radius: 12px; background: var(--soft-2); }
.paymodes button { height: 34px; border-radius: 9px; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.paymodes button.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.notice { margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 18px; display: flex; gap: 8px; }
.notice .ph { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.notice.warn { background: var(--amber-soft); color: #8a5a12; border: 1px solid #f5e1b5; }
.notice.info { background: var(--primary-softer); color: #2346b8; border: 1px solid #e0e8ff; }

/* 3D store */
.store { position: relative; height: calc(100vh - 68px - 220px); min-height: 520px; border-radius: 14px; overflow: hidden; background: #efe9df; border: 1px solid var(--line); }
.store iframe { width: 100%; height: 100%; border: 0; display: block; }

/* 3D toolbar & controls (di luar model) */
.s3d-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; }
.s3d-team { display: flex; align-items: center; gap: 12px; flex: 1; flex-wrap: wrap; min-width: 0; }
.s3d-team .select { height: 40px; min-width: 260px; }
.s3d-lbl { font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--faint); }
.faces { display: flex; padding-left: 6px; }
.face { width: 34px; height: 34px; margin-left: -6px; border-radius: 50%; border: 2px solid #fff; background: var(--dot); color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: transform .15s; }
.face:hover { transform: translateY(-2px); z-index: 1; }
.face.lg { width: 46px; height: 46px; margin: 0; font-size: 14px; cursor: default; }
.s3d-controls { display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; padding: 14px 16px; }
.s3d-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.s3d-group .s3d-lbl { margin-right: 4px; }
.s3d-follow { display: inline-flex; gap: 6px; padding-left: 8px; border-left: 1px solid var(--line); }
.s3d-follow[hidden] { display: none; }
.s3d-controls .btn.on { background: var(--primary-soft); color: var(--primary); box-shadow: 0 0 0 1px #c9d7ff; }
.s3d-controls .btn span:empty { display: none; }
.s3d-vol { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 16px; }
.s3d-vol input { width: 90px; accent-color: var(--primary); }
.s3d-status { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--muted); }
.s3d-status:empty { display: none; }
.log-stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.log-stats3 div { padding: 12px 14px; border-radius: 12px; background: var(--soft); }
.log-stats3 b { display: block; font-size: 20px; font-weight: 700; color: var(--strong); }
.log-stats3 span { font-size: 12px; color: var(--muted); }
.s3d-log { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.s3d-log li { display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; color: var(--text); }
.s3d-log li:last-child { border-bottom: 0; }
.s3d-log li.muted { display: block; }
.s3d-log time { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.s3d-log .log-chip { display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px; margin-right: 8px; border-radius: 7px; background: var(--dot); color: #fff; font-size: 10.5px; font-weight: 700; }
.member { display: flex; flex-direction: column; gap: 14px; }
.member-head { display: flex; align-items: center; gap: 12px; }
.member-head > div { flex: 1; min-width: 0; }
.member-head b { display: block; font-size: 15px; color: var(--strong); }
.member-head small { color: var(--muted); font-size: 12.5px; }
.member-head .round-btn { width: 32px; height: 32px; }
.member-check { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.member-check input { width: 17px; height: 17px; accent-color: var(--primary); pointer-events: none; }
.member-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* placeholder */
.soon-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.soon-list li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--soft); font-size: 13.5px; color: var(--strong); font-weight: 500; }
.soon-list .ph-fill { color: var(--green); font-size: 18px; }
.link-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; margin: 0 -12px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--strong); }
.link-row:hover { background: var(--primary-softer); color: var(--primary); }

/* ================= Palette & toast ================= */
.palette-back { position: fixed; inset: 0; background: rgb(16 24 40 / .3); backdrop-filter: blur(2px); z-index: 80; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.palette-back.open { display: flex; }
.palette { width: min(580px, calc(100% - 32px)); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette-in .ph { font-size: 19px; color: var(--muted); }
.palette input { flex: 1; height: 54px; border: 0; outline: 0; font-size: 15px; }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: 380px; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 13.5px; color: var(--strong); }
.palette li .ph { font-size: 18px; color: var(--muted); }
.palette li.sel, .palette li:hover { background: var(--primary-soft); color: var(--primary); }
.palette li.sel .ph { color: var(--primary); }
.palette li small { margin-left: auto; color: var(--faint); font-size: 12px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 16px); opacity: 0; background: var(--strong); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 13px; font-weight: 500; transition: all .2s ease; z-index: 90; pointer-events: none; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= Mobile bottom nav ================= */
.bottom-nav { display: none; }
.scrim { display: none; }

/* ================= Responsive ================= */
@media (max-width: 1240px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
  .pos { grid-template-columns: minmax(0, 1fr); }
  .cart { position: static; }
}
@media (max-width: 1100px) {
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profit { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  body { background: var(--bg); padding-bottom: 84px; }
  body.sb-collapsed { --sidebar-w: 248px; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); z-index: 50; }
  .sidebar.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgb(16 24 40 / .3); z-index: 48; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; height: 64px; }
  .search-pill, .theme-btn { display: none; }
  .top-logo { display: flex; }
  .menu-btn { display: grid; border-radius: 12px; }
  .round-btn { border-radius: 12px; }
  .content { padding: 18px 16px 32px; gap: 16px; }
  .page-head h1 { font-size: 24px; }
  .head-actions { margin-left: 0; width: 100%; }
  .page-head.dash { row-gap: 14px; }
  .page-head.dash .btn.export-top { display: inline-flex; margin-left: auto; height: 38px; border-radius: 999px; }
  .page-head.dash .head-actions .btn.primary { display: none; }
  .page-head.dash .date-range, .page-head.dash .head-actions .btn { height: 36px; border-radius: 999px; font-size: 12.5px; }
  .g4 { gap: 12px; }
  .g3 { grid-template-columns: minmax(0, 1fr); }
  .notice-card { flex-wrap: wrap; }
  .notice-card .tx { flex-basis: calc(100% - 54px); }
  .notice-card .btn { margin-left: 54px; }
  .main { overflow-x: hidden; }
  .grid { gap: 16px; }
  .stat { padding: 14px; }
  .stat-val b { font-size: 21px; }
  .stat-val { gap: 6px; margin-top: 10px; }
  .stat-foot { font-size: 11px; }
  .seg-row { grid-template-columns: 1fr; gap: 10px; }
  .profit-val b { font-size: 30px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .flow { grid-template-columns: 1fr; gap: 10px; }
  .fwire { width: 2px; height: 22px; margin: 0 auto; background: repeating-linear-gradient(180deg, #c7d3f5 0 6px, transparent 6px 10px); }
  .fwire::after { right: -4px; top: auto; bottom: -6px; border-left-color: transparent; border-top-color: #9fb5f5; }
  .store { height: 60vh; min-height: 400px; }
  .s3d-team .select { min-width: 0; flex: 1; }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: 76px; padding: 0 12px 14px; background: rgb(255 255 255 / .94); backdrop-filter: blur(12px); border-top: 1px solid var(--line); justify-content: space-around; align-items: stretch; }
  .bottom-nav a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--faint); font-size: 10.5px; font-weight: 600; }
  .bottom-nav a .ph, .bottom-nav a .ph-fill { font-size: 23px; }
  .bottom-nav a.on { color: var(--primary); }
  .bottom-nav a.on::after { content: ""; position: absolute; bottom: 4px; width: 22px; height: 3px; border-radius: 3px; background: var(--primary); }
  .bottom-nav::after { content: ""; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); width: 120px; height: 4px; border-radius: 4px; background: #101828; opacity: .85; }
}
@media (max-width: 520px) {
  .tbl th, .tbl td { padding-left: 14px; padding-right: 14px; }
  .date-range > span + span { display: none; }
}

.tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 20px; }
.col > .search-box { flex: none; }
