/* Restaurant POS — style.css (all styling for index.html; upload it next to index.html and app.js) */
  :root {
    color-scheme: light dark;
    --bg: #f4f4f4; --surface: #ffffff; --surface-alt: #ececec; --text: #111111;
    --dim: #6f6f6f; --border: #e2e2e2; --accent: #111111; --accent-ink: #ffffff;
    --upi: #1e7cf5; --cash: #f26b1d; --card: #22a06b;
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #0f0f0f; --surface: #1c1c1c; --surface-alt: #2a2a2a; --text: #f5f5f5;
      --dim: #a6a6a6; --border: #333333; --accent: #f5f5f5; --accent-ink: #111111;
      --upi: #4d9fff; --cash: #ff8a3d; --card: #3ecf8e;
    }
  }
  * { box-sizing: border-box; }
  body { margin: 0; font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
  button { font-family: inherit; cursor: pointer; }
  input, select, textarea { font-family: inherit; }
  .shell { max-width: 1280px; margin: 0 auto; display: flex; }
  main { flex: 1; min-width: 0; padding: 20px 16px 110px; }
  @media (min-width: 768px) { main { padding: 20px 24px 40px; } }
  /* ---------- Side nav (desktop / tablet), same as the Muse POS ---------- */
  .sidenav { position: sticky; top: 0; height: 100vh; width: 80px; flex-shrink: 0; display: none; flex-direction: column; align-items: center; gap: 4px; overflow-y: auto; padding: 24px 8px; }
  @media (min-width: 768px) { .sidenav { display: flex; } }
  .navbtn { display: flex; width: 100%; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0; background: none; border: 0; }
  .navbtn .ic { display: flex; height: 44px; width: 56px; align-items: center; justify-content: center; border-radius: 999px; color: var(--dim); }
  .navbtn:hover .ic { background: var(--surface-alt); }
  .navbtn.active .ic { background: var(--accent); color: var(--accent-ink); }
  .navbtn .lb { font-size: 12px; color: var(--dim); }
  .navbtn.active .lb { font-weight: 700; color: var(--text); }
  .navbtn svg { width: 24px; height: 24px; }
  .navspacer { margin-top: auto; }
  /* ---------- Bottom nav (phone) ---------- */
  .bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around; border-top: 1px solid var(--border); background: var(--surface); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
  @media (min-width: 768px) { .bottomnav { display: none; } }
  .bottomnav .navbtn { width: auto; min-width: 56px; padding: 2px 0; }
  .bottomnav .navbtn .ic { height: 32px; width: 48px; }
  .bottomnav .navbtn svg { width: 20px; height: 20px; }
  .bottomnav .navbtn .lb { font-size: 11px; }
  /* ---------- Cards & stats ---------- */
  .card { background: var(--surface); border-radius: 24px; padding: 24px; margin-bottom: 16px; }
  .card-sm { background: var(--surface); border-radius: 24px; padding: 20px; margin-bottom: 16px; }
  .grid3 { display: grid; gap: 16px; }
  @media (min-width: 1024px) { .grid3 { grid-template-columns: 1fr 1fr 1fr; } .grid3 .card { margin-bottom: 0; } }
  .stat { border-bottom: 1px solid var(--border); padding: 16px 0; }
  .stat:first-child { padding-top: 0; } .stat.last { border-bottom: 0; padding-bottom: 0; }
  .stat .sl { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin: 0; }
  .stat .sv { font-size: 26px; line-height: 32px; font-weight: 800; margin: 4px 0 0; }
  .secttl { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin: 0; }
  .h-title { font-size: 18px; font-weight: 800; margin: 0; }
  .muted { color: var(--dim); font-size: 14px; }
  .small { font-size: 12px; }
  /* ---------- Controls ---------- */
  .chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600; }
  .chip.active { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
  .chip-sm { padding: 6px 12px; font-size: 12px; font-weight: 700; }
  .seg { border: 0; background: var(--surface-alt); color: var(--text); border-radius: 999px; padding: 8px 10px; font-size: 14px; font-weight: 600; }
  .seg.active { background: var(--accent); color: var(--accent-ink); }
  .tgl { flex-shrink: 0; border-radius: 999px; padding: 6px 16px; font-size: 12px; font-weight: 700; background: var(--surface-alt); color: var(--dim); border: 1px solid var(--border); }
  .tgl.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
  .btn { border: 0; border-radius: 999px; padding: 10px 20px; font-size: 14px; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
  .btn:disabled { opacity: 0.4; cursor: default; }
  .btn-alt { border: 0; border-radius: 999px; padding: 10px 20px; font-size: 14px; font-weight: 700; background: var(--surface-alt); color: var(--text); }
  .btn-big { width: 100%; padding: 14px; font-size: 16px; }
  .input { width: 100%; border: 0; border-radius: 12px; padding: 10px 12px; font-size: 14px; background: var(--surface-alt); color: var(--text); outline: none; }
  .input::placeholder { color: var(--dim); }
  .search { width: 100%; border: 1px solid var(--border); border-radius: 999px; padding: 12px 16px; font-size: 16px; background: var(--surface); color: var(--text); outline: none; }
  .search::placeholder { color: var(--dim); }
  .datepill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); padding: 8px 16px; font-size: 14px; font-weight: 600; }
  .dateinput { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); padding: 6px 8px; font-size: 14px; }
  label.lbl { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
  .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  /* ---------- Veg / Non-Veg ---------- */
  .fooddot { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 4px; border: 2px solid var(--text); }
  .fooddot .cir { width: 6px; height: 6px; border-radius: 99px; background: var(--text); display: block; }
  .fooddot .tri { width: 8px; height: 8px; background: var(--text); display: block; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
  .foodbadge { display: inline-flex; flex-shrink: 0; align-items: center; gap: 6px; border-radius: 999px; background: var(--surface-alt); padding: 4px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text); }
  /* ---------- Billing ---------- */
  .billing-grid { display: grid; gap: 16px; align-items: start; }
  @media (min-width: 1024px) { .billing-grid { grid-template-columns: 1fr 380px; } .cartcol { position: sticky; top: 16px; } }
  .items-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
  @media (min-width: 640px) { .items-grid { grid-template-columns: 1fr 1fr 1fr; } }
  .itemcard { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
  .itemcard.incart { border: 2px solid var(--accent); padding: 13px; }
  .itemcard.unavail { opacity: 0.5; }
  .stepper { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; background: var(--surface-alt); padding: 2px 4px; }
  .stepper button { width: 28px; height: 28px; border-radius: 999px; border: 0; background: var(--surface); color: var(--text); font-size: 16px; font-weight: 700; }
  .stepper .q { width: 20px; text-align: center; font-size: 14px; font-weight: 700; }
  .addbtn { border: 0; border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 700; background: var(--surface-alt); color: var(--text); }
  .qtybtn { width: 32px; height: 32px; border-radius: 999px; border: 0; background: var(--surface-alt); color: var(--text); font-size: 18px; font-weight: 700; }
  /* ---------- Bills ---------- */
  .billgrid { display: grid; gap: 12px; margin-top: 12px; }
  @media (min-width: 640px) { .billgrid { grid-template-columns: 1fr 1fr; } }
  @media (min-width: 1280px) { .billgrid { grid-template-columns: 1fr 1fr 1fr; } }
  .status { border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 700; text-transform: capitalize; }
  .status.open { background: var(--surface-alt); color: var(--text); }
  .status.paid { background: var(--accent); color: var(--accent-ink); }
  .status.served { background: var(--dim); color: var(--bg); }
  .status.cancelled { background: var(--surface-alt); color: var(--dim); }
  /* ---------- Menu list ---------- */
  .catpill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; background: var(--surface-alt); padding: 4px 4px 4px 12px; font-size: 14px; font-weight: 600; }
  .catpill button { border: 0; background: none; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 700; color: var(--dim); }
  .mrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .mrow:last-child { border-bottom: 0; }
  .linkbtn { border: 0; background: none; padding: 6px 8px; font-size: 14px; font-weight: 600; color: var(--text); border-radius: 999px; }
  .minibtn { border: 0; border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; background: var(--surface-alt); color: var(--text); }
  .minibtn.dark { background: var(--accent); color: var(--accent-ink); }
  /* ---------- Settings ---------- */
  .subbox { background: var(--surface-alt); border-radius: 16px; padding: 16px; }
  .subbox .input { background: var(--surface); }
  .switchrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .greyed { opacity: 0.4; pointer-events: none; }
  /* ---------- Auth ---------- */
  .authwrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
  .authcard { width: 100%; max-width: 384px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 24px; }
  .authcard .input { padding: 12px; }
  .lockic { display: flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
  .lockic svg { width: 28px; height: 28px; }
  /* ---------- Receipt modal & print ---------- */
  .overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,0.5); }
  @media (min-width: 640px) { .overlay { align-items: center; padding: 24px; } }
  .modal { max-height: 92vh; width: 100%; max-width: 448px; overflow-y: auto; background: var(--bg); padding: 16px; border-radius: 24px 24px 0 0; }
  @media (min-width: 640px) { .modal { border-radius: 24px; } }
  .receipt-print { margin: 0 auto; background: #ffffff; color: #000000; border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.15); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.45; }
  .receipt-print table { width: 100%; border-collapse: collapse; }
  .receipt-print th, .receipt-print td { padding: 4px 0; vertical-align: top; }
  @page { margin: 0; }
  @media print {
    body * { visibility: hidden; }
    .receipt-print, .receipt-print * { visibility: visible; }
    .receipt-print { position: fixed; left: 0; top: 0; max-width: 100%; border-radius: 0; box-shadow: none; }
  }
  .donut-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: 14px; }
  .donut-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 99px; margin-right: 6px; }
  .divider { border-top: 1px solid var(--border); }
  @media (min-width: 640px) { .itemform-grid { grid-template-columns: 1fr 130px 150px auto !important; } }
  .hidden { display: none !important; }
