:root {
  --bg: #f4f5f9;
  --card: #ffffff;
  --ink: #1d2333;
  --muted: #7b8398;
  --line: #e8eaf1;
  --brand: #4f5bd5;
  --brand-d: #3c47b8;
  --brand-soft: #eef0fd;
  --danger: #d4565f;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(25, 35, 70, .04), 0 8px 24px rgba(25, 35, 70, .06);

  --c-pending: #f0a020;  --s-pending: #fff6e5;
  --c-warehouse: #5f6f8a; --s-warehouse: #edf0f5;
  --c-pickup: #8b5cf6;   --s-pickup: #f3edff;
  --c-transit: #1d9bd8;  --s-transit: #e8f5fd;
  --c-delivered: #1fa97c; --s-delivered: #e6f7f1;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 15px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
b, strong { font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.boot { padding: 40px; text-align: center; color: var(--muted); }
svg.i { width: 18px; height: 18px; flex: none; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

/* status colours */
.st-pending { --c: var(--c-pending); --s: var(--s-pending); }
.st-warehouse { --c: var(--c-warehouse); --s: var(--s-warehouse); }
.st-pickup { --c: var(--c-pickup); --s: var(--s-pickup); }
.st-transit { --c: var(--c-transit); --s: var(--s-transit); }
.st-delivered { --c: var(--c-delivered); --s: var(--s-delivered); }

/* ---------- buttons / inputs */
.btn {
  border: 0; border-radius: 12px; padding: 10px 18px; min-height: 46px;
  background: var(--brand); color: #fff; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, transform .08s;
}
.btn:active { background: var(--brand-d); transform: scale(.98); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:active { background: var(--brand-soft); }
.btn.danger { background: #fff; color: var(--danger); box-shadow: inset 0 0 0 1px #f3dcde; }
.btn.sm { min-height: 36px; padding: 6px 13px; font-size: 13.5px; border-radius: 10px; }
.btn[disabled] { opacity: .55; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field .req { color: var(--danger); }
input[type=text], input[type=password], input[type=tel], input[type=number], input[type=url], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 13px;
  border: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line);
}
textarea { min-height: 76px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #aab0c2; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 4px rgba(79, 91, 213, .12); }
.err { color: var(--danger); font-size: 13.5px; margin: 6px 0; min-height: 1em; }

/* ---------- login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 50% -10%, #e3e6ff, transparent); }
.login form { width: 100%; max-width: 350px; background: var(--card); padding: 30px 26px; border-radius: 24px; box-shadow: var(--shadow); }
.login h1 { margin: 0 0 4px; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.login p { margin: 0 0 22px; color: var(--muted); }
.login .btn { width: 100%; }
.logo { width: 46px; height: 46px; border-radius: 14px; margin-bottom: 16px; display: block; }

/* ---------- top bar */
.top { position: sticky; top: 0; z-index: 20; background: rgba(244, 245, 249, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: env(safe-area-inset-top); }
.top-row { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; max-width: 1500px; margin: 0 auto; }
.top-row h1 { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 20px; font-weight: 600; letter-spacing: -.015em; flex: 1; }
.top .iconbtn { background: #fff; color: var(--ink); border: 0; border-radius: 12px; height: 40px; min-width: 40px; padding: 0 13px; font-weight: 500; font-size: 14px; box-shadow: var(--shadow); }
.top .iconbtn#b-new { background: var(--brand); color: #fff; }
.nav { display: flex; gap: 4px; overflow-x: auto; padding: 0 14px 6px; max-width: 1500px; margin: 0 auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav button { flex: none; border: 0; border-radius: 999px; padding: 7px 14px; background: transparent; color: var(--muted); font-weight: 500; font-size: 14px; }
.nav button.on { background: var(--ink); color: #fff; }

.wrap { max-width: 1500px; margin: 0 auto; padding: 8px 14px 90px; }

/* ---------- status chips (scrollable row) */
.seg { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 12px; max-width: 1500px; margin: 0 auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: none; display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; padding: 9px 14px;
  background: #fff; color: var(--ink); font-weight: 500; font-size: 14px; box-shadow: var(--shadow);
}
.seg button .dot { color: var(--c); }
.seg .cnt { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
.seg button.on { background: var(--c); color: #fff; }
.seg button.on .dot { color: #fff; }
.seg button.on .cnt { background: rgba(255, 255, 255, .25); color: #fff; }

/* ---------- toolbar */
.toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.toolbar .search { grid-column: 1 / -1; }
.toolbar select, .toolbar input { min-height: 44px; font-size: 14px; box-shadow: var(--shadow); }

/* ---------- delivery list */
.list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.group { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 12px 2px 0; font-weight: 600; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; }
.group .n { background: #fff; color: var(--muted); border-radius: 999px; padding: 1px 9px; font-size: 12px; letter-spacing: 0; box-shadow: var(--shadow); }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 56px 10px; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; display: flex; flex-direction: column; gap: 11px;
}
.card.st-delivered .nm { color: var(--muted); }
.card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.nm { font-size: 17px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; word-break: break-word; }
.pl { flex: none; background: var(--bg); color: var(--ink); border-radius: 999px; padding: 3px 11px; font-weight: 500; font-size: 12.5px; }
.stpill { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; margin-top: -4px; padding: 3px 11px 3px 9px; border-radius: 999px; background: var(--s); color: var(--c); font-size: 12.5px; font-weight: 600; }
.addr { color: var(--muted); text-decoration: none; display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.addr svg { margin-top: 1px; }
.call {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--brand-soft); color: var(--brand-d); text-decoration: none;
  padding: 12px; border-radius: 14px; font-weight: 600; font-size: 17px; letter-spacing: .02em;
}
.call:active { background: #e1e5fb; }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.items li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; background: var(--bg); border-radius: 12px; padding: 9px 11px; font-size: 14px; }
.items .qty { font-weight: 600; color: var(--brand); }
.items .ttl { flex: 1 1 140px; word-break: break-word; }
.wh { background: #fff; color: var(--muted); border-radius: 8px; padding: 2px 9px; font-size: 12px; font-weight: 500; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line); }
.note { display: flex; gap: 8px; align-items: flex-start; background: #fff8e8; border-radius: 12px; padding: 9px 11px; font-size: 13.5px; color: #8a6420; }
.note svg { margin-top: 1px; }
.meta { color: #a0a6b8; font-size: 12px; }
.card-foot { margin-top: auto; display: flex; flex-direction: column; gap: 9px; }
.done-btn { width: 100%; min-height: 52px; font-size: 16px; font-weight: 600; background: var(--c-delivered); border-radius: 14px; }
.done-btn:active { background: #168a64; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { flex: 1 1 calc(50% - 6px); display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 12px; padding: 10px 6px; min-height: 42px; background: var(--s); color: var(--c); font-size: 13.5px; font-weight: 600; }
.chip:active { filter: brightness(.95); }
.donebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--s-delivered); border-radius: 12px; padding: 6px 6px 6px 12px; color: var(--c-delivered); font-size: 13px; font-weight: 500; }
.donebar span { display: inline-flex; align-items: center; gap: 6px; }
.admin-actions { display: flex; gap: 8px; }
.admin-actions .btn { flex: 1; }

/* ---------- toast */
.toast {
  position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 100;
  max-width: 440px; margin: 0 auto; background: #1d2333; color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 10px 30px rgba(20, 28, 60, .25);
}
.toast.bad { background: #c04852; }
.toast button { background: none; border: 0; color: #aab4ff; font-weight: 600; font-size: 13.5px; padding: 6px 4px; }

/* ---------- modal */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(20, 26, 50, .4); backdrop-filter: blur(2px); display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--bg); width: 100%; max-width: 860px; max-height: 94dvh; display: flex; flex-direction: column; border-radius: 24px 24px 0 0; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; }
.modal-head h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.modal-body { padding: 4px 18px 24px; overflow-y: auto; }
.modal-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 10px; background: #fff; box-shadow: 0 -1px 0 var(--line); }
.modal-foot .btn { flex: 1; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* item editor */
.irow { display: grid; grid-template-columns: 1fr 1fr 74px 42px; gap: 6px; margin-bottom: 8px; align-items: start; background: #fff; border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.irow .ifield { position: relative; grid-column: 1 / -1; }
.irow input, .irow select { background: var(--bg); box-shadow: none; }
.irow .x { background: #fff; border: 0; color: var(--danger); border-radius: 12px; height: 46px; box-shadow: inset 0 0 0 1px #f3dcde; }
.sugg { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff; border-radius: 14px; box-shadow: 0 12px 36px rgba(25, 35, 70, .18); max-height: 270px; overflow-y: auto; margin-top: 6px; }
.sugg button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 11px 13px; border-bottom: 1px solid #f1f2f7; font-size: 14.5px; }
.sugg button:hover, .sugg button.hl { background: var(--brand-soft); }
.sugg .none { padding: 11px 13px; color: var(--muted); font-size: 13.5px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 4px 0 10px; }
.combo { position: relative; }
.combo .cin { padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237b8398' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.irow .combo .cin { background-color: var(--bg); }

/* ---------- admin pages */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px; max-width: 760px; }
.panel h2 { margin: 0 0 14px; font-size: 17px; font-weight: 600; }
.addrow { display: flex; gap: 8px; margin-bottom: 12px; }
.addrow input { flex: 1; }
.lrow { display: flex; align-items: center; gap: 8px; padding: 11px 0; border-top: 1px solid var(--line); }
.lrow .t { flex: 1; font-weight: 500; word-break: break-word; }
.lrow .s { color: var(--muted); font-size: 12.5px; display: block; font-weight: 400; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-d); }
.tag.off { background: #fbe9ea; color: var(--danger); }
.status-line { font-size: 13.5px; margin: 8px 0; }
.status-line.ok { color: var(--c-delivered); }
.status-line.bad { color: var(--danger); }

/* ---------- notice / menu / 2FA / cashier form */
.notice { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 1500px; margin: 8px auto 0; padding: 9px 12px; background: var(--brand-soft); color: var(--brand-d); border-radius: 12px; font-size: 13.5px; }
@media (max-width: 1530px) { .notice { margin: 8px 14px 0; } }
.sep { height: 1px; background: var(--line); margin: 18px 0; }
.sec { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.otp { letter-spacing: .3em; font-size: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.qr { display: grid; place-items: center; margin: 10px 0; }
.qr svg { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 6px; box-shadow: var(--shadow); }
.secret { display: block; margin-top: 4px; padding: 8px 10px; background: #fff; border-radius: 10px; font: 500 13px/1.4 ui-monospace, Menlo, Consolas, monospace; word-break: break-all; user-select: all; }
.mini-toggle { display: inline-flex; align-items: center; gap: 6px; float: right; margin: -2px 0 6px 8px; color: var(--muted); font-size: 13px; cursor: pointer; user-select: none; }
.mini-toggle input { width: 15px; height: 15px; margin: 0; accent-color: var(--c-pickup); }
.mini-toggle:has(input:checked) { color: var(--c-pickup); font-weight: 500; }
#df::after { content: ""; display: block; clear: both; }
.inline-form { max-width: 1000px; margin: 0 auto 14px; padding: 24px; }
.sugg .newopt { color: var(--brand-d); font-weight: 600; background: var(--brand-soft); }
@media (min-width: 900px) {
  .inline-form #df { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
  .inline-form #df > .mini-toggle { grid-column: 1 / -1; float: none; justify-self: end; margin: 0 0 4px; }
  .inline-form #df > .field:first-of-type { grid-column: span 1; }
  .inline-form #df > .row2 { display: contents; }
  .inline-form #df > .field:nth-of-type(n+3), .inline-form #df > .err { grid-column: 1 / -1; }
  .inline-form #df::after { display: none; }
}
.inline-foot { display: flex; gap: 10px; margin-top: 4px; }
.inline-foot .btn { flex: 1; min-height: 50px; }

/* ---------- габарит + „Стигна роба“ */
.irow .sizes { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.irow .sizes > span { color: var(--muted); font-size: 12.5px; margin-right: 4px; }
.irow .sizes em { font-style: normal; color: #a0a6b8; }
.szi { width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--brand-soft); color: var(--brand-d); font: italic 600 13px/1 Georgia, serif; }
.size-info { flex-basis: 100%; background: var(--bg); border-radius: 10px; padding: 9px 12px; font-size: 13px; line-height: 1.6; }
.size-info b { font-weight: 600; }
.szb { border: 0; border-radius: 999px; padding: 6px 14px; background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 500; }
.szb.on { background: var(--ink); color: #fff; }
.sz { background: #fff; color: var(--ink); border-radius: 8px; padding: 2px 9px; font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.sz-M { background: #e8eaf1; box-shadow: none; }
.sz-L { background: var(--ink); color: #fff; box-shadow: none; }
.arrived { max-width: 760px; }
.scanbtn { display: flex; width: 100%; min-height: 54px; font-size: 16px; margin-top: 12px; cursor: pointer; }
.cands { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cand { text-align: left; border: 0; background: var(--bg); border-radius: 12px; padding: 11px 13px; font-size: 14.5px; }
.cand:active { background: var(--brand-soft); }
.none-found { color: var(--danger); font-size: 14px; margin-top: 6px; }
.arr-head .tag { white-space: nowrap; }
.qn { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; margin-right: 8px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 600; vertical-align: 1px; }
.qn.first { background: var(--brand); color: #fff; }
.entered { align-self: flex-start; color: var(--muted); font-size: 12.5px; margin-top: -4px; }
.entered b { color: var(--brand-d); font-weight: 600; }
.arr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 4px 2px 12px; }
#scan-status:empty { display: none; }

/* ---------- statistics */
.range { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.range::-webkit-scrollbar { display: none; }
.range button { flex: none; border: 0; border-radius: 999px; padding: 8px 15px; background: #fff; color: var(--muted); font-weight: 500; font-size: 14px; box-shadow: var(--shadow); }
.range button.on { background: var(--ink); color: #fff; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.tile { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.tile span { color: var(--muted); font-size: 12.5px; }
.tile b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.panel.wide { max-width: none; }
.stackbar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; margin-bottom: 12px; }
.stackbar i { background: var(--c); min-width: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.legend .dot { color: var(--c); }
.panel h2 small { font-weight: 400; margin-left: 8px; display: inline-flex; align-items: center; gap: 4px; }
.lg { display: inline-block; width: 9px; height: 9px; border-radius: 3px; }
.lg.c, .daychart .c { background: #b9bff0; }
.lg.d, .daychart .d { background: var(--c-delivered); }
.daychart { display: flex; align-items: flex-end; gap: 3px; height: 130px; }
.dc { flex: 1; min-width: 2px; height: 100%; display: flex; align-items: flex-end; gap: 1px; }
.dc i { flex: 1; border-radius: 3px 3px 0 0; min-height: 0; }
.dc-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 6px; }
.statgrid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.statgrid .panel { max-width: none; margin: 0; }
.bl-row { margin-bottom: 11px; }
.bl-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 4px; }
.bl-name { word-break: break-word; }
.bl-val { font-weight: 600; white-space: nowrap; }
.bl-val small { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 12px; }
.bl-track { height: 7px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.bl-fill { height: 100%; background: var(--brand); border-radius: 999px; }

/* ---------- desktop */
@media (min-width: 760px) {
  .overlay { align-items: center; }
  .modal { border-radius: 24px; max-height: 90vh; }
  .irow { grid-template-columns: 2.4fr 1.3fr 80px 42px; }
  .irow .ifield { grid-column: auto; }
  .toolbar { grid-template-columns: 200px 200px 1fr; }
  .toolbar .search { grid-column: auto; }
}
@media (min-width: 760px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .statgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .wrap { padding: 8px 22px 60px; }
  .top-row, .nav, .seg { padding-left: 22px; padding-right: 22px; }
  .list { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
  .card { min-height: 250px; }
}

/* ---------- бекап */
.check { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.howto { font-size: 13px; color: var(--muted); margin: 2px 0 12px; }
.howto summary { cursor: pointer; color: var(--brand-d); font-weight: 500; }
.howto ol { padding-left: 18px; margin: 8px 0 0; line-height: 1.6; }
.howto code { background: var(--bg); padding: 1px 6px; border-radius: 6px; }

/* ---------- избор од листа (телефон) */
body.noscroll { overflow: hidden; }
.picker { position: fixed; inset: 0; z-index: 90; background: rgba(20, 26, 50, .45); }
.pk-sheet { position: fixed; left: 0; right: 0; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.pk-head { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 16px 8px; font-size: 18px; }
.pk-x { width: 44px; height: 44px; border: 0; border-radius: 12px; background: #fff; font-size: 18px; box-shadow: var(--shadow); }
.pk-search { padding: 4px 16px 10px; }
.pk-in { width: 100%; min-height: 48px; padding: 10px 14px; border: 0; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; }
.pk-in:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--brand); }
.pk-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 16px 24px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.pk-row { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; text-align: left; min-height: 58px; padding: 12px 14px; border: 0; border-radius: 14px; background: #fff; box-shadow: var(--shadow); font-size: 16px; justify-content: center; }
.pk-row:active { background: var(--brand-soft); }
.pk-row.new { background: var(--brand-soft); color: var(--brand-d); font-weight: 600; }
.pk-t { font-weight: 600; word-break: break-word; }
.pk-s { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pk-none { text-align: center; color: var(--muted); padding: 32px 10px; font-size: 14.5px; }
@media (min-width: 760px) { .pk-sheet { left: 50%; right: auto; width: 560px; transform: translateX(-50%); } }
.combo .cin[readonly] { cursor: pointer; }

/* ---------- „Мои“ пратки */
.st-mine { --c: var(--brand); --s: var(--brand-soft); }
.tagrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: -4px; }
.tagrow .stpill { margin-top: 0; }
.asg { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12.5px; font-weight: 500; }
.asg.me { background: var(--brand-soft); color: var(--brand-d); font-weight: 600; }
.card.mine { box-shadow: inset 4px 0 0 var(--brand), var(--shadow); }
.btn.take { width: 100%; min-height: 46px; background: var(--brand-soft); color: var(--brand-d); font-weight: 600; }
.btn.take:active { background: #e1e5fb; }
.btn.take.on { background: var(--brand); color: #fff; }

/* ---------- профил, инсталација, без интернет */
.prof { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 18px; flex: none; }
.pi { display: flex; flex-direction: column; min-width: 0; }
.pi b { font-size: 17px; font-weight: 600; }
.pi span { color: var(--muted); font-size: 13.5px; }
.menu-item { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 54px; padding: 0 16px; margin-bottom: 8px; border: 0; border-radius: 14px; background: #fff; box-shadow: var(--shadow); font-size: 15.5px; font-weight: 500; text-align: left; }
.menu-item i { font-style: normal; color: var(--muted); font-size: 22px; }
.menu-note { padding: 12px 14px; margin-bottom: 8px; border-radius: 14px; background: #fff; font-size: 14px; }
.menu-note.ok { color: var(--c-delivered); }
#pf { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 8px; box-shadow: var(--shadow); }
.install-help ol { padding-left: 20px; line-height: 1.8; margin: 0 0 10px; }
.notice .nb { display: flex; gap: 6px; flex: none; }
.netbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 120; background: #34423f; color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: 92vw; text-align: center; }

/* ---------- мобилно: поголеми допирни површини */
@media (max-width: 700px) {
  .wrap { padding-left: 12px; padding-right: 12px; }
  .done-btn { min-height: 58px; font-size: 17px; }
  .call { padding: 14px; font-size: 18px; }
  .chip { min-height: 46px; }
  .modal { max-height: 100dvh; border-radius: 20px 20px 0 0; }
  .toolbar select, .toolbar input { font-size: 16px; } /* спречува зумирање на iOS */
  input[type=text], input[type=password], input[type=tel], input[type=number], input[type=url], select, textarea { font-size: 16px; }
}

/* ---------- магацини: ѕвезда и редослед */
.wrow { flex-wrap: wrap; }
.star { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--bg); color: #c3c8d6; font-size: 20px; line-height: 1; flex: none; }
.star.on { background: #fff4d6; color: #e0a210; }
.mv { display: inline-flex; gap: 4px; flex: none; }
.mv button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--bg); color: var(--ink); font-size: 13px; }
.mv button:disabled { opacity: .35; }
.mv button:active:not(:disabled) { background: var(--brand-soft); }

/* ---------- очекувана достава */
.opt { color: #a0a6b8; font-weight: 400; }
.dchips { display: flex; flex-wrap: wrap; gap: 8px; }
.dchip { border: 0; border-radius: 12px; padding: 10px 14px; min-height: 44px; background: #fff; color: var(--ink); font-weight: 500; font-size: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.dchip.on { background: var(--brand); color: #fff; box-shadow: none; }
.exp { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; background: var(--brand-soft); border-radius: 10px; padding: 7px 10px; align-self: flex-start; }
.exp svg { color: var(--brand-d); }

/* ---------- филтер за идни достави */
.expbar { display: flex; align-items: center; gap: 6px; overflow-x: auto; margin: -4px 0 12px; padding-bottom: 2px; scrollbar-width: none; }
.expbar::-webkit-scrollbar { display: none; }
.expbar .el { flex: none; color: var(--muted); font-size: 12.5px; margin-right: 2px; }
.ech { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; padding: 8px 13px; min-height: 38px; background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow); }
.ech span { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
.ech.zero { color: var(--muted); }
.ech.on { background: var(--brand); color: #fff; }
.ech.on span { background: rgba(255, 255, 255, .25); color: #fff; }

/* ---------- дупликати */
.dupgroup { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 14px; max-width: 900px; }
.dhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.tag.sure { background: #fde8e8; color: var(--danger); }
.muted { color: var(--muted); }
.duprow { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.dkeep { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; width: 58px; font-size: 12px; color: var(--muted); cursor: pointer; }
.dkeep input { width: 22px; height: 22px; accent-color: var(--brand); margin: 0; }
.dbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.dtop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dtop .stpill { margin-top: 0; }
.dline { font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; word-break: break-word; }
.dline.muted { font-size: 12.5px; }
.dupgroup .admin-actions { margin-top: 10px; flex-wrap: wrap; }
@media (max-width: 700px) { .dupgroup .admin-actions .btn { flex: 1 1 100%; } }
