/* =====================================================================
   Annapurna OS - shared design system (panels, forms, components)
   ===================================================================== */
:root {
  --p1: #ff5a1a;
  --p2: #e5311b;
  --grad: linear-gradient(135deg, var(--p1), var(--p2));
  --grad2: linear-gradient(135deg, #22c55e, #0f9d58);
  --grad3: linear-gradient(135deg, #34d399, #059669);
  --grad4: linear-gradient(135deg, #ffb300, #ff7a00);
  --grad5: linear-gradient(135deg, #ff6b4a, #d62828);
  --ink: #231815;
  --ink2: #5b4d45;
  --muted: #9a8a80;
  --line: #f2e3d6;
  --bg: #fff8f1;
  --card: #ffffff;
  --ok: #16a34a;
  --warn: #f5a524;
  --bad: #ef4444;
  --info: #ea580c;
  --r: 16px;
  --r2: 22px;
  --sh: 0 10px 30px -12px rgba(150, 60, 20, .18);
  --sh2: 0 20px 50px -18px rgba(150, 60, 20, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --side: 262px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink); background: var(--bg); font-size: 14.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
::selection { background: rgba(255, 90, 31, .2); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #f3c9a8; border-radius: 10px; }

/* ---------- utilities ---------- */
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.mt { margin-top: 18px; } .mt2 { margin-top: 28px; } .mb { margin-bottom: 18px; }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gtext { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- buttons ---------- */
.btn {
  --bg: #fff; color: var(--ink); position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); cursor: pointer;
  font-weight: 600; font-size: 14px; white-space: nowrap; transition: transform .2s var(--ease), box-shadow .25s, background .2s, opacity .2s;
  user-select: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 8px 20px -8px rgba(255, 60, 60, .6); }
.btn-primary:hover { box-shadow: 0 14px 28px -10px rgba(255, 60, 60, .7); }
.btn-dark { background: var(--ink); color: #fff; border: 0; }
.btn-purple { background: var(--grad2); color: #fff; border: 0; }
.btn-success { background: var(--ok); color: #fff; border: 0; }
.btn-danger { background: #fff0f0; color: var(--bad); border-color: #ffd6d6; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: #fff1e6; box-shadow: none; }
.btn-soft { background: #fff1e6; color: #e5311b; border-color: transparent; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn-xs { padding: 4px 9px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 15px 28px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 11px; }
.btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .5); animation: ripple .6s linear; pointer-events: none; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn:not(.btn-primary):not(.btn-dark):not(.btn-purple):not(.btn-success).loading::after { border-color: #ddd; border-top-color: var(--p1); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), .field select, .field textarea, select.input {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fbfaff; outline: none;
  transition: border .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 84px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--p1); background: #fff; box-shadow: 0 0 0 4px rgba(255, 90, 31, .12);
}
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon > input { padding-left: 40px !important; }
.hint { font-size: 11.5px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { display: none; }
.switch .sl { width: 44px; height: 24px; background: #d9d5e6; border-radius: 30px; position: relative; transition: .25s; flex: none; }
.switch .sl::after { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.switch input:checked + .sl { background: var(--ok); }
.switch input:checked + .sl::after { transform: translateX(20px); }

.seg { display: inline-flex; background: #fbeee3; padding: 4px; border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink2); transition: .2s; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 3px 10px rgba(0, 0, 0, .08); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 30px; background: #fff; border: 1.5px solid var(--line); cursor: pointer; font-size: 13px; font-weight: 500; transition: .2s; user-select: none; }
.chip:hover { border-color: var(--p1); }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 3px 0 -1px #b3261e; }
.chip input { display: none; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--r2); padding: 22px; box-shadow: var(--sh); border: 1px solid rgba(236, 233, 245, .8); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-h h3 { font-size: 16.5px; display: flex; align-items: center; gap: 10px; }
.card-h h3 i { color: var(--p1); }

.stat {
  position: relative; overflow: hidden; border-radius: var(--r2); padding: 20px; color: #fff; background: var(--grad);
  box-shadow: var(--sh); transition: transform .3s var(--ease), box-shadow .3s; min-height: 124px;
}
.stat:hover { transform: translateY(-5px); box-shadow: var(--sh2); }
.stat::before, .stat::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.stat::before { width: 140px; height: 140px; right: -40px; top: -50px; }
.stat::after { width: 90px; height: 90px; right: 40px; bottom: -50px; }
.stat .ic { width: 44px; height: 44px; border-radius: 13px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-size: 19px; margin-bottom: 12px; backdrop-filter: blur(4px); }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat .l { font-size: 12.5px; opacity: .9; }
.stat .trend { position: absolute; top: 18px; right: 18px; font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, .22); padding: 3px 9px; border-radius: 20px; z-index: 1; }
.stat.s2 { background: var(--grad2); } .stat.s3 { background: var(--grad3); } .stat.s4 { background: var(--grad4); } .stat.s5 { background: var(--grad5); }
.stat.s6 { background: linear-gradient(135deg, #0d9488, #14b8a6); }

.mini { display: flex; align-items: center; gap: 14px; background: #fff; padding: 16px; border-radius: 18px; box-shadow: var(--sh); border: 1px solid var(--line); transition: .25s var(--ease); }
.mini:hover { transform: translateY(-3px); }
.mini .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; color: #fff; background: var(--grad); flex: none; }
.mini .v { font-size: 19px; font-weight: 800; }
.mini .l { font-size: 12px; color: var(--muted); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; background: #fbeee3; color: var(--ink2); white-space: nowrap; text-transform: capitalize; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.nodot::before { display: none; }
.b-pending { background: #fff4e0; color: #d97706; }
.b-accepted { background: #fff1e6; color: #ea580c; }
.b-preparing { background: #fef3c7; color: #b45309; }
.b-ready { background: #e0faf3; color: #059669; }
.b-served, .b-out_for_delivery { background: #dcfce7; color: #15803d; }
.b-completed, .b-active, .b-paid, .b-free { background: #e3f9ee; color: #059669; }
.b-cancelled, .b-suspended, .b-unpaid { background: #ffe8e8; color: #dc2626; }
.b-occupied { background: #fff0e6; color: #ea580c; }
.b-reserved { background: #ccfbf1; color: #0f766e; }
.b-premium { background: linear-gradient(135deg, #ffe7a3, #ffd05c); color: #8a5a00; }
.b-basic { background: #fff1e6; color: #ea580c; }

.veg-dot { width: 16px; height: 16px; border: 1.8px solid #0f9d58; border-radius: 3px; display: inline-grid; place-items: center; flex: none; }
.veg-dot::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #0f9d58; }
.veg-dot.nonveg { border-color: #c0392b; }
.veg-dot.nonveg::after { background: #c0392b; border-radius: 0; width: 0; height: 0; border-left: 4.5px solid transparent; border-right: 4.5px solid transparent; border-bottom: 8px solid #c0392b; background: none; }
.veg-dot.egg { border-color: #e6a100; }
.veg-dot.egg::after { background: #e6a100; }

/* ---------- table ---------- */
.tbl-wrap { overflow-x: auto; border-radius: 14px; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 11px 14px; background: #faf9fd; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .15s; animation: fadeUp .4s var(--ease) both; }
.tbl tbody tr:hover { background: #fcfbff; }
.tbl tr:last-child td { border-bottom: 0; }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- panel layout ---------- */
.app { display: flex; min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); background: #fff; color: #5b4d45; border-right: 1.5px solid #f2e3d6; box-shadow: 10px 0 40px -30px rgba(150, 60, 20, .5); display: flex; flex-direction: column;
  z-index: 60; transition: transform .35s var(--ease); overflow: hidden;
}
.side::before { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 149, 0, .18), transparent 70%); top: -120px; left: -120px; pointer-events: none; }
.side .brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; position: relative; }
.side .brand .logo { width: 42px; height: 42px; border-radius: 13px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 19px; box-shadow: 0 8px 20px -6px rgba(255, 60, 60, .7); overflow: hidden; flex: none; }
.side .brand .logo img { width: 100%; height: 100%; object-fit: cover; }
.side .brand b { color: #231815; font-size: 16.5px; display: block; line-height: 1.2; }
.side .brand small { font-size: 11px; color: #9a8a80; }
.side nav { flex: 1; overflow-y: auto; padding: 6px 14px 20px; position: relative; }
.side nav .sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #c0a48f; padding: 16px 12px 6px; }
.side nav a { display: flex; align-items: center; gap: 13px; padding: 11px 14px; border-radius: 12px; font-weight: 500; font-size: 14px; margin-bottom: 2px; transition: .2s; position: relative; cursor: pointer; }
.side nav a i { width: 20px; text-align: center; font-size: 15px; }
.side nav a:hover { background: #fff1e6; color: #e5311b; transform: translateX(3px); }
.side nav a.on { background: var(--grad); color: #fff; box-shadow: 0 10px 22px -10px rgba(255, 60, 60, .8); }
.side nav a .cnt { margin-left: auto; background: #e5311b; color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.side nav a.on .cnt { background: #fff; color: var(--p2); }
.side nav a.locked { opacity: .5; }
.side nav a.locked::after { content: '\f023'; font-family: 'Font Awesome 6 Free'; font-weight: 900; margin-left: auto; font-size: 11px; color: #ff9500; }
.side nav a.locked .cnt { display: none; }
.lock-page { text-align: center; padding: 60px 20px; }
.lock-page .em { font-size: 70px; animation: float 3s ease-in-out infinite; display: inline-block; }
.plan-card { position: relative; overflow: hidden; border-radius: 24px; padding: 22px; background: #fff; box-shadow: var(--sh); border: 2px solid var(--line); transition: .3s var(--ease); display: flex; flex-direction: column; }
.plan-card:hover { transform: translateY(-6px); box-shadow: var(--sh2); }
.plan-card.cur { border-color: var(--pc, var(--p1)); box-shadow: 0 20px 40px -18px var(--pc, var(--p1)); }
.plan-card .ph { margin: -22px -22px 16px; padding: 22px; color: #fff; background: var(--pc, var(--p1)); position: relative; overflow: hidden; }
.plan-card .ph::after { content: ''; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .15); right: -50px; top: -60px; }
.plan-card .price { font-size: 30px; font-weight: 800; }
.plan-card .price small { font-size: 13px; font-weight: 500; opacity: .85; }
.plan-card ul { list-style: none; padding: 0; margin: 0 0 16px; flex: 1; }
.plan-card li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 13.5px; }
.plan-card li i { margin-top: 3px; width: 16px; text-align: center; }
.plan-card li.no { color: var(--muted); text-decoration: line-through; opacity: .7; }
.ribbon { position: absolute; top: 16px; right: -34px; transform: rotate(45deg); background: #fcd34d; color: #3b2a00; font-size: 11px; font-weight: 800; padding: 4px 40px; z-index: 2; }
.feat-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.feat-pick label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 13px; transition: .2s; }
.feat-pick label:hover { border-color: var(--p1); }
.feat-pick input { margin-top: 3px; accent-color: var(--p1); }
.feat-pick label:has(input:checked) { border-color: var(--ok); background: #f0fdf6; }
.ltabs { margin-bottom: 18px; overflow-x: auto; flex-wrap: nowrap; max-width: 100%; }
.ltabs button { white-space: nowrap; }
.sw-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sw-row .sw { width: 54px; height: 36px; border-radius: 12px; cursor: pointer; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .2); transition: .2s; }
.sw-row .sw.on { outline: 3px solid var(--ink); transform: scale(1.08); }
.icon-row { display: flex; gap: 6px; flex-wrap: wrap; }
.icon-row span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: #fff1e6; cursor: pointer; border: 2px solid transparent; transition: .2s; }
.icon-row span.on { border-color: var(--p1); background: #fff3ee; transform: scale(1.1); }
.track { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding: 18px 4px 8px; }
.track .tk { flex: 1; min-width: 34px; text-align: center; position: relative; }
.track .tk .d { width: 30px; height: 30px; margin: 0 auto; border-radius: 50%; background: #fbeee3; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.track .tk.g .d { background: var(--grad); color: #fff; box-shadow: 0 6px 14px -6px rgba(255, 60, 60, .8); }
.track .tk .gl { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 14px; animation: giftBob 2.4s ease-in-out infinite; }
.mini-dots { display: flex; gap: 3px; flex-wrap: wrap; max-width: 150px; }
.mini-dots i { width: 10px; height: 10px; border-radius: 50%; background: #e5e1f0; }
.mini-dots i.on { background: var(--grad); }
.side .foot { padding: 14px; border-top: 1px solid #f2e3d6; position: relative; }
.main { flex: 1; margin-left: var(--side); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 14px 28px;
  background: rgba(245, 244, 251, .82); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(236, 233, 245, .7);
}
.topbar h1 { font-size: 21px; }
.topbar .sub { font-size: 12.5px; color: var(--muted); }
.menu-btn { display: none; }
.content { padding: 26px 28px 60px; width: 100%; max-width: 1500px; }
.view { animation: fadeUp .45s var(--ease) both; }
.side-back { display: none; }
.imp-bar { background: linear-gradient(90deg, #e5311b, #e5311b); color: #fff; text-align: center; padding: 8px; font-size: 13px; font-weight: 500; }
.imp-bar button { margin-left: 10px; }

.shop-toggle { display: flex; align-items: center; gap: 10px; background: #fff; padding: 6px 14px 6px 6px; border-radius: 40px; box-shadow: var(--sh); cursor: pointer; font-weight: 600; font-size: 13px; border: 1px solid var(--line); }
.shop-toggle .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--bad); transition: .3s; }
.shop-toggle.open .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(0, 179, 126, .6); animation: pulseRing 2s infinite; }

/* ---------- kanban / order cards ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(270px, 1fr)); gap: 16px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.kcol { background: #eeecf6; border-radius: 20px; padding: 12px; min-height: 300px; }
.kcol-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 12px; font-weight: 700; font-size: 14px; }
.kcol-h .n { background: #fff; border-radius: 20px; padding: 1px 10px; font-size: 12px; }
.ocard { background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: 0 6px 18px -10px rgba(150, 60, 20, .3); border-left: 4px solid var(--p1); animation: popIn .45s var(--ease) both; transition: transform .2s; }
.ocard:hover { transform: translateY(-3px); }
.ocard.new { animation: popIn .45s var(--ease) both, glow 1.4s ease-in-out 3; }
.ocard .oh { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ocard .no { font-weight: 800; font-size: 16px; }
.ocard .meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.ocard ul { list-style: none; padding: 0; margin: 10px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 8px 0; }
.ocard li { display: flex; gap: 8px; align-items: center; font-size: 13.5px; padding: 3px 0; }
.ocard li .q { font-weight: 700; color: var(--p1); min-width: 26px; }
.ocard li em { font-size: 11.5px; color: #b45309; font-style: normal; display: block; }
.ocard .note { background: #fff8e6; color: #92400e; font-size: 12px; border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; }
.ocard .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ocard.t-delivery { border-left-color: #e5311b; }
.ocard.t-takeaway { border-left-color: #f59e0b; }
.timer { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: #f0fdf4; color: #15803d; }
.timer.late { background: #fef2f2; color: #dc2626; animation: blink 1.2s infinite; }

.calls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.call { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, #fff1f2, #fff); border: 1.5px solid #fecdd3; padding: 9px 12px 9px 9px; border-radius: 14px; animation: shake .6s ease both, popIn .4s both; }
.call .ic { width: 34px; height: 34px; border-radius: 10px; background: #e5311b; color: #fff; display: grid; place-items: center; animation: bellRing 1.5s infinite; }

/* ---------- table map ---------- */
.tmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.tcard { position: relative; background: #fff; border-radius: 20px; padding: 18px 16px 14px; text-align: center; box-shadow: var(--sh); border: 2px solid transparent; transition: .3s var(--ease); cursor: pointer; animation: popIn .4s var(--ease) both; }
.tcard:hover { transform: translateY(-5px) rotate(-.5deg); border-color: var(--p1); }
.tcard .tic { width: 62px; height: 62px; margin: 0 auto 10px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; background: #e3f9ee; color: #059669; transition: .3s; }
.tcard.occupied .tic { background: #fff0e6; color: #ea580c; }
.tcard.reserved .tic { background: #ccfbf1; color: #0f766e; }
.tcard.occupied { border-color: #fed7aa; }
.tcard h4 { font-size: 15px; }
.tcard .amt { font-weight: 800; color: var(--p1); margin-top: 4px; }

/* ---------- menu manager ---------- */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.icard { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--sh); transition: .3s var(--ease); animation: fadeUp .45s var(--ease) both; display: flex; flex-direction: column; }
.icard:hover { transform: translateY(-5px); box-shadow: var(--sh2); }
.icard .im { height: 150px; background: linear-gradient(135deg, #ffe3d3, #ffd1e3); position: relative; display: grid; place-items: center; font-size: 54px; overflow: hidden; }
.icard .im img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.icard:hover .im img { transform: scale(1.08); }
.icard .im .tag { position: absolute; top: 10px; left: 10px; }
.icard.off { opacity: .6; }
.icard.off .im::after { content: 'OUT OF STOCK'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(27, 21, 48, .55); color: #fff; font-weight: 800; letter-spacing: .1em; font-size: 14px; }
.icard .bd { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.price { font-weight: 800; font-size: 16px; }
.price s { color: var(--muted); font-weight: 500; font-size: 13px; margin-left: 6px; }
.cat-list { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; }
.cat-pill { flex: none; display: flex; align-items: center; gap: 8px; padding: 9px 16px; background: #fff; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; font-weight: 600; font-size: 13.5px; transition: .2s; }
.cat-pill:hover { border-color: var(--p1); }
.cat-pill.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px rgba(255, 60, 60, .7); }
.cat-pill .n { font-size: 11px; background: rgba(0, 0, 0, .07); padding: 0 7px; border-radius: 10px; }
.cat-pill.on .n { background: rgba(255, 255, 255, .25); }
.img-drop { border: 2px dashed #d7d1ea; border-radius: 16px; height: 150px; display: grid; place-items: center; cursor: pointer; overflow: hidden; background: #fbfaff; position: relative; transition: .2s; text-align: center; color: var(--muted); }
.img-drop:hover { border-color: var(--p1); background: #fff7f3; }
.img-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-drop input { display: none; }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 20px; align-items: start; }
.pos-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pos-item { background: #fff; border-radius: 16px; padding: 12px; cursor: pointer; border: 2px solid transparent; transition: .2s var(--ease); box-shadow: 0 4px 14px -8px rgba(150, 60, 20, .25); position: relative; user-select: none; }
.pos-item:hover { border-color: var(--p1); transform: translateY(-3px); }
.pos-item:active { transform: scale(.96); }
.pos-item .pi { height: 70px; border-radius: 12px; background: linear-gradient(135deg, #ffe3d3, #ffd1e3); display: grid; place-items: center; font-size: 30px; overflow: hidden; margin-bottom: 8px; }
.pos-item .pi img { width: 100%; height: 100%; object-fit: cover; }
.pos-item .nm { font-weight: 600; font-size: 13px; line-height: 1.3; }
.pos-item .qb { position: absolute; top: 6px; right: 6px; background: var(--grad); color: #fff; font-weight: 800; font-size: 12px; min-width: 24px; height: 24px; border-radius: 12px; display: grid; place-items: center; animation: pop .3s; }
.pos-item.off { opacity: .45; pointer-events: none; }
.cart-box { position: sticky; top: 90px; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); animation: slideIn .3s var(--ease); }
.qty { display: inline-flex; align-items: center; background: #fff1e6; border-radius: 10px; overflow: hidden; }
.qty button { border: 0; background: transparent; width: 30px; height: 30px; cursor: pointer; font-weight: 800; color: #e5311b; font-size: 16px; }
.qty button:hover { background: #e6e0ff; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; font-size: 13.5px; }
.sum-line { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13.5px; }
.sum-line.total { font-size: 18px; font-weight: 800; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(21, 15, 43, .55); backdrop-filter: blur(6px); z-index: 200; display: grid; place-items: center; padding: 20px; animation: fadeIn .25s both; overflow-y: auto; }
.modal { background: #fff; border-radius: 24px; width: 100%; max-width: 560px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); animation: modalIn .4s var(--ease) both; max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.modal.lg { max-width: 820px; }
.modal.sm { max-width: 420px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.modal-h h3 { font-size: 18px; }
.modal-b { padding: 20px 24px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-back.closing { animation: fadeOut .2s both; }
.modal-back.closing .modal { animation: modalOut .2s both; }

/* ---------- toast ---------- */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 400; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: 380px; padding: 13px 16px; background: #fff; border-radius: 14px; box-shadow: var(--sh2); border-left: 5px solid var(--ok); font-weight: 500; font-size: 13.5px; animation: toastIn .45s var(--ease) both; }
.toast.err { border-left-color: var(--bad); }
.toast.info { border-left-color: var(--info); }
.toast i { font-size: 18px; color: var(--ok); }
.toast.err i { color: var(--bad); }
.toast.info i { color: var(--info); }
.toast.out { animation: toastOut .35s var(--ease) both; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .em { font-size: 54px; margin-bottom: 10px; animation: float 3s ease-in-out infinite; display: inline-block; }
.skel { background: linear-gradient(90deg, #fbeee3 25%, #fff8f2 50%, #fbeee3 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 14px; }
.loader { display: grid; place-items: center; padding: 60px; }
.loader::after { content: ''; width: 42px; height: 42px; border-radius: 50%; border: 4px solid #eee; border-top-color: var(--p1); border-right-color: var(--p2); animation: spin .8s linear infinite; }
.bar { height: 8px; background: #fbeee3; border-radius: 10px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--grad); border-radius: 10px; animation: growX 1s var(--ease) both; transform-origin: left; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.stars { color: #f5a524; letter-spacing: 1px; }
.qr-card { background: #fff; border-radius: 22px; padding: 18px; text-align: center; box-shadow: var(--sh); animation: popIn .4s var(--ease) both; }
.qr-card .qr { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 14px; border: 1px dashed var(--line); }
.qr-card .qr img, .qr-card .qr canvas { width: 150px !important; height: 150px !important; }
.alert { padding: 12px 16px; border-radius: 14px; font-size: 13.5px; display: flex; gap: 10px; align-items: center; }
.alert.warn { background: #fff8e6; color: #92400e; }
.alert.info { background: #fff4e8; color: #9a3412; border: 1px solid #ffdcbf; }
.alert.ok { background: #e3f9ee; color: #065f46; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }
.kbd { background: #fff1e6; color: #e5311b; padding: 2px 8px; border-radius: 6px; font-weight: 600; font-size: 12.5px; font-family: ui-monospace, monospace; }

/* ---------- animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popIn { 0% { opacity: 0; transform: scale(.85); } 70% { transform: scale(1.03); } 100% { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(40px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes modalOut { to { opacity: 0; transform: translateY(20px) scale(.97); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(110%); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(110%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(0, 179, 126, .55); } 70% { box-shadow: 0 0 0 12px rgba(0, 179, 126, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 179, 126, 0); } }
@keyframes glow { 0%, 100% { box-shadow: 0 6px 18px -10px rgba(150, 60, 20, .3); } 50% { box-shadow: 0 0 0 4px rgba(255, 90, 31, .35), 0 10px 30px -8px rgba(255, 90, 31, .6); } }
@keyframes blink { 50% { opacity: .5; } }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes bellRing { 0%, 50%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-15deg); } 20%, 40% { transform: rotate(15deg); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes gradMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos { grid-template-columns: minmax(0, 1fr); }
  .cart-box { position: static; }
}
@media (max-width: 960px) {
  .side { transform: translateX(-105%); }
  body.side-open .side { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .3); }
  body.side-open .side-back { display: block; position: fixed; inset: 0; background: rgba(60, 25, 10, .35); z-index: 55; animation: fadeIn .2s; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(4, 280px); }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .g2, .g3, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .span2 { grid-column: auto; }
  .content { padding: 18px 16px 50px; }
  .topbar { padding: 12px 16px; }
  .topbar h1 { font-size: 18px; }
  .card { padding: 16px; border-radius: 18px; }
  .stat { padding: 16px; min-height: 110px; }
  .stat .v { font-size: 21px; }
  .modal-back { padding: 0; align-items: end; }
  .modal { border-radius: 24px 24px 0 0; max-height: 92vh; animation: sheetIn .4s var(--ease) both; }
  .hide-sm { display: none !important; }
  #toasts { left: 12px; right: 12px; top: 12px; }
  .toast { min-width: 0; max-width: none; }
}
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
.print-area { display: none; }
@media print {
  /* sirf printHtml (bill / sab QR) ke waqt: baaki page hata do, sirf print-area chhape - brochure/guide/bill.html normal print hon */
  body.pa-print { background: #fff !important; }
  body.pa-print > *:not(.print-area) { display: none !important; }
  body.pa-print .print-area { display: block !important; position: static; width: 100%; }
  body.pa-print .print-area img { max-width: 100%; page-break-inside: avoid; break-inside: avoid; }
}
/* customer visit badge on order cards */
.cust-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: .2s var(--ease); }
.cust-badge.rep { background: #dcfce7; color: #15803d; box-shadow: 0 2px 0 -1px #a7e3bb; }
.cust-badge.new { background: #fff1e6; color: #ea580c; box-shadow: 0 2px 0 -1px #ffd2b0; }
.cust-badge:hover { transform: translateY(-1px); filter: brightness(.97); }
.cu-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cu-kpis div { text-align: center; padding: 10px 4px; border-radius: 14px; background: #fff8f1; border: 1.5px solid var(--line); }
.cu-kpis b { display: block; font-size: 18px; }
.cu-kpis span { font-size: 11px; color: var(--muted); font-weight: 600; }
.cu-ord { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.cu-ord:last-child { border: 0; }
.scan-box { position: relative; border-radius: 18px; overflow: hidden; background: #fff1e6; aspect-ratio: 1; max-width: 320px; margin: 0 auto; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-box::after { content: ''; position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, .9); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .25); }
@media (max-width: 560px) { .cu-kpis { grid-template-columns: repeat(2, 1fr); } }

/* v5: chair / seat tag, table chairs, help center */
.seat-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: #fff1e6; color: #c2410c; margin-left: 4px; vertical-align: middle; white-space: nowrap; }
.chairs { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 6px; }
.chairs i { width: 14px; height: 14px; border-radius: 4px; background: #e7e2dc; display: inline-block; }
.chairs i.on { background: var(--p1, #ff5a1f); }
.seat-box { border: 1px solid var(--line, #eee); border-radius: 14px; padding: 10px 12px; margin-top: 8px; }
.seat-box h5 { margin: 0 0 6px; font-size: 13.5px; display: flex; justify-content: space-between; }
.seat-box ul { margin: 0; padding-left: 18px; font-size: 13px; }
.tk-card { border: 1px solid var(--line, #eee); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.tk-card.unread { border-color: #16a34a; box-shadow: 0 0 0 3px #dcfce7; }
.tk-reply { background: #f0fdf4; border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-size: 13.5px; white-space: pre-wrap; }
.tk-msg { white-space: pre-wrap; font-size: 13.5px; color: var(--ink2, #555); margin-top: 6px; }
.alert-slot { padding: 14px 28px 0; max-width: 1500px; }
.alert-slot:empty { display: none; }
@media (max-width: 640px) { .alert-slot { padding: 12px 16px 0; } }
.ico-img { width: 1.15em; height: 1.15em; object-fit: contain; vertical-align: -.2em; display: inline-block; }
.icon-row .icon-up { width: 42px; height: 42px; border-radius: 12px; border: 2px dashed #f2b896; display: inline-grid; place-items: center; cursor: pointer; color: var(--p1); }
.bill-prev { background: linear-gradient(160deg, #fff4ea, #f1fbf4); border-radius: 18px; padding: 16px 14px 26px; max-height: 720px; overflow: auto; }
.bill-prev .rc { max-width: 380px; margin: 0 auto; }
@media (min-width: 1201px) { .bill-prev-card { position: sticky; top: 90px; } }

/* ---------- responsive safety (mobile / tab / laptop) ---------- */
.grid > *, .form-grid > *, .row > .grow { min-width: 0; }
img, video, canvas { max-width: 100%; }
@media (min-width: 641px) and (max-width: 960px) {   /* tablet */
  .content { padding: 22px 22px 60px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal { max-width: min(640px, 94vw); }
}
@media (min-width: 1600px) {   /* bada screen */
  .content { max-width: 1680px; }
}

/* ---------- v8: bookings ---------- */
.hook { font-family: 'Courier New', monospace; font-size: 12px; background: #fff8f1; border: 1px dashed #f3c9a7; border-radius: 10px; padding: 8px 10px; word-break: break-all; }
.bk-card { background: #fff; border-radius: 16px; padding: 14px; border: 1.5px solid var(--line); border-left: 5px solid #f59e0b; display: flex; gap: 14px; align-items: flex-start; transition: .2s var(--ease); }
.bk-card.st-confirmed { border-left-color: #16a34a; }
.bk-card.st-cancelled, .bk-card.st-no_show { border-left-color: #cbd5e1; opacity: .75; }
.bk-card.st-completed { border-left-color: #0d9488; }
.bk-card .dt { text-align: center; min-width: 58px; background: #fff3ea; border-radius: 14px; padding: 6px 4px; flex: none; }
.bk-card .dt b { display: block; font-size: 22px; line-height: 1.1; color: var(--p2); }
.bk-card .dt span { font-size: 11px; text-transform: uppercase; color: var(--ink2); font-weight: 600; }
.bk-list { display: grid; gap: 10px; }
.hall-tile { border-radius: 16px; overflow: hidden; border: 1.5px solid var(--line); background: #fff; }
.hall-tile .ph { height: 110px; background: #fff0e4 center/cover no-repeat; display: grid; place-items: center; font-size: 40px; }
.hall-tile .bd { padding: 12px; }

/* ---------- v9: cooking countdown + waiter per table ---------- */
.eta-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; min-width: 0; }
.eta-row .tiny { flex: 1; min-width: 0; }
.eta-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; background: #ecfdf5; color: #047857; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eta-chip.soon { background: #fff7ed; color: #c2410c; }
.eta-chip.late { background: #fee2e2; color: #dc2626; animation: blink 1.2s infinite; }
.eta-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.eta-pick .btn { justify-content: center; }
.waiter-tag { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: #ecfdf5; color: #15803d; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.waiter-tag.none { background: #f5f0ea; color: var(--muted); }
.tcard.my-table { box-shadow: 0 0 0 3px #22c55e, var(--sh); }
.call.mine { border: 2px solid #22c55e; }
.bk-switch { border: 2px dashed #f3c9a7; background: #fffaf5; }
.bk-switch.on { border: 2px solid #86efac; background: #f0fdf4; }
.bk-switch .ic { width: 48px; height: 48px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-size: 24px; box-shadow: var(--sh); flex: none; }


.team-box { background: #f0fdf4; border: 1.5px solid #bbf7d0; border-radius: 14px; padding: 10px 12px; }

.occ-list { display: grid; gap: 8px; }
.occ-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto 34px; gap: 8px; align-items: center; padding: 8px; border: 1.5px solid var(--line); border-radius: 14px; background: #fffaf5; }
.occ-row .occ-ic { text-align: center; font-size: 20px; padding: 6px; }
.occ-row .chips { flex-wrap: nowrap; }
@media (max-width: 640px) { .occ-row { grid-template-columns: 50px minmax(0, 1fr) 34px; } .occ-row .occ-k { grid-column: 1 / -1; grid-row: 2; } }

/* live timer chip on order cards (cooking / serving) – animates by itself */
.eta-chip { gap: 6px; position: relative; overflow: hidden; }
.eta-chip .eta-anim { font-style: normal; display: inline-block; }
.eta-chip.cook .eta-anim { animation: etaFlip 1.1s ease-in-out infinite; }
.eta-chip.serve { background: #ecfeff; color: #0e7490; }
.eta-chip.serve .eta-anim { animation: etaWalk 1.6s ease-in-out infinite; }
.eta-chip::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-100%); animation: etaShine 2.4s ease-in-out infinite; }
@keyframes etaFlip { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-3px) rotate(-14deg); } 60% { transform: translateY(-1px) rotate(10deg); } }
@keyframes etaWalk { 0% { transform: translateX(-3px); } 50% { transform: translateX(3px) translateY(-1px); } 100% { transform: translateX(-3px); } }
@keyframes etaShine { 60%, 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .eta-chip .eta-anim, .eta-chip::after { animation: none; } }

/* UPI QR for the bill amount */
.upi-box { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border: 1px dashed var(--line, #e5e7eb); border-radius: 14px; background: #fff; }
.upi-qr { flex: none; width: 166px; min-height: 166px; display: grid; place-items: center; text-align: center; background: #fff; border-radius: 12px; padding: 8px; border: 1px solid var(--line, #e5e7eb); }
.upi-qr img, .upi-qr canvas { width: 150px; height: 150px; }
@media (max-width: 460px) { .upi-box { flex-direction: column; align-items: stretch; } .upi-qr { margin: 0 auto; } }
.eta-chip.serve.late { background: #fee2e2; color: #dc2626; }

/* kitchen board (owner Kitchen Screen + staff Kitchen tab) */
.kds-top { display: flex; gap: 12px; align-items: stretch; margin-bottom: 14px; }
.kds-sum { flex: 1; min-width: 0; background: #fff; border-radius: 18px; padding: 12px 14px; box-shadow: var(--sh); }
.kds-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kds-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff3ea; color: var(--ink); border-radius: 12px; padding: 6px 10px; font-size: 14px; }
.kds-chip b { color: var(--p2); }
.kds-clock { flex: none; background: var(--grad); color: #fff; border-radius: 18px; padding: 12px 18px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 120px; }
.kds-clock b { font-size: 24px; line-height: 1.1; }
.kds-clock .muted { color: rgba(255, 255, 255, .85); }
.kds-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.kds-col { min-height: 220px; }
.kds-card { font-size: 15px; }
.kds-card ul li { font-size: 15px; }
#kds:fullscreen { overflow: auto; }
@media (max-width: 900px) { .kds-board { grid-template-columns: minmax(0, 1fr); } .kds-col { min-height: 0; } }
@media (max-width: 560px) { .kds-top { flex-direction: column; } .kds-clock { flex-direction: row; justify-content: space-between; min-width: 0; padding: 10px 14px; } .kds-clock b { font-size: 20px; } }

/* POS / staff "New order" on phones: small dish tiles + sticky "View order" bar */
.pos > div { min-width: 0; }
.pos-bar { display: none; }
@media (max-width: 1200px) {
  .pos-bar { display: flex; position: sticky; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30; margin-top: 14px; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--grad); color: #fff; border: 0; border-radius: 16px; padding: 12px 16px; font: inherit; font-weight: 700; width: 100%; cursor: pointer; box-shadow: 0 14px 30px -12px rgba(229, 49, 27, .7); }
  .pos-bar.empty { display: none; }
}
@media (max-width: 480px) {
  .pos-items { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .pos-item { padding: 10px; }
  .pos-item .pi { height: 58px; }
  .cart-box { padding: 14px; }
}

/* mobile: tables two per row, compact; tap opens the table details */
* { -webkit-tap-highlight-color: transparent; }
@media (max-width: 560px) {
  .tmap { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tcard { padding: 12px 8px 10px; border-radius: 16px; }
  .tcard:hover { transform: none; }
  .tcard .tic { width: 44px; height: 44px; font-size: 19px; border-radius: 13px; margin-bottom: 6px; }
  .tcard h4 { font-size: 14px; }
  .tcard .chairs { display: none; }
  .tcard .waiter-tag { font-size: 10.5px; padding: 2px 8px; }
}

/* table colours: free = green, some chairs taken = orange (those chairs orange), every chair taken = red (all chairs red) */
.tcard.occupied .chairs i.on { background: #f97316; }
.tcard.full { border-color: #fca5a5 !important; background: #fff5f5; }
.tcard.full .tic { background: #fee2e2 !important; color: #dc2626 !important; }
.tcard.full .chairs i, .tcard.full .chairs i.on { background: #dc2626; }
.tcard.full .badge { background: #fee2e2; color: #b91c1c; }
@media (max-width: 560px) { .tcard .chairs { display: flex; gap: 3px; margin-top: 5px; } .tcard .chairs i { width: 10px; height: 10px; border-radius: 3px; } }

/* live cooking / serving progress on order cards (moves every second, no tapping needed) */
.eta-prog { margin-top: 8px; }
.ep-bar { position: relative; height: 9px; border-radius: 9px; background: #f3ece5; overflow: visible; }
.ep-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 9px; background: linear-gradient(90deg, #ffb347, #ff5a1a, #e5311b); background-size: 200% 100%; animation: epFlow 1.6s linear infinite; transition: width 1s linear; }
.eta-prog.serve .ep-bar i { background: linear-gradient(90deg, #86efac, #16a34a, #15803d); background-size: 200% 100%; }
.eta-prog.done .ep-bar i { animation: none; background: #16a34a; }
.ep-ic { position: absolute; top: -9px; font-size: 18px; transition: left 1s linear; animation: epBob .8s ease-in-out infinite alternate; }
.ep-steps { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10.5px; color: #a8998e; font-weight: 600; }
.ep-steps span.on { color: #e5311b; }
.eta-prog.serve .ep-steps span.on { color: #15803d; }
@keyframes epFlow { from { background-position: 0 0; } to { background-position: -200% 0; } }
@keyframes epBob { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ep-bar i, .ep-ic { animation: none; } }

/* kitchen: by-table view */
.kds-seg { margin-bottom: 14px; max-width: 340px; }
.kds-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.ktab { background: #fff; border-radius: 18px; border: 1.5px solid #fde3d3; box-shadow: 0 12px 30px -22px rgba(234, 88, 12, .5); overflow: hidden; }
.ktab.late { border-color: #fca5a5; }
.ktab.ready { border-color: #bbf7d0; }
.ktab-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 12px 14px; background: linear-gradient(135deg, #ff9500, #e5311b); color: #fff; }
.ktab.ready .ktab-h { background: linear-gradient(135deg, #22c55e, #15803d); }
.ktab-name { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.ktab-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.ktab-meta span { background: rgba(255, 255, 255, .2); padding: 3px 9px; border-radius: 999px; }
.ktab-meta .timer { color: #fff; }
.ktab-meta .timer.late { background: #fff; color: #dc2626; font-weight: 700; }
.ktab-cook { padding: 12px 14px; background: #fff8f2; border-bottom: 1px dashed #fed7aa; }
.ktab-cook.done { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; font-size: 14px; }
.ktab-cook ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ktab-cook li { display: flex; gap: 8px; align-items: baseline; font-size: 16px; font-weight: 600; }
.ktab-cook li .q { color: #ea580c; min-width: 30px; font-weight: 800; }
.ktab-cook li em { display: block; font-size: 12px; font-weight: 500; color: #b45309; font-style: normal; }
.ktab-orders { padding: 10px; display: grid; gap: 10px; }
.ktab-orders .ocard { margin: 0; box-shadow: none; border: 1px solid #f1e6dd; }
@media (max-width: 560px) { .kds-tables { grid-template-columns: minmax(0, 1fr); } }

