/* ServePoint Restaurant POS — original stylesheet, no third-party assets. */
:root {
  --bg: #f4f1ec; --card: #ffffff; --ink: #1f2937; --muted: #6b7280;
  --accent: #c2410c; --accent2: #166534; --line: #e5e7eb; --warn: #b45309; --danger: #b91c1c;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Arial, Helvetica, sans-serif; background: var(--bg); color: var(--ink); }
header { background: #1f2937; color: #fff; padding: 12px 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
header h1 { font-size: 20px; margin: 0; }
header .sub { font-size: 12px; color: #d1d5db; }
header .controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
header select, header input { padding: 7px 9px; border-radius: 6px; border: 1px solid #4b5563; background: #374151; color: #fff; }
nav.tabs { display: flex; gap: 6px; padding: 10px 20px 0; flex-wrap: wrap; }
nav.tabs button { border: 1px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 8px 8px 0 0; cursor: pointer; font-size: 14px; }
nav.tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
main { padding: 16px 20px 40px; max-width: 1280px; margin: 0 auto; }
.tab { display: none; }
.tab.active { display: block; }
.alert { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.card h2 { margin: 0 0 10px; font-size: 17px; }
.card h3 { margin: 12px 0 8px; font-size: 15px; }
.grid { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chips button { border: 1px solid var(--line); background: #fff; padding: 6px 12px; border-radius: 20px; cursor: pointer; }
.chips button.active { background: var(--ink); color: #fff; }
.search { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; font-size: 15px; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.item-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: #fff; text-align: left; padding: 0; font-family: inherit; }
.item-card .art { height: 74px; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; color: #fff; }
.item-card .body { padding: 9px 10px; }
.item-card .name { font-weight: 700; font-size: 14px; }
.item-card .desc { font-size: 12px; color: var(--muted); min-height: 30px; }
.item-card .price { font-weight: 700; color: var(--accent); margin-top: 4px; }
.item-card .stock-low { font-size: 11px; color: var(--danger); font-weight: 700; }
.cart-line { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cart-line .meta { font-size: 12px; color: var(--muted); }
.qty { display: inline-flex; gap: 4px; align-items: center; margin-top: 4px; }
.qty button { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.totals { font-size: 15px; }
.totals .row { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .grand { font-size: 18px; font-weight: 800; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 8px; }
button.primary { background: var(--accent2); color: #fff; border: none; padding: 11px 16px; border-radius: 8px; cursor: pointer; font-size: 15px; font-weight: 700; width: 100%; }
button.secondary { background: #fff; border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; cursor: pointer; }
button.danger { background: #fff; border: 1px solid #fecaca; color: var(--danger); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
input[type="text"], input[type="number"], input[type="tel"], select, textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; width: 100%; }
label { font-size: 13px; font-weight: 600; display: block; margin: 8px 0 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.mode-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.mode-tabs button { flex: 1; padding: 9px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; font-weight: 600; }
.mode-tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pay-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-row label { display: flex; gap: 5px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; font-weight: 400; }
.pay-row input { width: auto; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: flex-start; justify-content: center; padding-top: 40px; z-index: 50; overflow-y: auto; }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 20px; width: min(480px, 94vw); margin-bottom: 40px; }
.receipt { font-family: "Courier New", monospace; font-size: 14px; }
.receipt h3, .receipt p { text-align: center; margin: 4px 0; }
.receipt .r-row { display: flex; justify-content: space-between; }
.receipt hr { border: none; border-top: 1px dashed #999; margin: 8px 0; }
.bars { display: flex; gap: 4px; align-items: flex-end; height: 120px; margin: 10px 0; }
.bars .bar { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .bar-label { font-size: 10px; text-align: center; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stat .v { font-size: 20px; font-weight: 800; }
.stat .l { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; background: #dcfce7; color: #166534; }
.pill.refunded { background: #fee2e2; color: #991b1b; }
.pill.mode { background: #ffedd5; color: #9a3412; }
@media print {
  body * { visibility: hidden; }
  #receipt-print, #receipt-print * { visibility: visible; }
  #receipt-print { position: absolute; inset: 0; }
  .modal-backdrop { position: static; background: none; }
  header, nav, main { display: none; }
}
