/* Jaldi POS — restaurant screens (loaded only for restaurant stores) */
.brand-jaldi { color: #e8552b; font-weight: 800; letter-spacing: .5px; }
body.jaldi .home-tile.primary { background: linear-gradient(135deg, #e8552b, #b83d17); }
.jd-wrap { padding: 16px 20px; max-width: 1100px; margin: 0 auto; }
.jd-topline { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.jd-topline h2 { margin: 0; }
.jd-chip { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--panel2, rgba(127,127,127,.15)); border: 1px solid var(--border, rgba(127,127,127,.3)); font-size: 12px; margin: 2px 2px 2px 0; cursor: pointer; white-space: nowrap; }
.jd-chip.off { opacity: .45; text-decoration: line-through; }
.jd-chip.x86 { border-color: #e04b4b; color: #e04b4b; }
.jd-form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.jd-check { display: block; padding: 6px 0; cursor: pointer; }
.jd-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
.jd-cards { display: grid; gap: 12px; }
.jd-card { border: 1px solid var(--border, rgba(127,127,127,.3)); border-radius: 12px; padding: 12px 14px; background: var(--panel, transparent); }
.jd-card.off { opacity: .55; }
.jd-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.jd-mods { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.jd-addmod { display: inline-flex; gap: 4px; align-items: center; margin-left: 6px; }
.jd-addmod input { padding: 4px 8px; font-size: 13px; width: 140px; }
.jd-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.jd-tables { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 16px; }
.jd-table { width: 86px; height: 70px; border: 2px solid var(--border, rgba(127,127,127,.4)); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; background: var(--panel, transparent); }
.jd-table.round { border-radius: 50%; width: 76px; height: 76px; }
.jd-table b { font-size: 18px; }
.modal-actions .spacer { flex: 1; }

/* ---------- phase 2: order screen ---------- */
.jo-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; gap: 8px; }
.jo-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jo-top h2 { margin: 0; }
.jo-start { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 10px 0 18px; }
.jo-start-tile { border: 1px solid var(--border); border-radius: 14px; padding: 18px 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--panel); text-align: center; }
.jo-start-tile:hover { border-color: #e8552b; }
.jo-start-tile .ht-icon { font-size: 34px; }
.jo-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.jo-check-card { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; background: var(--panel); }
.jo-check-card .num { align-self: flex-end; font-size: 18px; }
.jo-check { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 8px; }
.jo-check .jo-bar { grid-column: 1 / -1; }
.jo-left { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); overflow: hidden; }
.jo-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.jo-seats { display: flex; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--border); overflow-x: auto; align-items: center; }
.jo-seat { border: 1px solid var(--border); background: var(--panel2); color: var(--text); border-radius: 999px; padding: 6px 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.jo-seat.on { background: #e8552b; border-color: #e8552b; color: #fff; }
.jo-seat.add { padding: 6px 10px; }
.jo-seats select { margin-left: auto; }
.jo-items { flex: 1; overflow-y: auto; min-height: 120px; }
.jo-seat-hd { font-size: 12px; font-weight: 800; letter-spacing: .5px; opacity: .7; padding: 8px 12px 2px; text-transform: uppercase; }
.jo-line { display: flex; gap: 8px; padding: 9px 10px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: flex-start; }
.jo-line.voided { opacity: .45; text-decoration: line-through; }
.jo-line.held .jo-line-st { color: #e0a800; }
.jo-line.sent .jo-line-st { color: #2fbe2f; }
.jo-line-st { width: 16px; font-size: 14px; padding-top: 2px; }
.jo-line-main { flex: 1; }
.jo-line-name { font-weight: 700; font-size: 16px; }
.jo-line-sub { font-size: 13px; opacity: .75; }
.jo-line-amt { font-weight: 700; font-size: 16px; }
.jo-empty { padding: 30px 14px; text-align: center; }
.jo-totals { border-top: 1px solid var(--border); padding: 8px 12px; }
.jo-totals .trow { display: flex; justify-content: space-between; padding: 2px 0; }
.jo-totals .trow.big { font-size: 22px; font-weight: 800; padding-top: 6px; }
.jo-main { flex: 1; min-width: 320px; display: flex; flex-direction: column; min-height: 0; gap: 8px; }
.jo-cats { display: flex; gap: 6px; overflow-x: auto; align-items: center; padding-bottom: 2px; }
.jo-cats input { width: 150px; flex: none; }
.jo-cat { border: 1px solid var(--border); background: var(--panel2); color: var(--text); border-radius: 10px; padding: 9px 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.jo-cat.on { background: #e8552b; border-color: #e8552b; color: #fff; }
.jo-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 86px; gap: 8px; align-content: start; }
.jo-tile { border: 1px solid var(--border); border-radius: 12px; background: var(--panel2); padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; position: relative; user-select: none; }
.jo-tile:active { transform: scale(.97); }
.jo-tile.out { opacity: .4; }
.jo-tile-name { font-weight: 700; font-size: 15px; line-height: 1.2; overflow: hidden; }
.jo-tile-price { font-size: 14px; opacity: .85; }
.jo-tile-86 { position: absolute; top: 6px; right: 8px; background: #e04b4b; color: #fff; font-weight: 800; border-radius: 6px; padding: 1px 6px; font-size: 12px; }
.jo-bar { width: 100%; display: flex; gap: 8px; padding-top: 4px; flex: none; }
.jo-btn { border: 1px solid var(--border); background: var(--panel2); color: var(--text); border-radius: 12px; padding: 14px 16px; font-weight: 800; font-size: 16px; cursor: pointer; }
.jo-btn:disabled { opacity: .4; cursor: default; }
.jo-btn.primary { background: #e8552b; border-color: #e8552b; color: #fff; }
.jo-btn.pay { background: #2fbe2f; border-color: #2fbe2f; color: #fff; min-width: 180px; }
.jo-mod-groups { display: grid; gap: 10px; max-height: 50vh; overflow-y: auto; }
.jo-mod-title { margin-bottom: 4px; }
.jo-mod-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.jo-choice { border: 1px solid var(--border); background: var(--panel2); color: var(--text); border-radius: 10px; padding: 10px 14px; font-weight: 700; cursor: pointer; font-size: 15px; }
.jo-choice.on { background: #e8552b; border-color: #e8552b; color: #fff; }
.jo-choice.out { opacity: .35; text-decoration: line-through; }
.jo-choice-n { margin-left: 4px; }
.jo-qty { display: flex; align-items: center; gap: 12px; }
.jo-qty b { font-size: 22px; min-width: 30px; text-align: center; }
.jo-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.jo-more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jo-more .btn { padding: 14px; font-size: 15px; }
.jo-split-items { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; max-height: 40vh; overflow-y: auto; }
.yellow { color: #e0a800; }
/* floor */
.jf-legend { display: flex; gap: 14px; align-items: center; font-size: 13px; opacity: .85; }
.jf-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.jf-dot.empty, .jf-table.empty { background: var(--panel2); }
.jf-dot.seated, .jf-table.seated { background: #3b6ef5; color: #fff; }
.jf-dot.sent, .jf-table.sent { background: #e0a800; color: #111; }
.jf-dot.printed, .jf-table.printed { background: #b14ad4; color: #fff; }
.jf-dot.paid, .jf-table.paid { background: #2fbe2f; color: #fff; }
.jf-plan { position: relative; flex: 1; overflow: auto; border: 1px dashed var(--border); border-radius: 12px; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 48px 48px; }
.jf-table { position: absolute; border: 2px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; text-align: center; padding: 4px; line-height: 1.15; touch-action: none; }
.jf-table.round { border-radius: 50%; }
.jf-table b { font-size: 22px; }
.jf-table .jf-info { font-size: 11px; }
.jf-table.dragging { opacity: .8; box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 2; }
.jf-multi { position: absolute; top: -8px; right: -8px; background: #e04b4b; color: #fff; border-radius: 999px; font-size: 11px; padding: 2px 7px; }
/* KDS */
.kds-body { margin: 0; background: #111; color: #eee; height: 100vh; display: flex; flex-direction: column; }
.kds-login { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 100vh; }
#kds-app { display: flex; flex-direction: column; height: 100vh; }
#kds-app.hidden, #kds-login.hidden { display: none; }
.kds-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #1b1b1b; border-bottom: 1px solid #333; }
.kds-bar select { font-size: 16px; }
.kds-allday { display: flex; gap: 8px; overflow-x: auto; }
.kds-ad { background: #2a2a2a; border-radius: 8px; padding: 4px 10px; white-space: nowrap; font-size: 14px; }
.kds-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); grid-auto-rows: max-content; gap: 10px; padding: 10px; }
.kds-ticket { background: #1e1e1e; border: 2px solid #2fbe2f; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.kds-ticket.warn { border-color: #e0a800; }
.kds-ticket.late { border-color: #e04b4b; animation: kds-blink 1.2s infinite; }
@keyframes kds-blink { 50% { box-shadow: 0 0 0 4px rgba(224,75,75,.35); } }
.kds-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: #2fbe2f; color: #111; font-size: 18px; }
.kds-ticket.warn .kds-head { background: #e0a800; }
.kds-ticket.late .kds-head { background: #e04b4b; color: #fff; }
.kds-age { font-variant-numeric: tabular-nums; font-weight: 800; }
.kds-sub { padding: 4px 10px; font-size: 13px; opacity: .8; }
.kds-items { padding: 4px 10px 8px; flex: 1; }
.kds-seat { font-size: 12px; opacity: .7; text-transform: uppercase; letter-spacing: .5px; margin-top: 6px; }
.kds-item { font-size: 20px; font-weight: 700; margin: 4px 0; }
.kds-mod { font-size: 16px; font-weight: 500; opacity: .9; padding-left: 22px; }
.kds-note { font-size: 16px; color: #ffd166; padding-left: 22px; }
.kds-bump { border: 0; background: #333; color: #fff; font-size: 18px; font-weight: 800; padding: 12px; cursor: pointer; }
.kds-bump:hover { background: #2fbe2f; color: #111; }
.kds-empty { grid-column: 1 / -1; text-align: center; opacity: .5; font-size: 24px; padding: 60px; }
/* handheld (phone-width) order screen: check panel on top, menu below */
@media (max-width: 760px) {
  .jo-check { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 42vh) minmax(0, 1fr) auto; }
  .jo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); grid-auto-rows: 70px; }
  .jo-bar { flex-wrap: wrap; }
  .jo-btn { padding: 10px 12px; font-size: 14px; flex: 1; }
  .jo-btn.pay { min-width: 0; width: 100%; }
}

/* ---- P3 payments (pay.js) ---- */
.modal.jp { max-width: 820px; }
.jp-head { display: flex; align-items: center; gap: 10px; }
.jp-head h3 { margin: 0; }
.jp-sum { display: flex; gap: 18px; margin: 12px 0; align-items: flex-end; }
.jp-sum > div { display: flex; flex-direction: column; }
.jp-sum b { font-size: 22px; }
.jp-sum .due b { font-size: 34px; color: var(--green, #2fbe2f); }
.jp-paid { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 10px; }
.jp-pay { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel2); }
.jp-pay > span:first-child { font-weight: 700; min-width: 120px; }
.jp-pay > span:nth-child(2) { flex: 1; }
.jp-pay.voided { opacity: .5; text-decoration: line-through; }
.jp-modes { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 6px; }
.jp-modebody { min-height: 28px; }
.jp-amt { font-size: 20px; margin: 10px 0; }
.jp-amt b { font-size: 28px; }
.jp-tenders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.jp-tenders .btn.big { padding: 18px 10px; font-size: 17px; }
.jp-change { font-size: 18px; margin: 8px 0; }
.jp-change b { font-size: 28px; color: var(--green, #2fbe2f); margin-left: 8px; }
.btn.paid { opacity: .55; }
@media (max-width: 760px) { .jp-tenders { grid-template-columns: 1fr 1fr; } .jp-sum { gap: 12px; } .jp-sum .due b { font-size: 28px; } }

/* ---------- P4 (2026-10-13): Shifts & tips — cash-out slip, manager day view, reports ---------- */
.js-settle { display: flex; gap: 18px; flex-wrap: wrap; align-items: stretch; margin: 6px 0 14px; }
.js-settle-left { flex: 1; min-width: 280px; }
.js-math td { padding: 5px 8px; }
.js-owed { flex: 0 0 280px; border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; border: 2px solid var(--border, rgba(127,127,127,.3)); background: var(--panel, transparent); }
.js-owed .label { font-size: 13px; letter-spacing: .6px; font-weight: 700; }
.js-owed .value { font-size: 40px; font-weight: 800; line-height: 1.1; margin: 4px 0; }
.js-owed.house { border-color: #e8552b; } .js-owed.house .value { color: #e8552b; }
.js-owed.server { border-color: #2fbe2f; } .js-owed.server .value { color: #2fbe2f; }
td.num.house { color: #e8552b; } td.num.server { color: #2fbe2f; }
.jr-sec { margin-top: 14px; } .jr-sec h3 { margin: 0 0 6px; }
tr.total td { border-top: 2px solid var(--border, rgba(127,127,127,.4)); font-weight: 700; }
@media (max-width: 760px) { .js-owed { flex: 1 1 100%; } .js-owed .value { font-size: 32px; } }

/* ---- P5 pre-pilot hardening (2026-10-13) ---- */
.jd-eod { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: rgba(224,75,75,.14); border: 1px solid #e04b4b; color: #ff8080; font-size: 15px; }
.jd-eod a { text-decoration: underline; cursor: pointer; font-weight: 700; margin-left: 6px; }
.jd-eod-banner ul li { margin: 3px 0; } .jd-eod-banner a { text-decoration: underline; cursor: pointer; }
.jd-orph { padding: 8px 12px; border-radius: 8px; background: #7f1d1d; color: #fff; font-size: 14px; flex: none; }
.jd-orph a { text-decoration: underline; cursor: pointer; font-weight: 700; margin-left: 6px; }
/* KDS resilience */
.kds-offline { background: #7f1d1d; color: #fff; padding: 8px 12px; font-weight: 700; text-align: center; font-size: 16px; }
.kds-offline.hidden { display: none; }
.kds-ticket { border-left-width: 8px; }
.kds-ticket.t-tab { border-left-color: #b14ad4; } .kds-ticket.t-takeout { border-left-color: #e0a800; } .kds-ticket.t-delivery { border-left-color: #3b6ef5; } .kds-ticket.t-quick { border-left-color: #2fbe2f; }
.kds-type { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; opacity: .85; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.14); margin-left: 6px; }
.kds-item { cursor: pointer; user-select: none; }
.kds-item.done { opacity: .4; text-decoration: line-through; }
.kds-item.done .kds-mod, .kds-item.done .kds-note { text-decoration: line-through; }
.kds-sta { font-size: 11px; font-weight: 600; opacity: .8; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.12); }
.kds-bump.ready { background: #2fbe2f; color: #111; }
.kds-legend { display: flex; gap: 10px; font-size: 12px; opacity: .8; }
.kds-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.kds-legend .t-tab::before { background: #b14ad4; } .kds-legend .t-takeout::before { background: #e0a800; } .kds-legend .t-delivery::before { background: #3b6ef5; } .kds-legend .t-quick::before { background: #2fbe2f; } .kds-legend .t-dine::before { background: #555; }

/* ---- P6 (2026-10-13): online orders · QR pay · orphan ring-up ---- */
.jo-online { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 8px 6px; background: #1f2a3a; border: 1px solid #3b82f6; border-radius: 10px; }
.jo-online .spacer, .jo-online > div:first-child { flex: 1; }
.jo-ost { color: #93c5fd; font-weight: 700; }
.jo-online-hot { border-color: #f59e0b !important; color: #f59e0b !important; animation: jo-pulse 1.4s infinite; }
@keyframes jo-pulse { 50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, .25); } }
.jo-orph-pend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; margin: 0 8px 6px; background: #3a2d12; border: 1px solid #e0a800; border-radius: 10px; }
.jon-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.jon-row.new { background: rgba(245, 158, 11, .08); }
.jon-main { grid-column: 1; } .jon-amt { grid-column: 2; font-size: 1.2em; text-align: right; }
.jon-btns { grid-column: 1 / span 2; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.jon-btns a.btn { text-decoration: none; }
.jon-st { color: #93c5fd; font-weight: 700; margin-left: 6px; }
.jon-row.new .jon-st { color: #f59e0b; }
.jon-row.ready .jon-st { color: #4ade80; }
.jo-left > .jd-orph { margin: 0 8px 6px; }   /* P6: the orphan banner sits inside the check column (a grid child took the whole 1fr row) */
