/* KONGO PRO – wygląd wg makiety A7a: jasno, oliwka z logo, Poppins. */
@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/poppins-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/poppins-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #FAFAF7;          /* tło aplikacji */
  --card: #FFFFFF;        /* karty, pasek boczny, okna */
  --line: #E7E8EA;        /* obramowania */
  --line2: #F0F1F3;       /* linie w tabelach */
  --field: #D5D8DC;       /* obramowanie pól i przycisków drugorzędnych */
  --text: #16181D;        /* grafit */
  --text2: #2E3238;
  --text3: #4A4F57;
  --muted: #6B7079;
  --primary: #4F6426;     /* oliwka KONGO z logo */
  --primary-d: #3F5220;
  --primary-h: #3A4B1D;
  --primary-bg: #EFF2E4;
  --on-primary: #FFFFFF;
  --gold: #D4A72C;        /* tylko ★ i wyróżnienia */
  --gold-t: #7A5D08;
  --gold-bg: #FBF4DC;
  --brown: #8B5E3C;       /* drewno – ostrzeżenia, dodatki */
  --brown-t: #7A4F2F;
  --brown-bg: #F5EDE6;
  --red: #A2352A;
  --red-line: #E9C9C2;
  --red-bg: #FBEDEA;
  --grey-bg: #F1F2F4;
  --ok: #3F5220;
  --ok-bg: #EFF2E4;
  --vape: #4F6426;
  --extra: #8B5E3C;       /* kategorie „osobna grupa” w statystykach (brąz z makiety) */
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 24, 29, .04);
  --font: Poppins, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --side: 248px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); font: 15px/1.55 var(--font); background: var(--bg); }
body.no-scroll { overflow: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-h); }
code { background: var(--grey-bg); color: var(--text2); padding: 1px 6px; border-radius: 6px; font-size: .88em; }
h1 { font-size: 32px; line-height: 1.2; margin: 0 0 6px; font-weight: 700; }
h2 { font-size: 20px; margin: 0 0 8px; font-weight: 600; }
h3 { font-size: 18px; margin: 0 0 12px; padding-right: 30px; font-weight: 600; }
h4 { margin: 16px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.h-sm { font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 8px; padding: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.up-t { color: var(--ok); } .down-t { color: var(--red); } .ok-t { color: var(--ok); }
[hidden] { display: none !important; }

/* ---------- logo KONGO PRO ---------- */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { display: block; width: 40px; height: 44px; object-fit: contain; flex-shrink: 0; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.brand-pro { font-size: 11px; font-weight: 600; color: var(--primary); border: 2px solid var(--primary); border-radius: 999px; padding: 0 8px; line-height: 1.5; }

/* ---------- górny pasek (instrukcja) / pasek boczny (aplikacja) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 0 24px; padding-top: env(safe-area-inset-top); min-height: 68px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.shop-box { display: none; }
.shop-logo { display: block; width: 40px; height: 40px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.shop-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tabs button {
  display: flex; align-items: center; gap: 12px;
  background: none; border: 0; color: var(--text2); font: inherit; font-weight: 500; font-size: 15px;
  height: 44px; padding: 0 12px; cursor: pointer; border-radius: 10px; white-space: nowrap; transition: background .15s, color .15s;
}
.tabs button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.tabs button .sm { display: none; }
.tabs button:hover { background: var(--grey-bg); color: var(--text); }
.tabs button.active { background: var(--primary-bg); color: var(--primary-d); font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 12px; white-space: nowrap; margin-left: auto; }
.help-link, .logout { color: var(--text3); font-size: 14px; font-weight: 500; }
.help-link:hover, .logout:hover { color: var(--text); }

main { max-width: 1340px; margin: 0 auto; padding: 32px 24px 60px; }

/* aplikacja: menu boczne na komputerze */
@media (min-width: 821px) {
  body.has-side { padding-left: var(--side); }
  .has-side .topbar {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); z-index: 30;
    flex-direction: column; align-items: stretch; gap: 24px; padding: 24px 16px; min-height: 0;
    border-bottom: 0; border-right: 1px solid var(--line); overflow-y: auto;
  }
  .has-side .brand { padding: 0 8px; }
  .has-side .shop-box { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
  .shop-box span { font-size: 12px; color: var(--muted); }
  .shop-box b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
  .has-side .tabs { flex-direction: column; flex: 0 0 auto; }
  .has-side .top-right { margin: auto 0 0; flex-direction: column; align-items: stretch; gap: 6px; white-space: normal; }
  .has-side .help-link { padding: 8px 12px; border-radius: 10px; }
  .has-side .help-link:hover { background: var(--grey-bg); }
  .has-side main { padding: 40px 48px 60px; }
}
.tab { display: none; }
.tab.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin: 0; color: var(--text3); }
.head-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- formularze i przyciski ---------- */
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--text);
  border: 1px solid var(--field); border-radius: 10px; background: var(--card);
  padding: 0 16px; width: 100%; min-height: 48px;
}
textarea { padding: 12px 16px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8A8F97; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 500; font-size: 15px; line-height: 1.2; min-height: 48px;
  border: 1px solid var(--field); background: var(--card); color: var(--text);
  border-radius: 10px; padding: 0 20px; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: var(--grey-bg); color: var(--text); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }
.btn.primary:hover { background: var(--primary-h); border-color: var(--primary-h); }
.btn.danger { background: var(--card); border-color: var(--red-line); color: var(--red); }
.btn.danger:hover { background: var(--red-bg); }
.btn.warnb { background: var(--brown-bg); border-color: #E3D2C3; color: var(--brown-t); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--primary); font-weight: 600; }
.btn.ghost:hover { background: var(--primary-bg); color: var(--primary-d); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.btn.icon { min-height: 36px; padding: 0 10px; min-width: 36px; }
.btn.big { width: 100%; min-height: 52px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .count { background: var(--red); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 6px; min-width: 18px; }
.btn .count:empty { display: none; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }

.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type=search] { flex: 1; min-width: 220px; }
.toolbar select { width: auto; min-width: 200px; }
.summary { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; margin: 0 2px 14px; }
.summary b { color: var(--text); font-weight: 600; }
.summary .ok b { color: var(--ok); }
.summary .wait b { color: var(--gold-t); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 0 20px; }
.cols2.tight { gap: 0 24px; }
.row-actions { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.row-actions.left { justify-content: flex-start; }
.add-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 12px; }
.add-row > input { flex: 1; min-width: 160px; }
.add-row .unit { color: var(--muted); }
#pw-hash { margin-top: 10px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.below-table { margin-top: 12px; text-align: center; }
.alert { border-radius: 10px; padding: 12px 16px; margin: 10px 0; font-size: 14px; }
.alert.warn { background: var(--brown-bg); color: var(--brown-t); border: 1px solid #E3D2C3; }
.alert.err { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-line); }
.alert.sec { font-weight: 600; margin: 0 0 16px; }

/* ---------- tabele ---------- */
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.table-wrap.flat { border: 0; background: transparent; border-radius: 0; }
table.grid { width: 100%; border-collapse: collapse; }
.grid th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 500; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.grid td { padding: 14px 16px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover { background: #FCFCFA; }
.grid tfoot td { border-top: 1px solid var(--line); padding: 12px 16px; }
.grid.compact td, .grid.compact th { padding: 9px 12px; }
.grid .c-sms { width: 120px; }
.grid .c-act { width: 1%; white-space: nowrap; text-align: right; }
.grid .c-act .btn + .btn { margin-left: 4px; }
.nm { font-weight: 600; font-size: 15px; }
.ph { display: block; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; margin-top: 1px; }
.notes { white-space: pre-line; max-height: 4.6em; overflow: hidden; font-size: 13.5px; color: var(--text3); margin-top: 4px; }
.upd { display: inline-block; font-size: 11px; color: var(--brown-t); background: var(--brown-bg); border-radius: 5px; padding: 0 5px; margin-right: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; background: var(--grey-bg); color: var(--text2); border-radius: 999px; padding: 3px 10px; font-size: 13px; margin: 0 4px 4px 0; }
.chips .chip { margin: 0; }
.waitline { color: var(--gold-t); font-size: 13.5px; margin-bottom: 4px; }
.waitline b { color: var(--gold-t); }
.last { font-size: 13px; color: var(--muted); display: block; }
.last.never { font-style: italic; }
.last.recent { color: var(--brown-t); font-weight: 600; }
.last.today { color: var(--ok); font-weight: 600; }

/* stany wierszy */
tr.sent { background: var(--ok-bg); }
tr.recent { box-shadow: inset 4px 0 0 var(--brown); }
tr.waiting { box-shadow: inset 4px 0 0 var(--gold); background: linear-gradient(90deg, var(--gold-bg), transparent 60%); }
tr.unsub { background: var(--grey-bg) !important; box-shadow: inset 4px 0 0 #B7BBC1; }
tr.unsub td { color: var(--muted); }
tr.unsub .nm, tr.unsub .ph, tr.unsub .notes, tr.unsub .chip { text-decoration: line-through; color: var(--muted); opacity: .85; }
tr.unsub .last { color: var(--muted); }

.badge {
  display: inline-block; font-size: 12px; font-weight: 500;
  padding: 3px 10px; border-radius: 99px; background: var(--grey-bg); color: var(--text3);
  vertical-align: middle; white-space: nowrap; text-decoration: none;
}
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.warn { background: var(--brown-bg); color: var(--brown-t); margin-top: 4px; }
.badge.ok { background: var(--primary-bg); color: var(--primary-d); }
.badge.wait { background: var(--gold-bg); color: var(--gold-t); margin-top: 4px; }
.wait-txt { color: var(--gold-t); }

/* duży checkbox SMS */
.smscheck { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.smscheck input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.smscheck .box {
  flex: none; width: 30px; height: 30px; border-radius: 8px; border: 2px solid #B7BBC1; background: var(--card);
  display: grid; place-items: center; transition: all .12s;
}
.smscheck:hover .box { border-color: var(--primary); }
.smscheck input:checked + .box { background: var(--primary); border-color: var(--primary); }
.smscheck input:checked + .box::after { content: ""; width: 7px; height: 13px; border: solid var(--on-primary); border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }
.smscheck input:focus-visible + .box { outline: 2px solid var(--primary); outline-offset: 2px; }
.smscheck .date { font-size: 13px; font-weight: 600; color: var(--ok); line-height: 1.15; }
.smscheck .date small { display: block; font-weight: 400; color: var(--muted); }
.smscheck.disabled { cursor: not-allowed; }
.smscheck.disabled .box { background: var(--grey-bg); border-color: var(--red-line); }
.smscheck.disabled .date { color: var(--red); }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); background: var(--card); border: 1px dashed var(--field); border-radius: var(--radius); }

/* ---------- pole tagów z podpowiedziami ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.flabel { font-size: 14px; font-weight: 500; color: var(--text); }
.flabel small { font-weight: 400; color: var(--muted); }
.taginput {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  border: 1px solid var(--field); border-radius: 10px; background: var(--card); padding: 6px 8px; min-height: 48px; cursor: text;
}
.taginput:focus-within { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.ti-chips { display: contents; }
.chip-x { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 3px 4px 3px 11px; }
.chip-x button { border: 0; background: rgba(22, 24, 29, .08); color: var(--text); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.chip-x button:hover { background: var(--red); color: #fff; }
.ti-input { flex: 1; min-width: 160px; min-height: 34px; border: 0 !important; outline: 0 !important; background: transparent; padding: 4px; }
.ti-list {
  position: absolute; left: -1px; right: -1px; top: calc(100% + 4px); z-index: 70; list-style: none; margin: 0; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(22, 24, 29, .12); max-height: 300px; overflow: auto;
}
.ti-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ti-list li small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ti-list li.on, .ti-list li:hover { background: var(--primary-bg); }
.ti-list li.new b { color: var(--primary); }

/* ---------- dostawa ---------- */
.result-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.tpl-picks { display: flex; gap: 12px; flex-wrap: wrap; }
.tpl-pick { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; flex-direction: column; gap: 6px; min-width: 220px; }
.progress { position: relative; height: 28px; background: var(--grey-bg); border-radius: 99px; margin: 14px 0 10px; overflow: hidden; }
.progress .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--primary); transition: width .3s; }
.progress span { position: relative; display: block; text-align: center; font-size: 13px; font-weight: 600; line-height: 28px; mix-blend-mode: difference; color: #fff; }
.products summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 14px; }
.products ul { columns: 2; font-size: 14px; margin: 8px 0 0; padding-left: 20px; color: var(--text3); }
.products ul.prod-list { columns: 1; list-style: none; padding: 0; color: var(--text); }
.prod-list li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line2); }
.prod-list li:first-child { border-top: 0; }
.prod-list .pmain { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.prod-list .pbtns { flex: none; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.prod-list .ico { width: 13px; height: 13px; vertical-align: -2px; }
.prod-add { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 4px; }
.prod-add > div:first-child { flex: 1; min-width: 0; }
.products details.skipped { margin-top: 10px; }
.products details.skipped summary { color: var(--text2); font-weight: 500; }
.pdf-drop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; margin: 6px 0 12px; border: 2px dashed var(--line); border-radius: 12px; }
.card.drag .pdf-drop { border-color: var(--primary); background: var(--grey-bg); }
.pdf-drop .btn.busy { opacity: .7; pointer-events: none; }
.alert.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #D5DEBE; }
.sms-items { display: flex; flex-direction: column; gap: 6px; }
.sms-item { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.form label.sms-item { flex-direction: row; }
@media (max-width: 640px) { .prod-list li { flex-direction: column; } .prod-list .pbtns { justify-content: flex-start; } .prod-add { flex-direction: column; align-items: stretch; } }
.smsbox { display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; color: var(--text2); }
#tpl-prev { margin-top: 4px; }
.smsbtns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
#d-table .c-text { min-width: 280px; max-width: 420px; }
#d-table .c-last { width: 150px; }
.list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.list-plain { list-style: none; margin: 0 0 10px; padding: 0; }
.list-plain li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.list-plain li:last-child { border-bottom: 0; }
.list-plain li.inactive { opacity: .55; }

/* ---------- do zamówienia ---------- */
.o-group { margin-top: 14px; }
.o-group h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 8px; padding: 0; }
.o-group.sep-start { border-top: 4px solid var(--extra); padding-top: 14px; margin-top: 22px; }
.o-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 6px; background: var(--card); }
.o-item.ok { border-color: #C9D3AE; background: var(--ok-bg); }
.o-item.order { border-color: #E3D2C3; background: var(--brown-bg); }
.o-item.ok .o-name b { color: var(--ok); }
.o-item.order .o-name b { color: var(--brown-t); }
.o-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.btn.seg.on-ok { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.seg.on-order { background: var(--brown); border-color: var(--brown); color: #fff; }
/* 3.10 Do zamówienia: zamówienie z ilościami, klienci lubią, brak w hurtowni */
.heart { color: var(--red); font-style: normal; margin-right: 3px; }
.badge.like { background: var(--red-bg); color: var(--red); }
.btn.on-order { background: var(--brown); border-color: var(--brown); color: #fff; }
.btn.on-na { background: var(--red-bg); border-color: var(--red-line); color: var(--red); }
.o-item.na { border-style: dashed; background: var(--grey-bg); }
.o-item.na .o-name b { color: var(--muted); text-decoration: line-through; }
.o-order { border-color: #E3D2C3; }
.o-order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.o-order-head h2 { margin-bottom: 2px; }
.o-send { display: flex; gap: 8px; flex-wrap: wrap; }
.o-lines { list-style: none; margin: 10px 0 0; padding: 0; }
.o-lines .o-cat { font-size: 13px; font-weight: 600; color: var(--muted); padding: 12px 0 4px; }
.o-lines .o-cat:first-child { padding-top: 0; }
.o-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.o-lname { min-width: 0; overflow-wrap: anywhere; }
.o-qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.o-n { min-width: 58px; text-align: center; font-weight: 600; }
.o-x-space { display: inline-block; width: 32px; }
.o-pcs { font-size: 13px; font-weight: 600; color: var(--brown-t); white-space: nowrap; }
.o-mailprev { white-space: pre-wrap; max-height: 260px; overflow: auto; font-size: 13px; }
.order-sheet { display: none; }
#tab-orders .list-plain li { flex-wrap: wrap; }
#tab-orders .list-plain li > div:first-child { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }

/* ---------- czas pracy ---------- */
.open-shift { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--gold-bg); border: 1px solid #EBDDA8; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; }
.open-shift > div { flex: 1; }
.open-shift .dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(212, 167, 44, .25); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.day-nav, .month-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.day-nav input[type=date] { width: auto; }
.day-name { color: var(--muted); font-weight: 500; text-transform: capitalize; margin-left: 6px; }
.month-nav h2 { margin: 0 8px; text-transform: capitalize; min-width: 210px; text-align: center; }
.timeline { margin: 4px 0 8px; }
.tl-track { position: relative; height: 46px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tl-open { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(79, 100, 38, .08) 0 6px, transparent 6px 12px); border-left: 1px dashed rgba(79, 100, 38, .35); border-right: 1px dashed rgba(79, 100, 38, .35); }
.tl-seg { position: absolute; top: 6px; bottom: 6px; border-radius: 8px; display: flex; align-items: center; padding: 0 8px; overflow: hidden; box-shadow: 0 0 0 2px var(--card); }
.tl-seg span { font-size: 12.5px; font-weight: 600; color: #fff; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.tl-seg.live { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .22) 0 6px, transparent 6px 12px) !important; }
.tl-axis { position: relative; height: 18px; margin-top: 3px; }
.tl-axis span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted); }
.tl-axis span:first-child { transform: none; }
.tl-axis span:last-child { transform: translateX(-100%); }
.quick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.emp-btn .sw { margin-right: 2px; }
.shift-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 12px; align-items: end; margin: 14px 0; padding: 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.shift-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text3); }
.days-detail { margin-top: 12px; }
.small-kpis .kv { font-size: 22px; }

/* ---------- statystyki ---------- */
.subtabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--grey-bg); margin-bottom: 20px; flex-wrap: wrap; }
.subtabs button { border: 0; background: none; color: var(--text3); font: inherit; font-weight: 500; font-size: 14px; min-height: 40px; padding: 0 16px; border-radius: 9px; cursor: pointer; }
.subtabs button.active { background: var(--card); color: var(--primary-d); font-weight: 600; box-shadow: 0 1px 3px rgba(22, 24, 29, .1); }
.sub { display: none; }
.sub.active { display: block; }
.period-info { margin: -4px 0 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.kpi.accent { border-color: #C9D3AE; background: var(--primary-bg); }
.kpi.neg { border-color: var(--red-line); background: var(--red-bg); }
.kv { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kv.sm { font-size: 21px; }
.kl { color: var(--muted); font-size: 13px; font-weight: 400; margin-bottom: 6px; }
.ks { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.delta { font-weight: 600; font-size: 12px; margin-left: 4px; white-space: nowrap; }
.delta.up { color: var(--ok); } .delta.down { color: var(--red); } .delta.flat { color: var(--muted); }
.insights { border-color: #EBDDA8; background: #FFFDF6; }
.insights ul { margin: 0; padding-left: 20px; }
.insights li { margin: 7px 0; color: var(--text3); }
.insights li b { color: var(--text); }
.hero-empty { text-align: center; padding: 40px 24px; }
.hero-empty p { max-width: 560px; margin: 8px auto; }
.big-inline { min-height: 52px; padding: 0 26px; font-size: 16px; margin-top: 10px; }
.cat-table .grp td { background: var(--bg); border-top: 1px solid var(--line); }
.cat-table .extra-row td { background: var(--brown-bg); }
.cat-table .extra-row.first td { border-top: 4px solid var(--extra); }
.cat-table .indent { padding-left: 28px; color: var(--text3); }
.group-vape { border-top: 4px solid var(--vape); }
.group-extra { border-top: 4px solid var(--extra); }
.group-sep { display: flex; align-items: center; gap: 14px; margin: 30px 0 18px; color: var(--brown-t); font-weight: 600; letter-spacing: .12em; font-size: 13px; }
.group-sep::before, .group-sep::after { content: ""; flex: 1; height: 4px; border-radius: 3px; background: var(--extra); opacity: .7; }
.sortbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
.sortbar button { border: 1px solid var(--field); background: var(--card); color: var(--text2); font: inherit; font-size: 13px; font-weight: 500; min-height: 34px; padding: 0 14px; border-radius: 99px; cursor: pointer; }
.sortbar button.active { background: var(--primary-bg); border-color: var(--primary); color: var(--primary-d); }
.sortbar .psearch { width: auto; flex: 1; min-width: 180px; max-width: 320px; min-height: 38px; padding: 0 12px; font-size: 14px; margin-left: auto; }
.prod-table tr.key td:nth-child(2) b { color: var(--gold-t); }
.star { color: var(--gold); font-style: normal; margin-right: 3px; }
.plan ul { margin: 6px 0 0; padding-left: 18px; }
.quick-range { display: flex; gap: 8px; flex-wrap: wrap; }
.cost-form { display: grid; grid-template-columns: 1.3fr .8fr 1.3fr auto; gap: 8px; margin: 8px 0 12px; }
.export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.steps { margin: 6px 0 10px; padding-left: 20px; color: var(--text3); }
.steps li { margin: 4px 0; }

/* słupki poziome */
.bars { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.barrow { display: grid; grid-template-columns: minmax(90px, 42%) 1fr 86px; gap: 10px; align-items: center; font-size: 13.5px; }
.bl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text2); }
.bt { height: 12px; }
.bf { display: block; height: 100%; background: var(--vape); border-radius: 0 4px 4px 0; min-width: 2px; }
.bf.sep { background: var(--extra); }
.bf.up { background: var(--primary); } .bf.down { background: var(--red); }
.bf.wait { background: var(--gold); }
.bn { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }
[id^="s-cat"] .barrow, [id^="cs-"] .barrow, #m-bars .barrow { grid-template-columns: minmax(90px, 34%) 1fr 86px; }
/* słupki pionowe (SVG) */
.vbars-wrap { overflow-x: auto; margin-top: 6px; }
svg.vbars { display: block; overflow: visible; max-width: none; }
svg.vbars .axis { stroke: var(--line); stroke-width: 1; }
svg.vbars .vb path { fill: var(--vape); }
svg.vbars .vb.neg path { fill: var(--red); }
svg.vbars .vb.muted path { opacity: .4; }
svg.vbars .vb .hit { fill: transparent; }
svg.vbars .vb:hover path { filter: brightness(1.2); }
svg.vbars text { fill: var(--muted); font-size: 11px; text-anchor: middle; font-family: var(--font); }
svg.vbars text.vl { fill: var(--text); font-weight: 600; font-size: 11.5px; }
svg.vbars .avg { stroke: var(--text3); stroke-width: 1.2; stroke-dasharray: 5 4; opacity: .7; }
svg.vbars .vb.top path { fill: var(--gold); }
svg.vbars .vb.wk text.xl { font-weight: 600; fill: var(--text3); }
/* 3.6: średnio dziennie, utarg dzienny, TOP 5 */
.kpi .chg { font-weight: 600; white-space: nowrap; }
.kpi .chg.up { color: var(--ok); } .kpi .chg.down { color: var(--red); } .kpi .chg.flat { color: var(--muted); }
.day-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 12px; }
.day-form input[name=note], .day-form .btn { grid-column: 1 / -1; }
.top-days { list-style: none; margin: 6px 0 0; padding: 0; counter-reset: top; }
.top-days li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line2); }
.top-days li:last-child { border-bottom: 0; }
.top-days .tn { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--grey-bg); color: var(--text3); }
.top-days li:first-child .tn { background: var(--gold); color: #fff; }
.top-days .tv { font-weight: 600; font-variant-numeric: tabular-nums; }
.top-days .now { color: var(--primary-d); font-weight: 600; font-size: 12px; }
.tip { position: fixed; z-index: 90; pointer-events: none; background: var(--text); color: #fff; border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.4; box-shadow: 0 12px 30px rgba(22, 24, 29, .2); max-width: 300px; }

/* ---------- okno modalne ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(22, 24, 29, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { position: relative; background: var(--card); border-radius: 16px; width: 100%; max-width: 600px; max-height: calc(100vh - 32px); overflow: auto; padding: 28px; box-shadow: 0 30px 80px rgba(22, 24, 29, .25); }
.modal-box.wide { max-width: 900px; }
.modal-x { position: absolute; top: 14px; right: 16px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.modal-x:hover { color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; align-items: center; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text); }
.form label.check { flex-direction: row; font-size: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 13px; margin-top: -6px; }
.hint .ok { color: var(--ok); } .hint .warn { color: var(--gold-t); } .hint .err { color: var(--red); }
.dup-card { background: var(--gold-bg); border: 1px solid #EBDDA8; border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.dup-q { margin-top: 6px; font-weight: 600; color: var(--gold-t); }
.menu { display: flex; flex-direction: column; gap: 10px; }
.menu .btn { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; justify-content: stretch; align-items: center; padding: 14px 16px; white-space: normal; text-align: left; border-radius: 12px; }
.menu .btn small { grid-column: 2; font-weight: 400; color: var(--muted); }
.history { list-style: none; padding: 0; margin: 0; }
.history li { padding: 8px 0; border-bottom: 1px solid var(--line2); }
.wait-edit { list-style: none; margin: 0; padding: 0; }
.wait-edit li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 10px; background: var(--gold-bg); border-radius: 10px; margin-bottom: 6px; }
details { margin-bottom: 6px; }
details > summary { cursor: pointer; padding: 6px 0; }
.confirm-text { color: var(--text3); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 100; background: var(--text); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 500;
  box-shadow: 0 12px 40px rgba(22, 24, 29, .25); max-width: calc(100% - 32px);
}
.toast.ok { background: var(--primary); }
.toast.err { background: var(--red); }

/* ---------- logowanie ---------- */
.login-page { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--card); }
.login-main { flex: 1 1 420px; min-width: 0; display: flex; justify-content: center; align-items: center; padding: 48px 24px; }
.login-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 28px; }
.login-box .brand img { width: 48px; height: 52px; }
.login-box .brand-name { font-size: 22px; }
.login-box .brand-pro { font-size: 12px; padding: 0 10px; }
.login-title h1 { margin: 0 0 6px; }
.login-title p { margin: 0; color: var(--text3); }
.login-form { display: flex; flex-direction: column; gap: 20px; }
.login-form label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; }
.login-form label small { font-size: 13px; font-weight: 400; color: var(--muted); }
.login-form label.check { flex-direction: row; font-weight: 400; color: var(--text3); }
.login-form label.check { align-items: flex-start; line-height: 1.4; }
.login-form label.check input { margin-top: 2px; }
.login-form label.check small { display: block; margin-top: 2px; }
.login-form .alert { margin: 0; }
.login-foot { color: var(--muted); font-size: 13px; margin: 0; }
.login-side { flex: 1 1 420px; min-width: 0; background: var(--primary-bg); display: flex; flex-direction: column; justify-content: center; gap: 32px; padding: 64px 56px; }
.login-side img { width: 220px; height: auto; display: block; }
.login-side h2 { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.3; max-width: 440px; }
.login-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; max-width: 440px; }
.login-side li { display: flex; gap: 12px; align-items: flex-start; color: var(--text2); }
.login-side li svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--primary); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- pomoc ---------- */
.help { max-width: 900px; margin: 0 auto; }
.help h2 { margin-top: 36px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 22px; }
.help h3 { margin-top: 20px; font-size: 16px; color: var(--primary-d); }
.help li { margin: 6px 0; color: var(--text2); }
.help p { color: var(--text2); }
.help .toc { columns: 2; }
.help .tipbox { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 12px 0; }
/* ---------- dokumenty prawne (D2) ---------- */
.legal { padding: 24px 16px 48px; }
.legal h1 { font-size: 28px; margin: 8px 0 4px; }
.legal h2 { font-size: 19px; }
.legal ol, .legal ul { padding-left: 22px; }
.legal li ul { margin: 6px 0; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.legal code { font-size: 13px; background: var(--grey-bg); padding: 1px 5px; border-radius: 4px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; font-size: 14px; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.legal-nav a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--text2); text-decoration: none; }
.legal-nav a[aria-current="page"] { background: var(--primary-bg); border-color: var(--primary); color: var(--primary-d); font-weight: 600; }
.legal-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--text2); }
.legal-links a { color: var(--text3); }
@media print {
  body { background: #fff; color: #000; padding: 0 !important; }
  /* 3.10: wydruk / PDF samego zamówienia (Do zamówienia → PDF / drukuj) */
  body.print-order > *:not(.order-sheet) { display: none !important; }
  body.print-order .order-sheet { display: block; font-family: var(--font); color: #000; font-size: 12pt; }
  .order-sheet h1 { font-size: 20pt; margin: 0 0 4px; }
  .order-sheet .os-meta { margin: 0 0 14px; }
  .order-sheet table { width: 100%; border-collapse: collapse; }
  .order-sheet th, .order-sheet td { border-bottom: 1px solid #bbb; padding: 6px 4px; text-align: left; vertical-align: top; }
  .order-sheet .os-cat td { font-weight: 600; background: #f2f2f2; border-bottom: 1px solid #888; }
  .order-sheet .os-nr { width: 36px; }
  .order-sheet .os-q { width: 80px; text-align: right; white-space: nowrap; }
  .order-sheet .os-note { font-size: 10pt; color: #444; }
  .order-sheet .os-sum { margin-top: 12px; font-weight: 600; }
  .order-sheet tr { break-inside: avoid; }
  .topbar, .no-print { display: none !important; }
  .help p, .help li { color: #000; }
  .help h3 { color: var(--primary-d); }
  .ks-bubble { border-color: #999; }
}

/* ---------- telefon ---------- */
@media (max-width: 820px) {
  body { font-size: 15px; }
  .topbar { gap: 10px; padding: 0 16px; padding-top: env(safe-area-inset-top); min-height: 60px; }
  .brand img { width: 34px; height: 38px; }
  .has-side .brand-name, .has-side .brand-pro { display: none; }
  .has-side .shop-box { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .shop-logo { width: 28px; height: 28px; border-radius: 6px; }
  .shop-box span { display: none; }
  .shop-box b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top-right { margin-left: auto; }
  .help-link span { display: none; }
  .help-link { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }
  /* dolny pasek nawigacji jak w aplikacji */
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around; gap: 0;
    background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabs button { flex-direction: column; gap: 4px; height: auto; padding: 6px 2px; font-size: 11px; border-radius: 10px; flex: 1; min-width: 0; color: var(--text3); }
  .tabs button svg { width: 22px; height: 22px; }
  .tabs button .lg { display: none; }
  .tabs button .sm { display: block; }
  .tabs button.active { background: none; color: var(--primary-d); }
  main { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 26px; }
  .page-head { align-items: flex-start; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .toolbar input[type=search] { flex-basis: 100%; }
  .toolbar select { flex: 1; min-width: 0; }
  .card { padding: 16px; }
  .cols2 { grid-template-columns: 1fr; }
  .products ul { columns: 1; }
  .form-row { grid-template-columns: 1fr; }
  .shift-form { grid-template-columns: 1fr 1fr; }
  .shift-form label:first-child { grid-column: 1 / -1; }
  .shift-form .btn { grid-column: 1 / -1; }
  .cost-form { grid-template-columns: 1fr 1fr; }
  .cost-form input[name=note] { grid-column: 1 / -1; }
  .cost-form .btn { grid-column: 1 / -1; }
  .month-nav h2 { min-width: 0; flex: 1; font-size: 17px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kv { font-size: 22px; }
  .kpi { padding: 14px; }
  .help .toc { columns: 1; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }

  /* tabele klientów i dostawy -> karty */
  #c-table, #c-table tbody, #c-table tr, #c-table td,
  #d-table, #d-table tbody, #d-table tr, #d-table td { display: block; width: 100%; }
  #c-table thead, #d-table thead { display: none; }
  #c-table tr, #d-table tr { position: relative; border-bottom: 1px solid var(--line); padding: 14px 12px 12px 58px; }
  #c-table td, #d-table td { border: 0; padding: 2px 0; }
  #c-table td.c-sms, #d-table td.c-sms { position: absolute; left: 14px; top: 14px; width: auto; padding: 0; }
  #c-table td.c-sms .date, #d-table td.c-sms .date { display: none; }
  #c-table td.c-name { padding-right: 118px; }
  #c-table td.c-notes .notes { max-height: none; }
  #c-table td.c-last, #d-table td.c-last { margin-top: 6px; }
  #c-table td.c-act { position: absolute; top: 10px; right: 8px; width: auto; }
  #d-table .c-text { min-width: 0; max-width: none; margin-top: 8px; }
  #d-table .c-last { width: auto; }
  .prod-table th:nth-child(4), .prod-table td:nth-child(4), .prod-table th:nth-child(7), .prod-table td:nth-child(7) { display: none; }
  .grid.compact td, .grid.compact th { padding: 8px 6px; font-size: 13.5px; }
  .barrow { grid-template-columns: minmax(80px, 40%) 1fr 74px; font-size: 13px; }
  .list-item, .o-item { flex-direction: column; align-items: stretch; }
  .o-btns { justify-content: flex-start; }
  .o-btns .seg { flex: 1; }
  .o-send { width: 100%; }
  .o-send .btn { flex: 1; }
  .o-line { flex-wrap: wrap; }
  .o-qty { margin-left: auto; }
  .list-plain li .o-btns { justify-content: flex-start; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-box { border-radius: 16px 16px 0 0; max-height: 92vh; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
  .modal-actions .btn { flex: 1; }
  .tpl-pick { min-width: 0; flex: 1; }
  .sortbar .psearch { max-width: none; flex-basis: 100%; margin-left: 0; }
  .subtabs { display: flex; }
  .subtabs button { flex: 1; padding: 0 6px; font-size: 13px; }
  .login-main { padding: 32px 20px; align-items: flex-start; }
  .login-side { display: none; }
}

/* ---------- konto i użytkownicy ---------- */
.me-btn { display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--text); font: inherit; font-weight: 500; font-size: 14px; padding: 8px; border-radius: 10px; cursor: pointer; text-align: left; }
.me-btn:hover { background: var(--grey-bg); }
.me-ico { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: var(--brown-bg); color: var(--brown-t); display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.me-name { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.me-name small { font-size: 12px; color: var(--muted); font-weight: 400; }
.users-card { border-color: #EBDDA8; }
.users-table tr.inactive td { opacity: .5; }
.role-pick { display: flex; flex-direction: column; gap: 8px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 16px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.form .check { font-weight: 400; color: var(--text); }
@media (max-width: 820px) { .me-name { display: none; } .me-btn { padding: 0; } .users-table th:nth-child(4), .users-table td:nth-child(4) { display: none; } }
input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
.check input { flex: none; width: 18px; height: 18px; min-height: 0; padding: 0; }
.role-pick .check { align-items: flex-start; line-height: 1.4; }

/* data dodania klienta, nazwa w SMS */
.added { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.added.today { color: var(--primary); font-weight: 600; }
.summary .new-today b { color: var(--primary); }
.sms-about { margin-top: 5px; color: var(--text3); }
.sms-about b { color: var(--primary-d); }

/* ---------- Ustawienia: Twój sklep ---------- */
.logo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo-prev { width: 72px; height: 72px; border: 1px dashed var(--field); border-radius: 12px; display: grid; place-items: center; background: var(--bg); flex-shrink: 0; overflow: hidden; }
.logo-prev img { display: block; width: 100%; height: 100%; object-fit: contain; }
.logo-prev span { font-size: 12px; color: var(--muted); text-align: center; padding: 4px; }

/* ---------- kategorie produktów (A6) ---------- */
.cat-item { justify-content: flex-start; }
.cat-item .grow { min-width: 0; }
.cat-move { display: flex; flex-direction: column; gap: 2px; }
.cat-move .btn[disabled] { opacity: .3; cursor: default; }
.cat-link { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; text-align: left; }
.cat-link:hover { color: var(--primary); text-decoration: underline; }
.pp-table select { min-width: 180px; width: auto; }
.pp-table td .badge { margin-left: 6px; }
@media (max-width: 820px) {
  .cat-item { flex-direction: row; align-items: center; }
  .pp-table select { min-width: 0; width: 100%; }
}
.cat-head-btns { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 820px) { .cat-head-btns { width: 100%; } }

/* ---------- ikonki (SVG zamiast emotek) ---------- */
.ico { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.btn.sm .ico { width: 16px; height: 16px; }
.badge .ico, .small .ico, .cat-link .ico { width: 13px; height: 13px; vertical-align: -2px; }
.help b .ico { width: 16px; height: 16px; color: var(--primary-d); }

/* ---------- filtry jako przyciski (Klienci) ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  height: 40px; padding: 0 16px; border: 1px solid var(--field); border-radius: 999px; background: var(--card);
  color: var(--text2); font: 500 14px var(--font); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.pill:hover { background: var(--grey-bg); }
.pill[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-d); }
.kv.gold { color: var(--gold-t); }
.toolbar .pills { flex: 1 1 auto; }
@media (max-width: 820px) {
  .toolbar .pills { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .toolbar .pills::-webkit-scrollbar { display: none; }
}

/* ---------- goryl KONGO podpowiada ----------
   Logo zawsze w oryginale (bez zmian kolorów i kształtu) – tylko wygląda zza krawędzi albo stoi obok dymka. */
.kongo-says { display: flex; align-items: flex-end; gap: 12px; margin: 14px 0; }
.ks-ape { width: 44px; height: 48px; flex-shrink: 0; display: block; }
.ks-bubble {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px;
  padding: 12px 16px; color: var(--text2); font-size: 14px; line-height: 1.55; box-shadow: var(--shadow);
}
.ks-bubble::before {
  content: ""; position: absolute; left: -7px; bottom: 10px; width: 12px; height: 12px; background: var(--card);
  border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg);
}
#c-empty .kongo-says, #d-empty .kongo-says, #o-list .kongo-says { justify-content: center; margin: 28px auto; max-width: 560px; }
#d-list .kongo-says { margin: 4px 0; }
.hero-ape { display: block; width: 96px; height: auto; margin: 0 auto 12px; }
.ins-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.ins-head h2 { margin: 0; }
.ins-head p { margin: 0; }
.ins-ape { width: 40px; height: 44px; flex-shrink: 0; display: block; }

/* w menu bocznym goryl wygląda zza linii nad kontem i podpowiada; klik w goryla chowa/pokazuje dymek */
.kongo-peek { display: none; }
@media (min-width: 821px) {
  .has-side .kongo-peek:not([hidden]) {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    margin-top: auto; border-bottom: 1px solid var(--line);
  }
  .has-side .kongo-peek:not([hidden]) + .top-right { margin-top: 12px; }
}
.kp-bubble {
  position: relative; align-self: stretch; background: var(--primary-bg); color: var(--primary-d);
  border-radius: 14px; padding: 12px 30px 12px 14px; font-size: 13px; line-height: 1.5; animation: fade .3s ease;
}
.kp-bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px;
  background: var(--primary-bg); transform: rotate(45deg);
}
.kp-x {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: none; color: var(--primary-d); font-size: 17px; line-height: 1; cursor: pointer;
}
.kp-x:hover { background: rgba(79, 100, 38, .12); }
.kp-ape { display: block; height: 60px; overflow: hidden; border: 0; padding: 0; background: none; cursor: pointer; }
.kp-ape img { display: block; width: 72px; height: 78px; transform: translateY(6px); transition: transform .25s ease; }
.kp-ape:hover img, .kp-ape:focus-visible img { transform: translateY(0); }
.kongo-peek.quiet .kp-bubble { display: none; }
.kongo-peek.quiet .kp-ape { height: 26px; }
@media (prefers-reduced-motion: reduce) { .kp-ape img, .kp-bubble { transition: none; animation: none; } }
.table-wrap:has(> table[hidden]) { display: none; }

/* Kopie i dziennik zdarzeń (B1–B2) */
.backup-state { margin: 0 0 8px; }
.backup-state .ico { width: 18px; height: 18px; color: var(--primary); vertical-align: -3px; margin-right: 4px; }
.events-table tr.ev-bad td { background: var(--red-bg); }
.events-table td .badge { margin: 0; }
#e-group { width: auto; min-width: 190px; }

/* ---------- paski nad aplikacją sklepu (płatność, komunikaty, wejście serwisowe) – Faza C ---------- */
.banners { display: flex; flex-direction: column; gap: 8px; margin: 0 0 20px; }
.banner { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 12px 16px; font-size: 14px; border: 1px solid; }
.banner[hidden] { display: none; }
.banner .ico { width: 20px; height: 20px; }
.banner-warn { background: var(--gold-bg); border-color: #EBDDA8; color: var(--gold-t); }
.banner-warn b, .banner-warn .grow { color: #5C4606; }
.banner-info { background: #EEF3FA; border-color: #CFDDF0; color: #2C4A72; }
.banner-service { background: var(--brown-bg); border-color: #E3D2C3; color: var(--brown-t); font-weight: 500; }
.banner-x { border: 0; background: none; font-size: 20px; line-height: 1; color: inherit; cursor: pointer; padding: 2px 6px; border-radius: 6px; opacity: .7; }
.banner-x:hover { opacity: 1; background: rgba(22, 24, 29, .06); }

/* ---------- panel właściciela: logowanie z Google Authenticator ---------- */
.qr-box { width: 220px; height: 220px; margin: 4px auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px; }
.qr-box svg { display: block; width: 100%; height: 100%; }
.secret { font-size: 14px; letter-spacing: .06em; word-break: break-all; background: var(--grey-bg); padding: 2px 6px; border-radius: 6px; }
.backup-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; margin: 6px 0 16px; padding-left: 28px; font-size: 16px; }
.backup-codes code { font-size: 16px; letter-spacing: .05em; }

/* ---------- panel właściciela: układ ---------- */
.nav-count { margin-left: auto; background: var(--red); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 600; min-width: 20px; height: 20px; line-height: 20px; padding: 0 6px; text-align: center; }
.nav-count:empty { display: none; }
.panel-body .tabs button { position: relative; }
.panel-body .top-right .me-btn { cursor: default; }
.panel-body .top-right .me-btn:hover { background: none; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .table-wrap.flat, .card.flush > table { margin: 0; }
.pad { padding: 16px; margin: 0; }
.pre { white-space: pre-line; overflow-wrap: anywhere; margin: 4px 0; }
.kvrow { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.kvrow:last-child { border-bottom: 0; }
.kvrow > span { color: var(--muted); flex-shrink: 0; }
.kvrow > b { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.kvrow .ico { width: 15px; height: 15px; vertical-align: -2px; }
.grid.clickable tbody tr { cursor: pointer; }
.grid tr.row-warn td { background: var(--gold-bg); }
.todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todo li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.todo li:hover, .todo li:focus-visible { border-color: var(--primary); }
.todo li .ico { width: 18px; height: 18px; }
.todo .todo-red { background: var(--red-bg); border-color: var(--red-line); color: var(--red); }
.todo .todo-warn { background: var(--gold-bg); border-color: #EBDDA8; color: #5C4606; }
.todo .todo-info { background: var(--card); color: var(--text2); }
.todo .todo-ok { background: var(--primary-bg); border-color: #C9D3AE; color: var(--primary-d); cursor: default; }

/* sklepy: rozwijane wiersze */
.shops-table .shop-row { cursor: pointer; }
.shops-table .shop-row.open td { background: var(--primary-bg); border-bottom-color: transparent; }
.shops-table .shop-row.demo .nm { color: var(--muted); }
.shops-table .ph .ico { width: 13px; height: 13px; vertical-align: -2px; }
.chev { color: var(--muted); font-size: 14px; }
.shops-table .badge + br + .badge, .shops-table td > br + .badge { margin-top: 4px; }
.shop-detail > td { padding: 0 16px 18px; background: var(--primary-bg); }
.shop-detail .detail-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.detail-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.detail-body { margin-top: 16px; }
.detail-body .grid { background: transparent; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font-size: 13px; }
details.more { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
details.more summary { cursor: pointer; font-weight: 500; font-size: 14px; color: var(--primary); }
details.more[open] summary { margin-bottom: 12px; }
details.more .form-row + .form-row { margin-top: 12px; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.55 var(--font); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; max-height: 55vh; overflow: auto; margin: 0; }
.ph-chips .chip { border: 0; cursor: pointer; font: inherit; font-size: 12.5px; }
.ph-chips .chip:hover { background: var(--primary-bg); color: var(--primary-d); }

/* faktury i kalendarz płatności */
.inv-table tr.inv-cancelled td { opacity: .55; }
.inv-table tr.inv-overdue td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.cal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cal li { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.cal li:hover { border-color: var(--primary); }
.cal li.cal-overdue { background: var(--red-bg); border-color: var(--red-line); }
.cal li.cal-expected { border-style: dashed; }
.cal-d { min-width: 96px; font-weight: 600; display: flex; flex-direction: column; line-height: 1.3; }
.cal-d small { font-weight: 400; color: var(--muted); font-size: 12px; }

/* zgłoszenia */
.ticket .card-head { align-items: flex-start; }
.ticket .card-head p { margin: 4px 0 0; }
.ticket-new { border-color: #EBDDA8; }
.ticket-answer { background: var(--primary-bg); border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.ticket-answer p { margin: 4px 0 0; }

@media (max-width: 820px) {
  .panel-body .tabs { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .panel-body .tabs::-webkit-scrollbar { display: none; }
  .panel-body .tabs button { flex: 0 0 68px; }
  .panel-body .nav-count { position: absolute; top: 2px; right: 10px; min-width: 16px; height: 16px; line-height: 16px; font-size: 10px; padding: 0 4px; }
  .panel-body .shop-box { display: none; }
  .shops-table thead { display: none; }
  .shops-table, .shops-table tbody, .shops-table tr, .shops-table td { display: block; width: 100%; }
  .shops-table .shop-row { position: relative; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .shops-table .shop-row td { border: 0; padding: 2px 0; }
  .shops-table .shop-row td.c-act { position: absolute; top: 12px; right: 14px; width: auto; }
  .shop-detail > td { padding: 0 8px 12px; }
  .shop-detail .detail-box { padding: 14px 12px; }
  .detail-acts .btn { flex: 1 1 calc(50% - 8px); }
  .subtabs { overflow-x: auto; }
  .subtabs button { flex: 0 0 auto; }
  .kvrow { flex-direction: column; gap: 2px; }
  .kvrow > b { text-align: left; }
  .backup-codes { grid-template-columns: 1fr; }
  .cal li { flex-wrap: wrap; }
  .copy-row { flex-direction: column; }
}
/* panel: podpis pola obok nazwy (nie w nowej linii) */
.panel-body .form label:not(.check) { display: block; }
.panel-body .form label:not(.check) > input, .panel-body .form label:not(.check) > select, .panel-body .form label:not(.check) > textarea { display: block; width: 100%; margin-top: 8px; }
.inv-table td.c-act { white-space: nowrap; }
.inv-table td.c-act .btn { margin-left: 4px; }
/* kolumny nie rozpychają strony na telefonie (szeroki wykres przewija się w swojej karcie) */
.cols2 > * { min-width: 0; }

/* Strona „Abonament”: dane do przelewu, zamrożenie, wstrzymany dostęp (28.10.2026) */
.pay-page { max-width: 880px; }
.pay-page h2 { font-size: 18px; margin: 24px 0 8px; }
.alert.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #D4DCBF; }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 10px 0 6px; }
.pay-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.pay-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pay-amount { font-size: 26px; font-weight: 700; margin: 6px 0 4px; color: var(--primary-d); }
.pay-amount small { font-size: 12px; font-weight: 400; color: var(--muted); }
.pay-data { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0 0; font-size: 14px; }
.pay-data dt { color: var(--muted); }
.pay-data dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.copy-v { font-weight: 600; word-break: break-word; }
.pay-hero { border-radius: var(--radius); padding: 20px 22px; margin: 6px 0 12px; border: 1px solid var(--line); background: var(--card); }
.pay-hero h1 { font-size: 26px; margin: 0 0 8px; }
.pay-hero.frozen { background: #EEF4F8; border-color: #CFDDE8; }
.pay-hero.frozen h1 { color: #24506E; text-transform: uppercase; letter-spacing: .02em; }
.pay-hero.blocked { background: var(--brown-bg); border-color: #E3D2C3; }
.pay-hero.blocked h1 { color: var(--brown-t); }
.pay-warn { color: var(--red); }
.inline-form { display: inline; margin-left: 8px; }
@media (max-width: 520px) { .pay-grid { grid-template-columns: 1fr; } .pay-data { grid-template-columns: 1fr; } .pay-data dt { margin-top: 4px; } }

/* ---------- 3.3: dostawa – poziomy dopasowania, filtry, pytanie „czy wysłano”, kalendarz, odświeżanie ---------- */
.btn.xs { height: auto; min-height: 28px; padding: 3px 10px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn.xs .ico { width: 13px; height: 13px; }
.btn.big { min-height: 48px; font-size: 16px; padding: 0 20px; }
.grid tr.sec td { background: var(--bg); padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.grid tr.sec:hover { background: none; }
.grid tr.sec b { font-size: 14px; }
.grid tr.sec .count { display: inline-block; min-width: 22px; padding: 0 7px; margin-left: 6px; border-radius: 999px; background: var(--grey-bg); color: var(--text3); font-size: 12px; text-align: center; }
.grid tr.sec-waiting td { background: var(--gold-bg); }
.grid tr.sec-close td, .grid tr.sec-maybe td { border-top: 2px dashed var(--line); }
.grid tr.sec-maybe b, .grid tr.sec-close b { color: var(--text3); font-weight: 600; }
tr.g-maybe:not(.sent) .c-name .nm { font-weight: 500; }
.mline { font-size: 13.5px; line-height: 1.45; margin-bottom: 6px; }
.mline .mwho { color: var(--muted); }
.mline .mprod { font-weight: 600; color: var(--text2); }
.mfix { margin-top: 4px; }
.lvl { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; vertical-align: 1px; text-transform: uppercase; letter-spacing: .02em; }
.lvl.ok { background: var(--primary-bg); color: var(--primary-d); }
.lvl.close { background: var(--brown-bg); color: var(--brown-t); }
.lvl.maybe { background: var(--grey-bg); color: var(--text3); border: 1px dashed var(--field); }
.map-to { color: var(--muted); font-size: 13px; }
.map-to b { color: var(--primary-d); }
.wait-more { border: 1px dashed var(--field); border-radius: 12px; padding: 10px 14px; background: var(--bg); }
.wait-more[open] { border-style: solid; border-color: #EBDDA8; background: var(--gold-bg); }
.wait-more summary { cursor: pointer; font-weight: 500; font-size: 14px; color: var(--text2); }
.wait-more summary small { color: var(--muted); font-weight: 400; }
.wait-more p { margin: 8px 0; }
.sent-q { gap: 10px; }
.sent-q .btn { flex: 1; justify-content: center; }
#modal-body .smsbox { margin: 8px 0 12px; }
.refresh-btn { background: none; border: 0; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.refresh-btn .ico { width: 16px; height: 16px; }
.refresh-btn.spin .ico { animation: kspin .8s linear infinite; }
@keyframes kspin { to { transform: rotate(360deg); } }
.cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.cal-bar .pill .ico { width: 14px; height: 14px; vertical-align: -2px; }
.month-nav.sm { margin: 0; gap: 6px; }
.month-nav.sm b { text-transform: capitalize; min-width: 140px; text-align: center; }
.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.mcal-h { font-size: 11.5px; color: var(--muted); text-align: center; font-weight: 500; padding-bottom: 2px; }
.mcal-d { border-radius: 9px; min-height: 50px; padding: 5px 6px; display: flex; flex-direction: column; justify-content: space-between; background: var(--grey-bg); }
.mcal-d.empty { background: none; }
.mcal-d .cd { font-size: 11px; color: var(--muted); }
.mcal-d .cv { font-size: 16px; font-weight: 600; text-align: right; color: var(--text3); }
.mcal-d.l0 .cv { color: #B4B8BE; font-weight: 500; }
.mcal-d.l1 { background: #E4EAD2; } .mcal-d.l2 { background: #CFD8B0; } .mcal-d.l3 { background: #A9BC5C; }
.mcal-d.l4 { background: var(--primary); } .mcal-d.l4 .cv, .mcal-d.l4 .cd { color: #fff; }
.mcal.brown .mcal-d.l1 { background: #F5EDE6; } .mcal.brown .mcal-d.l2 { background: #E8D5C4; } .mcal.brown .mcal-d.l3 { background: #C9A383; }
.mcal.brown .mcal-d.l4 { background: var(--brown); }
.mcal-d.today { outline: 2px solid var(--gold); outline-offset: -2px; }
.mcal-d.future { opacity: .45; }
@media (max-width: 820px) {
  #d-table tr.sec { padding: 12px; }
  .mcal { gap: 3px; }
  .mcal-d { min-height: 42px; padding: 4px; }
  .mcal-d .cv { font-size: 14px; }
  .cal-bar { flex-direction: column; align-items: stretch; }
  .month-nav.sm { justify-content: space-between; }
  .refresh-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); justify-content: center; }
  .refresh-btn span { display: none; }
}
.btn.xs { white-space: normal; text-align: left; }
@media (max-width: 820px) {
  #d-filters, #c-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  #d-filters select, #c-filters select { min-width: 0; width: 100%; font-size: 14px; }
  .tpl-picks { flex-direction: column; width: 100%; }
}

/* ---------- 4.0: propozycja dokładnego produktu przy wpisie z ręki ---------- */
.chip-exact { background: var(--primary-bg); color: var(--primary-d); }
.chip-exact .ico { width: 13px; height: 13px; margin-right: 1px; }
.ti-hint { margin: 8px 0 2px; padding: 10px 12px; border: 1px solid #D9E1C5; background: #F7F9F1; border-radius: 12px; font-size: 13px; }
.ti-hint[hidden] { display: none; }
.ti-hint-h { display: flex; gap: 8px; align-items: flex-start; color: var(--text2); margin-bottom: 8px; }
.ti-hint-h .ico { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--primary); }
.ti-hint-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.ti-hint-opts .btn small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.ti-hint-opts .btn { flex-direction: column; align-items: flex-start; gap: 0; text-align: left; padding-top: 5px; padding-bottom: 5px; }

/* =====================================================================
   3.4 – Pulpit, dzwoneczek, belka okresu próbnego, profile, foldery, podpowiedzi, abonament
   ===================================================================== */
.m-only { display: none !important; }
@media (max-width: 820px) { .m-only { display: inline-grid !important; } .appbar { display: none !important; } }

/* belka okresu próbnego na samej górze (jak „Your trial ends in…”) */
.trial-strip { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; text-align: center;
  margin: -40px -48px 24px; padding: 12px 24px; background: #EAF0F8; color: #233B5C; font-size: 14.5px; border-bottom: 1px solid #D6E0EE; }
.trial-strip b { color: #172C47; }
.trial-strip .btn.primary { background: #2F4F86; border-color: #2F4F86; }
.trial-strip .btn.primary:hover { background: #253F6C; border-color: #253F6C; }
@media (max-width: 820px) { .trial-strip { margin: -20px -16px 16px; padding: 8px 16px; font-size: 13px; gap: 6px 10px; } .trial-strip .ts-more { display: none; } .trial-strip .btn { padding: 5px 12px; font-size: 13px; } }

/* pasek nad treścią: dzwoneczek po prawej */
.appbar { display: flex; justify-content: space-between; align-items: center; min-height: 40px; margin: -16px 0 10px; }
.appbar-r { display: flex; gap: 8px; margin-left: auto; }
.bell-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text2);
  display: inline-grid; place-items: center; cursor: pointer; transition: background .15s; }
.bell-btn:hover { background: var(--grey-bg); }
.bell-btn .ico { width: 20px; height: 20px; }
.topbar .bell-btn { width: 36px; height: 36px; }
.bell-dot { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #D23B2A; color: #fff;
  font: 600 11px/18px var(--font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--card); }
.notif { position: fixed; z-index: 80; width: 380px; max-height: min(70vh, 560px); overflow: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 18px 40px rgba(22, 24, 29, .16); animation: fade .15s ease; }
.notif.sheet { left: 8px !important; right: 8px; width: auto; top: auto !important; bottom: calc(76px + env(safe-area-inset-bottom)); }
.notif-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line2); position: sticky; top: 0; background: var(--card); }
.notif ul { list-style: none; margin: 0; padding: 6px; }
.notif li { display: flex; gap: 10px; padding: 10px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; color: var(--text3); }
.notif li b { color: var(--text); font-size: 14px; }
.notif li + li { margin-top: 2px; }
.notif li.unread { background: #F6F8F0; }
.notif li.unread b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #D23B2A; margin-left: 6px; vertical-align: 2px; }
.notif .btn.xs { margin-top: 6px; }
.n-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--grey-bg); color: var(--text3); }
.n-ico .ico { width: 15px; height: 15px; }
.n-ok .n-ico { background: var(--primary-bg); color: var(--primary); }
.n-warn .n-ico { background: var(--gold-bg); color: var(--gold-t); }
.n-err .n-ico { background: var(--red-bg); color: var(--red); }
.n-info .n-ico { background: #EAF0F8; color: #2F4F86; }

/* Pulpit */
.attn { border-color: #EBDDA8; }
.attn h2 .ico { width: 20px; height: 20px; color: var(--gold-t); vertical-align: -3px; }
.attn h2 .count, .folder-btn .count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--grey-bg); font-size: 12.5px; font-weight: 600; color: var(--text2); margin-left: 4px; vertical-align: 2px; }
.attn-list { list-style: none; margin: 6px 0 0; padding: 0; }
.attn-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line2); font-size: 14.5px; }
.attn-list li:first-child { border-top: 0; }
.attn-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #6F8BB8; }
.attn-dot.red { background: #D23B2A; }
.attn-dot.warn { background: var(--gold); }
.attn-err { color: var(--text); }
.attn-x { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--text2); font-size: 20px; line-height: 1; cursor: pointer; }
.attn-x:hover, .attn-x:focus-visible { background: var(--grey-bg); color: var(--text); }
.attn-hidden { margin-top: 8px; text-align: right; }
.attn-ok { padding: 8px 20px; }
.attn-ok .kongo-says { margin: 6px 0; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.home-grid .card { margin: 0; }
.kpi-link { cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.kpi-link:hover { border-color: #C9D3AE; box-shadow: 0 4px 14px rgba(79, 100, 38, .08); }
.kpi-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.kv.green { color: var(--primary); }
.ks { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.plan-card .plan-name { font-size: 20px; font-weight: 700; color: var(--primary-d); margin: 4px 0 6px; }
.meter { height: 8px; border-radius: 4px; background: var(--grey-bg); overflow: hidden; margin: 8px 0 10px; }
.meter i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.work-mini { list-style: none; margin: 0 0 6px; padding: 0; }
.work-mini li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.work-mini li:last-child { border-bottom: 0; }
.err-t { color: var(--red); }
.tip-card .kongo-says { margin: 6px 0 0; }

/* podpowiedzi „?” i dymek z tekstem */
.help-i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--field); background: var(--card); color: var(--muted);
  font: 600 11px/1 var(--font); cursor: help; padding: 0; vertical-align: 1px; margin-left: 4px; flex: none; }
.help-i:hover, .help-i:focus-visible { border-color: var(--primary); color: var(--primary); }
.tip.help { pointer-events: none; background: #1F2A12; max-width: 320px; font-size: 13px; }
th .help-i { vertical-align: -3px; }

/* goryl w menu: wskazówki do przewijania, a schowany – zaprasza do kliknięcia */
.kp-bubble { padding: 10px 12px 10px 14px; }
.kp-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.kp-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .8; }
.kp-count { font-size: 11px; opacity: .65; margin-left: auto; margin-right: 24px; }
.kp-bubble p { margin: 0 0 8px; min-height: 3em; }
.kp-nav { display: flex; gap: 6px; justify-content: flex-end; }
.kp-nav button { border: 1px solid rgba(79, 100, 38, .25); background: rgba(255, 255, 255, .6); color: var(--primary-d); border-radius: 8px; font: 500 12px/1 var(--font); padding: 6px 9px; cursor: pointer; }
.kp-nav button:hover { background: #fff; }
.kp-call { display: none; }
.kongo-peek.quiet .kp-ape { height: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.kongo-peek.quiet .kp-ape img { height: 40px; width: 72px; object-fit: cover; object-position: top; transform: none; }
.kongo-peek.quiet .kp-call { display: block; font: 500 12px/1.2 var(--font); color: var(--primary-d); background: var(--primary-bg); border-radius: 999px; padding: 6px 12px; animation: kp-nudge 6s ease-in-out 2s infinite; }
.kongo-peek.quiet .kp-ape:hover .kp-call { background: #E3EAD0; }
@keyframes kp-nudge { 0%, 88%, 100% { transform: none; } 91% { transform: rotate(-4deg); } 94% { transform: rotate(4deg); } 97% { transform: rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .kongo-peek.quiet .kp-call { animation: none; } }

/* awatary */
.av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 13.5px; font-weight: 600; flex-shrink: 0; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-olive { background: var(--primary-bg); color: var(--primary-d); }
.av-brown { background: var(--brown-bg); color: var(--brown-t); }
.av-gold { background: var(--gold-bg); color: var(--gold-t); }
.av-blue { background: #E4ECF8; color: #2F4F86; }
.av-teal { background: #DFF2EE; color: #1D6B5C; }
.av-plum { background: #F0E6F3; color: #6E3B7E; }
.av-rose { background: #FBE7EA; color: #A2354A; }
.av-slate { background: #E6E9ED; color: #3D4651; }
.av-big { width: 84px; height: 84px; font-size: 28px; }
.prof-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.prof-btns { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.prof-btns label.btn { cursor: pointer; }
.av-colors { display: flex; gap: 6px; flex-wrap: wrap; }
.av-c { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.av-c[aria-pressed=true] { border-color: var(--text); }
.prof-cta { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 4px 0 6px; }
.users-table .av { width: 30px; height: 30px; font-size: 12px; display: inline-grid; vertical-align: middle; margin-right: 8px; }
.has-side .me-btn { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }

/* klienci: liczba SMS, foldery, przełącznik widoku */
.sms-n { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text3); margin-top: 5px; background: var(--grey-bg); border-radius: 999px; padding: 2px 9px; }
.sms-n .ico { width: 13px; height: 13px; }
.view-seg { display: inline-flex; border: 1px solid var(--field); border-radius: 10px; overflow: hidden; background: var(--card); }
.view-seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; font: 500 14px/1 var(--font); color: var(--text3); padding: 0 14px; min-height: 46px; cursor: pointer; }
.view-seg button + button { border-left: 1px solid var(--field); }
.view-seg button[aria-pressed=true] { background: var(--primary-bg); color: var(--primary-d); font-weight: 600; }
.view-seg .ico { width: 16px; height: 16px; }
.fold-all { display: inline-flex; gap: 4px; }
tr.folder-row td { padding: 0; background: #FAFBF7; border-bottom: 1px solid var(--line); }
tr.folder-row:hover td { background: #F4F6EE; }
.folder-btn { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; font: inherit; color: var(--text); padding: 14px 16px; cursor: pointer; text-align: left; }
.folder-btn .ico { width: 20px; height: 20px; color: var(--primary); }
.f-extra .folder-btn .ico { color: var(--muted); }
.folder-btn b { font-size: 15.5px; }
.folder-btn .chev { display: inline-block; width: 14px; font-size: 20px; line-height: 1; color: var(--muted); transition: transform .15s; }
tr.folder-row.open .chev { transform: rotate(90deg); }
.folder-btn .f-sms { margin-left: auto; }
.sms-d summary { cursor: pointer; list-style: none; }
.sms-d summary::-webkit-details-marker { display: none; }
.sms-d summary::before { content: "›"; display: inline-block; width: 14px; color: var(--muted); transition: transform .15s; }
.sms-d[open] summary::before { transform: rotate(90deg); }
.sms-d .smsbox { margin: 6px 0 4px 14px; }

/* czas pracy: wpisy, które wyglądają na błąd */
.issues { border-color: var(--red-line); background: #FFFBFA; }
.issues-h { display: flex; gap: 12px; align-items: flex-start; }
.issues-h > .ico { width: 22px; height: 22px; color: var(--red); flex: none; margin-top: 2px; }
.issues ul { list-style: none; margin: 10px 0 0; padding: 0; }
.issues li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--red-line); font-size: 14px; }
.issues li > span { display: flex; flex-direction: column; gap: 2px; }
tr.bad td { background: var(--red-bg); }

/* abonament: plany, podsumowanie, wiersze do kopiowania, zamrożenie */
.pay-status { display: flex; flex-wrap: wrap; gap: 10px 32px; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 12px 0 8px; }
.pay-status > div { display: flex; flex-direction: column; }
.pay-status b { font-size: 19px; }
.pay-status p { flex-basis: 100%; margin: 0; color: var(--text3); }
.pay-status.st-trial { background: #EAF0F8; border-color: #D6E0EE; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0 14px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 4px; border: 2px solid var(--line); border-radius: 16px; padding: 20px; background: var(--card); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.plan input { position: absolute; opacity: 0; }
.plan:hover { border-color: #C9D3AE; }
.plan.on { border-color: var(--primary); box-shadow: 0 6px 20px rgba(79, 100, 38, .12); }
.plan:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.plan-year { background: linear-gradient(180deg, #F7F9F1, var(--card) 55%); }
.plan-badge { position: absolute; top: -12px; right: 16px; background: var(--gold); color: #3B2C02; font-size: 12.5px; font-weight: 700; padding: 3px 11px; border-radius: 999px; }
.plan-name { font-weight: 600; color: var(--text2); }
.plan-price b { font-size: 34px; line-height: 1.1; color: var(--primary-d); }
.plan-price span { color: var(--muted); }
.plan-gross { font-size: 13px; color: var(--muted); }
.plan-per { font-size: 13.5px; color: var(--text3); margin-top: 4px; }
.plan-gift { font-size: 13px; color: var(--primary-d); background: var(--primary-bg); border-radius: 8px; padding: 6px 9px; margin-top: 6px; }
.pay-sum { background: var(--bg); border-radius: 12px; padding: 10px 14px; margin: 10px 0 14px; }
.ps-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14px; color: var(--text3); }
.ps-row.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 9px; font-size: 17px; font-weight: 700; color: var(--text); }
.pay-h { font-size: 15px; margin: 6px 0 8px; padding: 0; }
.copy-rows { display: flex; flex-direction: column; gap: 8px; }
.copy-row { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card);
  border-radius: 12px; padding: 10px 12px; font: inherit; color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; }
.copy-row:hover { border-color: #C9D3AE; background: #FAFBF6; }
.copy-row .cr-l { font-size: 13px; color: var(--muted); }
.copy-row .cr-v { font-weight: 500; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.copy-row.big .cr-v { font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.copy-row .cr-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--primary); background: var(--primary-bg); border-radius: 8px; padding: 6px 10px; white-space: nowrap; }
.copy-row .cr-btn .ico { width: 14px; height: 14px; }
.copy-row.copied { border-color: var(--primary); background: var(--primary-bg); }
.copy-all { width: 100%; margin: 12px 0 6px; }
.pay-box .pay-head { margin-bottom: 2px; }
.freeze-sec { margin-top: 34px; background: #F1F6FA; border: 1px solid #D6E3EC; border-radius: 18px; padding: 22px 24px; }
.freeze-sec h2 { margin-top: 0; color: #24506E; }
.freeze-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.ticks { list-style: none; padding: 0; margin: 10px 0; }
.ticks li { position: relative; padding-left: 26px; margin: 8px 0; font-size: 14.5px; }
.ticks li::before { content: "✓"; position: absolute; left: 2px; top: 0; color: var(--primary); font-weight: 700; }
.compare { display: flex; flex-direction: column; gap: 10px; }
.cmp { border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.cmp.bad { background: var(--red-bg); color: var(--red); }
.cmp.good { background: #fff; border: 2px solid #9FBCD0; color: #24506E; }
.freeze-form { margin-top: 10px; border-top: 1px solid #D6E3EC; padding-top: 12px; }
@media (max-width: 680px) {
  .plans, .freeze-grid { grid-template-columns: 1fr; }
  .plans { gap: 22px; }
  .copy-row { grid-template-columns: 1fr auto; }
  .copy-row .cr-l { grid-column: 1 / -1; margin-bottom: -6px; }
  .freeze-sec { padding: 18px 16px; }
}

/* drobne poprawki wyglądu (3.4) */
.page-head h1 { letter-spacing: -.01em; }
.grid thead th { background: #FBFBF9; }
.grid th:first-child { border-top-left-radius: var(--radius); }
.toolbar input[type=search] { background-image: none; }
.kpi { transition: border-color .15s; }
@media (max-width: 820px) {
  .tabs button { font-size: 10.5px; padding: 6px 0; }
  .tabs button .sm { overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
  .home-grid { grid-template-columns: 1fr; gap: 14px; }
  .attn-list li { flex-wrap: wrap; }
  .attn-list li .btn { margin-left: 22px; }
  #c-table tr.folder-row { padding: 0; }
  #c-table tr.folder-row td { padding: 0; }
  .view-seg { flex: 1; }
  .view-seg button { flex: 1; justify-content: center; }
  .issues li { flex-direction: column; align-items: stretch; }
  .topbar .top-right { gap: 8px; }
  .has-side .topbar .me-btn { width: auto; border: 0; padding: 0; flex: none; }
  .topbar .top-right > * { flex: none; }
  .notif li { font-size: 14px; }
}

/* 3.5: godziny otwarcia wybierane z listy */
.week-ed { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.wk-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line2); }
.wk-row .check { min-width: 140px; font-weight: 600; }
.wk-times { display: inline-flex; align-items: center; gap: 6px; }
.wk-times select { width: auto; min-width: 92px; }
.wk-row .wk-closed { display: none; }
.wk-row.off .wk-times { display: none; }
.wk-row.off .wk-closed { display: inline; }
.hours-cols { align-items: start; }
.hours-cols h3 { margin: 0 0 8px; font-size: 15px; }
#s-hours-card.flash { box-shadow: 0 0 0 3px var(--gold); transition: box-shadow .3s; }
.w-hours { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; }
/* 3.5: sprawdzenie miesiąca */
.m-check { margin-top: 14px; border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.m-check.ok { display: flex; gap: 10px; align-items: flex-start; background: var(--ok-bg); color: var(--ok); }
.m-check.ok > .ico { width: 20px; height: 20px; flex: none; }
.m-check.bad { background: #FFFBFA; border: 1px solid var(--red-line); }
.m-check.bad .issues-h > .ico { width: 22px; height: 22px; color: var(--red); flex: none; }
.m-check ul { list-style: none; margin: 10px 0 0; padding: 0; }
.m-check li { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--red-line); }
.m-check li > span:first-child { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.issues.warn { border-color: #EAD9A6; background: #FFFCF2; }
.issues.warn .issues-h > .ico { color: var(--gold-t); }
.issues.warn .issues-h { align-items: center; }
.issues.warn .issues-h > div { flex: 1; }
.list-dots { margin: 6px 0 10px; padding-left: 20px; }
/* Moje konto: przyciski nie wychodzą poza okno (zawijają się) */
.modal-actions { flex-wrap: wrap; }
.me-foot { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.per-btns { display: inline-flex; gap: 6px; align-items: center; flex: none; }

/* --- Rejestracja i logowanie e-mailem / Google (3.8.0) --- */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.reg-box { gap: 22px; }
.reg-form select { width: 100%; }
.reg-form .reg-info { margin: 0; line-height: 1.5; }
.reg-code summary { cursor: pointer; font-size: 14px; color: var(--primary); font-weight: 600; }
.reg-code[open] summary { margin-bottom: 12px; }
.pass-wrap { position: relative; display: block; }
.pass-wrap input { width: 100%; padding-right: 48px; }
.pass-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; font-size: 18px; padding: 6px; opacity: .6; }
.pow-state { margin: -8px 0 0; text-align: center; }
.reg-tips { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text2); }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.google-btn .g-ico { font-weight: 800; font-size: 18px; color: #4285f4; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: -6px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.reg-cta { font-size: 15px; }
.promo-form { margin: 0 0 18px; }
.promo-form label { display: flex; flex-direction: column; gap: 8px; font-weight: 600; font-size: 14px; }
.promo-row { display: flex; gap: 8px; max-width: 420px; }
.promo-row input { flex: 1; min-width: 0; }
.promo-on { margin: 0 0 18px; }

/* SMS z telefonu przez kod QR (3.8.0) */
.sms-qr { display: flex; gap: 16px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 8px 0 10px; }
.sms-qr .qr-img { flex: none; width: 190px; background: #fff; border-radius: 8px; line-height: 0; }
.sms-qr .qr-img svg { width: 100%; height: auto; display: block; }
.sms-qr ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
@media (max-width: 560px) { .sms-qr { flex-direction: column; align-items: stretch; } .sms-qr .qr-img { width: 220px; margin: 0 auto; } }

/* ---- 3.9: Kupił, refundacje NFZ, efektywność, rodzaj sklepu ---- */
.kp-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kp-count { white-space: nowrap; flex: none; }
.alert.info { background: var(--primary-bg); color: var(--primary-d); border: 1px solid #D5DEBE; }
.alert .ico, .bought .ico { width: 15px; height: 15px; vertical-align: -3px; }
.bought { display: block; margin-top: 4px; font-size: 12.5px; color: var(--text3); }
.bought.recent { color: var(--primary-d); background: var(--primary-bg); border-radius: 8px; padding: 3px 8px; display: inline-block; }
.btn.buy-act { color: var(--primary-d); }
button.badge.nfz { border: 0; font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; }
.badge.nfz .ico { width: 13px; height: 13px; }
.badge.nfz.due { background: var(--gold-bg); color: var(--gold-t); }
.badge.nfz.ok { background: var(--primary-bg); color: var(--primary-d); }
.badge.nfz.off { background: var(--grey-bg); color: var(--muted); }
.mchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mchip { font-size: 11.5px; border-radius: 6px; padding: 2px 6px; background: var(--grey-bg); color: var(--muted); }
.mchip.ok { background: var(--primary-bg); color: var(--primary-d); font-weight: 600; }
.mchip.lost { background: var(--red-bg); color: var(--red); text-decoration: line-through; }
.mchip.now { background: var(--gold-bg); color: var(--gold-t); font-weight: 600; }
.nfz-list li { align-items: flex-start; }
.history.buys li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.history.buys .buy-items { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 10px; }
.history.buys .buy-item { display: inline-flex; align-items: center; gap: 4px; }
#f-buy .b-none { margin-top: 2px; }
#f-buy .taginput.disabled { opacity: .45; pointer-events: none; }
#f-buy .b-sum { color: var(--muted); margin: 4px 0 0; }
.shop-kind { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; line-height: 1.3; }
.shop-type-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.badge.kind { margin-left: 4px; }
.badge.kind.nic { background: var(--brown-bg); color: var(--brown-t); }
.badge.kind.lf { background: var(--gold-bg); color: var(--gold-t); }
.badge.kind.shot { background: var(--grey-bg); color: var(--text3); }
.name-props { margin: 4px 0 12px; }
.np-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.np { text-align: left; border: 1px solid var(--field); background: var(--card); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 14px; cursor: pointer; color: var(--text); }
.np small { color: var(--muted); margin-left: 6px; }
.np.best { border-color: var(--primary); background: var(--primary-bg); }
.np.best small { color: var(--primary-d); font-weight: 600; }
.np.on, .np:hover { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-bg); }
.effect-hero { display: flex; gap: 16px; align-items: flex-start; }
.effect-hero h2 { margin: 0 0 4px; }
.effect-hero .pills { margin-top: 10px; }
.effect-kpis .kpi.big .kv { font-size: 34px; }
.effect-low h2 .ico { width: 20px; height: 20px; vertical-align: -3px; }
.steps-mini { margin: 8px 0; padding-left: 22px; line-height: 1.6; }
.steps-mini .ico { width: 15px; height: 15px; vertical-align: -3px; }
.effect-nfz .kpis { margin: 10px 0; }
@media (max-width: 600px) { .effect-hero { flex-direction: column; } .effect-hero .hero-ape { display: none; } }

/* 3.11.0 – płatność online (Paynow) i dane do faktury na stronie Abonament */
.pay-online { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 6px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.pay-online .btn.big { width: 100%; }
.pay-online .btn[disabled] { opacity: .5; cursor: not-allowed; }
.inv-data { margin: 0 0 22px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.inv-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; }
.inv-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; min-width: 0; }
.inv-form .row-actions { grid-column: 1 / -1; }
.alert.info { background: var(--card); color: var(--text); border: 1px solid var(--line); }

/* 3.13.0 – Pierwsze kroki, szybkie odpowiedzi, import klientów, ankieta, panel: kody i błędy */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.steps-card .card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.steps-card h2 .count { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.steps { list-style: none; margin: 6px 0 0; padding: 0; }
.steps li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line2); }
.steps li:first-child { border-top: 0; }
.steps .grow { flex: 1; min-width: 0; }
.step-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; margin-top: 1px; }
.steps li.done .step-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.steps li.done b { color: var(--muted); font-weight: 500; text-decoration: line-through; }
.steps li.next .step-dot { border-color: var(--primary); }
.step-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 600px) { .steps li { flex-wrap: wrap; } .step-btns { width: 100%; justify-content: flex-start; padding-left: 34px; } }
.faq-quick { border: 1px solid #C9D3AE; background: var(--primary-bg); border-radius: 12px; padding: 10px 12px; }
.faq-h { font-weight: 600; font-size: 14px; color: var(--primary-d); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.faq-h .ico { width: 16px; height: 16px; }
.faq-item { border-top: 1px solid var(--line); padding: 6px 0; }
.faq-quick .faq-item:first-of-type { border-top: 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 2px 0; }
.faq-a { font-size: 14px; line-height: 1.5; margin: 6px 0 4px; }
.faq-act { margin: 6px 0 2px; }
.faq-all { margin-top: 16px; font-size: 14px; }
.faq-all > summary { cursor: pointer; color: var(--muted); }
.faq-all .faq-item { padding-left: 4px; }
.imp-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 12px; margin: 10px 0; }
.imp-map label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.imp-prev { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.survey-opts { border: 0; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 6px; }
.survey-opt { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); }
.leave-link { margin-top: 26px; color: var(--muted); }
.leave-link a { color: var(--muted); }
.h-sec { font-size: 18px; margin: 28px 0 10px; }
.churn-sum { margin: 0 0 12px; }
.err-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow: auto; }
.err-row { border-left: 3px solid var(--red); padding: 4px 10px; word-break: break-word; }
.all-od[hidden], .all-custom[hidden] { display: none; }
