/* iPOS Distribution - iPOS.NET Wazirabad */
:root {
  --brand: #1a5aa0; --brand-d: #0f2a4a; --brand-soft: #e3edf8; --accent: #e8a317; --accent-d: #b87c05;
  --bg: #f2f4f1; --card: #fff; --ink: #1b2620; --muted: #66756c; --line: #dfe5e0; --field: #fff;
  --ok: #17803d; --bad: #c0392b; --warn: #b8690a; --radius: 12px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
a { color: var(--brand); }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.2; }
h2 { font-size: 18px; } h3 { font-size: 15px; margin-top: 14px; }
.small { font-size: 13px; } .muted { color: var(--muted); } .big { font-size: 20px; font-weight: 700; }
.spacer { flex: 1; } .right { text-align: right; } .n { text-align: right; font-variant-numeric: tabular-nums; } .mono { font-family: Consolas, monospace; }

/* layout */
.shopbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; background: var(--brand-d); color: #fff; padding: 8px 14px; padding-top: calc(8px + env(safe-area-inset-top)); }
.shopbar-logo { width: 34px; height: 34px; border-radius: 8px; }
.shopbar-t { display: flex; flex-direction: column; min-width: 0; } .shopbar-t b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .shopbar-t small { color: #a9c9b6; font-size: 12px; }
.net { width: 10px; height: 10px; border-radius: 50%; background: #3ddc84; } .net.off { background: #f5a623; }
.app { display: flex; min-height: calc(100vh - 50px); }
.sidenav { width: 210px; flex: none; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 50px; height: calc(100vh - 50px); }
.sidenav nav { flex: 1; overflow-y: auto; padding: 8px; }
.navlink { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.navlink svg { width: 19px; height: 19px; color: var(--muted); } .navlink:hover { background: var(--bg); }
.navlink.active { background: var(--brand-soft); color: var(--brand-d); } .navlink.active svg { color: var(--brand); }
.navfoot { font-size: 11px; color: var(--muted); padding: 10px 14px; border-top: 1px solid var(--line); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 20px 6px; }
.topbar h1 { font-size: 21px; margin: 0; flex: 1; min-width: 150px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.content { padding: 8px 20px 90px; max-width: 1400px; width: 100%; }
.bottomnav { display: none; }
body.pos-mode .content { max-width: none; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; min-height: 40px; text-decoration: none; white-space: nowrap; }
.btn svg { width: 17px; height: 17px; } .btn:hover { border-color: #c3cdc6; } .btn:focus-visible { outline: 3px solid #9fd3b5; outline-offset: 1px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { background: #125234; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; } .btn.bad { color: var(--bad); border-color: #efc4be; } .btn.bad.fill { background: var(--bad); color: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #231a00; } .btn.wa { background: #1faa59; border-color: #1faa59; color: #fff; }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 13px; } .btn.lg { min-height: 50px; font-size: 17px; padding: 10px 20px; } .btn.xl { min-height: 56px; font-size: 19px; padding: 12px 28px; border-radius: 14px; }
.btn.ghost { background: transparent; color: inherit; border-color: rgba(255,255,255,.35); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: 6px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--field); border: 1px solid #cfd8d2; border-radius: 9px; padding: 8px 10px; min-height: 40px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px #cfe8d9; }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); }
textarea { min-height: 70px; }
.f { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; } .f > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.f.chk { flex-direction: row; align-items: center; gap: 8px; } .f.chk span, .f.chk { color: var(--ink); font-weight: 500; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 12px; } .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)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: #eef1ee; color: var(--muted); }
.badge.ok { background: #dff3e6; color: var(--ok); } .badge.bad { background: #fbe3e0; color: var(--bad); } .badge.warn { background: #fdefd6; color: var(--warn); } .badge.info { background: #e1ecfb; color: #2459a8; }
.seg { display: inline-flex; background: #e8ece9; border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--brand-d); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .lbl { font-size: 13px; color: var(--muted); font-weight: 600; } .stat .val { font-size: 23px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat.ok .val { color: var(--ok); } .stat.bad .val { color: var(--bad); } .stat.warn .val { color: var(--warn); }

/* tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid #edf0ee; vertical-align: middle; }
th.n, td.n { text-align: right; }
tr.click { cursor: pointer; } tr.click:hover td { background: #f6f9f7; }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); }

/* modal / toast */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 30, 22, .45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 30px 12px; overflow-y: auto; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,.3); display: flex; flex-direction: column; max-height: calc(100vh - 60px); }
.modal.wide { max-width: 900px; }
.modal header { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); } .modal header h2 { flex: 1; margin: 0; }
.modal .x { border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal .body { padding: 16px 18px; overflow-y: auto; } .modal footer { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); background: #1b2620; color: #fff; padding: 11px 18px; border-radius: 10px; z-index: 300; opacity: 0; transition: .25s; max-width: 90vw; font-weight: 600; }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.bad { background: var(--bad); }

/* welcome & login */
.welcome, .login { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto;
  background: radial-gradient(circle at 85% 10%, #2d6db3 0, transparent 45%), radial-gradient(circle at 10% 90%, #6a4f07 0, transparent 40%), linear-gradient(160deg, #0f2a4a, #081626); }
.wl-card { text-align: center; color: #fff; max-width: 560px; }
.wl-logo, .lg-logo { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.35); cursor: pointer; user-select: none; }
.wl-greet { margin-top: 18px; color: var(--accent); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 14px; }
.wl-card h1 { font-size: clamp(30px, 6vw, 46px); margin: 6px 0; } .wl-card .muted { color: #b9d3c3; font-size: 17px; }
.wl-date { margin: 14px 0 26px; color: #d9e8df; font-size: 15px; }
.welcome .btn.primary { background: var(--accent); border-color: var(--accent); color: #231a00; }
.wl-foot { margin-top: 30px; font-size: 12px; color: #8fb3a0; }
.login-box { background: #fff; border-radius: 20px; padding: 24px; width: 100%; max-width: 520px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.login-box.wide { max-width: 620px; text-align: left; }
.login-box h1 { font-size: 22px; margin-top: 10px; } .lg-logo { width: 64px; height: 64px; border-radius: 16px; }
.users { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 16px 0; }
.uchip { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 110px; padding: 12px; border: 2px solid var(--line); background: #fff; border-radius: 14px; cursor: pointer; font: inherit; }
.uchip .av { width: 46px; height: 46px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-d); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.uchip small { color: var(--muted); } .uchip.on { border-color: var(--brand); background: #f3faf6; }
.pinrow { display: flex; gap: 8px; margin-bottom: 10px; } .pinrow input { font-size: 22px; text-align: center; letter-spacing: 6px; }
.shake { animation: shake .35s; } @keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.lg-links { display: flex; justify-content: space-between; margin-top: 12px; }
.tkeys { display: flex; flex-direction: column; gap: 6px; } .tk-row { display: flex; gap: 6px; justify-content: center; }
.tk { flex: 1; min-height: 54px; font: inherit; font-size: 21px; font-weight: 700; border: 1px solid var(--line); background: #f6f8f6; border-radius: 12px; cursor: pointer; }
.tkeys.alpha .tk { min-height: 46px; font-size: 17px; padding: 0; } .tk.fn { background: #e6ece8; font-size: 15px; } .tk.space { flex: 5; } .tk.on { background: var(--brand-soft); }
.tk:active { background: var(--brand-soft); }
.pref-ed { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.pref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.pref { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.pref span { display: flex; flex-direction: column; } .pref small { color: var(--muted); font-size: 12px; }

/* counter POS */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.scanbar { display: flex; gap: 8px; position: relative; } .scanbar input { font-size: 18px; min-height: 50px; }
.ac-list { position: absolute; top: 54px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.15); z-index: 20; max-height: 380px; overflow-y: auto; }
.ac-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid #f0f2f0; } .ac-row.on, .ac-row:hover { background: var(--brand-soft); }
.ac-row small { display: block; color: var(--muted); }
.billt td { padding: 6px; } .billt input { min-height: 34px; padding: 4px 6px; text-align: right; }
.billt select { min-height: 34px; padding: 3px 6px; width: auto; }
.billt tr.last td { background: #fbf6e8; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 12px; }
.tile { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px; text-align: left; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 3px; min-height: 86px; }
.tile b { font-size: 14px; } .tile .p { color: var(--brand); font-weight: 800; margin-top: auto; } .tile.out { opacity: .5; }
.catbar { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; } .catbar button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; } .catbar button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.sumbox { position: sticky; top: 64px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; } .totals .grand { font-size: 26px; font-weight: 800; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 8px; }
.party-box { background: #f6f9f7; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.warnbox { background: #fdf3df; border: 1px solid #f2d7a0; color: #7a4d00; border-radius: 10px; padding: 8px 10px; margin: 6px 0; font-size: 14px; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.menu-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 10px; text-decoration: none; color: var(--ink); font-weight: 600; text-align: center; }
.menu-tile svg { width: 28px; height: 28px; color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; } .chip { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 4px 12px; font: inherit; cursor: pointer; } .chip.on { background: var(--brand-soft); border-color: var(--brand); }
.bar-wrap { height: 8px; background: #eef1ee; border-radius: 4px; overflow: hidden; min-width: 60px; } .bar { height: 100%; background: var(--brand); }

/* feature switches: hide what the shop does not use */
body.nf-units .ft-units, body.nf-levels .ft-levels, body.nf-lastrate .ft-lastrate, body.nf-hold .ft-hold, body.nf-splitpay .ft-splitpay,
body.nf-touch .ft-touch, body.nf-whatsapp .ft-whatsapp, body.nf-a4 .ft-a4, body.nf-labels .ft-labels, body.nf-quotes .ft-quotes, body.nf-orders .ft-orders,
body.nf-purchases .ft-purchases, body.nf-parties .ft-parties, body.nf-stock .ft-stock, body.nf-retail .ft-retail, body.nf-wholesale .ft-wholesale, body.nf-scale .ft-scale { display: none !important; }

/* printing */
#print { display: none; }
@media print {
  body > *:not(#print) { display: none !important; } #print { display: block !important; } @page { margin: 6mm; }
  #print.rcpt80 { width: 72mm; } #print.rcpt58 { width: 48mm; }
}
.rcpt { font-family: Arial, sans-serif; font-size: 12px; color: #000; } .rcpt h3 { text-align: center; margin: 0 0 2px; font-size: 16px; } .rcpt .c { text-align: center; }
.rcpt .lr { display: flex; justify-content: space-between; gap: 6px; } .rcpt hr { border: 0; border-top: 1px dashed #000; margin: 5px 0; } .rcpt .b { font-weight: 700; } .rcpt .gt { font-size: 16px; font-weight: 800; }
.a4 { font-family: Arial, sans-serif; color: #000; font-size: 12px; }
.a4 .hd { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 10px; } .a4 h1 { font-size: 22px; margin: 0; } .a4 h2 { font-size: 18px; text-align: right; margin: 0; }
.a4 table { border-collapse: collapse; width: 100%; } .a4 th, .a4 td { border: 1px solid #777; padding: 5px 6px; color: #000; font-size: 12px; text-transform: none; letter-spacing: 0; }
.a4 .tot { margin-left: auto; width: 45%; margin-top: 8px; } .a4 .sign { display: flex; justify-content: space-between; margin-top: 60px; }
.lbls { display: flex; flex-wrap: wrap; gap: 2mm; } .lbls .lbl { width: 38mm; height: 25mm; border: 1px dashed #bbb; padding: 1mm; text-align: center; font-family: Arial; overflow: hidden; } .lbls .lbl b { font-size: 9px; display: block; white-space: nowrap; overflow: hidden; } .lbls .lbl svg { width: 100%; height: 12mm; } .lbls .lbl .p { font-weight: 800; font-size: 12px; }

/* phones */
@media (max-width: 900px) { .pos { grid-template-columns: minmax(0, 1fr); } .pos > * { min-width: 0; } .sumbox { position: static; } }
@media (max-width: 600px) { .tiles { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); max-height: 46vh; overflow-y: auto; } .tile { min-height: 74px; padding: 8px; } .tile b { font-size: 13px; } .scanbar input { font-size: 16px; } }
@media (max-width: 820px) {
  .card:not(:has(.scanbar, #edQ, #psQ)) { overflow-x: auto; }
  .sidenav { display: none; } .content { padding: 8px 14px 96px; } .topbar { padding: 12px 14px 4px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; font-size: 11px; color: var(--muted); text-decoration: none; font-weight: 600; }
  .bottomnav a svg { width: 22px; height: 22px; } .bottomnav a.active { color: var(--brand); }
  .modal-bg { padding: 0; align-items: flex-end; } .modal { border-radius: 16px 16px 0 0; max-height: 92vh; }
  .hide-m { display: none; }
}
/* licensing */
.btn.xs { min-height: 26px; padding: 2px 8px; font-size: 12px; }
.ok-t { color: var(--ok); font-weight: 700; } .bad-t { color: var(--bad); font-weight: 700; }
.licbar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; background: #fff4d6; color: #5a4300; border-bottom: 1px solid #f0d58a; padding: 6px 14px; font-size: 14px; }
.lic-lock { z-index: 95; }
.lic-big { font-size: 20px; font-weight: 800; color: var(--bad); margin: 8px 0 2px; }
.lic-st { border-radius: 12px; padding: 10px 14px; font-weight: 700; margin-bottom: 12px; background: #eef5f0; }
.lic-st.ok { background: #e3f4e9; color: var(--ok); } .lic-st.warn { background: #fff4d6; color: #7a5a00; } .lic-st.bad { background: #fde8e6; color: var(--bad); }
.lic-dev { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #f6f9f7; border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
.lic-dev span { color: var(--muted); font-weight: 600; } .lic-dev b { font-size: 24px; letter-spacing: 2px; font-family: ui-monospace, Consolas, monospace; }
.lic-key { font-family: ui-monospace, Consolas, monospace; letter-spacing: 1px; text-transform: uppercase; font-size: 17px; }
.lic-keyout { margin-top: 12px; background: #f6f9f7; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.lic-keyout b { font-family: ui-monospace, Consolas, monospace; font-size: 22px; letter-spacing: 1px; color: var(--brand-d); word-break: break-all; }
.lic-more { margin-top: 12px; font-size: 14px; } .lic-more summary { cursor: pointer; color: var(--brand); font-weight: 700; }

/* distribution screens */
.tbl { width: 100%; border-collapse: collapse; } .tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); } .tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th.n, .tbl td.n { text-align: right; } .tbl tr.click { cursor: pointer; } .tbl tr.click:hover, .tbl td.click:hover { background: var(--brand-soft); } .tbl td.click { cursor: pointer; }
.tbl tr.void td { text-decoration: line-through; color: var(--muted); } .tbl tr.free td { background: #fff8e6; } .tbl tr.tot td { font-weight: 700; border-top: 2px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; } .filters input, .filters select { min-height: 40px; }
.filters input[type=date] { width: 150px; } .filters #cuQ, .filters #prQ, .filters #mdQ, .filters #saQ { flex: 1; min-width: 180px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; background: #e6ebf1; padding: 4px; border-radius: 12px; margin-bottom: 12px; width: fit-content; max-width: 100%; }
.seg a, .seg button { padding: 7px 14px; border-radius: 9px; text-decoration: none; color: var(--ink); font-weight: 600; border: 0; background: none; font: inherit; font-weight: 600; cursor: pointer; } .seg a.on, .seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); color: var(--brand-d); }
.badge.acc { background: #fff1d1; color: #7a5200; } .badge.warn { background: #fff4d6; color: #7a5a00; }
.acc-t { color: #9a6500; } .warn-t { color: var(--warn); } .ok-t { color: var(--ok); } .bad-t { color: var(--bad); }
.warnbox { background: #fff4d6; border: 1px solid #f0d58a; color: #6a4b00; border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: 14px; }
.okbox { background: #e3f4e9; border: 1px solid #b7e0c4; color: #145c2c; border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; }
.val.sm { font-size: 17px; } .grid.mini .stat { padding: 10px 12px; } .grid.mini .val { font-size: 19px; }
.daypick, .multipick { display: flex; flex-wrap: wrap; gap: 6px; } .daypick label, .multipick label { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 20px; padding: 4px 10px; font-size: 14px; background: #fff; cursor: pointer; }
.multipick { max-height: 180px; overflow-y: auto; }
.totals { margin-left: auto; max-width: 360px; margin-top: 10px; } .totals div { display: flex; justify-content: space-between; padding: 3px 0; } .totals .grand { border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 6px; font-size: 18px; }
.meter { display: inline-block; width: 70px; height: 8px; background: #e6ebf1; border-radius: 6px; overflow: hidden; margin-right: 6px; vertical-align: middle; } .meter i { display: block; height: 100%; } .meter i.ok { background: var(--ok); } .meter i.warn { background: var(--accent); } .meter i.bad { background: var(--bad); }
/* editor (order / bill grid) */
.ed-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 10px; }
.pbox { flex: 1; min-width: 260px; display: flex; gap: 12px; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.ed-fields { flex: 1; min-width: 260px; } .ed-fields .f { margin: 0; }
.cotabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; } .cotabs button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; } .cotabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.ed-search { display: flex; gap: 10px; align-items: center; margin: 6px 0 8px; } .ed-search input { flex: 1; min-height: 44px; font-size: 16px; }
.ed-grid { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gco { background: #eef3f9; padding: 6px 12px; font-weight: 700; color: var(--brand-d); font-size: 13px; text-transform: uppercase; letter-spacing: .4px; }
.gr { display: grid; grid-template-columns: minmax(0, 1fr) auto 150px; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); } .gr.has { background: #f1f7ff; }
.gn { cursor: pointer; min-width: 0; } .gn b { font-size: 15px; } .gn .small { color: var(--muted); margin-top: 2px; }
.gq { display: flex; gap: 6px; } .gq label { display: flex; flex-direction: column; align-items: center; } .gq i { font-style: normal; font-size: 11px; color: var(--muted); }
.gq input { width: 70px; text-align: center; font-size: 17px; font-weight: 700; min-height: 42px; padding: 4px; }
.ga { text-align: right; font-variant-numeric: tabular-nums; } .ga .small { white-space: nowrap; }
a.lastrate { color: #9a6500; font-weight: 600; text-decoration: none; border-bottom: 1px dashed #c89b3c; }
.ed-sum { position: sticky; bottom: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 10px; box-shadow: 0 -6px 18px rgba(0,0,0,.06); z-index: 5; }
.sum-l { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.sum-r { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; } .sum-r .f { margin: 0; } .sum-r .f.sm input, .sum-r .f.sm select { width: 120px; min-height: 40px; } .sum-r .f.grow { flex: 1; min-width: 140px; } .sum-r .f.grow input { width: 100%; }
.tot { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; } .tot b { font-size: 24px; } .tot small { color: var(--muted); }
.picklist { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow-y: auto; } .pk { display: grid; grid-template-columns: 1fr auto; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font: inherit; cursor: pointer; } .pk .small.muted { grid-column: 1; } .pk > span:last-child { grid-row: 1 / span 2; grid-column: 2; align-self: center; } .pk:hover, .pk.on { border-color: var(--brand); background: var(--brand-soft); }
/* field (booker) */
.shoplist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-bottom: 14px; }
.shop { background: #fff; border: 1px solid var(--line); border-left: 5px solid #cfd8e3; border-radius: 12px; padding: 10px 12px; } .shop.done { border-left-color: var(--ok); } .shop.no { border-left-color: var(--bad); }
.sh-h { display: flex; justify-content: space-between; gap: 8px; } .sh-b { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .btn.ico { padding: 4px 8px; } .btn.ico svg { width: 18px; height: 18px; }
.lpchip { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; text-decoration: none; color: var(--ink); background: #f7faff; }
.reasons { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; } .reasons label { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.bars { display: flex; gap: 4px; align-items: flex-end; height: 150px; } .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; } .bar i { width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; } .bar span { font-size: 10px; color: var(--muted); }
.a4 .info td { border: 1px solid #999; } .a4 .foot { margin-top: 16px; text-align: center; } .pb { page-break-after: always; height: 0; }
@media print { .pb { page-break-after: always; } }
@media (max-width: 820px) {
  .gr { grid-template-columns: minmax(0, 1fr) auto; } .gr .ga { grid-column: 1 / -1; text-align: left; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; } .gr .ga:empty { display: none; }
  .gq input { width: 62px; } .ed-sum { border-radius: 12px 12px 0 0; margin: 10px -14px 0; } .tot b { font-size: 21px; }
  .sum-r .f.sm input, .sum-r .f.sm select { width: 105px; } .shoplist { grid-template-columns: 1fr; }
  .tbl { font-size: 14px; } .seg { width: 100%; }
}
body.edit-mode .bottomnav { display: none; } body.edit-mode .content { padding-bottom: 20px; }
.small svg, .badge svg, .acc-t svg, .sum-l svg { width: 14px; height: 14px; vertical-align: -2px; }
.ga .small { white-space: normal; } .gr { grid-template-columns: minmax(0, 1fr) auto 170px; }
@media (max-width: 820px) { .gr { grid-template-columns: minmax(0, 1fr) auto; } }
@media (max-width: 820px) {
  .grid.g4.mini { grid-template-columns: 1fr 1fr; gap: 8px; } .grid.mini .stat { padding: 8px 10px; } .grid.mini .val { font-size: 17px; }
  .ed-sum { padding: 8px 12px; } .sum-l { font-size: 13px; margin-bottom: 4px; } .sum-r { gap: 8px; }
  .sum-r .f.sm, .sum-r .f.grow { flex: 1 1 40%; min-width: 0; } .sum-r .f.sm input, .sum-r .f.sm select { width: 100%; min-height: 38px; } .sum-r .f.grow input { min-height: 38px; }
  .sum-r .tot { margin-left: 0; flex: 1; align-items: flex-start; } .sum-r #edSave { flex: 1; }
  .ed-fields { min-width: 0; } .ed-top { gap: 8px; }
}
.filters select, .filters input { width: auto; flex: 0 1 auto; } .filters input[type=date] { width: 160px; }
.filters #cuQ, .filters #prQ, .filters #mdQ, .filters #saQ, .filters #pcQ { flex: 1 1 200px; }
@media (max-width: 820px) { .ed-top { flex-direction: column; align-items: stretch; } .ed-fields { width: 100%; } .pbox { min-width: 0; } .filters select, .filters input { flex: 1 1 140px; } }
