/* MAJK – System Zamówień */
:root {
  --green: #1b7a3d; --green-d: #12592c; --green-l: #e7f4ec;
  --red: #d32f2f; --red-d: #a91f1f; --red-l: #fdecec;
  --bg: #f3f6f3; --card: #fff; --text: #1a1f1b; --muted: #5d6b61; --line: #d9e0db;
  --radius: 14px; --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { font-size: 18px; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.35; overflow-x: hidden; }
body.has-nav main { padding-bottom: calc(var(--nav-h) + 20px + var(--safe-b)); }
body.has-savebar main { padding-bottom: calc(96px + var(--safe-b)); }
main { max-width: 760px; margin: 0 auto; padding: 12px 12px 24px; }
a { color: var(--green-d); }
h1, h2, h3 { margin: 0 0 10px; line-height: 1.2; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
.loading { text-align: center; padding: 60px 0; color: var(--muted); font-size: 1.2rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.hidden { display: none !important; }

/* Pasek górny */
#topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 10px; background: var(--green); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.tb-btn { background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 10px; font-size: 2rem; line-height: 1; width: 48px; height: 44px; cursor: pointer; }
.tb-title { flex: 1; font-weight: 800; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .3px; }
.tb-user { font-size: .8rem; text-align: right; opacity: .95; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-user a { color: #fff; text-decoration: none; }

/* Dolna nawigacja */
#bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: #fff; border-top: 1px solid var(--line); height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); box-shadow: 0 -2px 8px rgba(0,0,0,.08); }
#bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 600; gap: 2px; }
#bottomnav a .ni { font-size: 1.5rem; line-height: 1; }
#bottomnav a.active { color: var(--green); }
#bottomnav a.nav-new .ni { background: var(--red); color: #fff; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 400; margin-top: -22px; box-shadow: 0 3px 8px rgba(211,47,47,.45); border: 3px solid #fff; }
#bottomnav a.nav-new { color: var(--red); }

/* Karty */
.card { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.07); border: 1px solid #e6ebe7; }
.card-title { font-weight: 800; font-size: .95rem; text-transform: uppercase; color: var(--green-d); margin-bottom: 10px; letter-spacing: .3px; }

/* Przyciski */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 10px 18px; border-radius: 12px; border: 2px solid transparent; font-size: 1.05rem; font-weight: 800; cursor: pointer; text-decoration: none; text-align: center; background: var(--green); color: #fff; user-select: none; touch-action: manipulation; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { display: flex; width: 100%; }
.btn.red { background: var(--red); }
.btn.white { background: #fff; color: var(--green-d); border-color: var(--green); }
.btn.ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn.danger-ghost { background: #fff; color: var(--red); border-color: var(--red); }
.btn.small { min-height: 44px; font-size: .9rem; padding: 6px 12px; }
.btn.xl { min-height: 68px; font-size: 1.2rem; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-grid .full { grid-column: 1 / -1; }

/* Ekran główny */
.home-head { text-align: center; padding: 6px 0 12px; }
.home-head .t1 { font-size: 1.7rem; font-weight: 900; color: var(--green); letter-spacing: 1px; }
.home-head .t2 { font-size: 1rem; font-weight: 800; color: var(--red); letter-spacing: 3px; }
.home-head .clock { margin-top: 4px; color: var(--muted); font-size: .95rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.stat { background: #fff; border-radius: 12px; padding: 10px 6px; text-align: center; border: 1px solid #e3e9e4; text-decoration: none; color: inherit; }
.stat b { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--green); }
.stat span { font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.stat.warn b { color: var(--red); }
.status-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.st-tile { border-radius: 10px; padding: 8px 4px; text-align: center; color: #fff; text-decoration: none; }
.st-tile b { display: block; font-size: 1.5rem; line-height: 1.1; }
.st-tile span { font-size: .6rem; font-weight: 800; display: block; line-height: 1.15; }
.home-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.home-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 92px; border-radius: 16px; background: #fff; border: 2px solid var(--green); color: var(--green-d); font-weight: 900; font-size: .95rem; text-decoration: none; text-align: center; padding: 8px; gap: 4px; }
.home-btn .hi { font-size: 1.7rem; line-height: 1; }
.home-btn.primary { grid-column: 1 / -1; background: var(--red); border-color: var(--red); color: #fff; min-height: 84px; font-size: 1.25rem; flex-direction: row; gap: 12px; }
.home-btn.primary .hi { font-size: 2.2rem; }
.home-btn.alt { background: var(--green); color: #fff; }
.alert { border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-weight: 700; }
.alert.red { background: var(--red-l); color: var(--red-d); border: 2px solid #f3b9b9; }
.alert.green { background: var(--green-l); color: var(--green-d); border: 2px solid #b6dcc3; }
.alert.yellow { background: #fff8e1; color: #7a5a00; border: 2px solid #ffe08a; }
a.alert { display: block; text-decoration: none; }

/* Formularze */
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 5px; color: #2d3a31; }
input, select, textarea { width: 100%; font: inherit; font-size: 1.05rem; padding: 12px; min-height: 54px; border: 2px solid #c9d3cc; border-radius: 12px; background: #fff; color: var(--text); }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(27,122,61,.18); }
input[type=checkbox] { width: 28px; height: 28px; min-height: 0; accent-color: var(--green); }
.check { display: flex; align-items: center; gap: 12px; font-weight: 700; margin-bottom: 12px; cursor: pointer; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 22px; border: 2px solid #c9d3cc; background: #fff; font-weight: 700; font-size: .92rem; cursor: pointer; color: var(--text); }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.seg { display: flex; border: 2px solid var(--green); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.seg button { flex: 1; min-height: 48px; border: 0; background: #fff; font: inherit; font-weight: 800; color: var(--green-d); cursor: pointer; font-size: .92rem; }
.seg button.on { background: var(--green); color: #fff; }
details.more { margin-bottom: 12px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--green-d); padding: 10px 0; min-height: 44px; }

/* Produkty w formularzu */
.item { border: 2px solid #dde5df; border-radius: 14px; padding: 10px; margin-bottom: 10px; background: #fbfdfb; }
.item-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.item-top .num { font-weight: 900; color: var(--green); min-width: 26px; font-size: 1.1rem; }
.item-top input { flex: 1; font-weight: 700; }
.item-del { width: 48px; height: 48px; border-radius: 12px; border: 2px solid #f0c4c4; background: #fff; color: var(--red); font-size: 1.4rem; cursor: pointer; flex: none; }
.qty-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.qty-btn { width: 54px; height: 54px; flex: none; border-radius: 12px; border: 2px solid var(--green); background: #fff; color: var(--green); font-size: 1.8rem; font-weight: 800; cursor: pointer; }
.qty-row input.qty { text-align: center; font-size: 1.35rem; font-weight: 900; flex: 1; min-width: 60px; }
.units { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.units button { min-height: 42px; min-width: 52px; padding: 4px 10px; border-radius: 10px; border: 2px solid #c9d3cc; background: #fff; font-weight: 800; cursor: pointer; font-size: .9rem; }
.units button.on { background: var(--green); color: #fff; border-color: var(--green); }
.item-extra { display: flex; gap: 8px; }
.item-extra input { min-height: 46px; font-size: .95rem; padding: 8px 10px; }
.link-btn { background: none; border: 0; color: var(--green-d); font-weight: 700; font-size: .9rem; padding: 8px 4px; cursor: pointer; text-decoration: underline; min-height: 40px; }
.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 15; background: #fff; border: 2px solid var(--green); border-radius: 12px; margin-top: 4px; max-height: 280px; overflow-y: auto; box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.suggest-list button { display: block; width: 100%; text-align: left; padding: 12px; border: 0; border-bottom: 1px solid var(--line); background: #fff; font: inherit; cursor: pointer; min-height: 52px; }
.suggest-list button:last-child { border-bottom: 0; }
.suggest-list button small { display: block; color: var(--muted); }
.summary-box { background: var(--green-l); border: 2px solid #b6dcc3; border-radius: 14px; padding: 12px 14px; }
.summary-box .sl { display: flex; justify-content: space-between; padding: 4px 0; gap: 10px; }
.summary-box .sl b { text-align: right; }
.summary-box .big b { font-size: 1.25rem; }

/* Pasek zapisu (formularz) */
.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding: 10px 12px calc(10px + var(--safe-b)); box-shadow: 0 -2px 10px rgba(0,0,0,.1); }
.savebar .inner { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; }
.savebar .btn { flex: 1; }
.savebar .btn.cancel { flex: 0 0 auto; }

/* Lista zamówień */
.order-card { display: block; background: #fff; border-radius: 14px; padding: 12px 12px 12px 16px; margin-bottom: 10px; border: 1px solid #e3e9e4; box-shadow: 0 1px 3px rgba(0,0,0,.06); position: relative; color: inherit; text-decoration: none; overflow: hidden; }
.order-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--sc, #999); }
.oc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.oc-client { font-weight: 900; font-size: 1.1rem; word-break: break-word; }
.oc-num { font-size: .8rem; color: var(--muted); font-weight: 700; }
.oc-meta { font-size: .88rem; color: #374239; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.oc-meta b { color: var(--text); }
.oc-items { font-size: .85rem; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-actions { display: flex; gap: 8px; margin-top: 10px; }
.oc-actions .btn { flex: 1; min-height: 48px; font-size: .92rem; }
.pill { display: inline-block; padding: 6px 10px; border-radius: 20px; color: #fff; font-weight: 800; font-size: .72rem; white-space: nowrap; border: 0; cursor: pointer; letter-spacing: .2px; line-height: 1.2; }
.pill.big { font-size: .95rem; padding: 10px 16px; }
.tel { color: var(--green-d); font-weight: 800; text-decoration: none; }
.group-h { font-weight: 900; margin: 16px 2px 8px; font-size: 1rem; color: var(--green-d); text-transform: uppercase; display: flex; justify-content: space-between; }
.group-h.red { color: var(--red); }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); font-size: 1.05rem; }
.period-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.period-nav .lbl { flex: 1; text-align: center; font-weight: 900; font-size: 1.05rem; }
.period-nav button { width: 52px; height: 48px; border-radius: 12px; border: 2px solid var(--green); background: #fff; color: var(--green); font-size: 1.5rem; font-weight: 900; cursor: pointer; }
.filter-bar { position: sticky; top: 56px; z-index: 10; background: var(--bg); padding: 8px 0 2px; }
.count-line { font-weight: 700; color: var(--muted); margin: 4px 2px 8px; font-size: .9rem; }

/* Szczegóły */
.status-banner { border-radius: 14px; padding: 14px; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.status-banner .sb-num { font-weight: 900; font-size: 1.15rem; }
.status-banner .sb-st { font-weight: 900; font-size: 1rem; text-align: right; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.kv dt { color: var(--muted); font-size: .88rem; padding-top: 2px; }
.kv dd { margin: 0; font-weight: 700; word-break: break-word; }
.items-list .il { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.items-list .il:last-child { border-bottom: 0; }
.il .il-n { color: var(--muted); font-weight: 800; width: 24px; flex: none; }
.il .il-name { flex: 1; font-weight: 800; }
.il .il-name small { display: block; font-weight: 500; color: #8a5a00; background: #fff8e1; border-radius: 6px; padding: 3px 6px; margin-top: 4px; }
.il .il-q { font-weight: 900; text-align: right; white-space: nowrap; font-size: 1.05rem; }
.il .il-q small { display: block; font-weight: 600; color: var(--muted); font-size: .78rem; }
.notes-box { background: #fff8e1; border: 2px solid #ffe08a; border-radius: 12px; padding: 12px; white-space: pre-wrap; font-weight: 600; }
.history { font-size: .85rem; color: var(--muted); }
.history div { padding: 3px 0; }

/* Kalendarz */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; font-size: .72rem; font-weight: 800; color: var(--muted); padding: 4px 0; }
.cal .day { min-height: 58px; border-radius: 10px; background: #fff; border: 2px solid #e3e9e4; padding: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; font: inherit; color: inherit; }
.cal .day.other { opacity: .35; }
.cal .day.today { border-color: var(--red); }
.cal .day.sel { background: var(--green-l); border-color: var(--green); }
.cal .day .dn { font-weight: 800; font-size: .95rem; }
.cal .day .dots { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; }
.cal .day .dot { min-width: 18px; height: 18px; border-radius: 9px; color: #fff; font-size: .62rem; font-weight: 900; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.week-day { margin-bottom: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .75rem; margin: 10px 0; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend i { width: 12px; height: 12px; border-radius: 6px; display: inline-block; }

/* Logowanie */
.login-wrap { max-width: 460px; margin: 0 auto; padding-top: 20px; }
.login-logo { text-align: center; margin-bottom: 20px; }
.login-logo .t1 { font-size: 2.1rem; font-weight: 900; color: var(--green); letter-spacing: 1px; }
.login-logo .t2 { font-size: 1rem; font-weight: 800; color: var(--red); letter-spacing: 3px; }
.user-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.user-tile { min-height: 84px; border-radius: 14px; border: 2px solid var(--green); background: #fff; font: inherit; font-weight: 900; font-size: 1.05rem; color: var(--green-d); cursor: pointer; padding: 8px; }
.user-tile small { display: block; font-weight: 600; color: var(--muted); font-size: .75rem; margin-top: 3px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 16px 0; min-height: 22px; }
.pin-dots i { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--green); display: inline-block; }
.pin-dots i.f { background: var(--green); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 340px; margin: 0 auto; }
.keypad button { min-height: 70px; border-radius: 16px; border: 2px solid #c9d3cc; background: #fff; font-size: 1.8rem; font-weight: 800; cursor: pointer; color: var(--text); }
.keypad button:active { background: var(--green-l); }
.keypad button.ok { background: var(--green); color: #fff; border-color: var(--green); font-size: 1.2rem; }
.keypad button.del { font-size: 1.3rem; }

/* Okno modalne / arkusz */
#modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
#modal[hidden] { display: none; }
.sheet { background: #fff; width: 100%; max-width: 560px; border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + var(--safe-b)); max-height: 92vh; overflow-y: auto; }
@media (min-width: 700px) { #modal { align-items: center; } .sheet { border-radius: 20px; } }
.sheet h2 { text-align: center; }
.sheet .st-btn { display: block; width: 100%; min-height: 60px; border-radius: 14px; border: 0; color: #fff; font: inherit; font-weight: 900; font-size: 1.05rem; margin-bottom: 8px; cursor: pointer; }
.sheet .st-btn.cur { outline: 4px solid #000; outline-offset: -4px; }

/* Komunikaty */
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 24px + var(--safe-b)); z-index: 200; background: #222; color: #fff; padding: 14px 20px; border-radius: 14px; font-weight: 800; font-size: 1rem; max-width: 92vw; text-align: center; opacity: 0; pointer-events: none; transition: opacity .15s; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
#toast.show { opacity: 1; }
#toast.ok { background: var(--green); }
#toast.err { background: var(--red); }
.success-screen { text-align: center; padding: 20px 0; }
.success-screen .big-ok { width: 110px; height: 110px; border-radius: 50%; background: var(--green); color: #fff; font-size: 4rem; display: flex; align-items: center; justify-content: center; margin: 10px auto 16px; }
.success-screen h1 { color: var(--green); font-size: 1.6rem; }
.success-screen .num { font-size: 1.3rem; font-weight: 900; margin-bottom: 20px; }

/* Raporty / tabele */
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { font-size: .78rem; color: var(--muted); text-transform: uppercase; }
.tbl td.r, .tbl th.r { text-align: right; }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.sum-grid .stat b { font-size: 1.5rem; }
.backup-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.backup-row .bn { flex: 1; min-width: 180px; font-size: .88rem; word-break: break-all; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.user-row .un { flex: 1; font-weight: 800; }
.user-row .un small { display: block; font-weight: 500; color: var(--muted); }
.audit-row { font-size: .82rem; padding: 6px 0; border-bottom: 1px solid var(--line); }

@media (min-width: 700px) {
  html { font-size: 17px; }
  .home-btns { grid-template-columns: 1fr 1fr 1fr; }
  .home-btn.primary { grid-column: 1 / -1; }
  .stats { gap: 12px; }
  .status-strip .st-tile span { font-size: .72rem; }
}

/* Wydruk z przeglądarki */
@media print {
  #topbar, #bottomnav, .savebar, .no-print, #toast { display: none !important; }
  body { background: #fff; } main { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
}

/* ---- v2 ---- */
.module-h { font-weight: 900; font-size: .95rem; color: var(--green-d); margin: 4px 2px 8px; letter-spacing: .5px; }
.home-btn.primary.hurt { background: #12592c; border-color: #12592c; }
.alert.pink { background: #fce4ec; color: #880e4f; border: 2px solid #f48fb1; }
.badge { display: inline-block; font-size: .68rem; font-weight: 900; padding: 3px 7px; border-radius: 8px; vertical-align: middle; margin-left: 4px; }
.badge.urgent { background: var(--red); color: #fff; }
.badge.www { background: #d81b60; color: #fff; }
.badge.fav { background: #ffb300; color: #000; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; min-height: 52px; font-weight: 800; }
.switch { position: relative; width: 62px; height: 36px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #c9d3cc; border-radius: 18px; transition: .15s; }
.switch span::before { content: ""; position: absolute; width: 28px; height: 28px; left: 4px; top: 4px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--red); }
.switch input:checked + span::before { transform: translateX(26px); }
.tpl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.tpl-chips button { min-height: 40px; padding: 6px 12px; border-radius: 20px; border: 2px dashed #9fb8a7; background: #fff; font: inherit; font-size: .85rem; font-weight: 700; color: var(--green-d); cursor: pointer; }
.tpl-chips button.add { border-style: solid; color: var(--muted); }
.viewsw { display: flex; gap: 6px; margin-bottom: 10px; justify-content: flex-end; }
.viewsw button { min-height: 40px; min-width: 48px; border-radius: 10px; border: 2px solid #c9d3cc; background: #fff; font-weight: 800; cursor: pointer; font-size: .8rem; padding: 0 10px; }
.viewsw button.on { border-color: var(--green); background: var(--green-l); color: var(--green-d); }
.v-list .order-card { padding: 8px 10px 8px 14px; margin-bottom: 6px; }
.v-list .order-card .oc-items, .v-list .order-card .oc-actions, .v-list .order-card .oc-meta span:nth-child(n+3) { display: none; }
.v-list .oc-client { font-size: 1rem; }
.tbl-wrap { overflow-x: auto; background: #fff; border-radius: 12px; border: 1px solid #e3e9e4; }
.tbl.big td, .tbl.big th { padding: 10px 8px; font-size: .92rem; }
.tbl.big tr:hover td { background: #f5faf6; cursor: pointer; }
@media (max-width: 699px) { .only-desktop { display: none !important; } }
/* Sklep – produkty jak w aplikacji zakupowej */
.shop-top { position: sticky; top: 56px; z-index: 12; background: var(--bg); padding: 8px 0 6px; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }
.search-row .btn { flex: none; min-width: 56px; padding: 0 12px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 4px; scrollbar-width: none; }
.tabs button { flex: none; min-height: 44px; padding: 6px 14px; border-radius: 22px; border: 2px solid #c9d3cc; background: #fff; font-weight: 800; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.tabs button.on { background: var(--green); border-color: var(--green); color: #fff; }
.pgrid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 700px) { .pgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { main.wide { max-width: 1200px; } .pgrid { grid-template-columns: 1fr 1fr 1fr; } }
.pcard { background: #fff; border: 2px solid #e3e9e4; border-radius: 14px; padding: 10px 10px 10px 12px; display: flex; gap: 10px; align-items: center; min-height: 76px; }
.pcard.in { border-color: var(--green); background: #f4fbf6; }
.pcard .pinfo { flex: 1; min-width: 0; }
.pcard .pname { font-weight: 800; font-size: 1rem; line-height: 1.2; word-break: break-word; }
.pcard .pmeta { font-size: .76rem; color: var(--muted); margin-top: 3px; }
.pcard .star { width: 44px; height: 44px; border: 0; background: none; font-size: 1.5rem; cursor: pointer; color: #c9d3cc; flex: none; }
.pcard .star.on { color: #ffb300; }
.pcard .addbtn { min-height: 52px; min-width: 96px; border-radius: 12px; border: 0; background: var(--green); color: #fff; font-weight: 900; font-size: .95rem; cursor: pointer; flex: none; }
.stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.stepper button { width: 48px; height: 52px; border-radius: 12px; border: 2px solid var(--green); background: #fff; color: var(--green); font-size: 1.6rem; font-weight: 900; cursor: pointer; }
.stepper input { width: 66px; min-height: 52px; text-align: center; font-weight: 900; font-size: 1.15rem; padding: 4px; }
.stepper .u { font-size: .8rem; font-weight: 800; color: var(--muted); min-width: 30px; text-align: center; }
.v-list .pgrid { grid-template-columns: 1fr; gap: 4px; }
.v-list .pcard { min-height: 60px; padding: 6px 8px; border-width: 1px; }
.v-list .pcard .pmeta { display: none; }
.cartbar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 29; padding: 8px 12px; pointer-events: none; }
.cartbar .btn { pointer-events: auto; max-width: 736px; margin: 0 auto; box-shadow: 0 4px 14px rgba(0,0,0,.25); justify-content: space-between; }
.cartbar .cnt { background: #fff; color: var(--red); border-radius: 20px; min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; padding: 0 8px; }
body.has-cart main { padding-bottom: calc(var(--nav-h) + 96px + var(--safe-b)); }
.saved-ind { font-size: .8rem; color: var(--muted); text-align: right; min-height: 18px; }
.citem { background: #fff; border: 2px solid #e3e9e4; border-radius: 14px; padding: 10px; margin-bottom: 8px; }
.citem .ctop { display: flex; gap: 8px; align-items: flex-start; }
.citem .ctop .pname { flex: 1; font-weight: 900; }
.citem .crow { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.citem .crow select { width: auto; min-width: 90px; min-height: 52px; }
.citem input.cnote { min-height: 46px; font-size: .95rem; margin-top: 8px; }
.share-opts .btn { justify-content: flex-start; margin-bottom: 8px; }
.share-opts .btn .si { font-size: 1.4rem; width: 32px; text-align: center; }
.scanner video { width: 100%; border-radius: 12px; background: #000; max-height: 50vh; object-fit: cover; }
.dropzone { border: 3px dashed #9fb8a7; border-radius: 16px; padding: 30px 16px; text-align: center; background: #fff; cursor: pointer; }
.dropzone.over { background: var(--green-l); border-color: var(--green); }
.map-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.map-row > span { flex: 1; font-weight: 800; font-size: .92rem; }
.map-row select { flex: 1.3; min-height: 48px; }
.preview-tbl { font-size: .78rem; }
.preview-tbl td, .preview-tbl th { padding: 4px 6px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.supplier-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.supplier-tiles button { min-height: 88px; border-radius: 16px; border: 2px solid var(--green); background: #fff; font: inherit; font-weight: 900; font-size: 1rem; color: var(--green-d); cursor: pointer; padding: 8px; }
.supplier-tiles button small { display: block; font-weight: 600; color: var(--muted); font-size: .72rem; margin-top: 4px; }
@media (orientation: landscape) and (max-height: 500px) { #topbar { height: 48px; } .home-btn { min-height: 70px; } }
body.public main { padding-bottom: 40px; }
body.public #topbar { justify-content: center; }
.pcard { flex-wrap: wrap; }
.pcard .pinfo { flex: 1 1 140px; }
.pcard.in .stepper { margin-left: auto; }
@media (max-width: 520px) {
  .pcard.in .stepper { flex: 1 1 100%; justify-content: flex-end; }
  .stepper input { width: 60px; }
}
.oc-top .pill { white-space: normal; max-width: 48%; text-align: center; flex: none; }
.oc-top > div { min-width: 0; }
.dropzone { display: block; }
/* Zwarty koszyk – wygodny przy ~30 pozycjach */
.v-list .citem { padding: 6px 8px; margin-bottom: 4px; border-width: 1px; }
.v-list .citem .ctop { align-items: center; }
.v-list .citem .ctop .pname { font-size: .95rem; line-height: 1.2; }
.v-list .citem .ctop .pname .small { display: none; }
.v-list .citem .item-del { width: 48px; height: 48px; font-size: 1.1rem; border-width: 1px; }
.v-list .citem .crow { margin-top: 4px; gap: 6px; }
.v-list .citem input.cnote { margin-top: 4px; min-height: 44px; }
@media (min-width: 700px) {
  .v-list .citem { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .v-list .citem .ctop { flex: 1 1 260px; }
  .v-list .citem .crow { margin-top: 0; }
  .v-list .citem input.cnote { flex: 1 1 100%; }
}
.v-list .citem input.cnote:placeholder-shown:not(:focus) { display: none; }
.addnote { display: none; } .v-list .addnote { display: inline-block; }
.v-list .citem .crow { flex-wrap: nowrap; } .v-list .citem .crow select { min-width: 76px; width: 76px; padding: 8px 6px; } .v-list .addnote { padding: 4px 2px; font-size: .85rem; white-space: nowrap; } .v-list .citem .stepper input { width: 56px; }

/* ---- v3 ---- */
.mtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 700px) { .mtiles { grid-template-columns: repeat(3, 1fr); } }
.mtile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 118px; padding: 12px 8px; border-radius: 18px; background: #fff; border: 2px solid var(--green); color: var(--green-d); text-decoration: none; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.mtile:active { transform: scale(.98); }
.mtile .mi { font-size: 2.2rem; line-height: 1.1; }
.mtile .ml { font-weight: 900; font-size: .98rem; margin-top: 6px; line-height: 1.15; }
.mtile .ms { font-size: .72rem; color: var(--muted); margin-top: 3px; font-weight: 600; }
.mtile .mb { position: absolute; top: 8px; right: 8px; min-width: 28px; height: 28px; border-radius: 14px; background: var(--green); color: #fff; font-weight: 900; font-size: .85rem; display: flex; align-items: center; justify-content: center; padding: 0 7px; }
.mtile .mb.red { background: var(--red); }
.mtile.soon { opacity: .45; border-style: dashed; }
#bottomnav a .ni { position: relative; }
.bellcnt { position: absolute; top: -6px; right: -14px; background: var(--red); color: #fff; font-style: normal; font-size: .65rem; font-weight: 900; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.order-card.read { opacity: .7; }
/* HACCP */
.devcard { background: #fff; border: 2px solid #e3e9e4; border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.devcard.ok { border-color: var(--green); background: #f4fbf6; }
.devcard.bad { border-color: var(--red); background: var(--red-l); }
.devcard .dtop { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.devcard .pname { font-weight: 900; font-size: 1.05rem; }
.dlast { font-weight: 900; font-size: 1.3rem; color: var(--green-d); text-align: right; white-space: nowrap; }
.dlast.bad { color: var(--red); }
.dlast small { display: block; font-size: .7rem; color: var(--muted); font-weight: 600; }
.tempin { display: flex; gap: 8px; align-items: center; }
.tempin .tsign { width: 60px; height: 60px; flex: none; border-radius: 12px; border: 2px solid var(--green); background: #fff; color: var(--green-d); font-size: 1.6rem; font-weight: 900; cursor: pointer; }
.tempin .tval { flex: 1; font-size: 1.6rem; font-weight: 900; text-align: center; min-height: 60px; }
.tempin .tunit { font-weight: 900; font-size: 1.2rem; color: var(--muted); }
/* Przekazanie */
.task { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.taskrow { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--line); font-weight: 700; cursor: pointer; min-height: 52px; }
.taskrow input { width: 32px; height: 32px; flex: none; }
.taskrow.done span { text-decoration: line-through; color: var(--muted); }
.taskrow small { display: block; text-decoration: none; font-weight: 500; color: var(--green-d); }
/* Dostawy */
.citem.bad { border-color: var(--red); background: var(--red-l); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photos img { width: 100%; height: 100px; object-fit: cover; border-radius: 10px; }
/* Grafik – mój */
.mygrid { display: grid; grid-template-columns: 1fr; gap: 4px; }
.myday { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: #fafcfa; border: 1px solid #e3e9e4; }
.myday.today { border: 2px solid var(--red); background: #fff; }
.myday.past { opacity: .5; }
.myday .dd { width: 54px; font-size: .75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.myday .dd b { font-size: 1.15rem; color: var(--text); margin-left: 4px; }
.myday .ds { min-width: 44px; height: 34px; border-radius: 8px; color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.myday .dh { font-weight: 700; }
/* Ustawienia */
.nrule { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.nrule .nl { font-weight: 700; font-size: .92rem; }
.nrule .nl small { display: block; font-weight: 500; color: var(--muted); }
.nrule .nc { display: flex; gap: 6px; }
.nchk { display: flex; align-items: center; gap: 4px; font-size: 1.1rem; min-height: 44px; padding: 0 6px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.nchk input { width: 24px; height: 24px; }
.nrule input[data-f=extra] { grid-column: 1 / -1; min-height: 42px; font-size: .9rem; }
.permmod { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
.pmh { font-weight: 900; margin-bottom: 6px; }
.pmacts { display: flex; flex-wrap: wrap; gap: 6px; }
.pma { display: flex; align-items: center; gap: 6px; border: 1px solid #c9d3cc; border-radius: 10px; padding: 6px 10px; font-size: .85rem; font-weight: 700; min-height: 44px; cursor: pointer; }
.pma input { width: 22px; height: 22px; }
.chip input[type=checkbox] { min-height: 0; }
.doc-info { font-weight: 700; color: var(--green-d); margin: 8px 0 10px; min-height: 4px; }
.mtile.sanepid { border-color: #0d47a1; color: #0d47a1; }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary.card-title::after { content: " ▾"; }
#docBtn { flex-direction: column; gap: 2px; text-align: center; }
/* Reklamacje */
.sup-saved { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; background: #f1f8f2; border: 1px solid #cfe3d3; border-radius: 12px; padding: 10px 12px; margin-top: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.rk-item { border: 1px solid #e3e9e4; border-radius: 12px; padding: 10px; margin-bottom: 10px; background: #fff; }
.rk-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.rk-head input { width: 100%; font-weight: 700; }
.rk-head .suggest { position: relative; min-width: 0; }
.rk-item .crow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rk-item .unit-sel { width: auto; min-width: 84px; }
.rk-kinds { margin: 8px 0; }
.rk-kinds .chip { font-size: .85rem; }
.rk-item .cnote { width: 100%; }
#invBtn { flex-direction: column; gap: 2px; text-align: center; }
.rk-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.rk-st { border: 2px solid #e3e9e4; background: #fff; border-radius: 12px; padding: 8px 1px; cursor: pointer; min-height: 56px; min-width: 0; font: inherit; }
.rk-st b { display: block; font-size: 1.5rem; color: var(--c); line-height: 1.1; }
.rk-st span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .58rem; letter-spacing: -.3px; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.rk-st.on { border-color: var(--c); background: #f6f9f7; box-shadow: inset 0 0 0 1px var(--c); }
/* Kreator grafiku */
.gk-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.gk-month > div { text-align: center; flex: 1; }
.gk-month b { display: block; font-size: 1.2rem; }
.gk-month small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.gk-month .btn { min-width: 54px; font-size: 1.6rem; padding: 4px 10px; }
.gk-tabs { margin-bottom: 12px; }
.gk-tabs button { font-size: .78rem; padding-left: 2px; padding-right: 2px; }
.gk-emps { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.gk-emp { border: 2px solid #dfe6e1; background: #fff; border-radius: 12px; padding: 8px 4px; min-height: 52px; cursor: pointer; font: inherit; }
.gk-emp b { display: block; }
.gk-emp small { color: var(--muted); font-size: .72rem; }
.gk-emp.on { border-color: var(--green); background: #e8f5e9; }
.gk-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.gk-tool { display: inline-flex; align-items: center; gap: 6px; border: 2px solid #dfe6e1; background: #fff; border-radius: 22px; padding: 8px 12px; min-height: 44px; font: inherit; font-weight: 800; font-size: .88rem; cursor: pointer; }
.gk-tool.on { border-color: #1a1f1b; background: #1a1f1b; color: #fff; }
.gk-tool:disabled { opacity: .35; }
.gb { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 5px; border-radius: 7px; color: #fff; font-weight: 900; font-size: .85rem; }
.gb.sm { min-width: 24px; height: 20px; font-size: .72rem; border-radius: 6px; }
.gk-cal .gk-dh, .gk-cal .gk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.gk-dh span { text-align: center; font-size: .72rem; font-weight: 800; color: var(--muted); padding: 4px 0; }
.gk-day { aspect-ratio: 1 / 1.05; min-height: 44px; border: 1px solid #dfe6e1; background: #fff; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 2px; cursor: pointer; font: inherit; }
.gk-day .n { font-weight: 800; font-size: .95rem; }
.gk-day.closed { background: #eceff1; color: #90a4ae; }
.gk-day.over { box-shadow: inset 0 0 0 2px #ef6c00; }
.gk-day .cl { font-size: .6rem; }
.gk-sum > div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eef2ef; font-size: .92rem; }
.gk-sum span { color: var(--muted); text-align: right; }
.gk-prog { height: 10px; background: #e0e7e2; border-radius: 6px; overflow: hidden; margin-top: 8px; }
.gk-prog i { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.gk-bar { margin-bottom: 10px; }
.gk-dc { background: #fff; border: 1px solid #e3e9e4; border-left: 5px solid var(--green); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.gk-dc.we { border-left-color: #6a1b9a; }
.gk-dc.bad { border-left-color: var(--red); background: #fff5f5; }
.gk-dc.closed { background: #eceff1; color: #78909c; border-left-color: #b0bec5; padding: 8px 10px; font-size: .9rem; }
.gk-dct { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.gk-dct small { font-weight: 700; color: var(--muted); }
.gk-row { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.gk-names { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; min-width: 0; }
.gk-n { border: 1px solid #cfd8dc; background: #f7faf8; border-radius: 16px; padding: 5px 11px; min-height: 34px; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.gk-add { border: none; background: none; color: var(--green); font: inherit; font-weight: 800; font-size: .85rem; padding: 6px 0 0; cursor: pointer; }
.gk-tw { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.gk-t { border-collapse: collapse; font-size: .8rem; }
.gk-t th, .gk-t td { border: 1px solid #e3e9e4; padding: 2px; text-align: center; }
.gk-t thead th { background: #f1f5f2; font-size: .7rem; min-width: 30px; }
.gk-t th.cl, .gk-t td.cl { background: #eceff1; }
.gk-t th.we { color: #6a1b9a; }
.gk-t tbody th { text-align: left; padding: 4px 6px; white-space: nowrap; position: sticky; left: 0; background: #fff; z-index: 1; }
.gk-t.sum td, .gk-t.sum th { padding: 6px 8px; font-size: .88rem; }
.gk-t tr.bad td, .gk-t tr.bad th { background: #fff3e0; }
.gk-c { width: 30px; height: 30px; border: none; border-radius: 6px; background: #f5f7f6; font: inherit; font-weight: 900; font-size: .78rem; cursor: pointer; }
.gk-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: .82rem; color: var(--muted); }
.gk-iss { padding: 7px 0; border-bottom: 1px solid #eef2ef; font-size: .92rem; }
.gk-iss.err { color: var(--red); font-weight: 700; }
.gk-addrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #eef2ef; }
.gb-btn { min-width: 52px; min-height: 46px; border: none; border-radius: 10px; color: #fff; font: inherit; font-weight: 900; margin-left: 4px; cursor: pointer; }
#printArea { display: none; }
@media print {
  body.print-grafik > *:not(#printArea) { display: none !important; }
  body.print-grafik #printArea { display: block; font-family: Arial, sans-serif; color: #000; }
  #printArea h1 { font-size: 16pt; margin: 0 0 4px; }
  #printArea p { font-size: 9pt; margin: 0 0 8px; }
  #printArea table { border-collapse: collapse; width: 100%; font-size: 8pt; }
  #printArea th, #printArea td { border: 1px solid #000; padding: 2px; text-align: center; }
  #printArea tbody th { text-align: left; white-space: nowrap; }
  #printArea .cl { background: #ddd; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #printArea .sig { margin-top: 24px; }
  @page { size: A4 landscape; margin: 10mm; }
}
.prn-row { border: 1px solid #e3e9e4; border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
.prn-act { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
#netbar { position: fixed; left: 0; right: 0; top: 0; z-index: 9999; background: #b71c1c; color: #fff; font-weight: 800; text-align: center; padding: 10px 12px calc(10px + env(safe-area-inset-top, 0px)); font-size: .92rem; }
#idlewarn { position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 9998; background: #263238; color: #fff; border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.3); font-weight: 700; }
#idlewarn .btn { min-height: 46px; }
/* Instrukcje i pomoc */
.mtile.instr { border-color: #1565c0; color: #0d47a1; }
.ins-hero { background: #e3f2fd; border: 1px solid #bbdefb; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; color: #0d47a1; }
.ins-hero b { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.ins-hero span { font-size: .9rem; }
.ins-sec { font-weight: 900; font-size: .78rem; text-transform: uppercase; color: var(--muted); margin: 14px 2px 6px; letter-spacing: .3px; }
.ins-card { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid #e3e9e4; border-radius: 14px; padding: 12px; margin-bottom: 8px; color: inherit; text-decoration: none; min-height: 56px; }
.ins-card.pin { border-color: #ffb300; background: #fffdf5; }
.ins-ic { font-size: 1.8rem; line-height: 1; flex: none; }
.ins-ic.big { font-size: 2.6rem; }
.ins-tx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ins-tx b { font-size: 1.02rem; overflow-wrap: anywhere; }
.ins-tx small { color: var(--muted); font-weight: 700; }
.ins-sn { font-size: .86rem; color: #455a64; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ins-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.ins-head h2 { margin: 0 0 2px; font-size: 1.25rem; overflow-wrap: anywhere; }
.ins-text { font-size: 1.08rem; line-height: 1.6; overflow-wrap: anywhere; }
.ins-text mark { background: #fff59d; padding: 0 2px; border-radius: 3px; }
.ins-text a.tel { display: inline-block; background: #e8f5e9; border: 1px solid #a5d6a7; border-radius: 18px; padding: 2px 10px; margin: 2px 0; font-weight: 800; color: #1b5e20; text-decoration: none; white-space: nowrap; }
.ins-drop.over { border: 3px dashed var(--green); background: #f1f8f2; }
/* Strona klientów: zakładki, pasek kontaktu, katalog (80% telefony) */
body.public { -webkit-tap-highlight-color: transparent; }
body.public main { max-width: 760px; margin: 0 auto; }
body.public.has-cbar main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.pub-tabs { display: flex; gap: 6px; margin: 0 0 12px; position: sticky; top: 0; z-index: 6; background: var(--bg, #f3f6f3); padding: 6px 0; }
.pub-tabs a { flex: 1; text-align: center; padding: 12px 4px; min-height: 48px; border-radius: 12px; background: #fff; border: 2px solid #dfe6e1; font-weight: 800; color: #1a1f1b; text-decoration: none; font-size: .95rem; display: flex; align-items: center; justify-content: center; }
.pub-tabs a.on { background: var(--green); border-color: var(--green); color: #fff; }
#contactbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; background: #fff; border-top: 1px solid #dfe6e1; box-shadow: 0 -4px 16px rgba(0,0,0,.08); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); gap: 6px; }
#contactbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border-radius: 12px; font-weight: 800; font-size: .78rem; text-decoration: none; color: #fff; }
#contactbar a span { font-size: 1.35rem; line-height: 1; }
#contactbar .cb-tel { background: var(--green); }
#contactbar .cb-wa { background: #1fa855; }
#contactbar .cb-ms { background: #0866ff; }
#contactbar .cb-form { background: #455a64; }
.cat-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef2ef; }
.cat-item span { overflow-wrap: anywhere; }
.cat-add { flex: none; width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--green); background: #fff; color: var(--green); font-size: 1.5rem; font-weight: 900; cursor: pointer; }
.cat-add.done { background: var(--green); color: #fff; }
.pub-foot { text-align: center; font-size: .88rem; color: var(--muted); margin: 26px 0 10px; }
.pub-foot a { color: inherit; }
.pub-foot #installBox { margin-top: 14px; }
@media (min-width: 900px) {
  #contactbar { position: static; max-width: 760px; margin: 0 auto 12px; border: 1px solid #dfe6e1; border-radius: 14px; box-shadow: none; }
  body.public.has-cbar main { padding-bottom: 40px; }
  body.public #contactbar { order: -1; }
}
.cat-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eef2ef; flex-wrap: wrap; }
/* ---- Pojazdy – kilometrówka ---- */
.pj-vehs { display: grid; gap: 0; }
.pj-veh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pj-veh.arch { opacity: .6; }
.pj-reg { font-weight: 900; font-size: 1.15rem; letter-spacing: .5px; color: var(--green-d); }
.pj-card-wrap { display: flex; align-items: stretch; gap: 6px; }
.pj-card-wrap .order-card { flex: 1; min-width: 0; }
.pj-sel { display: flex; align-items: center; justify-content: center; min-width: 44px; }
.pj-sel input { width: 26px; height: 26px; }
.pj-card .oc-client { font-size: .98rem; word-break: break-word; }
.pj-iss { margin-top: 6px; font-size: .82rem; font-weight: 700; color: #7a5a00; background: #fff8e1; border-radius: 8px; padding: 4px 8px; }
.pj-iss.err { color: var(--red-d); background: var(--red-l); }
.pj-kmbox { background: var(--green-l); border-radius: 10px; padding: 10px 12px; font-weight: 700; margin-bottom: 12px; font-size: 1.05rem; }
.pj-kmbox b { font-size: 1.3rem; color: var(--green-d); }
.pj-route { font-weight: 900; font-size: 1.1rem; margin-bottom: 10px; line-height: 1.35; }
.pj-route small { display: block; font-weight: 600; color: var(--muted); font-size: .85rem; }
.pj-route span { display: block; }
.pj-rule { border: 2px solid #dfe7e1; border-radius: 12px; padding: 10px; margin-bottom: 10px; background: #fafcfb; }
.pj-wd { gap: 6px; margin-top: 4px; }
.pj-wd .chip { min-width: 44px; padding: 8px 6px; justify-content: center; }
.pj-grow { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pj-grow input[type=date] { width: 128px; flex: none; padding: 8px 4px; min-height: 44px; }
.pj-grow input[inputmode] { width: 62px; flex: none; text-align: right; min-height: 44px; padding: 8px 6px; }
.pj-gtx { flex: 1; min-width: 0; font-size: .88rem; line-height: 1.25; }
.pj-gtx small { display: block; color: var(--muted); }
.pj-gx { width: 44px; height: 44px; flex: none; border: 0; background: #fff; color: var(--red); font-size: 1.1rem; border-radius: 10px; cursor: pointer; }
.pj-irow { display: flex; align-items: center; gap: 6px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.pj-irow.err { background: var(--red-l); }
.pj-irow.warn { background: #fffbea; }
.pj-irow.skip .pj-itx { opacity: .55; }
.pj-itx { flex: 1; min-width: 0; font-size: .86rem; line-height: 1.3; }
.pj-itx small { display: block; color: #3c4a40; word-break: break-word; }
.pj-e { display: block; color: var(--red-d); font-weight: 800; }
.pj-w { display: block; color: #7a5a00; font-weight: 700; }
.pj-file { cursor: pointer; }
.pj-map { margin-bottom: 8px; }
.pj-sum .stats { margin-top: 10px; }
/* ---- Cenówki ---- */
.cen-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cen-kind { min-height: 56px; border: 2px solid #cfdad2; background: #fff; border-radius: 12px; font-weight: 800; font-size: .86rem; display: flex; align-items: center; gap: 8px; padding: 6px 10px; text-align: left; cursor: pointer; color: inherit; font-family: inherit; }
.cen-kind span { font-size: 1.4rem; }
.cen-kind.on { border-color: var(--green); background: var(--green-l); color: var(--green-d); }
.cen-prev { display: flex; justify-content: center; align-items: center; min-height: 120px; background: #eef2ef; border-radius: 10px; padding: 10px; margin-top: 10px; overflow: hidden; }
.cen-prev canvas { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); max-width: 100%; height: auto !important; }
.cen-f.cen-err input, .cen-f.cen-err select, .cen-f.cen-err textarea { border-color: var(--red) !important; background: var(--red-l); }
.check.cen-f.cen-err { color: var(--red-d); font-weight: 800; }
.cen-f.cen-warn input, .cen-f.cen-warn select { border-color: #ef9f27 !important; }
.cen-miss ul { margin: 6px 0 0 18px; padding: 0; }
.cen-miss li { margin: 3px 0; }
.cen-miss a { color: inherit; text-decoration: underline; }
.cen-src { display: inline-block; font-size: .7rem; font-weight: 800; background: #e3f2fd; color: #0d47a1; border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.cen-flagrow { display: flex; align-items: center; gap: 8px; }
.cen-flagrow img { width: 40px; height: 30px; border: 1px solid #999; flex: none; }
.cen-flagrow select { flex: 1; min-width: 0; }
.cen-price { font-weight: 900; font-size: 1.3rem; white-space: nowrap; }
.cen-qrow { display: flex; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cen-qrow.err { background: var(--red-l); }
.cen-qn { flex: 1; min-width: 0; font-weight: 700; color: inherit; text-decoration: none; word-break: break-word; }
.cen-qn small { display: block; font-weight: 400; color: var(--muted); }
.cen-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 10px; }
.cen-card .oc-meta { flex-wrap: wrap; }

/* ---------- Baza towarowa ---------- */
.tw-search { margin-bottom: 8px; }
.tw-grp { width: 100%; margin-bottom: 10px; }
.tw-price { font-size: 1.25rem; font-weight: 900; white-space: nowrap; }
.tw-detail .tw-name { font-weight: 800; font-size: 1.1rem; }
.tw-detail .tw-big { font-size: 2.6rem; font-weight: 900; text-align: center; margin: 8px 0 2px; }
.tw-tab { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .92rem; }
.tw-tab th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px 6px 0; width: 38%; vertical-align: top; }
.tw-tab td { padding: 6px 0; border-bottom: 1px solid var(--line); word-break: break-word; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 3px dashed #9fb8a7; border-radius: 16px; padding: 22px 12px; background: #fff; cursor: pointer; margin: 8px 0; text-align: center; }
.drop.on { background: var(--green-l); border-color: var(--green); }
.drop .di { font-size: 2rem; }
.tw-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; text-align: center; }
.tw-counts div { background: var(--bg); border-radius: 10px; padding: 8px 4px; }
.tw-counts b { display: block; font-size: 1.2rem; }
.tw-counts small { font-size: .7rem; color: var(--muted); }
.tw-ch { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.tw-ch > a, .tw-ch > span:first-child { flex: 1; min-width: 0; }
.tw-ch > span:last-child { white-space: nowrap; }
.tw-imp { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.tw-imp-b { display: flex; flex-direction: column; gap: 4px; }
.tw-fold { border-left: 4px solid var(--green); padding: 6px 10px; margin: 6px 0; background: var(--bg); border-radius: 0 8px 8px 0; font-size: .88rem; }
.tw-fold.bad { border-color: var(--red); }
details > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
code { background: var(--bg); padding: 1px 4px; border-radius: 4px; word-break: break-all; font-size: .85em; }

/* ---------- Kolektor ---------- */
.kol-h { margin: 16px 0 6px; font-size: .95rem; color: var(--muted); text-transform: uppercase; }
.kol-cnt { text-align: center; } .kol-cnt b { display: block; font-size: 1.4rem; } .kol-cnt small { color: var(--muted); font-size: .7rem; }
.kol-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.kol-scan { background: #fff; border-radius: var(--radius); padding: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 5; }
.kol-row { display: flex; gap: 8px; }
.kol-code { flex: 1; min-width: 0; font-size: 1.3rem !important; font-weight: 800; letter-spacing: .5px; }
.kol-qty { width: 76px; flex: none; text-align: center; font-size: 1.3rem !important; font-weight: 800; }
.kol-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.kol-btns .btn { min-height: 52px; font-size: .9rem; }
.kol-last { margin: 10px 0; padding: 12px; border-radius: var(--radius); background: var(--green-l); border: 2px solid var(--green); }
.kol-last.warn { background: #fff3e0; border-color: #e65100; }
.kol-last-n { font-weight: 900; font-size: 1.1rem; }
.kol-last-q { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.kol-last-q b { font-size: 1.8rem; min-width: 60px; text-align: center; }
.kol-last-q .btn { min-width: 56px; font-size: 1.4rem; }
.kol-sum { margin: 8px 2px; font-size: .9rem; color: var(--muted); }
.kol-item { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; font: inherit; color: inherit; cursor: pointer; }
.kol-item small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; word-break: break-all; }
.kol-item b { word-break: break-word; }
.kol-item.warn { border-color: #e65100; background: #fff8f0; }
.kol-item.last { border: 2px solid var(--green); }
.kol-item.pend { opacity: .6; border-style: dashed; }
.kol-q { font-size: 1.4rem; font-weight: 900; white-space: nowrap; }
.kol-fmts { display: grid; gap: 6px; margin: 6px 0 12px; }
.kol-fmt { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; }
.kol-fmt:has(input:checked) { border-color: var(--green); background: var(--green-l); }
.kol-fmt input { margin-top: 4px; width: 20px; height: 20px; flex: none; }
.kol-fmt small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; margin-top: 2px; }
.kol-hist { max-height: 60vh; overflow: auto; font-size: .88rem; }
.kol-hist > div { padding: 6px 0; border-bottom: 1px solid var(--line); }
.kol-hist .undone { text-decoration: line-through; opacity: .55; }
button.alert.block { width: 100%; text-align: left; font: inherit; font-weight: 700; cursor: pointer; }
.scan-view { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-line { position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: #ff1744; box-shadow: 0 0 8px #ff1744; }
.kol-last-q .btn.small { font-size: .85rem; min-width: 0; padding: 6px 12px; margin-left: auto; }
.kol-code::placeholder { font-size: 1rem; font-weight: 600; }

/* ---------- Kalkulator marży ---------- */
.kk-wrap { display: grid; gap: 10px; }
@media (min-width: 760px) { .kk-wrap { grid-template-columns: 1fr 1fr; align-items: start; } }
.kk-in { margin: 0; }
.kk-lab { display: block; font-weight: 800; margin: 4px 0 6px; font-size: .95rem; }
.kk-big { display: flex; align-items: center; gap: 8px; background: #fff; border: 3px solid var(--line); border-radius: 14px; padding: 4px 14px; }
.kk-big:focus-within { border-color: var(--green); }
.kk-big input { border: 0 !important; outline: 0; flex: 1; min-width: 0; font-size: 2.1rem !important; font-weight: 900; padding: 6px 0 !important; background: transparent; box-shadow: none !important; text-align: right; }
.kk-big span { font-size: 1.5rem; font-weight: 800; color: var(--muted); }
.kk-big.sm input { font-size: 1.5rem !important; }
.kk-big input.bad, .kk-big:has(input.bad) { border-color: var(--red); }
.kk-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0 12px; }
.kk-seg button { min-height: 50px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 900; font-size: 1.05rem; cursor: pointer; }
.kk-seg button.on { background: var(--green); border-color: var(--green); color: #fff; }
.kk-vat { display: flex; gap: 8px; margin-bottom: 10px; }
.kk-vat label { flex: 1; } .kk-vat span { display: block; font-weight: 800; font-size: .95rem; margin-bottom: 6px; }
.kk-vat select { width: 100%; min-height: 50px; font-size: 1.1rem; font-weight: 700; }
.kk-chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-top: 8px; }
.kk-chips button { min-height: 46px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font-weight: 800; cursor: pointer; padding: 0; }
.kk-chips button.on { background: var(--green-l); border-color: var(--green); }
.kk-hero { background: var(--green); color: #fff; border-radius: var(--radius); padding: 14px; text-align: center; }
.kk-hero small { display: block; font-weight: 800; letter-spacing: .5px; opacity: .9; }
.kk-hero b { display: block; font-size: 3rem; line-height: 1.1; font-weight: 900; margin: 4px 0; word-break: break-word; }
.kk-hero.sm { background: var(--green-l); color: inherit; margin-top: 10px; }
.kk-hero.sm b { font-size: 1.9rem; } .kk-hero.sm span { font-weight: 700; }
.kk-round { font-size: .9rem; font-weight: 700; }
.kk-round select { margin-left: 4px; min-height: 36px; border-radius: 8px; }
.kk-res { margin-top: 10px; }
.kk-res hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.kk-r { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: .98rem; }
.kk-r span { color: var(--muted); } .kk-r b { text-align: right; white-space: nowrap; }
.kk-r.hi b { font-size: 1.15rem; } .kk-r.ok b { color: #2e7d32; font-size: 1.15rem; } .kk-r.bad b { color: var(--red); }
.kk-real { color: #2e7d32; }
.err-txt { color: var(--red); font-weight: 700; }
.kk-x { margin-top: 10px; } .kk-x summary { font-size: 1.05rem; }
.kk-sub { margin-top: 8px; }
.kk-verdict { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: .95rem; }
.kk-verdict.ok { background: var(--green-l); } .kk-verdict.bad { background: #fdecea; }
.kk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kk-two input:not(.kk-big input) { width: 100%; margin-bottom: 6px; }
.kk-off { border: 2px solid var(--line); border-radius: 12px; padding: 8px; font-size: .85rem; }
.kk-off.win { border-color: #2e7d32; background: var(--green-l); }
.kk-off .kk-r { font-size: .82rem; padding: 3px 0; } .kk-off .kk-r b { white-space: normal; }
.kk-round select { width: auto !important; display: inline-block; min-height: 38px; padding: 4px 10px; color: #111; }
.scan-box { position: absolute; left: 8%; right: 8%; top: 28%; bottom: 28%; border: 3px solid #fff; border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-box::after { content: ''; position: absolute; left: 4%; right: 4%; top: 50%; height: 2px; background: #ff1744; box-shadow: 0 0 8px #ff1744; }
.scan-manual { display: flex; gap: 6px; margin: 8px 0; }
.scan-manual input { flex: 1; min-width: 0; font-size: 1.2rem; font-weight: 700; }
.btn.on { background: #ffd54f !important; }

/* ---------- Cenówki: lista wydruku / zaznaczanie ---------- */
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.seg2 button { min-height: 52px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 900; cursor: pointer; font-size: .92rem; }
.seg2 button.on { background: var(--green); border-color: var(--green); color: #fff; }
.cd-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 0 6px; }
.cd-item { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 6px; }
.cd-item.on { border: 2px solid var(--green); background: var(--green-l); }
.cd-item.err { border-color: var(--red); background: #fdecea; }
.cd-chk input { width: 26px; height: 26px; }
.cd-name { flex: 1; min-width: 0; cursor: pointer; color: inherit; text-decoration: none; }
.cd-name b { display: block; word-break: break-word; font-size: .95rem; }
.cd-name small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.cd-warn { color: #c62828; font-weight: 700; }
.cd-tpl { max-width: 110px; min-height: 40px; font-size: .8rem; padding: 4px; }
.stepper.off { opacity: .35; }
.stepper.big span { min-width: 60px; font-size: 1.4rem; }
.cd-sticky { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 6; background: rgba(244,246,243,.96); padding: 8px 0 4px; backdrop-filter: blur(4px); }
.cd-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.cd-row select { min-height: 42px; }
.cd-sum { font-size: .95rem; }
.pv-all canvas { display: block; margin: 0 auto 4px; box-shadow: 0 1px 6px rgba(0,0,0,.25); max-width: 100%; height: auto; }
.pv-all { max-height: 70vh; overflow: auto; }
.tw-all { margin: 4px 0 8px; }
.tw-sel { float: left; margin: 14px 6px 0 0; }
.tw-sel input { width: 26px; height: 26px; }
.tw-card.sel { margin-left: 38px; width: calc(100% - 38px); box-sizing: border-box; }
@media (max-width: 400px) { .cd-tpl { max-width: 84px; } }
.stepper span { min-width: 32px; text-align: center; font-weight: 900; font-size: 1.15rem; }
.cd-item .stepper button { width: 40px; height: 44px; font-size: 1.3rem; }

/* ---------- Mini sklep – panel ---------- */
.sk-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin-bottom: 6px; }
.sk-row.off { opacity: .6; }
.sk-thumb { width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; text-decoration: none; }
.sk-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sk-info { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.sk-info b { display: block; word-break: break-word; } .sk-info small { display: block; color: var(--muted); font-size: .8rem; }
.sk-sw { position: relative; width: 52px; height: 30px; flex: none; }
.sk-sw input { opacity: 0; width: 0; height: 0; }
.sk-sw span { position: absolute; inset: 0; background: #bbb; border-radius: 30px; cursor: pointer; transition: .2s; }
.sk-sw span::before { content: ''; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.sk-sw input:checked + span { background: var(--green); } .sk-sw input:checked + span::before { transform: translateX(22px); }
.sk-ph { width: 100%; max-width: 320px; aspect-ratio: 1; margin: 0 auto 10px; border-radius: 14px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 2.4rem; text-align: center; }
.sk-ph img { width: 100%; height: 100%; object-fit: cover; }
.sk-var { display: flex; gap: 6px; margin-bottom: 6px; }
.sk-var input:first-child { flex: 2; min-width: 0; } .sk-var input:nth-child(2) { flex: 1; min-width: 0; }

/* ---------- Mini sklep – strona klienta ---------- */
.pub-tabs { overflow-x: auto; scrollbar-width: none; }
.pub-tabs::-webkit-scrollbar { display: none; }
.pub-tabs a { min-width: max-content; padding: 12px 10px; }
.cart-n { display: inline-block; background: #d32f2f; color: #fff; border-radius: 12px; min-width: 22px; padding: 0 6px; margin-left: 4px; font-size: .8rem; line-height: 22px; }
.cart-n[hidden] { display: none; }
.shop-cats { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.shop-cats::-webkit-scrollbar { display: none; }
.shop-cats button { flex: none; min-height: 46px; padding: 0 16px; border-radius: 24px; border: 2px solid #dfe6e1; background: #fff; font-weight: 800; font-size: 1rem; cursor: pointer; }
.shop-cats button.on { background: var(--green); border-color: var(--green); color: #fff; }
.shop-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
@media (min-width: 560px) { .shop-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .shop-grid { grid-template-columns: 1fr 1fr 1fr; } }
.pcard2 { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); display: flex; flex-direction: column; }
.pc-img { aspect-ratio: 1; background: #f1f4f1; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pc-body h3 { margin: 0; font-size: 1.25rem; line-height: 1.25; }
.pc-price { font-size: 1.45rem; font-weight: 900; color: var(--green-d, #145c2e); }
.pc-price small { font-size: .95rem; font-weight: 700; color: #555; }
.pc-desc { margin: 0; font-size: 1rem; color: #333; }
.pc-ing summary { font-weight: 800; cursor: pointer; padding: 6px 0; min-height: 40px; display: flex; align-items: center; }
.pc-ing p { margin: 0; font-size: .95rem; color: #444; white-space: pre-wrap; }
.pc-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-vars button { flex: 1 1 auto; min-height: 52px; min-width: 88px; border-radius: 12px; border: 2px solid #cfd8d1; background: #fff; font-weight: 800; font-size: 1.02rem; cursor: pointer; padding: 6px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pc-vars button small { font-weight: 700; color: #555; font-size: .85rem; }
.pc-vars button.on { border-color: var(--green); background: #e8f5ec; box-shadow: inset 0 0 0 1px var(--green); }
.pc-qty { justify-content: space-between; margin: 0; }
.pc-q { flex: 1; text-align: center; font-size: 1.1rem; }
.pc-q b { font-size: 1.6rem; }
.pc-add { min-height: 58px; font-size: 1.15rem; margin-top: auto; }
.pc-in { margin: 0; color: var(--green-d, #145c2e); font-weight: 800; font-size: .95rem; }
#cartFab { position: fixed; right: 14px; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); z-index: 30; background: #d32f2f; color: #fff; font-weight: 900; font-size: 1.05rem; padding: 14px 18px; border-radius: 30px; box-shadow: 0 4px 14px rgba(0,0,0,.3); text-decoration: none; }
#cartFab b { background: #fff; color: #d32f2f; border-radius: 12px; padding: 0 7px; margin-left: 4px; }
#cartFab[hidden] { display: none; }
.cart-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #e6ece7; align-items: flex-start; }
.cr-img { width: 64px; height: 64px; flex: none; border-radius: 12px; overflow: hidden; background: #f1f4f1; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.cr-img img { width: 100%; height: 100%; object-fit: cover; }
.cr-main { flex: 1; min-width: 0; } .cr-main b { display: block; font-size: 1.05rem; word-break: break-word; } .cr-main small { color: #555; font-size: .9rem; }
.cr-qty { margin: 6px 0 0; } .cr-qty .qty-btn { width: 46px; height: 46px; font-size: 1.5rem; }
.cr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; } .cr-side b { white-space: nowrap; font-size: 1.05rem; }
.cart-total { text-align: right; font-size: 1.15rem; margin-top: 10px; } .cart-total b { font-size: 1.5rem; }
.sum-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #eef2ef; }
.sum-row small { display: block; color: #555; } .sum-row b { white-space: nowrap; }
.pc-img.noimg { aspect-ratio: 4 / 1; font-size: 2rem; }
.cd-item:has(.cd-tpl) { flex-wrap: wrap; }
.cd-item:has(.cd-tpl) .cd-name { flex-basis: 100%; }
.cd-item:has(.cd-tpl) .cd-tpl { flex: 1; max-width: none; }
.cr-qty .pc-q { font-size: .9rem; line-height: 1.15; }
.sk-ai summary { font-size: 1.05rem; }
.sk-ai ol { padding-left: 18px; margin: 6px 0 10px; }
.sk-ok { background: #fff8e1; border-radius: 10px; padding: 8px; }

.pc-lead { margin: 0; font-weight: 800; color: #8a5a00; background: #fff6e0; border-radius: 10px; padding: 6px 10px; font-size: .95rem; }

/* Gotowość do pracy */
.gt-head { border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 4px; color: #fff; }
.gt-head b { font-size: 1.25rem; } .gt-head span { font-size: .92rem; opacity: .95; }
.gt-head.ok { background: var(--green); } .gt-head.warn { background: #b26a00; } .gt-head.bad { background: var(--red); }
.gt-row { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid #e8ece8; align-items: flex-start; }
.gt-row:first-of-type { border-top: 0; }
.gt-i { font-size: 1.25rem; line-height: 1.3; flex: none; }
.gt-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gt-b small { color: #55605a; font-size: .9rem; line-height: 1.35; overflow-wrap: anywhere; }
.gt-row.bad b { color: var(--red); } .gt-row.warn b { color: #8a5a00; }
.gt-a { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.gt-a .btn { min-height: 40px; padding: 6px 14px; }

/* RODO i porównywarka */
.rodo-sum, .pc-head { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pill2 { display: inline-block; padding: 6px 10px; border-radius: 14px; font-weight: 800; font-size: .85rem; background: #eef1ee; color: var(--text); text-decoration: none; }
.pill2.ok { background: #e3f3e8; color: var(--green-d); } .pill2.warn { background: #fff3d6; color: #8a5a00; } .pill2.bad { background: #fde4e4; color: var(--red); }
.legal h1, .legal h2 { font-size: 1.25rem; margin: 12px 0 6px; } .legal h3 { font-size: 1.05rem; margin: 14px 0 4px; }
.legal p, .legal li { line-height: 1.5; margin: 4px 0; overflow-wrap: anywhere; } main.legal { max-width: 820px; margin: 0 auto; padding: 12px 16px 40px; background: #fff; }
.pc-t td small { display: block; color: #66706a; font-size: .8rem; } .pc-t tr.best td { background: #e9f6ee; }
.pc-t { width: 100%; font-size: .92rem; } .pc-t th, .pc-t td { padding: 6px 4px; }
.pc-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 8px; }

/* ===== 3.10: strona klienta – lekki, świeży wygląd ===== */
body.public { background: #f6f9f7; }
body.public .card { border-radius: 18px; box-shadow: 0 1px 3px rgba(20,60,35,.06), 0 6px 18px rgba(20,60,35,.05); border: 1px solid #edf2ee; }
body.public .home-head { padding: 4px 0 10px; }
body.public .home-head .t1 { font-size: 1.45rem; letter-spacing: .5px; }
body.public .home-head .t2 { font-size: .78rem; letter-spacing: 3px; font-weight: 700; }
body.public .home-head .clock { font-size: .88rem; }
body.public .pub-tabs { background: #f6f9f7; gap: 4px; }
body.public .pub-tabs a { border: 0; background: transparent; color: #4b5a50; font-weight: 700; min-height: 42px; border-radius: 22px; padding: 8px 12px; font-size: .92rem; }
body.public .pub-tabs a.on { background: #fff; color: var(--green-d, #145c2e); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.shop-info { background: #eaf6ee; color: #145c2e; border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; font-weight: 600; font-size: .95rem; }
.shop-search input { border-radius: 24px !important; border: 1px solid #dbe5de !important; background: #fff; min-height: 46px; padding-left: 16px; }
.shop-cats { gap: 6px; padding: 2px 0 8px; }
.shop-cats button { min-height: 38px; padding: 0 14px; border-radius: 20px; border: 1px solid #dbe5de; font-weight: 700; font-size: .92rem; color: #2f3b33; }
.shop-cats button.on { background: var(--green); border-color: var(--green); color: #fff; }
.shop-cats.sub { padding-top: 0; }
.shop-cats.sub button { min-height: 32px; font-size: .85rem; background: #f0f5f1; border-color: transparent; }
.shop-cats.sub button.on { background: #d7eedf; color: #145c2e; border-color: transparent; }
.shop-grid { gap: 10px; }
.pcard2 { border-radius: 16px; box-shadow: 0 1px 3px rgba(20,60,35,.07); border: 1px solid #edf2ee; padding: 10px; gap: 8px; }
.pcard2.na { opacity: .72; }
.pc-top { display: flex; gap: 12px; align-items: flex-start; }
.pcard2 .pc-img { flex: none; width: 92px; height: 92px; aspect-ratio: auto; border-radius: 12px; overflow: hidden; border: 0; padding: 0; cursor: pointer; background: #f1f5f2; font-size: 2rem; }
.pc-head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pcard2 h3 { margin: 0; font-size: 1.02rem; line-height: 1.25; font-weight: 800; }
.pcard2 .pc-price { font-size: 1.12rem; font-weight: 800; }
.pcard2 .pc-price small { font-size: .82rem; font-weight: 600; color: #66736a; }
.pc-num { margin-left: 4px; }
.pcard2 .pc-lead { font-size: .8rem; padding: 3px 8px; border-radius: 8px; align-self: flex-start; margin-top: 2px; }
.pc-more { background: none; border: 0; padding: 4px 0 0; color: var(--green-d, #145c2e); font-weight: 700; font-size: .85rem; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.pc-na { margin: 0; font-weight: 800; color: #8a5a00; background: #fff6e0; border-radius: 10px; padding: 8px 10px; font-size: .9rem; }
.pcard2 .pc-vars { gap: 5px; }
.pcard2 .pc-vars button { min-height: 38px; min-width: 64px; border-radius: 10px; border: 1px solid #d5dfd8; font-size: .9rem; padding: 4px 10px; font-weight: 700; }
.pcard2 .pc-vars button small { font-size: .75rem; }
.pcard2 .pc-vars button.on { box-shadow: none; border-color: var(--green); background: #eaf6ee; }
.pc-buy { display: flex; gap: 8px; align-items: center; }
.pc-step { display: flex; align-items: center; background: #f2f6f3; border-radius: 22px; padding: 2px; flex: 1; }
.pc-step .qty-btn { width: 38px; height: 38px; min-height: 38px; border-radius: 50%; border: 0; background: #fff; font-size: 1.2rem; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pc-step .pc-q { flex: 1; text-align: center; font-size: .95rem; }
.pc-add { flex: none; height: 42px; padding: 0 14px; border-radius: 22px; border: 0; background: var(--green); color: #fff; font-weight: 800; font-size: .92rem; cursor: pointer; white-space: nowrap; }
.pc-add:active { transform: scale(.97); }
.pcard2 .pc-in { margin: 0; font-size: .82rem; color: var(--green-d, #145c2e); font-weight: 700; }
#cartFab { padding: 10px 16px !important; min-height: 0 !important; font-size: 1rem !important; border-radius: 26px !important; right: 14px !important; left: auto !important; width: auto !important; box-shadow: 0 4px 14px rgba(0,0,0,.18) !important; }
#cartFab b { margin-left: 4px; }
.shop-pdf { display: block; text-align: center; margin: 4px 0 8px; font-weight: 700; color: var(--green-d, #145c2e); }
/* panel szczegółów produktu */
.psheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.ps-back { position: absolute; inset: 0; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .2s; }
.ps-box { position: relative; background: #fff; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform .25s ease-out; padding-bottom: env(safe-area-inset-bottom, 0); }
.psheet.on .ps-back { opacity: 1; } .psheet.on .ps-box { transform: none; }
@media (min-width: 600px) { .psheet { align-items: center; } .ps-box { border-radius: 20px; } }
.ps-x { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); font-size: 1.1rem; box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: pointer; z-index: 1; }
.ps-img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; max-height: 46vh; }
.ps-body { padding: 14px 18px 18px; }
.ps-body h2 { margin: 0 0 4px; font-size: 1.3rem; }
.ps-body h3 { margin: 14px 0 4px; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; color: #66736a; }
.ps-txt { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.ps-al { color: #8a5a00; font-weight: 700; }
.ps-vars { list-style: none; padding: 0; margin: 8px 0; } .ps-vars li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #eef2ef; }
body.noscroll { overflow: hidden; }
/* kategorie sklepu (panel) */
.kt-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid #eef2ef; }
.kt-row:first-child { border-top: 0; } .kt-row.child { padding-left: 18px; } .kt-row.off .kt-name b { color: #888; text-decoration: line-through; }
.kt-name { flex: 1; min-width: 0; display: flex; flex-direction: column; } .kt-name small { color: #66736a; }
.kt-act { display: flex; gap: 4px; } .kt-b { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #d5dfd8; background: #fff; font-size: 1rem; cursor: pointer; } .kt-b.on { background: #fde4e4; }
.sk-st { max-width: 150px; font-size: .85rem; padding: 6px; border-radius: 10px; }
.sk-al .chip { min-height: 34px; font-size: .85rem; padding: 0 10px; }
body.public .home-head .t1 { display: none; }
body.public .home-head { padding: 0 0 6px; }
body.public .home-head .t2 { font-size: .72rem; }
.pc-step .pc-q b { font-size: 1.1rem; }

/* ===== 3.11 – układ karty produktu: nic nie wychodzi poza kartę ===== */
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: stretch; }
.pcard2 { container-type: inline-size; min-width: 0; gap: 10px; padding: 12px; }
.pcard2 > * { min-width: 0; }
.pcard2 .pc-top { gap: 12px; }
.pcard2 .pc-img { width: 96px; height: 96px; }
.pcard2 h3 { overflow-wrap: anywhere; hyphens: auto; }
.pcard2 .pc-lead { margin: 0; align-self: flex-start; max-width: 100%; font-size: .82rem; line-height: 1.3; padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.pcard2 .pc-vars { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; }
.pcard2 .pc-vars button { min-width: 0; min-height: 44px; padding: 5px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.pcard2 .pc-vars button:only-child { grid-column: 1 / -1; }
.pcard2 .pc-vars button small { color: #4f6355; }
.pcard2 .pc-buy { margin-top: auto; display: flex; gap: 8px; align-items: stretch; }
.pcard2 .pc-step { flex: none; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 26px; background: #eef4ef; }
.pcard2 .pc-step .qty-btn { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; border: 0; background: #fff; color: var(--green-d, #145c2e); font-size: 1.35rem; line-height: 1; font-weight: 800; box-shadow: 0 1px 2px rgba(0,0,0,.12); display: flex; align-items: center; justify-content: center; }
.pcard2 .pc-step .qty-btn:active { transform: scale(.94); }
.pcard2 .pc-q { flex: none; min-width: 46px; padding: 0 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; white-space: nowrap; }
.pcard2 .pc-q b { font-size: 1.1rem; font-weight: 900; }
.pcard2 .pc-q i { font-style: normal; font-size: .68rem; font-weight: 700; color: #66736a; }
.pcard2 .pc-add { flex: 1 1 0; min-width: 0; height: auto; min-height: 46px; margin: 0; padding: 0 12px; border-radius: 26px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: .98rem; white-space: nowrap; overflow: hidden; }
.pcard2 .pc-add .pc-ico { font-size: 1.05rem; }
@container (max-width: 250px) {
  .pcard2 .pc-buy { flex-direction: column; }
  .pcard2 .pc-step { justify-content: space-between; }
  .pcard2 .pc-q { flex: 1; }
  .pcard2 .pc-img { width: 80px; height: 80px; }
}
@media (hover: hover) { .pcard2 .pc-add:hover { filter: brightness(1.07); } .pcard2 { transition: box-shadow .15s; } .pcard2:hover { box-shadow: 0 4px 14px rgba(20,60,35,.12); } }
.pcard2 .pc-in { margin: 0; text-align: center; background: #eaf6ee; border-radius: 10px; padding: 5px 8px; }

/* ===== 3.11 – kolektor, baza towarowa, cenówki ===== */
.oc-top > .cen-price, .oc-top > .tw-price { flex: none; min-width: max-content; text-align: right; }
.cen-card .oc-client { overflow-wrap: anywhere; }
#cf.chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -2px 12px; padding: 2px; }
#cf.chips::-webkit-scrollbar { display: none; }
#cf.chips .chip { flex: none; min-height: 40px; white-space: nowrap; }
/* Baza towarowa */
.tw-sec { margin: 14px 2px 6px; font-size: .78rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.tw-mini { padding: 10px 12px; margin-bottom: 6px; }
.tw-mini .oc-client { font-size: .98rem; }
.tw-mini .tw-price { font-size: 1.05rem; }
.tw-hint { margin: 18px 0 8px; }
.tw-tools { display: grid; gap: 6px; margin: 18px 0 8px; }
.tw-tools > a, .tw-tools > button { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; min-height: 54px; font: inherit; color: var(--text); text-decoration: none; cursor: pointer; }
.tw-tools > a > span, .tw-tools > button > span { grid-row: 1 / 3; font-size: 1.35rem; text-align: center; }
.tw-tools b { font-size: .98rem; color: var(--green-d, #145c2e); }
.tw-tools small { color: var(--muted); font-size: .78rem; }
.tw-acts { display: grid; gap: 8px; }
.tw-acts .btn-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.tw-acts .btn-grid .btn { min-height: 50px; font-size: .92rem; }
/* Kolektor */
.kol-btns .btn { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; padding: 0 8px; }
.kol-item small { word-break: normal; overflow-wrap: anywhere; line-height: 1.35; }
.kol-item > div:first-child { min-width: 0; flex: 1; }
.kol-item[hidden] { display: none; }
.kol-find { width: 100%; margin: 0 0 8px; border-radius: 22px !important; min-height: 44px; padding-left: 14px; }
/* Lista wydruku – zwarty pasek akcji */
.cd-print { padding: 6px 0 4px; }
.cd-prow { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 6px; align-items: stretch; }
.cd-prow .btn { min-width: 0; min-height: 52px; padding: 0 6px; gap: 4px; font-size: .86rem; white-space: nowrap; }
.cd-prow .btn.red { font-size: .95rem; }
.cd-clear { margin-top: 10px; font-size: .88rem; min-height: 40px; }
.tw-copy { border: 1px solid var(--line); background: #fff; border-radius: 8px; min-width: 34px; min-height: 30px; margin-left: 6px; font-size: 1rem; cursor: pointer; vertical-align: middle; }
.tw-acts .btn-grid { grid-template-columns: 1fr 1fr; }
.cd-prow.tw-prow { grid-template-columns: minmax(0, 1fr) 54px; }
.tw-prow #tbgo { font-size: .9rem; line-height: 1.15; white-space: normal; }
.tw-prow #tbclr { font-size: 1.1rem; }
