/* ==========================================================================
   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;
}
*, *::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; }

/* pasek wersji demonstracyjnej */
.demo-bar { background: var(--navy-deep); color: #fff; font-size: 12.5px; padding: 7px 16px; display: flex; gap: 10px; align-items: center; justify-content: center; text-align: center; flex-wrap: wrap; }
.demo-bar strong { color: var(--yellow); font-weight: 800; letter-spacing: 0.06em; }
.demo-bar button { background: transparent; border: 1px solid rgb(255 255 255 / 0.45); color: #fff; border-radius: 999px; padding: 2px 12px; font-size: 12px; cursor: pointer; }
.demo-bar button:hover { background: rgb(255 255 255 / 0.12); }

/* 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; }
.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; }
.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; }

/* 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); }
.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 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; }

/* 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; }
  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); }
  .role-switch { width: 100%; min-width: 0; }
  .role-switch select { max-width: none; flex: 1; min-width: 0; width: 100%; text-overflow: ellipsis; }
  .demo-bar span { display: none; }
  .who { min-width: 0; flex: 1; }
  .who > div:last-child { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .side, .top, .demo-bar, .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-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; }
.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; } }
