/* ============================================================
   Kedai Mini — stylesheet
   Playful, colourful, big-button styling for a kids cashier game.
   No external fonts/CDNs are used so the game works fully offline.
   ============================================================ */

:root{
  --cream: oklch(97% 0.015 85);
  --card: oklch(99% 0.004 90);
  --ink: oklch(27% 0.03 80);
  --ink-muted: oklch(52% 0.02 80);
  --line: oklch(90% 0.01 85);

  --orange: oklch(68% 0.19 45);
  --orange-dark: oklch(54% 0.17 45);
  --orange-soft: oklch(94% 0.05 45);

  --teal: oklch(64% 0.13 195);
  --teal-dark: oklch(50% 0.12 195);
  --teal-soft: oklch(93% 0.05 195);

  --pink: oklch(66% 0.17 350);
  --pink-dark: oklch(50% 0.16 350);
  --pink-soft: oklch(94% 0.06 350);

  --green: oklch(68% 0.17 145);
  --green-dark: oklch(54% 0.15 145);
  --green-soft: oklch(93% 0.07 145);

  --red: oklch(62% 0.21 25);
  --red-dark: oklch(48% 0.18 25);
  --red-soft: oklch(93% 0.06 25);

  --yellow: oklch(80% 0.16 90);

  --font-display: 'Segoe UI Rounded', 'SF Pro Rounded', system-ui, -apple-system, 'Trebuchet MS', sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', 'Trebuchet MS', sans-serif;
}

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
}

button, input{ font-family: inherit; }

h1,h2,h3{ font-family: var(--font-display); margin: 0; }

.hidden{ display: none !important; }

img{ max-width: 100%; display: block; }

::placeholder{ color: oklch(65% 0.02 85); font-weight: 700; }

/* ---------- layout shells ---------- */

#app{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.view{
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar{
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px 12px 28px;
  flex-wrap: wrap;
}

.icon-btn{
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: white;
  border: 3px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 var(--line);
  cursor: pointer;
  flex-shrink: 0;
  color: var(--ink);
}
.icon-btn:active{ transform: translateY(2px); box-shadow: 0 2px 0 var(--line); }

.badge-icon{
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.topbar-title h2{ font-size: 26px; font-weight: 700; line-height: 1.15; }
.topbar-title .sub{ font-size: 14px; color: var(--ink-muted); font-weight: 700; }

/* ---------- buttons ---------- */

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: 16px;
  color: white;
  user-select: none;
}
.btn:active{ transform: translateY(3px); }
.btn:disabled{ opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.btn-lg{ font-size: 19px; padding: 16px 20px; border-radius: 18px; }
.btn-md{ font-size: 16px; padding: 12px 18px; }
.btn-sm{ font-size: 14px; padding: 9px 16px; border-radius: 12px; }

.btn-orange{ background: var(--orange); box-shadow: 0 5px 0 var(--orange-dark); }
.btn-orange:active{ box-shadow: 0 2px 0 var(--orange-dark); }
.btn-teal{ background: var(--teal); box-shadow: 0 5px 0 var(--teal-dark); }
.btn-teal:active{ box-shadow: 0 2px 0 var(--teal-dark); }
.btn-pink{ background: var(--pink); box-shadow: 0 5px 0 var(--pink-dark); }
.btn-pink:active{ box-shadow: 0 2px 0 var(--pink-dark); }
.btn-green{ background: var(--green); box-shadow: 0 5px 0 var(--green-dark); }
.btn-green:active{ box-shadow: 0 2px 0 var(--green-dark); }

.btn-ghost{
  background: white;
  color: var(--ink-muted);
  border: 3px solid var(--line);
  box-shadow: none;
}
.btn-ghost.active-orange{ background: var(--orange); color: white; box-shadow: 0 3px 0 var(--orange-dark); border-color: transparent; }
.btn-ghost.active-teal{ background: var(--teal); color: white; box-shadow: 0 3px 0 var(--teal-dark); border-color: transparent; }
.btn-ghost.active-pink{ background: var(--pink); color: white; box-shadow: 0 3px 0 var(--pink-dark); border-color: transparent; }

/* ---------- form fields ---------- */

.field-label{ font-size: 14px; font-weight: 800; color: var(--ink-muted); margin-bottom: 6px; }

.field{
  width: 100%;
  border: 3px solid var(--line);
  border-radius: 16px;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  outline: none;
  background: white;
}
.field:focus{ border-color: var(--teal); }

.field-money{
  display: flex;
  align-items: center;
  border: 3px solid var(--line);
  border-radius: 16px;
  background: white;
  overflow: hidden;
}
.field-money.focus{ border-color: var(--teal); }
.field-money .prefix{ padding: 13px 14px; font-weight: 900; color: var(--orange-dark); background: var(--orange-soft); }
.field-money input{ border: none; outline: none; padding: 13px 16px; font-size: 16px; font-weight: 800; color: var(--ink); width: 100%; background: transparent; }

.field-scan{
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 3px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
}
.field-scan input{ border: none; outline: none; font-size: 16px; font-weight: 800; color: var(--ink); width: 100%; background: transparent; }
.field-scan svg{ flex-shrink: 0; color: var(--ink-muted); }

.code-chip{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 3px dashed var(--line);
  border-radius: 16px;
  padding: 13px 16px;
  background: white;
  font-family: monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ink-muted);
  cursor: pointer;
}
.code-chip:hover{ border-color: var(--teal); }

/* ---------- main menu ---------- */

#view-menu{
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  gap: 0;
  padding: 24px;
}

.menu-bg-blob{ position: absolute; border-radius: 50%; }
.blob-1{ top: -90px; left: -90px; width: 300px; height: 300px; background: oklch(64% 0.13 195 / 0.16); }
.blob-2{ bottom: -110px; right: -70px; width: 360px; height: 360px; background: oklch(68% 0.19 45 / 0.14); }
.blob-3{ top: 12%; right: 12%; width: 36px; height: 36px; background: var(--yellow); opacity: 0.7; }
.blob-4{ bottom: 20%; left: 10%; width: 26px; height: 26px; background: var(--teal); opacity: 0.35; }

.menu-logo{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 44px;
  position: relative;
  z-index: 1;
  text-align: center;
}
.menu-logo .logo-badge{
  width: 92px; height: 92px; border-radius: 26px;
  background: var(--orange); box-shadow: 0 8px 0 var(--orange-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; color: white;
}
.menu-logo h1{ font-size: 44px; font-weight: 700; letter-spacing: -0.5px; max-width: 700px; }
.menu-logo p{ margin: 4px 0 0 0; font-size: 17px; color: var(--ink-muted); font-weight: 700; }

.menu-buttons{ display: flex; gap: 28px; position: relative; z-index: 1; flex-wrap: wrap; justify-content: center; }

.menu-mode-btn{
  width: 320px;
  border-radius: 26px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  border: none;
  color: white;
  text-align: left;
}
.menu-mode-btn:active{ transform: translateY(3px); }
.menu-mode-btn .icon-wrap{
  width: 58px; height: 58px; border-radius: 16px;
  background: oklch(100% 0 0 / 0.22);
  display: flex; align-items: center; justify-content: center;
}
.menu-mode-btn .title{ font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.menu-mode-btn .desc{ font-size: 15px; color: oklch(100% 0 0 / 0.85); font-weight: 700; }
.menu-mode-btn .arrow{
  align-self: flex-end;
  width: 40px; height: 40px; border-radius: 50%;
  background: oklch(100% 0 0 / 0.22);
  display: flex; align-items: center; justify-content: center;
}

.mode-kedai{ background: var(--teal); box-shadow: 0 8px 0 var(--teal-dark); }
.mode-tetapan{ background: var(--orange); box-shadow: 0 8px 0 var(--orange-dark); }

.menu-footer{
  margin-top: 34px; display: flex; align-items: center; gap: 8px;
  color: var(--ink-muted); font-size: 14px; font-weight: 700;
  position: relative; z-index: 1; text-align: center;
}

.donate-card{
  margin-top: 30px; position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: var(--card); border: 3px dashed var(--line);
  border-radius: 22px; padding: 18px 22px 20px; max-width: 260px;
  box-shadow: 0 3px 0 var(--line);
}
.donate-msg{ font-size: 14px; font-weight: 700; color: var(--ink-muted); text-align: center; line-height: 1.5; }
.donate-qr{ width: 140px; height: auto; border-radius: 12px; box-shadow: 0 2px 0 var(--line); }

/* ---------- cashier / kedai view ---------- */

.cashier-body{
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  padding: 6px 28px 24px 28px;
  min-height: 0;
  align-items: start;
}

@media (max-width: 900px){
  .cashier-body{ grid-template-columns: 1fr; }
}

.scan-row{ display: flex; gap: 12px; margin-bottom: 18px; }
.scan-row .field-scan{ flex: 1; }

.section-title{ font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: 12px; }

.item-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 4px;
  padding-bottom: 4px;
}

@media (max-width: 900px){
  .item-grid{ max-height: 46vh; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

.item-tile{
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 0 var(--line);
  cursor: pointer;
  text-align: center;
  border: none;
  color: var(--ink);
}
.item-tile:active{ transform: scale(0.96); }
.item-tile.just-added{ animation: pop 0.35s ease; }
@keyframes pop{ 0%{ transform: scale(1);} 40%{ transform: scale(1.12);} 100%{ transform: scale(1);} }

.item-thumb{
  width: 52px; height: 52px; border-radius: 14px;
  background: oklch(96% 0.02 85);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.item-thumb img{ width: 100%; height: 100%; object-fit: cover; }

.price-badge{
  background: var(--green-soft); color: oklch(40% 0.13 145);
  font-weight: 900; font-size: 13px; padding: 3px 10px; border-radius: 999px;
}

.empty-hint{
  color: var(--ink-muted); font-weight: 700; font-size: 15px;
  padding: 30px; text-align: center; background: var(--card);
  border-radius: 18px;
}

.cart-panel{
  background: var(--card);
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 0 var(--line);
  position: sticky;
  top: 6px;
}

.cart-head{ display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cart-head h3{ font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.count-pill{ margin-left: auto; background: var(--teal); color: white; font-size: 12px; font-weight: 800; padding: 4px 11px; border-radius: 999px; }

.cart-list{ display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; margin-bottom: 6px; }
.cart-line{ display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cart-line .name{ font-weight: 800; font-size: 15px; }
.cart-line .qty{ font-size: 13px; color: var(--ink-muted); font-weight: 700; }
.cart-line .sub{ font-weight: 900; font-size: 15px; white-space: nowrap; }
.cart-line .remove-line{
  width: 26px; height: 26px; border-radius: 8px; border: none;
  background: var(--red-soft); color: var(--red-dark); cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.cart-empty{ color: var(--ink-muted); font-weight: 700; font-size: 14px; text-align: center; padding: 24px 0; }

.cart-divider{ border-top: 3px dashed var(--line); margin: 14px 0; }

.cart-total-row{ display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cart-total-row .label{ font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.cart-total-row .amount{ font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--orange-dark); }

.clear-cart-link{
  text-align: center; font-size: 13px; font-weight: 800; color: var(--ink-muted);
  cursor: pointer; margin-top: 10px; background: none; border: none;
}
.clear-cart-link:hover{ color: var(--red-dark); }

/* ---------- settings / tetapan view ---------- */

.settings-body{ flex: 1; display: flex; flex-direction: column; padding: 0 28px 28px 28px; min-height: 0; }

.shop-name-card{
  background: var(--card); border-radius: 20px; padding: 18px 22px;
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
  box-shadow: 0 3px 0 var(--line); flex-wrap: wrap;
}
.shop-name-card .field-label{ margin: 0; }
.shop-name-card .field{ max-width: 320px; }

.tabs-row{ display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }

.settings-grid{
  flex: 1; display: grid; grid-template-columns: 380px 1fr; gap: 24px; min-height: 0;
}
@media (max-width: 900px){ .settings-grid{ grid-template-columns: 1fr; } }

.form-card{
  background: var(--card); border-radius: 24px; padding: 26px;
  height: fit-content; box-shadow: 0 3px 0 var(--line);
}
.form-card h3{ font-family: var(--font-display); font-size: 21px; font-weight: 600; margin-bottom: 18px; }
.form-fields{ display: flex; flex-direction: column; gap: 15px; }

.image-picker{ display: flex; align-items: center; gap: 14px; }
.image-preview{
  width: 72px; height: 72px; border-radius: 16px; background: oklch(96% 0.02 85);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  overflow: hidden; position: relative; color: var(--ink-muted);
}
.image-preview img{ width: 100%; height: 100%; object-fit: cover; }
.image-picker-buttons{ display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.image-picker-btn{
  display: flex; align-items: center; gap: 8px; border: 3px dashed var(--line);
  border-radius: 14px; padding: 11px 15px; color: var(--ink-muted); font-weight: 700;
  font-size: 14px; cursor: pointer; background: none; font-family: inherit;
}
.image-picker-btn:hover{ border-color: var(--teal); }

.list-col{ display: flex; flex-direction: column; min-height: 0; }
.list-head{ display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.list-head h3{ font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.list-scroll{ flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; }

.list-row{
  background: var(--card); border-radius: 18px; padding: 13px 16px;
  display: flex; align-items: center; gap: 14px; box-shadow: 0 2px 0 var(--line);
}
.list-row .row-icon{
  width: 46px; height: 46px; border-radius: 14px; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.list-row .row-icon img{ width: 100%; height: 100%; object-fit: cover; }
.list-row .row-info{ flex: 1; min-width: 0; }
.list-row .row-name{ font-weight: 800; font-size: 15px; }
.list-row .row-code{ font-family: monospace; font-size: 12px; color: var(--ink-muted); font-weight: 700; }
.list-row .row-value{ font-weight: 900; font-size: 14px; padding: 6px 13px; border-radius: 999px; white-space: nowrap; }
.list-row .row-btn{
  width: 36px; height: 36px; border-radius: 12px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.row-btn-print{ background: var(--teal-soft); color: var(--teal-dark); }
.row-btn-del{ background: var(--red-soft); color: var(--red-dark); }

/* ---------- toast ---------- */

#toast{
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px);
  background: var(--ink); color: white; font-weight: 800; font-size: 15px;
  padding: 14px 22px; border-radius: 16px; box-shadow: 0 8px 20px oklch(0% 0 0 / 0.25);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 500; max-width: 90vw; text-align: center;
}
#toast.show{ opacity: 1; transform: translate(-50%, 0); }
#toast.toast-error{ background: var(--red-dark); }
#toast.toast-success{ background: var(--green-dark); }

/* ---------- payment modal ---------- */

.modal{
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop{
  position: absolute; inset: 0; background: oklch(20% 0.02 240 / 0.55);
}
.modal-card{
  position: relative; width: 100%; max-width: 480px;
  background: white; border-radius: 28px; padding: 28px;
  box-shadow: 0 20px 50px oklch(0% 0 0 / 0.35);
  max-height: 92vh; overflow-y: auto;
}

.modal-head{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h2{ font-size: 24px; font-weight: 700; }

.method-tabs{ display: flex; gap: 8px; margin-bottom: 16px; }
.method-tab{
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 800; font-size: 13px; padding: 10px 6px; border-radius: 13px;
  border: 3px solid var(--line); background: white; color: var(--ink-muted); cursor: pointer;
}
.method-tab.active{ border-color: transparent; color: white; }
.method-tab.active.tab-tunai{ background: var(--orange); box-shadow: 0 3px 0 var(--orange-dark); }
.method-tab.active.tab-kad{ background: var(--teal); box-shadow: 0 3px 0 var(--teal-dark); }
.method-tab.active.tab-baucar{ background: var(--pink); box-shadow: 0 3px 0 var(--pink-dark); }

.pay-total-card{
  background: var(--teal-soft); border-radius: 18px; padding: 15px 20px;
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
}
.pay-total-card .label{ font-weight: 800; font-size: 14px; color: var(--teal-dark); }
.pay-total-card .amount{ font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--teal-dark); }

.method-panel{ display: flex; flex-direction: column; gap: 14px; }

.bayaran-display{
  border: 3px solid var(--line); border-radius: 16px; padding: 14px 18px;
  font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--ink);
  background: white; text-align: right;
}

.quick-amounts{ display: flex; gap: 10px; }
.quick-amounts button{
  flex: 1; text-align: center; background: oklch(96% 0.01 85); border: none;
  border-radius: 12px; padding: 10px; font-weight: 800; font-size: 13px; color: var(--ink); cursor: pointer;
}
.quick-amounts button:active{ background: var(--orange-soft); }

.keypad{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.keypad button{
  background: white; border: 3px solid var(--line); border-radius: 14px;
  font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--ink);
  box-shadow: 0 3px 0 var(--line); cursor: pointer; height: 50px;
}
.keypad button:active{ transform: translateY(2px); box-shadow: none; }
.keypad button.key-clear{ color: var(--red-dark); font-size: 14px; }

.result-banner{
  border-radius: 18px; padding: 16px; display: flex; align-items: center; gap: 14px;
}
.result-banner.success{ background: var(--green-soft); }
.result-banner.fail{ background: var(--red-soft); }
.result-banner .result-icon{
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: white;
}
.result-banner.success .result-icon{ background: var(--green); }
.result-banner.fail .result-icon{ background: var(--red); }
.result-banner .result-title{ font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.result-banner.success .result-title{ color: var(--green-dark); }
.result-banner.fail .result-title{ color: var(--red-dark); }
.result-banner .result-sub{ font-size: 14px; font-weight: 800; color: var(--ink-muted); }

.voucher-reveal{
  background: linear-gradient(135deg, var(--pink-soft), oklch(96% 0.05 90));
  border: 3px dashed var(--pink); border-radius: 20px; padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.voucher-reveal .v-icon{
  width: 52px; height: 52px; border-radius: 16px; background: var(--pink);
  box-shadow: 0 4px 0 var(--pink-dark); display: flex; align-items: center; justify-content: center; color: white;
}
.voucher-reveal .v-label{ font-size: 13px; font-weight: 800; color: var(--pink-dark); }
.voucher-reveal .v-amount{ font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--pink-dark); }

.voucher-balance-row{ display: flex; align-items: center; justify-content: center; gap: 14px; }
.voucher-balance-row .box{ text-align: center; }
.voucher-balance-row .box .l{ font-size: 12px; font-weight: 800; color: var(--ink-muted); }
.voucher-balance-row .box .v{ font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.voucher-balance-row .strike{ text-decoration: line-through; color: var(--ink-muted); }

.card-visual{
  border-radius: 18px; background: var(--teal); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden;
}
.card-visual .cv-row{ display: flex; align-items: center; justify-content: space-between; }
.card-visual .cv-label{ color: white; font-weight: 800; font-size: 12px; letter-spacing: 1px; }
.card-visual .cv-name{ font-family: var(--font-display); font-size: 18px; font-weight: 600; color: white; letter-spacing: 1px; }
.card-visual .cv-barcode{ background: white; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.card-visual .cv-code{ font-family: monospace; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--ink); }

/* ---------- print area ---------- */

.print-only{ display: none; }

@page{ size: A4; margin: 10mm; }

@media print{
  html, body{ background: white !important; }
  body > *:not(#print-area){ display: none !important; }
  #print-area{ display: block !important; padding: 0; background: white !important; }
}

.print-card-wrap{
  width: 380px; border: 3px dashed oklch(75% 0.02 85); border-radius: 26px;
  padding: 16px; background: white; margin: 0 auto 20px auto;
  page-break-inside: avoid; break-inside: avoid;
}
.print-card-inner{ border-radius: 20px; padding: 22px; position: relative; overflow: hidden; color: white; }
.print-card-inner .pc-label{ display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 800; font-size: 13px; letter-spacing: 1px; }
.print-card-inner .pc-amount{ font-family: var(--font-display); font-size: 32px; font-weight: 700; margin-bottom: 2px; }
.print-card-inner .pc-name{ font-size: 14px; font-weight: 700; margin-bottom: 16px; opacity: 0.9; }
.print-card-inner .pc-barcode{ background: white; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.print-card-inner .pc-code{ font-family: monospace; font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--ink); }

/* Plain black-and-white item price/barcode label — like a real shop shelf tag. */
.print-label-wrap{
  width: 300px; border: 2px solid #1a1a1a; border-radius: 6px;
  padding: 16px 18px; background: white; margin: 0 auto 18px auto;
  page-break-inside: avoid; break-inside: avoid;
  text-align: center; color: #1a1a1a;
}
.print-label .pl-shop{ font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: #444; margin-bottom: 5px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.print-label .pl-name{ font-size: 16px; font-weight: 800; margin-bottom: 6px; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.print-label .pl-price{ font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-bottom: 10px; color: #1a1a1a; }
.print-label .pl-barcode{ display: flex; flex-direction: column; align-items: center; gap: 4px; border-top: 1px dashed #ccc; padding-top: 10px; }
.print-label .pl-code{ font-family: monospace; font-size: 13px; font-weight: 700; letter-spacing: 2px; color: #1a1a1a; }

/* Item labels print 2-up (5 left, 5 right = 10 per A4 page) so a batch of
   barcode stickers can be cut out and stuck straight onto items. */
.print-label-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 51mm;
  gap: 4mm 6mm;
}
.print-label-grid .print-label-wrap{
  width: auto;
  height: 100%;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.print-label-grid .print-label-wrap:nth-child(10n){
  page-break-after: always;
  break-after: page;
}

/* ---------- camera scan modal ---------- */

.camera-modal-card{ max-width: 420px; text-align: center; }

.camera-frame{
  position: relative; width: 100%; aspect-ratio: 4 / 3; background: #101314;
  border-radius: 20px; overflow: hidden; margin-bottom: 16px;
}
.camera-frame video{ width: 100%; height: 100%; object-fit: cover; display: block; }

.camera-scan-line{
  position: absolute; left: 8%; right: 8%; top: 18%; height: 3px; border-radius: 2px;
  background: var(--green); box-shadow: 0 0 10px 2px oklch(68% 0.17 145 / 0.7);
  animation: camera-scanline 1.6s ease-in-out infinite;
}
@keyframes camera-scanline{
  0%{ top: 16%; } 50%{ top: 80%; } 100%{ top: 16%; }
}

.camera-corner{ position: absolute; width: 28px; height: 28px; border: 4px solid var(--green); opacity: 0.9; }
.camera-corner.tl{ top: 10px; left: 10px; border-right: none; border-bottom: none; border-top-left-radius: 8px; }
.camera-corner.tr{ top: 10px; right: 10px; border-left: none; border-bottom: none; border-top-right-radius: 8px; }
.camera-corner.bl{ bottom: 10px; left: 10px; border-right: none; border-top: none; border-bottom-left-radius: 8px; }
.camera-corner.br{ bottom: 10px; right: 10px; border-left: none; border-top: none; border-bottom-right-radius: 8px; }

.camera-hint{ font-weight: 800; color: var(--ink-muted); font-size: 14px; }

/* Square viewfinder guide for the photo-capture modal (distinct from the
   barcode scan-line/corners above) — hints at the centre-crop capture area. */
.photo-guide{
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 62%; aspect-ratio: 1 / 1;
  border: 3px dashed rgba(255, 255, 255, 0.85); border-radius: 16px;
}

/* ---------- misc ---------- */

.scrolly::-webkit-scrollbar{ width: 10px; }
.scrolly::-webkit-scrollbar-thumb{ background: var(--line); border-radius: 8px; }
