:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --text: #17212b;
  --muted: #66727e;
  --primary: #ef6c35;
  --primary-dark: #c9501d;
  --primary-soft: #fff4ef;
  --primary-track: #fde3d6;
  --line: #e4e8ec;
  --danger: #c93b3b;
  --danger-soft: #fdecec;
  --good: #16794a;
  --good-soft: #e6f6ee;
  --warn: #9a5b00;
  --warn-soft: #fff4dc;
  --info-soft: #eaf2fb;
  --sale: #c2185b;
  --sale-soft: #fdebf2;
  --expo: #5b3cc4;
  --expo-soft: #efeafd;
  --shadow: 0 10px 30px rgba(31, 42, 55, 0.08);
  --topbar-h: 76px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

button, input { font: inherit; color: inherit; }

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:disabled { cursor: not-allowed; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(239,108,53,.45);
  outline-offset: 2px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  background: white;
}
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(239,108,53,.13); }

.muted { color: var(--muted); font-size: 13px; }
.primary { border: 0; background: var(--primary); color: white; border-radius: 12px; padding: 11px 18px; font-weight: 800; }
.primary:hover { background: var(--primary-dark); }
.primary:disabled { opacity: .6; }
.secondary { border: 1px solid var(--line); background: white; color: var(--text); border-radius: 12px; padding: 10px 16px; font-weight: 700; }
.secondary:hover { border-color: #cfd6dc; background: var(--panel-soft); }
.danger-text { border: 0; background: transparent; color: var(--danger); font-weight: 700; padding: 6px 8px; border-radius: 8px; }
.danger-text:hover { background: var(--danger-soft); }
.icon-btn { border: 0; background: transparent; font-size: 18px; width: 40px; height: 40px; border-radius: 10px; }
.icon-btn:hover { background: var(--panel-soft); }
.full { width: 100%; margin-top: 10px; }

/* ---------- Top bar ---------- */
.app { min-height: 100vh; }

.topbar {
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-size: 24px;
  background: var(--primary-soft);
}
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.topbar p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.topbar-actions { display: flex; gap: 10px; align-items: center; }

.status-pill {
  font-size: 12px; font-weight: 700;
  padding: 7px 11px; border-radius: 999px;
  background: var(--panel-soft); color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.status-pill.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.status-pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.status-pill.bad { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  min-height: calc(100vh - var(--topbar-h));
}

.products-panel { padding: 22px; overflow: auto; }

.toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-wrap { position: relative; width: 280px; max-width: 100%; }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .6; pointer-events: none; }
#searchInput { padding-left: 38px; }

.categories { display: flex; gap: 8px; flex-wrap: wrap; }

.category-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--muted);
  font-weight: 700;
}
.category-btn .count {
  font-size: 11px; margin-left: 4px; padding: 1px 7px; border-radius: 999px;
  background: var(--panel-soft);
}
.category-btn.active { color: white; border-color: var(--primary); background: var(--primary); }
.category-btn.active .count { background: rgba(255,255,255,.25); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.product-card {
  position: relative;
  min-height: 150px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: var(--panel);
  padding: 16px;
  text-align: left;
  box-shadow: 0 1px 0 var(--line), 0 4px 14px rgba(31,42,55,.05);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.product-card:hover { box-shadow: var(--shadow); }
.product-card:active { transform: scale(.96); }
.product-card.in-cart { border-color: var(--primary); }
.product-card.bump { animation: bump .25s ease; }
@keyframes bump { 50% { transform: scale(.95); } }

.qty-badge {
  position: absolute; top: 10px; right: 10px;
  min-width: 28px; height: 28px; padding: 0 8px;
  border-radius: 999px; display: grid; place-items: center;
  background: var(--primary); color: white; font-weight: 900; font-size: 14px;
}

.product-emoji {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 15px;
  background: var(--primary-soft);
  font-size: 29px;
  margin-bottom: 12px;
}
.product-name { font-weight: 800; display: block; line-height: 1.25; }
.product-category { color: var(--muted); font-size: 12px; margin: 3px 0 10px; display: block; }
.product-price { color: var(--primary-dark); font-weight: 900; font-size: 16px; }

.empty-state {
  grid-column: 1 / -1;
  height: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  gap: 8px;
}
.empty-state.small { min-height: 90px; }
.empty-state button { margin-top: 6px; }
.empty-icon { font-size: 38px; opacity: .7; }

.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Cart ---------- */
.cart-panel {
  background: var(--panel);
  border-left: 1px solid var(--line);
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
}

.cart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.cart-heading h2 { margin: 0; font-size: 20px; }
.cart-heading span { color: var(--muted); font-size: 13px; }

.cart-items { flex: 1; overflow-y: auto; padding: 4px 0; min-height: 150px; }

.cart-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  grid-template-areas: "emoji info total" "emoji qty qty";
  gap: 6px 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cart-emoji { grid-area: emoji; font-size: 24px; width: 38px; height: 38px; border-radius: 11px; background: var(--primary-soft); display: grid; place-items: center; align-self: start; }
.cart-info { grid-area: info; min-width: 0; }
.cart-info h4 { margin: 0 0 2px; font-size: 15px; }
.cart-info small { color: var(--muted); }
.line-total { grid-area: total; font-size: 15px; }
.qty-controls { grid-area: qty; display: flex; align-items: center; gap: 8px; }

.qty-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  font-weight: 800;
  font-size: 17px;
}
.qty-btn:hover { border-color: var(--primary); }
.qty-btn.remove { font-size: 15px; }
.qty { min-width: 26px; text-align: center; font-weight: 800; font-size: 16px; }

.summary { border-top: 1px solid var(--line); padding-top: 10px; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; font-size: 22px; }
.summary .total span { color: var(--muted); font-size: 16px; }

.payment-title { font-size: 13px; font-weight: 800; margin: 14px 0 8px; }

.payment-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.payment {
  min-height: 60px;
  border: 2px solid var(--line);
  background: white;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.payment span { font-size: 13px; font-weight: 700; }
.payment.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }

.cash-section { margin-top: 12px; }
.cash-section label { font-size: 13px; font-weight: 800; display: block; margin-bottom: 7px; }
.quick-cash { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.quick-cash:empty { display: none; }
.chip {
  border: 1px solid var(--line); background: white;
  border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: 13px;
}
.chip:hover { border-color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: white; }

.change-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; padding: 10px 12px; border-radius: 12px;
  background: var(--panel-soft); font-size: 15px;
}
.change-row strong { font-size: 18px; }
.change-row.ok { background: var(--good-soft); color: var(--good); }
.change-row.short { background: var(--danger-soft); color: var(--danger); }

.pay-btn {
  margin-top: 14px;
  min-height: 60px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(239,108,53,.28);
}
.pay-btn:hover:not(:disabled) { background: var(--primary-dark); }
.pay-btn:disabled { background: #c8cfd6; box-shadow: none; }

.mobile-cart-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 6;
  display: none;
  align-items: center; justify-content: space-between; gap: 10px;
  border: 0; border-radius: 16px; padding: 14px 18px;
  background: var(--text); color: white; font-weight: 700;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.mobile-cart-bar strong { font-size: 17px; }

/* ---------- Toasts ---------- */
.toast-host {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 50; pointer-events: none; width: min(520px, calc(100% - 32px));
}
.toast {
  pointer-events: auto;
  padding: 12px 16px; border-radius: 12px;
  background: var(--text); color: white; font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: none; }
.toast.success { background: var(--good); }
.toast.error { background: var(--danger); }

/* ---------- Dialogs ---------- */
dialog {
  border: 0;
  border-radius: 20px;
  padding: 0;
  width: min(720px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  box-shadow: 0 25px 80px rgba(0,0,0,.22);
  color: var(--text);
}
dialog.wide { width: min(1040px, calc(100% - 24px)); }
dialog::backdrop { background: rgba(13, 23, 33, .55); }

.modal { padding: 22px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  gap: 10px;
}
.modal-header h2 { margin: 0; }
.modal-header p { margin: 4px 0 0; color: var(--muted); }

.notice { padding: 11px 14px; border-radius: 12px; font-size: 14px; margin: 8px 0; background: var(--info-soft); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.error { background: var(--danger-soft); color: var(--danger); }

/* Manage items */
.manage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px;
  margin-top: 18px;
}

.item-form {
  border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  background: var(--panel-soft); align-self: start;
}
.item-form.editing { border-color: var(--primary); background: var(--primary-soft); }
.form-title { font-weight: 900; font-size: 16px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0 12px;
}
.form-grid label { font-size: 12px; font-weight: 800; }
.form-grid input { margin-top: 6px; font-weight: 500; }
.span-2 { grid-column: 1 / -1; }

.emoji-picks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -4px; }
.emoji-pick { border: 1px solid var(--line); background: white; border-radius: 9px; width: 36px; height: 36px; font-size: 18px; }
.emoji-pick:hover { border-color: var(--primary); }

.margin-preview {
  font-size: 14px; font-weight: 700; padding: 10px 12px; border-radius: 12px;
  background: white; color: var(--muted); border: 1px dashed var(--line);
}
.margin-preview.gain { background: var(--good-soft); color: var(--good); border-color: transparent; }
.margin-preview.loss { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 14px; }

.item-list-panel { min-width: 0; }
.list-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-weight: 900; }
.list-heading small { color: var(--muted); font-weight: 600; }
.list-heading input { max-width: 180px; padding: 9px 12px; }

.manage-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  max-height: min(460px, 60vh);
  overflow-y: auto;
}

.manage-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}
.manage-row:last-child { border-bottom: 0; }
.manage-row.editing { background: var(--primary-soft); }
.manage-emoji { font-size: 22px; width: 40px; height: 40px; border-radius: 11px; background: var(--primary-soft); display: grid; place-items: center; }
.manage-info { min-width: 0; }
.manage-info small { color: var(--muted); display: block; margin: 2px 0 5px; }
.manage-actions { display: flex; gap: 6px; }

.chip-tag {
  display: inline-block; font-size: 11px; font-weight: 800;
  padding: 2px 8px; border-radius: 999px; background: var(--panel-soft); color: var(--muted);
}
.chip-tag.gain { background: var(--good-soft); color: var(--good); }
.chip-tag.loss { background: var(--danger-soft); color: var(--danger); }
.chip-tag.warn { background: var(--warn-soft); color: var(--warn); }

.small-btn { border: 1px solid var(--line); background: white; border-radius: 9px; padding: 8px 11px; font-weight: 700; font-size: 13px; }
.small-btn:hover { border-color: #cfd6dc; }
.small-btn.delete { color: var(--danger); }

/* Receipt */
.receipt-modal { text-align: center; max-width: 430px; margin: auto; }
.receipt-icon {
  width: 64px; height: 64px; margin: 0 auto 8px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--good-soft); color: var(--good); font-size: 32px; font-weight: 900;
}
.receipt-modal h2 { margin: 0 0 14px; }
.receipt { text-align: left; border: 1px dashed var(--line); border-radius: 14px; padding: 14px 16px; }
.r-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px dashed var(--line); }
.r-head strong { color: var(--text); }
.r-line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.r-total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 9px; font-size: 18px; }
.r-change { color: var(--good); font-size: 16px; }
.receipt-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 16px; }

/* ---------- Report ---------- */
.report-modal { transition: opacity .15s; }
.report-modal.loading .report-cards,
.report-modal.loading .report-section { opacity: .45; }

.report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 12px;
}
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel-soft); border: 1px solid var(--line); }
.segmented button { border: 0; background: transparent; border-radius: 9px; padding: 8px 12px; font-weight: 700; font-size: 13px; color: var(--muted); }
.segmented button.active { background: white; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.segmented.small button { padding: 5px 10px; font-size: 12px; }
.range-inputs { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.range-inputs label { font-size: 12px; font-weight: 800; }
.range-inputs input { margin-top: 4px; padding: 9px 11px; width: 150px; font-weight: 500; }

.report-cards {
  display: grid;
  grid-template-columns: 1.35fr 1.35fr 1fr 1fr 1fr 1fr;
  gap: 10px;
}
.report-card { border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; background: var(--panel-soft); min-width: 0; }
.report-card span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.report-card strong { font-size: 18px; display: block; overflow-wrap: anywhere; }
.report-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.report-card.highlight { background: var(--primary-soft); border-color: rgba(239,108,53,.35); }
.report-card.profit { background: var(--good-soft); border-color: transparent; }
.report-card.profit strong, .report-card.profit small { color: var(--good); }
.report-card.profit.negative { background: var(--danger-soft); }
.report-card.profit.negative strong, .report-card.profit.negative small { color: var(--danger); }

.report-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
.report-section { margin-top: 18px; min-width: 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h3 { margin: 0; font-size: 16px; }

/* Horizontal bars (best sellers, payment methods) */
.bar-list { border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; }
.bar-row {
  display: grid;
  grid-template-columns: auto minmax(90px, 1.1fr) minmax(60px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-radius: 8px;
}
.bar-row:not(:has(.rank)) { grid-template-columns: minmax(90px, 1.1fr) minmax(60px, 1fr) auto; }
.bar-row:hover .bar-fill, .bar-row:focus .bar-fill { background: var(--primary-dark); }
.rank {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 900; background: var(--panel-soft); color: var(--muted);
}
.rank-1 { background: #fff1c2; color: #7a5600; }
.rank-2 { background: #eceff2; color: #4a5561; }
.rank-3 { background: #f7e2d2; color: #7c4420; }
.bar-label { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-label small { color: var(--muted); font-weight: 600; }
.bar-track { height: 12px; border-radius: 4px; background: var(--primary-track); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--primary); transition: width .3s ease; }
.bar-value { font-weight: 800; font-size: 14px; text-align: right; white-space: nowrap; }
.unsold { margin: 8px 0 4px; font-size: 13px; color: var(--muted); }

/* Column chart (sales by hour / day) */
.column-chart { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 26px 12px 8px; }
.col-gridline { position: absolute; left: 12px; right: 12px; top: 26px; border-top: 1px solid var(--line); }
.col-gridline span { position: absolute; top: -20px; left: 0; font-size: 11px; color: var(--muted); }
.cols { display: flex; gap: 2px; height: 170px; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; border-radius: 6px; }
.col:hover, .col:focus { background: var(--panel-soft); }
.col-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid #cdd4da; }
.col-bar { width: 100%; max-width: 24px; background: var(--primary); border-radius: 4px 4px 0 0; transition: height .3s ease; }
.col:hover .col-bar, .col:focus .col-bar { background: var(--primary-dark); }
.col-label { font-size: 10px; color: var(--muted); height: 18px; line-height: 18px; white-space: nowrap; }

.chart-tooltip {
  position: fixed; z-index: 60; pointer-events: none;
  background: var(--text); color: white; font-size: 13px; font-weight: 600;
  padding: 7px 10px; border-radius: 8px; max-width: 280px;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}

/* Product table */
.report-table-wrap { border: 1px solid var(--line); border-radius: 14px; overflow: auto; max-height: 360px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report-table th, .report-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.report-table th {
  background: var(--panel-soft); font-size: 12px; position: sticky; top: 0;
  cursor: pointer; user-select: none;
}
.report-table th:hover { color: var(--primary-dark); }
.report-table th.sorted::after { content: " " attr(data-arrow); color: var(--primary-dark); }
.report-table td:not(:first-child), .report-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.report-table tbody tr:last-child td { border-bottom: 0; }
.report-empty { text-align: center !important; color: var(--muted); padding: 24px !important; }
.loss-text { color: var(--danger); }

/* Transactions */
.transaction-list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.txn {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 80px 110px 90px;
  gap: 10px; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.txn:last-child { border-bottom: 0; }
.txn-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.txn-items { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txn-method { color: var(--muted); }
.txn-total { text-align: right; font-variant-numeric: tabular-nums; }
.txn-action { text-align: right; }
.txn.voided .txn-items, .txn.voided .txn-total { text-decoration: line-through; color: var(--muted); }
.transaction-list > .full { margin: 0; border: 0; border-radius: 0; border-top: 1px solid var(--line); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .report-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  :root { --topbar-h: 68px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .cart-panel {
    position: relative;
    top: 0;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-bottom: 90px;
  }
  .cart-items { flex: none; max-height: none; }
  .mobile-cart-bar { display: flex; }
  .manage-layout { grid-template-columns: minmax(0, 1fr); }
  .manage-list { max-height: none; }
  .txn { grid-template-columns: 1fr auto; grid-template-areas: "items total" "time action"; row-gap: 4px; }
  .txn-items { grid-area: items; }
  .txn-total { grid-area: total; }
  .txn-time { grid-area: time; font-size: 12px; }
  .txn-method { display: none; }
  .txn-action { grid-area: action; }
}

@media (max-width: 620px) {
  .topbar { padding: 10px 14px; }
  .topbar h1 { font-size: 18px; }
  .brand-logo { width: 38px; height: 38px; font-size: 20px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions button { padding: 9px 10px; }
  .topbar-actions button span { display: none; }
  .status-pill { font-size: 11px; padding: 6px 8px; }
  .products-panel { padding: 14px; }
  .search-wrap { width: 100%; }
  .categories { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; }
  .category-btn { white-space: nowrap; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card { min-height: 138px; padding: 13px; }
  .cart-panel { padding: 15px 15px 90px; }
  .modal { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .report-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-toolbar, .range-inputs { align-items: stretch; flex-direction: column; }
  .range-inputs input { width: 100%; }
  .list-heading { flex-direction: column; align-items: stretch; }
  .list-heading input { max-width: none; }
  .bar-row { grid-template-columns: auto minmax(0, 1.6fr) minmax(40px, .7fr) auto; gap: 8px; }
  .bar-row:not(:has(.rank)) { grid-template-columns: minmax(0, 1.6fr) minmax(40px, .7fr) auto; }
}

/* ---------- Printing: only the receipt ---------- */
@media print {
  body { background: white; }
  .app, .toast-host, dialog:not(#receiptDialog) { display: none !important; }
  dialog#receiptDialog { position: static; box-shadow: none; width: 80mm; max-height: none; }
  dialog::backdrop { display: none; }
  .receipt-icon, .receipt-actions { display: none; }
  .receipt { border: 0; padding: 0; }
}

/* ---------- Stock & discards ---------- */
.discard-panel { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.discard-preview { font-size: 13px; font-weight: 700; color: var(--danger); min-height: 1em; }
.discard-list { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; background: white; max-height: 260px; overflow-y: auto; }
.discard-total { padding: 9px 13px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--panel-soft); }
.discard-total strong { color: var(--text); }
.discard-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 13px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.discard-row:last-child { border-bottom: 0; }
.discard-row.editing { background: var(--primary-soft); }
.discard-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.discard-list .empty-state.small, .discard-list .notice { margin: 0; }

.report-cards.stock-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 12px; }
.report-card.loss { background: var(--danger-soft); border-color: transparent; }
.report-card.loss strong, .report-card.loss small { color: var(--danger); }
.report-card strong.loss-text { color: var(--danger); }
.report-table tfoot td {
  position: sticky; bottom: 0; background: var(--panel-soft); font-weight: 800;
  border-top: 1px solid var(--line); border-bottom: 0;
}
.report-table .muted { color: var(--muted); }

@media (max-width: 1000px) {
  .report-cards.stock-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .report-cards.stock-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Discounts ---------- */
.sale-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--sale); color: white; font-weight: 900; font-size: 13px;
}
.product-card.on-sale .product-emoji { margin-top: 18px; }
.was-price { color: var(--muted); font-weight: 600; font-size: .85em; margin-right: 6px; }
.sale-tag { color: var(--sale); font-weight: 800; white-space: nowrap; }

.chip-tag.sale { background: var(--sale-soft); color: var(--sale); }
.small-btn.sale { color: var(--sale); border-color: var(--sale); background: var(--sale-soft); }
.manage-actions { flex-wrap: wrap; justify-content: flex-end; }

.discount-box {
  margin-top: 12px; padding: 12px; border-radius: 14px;
  background: white; border: 1px dashed var(--line);
}
.discount-box.active { border: 1px solid var(--sale); background: var(--sale-soft); }
.discount-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.discount-head .form-title { display: flex; align-items: center; gap: 8px; }
.discount-help { margin: 4px 0 10px; color: var(--muted); font-size: 13px; }
.discount-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.discount-picks .chip { min-height: 40px; }
.discount-picks .chip.active { background: var(--sale); border-color: var(--sale); }
.discount-input { display: block; margin-top: 10px; font-size: 12px; font-weight: 800; }
.discount-input input { margin-top: 6px; font-weight: 500; }
.discount-preview { margin-top: 10px; font-size: 14px; font-weight: 700; border-radius: 12px; }
.discount-preview:empty { display: none; }
.discount-preview.gain { padding: 10px 12px; background: white; color: var(--sale); }
.discount-preview.loss { padding: 10px 12px; background: var(--danger-soft); color: var(--danger); }

.r-discount { color: var(--muted); font-size: 12px; }
.r-saved { color: var(--sale); font-size: 15px; }

.no-stock-note { margin: 0; padding: 9px 12px; border-radius: 12px; background: var(--info-soft); font-size: 13px; font-weight: 700; color: var(--text); }

/* ---------- Main / Expo report switch and prep bills ---------- */
.scope-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.scope-switch button {
  border: 2px solid var(--line); background: white; border-radius: 14px;
  padding: 12px; font-weight: 800; font-size: 15px; color: var(--muted);
}
.scope-switch button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.scope-switch button[data-scope="expo"].active { border-color: var(--expo); background: var(--expo-soft); color: var(--expo); }
.report-modal.expo .report-card.highlight { background: var(--expo-soft); border-color: rgba(91,60,196,.35); }



.bill-form {
  display: grid; grid-template-columns: 160px minmax(0, 1fr) 150px auto;
  gap: 10px; align-items: end;
  padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft);
}
.bill-form.editing { border-color: var(--expo); background: var(--expo-soft); }
.bill-form label { font-size: 12px; font-weight: 800; }
.bill-form input { margin-top: 4px; font-weight: 500; }
.bill-actions { display: flex; gap: 8px; }
.bill-list { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.bill-list .empty-state.small, .bill-list .notice { margin: 0; }
.bill-total { display: flex; justify-content: space-between; padding: 10px 14px; background: var(--panel-soft); font-weight: 800; border-bottom: 1px solid var(--line); }
.bill-row {
  display: grid; grid-template-columns: 110px minmax(0, 1fr) auto auto;
  gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line);
}
.bill-row:last-child { border-bottom: 0; }
.bill-row.editing { background: var(--expo-soft); }
.bill-row .bill-date { color: var(--muted); font-size: 13px; }
.bill-row .bill-what { overflow-wrap: anywhere; }

@media (max-width: 620px) {
  .bill-form { grid-template-columns: 1fr 1fr; }
  .bill-form .bill-desc, .bill-actions { grid-column: 1 / -1; }
  .bill-actions { justify-content: flex-end; }
  .bill-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bill-row .bill-date { grid-column: 1 / -1; }
}

/* Shown on the till before the Expo opens */
.test-banner {
  padding: 10px 24px; font-size: 14px; color: #5a3b00;
  background: repeating-linear-gradient(-45deg, #ffe7a3 0 14px, #ffdf8a 14px 28px);
  border-bottom: 1px solid #f0c75e;
}
.test-banner strong { margin-right: 6px; letter-spacing: .3px; }
.test-banner span { white-space: nowrap; }
@media (max-width: 620px) { .test-banner { padding: 9px 16px; } }

/* Cart line: switch between the regular and the discount price */
.price-toggle {
  display: inline-block; margin-top: 6px; padding: 5px 11px; min-height: 32px;
  border: 1px solid var(--sale); border-radius: 999px; background: white;
  color: var(--sale); font-weight: 800; font-size: 13px;
}
.price-toggle.on { background: var(--sale-soft); color: var(--muted); border-color: var(--line); }

/* Regular vs discount price split above the product table */
.price-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.price-split:empty { display: none; }
.split-box { border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; background: var(--panel-soft); }
.split-box span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.split-box strong { font-size: 18px; display: block; }
.split-box small { color: var(--muted); font-size: 13px; }
.split-box.disc { background: var(--sale-soft); border-color: transparent; }
.split-box.disc strong, .split-box.disc small, .split-box.disc span { color: var(--sale); }
#productTable tfoot td { font-weight: 800; border-top: 2px solid var(--line); }

/* Open (held) orders */
.order-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 2px; }
.order-tab {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  min-height: 44px; padding: 6px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: white; color: var(--text); font-size: 12px; text-align: left;
}
.order-tab strong { font-size: 14px; }
.order-tab span { color: var(--muted); white-space: nowrap; }
.order-tab.active { border: 2px solid var(--primary); background: var(--primary-soft); }
.order-tab.active span { color: var(--primary-dark); }
.order-tab.new { justify-content: center; font-weight: 800; font-size: 13px; color: var(--primary-dark); border-style: dashed; }

/* Whole Expo totals: all Expo sales against all prep bills */
.expo-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.expo-total { border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; background: var(--panel-soft); min-width: 0; }
.expo-total span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.expo-total strong { display: block; font-size: 20px; overflow-wrap: anywhere; }
.expo-total small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.expo-total.sales { background: var(--expo-soft); border-color: rgba(91,60,196,.35); }
.expo-total.profit { background: var(--good-soft); border-color: transparent; }
.expo-total.profit strong, .expo-total.profit small { color: var(--good); }
.expo-total.profit.negative { background: var(--danger-soft); }
.expo-total.profit.negative strong, .expo-total.profit.negative small { color: var(--danger); }
@media (max-width: 620px) { .expo-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Pay later (named pending orders) */
.pay-later-btn { width: 100%; margin: 10px 0 0; }
.order-tab.pending-tab { border-color: var(--expo); color: var(--expo); justify-content: center; font-weight: 800; font-size: 13px; }
.order-tab.named strong { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-later-name { display: block; font-size: 12px; font-weight: 800; margin-top: 14px; }
.pay-later-name input { margin-top: 6px; font-size: 16px; font-weight: 600; }
.pending-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pending-picks:empty { display: none; }
.pay-later-summary { margin-top: 12px; font-size: 14px; font-weight: 700; color: var(--muted); }
.pending-list { margin-top: 14px; display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; }
.pending-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; background: white;
}
.pending-row.here { border-color: var(--primary); background: var(--primary-soft); }
.pending-row strong { font-size: 16px; display: block; }
.pending-row small { color: var(--muted); display: block; margin-top: 2px; overflow-wrap: anywhere; }
.pending-row .total { font-size: 17px; font-weight: 900; text-align: right; }
.pending-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }

/* Login */
body.logged-out .app, body.logged-out .toast-host { display: none; }
body:not(.logged-out) .login-screen { display: none; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.login-card {
  width: min(380px, 100%); background: var(--panel); border-radius: 22px; padding: 28px 24px;
  box-shadow: var(--shadow); display: grid; gap: 12px; text-align: center;
}
.login-card .brand-logo { margin: 0 auto; width: 56px; height: 56px; font-size: 30px; }
.login-card h1 { margin: 4px 0 0; font-size: 24px; }
.login-card p { margin: 0 0 6px; color: var(--muted); }
.login-card label { text-align: left; font-size: 12px; font-weight: 800; }
.login-card input { margin-top: 6px; font-size: 16px; font-weight: 500; }
.login-card .primary { padding: 13px; font-size: 16px; }
.login-error { background: var(--danger-soft); color: var(--danger); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 700; text-align: left; }
.vendor-chip { white-space: nowrap; }
@media (max-width: 620px) { .vendor-chip { padding: 8px 10px; font-size: 13px; } }

/* ---------- Tables ---------- */
body.tables-mode .products-panel, body.tables-mode .cart-panel, body.tables-mode .mobile-cart-bar { display: none !important; }
body.tables-mode .tables-view { display: block; }
.tables-view { grid-column: 1 / -1; padding: 22px; }
.tables-view[hidden] { display: none !important; }
.tables-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.tables-head h2 { margin: 0; font-size: 24px; }
.tables-legend { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.tables-legend .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.dot.free { background: white; border: 2px solid var(--good); }
.dot.busy { background: var(--primary); }
.tables-actions { margin-left: auto; display: flex; gap: 8px; }
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.table-tile {
  position: relative; min-height: 130px; border-radius: 18px; padding: 16px; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  background: white; border: 3px solid var(--good); color: var(--text);
  box-shadow: 0 1px 0 var(--line), 0 4px 14px rgba(31,42,55,.05);
}
.table-tile:active { transform: scale(.97); }
.table-tile .t-name { font-size: 20px; font-weight: 900; }
.table-tile .t-status { font-size: 14px; font-weight: 800; color: var(--good); }
.table-tile .t-total { font-size: 20px; font-weight: 900; }
.table-tile .t-meta { font-size: 13px; color: var(--muted); }
.table-tile.busy { background: var(--primary); border-color: var(--primary); color: white; }
.table-tile.busy .t-status, .table-tile.busy .t-meta { color: rgba(255,255,255,.9); }
.table-tile.counter { background: var(--expo-soft); border-color: var(--expo); grid-column: span 2; }
.table-tile.counter .t-status { color: var(--expo); }
.table-tile.add { border: 3px dashed var(--line); background: transparent; color: var(--muted); align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
.table-edit { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; }
.table-edit button { border: 0; border-radius: 9px; padding: 6px 8px; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.15); font-size: 13px; font-weight: 700; }
.order-context { display: flex; align-items: center; gap: 12px; margin: -6px 0 14px; }
.order-context strong { font-size: 18px; }
@media (max-width: 620px) {
  .tables-view { padding: 16px; }
  .tables-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .table-tile { min-height: 110px; }
  .tables-actions { margin-left: 0; width: 100%; }
}

/* ---------- Roles ---------- */
body.role-cashier #salesReportBtn, body.role-cashier #manageItemsBtn, body.role-cashier #editTablesBtn,
body.role-cashier [data-add-table], body.role-cashier [data-pending-delete], body:not(.role-admin) .admin-only { display: none !important; }

/* ---------- Staff ---------- */
.staff-add { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); }
.role-pick { margin-top: 2px; }
.role-pick button { font-size: 14px; padding: 9px 14px; }
.staff-list { margin-top: 14px; display: grid; gap: 8px; }
.staff-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.staff-row strong { display: block; }
.staff-row small { color: var(--muted); }
.staff-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

/* ---------- Close day ---------- */
.close-day .close-date { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; font-size: 13px; margin-top: 12px; }
.close-day .close-date input { width: 170px; }
.cd-summary { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; background: var(--panel); padding: 4px 0; }
.cd-box { border-radius: 14px; padding: 12px 14px; background: var(--panel-soft); border: 1px solid var(--line); }
.cd-box span { display: block; font-size: 12px; color: var(--muted); }
.cd-box strong { font-size: 22px; display: block; }
.cd-box.ok { background: var(--good-soft); border-color: transparent; }
.cd-box.ok strong, .cd-box.ok span { color: var(--good); }
.cd-box.short { background: var(--danger-soft); border-color: transparent; }
.cd-box.short strong, .cd-box.short span { color: var(--danger); }
.cd-box.over { background: var(--warn-soft); border-color: transparent; }
.cd-box.over strong, .cd-box.over span { color: var(--warn); }
.cd-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
.cd-grid h3 { margin: 4px 0 10px; font-size: 16px; }
.cash-rows { display: grid; gap: 6px; }
.cash-row { display: grid; grid-template-columns: 76px 44px 72px 44px minmax(0, 1fr); gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.cash-chip { height: 40px; border-radius: 8px; display: grid; place-items: center; font-weight: 900; color: white; background: #2e7d4f; font-size: 15px; }
.cash-chip.coin { border-radius: 50%; width: 44px; height: 44px; background: #9aa3ab; justify-self: center; font-size: 13px; }
.cash-row .step { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--good-soft); color: var(--good); font-size: 22px; font-weight: 900; }
.cash-row input { text-align: center; font-size: 18px; font-weight: 800; padding: 8px 4px; }
.cash-row .line { text-align: right; font-weight: 800; }
.cash-small { display: block; margin: 12px 0 6px; font-size: 12px; font-weight: 800; }
.cash-small input { margin-top: 6px; font-size: 16px; }
.cd-check { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 14px; display: grid; gap: 8px; }
.cd-check .row { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.cd-check label { font-size: 12px; font-weight: 800; }
.cd-check input { margin-top: 4px; font-size: 16px; }
.cd-check .diff { font-weight: 800; font-size: 14px; }
.cd-check .diff.ok { color: var(--good); } .cd-check .diff.short { color: var(--danger); } .cd-check .diff.over { color: var(--warn); }
.cd-note { display: block; font-size: 12px; font-weight: 800; }
.cd-note textarea { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; font: inherit; }
@media (max-width: 760px) {
  .cd-grid { grid-template-columns: 1fr; }
  .cd-summary { grid-template-columns: 1fr 1fr 1fr; }
  .cd-box strong { font-size: 17px; }
}

/* ---------- Super admin ---------- */
body.super-mode .app { display: none !important; }
body.super-mode .super-view { display: block; }
.super-view[hidden] { display: none !important; }
.super-view { max-width: 980px; margin: 0 auto; padding: 24px 16px 60px; }
.super-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.super-head h1 { margin: 0; font-size: 26px; }
.super-head p { margin: 4px 0 0; color: var(--muted); }
.super-actions { display: flex; gap: 8px; }
.super-list { display: grid; gap: 14px; }
.sv-vendor { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 6px 14px; box-shadow: 0 1px 0 var(--line); }
.sv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sv-row:last-child { border-bottom: 0; }
.sv-row.main strong { font-size: 18px; }
.sv-row.staff { padding-left: 22px; }
.sv-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.sv-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

/* Monthly profit (Main sales) */
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav strong { min-width: 130px; text-align: center; font-size: 16px; }
.month-nav button { padding: 6px 12px; }
.main-bill-form { grid-template-columns: 150px minmax(0, 1fr) minmax(0, 0.8fr) 130px auto; }
.bill-row .bill-where { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) { .main-bill-form { grid-template-columns: 1fr 1fr; } .main-bill-form .bill-desc, .main-bill-form .bill-actions { grid-column: 1 / -1; } }
