/* PrintShop Pro - mobile POS interface (js/mpos.js). Only applies to the mobile screens. */
body.mroute .topbar, body.mroute .shopbar { display: none; }
body.mroute .content { padding: 0; }
body.mfull .bottomnav { display: none; }
body.mp-lock { overflow: hidden; }
#view.mp { padding: 0 0 90px; max-width: 640px; margin: 0 auto; }
body.mpos .kbd-btn, body.mpos [data-kbd]::after { display: none !important; }
body.mpos .bottomnav a { position: relative; min-height: 56px; justify-content: center; }
body.mpos .bottomnav a.mp-nav-main { color: #fff; }
body.mpos .bottomnav a.mp-nav-main svg { background: var(--accent-2, #b45309); border-radius: 50%; padding: 7px; width: 40px; height: 40px; margin-top: -18px; box-shadow: 0 4px 12px rgba(190, 24, 93, .45); color: #fff; }
body.mpos .bottomnav a.mp-nav-main span { color: var(--accent-2, #b45309); font-weight: 700; }
body:not(.mpos) .mp-only { display: none; }

/* ---------- top bars ---------- */
.mp-head { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 8px; background: #2a1a10; color: #fff; }
.mp-head h1 { font-size: 18px; color: #fff; }
.mp-fixed { position: sticky; top: 0; z-index: 6; background: #fff; box-shadow: 0 2px 8px rgba(11, 36, 71, .12); }
.mp-ic { width: 44px; height: 44px; border: 0; background: rgba(255, 255, 255, .12); color: inherit; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.mp-ic svg { width: 22px; height: 22px; }
.mp-link { background: none; border: 0; color: #fed7aa; font-weight: 700; font-size: 15px; padding: 10px; text-decoration: none; cursor: pointer; }
.mp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(14px + env(safe-area-inset-top)) 16px 14px; background: linear-gradient(180deg, #2a1a10, #12407a); color: #fff; }
.mp-top small { display: block; opacity: .75; font-size: 13px; }
.mp-top b { font-size: 20px; }
.mp-pad { padding: 12px; }
.mp-scroll { padding: 6px 12px 12px; }

/* ---------- customer + search ---------- */
.mp-cust { display: flex; align-items: center; gap: 10px; width: calc(100% - 24px); margin: 10px 12px 6px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; min-height: 58px; }
.mp-cust .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mp-cust .t b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-cust .t small { color: var(--muted); font-size: 13px; }
.mp-cust svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.mp-av { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; flex: none; }
.mp-two { display: grid; grid-template-columns: 1fr 110px; gap: 8px; padding: 0 12px 6px; }
.mp-two input, .mp-searchbar input, .mp-pad input[type=search], .mp-sheet input, .mp-sheet select, .mp-f input, .mp-f select { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 16px; background: #fff; }
.mp-searchbar { display: flex; gap: 8px; padding: 4px 12px 10px; }
.mp-searchbar .mp-ic { background: var(--brand-soft); color: var(--brand); }
.mp-searchbar input { border-color: var(--brand); }
.mp-warn { background: #fdf1df; color: #7c4700; border-radius: 10px; padding: 9px 12px; font-size: 14px; margin: 6px 0; }

/* ---------- list rows ---------- */
.mp-sec { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 6px; }
.mp-sec h3 { margin: 0; font-size: 15px; color: var(--brand-2); }
.mp-sec a { font-size: 14px; font-weight: 700; text-decoration: none; }
.mp-list { display: flex; flex-direction: column; gap: 8px; }
.mp-row, .mp-prod { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-align: left; text-decoration: none; color: inherit; cursor: pointer; min-height: 60px; }
.mp-row > span:first-child, .mp-prod > .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mp-row b, .mp-prod b { font-size: 16px; }
.mp-row small, .mp-prod small { color: var(--muted); font-size: 13px; }
.mp-row .r, .mp-prod .r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; text-align: right; }
.mp-prod .r em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--brand); }
.mp-row:active, .mp-prod:active { background: var(--brand-soft); }
.mp-row.static, .mp-row.off { cursor: default; }
.mp-row.off { opacity: .55; }
.mp-prod.out { background: #fffaf5; }
.mp-prod .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.mp-chip { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #e8eef6; color: #3f5a7a; }
.mp-chip.ok { background: #e3f4ec; color: #117a4b; }
.mp-chip.warn { background: #fdf1df; color: #a15c00; }
.mp-chip.bad { background: #fce8e6; color: #b3261e; }
.mp-empty { text-align: center; color: var(--muted); padding: 22px 12px; }

/* ---------- cart lines ---------- */
.mp-line { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.mp-line-t { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mp-line-t b { font-size: 16px; }
.mp-line-t small { color: var(--muted); }
.mp-x { width: 36px; height: 36px; border: 0; border-radius: 10px; background: #fce8e6; color: #b3261e; font-size: 22px; line-height: 1; cursor: pointer; flex: none; }
.mp-line-s { color: var(--muted); margin: 3px 0 8px; }
.mp-line-s .doseh { margin-top: 2px; }
.mp-line-r { display: flex; align-items: center; gap: 10px; }
.mp-step { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.mp-step button { width: 46px; height: 46px; border: 0; background: var(--brand-soft); color: var(--brand-2); font-size: 24px; font-weight: 700; cursor: pointer; }
.mp-step input { width: 58px; height: 46px; border: 0; text-align: center; font-size: 18px; font-weight: 700; padding: 0; }
.mp-rate { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mp-rate small { color: var(--muted); font-size: 12px; }
.mp-rate input { width: 100%; min-height: 40px; padding: 4px 10px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 16px; }
.mp-amt { min-width: 76px; text-align: right; font-size: 17px; }

/* ---------- pay bar ---------- */
.mp-paybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(11, 36, 71, .12); }
.mp-paybar > div { display: flex; flex-direction: column; }
.mp-paybar small { color: var(--muted); font-size: 13px; }
.mp-paybar b { font-size: 22px; color: var(--brand-2); }
.mp-pay { min-width: 140px; min-height: 54px; border: 0; border-radius: 14px; background: var(--accent-2, #b45309); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; }
.mp-pay:disabled { background: #cbd5c0; }

/* ---------- sheet ---------- */
.mp-sheet-bg { position: fixed; inset: 0; background: rgba(6, 20, 43, .55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.mp-sheet { background: #fff; width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); animation: mpup .18s ease-out; }
@keyframes mpup { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.mp-grab { width: 44px; height: 5px; border-radius: 3px; background: #d5dcc7; margin: 4px auto 12px; }
.mp-sheet h3 { font-size: 18px; margin: 0 0 10px; color: var(--brand-2); }
.mp-sheet .mp-list { margin-top: 10px; max-height: 52vh; overflow-y: auto; }
.mp-sum { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.mp-sum.big b { font-size: 24px; }
.mp-sum2 { padding: 8px 2px; font-size: 14px; color: var(--muted); }
.mp-seqs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.mp-seg { flex: 1; min-width: 90px; min-height: 46px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.mp-seg.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.mp-f { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.mp-f small { color: var(--muted); font-size: 13px; font-weight: 600; }
.mp-amt-in { font-size: 28px !important; font-weight: 800; min-height: 64px !important; }
.mp-btns { display: flex; gap: 10px; margin-top: 14px; }
.mp-btns.col { flex-direction: column; }
.mp-btn { flex: 1; min-height: 54px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; font-size: 17px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.mp-btn.primary { background: var(--accent-2, #b45309); border-color: var(--accent-2, #b45309); color: #fff; }
.mp-btn.wa { background: #22c55e; border-color: #22c55e; color: #fff; }
.mp-btn:disabled { opacity: .5; }

/* ---------- home ---------- */
.mp-bigbtn { display: flex; align-items: center; gap: 14px; margin: 14px 14px 0; padding: 16px 18px; border-radius: 18px; background: var(--accent-2, #b45309); color: #fff; text-decoration: none; box-shadow: 0 8px 22px rgba(194, 65, 12, .35); }
.mp-bigbtn svg { width: 36px; height: 36px; flex: none; }
.mp-bigbtn span { font-size: 21px; font-weight: 800; display: flex; flex-direction: column; }
.mp-bigbtn small { font-size: 13px; font-weight: 500; opacity: .9; }
.mp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.mp-stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.mp-stat small { color: var(--muted); font-size: 12.5px; }
.mp-stat b { font-size: 19px; color: var(--brand-2); }
.mp-stat em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.mp-stat.warn { background: #fffaf0; border-color: #fcd9a6; }
.mp-stat.warn b { color: #a15c00; }
.mp-stat.bad { background: #fff5f4; border-color: #f6c6c1; }
.mp-stat.bad b { color: #b3261e; }
.mp-alert { display: flex; align-items: center; gap: 12px; margin: 0 14px 4px; padding: 12px 14px; border-radius: 14px; background: #fdf1df; color: #7c4700; text-decoration: none; }
.mp-alert svg { width: 26px; height: 26px; flex: none; }
.mp-alert span { display: flex; flex-direction: column; }
.mp-alert small { font-size: 13px; opacity: .85; }
.mp-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px 14px; }
.mp-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 92px; padding: 10px 6px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--brand-2); text-decoration: none; font-weight: 700; font-size: 13.5px; text-align: center; }
.mp-act svg { width: 28px; height: 28px; }
.mp-act:active { background: var(--brand-soft); }
body.mpos #view.mp .mp-sec { padding: 0 14px; }
body.mpos #view.mp .mp-list { padding: 0 14px; }
.mp-foot { text-align: center; margin: 18px 0; }
.mp-foot a { color: var(--muted); font-size: 14px; }

/* ---------- tabs ---------- */
.mp-tabs { display: flex; gap: 6px; padding: 8px 12px 2px; background: #fff; }
.mp-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 10px; background: #e8eef6; font-weight: 700; font-size: 15px; color: #3f5a7a; cursor: pointer; }
.mp-tabs button.on { background: var(--brand); color: #fff; }
.mp-tabs i { font-style: normal; background: #f2b705; color: #16202e; border-radius: 99px; font-size: 12px; padding: 1px 7px; margin-left: 4px; }
.mp-fixed.light .mp-head { background: #fff; color: var(--ink); padding-bottom: 4px; }
.mp-fixed.light .mp-head h1 { color: var(--brand-2); }
.mp-fixed.light .mp-ic { background: var(--brand-soft); color: var(--brand); }
.mp-fixed.light .mp-link { color: var(--accent-2); }

/* ---------- saved / done ---------- */
.mp-done { padding: calc(40px + env(safe-area-inset-top)) 18px 24px; text-align: center; }
.mp-tick { width: 76px; height: 76px; margin: 0 auto 10px; border-radius: 50%; background: #16a34a; color: #fff; font-size: 44px; line-height: 76px; }
.mp-done h2 { font-size: 24px; margin-bottom: 4px; }
.mp-done .mp-sum { text-align: left; }
.mp-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.mp-card b { font-size: 18px; }
.mp-card small { color: var(--muted); }

@media (min-width: 821px) {
  body.mpos #view.mp { box-shadow: 0 0 0 1px var(--line); min-height: 100vh; background: var(--bg); }
  .mp-paybar { max-width: 640px; left: 50%; transform: translateX(-50%); }
}

/* price list chips on the mobile bill */
.mp-lists { display: flex; align-items: center; gap: 6px; padding: 0 12px 6px; }
.mp-lists small { color: var(--muted); font-weight: 700; font-size: 12px; margin-right: 2px; }
.mp-lists button { flex: 1; min-height: 34px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-weight: 700; font-size: 13px; cursor: pointer; }
.mp-lists button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* smart tools on the phone */
.mp-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; flex: none; font-style: normal; }
.mp-ico svg { width: 22px; height: 22px; }
.mp-sell { flex: none; min-width: 84px; min-height: 46px; font-size: 16px; }
.mp-warn a { color: inherit; font-weight: 700; }

/* ---- v26.10.18.6: forms in sheets, returns lines, rebate cards, voice ---- */
.mp-sheet textarea, .mp-f textarea { width: 100%; min-height: 96px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 16px; font-family: inherit; background: #fff; }
.mp-sheet .fk-line { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 8px; padding: 10px; border: 1.5px solid var(--line); border-radius: 14px; margin: 8px 0; background: #fafcfd; }
.mp-sheet .fk-line .fk-item { grid-column: 1 / -1; }
.mp-sheet .fk-line .fk-b { grid-column: 1 / -1; }
.mp-sheet .fk-line .fk-q, .mp-sheet .fk-line .fk-r { min-width: 0; }
.mp-sheet .fk-line .mp-x { align-self: center; }
.mp-sheet .mp-btn + .mp-btn { margin-top: 8px; }
.mp-rb { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; margin: 10px 12px; }
.mp-rb h3 { margin: 0 0 2px; font-size: 18px; }
.mp-rb .rb-bar { margin: 30px 10px 18px; }
.mp-rb .mp-sum { margin: 6px 0; }
.mp-card2 { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; margin: 10px 12px; }
.mp-card2 h3 { margin: 0 0 4px; font-size: 17px; }
.mp-card2 .r { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.mp-mic { width: 48px; min-width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.mp-mic svg { width: 24px; height: 24px; }
.mp-mic.live { background: #fde8e6; border-color: #b3261e; animation: mpPulse 1.1s infinite; }
@keyframes mpPulse { 50% { box-shadow: 0 0 0 8px rgba(179, 38, 30, .15); } }
.vc-line { display: grid; grid-template-columns: 1fr 96px 36px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.vc-line b { font-size: 15px; }
.vc-line small { color: var(--muted); display: block; }
.vc-line input { min-height: 44px !important; text-align: center; }
.vc-heard { background: #f3f7fa; border-radius: 12px; padding: 10px 12px; min-height: 48px; font-size: 16px; }

/* ---- v26.10.18.6: in-app number pad (js/numpad.js) ---- */
#numpad { position: fixed; left: 0; right: 0; bottom: 0; z-index: 400; display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; padding: 9px 10px calc(10px + env(safe-area-inset-bottom)); background: #e9eef2; border-top: 1px solid #c9d3db; box-shadow: 0 -8px 24px rgba(0,0,0,.16); max-width: 640px; margin: 0 auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
#numpad[hidden] { display: none; }
#numpad button { height: 52px; border: 0; border-radius: 12px; background: #fff; font-size: 24px; font-weight: 700; color: #1d2b12; box-shadow: 0 1px 0 #b9c4cc; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#numpad button:active { background: #dbe5ec; }
#numpad button.fn { background: #d6dee5; font-size: 16px; font-weight: 700; }
#numpad button.kb { font-size: 13px; }
#numpad button.ok { background: var(--brand, #9a4a12); color: #fff; font-size: 17px; box-shadow: none; }
#numpad.int .pt { visibility: hidden; }
body.np-open { padding-bottom: 292px !important; }
body.np-open .mp-sheet { margin-bottom: 292px; max-height: calc(92vh - 292px); }
body.np-open .modal-bg { padding-bottom: 310px; }
body.np-open .mp-paybar { display: none; }
body.np-open input[data-np="1"]:focus { border-color: var(--brand, #9a4a12); box-shadow: 0 0 0 3px rgba(14, 116, 144, .22); }

/* ---- v26.10.18.6: keep the field above the phone keyboard (js/kbfit.js) ---- */
body.kb-open .mp-sheet-bg { top: var(--vvt, 0); bottom: auto; height: var(--vvh, 100%); }
body.kb-open .mp-sheet { max-height: calc(var(--vvh, 100vh) - 12px); padding-bottom: 24px; }
body.kb-open .mp-paybar, body.kb-open .bottomnav { display: none; }
body.kb-open .modal-bg { padding-bottom: 40vh; }
body.kb-open .mp-scroll { padding-bottom: 40vh; }
#mjDue { flex-wrap: wrap; }
#mjDue button { flex: 1 1 auto; padding: 0 10px; }
#mjUrg { flex: 0 0 auto !important; }
.mp-tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mp-tabs::-webkit-scrollbar { display: none; }
.mp-tabs button { flex: 1 0 auto; padding: 0 14px; white-space: nowrap; }
.mp-two:has(select) { grid-template-columns: 1fr 1fr auto; }
.mp-two:has(select) select { max-width: none; width: auto; min-width: 74px; }

/* ---- v26.10.20.9: phone counter sale - scan button, voice inside the search box, touch item tiles ---- */
.mp-searchbar.pos-find { flex-wrap: nowrap; align-items: stretch; }
.mp-searchbar.pos-find .ac-wrap { flex: 1 1 auto !important; min-width: 0; }
.mp-fixed .vi-status { margin: 0 12px 8px; }
.pk .pk-grid { max-height: 36vh; }
.pk .prodgrid .prod { min-height: 72px; padding: 10px; }
.pk .prodgrid.big .prod { min-height: 120px; }
.pk-cats { margin: 0 0 8px; }
.pk-cats button { min-height: 40px; padding: 6px 14px; }
