:root {
  --ink: #16382c;
  --gold: #c9a24a;
  --cream: #f6f1e7;
  --paper: #fffdf8;
  --muted: #6d6355;
  --line: #e4d8c4;
  --green: #2f6a4a;
  --danger: #b5453a;
  --floor: #d7c3a3;
  --tile: #cbb58e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, .app { height: 100%; }
body {
  font-family: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  background: #13251d;
  color: var(--ink);
  min-width: 320px;
}
button { font: inherit; border: 0; background: none; }
button:not(:disabled) { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }

.app { position: relative; overflow: hidden; }

.floor {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, #8fb8c9 0 28%, #6aa07a 28% 36%, var(--floor) 36%);
}
.floor::before {
  content: "";
  position: absolute; inset: 36% 0 0;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .55;
}

.building {
  position: absolute;
  left: 8%; right: 8%;
  top: 18%; bottom: 10%;
  background: #efe4d0;
  border: 6px solid #8a6a3d;
  border-radius: 8px;
  box-shadow: 0 18px 40px #0004;
}
.zone {
  position: absolute;
  border: 2px dashed #8a6a3d66;
  border-radius: 10px;
  padding: 8px;
  background: #fff8ecaa;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7a5a1e;
}
.zone.parkir { left: 4%; top: 6%; width: 28%; height: 10%; }
.zone.masuk { left: 42%; top: 8%; width: 16%; height: 8%; text-align: center; }
.zone.gudang { right: 4%; bottom: 6%; width: 24%; height: 18%; }
.zone.kasir { left: 6%; bottom: 8%; width: 22%; height: 16%; }

.shelf {
  position: absolute;
  width: 22%;
  min-height: 88px;
  background: linear-gradient(#f4e7cc, #e7d3aa);
  border: 3px solid #8a6a3d;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 6px 0 #8a6a3d;
}
.shelf b { display: block; font-size: 13px; }
.shelf span { color: var(--muted); font-size: 12px; }
.bar { margin-top: 6px; height: 8px; background: #eadcc4; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); }

.customer {
  position: absolute;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #f3c16b;
  border: 2px solid #16382c;
  display: grid; place-items: center;
  font-size: 14px;
  transition: left .6s linear, top .6s linear;
}

.hud, .menu {
  position: absolute; z-index: 5; inset: 0;
  pointer-events: none;
}
.hud > *, .menu > * { pointer-events: auto; }

.topbar {
  margin: 14px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  background: #fffdf8f2;
  border: 1px solid #d7c7a8;
  border-radius: 14px;
  padding: 10px 12px;
}
.brand { display: flex; gap: 10px; align-items: center; }
.mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--gold); color: var(--ink);
  display: grid; place-items: center; font-weight: 800; font-size: 22px;
}
.brand span { display: block; font-size: 10px; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
.brand strong { font-size: 18px; line-height: 1.1; }
.stats { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stats div { min-width: 110px; padding: 6px 12px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats em { display: block; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--muted); }
.stats b { font-size: 15px; }

.hero {
  position: absolute; left: 18px; top: 92px; max-width: 420px;
  color: #fff;
  text-shadow: 0 2px 8px #0008;
}
.hero small { letter-spacing: .18em; font-weight: 800; font-size: 11px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.05; margin: 8px 0; }
.hero p { max-width: 36ch; opacity: .92; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips span {
  background: #fffdf8e6; color: var(--ink); padding: 6px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 700;
}

.panel {
  position: absolute; right: 16px; top: 92px; width: min(340px, calc(100% - 32px));
  background: var(--paper);
  border: 1px solid #d7c7a8;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 16px 40px #0003;
}
.panel h2 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.panel .goal { font-size: 22px; margin: 6px 0 10px; }
.actions { display: grid; gap: 8px; margin-top: 12px; }
.btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 12px; background: #efe6d4; color: var(--ink);
  font-weight: 800; text-align: left;
}
.btn.primary { background: var(--ink); color: var(--cream); }
.btn small { display: block; font-weight: 600; opacity: .75; }

.dock {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 10px;
}
.card {
  background: var(--paper); border: 1px solid #d7c7a8; border-radius: 16px; padding: 12px;
  max-height: 210px; overflow: auto;
}
.card h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.row {
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
  padding: 8px 0; border-top: 1px solid var(--line);
}
.row:first-of-type { border-top: 0; }
.tiny { font-size: 12px; color: var(--muted); }
.ok { color: var(--green); font-weight: 800; }
.warn { color: var(--danger); font-weight: 800; }

.settings {
  position: absolute; inset: 0; background: #13251dcc; display: grid; place-items: center; z-index: 8;
}
.settings .box { width: min(420px, 92vw); background: var(--paper); border-radius: 18px; padding: 20px; }
.settings label { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }

@media (max-width: 820px) {
  .panel { top: auto; bottom: 230px; }
  .hero { display: none; }
  .stats div { min-width: 86px; padding: 6px 8px; }
  .dock { grid-template-columns: 1fr; }
}
