/* ==========================================================================
   Portal zamówień Grodno x King Promotion
   Baza: wytyczne identyfikacji Grodno (Print Guide): granat, neonowy niebieski,
   żółty neon jako akcent (max 10%), jasny niebieski tylko na ciemnym tle, zimny szary jako tło.
   Dopełnienie King Promotion: sygnatura "obsługuje", miętowe logo, etykiety mono, siatka 8 pt, promienie.
   Czcionka: Grodno używa Proxima Nova (Light / Regular / Extrabold / Black). Tu zamiennik Montserrat.
   ========================================================================== */
:root {
  /* Grodno */
  --navy: #0d173a;
  --navy-deep: #02021e;
  --neon: #4948ff;
  --neon-light: #8d8dff;      /* tylko na ciemnym tle */
  --yellow: #fee600;          /* tylko akcent, do 10% ekranu */
  --gray-cool: #f0f0f2;
  /* pochodne (kontrasty sprawdzone względem bieli / szarości) */
  --ink: #0d173a;
  --ink-2: #4a5070;
  --ink-3: #6a7090;
  --line: #dcdde6;
  --field-line: #7d829c;   /* obramowania pól formularza: kontrast 3,8:1 na bieli (WCAG 1.4.11) */
  --card: #ffffff;
  --neon-hover: #3a39e0;
  --neon-tint: #ececff;
  --ok: #17734a;
  --ok-tint: #e3f4ec;
  --warn-tint: #fff8b8;
  --bad: #b3261e;
  --bad-tint: #fbe6e4;
  /* King Promotion */
  --kp-mint: #75dab4;
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px;
  --font: 'Proxima Nova', 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --shadow: 0 1px 2px rgb(13 23 58 / 0.06), 0 6px 20px -8px rgb(13 23 58 / 0.14);
  --side: 272px;
}
/* Kolorystyka King Promotion (decyzja Konrada 03.11): wszyscy poza kontami Grodna (app.js applyTheme) — ten sam jasny układ, inne zmienne.
   Mięta #4fd9a6 i grafit #14181f jak w szablonie ofert z WYCEN; mięta jako tekst/tło pod białym tekstem za jasna (kontrast ~1,7:1),
   więc linki, przyciski i aktywne menu w ciemnej mięcie #0e7a5a (biel na niej i ona na bieli ~5,4:1, WCAG AA), jasna mięta jako akcent (dawny żółty). */
html[data-theme="kp"] {
  --navy: #14181f;
  --navy-deep: #0b0f14;
  --neon: #0e7a5a;
  --neon-light: #4fd9a6;      /* na ciemnym tle */
  --yellow: #4fd9a6;          /* akcent */
  --gray-cool: #f4f6f5;
  --ink: #14181f;
  --ink-2: #4b5563;
  --ink-3: #6b7280;
  --line: #e1e5e3;
  --field-line: #7b8580;
  --neon-hover: #0b6349;
  --neon-tint: #e3f7ef;
  --kp-mint: #4fd9a6;
  --shadow: 0 1px 2px rgb(20 24 31 / 0.06), 0 6px 20px -8px rgb(20 24 31 / 0.14);
}
html[data-theme="kp"] .pill.info { color: #0b6349; }
html[data-theme="kp"] .btn.accent:hover { background: #6fe3b8; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-weight: 400; font-size: 15px; line-height: 1.5;
  color: var(--ink); background: var(--gray-cool); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-weight: 800; font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.01em; }
h1 .light { font-weight: 300; }
h2 { font-weight: 800; font-size: 18px; letter-spacing: -0.005em; }
h3 { font-weight: 800; font-size: 15px; }
p { margin: 0; }
a { color: var(--neon); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--neon); outline-offset: 2px; border-radius: var(--radius-sm); }
.dark :focus-visible, .side :focus-visible, .hero :focus-visible { outline-color: var(--neon-light); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--navy); padding: 8px 12px; z-index: 100; font-weight: 800; }
.skip:focus { left: 8px; }
.mono-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.yellow-bar { display: block; width: 40px; height: 5px; background: var(--yellow); margin-bottom: 14px; border-radius: 1px; }


/* układ */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: calc(100vh - 34px); }
.side { background: var(--navy); color: #fff; padding: 22px 16px 16px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; align-self: start; overflow-y: auto; }
.brand { padding: 4px 8px 0; }
.brand img { display: block; height: 44px; width: auto; }
.nav { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--radius-md); color: rgb(255 255 255 / 0.86); text-decoration: none; font-weight: 400; }
.nav a:hover { background: rgb(255 255 255 / 0.08); color: #fff; }
.nav a[aria-current="page"] { background: var(--neon); color: #fff; font-weight: 800; }
.nav svg { width: 20px; height: 20px; flex: none; }
.nav .badge { margin-left: auto; background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 12px; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px; }
.nav-group { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--neon-light); padding: 10px 12px 4px; }
.kp-sign { margin-top: auto; background: var(--gray-cool); color: var(--ink); border-radius: var(--radius-lg); padding: 14px 14px 12px; }
.kp-sign .mono-label { display: block; margin-bottom: 8px; }
.kp-sign img { display: block; height: 30px; width: auto; }
.kp-sign p { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.main-col { display: flex; flex-direction: column; min-width: 0; }
.top { display: flex; align-items: center; gap: 14px; padding: 14px 32px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.top .spacer { flex: 1; }
.acct, .acct-menu { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.top .acct { margin-left: auto; }   /* po zawinięciu paska (personel: wybór klienta) przyciski konta zostają przy prawej krawędzi, lista „Konto” nie wychodzi poza ekran */
.acct .acct-btn { display: none; }
.menu-btn { display: none; background: var(--navy); color: #fff; border: 0; border-radius: var(--radius-md); width: 42px; height: 42px; cursor: pointer; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.who b { display: block; font-weight: 800; line-height: 1.2; }
.who span { display: block; font-size: 12.5px; color: var(--ink-2); }
.role-switch { display: flex; align-items: center; gap: 8px; background: var(--gray-cool); border: 1px dashed var(--ink-3); border-radius: var(--radius-md); padding: 4px 8px 4px 10px; }
.role-switch label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.role-switch select { min-width: 0; border: 0; background: transparent; font-weight: 800; padding: 6px 4px; cursor: pointer; max-width: 240px; }
main { padding: 32px; flex: 1; outline: none; max-width: 1320px; width: 100%; margin: 0 auto; }
.foot { padding: 20px 32px 28px; color: var(--ink-2); font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); background: var(--card); }
.foot img { height: 16px; width: auto; }

/* nagłówek strony */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { color: var(--ink-2); margin-top: 6px; max-width: 62ch; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* przyciski */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: var(--radius-md); border: 2px solid transparent; font-weight: 800; cursor: pointer; text-decoration: none; background: var(--neon); color: #fff; white-space: nowrap; }
.btn:hover { background: var(--neon-hover); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn.ghost:hover { background: var(--navy); color: #fff; }
.btn.accent { background: var(--yellow); color: var(--navy); }
.btn.accent:hover { background: #ffee40; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
/* długi napis (np. „Zapytaj swojego opiekuna o Twoją cenę”) łamie się w wąskiej karcie zamiast wychodzić poza przycisk */
.btn.btn-wrap { white-space: normal; text-align: center; line-height: 1.25; padding-top: 6px; padding-bottom: 6px; max-width: 100%; }
.btn svg { width: 18px; height: 18px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--neon); cursor: pointer; font-weight: 800; text-decoration: underline; }
/* 50d: na ekranach dotykowych przyciski-linki mają cel dotyku ≥ 40 px (dotąd 18-20 px: „Inny wymiar lub nakład”, „Edytuj”, „Wyłącz”) */
@media (pointer: coarse) { .link-btn:not(label) { min-height: 40px; padding: 0 6px; display: inline-flex; align-items: center; } }

/* karty i siatki */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid > .card + .card { margin-top: 0; }
.hero { background: var(--navy); color: #fff; border-radius: var(--radius-xl); padding: 32px; margin-bottom: 24px; position: relative; overflow: hidden; }
.hero h1 { color: #fff; }
.hero p { color: rgb(255 255 255 / 0.82); margin-top: 8px; max-width: 60ch; font-weight: 300; font-size: 16px; }
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgb(73 72 255 / 0.55), transparent 70%); pointer-events: none; }
.hero .actions { margin-top: 20px; position: relative; z-index: 1; }
.hero .btn.ghost { color: #fff; border-color: rgb(255 255 255 / 0.6); }
.hero .btn.ghost:hover { background: #fff; color: var(--navy); }
.kpi .value { font-weight: 900; font-size: 34px; letter-spacing: -0.02em; line-height: 1; margin-top: 8px; }
.kpi .hint { font-size: 13px; color: var(--ink-2); margin-top: 6px; }

/* tabele */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; padding: 10px 12px; border-bottom: 2px solid var(--navy); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: #f7f7fb; }
td.right, th.right { text-align: right; }
tfoot td { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--navy); }
.row-link { color: var(--navy); font-weight: 800; text-decoration: none; white-space: nowrap; }
.row-link:hover { color: var(--neon); text-decoration: underline; }

/* odznaki statusów (tekst + ikona/kolor, nie sam kolor) */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-tint); color: var(--ok); }
.pill.low { background: var(--warn-tint); color: #5c4b00; }
.pill.out { background: var(--bad-tint); color: var(--bad); }
.pill.info { background: var(--neon-tint); color: #2a29c4; }
.pill.grey { background: #e6e7ee; color: var(--ink-2); }
.tag { display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 6px; color: var(--ink-2); background: #fff; }

/* katalog */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.search { position: relative; flex: 1; min-width: 220px; }
.search input { width: 100%; height: 44px; border-radius: var(--radius-md); border: 1px solid var(--field-line); padding: 0 14px 0 42px; background: #fff; }
.search svg { position: absolute; left: 12px; top: 12px; width: 20px; height: 20px; color: var(--ink-3); }
.scope-tabs { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.scope-tab { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 240px; border: 2px solid var(--line); background: #fff; border-radius: var(--radius-lg); padding: 12px 16px; cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.scope-tab svg { width: 22px; height: 22px; flex: none; color: var(--ink-3); }
.scope-tab span { display: block; font-weight: 800; }
.scope-tab small { display: block; font-weight: 400; color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.scope-tab[aria-selected="true"] { border-color: var(--neon); background: var(--neon-tint); }
.scope-tab[aria-selected="true"] svg { color: var(--neon); }
.scope-tab:hover { border-color: var(--navy); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.dept-group { flex: 1 1 100%; display: flex; flex-direction: column; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.chips > .dept-group:first-of-type { border-top: 0; padding-top: 0; }
.dept-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.dept-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 400; }
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 800; }
.view-switch { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; padding: 2px; flex: none; }
.view-btn { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-3); cursor: pointer; }
.view-btn svg { width: 19px; height: 19px; }
.view-btn:hover { color: var(--ink); background: var(--gray-cool); }
.view-btn[aria-pressed="true"] { background: var(--navy); color: #fff; }
.products { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.products.view-small { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.products.view-small .thumb { height: 84px; }
.products.view-small .thumb svg { width: 30px; height: 30px; }
.products.view-small .body { padding: 12px; gap: 5px; }
.products.view-small h3 { font-size: 13.5px; }
.products.view-small .spec { font-size: 12px; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.products.view-small .price { font-size: 15px; }
.products.view-small .ext-links { display: none; }
.products.view-small .buy { flex-direction: column; align-items: stretch; gap: 6px; }
.products.view-small .qty { justify-content: center; }
.products.view-small .qty button { width: 28px; height: 32px; }
.products.view-small .qty input { width: 36px; height: 32px; }
.products.view-small .btn.small { width: 100%; min-height: 32px; padding: 0 8px; }
.product { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.product .thumb { background: var(--navy); color: var(--neon-light); height: 130px; display: grid; place-items: center; position: relative; }
.product .thumb svg { width: 44px; height: 44px; }
.product .thumb .tag { position: absolute; left: 12px; top: 12px; background: rgb(255 255 255 / 0.1); border-color: rgb(255 255 255 / 0.3); color: #fff; }
.product .thumb.has-img { background: #eef0f4; overflow: hidden; }
.product .thumb.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.product .thumb.has-img .tag { background: var(--navy); border-color: var(--navy); }
.product .thumb img.thumb-alt { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; animation: kp-thumb-swap 9s ease-in-out infinite; }
@keyframes kp-thumb-swap { 0%, 42% { opacity: 0; } 50%, 92% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .product .thumb img.thumb-alt { animation: none; } }
.price.catprice { font-size: 15px; }
.price.catprice small { display: block; font-size: 11.5px; line-height: 1.3; font-weight: 400; color: var(--muted, #6b7280); }
/* miniatury ze zdjeciem: proporcje 4:3 jak same obrazy, zeby wysokie produkty nie byly ucinane */
.product .thumb.has-img, .product .thumb.has-photo { height: auto; aspect-ratio: 4 / 3; }
.products.view-small .product .thumb.has-img, .products.view-small .product .thumb.has-photo { aspect-ratio: auto; height: 84px; }
/* has-photo: prawdziwe zdjęcie produktu z katalogu (API) - inne proporcje niż
   wygenerowane zdjęcia kategorii, więc "contain" zamiast "cover" (bez ucinania produktu). */
.product .thumb.has-photo { background: #fff; overflow: hidden; }
.product .thumb.has-photo img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; display: block; }
.product .thumb.has-photo .tag { background: var(--navy); border-color: var(--navy); }
.product .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product h3 { font-size: 15px; }
.product .spec { color: var(--ink-2); font-size: 13px; flex: 1; }
.product .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 900; font-size: 18px; }
.price small { font-weight: 400; color: var(--ink-2); font-size: 12px; }
.buy { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.ext-links { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.ext-links .link-btn { font-size: 12px; font-weight: 400; }
/* widok listy */
.products.view-list { display: flex; flex-direction: column; gap: 10px; }
.product-row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; padding: 10px 16px; }
.product-row .thumb { flex: none; width: 56px; height: 56px; border-radius: var(--radius-sm, 6px); background: var(--navy); color: var(--neon-light); display: grid; place-items: center; position: relative; overflow: hidden; }
.product-row .thumb svg { width: 26px; height: 26px; }
.product-row .thumb.has-img { background: #eef0f4; }
.product-row .thumb.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-row .thumb.has-photo { background: #fff; border: 1px solid var(--line); }
.product-row .thumb.has-photo img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: contain; }
.product-row .row-main { flex: 1 1 320px; min-width: 200px; }
.product-row .row-main h3 { font-size: 14.5px; margin: 1px 0; }
.product-row .row-main .spec { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-row .row-main .ext-links { flex-direction: row; gap: 12px; margin-top: 3px; }
.product-row .row-meta { flex: none; display: flex; align-items: center; gap: 12px; }
.product-row .row-meta .price { font-size: 15px; white-space: nowrap; }
.product-row .row-buy { flex: none; }
.product-row .buy { margin-top: 0; }
@media (max-width: 700px) {
  .product-row { flex-wrap: wrap; }
  .product-row .row-meta, .product-row .row-buy { margin-left: 72px; }
}
.qty { display: inline-flex; align-items: center; border: 1px solid var(--field-line); border-radius: var(--radius-md); background: #fff; }
.qty button { width: 34px; height: 40px; border: 0; background: transparent; font-size: 18px; cursor: pointer; font-weight: 800; }
.qty button:hover { background: var(--gray-cool); }
.qty input { width: 52px; height: 40px; border: 0; text-align: center; background: transparent; font-weight: 800; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.notice { border-left: 5px solid var(--yellow); background: var(--navy); color: #fff; border-radius: var(--radius-md); padding: 14px 16px; font-size: 14px; }
.notice.light { background: #fff; color: var(--ink); border: 1px solid var(--line); border-left: 5px solid var(--yellow); }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-2); }

/* formularze */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field[hidden] { display: none; }   /* 47: ukryte pole (np. link do plików przy „później”) nie może się pokazywać mimo display:flex */
.field label { font-weight: 800; font-size: 13.5px; }
.field input, .field select, .field textarea { border: 1px solid var(--field-line); border-radius: var(--radius-md); padding: 10px 12px; background: #fff; min-height: 42px; width: 100%; }
.field textarea { min-height: 96px; resize: vertical; }
.field .help { font-size: 12.5px; color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
/* 51: kreator - sekcja zwinięta „Więcej opcji” (makieta-kreator-v2.html details.fold) */
.kr-more { border: 1px solid var(--line); border-radius: var(--radius-md); margin: 4px 0 14px; background: #fff; }
.kr-more > summary { list-style: none; cursor: pointer; padding: 10px 14px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.kr-more > summary::-webkit-details-marker { display: none; }
.kr-more .in, .kr-more-in { padding: 0 14px 10px; }
.kr-more .field:first-child { margin-top: 10px; }

/* oś statusu */
.steps { display: flex; gap: 0; margin: 4px 0 8px; padding: 0; list-style: none; }
.steps li { flex: 1; text-align: center; position: relative; font-size: 12.5px; color: var(--ink-3); padding-top: 26px; }
.steps li::before { content: ''; position: absolute; left: 50%; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--line); transform: translateX(-50%); z-index: 1; }
.steps li::after { content: ''; position: absolute; left: -50%; top: 12px; width: 100%; height: 3px; background: var(--line); }
.steps li:first-child::after { display: none; }
.steps li.done { color: var(--ink); font-weight: 800; }
.steps li.done::before { background: var(--neon); border-color: var(--neon); }
.steps li.done::after { background: var(--neon); }
.steps li.now::before { box-shadow: 0 0 0 5px rgb(73 72 255 / 0.2); }

/* stany */
.bar { position: relative; height: 10px; background: #e6e7ee; border-radius: 5px; min-width: 100px; overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--neon); border-radius: 5px; }
.bar.low > i { background: var(--yellow); box-shadow: inset 0 0 0 1px rgb(13 23 58 / 0.25); }
.bar.out > i { background: var(--bad); }

/* lista uprawnień */
.perm-list { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.perm-list label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.perm-list input { width: 18px; height: 18px; accent-color: var(--neon); }

/* wykres */
.chart-row { display: grid; grid-template-columns: 150px 1fr 96px; gap: 12px; align-items: center; padding: 6px 0; font-size: 14px; }
.chart-row .bar { height: 16px; border-radius: 4px; }
.chart-row .bar > i { border-radius: 4px; }

/* okno modalne */
.modal-root { position: fixed; inset: 0; display: none; place-items: center; background: rgb(2 2 30 / 0.6); z-index: 60; padding: 16px; }
.modal-root.open { display: grid; }
.modal { background: #fff; border-radius: var(--radius-xl); width: min(640px, 100%); max-height: 92vh; overflow: auto; padding: 26px; box-shadow: 0 30px 80px -20px rgb(2 2 30 / 0.6); }
.modal h2 { margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: var(--radius-md); border-left: 5px solid var(--yellow); box-shadow: 0 12px 30px -10px rgb(2 2 30 / 0.6); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 80; max-width: min(92vw, 520px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.kp-card { display: flex; gap: 14px; align-items: center; }
.kp-card img { height: 20px; width: auto; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 22px; border-left: 3px solid var(--line); position: relative; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: -8px; top: 14px; width: 13px; height: 13px; border-radius: 50%; background: var(--neon); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--neon); }

/* responsywność */
@media (max-width: 1100px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.split, .grid.cols-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); z-index: 50; transform: translateX(-102%); transition: transform 0.25s; height: 100vh; }
  .side.open { transform: none; }
  .menu-btn { display: grid; place-items: center; }
  .top { padding: 12px 16px; }
  .acct { position: relative; }
  .acct .acct-btn { display: inline-flex; }
  .acct-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 45; flex-direction: column; align-items: stretch; gap: 4px; min-width: 200px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: 0 12px 32px rgba(13, 23, 58, 0.18); }
  .acct.open .acct-menu { display: flex; }
  .acct-menu .btn { justify-content: flex-start; border-color: transparent; min-height: 44px; }
  main { padding: 20px 16px; }
  .foot { padding: 16px; }
  .form-grid, .grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
  .chart-row { grid-template-columns: 96px 1fr 80px; }
  .hero { padding: 24px 20px; }
}
@media (max-width: 520px) {
  .grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
  .products { grid-template-columns: minmax(0, 1fr); }
  .products.view-small { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }   /* telefon: małe ikony w dwóch kolumnach */
  .products.view-small .thumb { height: 120px; }
  .products.view-small .body { padding: 10px; }
  .products.view-small .pill { white-space: normal; font-size: 11.5px; padding: 3px 8px; }
  .products.view-small .meta { flex-wrap: wrap; min-width: 0; }
  .products.view-small .btn { font-size: 13px; padding-left: 8px; padding-right: 8px; }
  .product-row { padding: 10px 12px; gap: 10px; }
  .product-row .row-main { min-width: 0; flex-basis: calc(100% - 66px); }
  .product-row .row-meta, .product-row .row-buy { margin-left: 0; flex: 1 1 100%; min-width: 0; }
  .product-row .row-meta { flex-wrap: wrap; }
  .product-row .buy { flex-wrap: wrap; gap: 8px; }
  .product-row .buy .btn { flex: 1 1 auto; }
  .role-switch { width: 100%; min-width: 0; }
  .role-switch select { max-width: none; flex: 1; min-width: 0; width: 100%; text-overflow: ellipsis; }
  .who { min-width: 0; flex: 1; }
  .who > div:last-child { min-width: 0; }
  .top .who { flex: 1 1 140px; overflow: hidden; }   /* nazwa i rola konta skracane (nie nachodzą na przyciski) */
  .top .who b, .top .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* 23b: edycja zamówienia — pozycje jako karty, przyciski ilości ≥ 44 px */
  .ed-lines thead { display: none; }
  .ed-lines tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .ed-lines td { display: block; border: 0; padding: 4px 0; text-align: left; }
  .ed-lines .qty button { width: 44px; height: 44px; }
  .ed-lines .qty input { height: 44px; }
  .ed-lines td[data-label]::before { content: attr(data-label) ': '; color: var(--muted, #6b6b80); font-size: 13px; }
  .cart-lines tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }   /* koszyk: produkt na całą szerokość, pod nim ilość, kwota i „Usuń” */
  .cart-lines td:first-child { flex: 1 1 100%; }
  .cart-lines td:last-child { margin-left: auto; }
  .cart-lines .link-btn { min-height: 44px; padding: 0 6px; }
}
/* 38-1 (38.5): koszyk zapytania (#/zapytanie) — pozycje jako karty poniżej 640 px (wzór koszyka zamówień, .ed-lines), przyciski ≥ 44 px */
@media (max-width: 640px) {
  .qc-table thead, .ord-table thead, .bt-list-table thead, .drc-table-single thead { display: none; }
  .qc-table tr, .ord-table tr, .bt-list-table tr, .drc-table-single tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .qc-table td, .ord-table td, .bt-list-table td, .drc-table-single td { display: block; border: 0; padding: 4px 0; text-align: left; }
  .qc-table td[data-label]::before, .ord-table td[data-label]::before, .bt-list-table td[data-label]::before, .drc-table-single td[data-label]::before { content: attr(data-label) ': '; color: var(--muted, #6b6b80); font-size: 13px; }
  .qc-table .link-btn { min-height: 44px; padding: 0 6px; }
  /* 43 (audyt klienta): komórka nakład×termin nadal przyciskiem na całej szerokości, czytelna jako karta */
  .drc-table-single .drc-cell { width: 100%; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
/* 29: druk — data dostawy w nagłówku kolumny terminu, „Inny nakład?” pod tabelą */
.drc-th-date, .drc-th-cut { display: inline-block; font-family: var(--font); text-transform: none; letter-spacing: 0; white-space: normal; }
.drc-th-date { font-weight: 800; color: var(--navy); font-size: 12.5px; }
.drc-th-cut { font-size: 11px; font-weight: 400; color: var(--ok); }
.drc-oq { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.drc-oq label { font-weight: 700; font-size: 13.5px; }
.drc-oq input { width: 110px; height: 36px; border: 1px solid var(--field-line); border-radius: 6px; padding: 0 8px; text-align: right; }
/* ---------- 28: drabinka progów, termin wysyłki, ostatnio zamawiane, wizytówka opiekuna ---------- */
.tiers { margin-top: 6px; }
.tiers-h { display: block; font-size: 11.5px; color: var(--muted, #6b7280); margin-bottom: 4px; }
.tier-row { display: flex; flex-wrap: wrap; gap: 4px; }
.tier { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; font-size: 12.5px; line-height: 1.25; }
.tier small { font-size: 11px; color: var(--muted, #6b7280); white-space: nowrap; }
.tier.on { border-color: var(--neon); background: var(--neon-tint); box-shadow: inset 0 0 0 1px var(--neon); }
.tier.on b { color: var(--neon); }
.tier-hint { display: block; font-size: 12px; color: var(--ok); margin-top: 4px; }
.eta { display: flex; gap: 6px; align-items: center; margin-top: 8px; color: var(--navy); }
.eta svg { width: 16px; height: 16px; flex: none; }
.recent { margin-bottom: 16px; }
.recent-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.recent-item { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.recent-item .btn { margin-top: 4px; }
.mgr-card { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.mgr-card > div:not(.avatar) { display: flex; flex-direction: column; min-width: 140px; flex: 1; }
.mgr-card > .btn { width: 100%; }
.mgr-card .avatar { width: 52px; height: 52px; font-size: 17px; }
.mgr-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.mgr-card .mono-label { font-size: 10.5px; }
.card > .mgr-card:first-child { margin-top: 0; border: 0; padding: 0; }
@media print { .side, .top, .foot, .actions, .toolbar { display: none !important; } .shell { display: block; } main { padding: 0; } }

/* ---------- samouczek ---------- */
.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; }
#tour-root { position: fixed; inset: 0; z-index: 90; }
.tour-shield { position: fixed; inset: 0; background: transparent; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgb(2 2 30 / 0.66), 0 0 0 3px var(--neon-light); pointer-events: none; transition: left 0.25s, top 0.25s, width 0.25s, height 0.25s; }
.tour-pop { position: fixed; width: min(400px, calc(100vw - 24px)); background: var(--navy); color: #fff; border-radius: var(--radius-lg); border-top: 5px solid var(--yellow); padding: 18px 20px 16px; box-shadow: 0 24px 60px -12px rgb(2 2 30 / 0.7), 0 0 0 1px rgb(255 255 255 / 0.16); outline: none; }
.tour-pop.sheet { width: 100%; border-radius: 16px 16px 0 0; max-height: 70vh; overflow: auto; }
.tour-pop.sheet.sheet-top { border-radius: 0 0 16px 16px; }
.tour-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tour-head .mono-label { color: var(--neon-light); }
.tour-x { background: transparent; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; width: 36px; height: 36px; border-radius: 8px; }
.tour-x:hover { background: rgb(255 255 255 / 0.12); }
.tour-pop h2 { color: #fff; font-size: 20px; margin-bottom: 8px; }
.tour-pop p { color: rgb(255 255 255 / 0.9); font-weight: 300; font-size: 15px; line-height: 1.55; }
.tour-pop p b { font-weight: 800; color: #fff; }
.tour-progress { height: 4px; background: rgb(255 255 255 / 0.18); border-radius: 2px; margin: 16px 0 14px; overflow: hidden; }
.tour-progress i { display: block; height: 100%; background: var(--yellow); border-radius: 2px; transition: width 0.25s; }
.tour-actions { display: flex; align-items: center; gap: 8px; }
.tour-actions .grow { flex: 1; }
.tour-actions .link-btn { color: rgb(255 255 255 / 0.8); font-weight: 400; }
.tour-actions .btn.ghost { color: #fff; border-color: rgb(255 255 255 / 0.55); }
.tour-actions .btn.ghost:hover { background: #fff; color: var(--navy); }
.tour-pop :focus-visible { outline-color: var(--neon-light); }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-progress i { transition: none; } }
@media print { #tour-root { display: none !important; } }

/* ---------- nawigacja po katalogu: grupy, kategorie, fasety, okruszki, warianty ---------- */
.cat-nav { margin-bottom: 18px; }
.cat-nav .nav-row { margin-bottom: 10px; }
.cat-nav .nav-row.sub { padding-left: 12px; border-left: 3px solid var(--line); }
.cat-nav .nav-row.facet { align-items: center; }
.facet-l, .vp-l { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.facet-l { margin-right: 4px; }
.chip small { opacity: 0.65; font-weight: 400; margin-left: 2px; }
.chip[aria-pressed="true"] small { opacity: 0.85; }
.chip.small { padding: 4px 10px; font-size: 13px; }
.crumbs { flex: 1 1 100%; font-size: 13px; color: var(--ink-3); margin: 4px 0 2px; }
.crumbs a { color: inherit; text-decoration: underline; }
.crumbs b { color: var(--ink); }
.variant-picks { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.vp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vp-l { min-width: 76px; }
.vp select { height: 36px; border-radius: 8px; border: 1px solid var(--field-line); padding: 0 8px; background: #fff; flex: 1 1 160px; max-width: 100%; }
.product.fam .meta { align-items: center; gap: 8px; flex-wrap: wrap; }

/* listy wyboru z długimi nazwami (np. punkty Grodno) nie mogą poszerzać strony na telefonie */
select { max-width: 100%; text-overflow: ellipsis; }
.toolbar select { min-width: 0; flex: 1 1 200px; }

/* zaproszenia, rejestracja mastera i logo klienta */
.brand-plate { display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 8px; padding: 8px 12px; }
.brand-plate img { max-height: 40px; max-width: 100%; object-fit: contain; }
body.bare #side, body.bare #top, body.bare #foot { display: none !important; }
body.bare .shell { display: block; }
body.bare #main { max-width: 520px; margin: 0 auto; padding: 32px 16px; }
body.bare.legal-page #main { max-width: 760px; }
.legal-frame { width: 100%; min-height: 60vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.auth-card h1 { font-size: 1.4rem; margin: 12px 0 8px; }
.auth-brand img { height: 36px; }
.auth-card .field { margin-bottom: 12px; }
.auth-card .check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-size: .92rem; }
.logo-prev { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; flex-wrap: wrap; }
.logo-prev img { max-height: 56px; max-width: 160px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px; }
.logo-cell img { max-height: 32px; max-width: 120px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 2px; }
.logo-cell img.on-dark { background: #1a1f36; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
label.link-btn { cursor: pointer; position: relative; display: inline-block; }
label.link-btn:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.mail-prev { background: #f7f7fb; border: 1px solid var(--line); border-radius: 8px; padding: 14px; font-size: .92rem; }
.mail-prev hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.welcome-logo img { max-height: 64px; max-width: 220px; object-fit: contain; }
ol.steps { padding-left: 20px; }
ol.steps li { margin: 6px 0; color: var(--ink-3); }
ol.steps li.done { color: #1a7f4b; }
ol.steps li.now { color: var(--ink); font-weight: 600; }

/* przyciski okna zawsze widoczne na małych ekranach */
.modal-actions { position: sticky; bottom: -26px; background: #fff; padding: 12px 0 4px; margin-bottom: -4px; }

/* lista kompletacyjna (b10) */
.pick-box { width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 4px; }
.pick-table td, .pick-table th { padding: 8px 10px; }
@media print { .pick-table td, .pick-table th { border: 1px solid #000; } .card.pick { border: 0; box-shadow: none; padding: 0; } }

/* stronicowanie listy zamowien (c3) */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 14px 0 4px; font-size: 13.5px; color: var(--ink-2); }

/* baner kategorii w katalogu */
.cat-banner { display: flex; align-items: stretch; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 14px 0 18px; }
.cat-banner img { width: 260px; flex: none; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #e4e6ee; }
.cat-banner-text { padding: 16px 20px 16px 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.cat-banner-text h2 { margin: 0; font-size: 1.35rem; }
.cat-banner-text p { margin: 0; color: var(--ink-2); max-width: 62ch; }
@media (max-width: 700px) { .cat-banner { flex-direction: column; gap: 0; } .cat-banner img { width: 100%; aspect-ratio: 16 / 7; } .cat-banner-text { padding: 14px 16px 16px; } }

/* karta produktu marki: opis i zdjęcia konkretnego modelu */
.modal.wide { width: min(920px, 100%); }
.pc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin: 10px 0 4px; }
.pc-main { background: #f6f6f9; border-radius: 10px; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pc-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pc-colors, .pc-extra { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pc-color, .pc-thumb { width: 48px; height: 48px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.pc-color img, .pc-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pc-color[aria-pressed="true"] { border: 2px solid var(--navy); }
.pc-desc { margin: 0 0 6px; }
.pc-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 10px 0; font-size: 14px; }
.pc-facts dt { color: var(--ink-2); }
.pc-facts dd { margin: 0; }
@media (max-width: 680px) { .pc-grid { grid-template-columns: 1fr; } }

/* 21e: sekcja „Druk” - konfigurator, tabela nakład × termin, podsumowanie */
.drc-layout { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.drc-h { margin: 0 0 10px; font-size: 15px; }
.drc-fixed { flex-direction: row; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.drc-lbl { font-weight: 800; font-size: 13.5px; }
.drc-lbl::after { content: ':'; }
.drc-table td, .drc-table th { padding: 8px; }
.drc-th-sub { display: inline-block; max-width: 170px; font-family: var(--font); text-transform: none; letter-spacing: 0; font-size: 11.5px; line-height: 1.3; white-space: normal; }
.drc-table td:first-child { white-space: nowrap; }
.drc-cell { width: 100%; min-width: 96px; min-height: 44px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-md); padding: 6px 10px; cursor: pointer; font: inherit; color: var(--ink); text-align: right; }
.drc-cell:hover { border-color: var(--navy); }
.drc-cell[aria-pressed="true"] { border: 2px solid var(--neon); background: var(--neon-tint); }
.drc-sum { width: auto; }
.drc-sum th { text-transform: none; letter-spacing: 0; font-family: var(--font); font-size: 13.5px; font-weight: 800; color: var(--ink); border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; padding-right: 16px; }
@media (max-width: 760px) {
  .drc-layout { grid-template-columns: minmax(0, 1fr); }
  .drc-sum th { white-space: normal; }
}

/* 34a-2: formularz rodziny druku („Wizytówki”) - podpowiedź „i”, wartości „na zapytanie”, komunikaty o przestawieniu pola */
.i-hint { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--line); color: var(--ink-2); font-size: 11px; font-style: normal; font-weight: 800; cursor: help; margin-left: 4px; }
.i-hint:focus { outline: 2px solid var(--navy); }
.badge-ask { display: inline-block; font-size: 11px; font-weight: 700; color: var(--ink-2); background: var(--line); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
#drf-notices-wrap .notice { margin-top: 10px; }

/* 34b-2: produkt „na zapytanie” - kafelki nakładu (`qs`) i terminu (bez tabeli cen) */
.drc-qtytiles, .drc-leadtiles { display: flex; flex-wrap: wrap; gap: 8px; }
.drc-qtytiles .drc-cell, .drc-leadtiles .drc-cell { width: auto; min-width: 84px; text-align: center; }
select:disabled, option:disabled { color: var(--ink-2); }

/* 36-2: siatka wielokrotnego wyboru (nakład × termin, flaga `drukMulti`) - przyklejona pierwsza kolumna na telefonie, licznik/lista zaznaczeń */
.drf-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.drf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.drf-chips .chip { display: inline-flex; align-items: center; gap: 4px; }
.drf-chips .chip button { font-size: 14px; line-height: 1; padding: 0 2px; }
/* kolumny terminów mieszczą się w karcie konfiguratora (bez przewijania w bok na komputerze) */
.drc-table-multi { table-layout: fixed; width: 100%; }
.drc-table-multi th:first-child, .drc-table-multi td:first-child { width: 30%; }
.drc-table-multi td button { min-width: 0; width: 100%; padding: 6px 4px; font-size: 13px; line-height: 1.2; }
.drc-table-multi th { font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.drc-table-multi thead th { letter-spacing: 0.02em; }
.drc-table-multi th .link-btn, .drc-table-multi th button { white-space: normal; overflow-wrap: anywhere; }
.drc-table-multi td:first-child { overflow-wrap: anywhere; }
/* P3-3 (weryfikacja 36-2): karta ok. 1024 px z 3 terminami (ekonomiczny/standardowy/ekspresowy) - pismo/odstępy lekko mniejsze, żeby
   nagłówki terminów i treść komórki („250,00 zł netto” / „wycena indywidualna”) łamały się w wierszu, a nie ucinały. */
@media (min-width: 761px) and (max-width: 1100px) {
  .drc-table-multi th:first-child, .drc-table-multi td:first-child { width: 26%; }
  .drc-table-multi th { font-size: 11px; padding: 8px 4px; }
  .drc-table-multi td button { font-size: 11.5px; padding: 4px 2px; }
}
@media (max-width: 900px) {
  .drc-table-multi { table-layout: auto; }
  .drc-table-multi td button { min-width: 96px; font-size: 14px; padding: 6px; }
  .drc-table-multi td:first-child, .drc-table-multi th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
}

/* 22b: konfigurator zapytań - kafelki koloru i siatka rozmiarów */
.cfg-colors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cfg-color { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; padding: 8px 6px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; cursor: pointer; font: inherit; }
.cfg-color img { width: 48px; height: 48px; object-fit: contain; }
.cfg-color-name { font-size: 11.5px; text-align: center; line-height: 1.2; color: var(--ink); }
.cfg-color[aria-pressed="true"] { border: 2px solid var(--navy); background: var(--neon-tint); }
.cfg-color-other { justify-content: center; min-height: 60px; }
.cfg-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-top: 4px; }
.cfg-size { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 800; }
.cfg-size input { height: 36px; border: 1px solid var(--field-line); border-radius: var(--radius-sm); padding: 0 8px; text-align: right; }

/* ---------- zgłoszenia (etap 25): pływający przycisk czatu, okno czatu, panel KP ---------- */
body.fb-on main { padding-bottom: 104px; }   /* ostatnie przyciski strony (np. „Złóż zamówienie”) zawsze da się przewinąć ponad przycisk czatu */
.fb-fab { position: fixed; right: 20px; bottom: 20px; z-index: 45; display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 28px;
  background: var(--navy); color: #fff; font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 12px 30px -10px rgb(2 2 30 / 0.6); }
.fb-fab svg { width: 24px; height: 24px; color: var(--yellow); }
.fb-fab:hover { background: var(--neon-hover); }
.fb-fab:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.fb-badge { position: absolute; top: -6px; right: -4px; min-width: 24px; height: 24px; border-radius: 12px; padding: 0 6px; background: var(--yellow); color: var(--navy); font-size: 12.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.fb-badge[hidden] { display: none; }
body.fb-lift .fb-fab { bottom: 92px; }   /* strona z paskiem akcji przy dolnej krawędzi ([data-fb-avoid]) */
.fb-panel { position: fixed; right: 20px; bottom: 88px; z-index: 58; width: min(400px, calc(100vw - 40px)); max-height: min(680px, calc(100vh - 110px)); display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: 0 30px 80px -20px rgb(2 2 30 / 0.55); overflow: hidden; }
.fb-panel[hidden] { display: none; }
body.fb-lift .fb-panel { bottom: 160px; max-height: min(680px, calc(100vh - 180px)); }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--navy); color: #fff; border-bottom: 4px solid var(--yellow); }
.fb-x { background: none; border: 0; color: #fff; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; border-radius: var(--radius-md); }
.fb-x svg { width: 22px; height: 22px; }
.fb-x:focus-visible { outline: 3px solid var(--yellow); }
.fb-tabs, .fb-filter { display: flex; gap: 4px; padding: 8px 12px 0; }
.fb-tabs button, .fb-filter button { flex: 1; min-height: 40px; border: 1px solid var(--line); background: var(--gray-cool); border-radius: var(--radius-md); font: inherit; font-size: 13.5px; cursor: pointer; color: var(--ink); }
.fb-tabs button[aria-pressed="true"], .fb-filter button[aria-pressed="true"] { background: #fff; border-color: var(--navy); font-weight: 800; }
.fb-filter { padding: 0 0 10px; }
.fb-body { padding: 12px 16px 16px; overflow-y: auto; flex: 1; min-height: 0; }
.fb-form fieldset { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.fb-form legend { font-weight: 800; font-size: 14px; margin-bottom: 6px; width: 100%; }
.fb-choice { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 14px; }
.fb-star { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; position: relative; font-weight: 800; }
.fb-star input, .fb-choice input { accent-color: var(--neon); }
.fb-star input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fb-star:has(input:checked) { background: var(--yellow); border-color: var(--navy); }
.fb-star:has(input:focus-visible) { outline: 3px solid var(--neon); }
.fb-form textarea, .fb-compose textarea { width: 100%; resize: vertical; min-height: 84px; border: 1px solid var(--field-line); border-radius: var(--radius-md); padding: 10px 12px; font: inherit; }
.fb-attach { margin: 6px 0 12px; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fb-file-pick { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--neon); font-weight: 800; position: relative; }
.fb-file-pick .muted, .fb-legend-note { font-weight: 400; }
.fb-file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.fb-file-pick:has(input:focus-visible) { outline: 3px solid var(--neon); outline-offset: 2px; }
.fb-file { display: inline-flex; align-items: center; gap: 4px; }
.fb-file svg, .fb-file-pick svg { width: 16px; height: 16px; flex: none; }
.fb-ctx-box { margin: 4px 0 12px; font-size: 13px; }
.fb-ctx-box summary { cursor: pointer; font-weight: 800; color: var(--ink-2); min-height: 32px; display: flex; align-items: center; }
/* 49d: widoczny znacznik rozwijania (summary jako flex nie ma domyślnej strzałki) */
.fb-ctx-box summary::before { content: '▸'; margin-right: 6px; transition: transform .15s; }
.fb-ctx-box[open] summary::before { transform: rotate(90deg); }
.fb-ctx { list-style: none; margin: 6px 0; padding: 8px 10px; background: var(--gray-cool); border-radius: var(--radius-md); }
.fb-ctx li { padding: 2px 0; overflow-wrap: anywhere; }
.fb-ctx li span { color: var(--ink-2); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; margin-right: 4px; }
.fb-send { width: 100%; }
.fb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fb-item { width: 100%; display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; font: inherit; color: var(--ink); cursor: pointer; text-decoration: none; }
.fb-item:hover, .fb-item.current { border-color: var(--navy); }
.fb-item.unread, .fb-item.waiting { border-left: 5px solid var(--yellow); }
.fb-item-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fb-item-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--yellow); color: var(--navy); font-size: 11.5px; font-weight: 800; padding: 0 5px; }
.fb-thead .link-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.fb-thead svg, .fb-item svg { width: 16px; height: 16px; flex: none; }
.fb-thead h3 { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; font-size: 16px; }
.fb-thead p { margin: 2px 0; }
.fb-scroll { max-height: 46vh; overflow-y: auto; margin: 6px 0 10px; }
.fb-msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fb-msg { max-width: 88%; padding: 8px 12px; border-radius: 12px; background: var(--gray-cool); align-self: flex-start; }
.fb-msg.kp { background: var(--neon-tint); }
.fb-msg.mine { align-self: flex-end; background: var(--navy); color: #fff; }
.fb-msg.mine .fb-meta, .fb-msg.mine .muted { color: rgb(255 255 255 / 0.8); }
.fb-msg.mine a { color: #fff; }
.fb-meta { font-size: 12px; color: var(--ink-2); margin-bottom: 2px; }
.fb-text { overflow-wrap: anywhere; font-size: 14.5px; }
.fb-files { margin-top: 6px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.fb-event { align-self: center; font-size: 12.5px; color: var(--ink-2); text-align: center; padding: 4px 8px; }
.fb-event .fb-text { color: var(--ink); }
.fb-compose .btn { width: 100%; }
.fb-status-box { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
/* widżet powiększony („Powiększ”): duży panel przy prawym dolnym rogu, lista + rozmowa */
.fb-head-actions { display: flex; align-items: center; gap: 6px; }
.fb-size { background: none; border: 1px solid rgb(255 255 255 / 0.5); color: #fff; border-radius: var(--radius-md); min-height: 36px; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.fb-size:focus-visible { outline: 3px solid var(--yellow); }
.fb-panel.big { width: min(1100px, 92vw); height: min(800px, 85vh); max-height: none; }
.fb-panel.big .fb-body { display: flex; padding: 0; overflow: hidden; }
.fb-cols { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(0, 3fr); flex: 1; min-height: 0; }
.fb-col-list { border-right: 1px solid var(--line); overflow-y: auto; padding: 12px; }
.fb-col-main { overflow-y: auto; padding: 12px 18px 18px; min-width: 0; }
.fb-panel.big .fb-scroll { max-height: 48vh; }
.fb-kp-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.fb-kp-filters select { width: 100%; height: 40px; border-radius: 8px; border: 1px solid var(--field-line); padding: 0 8px; background: #fff; font: inherit; font-size: 13.5px; }
.fb-kpi-btn { font-size: inherit; }
/* kreator nowego zgłoszenia */
.fb-steps { list-style: none; display: flex; gap: 6px; margin: 0 0 6px; padding: 0; }
.fb-steps li { flex: 1; height: 6px; border-radius: 3px; background: var(--line); font-size: 0; }
.fb-steps li.done { background: var(--navy); }
.fb-steps li.now { background: var(--yellow); box-shadow: inset 0 0 0 1px var(--navy); }
.fb-step-title { font-size: 16px; margin: 6px 0 12px; }
.fb-step-title:focus { outline: none; }
.fb-step-title:focus-visible { outline: 3px solid var(--neon); outline-offset: 2px; }
.fb-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.fb-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border: 2px solid var(--line); border-radius: var(--radius-lg); background: #fff; cursor: pointer; font: inherit; color: var(--ink); text-align: center; min-height: 120px; }
.fb-tile svg { width: 30px; height: 30px; color: var(--neon); }
.fb-tile b { font-size: 15px; }
.fb-tile span { font-size: 12.5px; color: var(--ink-2); }
.fb-tile:hover, .fb-tile[aria-pressed="true"] { border-color: var(--navy); background: var(--neon-tint); }
.fb-tile:focus-visible { outline: 3px solid var(--neon); outline-offset: 2px; }
.fb-wiz-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.fb-wiz-right { display: flex; gap: 8px; }
.fb-kind-chosen { margin: 0 0 8px; }
.fb-summary { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 10px; font-size: 14px; }
.fb-summary dt { color: var(--ink-2); }
.fb-summary dd { margin: 0; overflow-wrap: anywhere; }
.fb-summary-text { background: var(--gray-cool); border-radius: var(--radius-md); padding: 8px 10px; margin-bottom: 8px; font-size: 14px; max-height: 30vh; overflow-y: auto; }
.fb-thanks { text-align: center; padding: 20px 4px; }
.fb-thanks h3 { font-size: 20px; margin-bottom: 8px; }
.fb-thanks .fb-wiz-nav { justify-content: center; }   /* 49d: przyciski pod wyśrodkowanym tekstem */
/* wskazanie miejsca na stronie */
.fb-pin-pick { margin: 6px 0 12px; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fb-pin-pick svg, .fb-pin-info svg { width: 16px; height: 16px; vertical-align: -3px; }
.fb-pin-info { margin: 4px 0; }
body.fb-pinning .fb-fab { display: none; }
body.fb-pinning, body.fb-pinning * { cursor: crosshair !important; }
#fb-pin-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 90; display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--navy); color: #fff; border-bottom: 4px solid var(--yellow); font-weight: 800; }
#fb-pin-bar .btn { color: #fff; border-color: #fff; cursor: pointer !important; }
#fb-pin-box { position: fixed; z-index: 89; pointer-events: none; outline: 3px solid var(--neon); outline-offset: 2px; background: rgb(73 72 255 / 0.08); border-radius: 4px; }
#fb-pin-box[hidden] { display: none; }
.fb-pin-target { outline: 3px solid var(--yellow) !important; outline-offset: 3px; }
.fb-pin-marker { position: absolute; z-index: 44; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px var(--navy); pointer-events: none; animation: fb-pulse 0.9s ease-in-out infinite; }
@keyframes fb-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .fb-pin-marker { animation: none; } }
@media (max-width: 860px) { .fb-cols { grid-template-columns: minmax(0, 1fr); } .fb-col-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 40%; } }
@media (max-width: 520px) {
  /* telefon: okno czatu na pełny ekran, przycisk tylko z ikoną (nie zasłania przycisków na dole strony) */
  .fb-fab { right: 16px; bottom: 16px; width: 56px; padding: 0; justify-content: center; }
  .fb-fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .fb-panel, .fb-panel.big, body.fb-lift .fb-panel { inset: 0; width: 100%; max-height: none; height: 100%; border-radius: 0; border: 0; }
  .fb-size { display: none; }
  .fb-tiles { grid-template-columns: minmax(0, 1fr); }
  .fb-tile { flex-direction: row; min-height: 64px; text-align: left; gap: 10px; }
  body.fb-open .fb-fab { display: none; }
  body.fb-open { overflow: hidden; }
  .fb-scroll { max-height: none; }
}
@media print { .fb-fab, .fb-panel, #fb-pin-bar, #fb-pin-box, .fb-pin-marker { display: none !important; } }

/* E3 nawigacji (docs/31): pasek kategorii z mega menu, kategorie w szufladzie, strona kategorii #/k/... (za flagą nav2) */
.catbar { display: flex; align-items: stretch; gap: 2px; padding: 0 24px; background: var(--card); border-bottom: 1px solid var(--line); position: relative; z-index: 30; flex-wrap: wrap; }
.catbar .cb { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0 12px; min-height: 52px; font: inherit; font-weight: 800; color: var(--navy); border-bottom: 3px solid transparent; white-space: nowrap; cursor: pointer; text-decoration: none; }
.catbar .cb svg.chev { width: 16px; height: 16px; transition: transform .15s; }
.catbar .cb[aria-expanded="true"] { border-bottom-color: var(--neon); color: var(--neon); }
.catbar .cb[aria-expanded="true"] svg.chev { transform: rotate(180deg); }
.catbar .cb:hover { background: var(--gray-cool); }
.catbar .cb:focus-visible { outline-offset: -3px; }
.catbar .cb .n { font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
.catbar .sp { flex: 1; }
.catbar > .btn, .catbar > .link-btn { align-self: center; margin-left: 8px; }
.catbar .cb-wait { align-self: center; padding: 16px 0; }
.mega { position: absolute; left: 0; right: 0; top: 100%; z-index: 29; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 4px rgb(13 23 58 / 0.08), 0 24px 48px -16px rgb(13 23 58 / 0.28); padding: 20px 28px 22px; max-height: calc(100vh - 140px); overflow-y: auto; }
.mega[hidden] { display: none; }
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; text-align: center; border: 2px solid var(--line); border-radius: var(--radius-lg); background: #fff; color: var(--navy); text-decoration: none; overflow: hidden; }
.tile .ph { display: block; aspect-ratio: 16 / 10; background: #eef0f4; overflow: hidden; }
.tile .ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.tile:hover .ph img { transform: scale(1.04); }
.tile .tt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 8px 10px; }
.tile b { font-weight: 800; font-size: 13px; line-height: 1.25; }
.tile small { color: var(--ink-2); font-size: 12px; }
.tile:hover { border-color: var(--navy); }
.tile[aria-current="true"] { border-color: var(--neon); background: var(--neon-tint); }
.tile[aria-current="true"] .tt b { color: var(--neon); }
.mega-cols { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 260px; gap: 24px; }
.mega-cols h3 { margin: 0 0 8px; }
.mega-list { list-style: none; margin: 0 0 10px; padding: 0; columns: 3; column-gap: 24px; }
.mega-list li { break-inside: avoid; }
.mega-list a, .mega-list span { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; color: var(--ink); text-decoration: none; }
.mega-list a:hover { color: var(--neon); }
.mega-list .c { color: var(--ink-3); font-size: 12.5px; }
.see-all { color: var(--neon); font-weight: 800; text-decoration: none; }
.see-all:hover { text-decoration: underline; }
.mega-aside { background: var(--gray-cool); border-radius: var(--radius-lg); padding: 14px 16px; font-size: 13.5px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.side-cats { display: none; }
.side-cats .side-fams button, .side-cats .side-list a { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; background: transparent; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; padding: 8px 12px; border-radius: 8px; text-decoration: none; }
.side-cats .side-fams button:hover, .side-cats .side-list a:hover { background: rgb(255 255 255 / .08); }
.side-cats .go { margin-left: auto; opacity: .7; }
.side-cats .badge-n { margin-left: auto; opacity: .75; font-size: 12.5px; }
.side-back { background: transparent; border: 0; color: var(--neon-light); font: inherit; font-weight: 800; min-height: 44px; padding: 0 4px; cursor: pointer; }
.side-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.side-tiles .tile { border-width: 1px; }
.side-tiles .tile b { font-size: 12px; overflow-wrap: anywhere; }
.crumbs { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.crumbs a { color: var(--ink-2); min-height: 28px; display: inline-flex; align-items: center; }
.crumbs a:hover { color: var(--neon); }
.crumbs b { color: var(--ink); }
.kpage { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.khead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.khead h1 { margin: 0; }
.tree { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; position: sticky; top: 12px; font-size: 14px; }
.tree h2 { font-size: 13px; margin: 4px 8px 8px; }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree a { display: flex; justify-content: space-between; gap: 6px; padding: 6px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.tree a:hover { background: var(--gray-cool); }
.tree a[aria-current="page"] { background: var(--navy); color: #fff; font-weight: 800; }
.tree a[aria-current="page"] .c { color: rgb(255 255 255 / .8); }
.tree .c { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.tree .lvl1 > li > a { font-weight: 800; }
.tree .lvl2 { margin: 2px 0 6px 10px; border-left: 2px solid var(--line); padding-left: 6px; }
.tree .lvl2 a { font-weight: 400; }
.kchips { display: none; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: thin; }
.qchip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0 14px; min-height: 40px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--ink); text-decoration: none; }
.qchip[aria-current="page"] { border: 2px solid var(--navy); font-weight: 800; }
.qchip small { color: var(--ink-3); }
.ktools { align-items: flex-end; }
.ksel { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-2); flex: 0 1 auto; }
.ktools .search { flex: 1 1 220px; }
.ksel select { flex: none; height: 44px; border-radius: 8px; border: 1px solid var(--field-line); padding: 0 12px; background: #fff; font: inherit; color: var(--ink); max-width: 240px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1023px) {
  .kpage { grid-template-columns: minmax(0, 1fr); }
  .kpage .tree { display: none; }
  .kchips { display: flex; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mega-cols { grid-template-columns: minmax(0, 1fr); }
  .mega-list { columns: 2; }
  .catbar { padding: 0 12px; }   /* zawijanie zamiast przewijania: przewijany pasek obcinałby mega menu i podpowiedzi */
  .catbar .cb { padding: 0 8px; }
}
@media (max-width: 860px) { .side-cats { display: block; } }
@media (max-width: 759px) {
  .catbar { padding: 8px 16px; overflow: visible; }
  .catbar > :not(.gs) { display: none; }
  .gs { width: 100%; max-width: none; }
  .gs-pop { position: fixed; left: 0; right: 0; top: auto; width: auto; max-height: 70vh; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
  .ktools .ksel { flex: 1 1 140px; }
  .ktools .ksel select { max-width: none; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .tile .ph img, .catbar .cb svg.chev { transition: none; } }
@media print { .catbar, .mega, .tree, .kchips { display: none !important; } }
/* E4 nawigacji: wyszukiwarka z podpowiedziami w pasku kategorii */
.gs { position: relative; align-self: center; flex: 1 1 200px; max-width: 340px; min-width: 160px; margin-left: 8px; }
@media (max-width: 1399px) { .catbar > .btn { display: none; } }   /* na laptopie pasek mieści się w jednym wierszu; „Wycena niestandardowa” zostaje w mega menu */
.gs .search { margin: 0; }
.gs .search input { height: 40px; }
.gs-pop { position: absolute; right: 0; top: calc(100% + 6px); width: min(460px, 92vw); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 2px 4px rgb(13 23 58 / 0.08), 0 24px 48px -16px rgb(13 23 58 / 0.28); z-index: 40; max-height: 70vh; overflow-y: auto; }
.gs-pop[hidden] { display: none; }
.gs-pop ul { list-style: none; margin: 0; padding: 6px; }
.gs-sec { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); padding: 8px 10px 4px; }
.gs-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: 44px; border-radius: 8px; cursor: pointer; }
.gs-opt .gs-l { display: flex; flex-direction: column; min-width: 0; }
.gs-opt small { color: var(--ink-3); font-size: 12px; }
.gs-opt .gs-n { margin-left: auto; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.gs-opt:hover, .gs-opt[aria-selected="true"] { background: var(--neon-tint); }
.gs-opt[aria-selected="true"] { outline: 2px solid var(--neon); outline-offset: -2px; }
.gs-all { border-top: 1px solid var(--line); margin-top: 4px; color: var(--neon); font-weight: 800; }
.gs-cats { display: flex; }
@media print { .gs, .gs-pop { display: none !important; } }
/* E5 nawigacji: przełącznik „Tylko moje produkty” w nagłówku strony kategorii */
.kmine { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 44px; font-weight: 800; font-size: 14px; cursor: pointer; }
.kmine input { width: 20px; height: 20px; accent-color: var(--neon); }
.kmine-all { color: var(--neon); text-decoration: none; } .kmine-all:hover { text-decoration: underline; }
.ksec { margin: 8px 0 0; padding-top: 12px; font-size: 18px; border-top: 2px solid var(--line); } .ksec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
/* Domknięcie nawigacji: strona startowa katalogu (działy w rodzinach) i panel filtrów od dołu ekranu na telefonie */
.khome { margin-top: 22px; }
.khome h2 { margin: 0 0 12px; }
.home-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.kmine-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); border: 2px solid var(--line); }
.kmine-card:hover { border-color: var(--navy); }
.kf-open { display: none; }
.kf, .kf-body { display: contents; }
.kf-head, .kf-foot { display: none; }
@media (max-width: 759px) {
  .kf-open { display: inline-flex; min-height: 44px; }
  .ktools .view-switch { margin-left: auto; }
  .kf { display: none; }
  .kf.open { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; max-height: 88vh; background: #fff; z-index: 70; border-radius: 18px 18px 0 0; box-shadow: 0 0 0 100vmax rgb(2 2 30 / 0.45); animation: kfup .2s ease-out; }
  .kf.open .kf-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; border-bottom: 1px solid var(--line); }
  .kf.open .kf-head h2 { margin: 0; font-size: 18px; }
  .kf.open .kf-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; overflow-y: auto; }
  .kf.open .kf-body .ksel { flex: none; width: 100%; }
  .kf.open .kf-body .ksel select { width: 100%; max-width: none; }
  .kf.open .kf-body .kst { flex: none; }
  .kf.open .kf-foot { display: block; padding: 10px 16px 16px; border-top: 1px solid var(--line); }
  .kf.open .kf-foot .btn { width: 100%; min-height: 48px; }
  body.kf-on { overflow: hidden; }
  .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
@keyframes kfup { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .kf.open { animation: none; } }

/* przeciąganie pliku logo (ustawienia firmy, tabela klientów KP, rejestracja) */
.logo-drop{transition:outline-color .15s, background-color .15s;outline:2px dashed transparent;outline-offset:2px}
.logo-drop.drop-on{outline-color:var(--neon);background-color:var(--neon-tint)}

/* 37-3: rachunek w edytorze wyceny na wąskim ekranie - etykieta nad wartością zamiast tabeli dwukolumnowej (bez przewijania w poziomie) */
@media (max-width: 640px) {
  #kq-calc-box table, #kq-calc-box tbody, #kq-calc-box tr, #kq-calc-box td { display: block; width: 100%; }
  #kq-calc-box td { white-space: normal !important; padding: 0 !important; }
  #kq-calc-box tr { padding: 4px 0; }
  #kq-pv input, #kq-pv select { max-width: 100%; }
}
@media (max-width: 640px) {
  #kq-calc-box .pill, #kq-pv .pill, #kq-form [data-f="calc"] .pill { white-space: normal; }   /* 37-3 (weryfikacja A1): długie etykiety źródła kosztu się zawijają */
}

/* S2 (makieta 41): panel KP i lista zapytań - kafelki „do zrobienia”, wiersze zamiast tabel, karty zapytań */
.todo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.todo-grid:empty { display: none; }
.kpi.todo { display: flex; flex-direction: column; align-items: flex-start; text-align: left; font: inherit; color: inherit; text-decoration: none; cursor: pointer; border: 1px solid var(--line); }
.kpi.todo[hidden] { display: none; }
.kpi.todo:hover { border-color: var(--navy); }
.kpi.todo.warn { border: 2px solid var(--yellow); }
.kp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.kp-row:first-child { border-top: 0; }
.kp-row-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kp-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; min-height: 32px; }
.kp-fold > summary::-webkit-details-marker { display: none; }
.kp-fold > summary h2 { margin: 0; }
.kp-fold > summary::after { content: '▾'; margin-left: auto; color: var(--ink-3); }
.kp-fold[open] > summary::after { content: '▴'; }
.q-sec { margin-top: 20px; }
.q-sec > h2 { margin: 0 0 10px; }
.qcard { margin-top: 10px; }
.qcard.act { border: 2px solid var(--neon); }
.qcard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.qcard-top > span:first-child { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.qcard-top > .pill { flex: none; }
.qcard-val { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.qcard-val .big { font-size: 22px; font-weight: 800; margin: 0; }
.qcard-act { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qcard details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.qcard details > summary { cursor: pointer; color: var(--ink-2); font-size: 14px; }
/* S2b (makieta 41-C/D): gotowość klienta i ustawienia jako podsumowanie */
.ready-bar { height: 6px; border-radius: 3px; background: var(--line); margin: 10px 0 6px; overflow: hidden; }
.ready-bar > span { display: block; height: 100%; background: var(--ok); }
.set-row { border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; }
.set-row > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
.set-row > summary::-webkit-details-marker { display: none; }
.set-row[open] > summary .set-open { visibility: hidden; }
.set-body { padding: 0 0 16px; }
.ord-line > span:first-child { flex: 1 1 260px; min-width: 0; }
.ord-more { margin-top: 4px; }
.ord-more > summary { cursor: pointer; color: var(--ink-2); font-size: 14px; }
.cart-row .cart-name { flex: 1 1 240px; min-width: 0; }
.cart-row .cart-ctl { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cart-row .cart-val { min-width: 90px; }
/* S2 (makieta 41 B): konta w wierszach; rozwinięcie „Zmień” */
.u-row { border-top: 1px solid var(--line); }
.u-row:first-child { border-top: 0; }
details.u-row > summary { list-style: none; cursor: pointer; border-top: 0; }
details.u-row > summary::-webkit-details-marker { display: none; }
details.u-row[open] > summary .set-open { visibility: hidden; }
.kp-row.u-row.off { opacity: .7; }
.u-row .perm-list { margin-top: 4px; }
/* S2 (makieta 41 C): konfigurator druku - kroki po lewej, „Twój wybór” po prawej (na wąskim ekranie pod spodem) */
.drf-wrap { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.drf-main { min-width: 0; }
.drf-side { position: sticky; top: 16px; }
.drf-side .drc-sum th { width: 40%; }
.drf-side .btn { width: 100%; justify-content: center; margin-top: 8px; }
.drf-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; }
@media (max-width: 900px) { .drf-wrap { grid-template-columns: minmax(0, 1fr); } .drf-side { position: static; } }
/* A4: wiersz konta personelu KP wyłączonego przez administratora King Promotion (kp.user-set-active) - tak samo przygaszony jak .u-row.off */
table tr.off { opacity: .7; }

/* 47 (plan 45): kreator „Druk i reklama” — strona kategorii w dwóch blokach i okno kreatora */
.kr-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.kr-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 14px; }
.kr-row-name { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kr-row-price { font-weight: 800; min-width: 90px; }
.kr-row-qty input { width: 70px; height: 36px; border: 1px solid var(--field-line); border-radius: 6px; padding: 0 8px; text-align: right; }
.kr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 10px; }
.kr-tile { cursor: pointer; display: flex; align-items: flex-start; text-align: left; min-height: 0; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); font: inherit; }
.kr-tile:hover { border-color: var(--navy); }
.kr-tile .tt { display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.kr-tile .tt small { color: var(--ink-2); }
.kr-body .chip.kr-other-on { background: var(--navy); color: #fff; border-color: var(--navy); }
.kr-body .kr-search { margin-bottom: 6px; }
.kr-dims { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* 49c (plan docs/49c, A1; makieta-formatki-kreator.html): pole „Formatki” - wiersze szer. × wys. (cm) × sztuki, m² w wierszu i suma */
.kr-sizes { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; background: #fff; }
.kr-sizes-head, .kr-sizes-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 90px 90px 32px; gap: 8px; align-items: center; }
.kr-sizes-head { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.kr-sizes-row { margin-bottom: 8px; }
.kr-sizes-row input { width: 100%; min-width: 0; }
.kr-sizes-m2 { font-weight: 700; text-align: right; }
.kr-sizes-del { border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--ink-3); padding: 0; min-height: 32px; }
.kr-sizes-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.kr-sizes-sum { font-weight: 800; }
@media (max-width: 519.98px) {   /* 49c: nie 520px - test stage25 czyta OSTATNI blok 520px (czat) */
  .kr-sizes-head, .kr-sizes-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 64px 32px; }
  .kr-sizes-head .kr-sizes-m2, .kr-sizes-row .kr-sizes-m2 { display: none; }   /* na telefonie m² tylko w sumie */
}
@media (max-width: 759px) {
  .kr-row { flex-direction: column; align-items: stretch; }
  .kr-row-name { flex: none; }   /* 47: w układzie pionowym podstawa 180px robiła pustą wysokość */
  .kr-row-qty, .kr-row-act { display: inline-block; }
  .kr-row-price, .kr-row-qty, .kr-row-act { width: 100%; }
}
.kr-sum-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kr-sum-list dt { color: var(--ink-2); }
.kr-sum-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
/* 47/53: pasek kroków kreatora - bez wcięć listy numerowanej; 53 (pkt 3.5): przy 3 krokach wszystkie nazwy mieszczą się też na telefonie */
ol.steps.kr-steps { padding-left: 0; display: flex; gap: 10px; }
ol.steps.kr-steps li { margin: 0; color: var(--ink-3); flex: 1; }
ol.steps.kr-steps li.done { color: var(--ink); }
ol.steps.kr-steps li.now { color: var(--ink); font-weight: 800; }
@media (max-width: 760px) { td.kr-cell-empty { display: none !important; } }   /* 47: linia specyfikacji w koszyku na telefonie bez pustych kolumn */
/* 53 (pkt 7): pole ilości „-”/„+” */
.kr-qty { display: inline-flex; align-items: stretch; border: 1px solid var(--field-line); border-radius: var(--radius-md); overflow: hidden; }
.kr-qty-btn { width: 44px; min-height: 44px; border: 0; background: var(--gray-cool); font-size: 18px; cursor: pointer; }
.kr-qty input { width: 80px; border: 0; text-align: center; font-weight: 800; font-size: 16px; min-height: 44px; }
/* 53 (pkt 10): przyciski gotowych wymiarów nad formatkami */
.kr-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.kr-presets .small { margin-right: 2px; }
.kr-preset { border-style: dashed; }
/* 53 (pkt 9): ekran „Co dalej” po wysłaniu zapytania */
.kr-done { text-align: center; padding: 20px 4px 4px; }
.kr-done-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-tint); color: var(--ok); display: grid; place-items: center; font-size: 28px; font-weight: 800; margin: 0 auto 10px; }
.kr-done h3 { margin: 0 0 4px; }
.kr-timeline { text-align: left; max-width: 420px; margin: 16px auto 0; list-style: none; padding: 0; }
.kr-timeline li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 7px 0; }
.kr-timeline li::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--line); margin-top: 2px; }
.kr-timeline li.on::before { border-color: var(--neon); background: var(--neon); }
.kr-timeline li { row-gap: 0; }
.kr-timeline small { display: block; color: var(--ink-2); grid-column: 2; }
/* 53 (pkt 3.5): kafelki min. 44 px na dotyk - klik łatwiejszy na telefonie */
@media (pointer: coarse) { .chip, .kr-tile, .tile { min-height: 44px; } }

/* 48 (plan docs/48): krok kreatora „Zdjęcia i pliki” - kafle miejsc na zdjęcia, podgląd, ikona dla HEIC/PDF */
.kr-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 4px; }
.kr-file-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.kr-file-label { font-weight: 800; font-size: 13.5px; }
.kr-file-label small { display: block; color: var(--ink-2); font-weight: 400; font-size: 12px; margin-top: 2px; }
.kr-file-item { display: flex; flex-direction: column; gap: 6px; }
/* 48 (po przeglądzie w przeglądarce): podgląd 84 px, nie mała miniatura 36 px */
.kr-file-thumb { width: 100%; height: 84px; flex: none; border-radius: 8px; overflow: hidden; background: #eef0f4; display: flex; align-items: center; justify-content: center; }
.kr-file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.kr-file-ico { font-size: 12px; font-weight: 800; color: var(--ink-2); }
.kr-file-row { display: flex; align-items: center; gap: 8px; }
.kr-file-name { flex: 1 1 auto; min-width: 0; font-size: 12.5px; overflow-wrap: anywhere; }
.kr-file-pick { align-self: flex-start; }
/* 48 (po przeglądzie): wskazówka kroku „Zdjęcia i pliki” z ikoną aparatu (jak makieta) */
.kr-tip { display: flex; align-items: flex-start; gap: 10px; }
.kr-tip-ico { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--navy); }
