/* src/styles.css */
:root {
  --teal: #0f766e;
  --teal-dark: #115e59;
  --bg: #f1f5f9;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --ok: #16a34a;
  --warn: #dc2626;
  --tap: 56px;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 17px;
  color: var(--ink);
  background: var(--bg);
  -webkit-user-select: none;
  user-select: none;
}
button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 12px;
  touch-action: manipulation;
}
.app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.statusbar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--teal);
  color: #fff;
}
.kitchen-warning {
  background: var(--warn);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  padding: 10px 14px;
  text-align: center;
}
.kitchen-warning b {
  font-weight: 800;
}
.kitchen-info {
  background: var(--muted);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  padding: 8px 14px;
}
.brand {
  font-weight: 700;
  font-size: 18px;
}
.spacer {
  flex: 1;
}
.net {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.net.on {
  background: rgba(255, 255, 255, 0.2);
}
.net.off {
  background: var(--warn);
}
.pending {
  font-size: 13px;
  font-weight: 600;
  background: #f59e0b;
  color: #1f2937;
  padding: 4px 10px;
  border-radius: 999px;
}
.conn-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}
.conn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.conn-row .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}
.conn-row.on .dot {
  background: #16a34a;
}
.conn-row.off .dot {
  background: #dc2626;
}
.conn-error {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
}
.icon-btn {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 40px;
  height: 40px;
  font-size: 20px;
}
.icon-btn.net-on {
  background: var(--ok);
}
.icon-btn.net-off {
  background: var(--warn);
}
.table-chip {
  margin-left: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  font-weight: 700;
  padding: 14px 16px;
  min-height: var(--tap);
}
.paid-tag {
  color: var(--ok);
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
  margin-left: 6px;
}
.line.paidline {
  opacity: 0.7;
}
.navtabs {
  display: flex;
  gap: 6px;
}
.navtab {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.navtab.active {
  background: #fff;
  color: var(--teal);
}
.mybons {
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bon-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.bon-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.bon-no {
  font-weight: 800;
  color: var(--teal);
}
.bon-table {
  font-weight: 700;
}
.bon-time {
  color: var(--muted);
  font-size: 14px;
}
.bon-status {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.bon-status + .bon-status {
  margin-left: 6px;
}
.st-pending {
  background: #fef3c7;
  color: #92400e;
}
.st-sent {
  background: #dbeafe;
  color: #1e40af;
}
.st-paid {
  background: #dcfce7;
  color: #166534;
}
.st-void {
  background: #fee2e2;
  color: #991b1b;
}
.st-draft {
  background: #e2e8f0;
  color: #475569;
}
.bon-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bon-lines li {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 8px;
  padding: 3px 0;
}
.bl-qty {
  font-weight: 700;
}
.bl-price {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.bon-foot {
  display: flex;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.bon-total {
  font-weight: 800;
  font-size: 18px;
}
.reopen {
  margin-left: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 10px 16px;
  font-weight: 600;
}
.closed-tag {
  margin-left: auto;
  color: var(--ok);
  font-weight: 700;
  padding: 10px 4px;
}
.main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.empty {
  margin: auto;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  line-height: 1.6;
}
.setup-box {
  width: min(440px, 100%);
  margin-top: 16px;
}
.setup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.setup-input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}
.setup-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.device-tag {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
}
.join-box {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.join-box .fld {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
}
.join-box input {
  font: inherit;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.login {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 16px;
  padding-top: calc(32px + env(safe-area-inset-top));
  height: 100dvh;
  box-sizing: border-box;
  overflow-y: auto;
}
.login-title {
  font-size: 24px;
  font-weight: 800;
}
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  width: min(440px, 100%);
}
.user-btn {
  background: var(--teal);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 24px 12px;
}
.login .keypad {
  width: min(360px, 92vw);
}
.login .tablepad-display {
  width: min(360px, 92vw);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  font-size: 36px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 6px;
  box-sizing: border-box;
}
.login-error {
  color: var(--warn);
  font-weight: 700;
}
.login .back {
  align-self: flex-start;
  background: var(--bg);
  padding: 10px 14px;
  font-weight: 600;
}
.logged-in {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
}
.logged-in button {
  margin-left: auto;
}
.admin-link-row {
  margin-bottom: 14px;
}
.admin-link-row a {
  display: block;
  text-align: center;
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 600;
}
.tablepad {
  margin: auto;
  width: min(420px, 92vw);
  text-align: center;
}
.resume {
  display: block;
  width: 100%;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 14px;
  margin-bottom: 16px;
}
.tablepad-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.tablepad-display {
  font-size: 34px;
  font-weight: 800;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
  min-height: 60px;
}
.tablepad-hint {
  font-size: 14px;
  color: var(--muted, #64748b);
  margin: -8px 0 12px;
}
.tablepad-error {
  font-size: 15px;
  font-weight: 600;
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 10px;
  padding: 8px 12px;
  margin: -4px 0 12px;
}
.tablepad-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.extra-btn {
  flex: 1 1 40%;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.key {
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 23px;
  font-weight: 700;
  padding: 14px 0;
}
.key:active {
  background: var(--line);
}
.key-ok {
  background: var(--teal);
  color: #fff;
}
.key-del {
  color: var(--warn);
}
.ordering {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
}
.ordering-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.back {
  background: var(--bg);
  padding: 10px 14px;
  font-weight: 600;
}
.payview .back {
  background: #b45309;
  color: #fff;
}
.table-label {
  font-weight: 700;
  font-size: 18px;
}
.wait-banner {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 6px 12px;
  background: #fff7ed;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: #9a3412;
}
.cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.cat {
  flex: 0 0 auto;
  background: var(--bg);
  border: 2px solid var(--line);
  padding: 12px 18px;
  font-weight: 600;
  min-height: var(--tap);
}
.cat.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.grid-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.grid-track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.grid {
  flex: 0 0 100%;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 3), minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  align-content: start;
  touch-action: pan-y;
}
.item {
  background: var(--card);
  border: 1px solid var(--line);
  height: calc(56px * var(--item-scale, 1));
  padding: 7px 6px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}
.item:active {
  transform: scale(0.97);
}
.item:disabled {
  opacity: 0.4;
}
.item-name {
  font-weight: 700;
  font-size: calc(16px * var(--item-scale, 1));
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.item-wait {
  align-self: flex-end;
  color: #b45309;
  font-weight: 800;
  font-size: calc(12px * var(--item-scale, 1));
}
.item-status {
  margin-top: 2px;
  font-size: calc(12px * var(--item-scale, 1));
  font-weight: 700;
  color: var(--muted, #64748b);
}
.item-status.low {
  color: #b45309;
}
.item:disabled .item-status {
  color: #b91c1c;
}
.panel {
  border-top: 2px solid var(--line);
  background: var(--card);
  display: flex;
  flex-direction: column;
  max-height: 38vh;
}
.lines {
  overflow-y: auto;
  padding: 2px 10px;
}
.panel-empty {
  color: var(--muted);
  text-align: center;
  padding: 14px;
}
.line {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.line.voided {
  opacity: 0.5;
  text-decoration: line-through;
}
.qty {
  font-weight: 800;
  font-size: 16px;
}
.lname {
  font-weight: 600;
}
.sent-dot {
  color: var(--ok);
  font-size: 10px;
  margin-left: 6px;
  font-style: normal;
}
.lprice {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.lbtns {
  display: flex;
  gap: 6px;
}
.lbtns button {
  width: 40px;
  height: 40px;
  background: var(--bg);
  font-size: 19px;
  font-weight: 700;
}
.panel-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.total {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.send {
  margin-left: auto;
  background: var(--teal);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 16px 28px;
  min-height: var(--tap);
}
.send:disabled {
  background: var(--muted);
  opacity: 0.6;
}
.pay {
  background: #b45309;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 16px 22px;
  min-height: var(--tap);
}
.pay:disabled {
  background: var(--muted);
  opacity: 0.6;
}
.payview {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.park {
  margin-left: auto;
  background: var(--bg);
  padding: 10px 14px;
  font-weight: 600;
}
.paid-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: #ecfdf5;
  border-bottom: 1px solid var(--line);
}
.paid-chip {
  font-size: 13px;
  font-weight: 600;
  color: #065f46;
  background: #d1fae5;
  border-radius: 999px;
  padding: 4px 10px;
}
.pay-lines {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 12px;
}
.pay-line {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.pl-toggle {
  width: 40px;
  height: 40px;
  border: 2px solid var(--line);
  background: var(--card);
  font-size: 20px;
  color: var(--teal);
}
.pay-line.sel .pl-toggle {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.pl-name {
  font-weight: 600;
}
.pl-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.pl-qty button {
  width: 38px;
  height: 38px;
  background: var(--bg);
  font-size: 18px;
  font-weight: 700;
}
.pl-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 64px;
  text-align: right;
}
.pay-foot {
  border-top: 2px solid var(--line);
  background: var(--card);
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.pay-summary {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pay-summary .muted {
  color: var(--muted);
  font-size: 14px;
}
.pay-actions {
  display: flex;
  gap: 8px;
}
.pay-method {
  flex: 1;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 16px;
  min-height: var(--tap);
}
.pay-method.cash {
  background: var(--ok);
}
.pay-method.card {
  background: var(--teal);
}
.pay-method:disabled {
  background: var(--muted);
  opacity: 0.6;
}
.receipt {
  background: var(--card);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  width: min(360px, 100%);
}
.receipt-head {
  font-weight: 700;
  color: var(--muted);
}
.receipt-amount {
  font-size: 40px;
  font-weight: 800;
  margin: 8px 0;
}
.receipt-meta {
  color: var(--muted);
  margin-bottom: 20px;
}
.st-partial {
  background: #fed7aa;
  color: #9a3412;
}
.pay-area {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.pay-area.open {
  border-bottom: 3px solid var(--teal);
}
.pay-area.to-pay {
  background: #f0fdfa;
  flex: 1;
}
.area-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.area-act {
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  padding: 8px 14px;
}
.area-act.ghost {
  background: var(--bg);
  color: var(--ink);
}
.area-act:disabled {
  opacity: 0.4;
}
.area-lines {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 10px;
}
.area-empty {
  color: var(--muted);
  text-align: center;
  padding: 16px;
}
.psel-line {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.psel-main {
  flex: 1;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  min-height: var(--tap);
}
.psel-line.sel .psel-main {
  border-color: var(--teal);
}
.psel-qty {
  font-weight: 800;
  font-size: 16px;
}
.psel-name {
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.psel-mods {
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
}
.psel-price {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.psel-one {
  width: 52px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 20px;
  font-weight: 700;
}
.confirm {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  width: min(340px, 100%);
}
.confirm-q {
  font-weight: 700;
  color: var(--muted);
}
.confirm-amount {
  font-size: 38px;
  font-weight: 800;
  margin: 6px 0;
}
.confirm-meta {
  color: var(--muted);
  margin-bottom: 20px;
}
.confirm-actions {
  display: flex;
  gap: 10px;
}
.confirm-actions button {
  flex: 1;
  padding: 14px;
  font-weight: 700;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  background: var(--card);
  border-radius: 16px;
  width: min(460px, 100%);
  padding: 20px;
}
.modal h2 {
  margin: 0 0 16px;
}
.modal label {
  display: block;
  font-weight: 600;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--muted);
}
.modal input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
}
.device-id {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  margin-bottom: 16px;
}
.install-row {
  margin: 4px 0 14px;
}
.install-row .btn-primary {
  width: 100%;
}
.install-hint {
  font-size: 13px;
  color: var(--muted);
}
.install-done {
  font-size: 13px;
  color: var(--teal);
  font-weight: 700;
}
.display-prefs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.pref-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pref-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  min-width: 72px;
}
.seg {
  display: flex;
  gap: 6px;
  flex: 1;
}
.seg-btn {
  flex: 1;
  padding: 10px 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.seg-btn.on {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.btn-secondary {
  background: var(--bg);
  padding: 12px 18px;
}
.btn-primary {
  background: var(--teal);
  color: #fff;
  padding: 12px 22px;
  font-weight: 700;
}
.opt-badge {
  font-size: 12px;
  opacity: 0.55;
  margin-left: 5px;
}
.lmods {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-style: normal;
}
.lnote {
  display: block;
  font-size: 13px;
  color: #b45309;
  font-style: normal;
  font-weight: 600;
}
.line.infoline {
  background: #fffbeb;
}
.line.infoline .qty {
  font-size: 18px;
}
.note-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  resize: vertical;
}
.note-input:focus {
  outline: none;
  border-color: var(--teal);
}
.sheet {
  background: var(--card);
  border-radius: 16px;
  width: min(520px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sheet-head {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--teal);
  color: #fff;
}
.sheet-title {
  font-weight: 700;
  font-size: 18px;
  flex: 1;
}
.icon-btn.dark {
  background: rgba(255, 255, 255, 0.2);
}
.sheet-body {
  overflow-y: auto;
  padding: 12px 16px;
}
.mgroup {
  margin-bottom: 18px;
}
.mgroup-head {
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mgroup-rule {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 999px;
}
.mods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.mod {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  background: var(--bg);
  border: 2px solid var(--line);
  padding: 14px 12px;
  font-weight: 600;
  min-height: var(--tap);
  text-align: left;
}
.mod.on {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.mod-delta {
  opacity: 0.85;
  font-weight: 700;
}
.sheet-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.sheet-total {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.admin {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--bg);
}
.admin-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px calc(8px + env(safe-area-inset-top));
  padding-top: max(8px, env(safe-area-inset-top));
  background: var(--teal);
  color: #fff;
}
.admin-bar h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.admin-bar .spacer {
  flex: 1;
}
.admin-back,
.admin-refresh {
  min-width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.admin-burger {
  min-width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 20px;
  line-height: 1;
}
.admin-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 20;
}
.admin-menu {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 21;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.24);
}
.admin-menu-item {
  padding: 13px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  text-align: left;
}
.admin-menu-item.active {
  background: var(--teal);
  color: #fff;
}
.admin-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}
.admin-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
}
.admin-error {
  margin: 10px 12px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: var(--warn);
  font-weight: 600;
  font-size: 14px;
}
.admin-flash {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 700;
  font-size: 14px;
}
.av-cat {
  margin-bottom: 18px;
}
.av-cat-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.av-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
}
.av-row.off {
  opacity: 0.55;
}
.av-main {
  flex: 1;
  min-width: 0;
}
.av-name {
  font-weight: 700;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.av-sub {
  font-size: 13px;
  color: var(--muted);
}
.av-rem.low {
  color: var(--warn);
  font-weight: 700;
}
.av-unlimited {
  color: var(--muted);
}
.av-stock {
  flex: 0 0 auto;
}
.av-limit-set {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
}
.av-stepper {
  display: flex;
  align-items: center;
  gap: 2px;
}
.av-stepper button {
  width: 38px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}
.av-stepper button:first-child {
  border-radius: 10px 0 0 10px;
}
.av-stepper input {
  width: 52px;
  height: 40px;
  border: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.av-stepper input::-webkit-outer-spin-button,
.av-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.av-limit-clear {
  border-radius: 0 10px 10px 0 !important;
  font-size: 16px !important;
}
.av-toggle {
  flex: 0 0 auto;
  min-width: 64px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}
.av-toggle.on {
  background: var(--ok);
}
.av-toggle.off {
  background: var(--muted);
}
.av-savebar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 12px 0 calc(4px + env(safe-area-inset-bottom));
  background:
    linear-gradient(
      to top,
      var(--bg) 70%,
      transparent);
}
.av-savebar .btn-secondary,
.av-savebar .btn-primary {
  flex: 1;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}
.kpi-val {
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--teal);
}
.kpi-lbl {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.rep-sec {
  margin-bottom: 18px;
}
.rep-sec h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}
.bar-name {
  flex: 0 0 84px;
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar {
  flex: 1;
  height: 10px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: 999px;
}
.bar-val {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rep-items {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.rep-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
.rep-item:last-child {
  border-bottom: 0;
}
.rep-item-qty {
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.rep-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rep-item-rev {
  flex: 0 0 auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ord-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.ord-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ord-nr {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ord-table {
  color: var(--muted);
  font-size: 14px;
}
.ord-status {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
}
.ord-status.st-paid {
  background: #ecfdf5;
  color: #047857;
}
.ord-status.st-sent {
  background: #eff6ff;
  color: #1d4ed8;
}
.ord-total {
  margin-left: auto;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ord-lines {
  margin: 6px 0 0;
}
.ord-line {
  display: flex;
  gap: 8px;
  font-size: 14px;
  padding: 1px 0;
}
.ord-line-qty {
  flex: 0 0 auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ord-foot {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.bon-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.bon-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.bon-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bon-nr {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.bon-badge {
  margin-left: 5px;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
  background: #fef3c7;
  color: #92400e;
}
.bon-station {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--teal);
}
.bon-table {
  color: var(--muted);
  font-size: 14px;
}
.bon-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.bon-foot {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.bon-amount {
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.bon-reprint {
  margin-left: auto;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--teal);
  border-radius: 10px;
  background: var(--card);
  color: var(--teal);
  font-weight: 700;
  font-size: 14px;
}
.bon-reprint:disabled {
  opacity: 0.5;
}
.pers-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.pers-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pers-name {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  background: var(--bg);
  color: var(--ink);
}
.pers-del {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--warn);
  font-size: 16px;
  font-weight: 700;
}
.pers-roles {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.pers-row2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.pin-cell {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pin-cell input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
}
.pin-eye {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 18px;
}
.pin-revealed {
  flex: 0 0 auto;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--teal);
}
.pers-add,
.tisch-range + .pers-add {
  width: 100%;
  height: 46px;
  margin: 4px 0 12px;
  border: 1px dashed var(--teal);
  border-radius: 12px;
  background: var(--card);
  color: var(--teal);
  font-weight: 700;
  font-size: 15px;
}
.tisch-range {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.tisch-area {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  background: var(--card);
  color: var(--ink);
}
.tisch-num {
  flex: 0 0 62px;
  width: 62px;
  height: 44px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: var(--card);
  color: var(--ink);
  -moz-appearance: textfield;
}
.tisch-num::-webkit-outer-spin-button,
.tisch-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.tisch-dash {
  color: var(--muted);
  font-weight: 700;
}
/*# sourceMappingURL=app.css.map */
