/* Platforma Afiliacyjna, komponenty: przyciski, karty, formularze, tabele, modale, toast, zakładki */

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-weight: 600; cursor: pointer; font-size: .95rem;
  transition: background .12s, border-color .12s, box-shadow .12s, transform .05s;
}
.btn:hover { border-color: var(--brand); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 10px rgba(240,80,16,.22); }
.btn--success { background: #1E9E5A; border-color: #1E9E5A; color: #fff; }
.btn--success:hover { background: #18834b; border-color: #18834b; }
.btn--primary:hover { background: var(--brand-deep); }
.btn--ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Karty */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
/* Responsywna siatka kafli: dopasowuje liczbę kolumn do szerokości, kafle ~280px (max ~360px) */
.grid--3fixed { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (min-width: 1500px) { .grid--3fixed { grid-template-columns: repeat(auto-fill, minmax(300px, 360px)); } }

/* Baner / intro klastrów */
.cluster-intro { background: linear-gradient(135deg, #16181D 0%, #2A1A12 60%, var(--brand-deep) 100%); color: #fff; padding: 28px 32px; border-radius: var(--radius); box-shadow: var(--shadow); }
.cluster-intro h1 { margin: 0 0 8px; }
.cluster-intro p { color: #D8D8D8; max-width: 780px; margin: 0; }
.cluster-tile { cursor: default; }
.cluster-tile:hover { transform: none; border-color: var(--border); }

/* Statystyki */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__value { font-size: 1.8rem; font-weight: 800; }
.stat__label { color: var(--text-muted); font-size: .85rem; }

/* Formularze */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .85rem; color: var(--text-muted); font-weight: 600; }
.field input, .field select, .field textarea {
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: .95rem; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }

/* Tabele */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--text-muted); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }

/* Plakietki statusów */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge--pending  { background: rgba(176,120,0,.14);  color: var(--amber); }
.badge--approved { background: rgba(240,80,16,.14);  color: var(--brand); }
.badge--paid     { background: rgba(30,158,90,.14);  color: var(--green); }
.badge--reversed { background: rgba(212,59,64,.14);  color: var(--red); }

/* Zakładki (nawigacja paneli) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; flex-wrap: wrap; }
.tabs a { padding: 12px 16px; color: var(--text-muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--text); border-bottom-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* Topbar, ciemny, by białe logo było widoczne */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; background: var(--dark); position: sticky; top: 0; z-index: 40; box-shadow: 0 2px 14px rgba(0,0,0,.22); }
.topbar, .topbar a, .topbar .muted { color: #fff; }
.topbar a:hover { color: var(--brand); }
.topbar__brand { font-weight: 800; }
.topbar .brand-logo { height: 30px; width: auto; display: block; }

/* Kafelki kategorii */
.tile {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s;
}
.tile:hover { transform: translateY(-3px); border-color: var(--brand); text-decoration: none; }
.tile__img {
  aspect-ratio: 16/9; background: var(--surface-2) center/cover no-repeat;
  background-size: cover; border-bottom: 1px solid var(--border);
}
.tile__body { padding: 12px 16px 16px; }
.tile__title { font-weight: 700; font-size: 1.1rem; }
.tile__desc { color: var(--text-muted); font-size: .82rem; margin-top: 4px; }
.tile__price { font-weight: 800; font-size: 1.15rem; margin-top: 10px; color: var(--text); }

/* Karty równej wysokości. W gridzie wiersze i tak się rozciągają, ale treść
   pływała: cena i przycisk lądowały na różnej wysokości (raz wyżej, raz niżej),
   bo nad nimi była różna ilość tekstu. Tu tytuł i opis dostają stałą liczbę linii,
   a cena z przyciskiem spływa na dół karty. Wspólne dla katalogu, klastra,
   kursów i profilu sprzedawcy (wszędzie klasa .product-tile). */
.tile { height: 100%; }
.product-tile .tile__body { flex: 1 1 auto; display: flex; flex-direction: column; }
.product-tile .tile__title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em; line-height: 1.3;
}
.product-tile .tile__desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.4;
}
/* cena i wszystko po niej (badge niskiego stanu, przycisk) spływa na dół */
.product-tile .tile__price,
.product-tile .stat__value { margin-top: auto; }
/* przycisk bezpośrednio pod ceną, pełna szerokość, jednakowo w każdym widoku */
.product-tile .tile__body > .btn { width: 100%; margin-top: 8px; }

/* Karty klastra: to samo wyrównanie co karty produktu. Pudełka i tak są równej
   wysokości (grid), a przycisk „Dołącz / Wejdź" ma spływać na dół, żeby był na
   jednej linii we wszystkich kartach (koniec pływania raz wyżej, raz niżej). */
.cluster-tile .tile__body { flex: 1 1 auto; display: flex; flex-direction: column; }
.cluster-tile .tile__desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.4;
}
.cluster-tile__action { margin-top: auto; padding-top: 12px; }
.cluster-tile__action .btn { width: 100%; }

/* Overlay (modale / formularze) */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 9998;
}
.overlay .card { max-width: 440px; width: 100%; }

/* Czat (WhatsApp-like) */
.chat { display: grid; grid-template-columns: 280px 1fr; gap: 0; height: 70vh; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.chat__list { border-right: 1px solid var(--border); padding: 8px; overflow-y: auto; background: var(--surface-2); }
.chat__conv { position: relative; padding: 10px; border-radius: var(--radius-sm); cursor: pointer; }
.chat__conv:hover, .chat__conv.active { background: var(--bg); }
.chat__conv-title { font-weight: 600; }
.chat__conv-last { font-size: .82rem; }
.chat__badge { position: absolute; right: 8px; top: 10px; background: var(--brand); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .72rem; font-weight: 700; }
.chat__main { display: flex; flex-direction: column; min-width: 0; }
.chat__main-inner { padding: 16px; overflow-y: auto; }
.chat__empty { padding: 24px; }
.chat__header { padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 700; }
.chat__thread { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.chat__composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); align-items: center; }
.chat__composer input { flex: 1; padding: 10px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.chat__back { display: none; }
/* Mobile: jeden ekran naraz (jak WhatsApp), lista albo rozmowa */
@media (max-width: 720px) {
  .chat { grid-template-columns: 1fr; height: 78dvh; min-height: 420px; }
  .chat__list { border-right: none; }
  .chat__main { display: none; }
  .chat.chat--open .chat__list { display: none; }
  .chat.chat--open .chat__main { display: flex; }
  .chat__back { display: inline-flex; margin-right: 6px; }
  .chat__header { display: flex; align-items: center; gap: 4px; }
}

.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; }
.msg--me { align-self: flex-end; flex-direction: row-reverse; }
.msg__bubble { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 8px 12px; }
.msg--me .msg__bubble { background: var(--brand); border-color: var(--brand); color: #fff; }
.msg__sender { font-size: .75rem; font-weight: 700; color: var(--brand); margin-bottom: 2px; }
.msg__meta { display: flex; gap: 4px; align-items: center; justify-content: flex-end; font-size: .7rem; margin-top: 2px; }
.msg--me .msg__meta .muted { color: rgba(255,255,255,.8); }
.msg__ticks { opacity: .7; } .msg__ticks.read { color: #9be7ff; opacity: 1; }
.msg__deleted { font-style: italic; opacity: .7; }
.msg__actions { display: none; gap: 2px; }
.msg:hover .msg__actions { display: flex; }
.msg__act { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; padding: 2px 5px; font-size: .85rem; }
.msg__reacts { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.msg__react { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; font-size: .75rem; cursor: pointer; color: var(--text); }
.msg__react.mine { border-color: var(--brand); }

/* Emoji picker */
.emoji-panel { position: absolute; bottom: 48px; left: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; z-index: 50; }
.emoji-cell { background: none; border: none; cursor: pointer; font-size: 1.2rem; padding: 4px; border-radius: 6px; }
.emoji-cell:hover { background: var(--surface-2); }

/* Strona główna, baner (kontenerowy) */
.hero { background: linear-gradient(135deg, #16181D 0%, #2A1A12 55%, var(--brand-deep) 100%); color: #fff;
  padding: 44px 40px; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero__eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .15em; font-size: .8rem; font-weight: 700; color: var(--brand); margin-bottom: 10px; }
.hero__title { font-size: 2rem; font-weight: 900; line-height: 1.18; max-width: 720px; margin: 0 0 14px; }
.hero__lead { font-size: 1.08rem; color: #D8D8D8; max-width: 620px; margin: 0 0 24px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn--ghost-light { background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
@media (max-width: 640px) {
  .hero { padding: 22px 18px; }
  .hero__title { font-size: 1.5rem; margin-bottom: 10px; }
  .hero__lead { font-size: .98rem; margin-bottom: 18px; }
  .hero__cta { gap: 10px; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
}

/* Kafle funkcji na stronie głównej */
.feature { text-decoration: none; color: var(--text); transition: transform .15s, border-color .15s; }
.feature:hover { transform: translateY(-3px); border-color: var(--brand); text-decoration: none; }
.feature__icon { font-size: 2rem; margin-bottom: 8px; }

/* Kolorowe kafle szybkiego dostępu (panel) */
.qtile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.qtile { position: relative; overflow: hidden; min-height: 132px; border-radius: 16px; padding: 22px 24px; color: #fff !important; text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: 0 6px 18px rgba(0,0,0,.10); transition: transform .15s, box-shadow .15s; }
.qtile:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0,0,0,.20); text-decoration: none; }
.qtile h3 { margin: 0; font-size: 1.18rem; position: relative; z-index: 1; }
.qtile p { margin: 4px 0 0; font-size: .84rem; opacity: .9; position: relative; z-index: 1; }
.qtile__ico { position: absolute; top: -14px; right: -14px; width: 116px; height: 116px; opacity: .22; color: #fff; }
.qtile__ico svg { width: 100%; height: 100%; }

/* Kafle klastrów na Starcie, siatka 4 w rzędzie */
.grid--clusters { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }
.grid--clusters .tile__img { aspect-ratio: 16/10; }
.grid--clusters .tile__title { font-size: 1rem; }
.grid--clusters .tile__desc { font-size: .78rem; }
@media (max-width: 1100px) { .grid--clusters { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .grid--clusters { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .grid--clusters { grid-template-columns: 1fr; } }

/* Ikona liniowa inline w rozmiarze tekstu (etykiety, listy, przyciski) */
.tico { display: inline-flex; align-items: center; justify-content: center; width: 1em; height: 1em; vertical-align: -0.14em; flex: 0 0 auto; }
.tico svg { width: 100%; height: 100%; display: block; }
.tico--muted { color: var(--text-muted); opacity: .85; }

/* Licznik społeczności na Starcie (kafelek w rogu) + kafel poleceń pod nim */
.hero { position: relative; }
.hero__corner { position: absolute; top: 16px; right: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 1; }
.member-counter { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px; box-shadow: 0 4px 14px rgba(0,0,0,.10); }
.member-counter__ico { display: inline-flex; color: var(--brand); }
.member-counter__ico svg { width: 24px; height: 24px; }
.member-counter__n { font-size: 1.3rem; font-weight: 800; line-height: 1; color: var(--text); }
.member-counter__l { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
/* Mały dodatek: poleć platformę (na grafice, pod licznikiem) */
.hero__invite { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.30); color: #fff; border-radius: 10px; padding: 6px 12px; font-size: .8rem; font-weight: 600; cursor: pointer; backdrop-filter: blur(4px); transition: background .15s, border-color .15s; }
.hero__invite:hover { background: rgba(255,255,255,.24); border-color: #fff; }
@media (max-width: 640px) {
  .hero__corner { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 14px; }
  .hero__invite { font-size: .82rem; padding: 7px 12px; }
}

/* Kompaktowy pasek ofert: szukanie + Filtry (dropdown) + Sortuj + Kafle/Lista, w jednej linii */
.otoolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.otoolbar__group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.osearch, .osort { height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; transition: border-color .12s, box-shadow .12s; }
.osearch { max-width: 190px; }
.osearch::-webkit-search-cancel-button { cursor: pointer; }
.osearch:focus, .osort:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(240,80,16,.15); }
.osort { appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer; padding-right: 30px; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.dropdown { position: relative; }
.dropdown__panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 14px; min-width: 250px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 640px) { .dropdown__panel { right: auto; left: 0; } .osearch { max-width: 150px; } }

/* Pasek wyszukiwania i filtrów ofert (sklep) */
.filter-bar { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin: 0 0 20px; display: flex; flex-direction: column; gap: 12px; }
.fbar__search { display: flex; gap: 8px; }
.fbar__q { flex: 1; }
.fbar__filters { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-end; }
.fbar__field { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; }
.fbar__lbl { color: var(--text-muted); font-weight: 600; }
.fbar__range { display: flex; align-items: center; gap: 6px; }
.fbar__check { display: flex; align-items: center; gap: 6px; font-size: .85rem; align-self: center; }

/* Pola w panelu filtrów: spójne z resztą formularzy (zaokrąglone, focus marki),
   zamiast natywnego wyglądu przeglądarki. */
.dropdown__panel select,
.dropdown__panel input[type="number"],
.dropdown__panel input[type="text"] {
  width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: .92rem;
}
.dropdown__panel select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer; padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.dropdown__panel select:focus,
.dropdown__panel input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(240,80,16,.15); }
.dropdown__panel .fbar__range input { width: 84px; }
.dropdown__panel .fbar__check input[type="checkbox"] { width: auto; accent-color: var(--brand); }
.dropdown__panel .fbar__field { gap: 6px; }
@media (max-width: 640px) { .fbar__filters { gap: 10px; } .fbar__field { flex: 1 1 40%; } }

/* Panel filtrów (listy w panelu admina): szukajka, chipy okresu, pola zaawansowane */
.filters { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 14px; }
.filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filters__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 14px; padding-top: 4px; border-top: 1px solid var(--border); }
.filters__f { display: flex; flex-direction: column; gap: 5px; }
.filters__lbl { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.filters input, .filters select {
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: .9rem;
  transition: border-color .12s, box-shadow .12s; width: 100%;
}
.filters input:hover, .filters select:hover { border-color: #CFCEC6; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(240,80,16,.15); }
.filters input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.filters select { appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer; padding-right: 32px; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.filters__search { position: relative; flex: 1 1 280px; min-width: 200px; }
.filters__search .tico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 15px; height: 15px; pointer-events: none; }
.filters__search input { padding-left: 36px; }
/* Plakietka statusu (np. status wysyłki przy zamówieniu) */
.chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 700; background: rgba(240,80,16,.12); color: var(--brand); }

/* Oś statusu wysyłki w szczegółach zakupu */
.ship-timeline { display: flex; gap: 4px; }
.ship-step { flex: 1; text-align: center; position: relative; color: var(--text-muted); font-size: .8rem; }
.ship-step .ship-dot { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--border); margin: 0 auto 6px; position: relative; z-index: 1; }
/* linia łącząca kroki */
.ship-step::before { content: ''; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.ship-step:first-child::before { display: none; }
.ship-step--done { color: var(--text); }
.ship-step--done .ship-dot { background: var(--green, #2e7d32); }
.ship-step--done::before { background: var(--green, #2e7d32); }
.ship-step--now .ship-label { font-weight: 800; color: var(--green, #2e7d32); }

.chip-btn { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 6px 14px; font-size: .82rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.chip-btn:hover { border-color: var(--brand); color: var(--brand); }
.chip-btn--on { background: rgba(240,80,16,.12); border-color: var(--brand); color: var(--brand); }
.table-wrap { overflow-x: auto; }
@media (max-width: 640px) { .filters { padding: 14px; } .filters__grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }

/* Mini-instrukcja: kółko „?" z dymkiem */
.help-badge { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 11px; font-weight: 700; cursor: help; position: relative; vertical-align: middle; margin-left: 6px; padding: 0; line-height: 1; }
.help-badge:hover { border-color: var(--brand); color: var(--brand); }
.help-pop { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 230px; max-width: 62vw; background: #1f2430; color: #fff; padding: 8px 10px; border-radius: 8px; font-size: .78rem; font-weight: 400; line-height: 1.45; text-align: left; box-shadow: 0 8px 24px rgba(0,0,0,.22); opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 60; pointer-events: none; white-space: normal; }
.help-badge:hover .help-pop, .help-badge--open .help-pop { opacity: 1; visibility: visible; }

/* Pływający pomocnik (help widget) */
.help-fab { position: fixed; right: 18px; bottom: 18px; width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff; border: none; font-size: 1.5rem; font-weight: 800; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.28); z-index: 900; display: flex; align-items: center; justify-content: center; }
.help-fab:hover { filter: brightness(1.06); }
.help-panel { position: fixed; right: 18px; bottom: 80px; width: 360px; max-width: calc(100vw - 36px); max-height: 70vh; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.28); z-index: 901; display: flex; flex-direction: column; overflow: hidden; }
.help-panel__head { padding: 14px 16px; background: var(--brand); color: #fff; }
.help-panel__head h3 { margin: 0; font-size: 1.05rem; }
.help-panel__head p { margin: 2px 0 0; font-size: .8rem; opacity: .9; }
.help-panel__search { margin: 10px 12px 0; }
.help-panel__body { overflow: auto; padding: 8px 12px 12px; }
.help-topic { border: 1px solid var(--border); border-radius: 10px; margin-top: 8px; overflow: hidden; }
.help-topic__q { width: 100%; text-align: left; background: var(--surface); border: none; padding: 10px 12px; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--text); display: flex; justify-content: space-between; gap: 8px; }
.help-topic__q:hover { background: var(--surface-2); }
.help-topic__a { padding: 0 12px 12px; font-size: .86rem; color: var(--text-muted); line-height: 1.5; }
.help-cat { font-size: .74rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); margin: 14px 0 2px; }

/* Wprowadzenie (onboarding tour) */
.tour-card { max-width: 420px; width: 100%; text-align: center; position: relative; padding: 28px 24px; }
.tour-skip { position: absolute; top: 10px; right: 10px; }
.tour-ico { width: 60px; height: 60px; margin: 4px auto 10px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; }
.tour-ico svg { width: 30px; height: 30px; }

/* Recenzje i oceny */
.stars { display: inline-flex; gap: 1px; color: #d9d9de; font-size: 1rem; line-height: 1; }
.stars .star--on { color: #F5B301; }
.rating-badge { display: inline-flex; align-items: center; }
.rating-badge-link { text-decoration: none; }
.star-pick { display: inline-flex; gap: 6px; font-size: 1.9rem; color: #d9d9de; margin: 4px 0 12px; }
.star-pick .star { cursor: pointer; transition: transform .12s ease, color .12s ease; }
.star-pick .star:hover { transform: scale(1.18); }
.star-pick .star--on { color: #F5B301; }
.rev-summary { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.rev-summary__score { text-align: center; min-width: 110px; }
.rev-summary__avg { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.rev-bars { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.rev-bar { display: flex; align-items: center; gap: 8px; }
.rev-bar__n { width: 28px; font-size: .82rem; color: var(--text-muted); }
.rev-bar__track { flex: 1; height: 8px; background: var(--surface-2, var(--border)); border-radius: 4px; overflow: hidden; }
.rev-bar__fill { display: block; height: 100%; background: #F5B301; }
.rev-form { margin: 16px 0; }
.rev-form input, .rev-form textarea {
  width: 100%; box-sizing: border-box; margin-bottom: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: .95rem; font-family: inherit;
}
.rev-form textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.rev-form input:focus, .rev-form textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.rev-form input::placeholder, .rev-form textarea::placeholder { color: var(--text-muted); }
.review { padding: 14px 0; border-top: 1px solid var(--border); }
.review--pending { opacity: .8; }
.review__head { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.rev-actions { display: flex; gap: 6px; margin-top: 8px; }
.btn--xs { padding: 3px 8px; font-size: .75rem; }
.tour-title { margin: 0 0 8px; font-size: 1.3rem; }
.tour-text { color: var(--text-muted); margin: 0 0 14px; line-height: 1.5; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin: 10px 0 14px; }
.tour-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.tour-dot--on { background: var(--brand); }
.tour-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* Koszyk */
.cart-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.cart-row { display: grid; grid-template-columns: 64px 1fr auto 100px auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.cart-row:last-child { border-bottom: none; }
.cart-row__img { width: 64px; height: 64px; border-radius: 8px; background: var(--surface-2) center/cover no-repeat; }
.cart-row__name { font-weight: 700; color: var(--text); text-decoration: none; }
.cart-row__name:hover { color: var(--brand); }
.cart-row__qty { display: flex; align-items: center; gap: 6px; }
.cart-row__sum { font-weight: 800; text-align: right; }
.cart-summary { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.cart-summary__total { font-size: 1.3rem; }
@media (max-width: 640px) {
  .cart-row { grid-template-columns: 56px 1fr auto; }
  .cart-row__qty, .cart-row__sum { grid-column: 2 / -1; justify-content: flex-start; text-align: left; }
}

/* Edytor tekstu sformatowanego (opis produktu) */
.rte { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.rte__bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.rte__btn { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 3px 9px; cursor: pointer; font-size: .85rem; line-height: 1.4; }
.rte__btn:hover { border-color: var(--brand); }
.rte__sel { padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: .82rem; background: #fff; }
.rte__color { width: 30px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; background: #fff; }
.rte__area { min-height: 150px; max-height: 340px; overflow-y: auto; padding: 10px 12px; outline: none; font-size: .92rem; line-height: 1.5; }
.rte__area:empty::before { content: 'Wpisz opis produktu…'; color: var(--text-muted); }
.rte-content { line-height: 1.6; }
.rte-content ul, .rte-content ol { margin: 8px 0 8px 22px; }
.rte-content a { color: var(--brand); }
.overlay .card.modal--wide { max-width: 840px; }

/* Konfigurator, kafelki integracji */
.intg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.intg-tile { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; cursor: pointer; display: flex; flex-direction: column; min-height: 120px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.intg-tile:hover { border-color: var(--brand); box-shadow: 0 8px 22px rgba(0,0,0,.08); transform: translateY(-2px); }
.intg-tile__name { font-weight: 700; font-size: 1.05rem; }
.intg-tile__desc { color: var(--text-muted); font-size: .82rem; margin-top: 4px; flex: 1; }
.intg-logo { object-fit: contain; margin-bottom: 10px; }
.intg-logo--badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: #fff; font-weight: 800; }

/* Admin → Klastry (lista) */
.kl-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); margin-top: 6px; }
.kl-row { display: grid; grid-template-columns: 96px minmax(180px, 1.6fr) minmax(210px, 1fr) auto; gap: 16px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.kl-row:last-child { border-bottom: none; }
.kl-row__img { width: 96px; height: 54px; border-radius: 8px; background: var(--surface-2) center/cover no-repeat; flex-shrink: 0; }
.kl-row__name { font-weight: 700; font-size: 1.05rem; }
.kl-row__meta { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.kl-row__actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 820px) {
  .kl-row { grid-template-columns: 72px 1fr; }
  .kl-row__img { width: 72px; height: 40px; }
  .kl-row__meta, .kl-row__actions { grid-column: 2 / -1; }
  .kl-row__actions { justify-content: flex-start; }
}

/* Hub klastra */
.klaster-hero { position: relative; overflow: hidden; border-radius: 18px; padding: 30px 32px; color: #fff; margin: 18px 0 8px; }
.klaster-hero__eyebrow { font-size: .74rem; font-weight: 800; letter-spacing: .1em; opacity: .85; }
.klaster-hero h1 { margin: 6px 0 6px; position: relative; z-index: 1; }
.klaster-hero p { margin: 0; opacity: .92; max-width: 70%; position: relative; z-index: 1; }
.klaster-hero__ico { position: absolute; right: -20px; top: 50%; transform: translateY(-50%); width: 190px; height: 190px; opacity: .18; color: #fff; }
.klaster-hero__ico svg { width: 100%; height: 100%; }
.klaster-note { background: rgba(240,80,16,.08); border: 1px solid var(--brand); border-radius: 10px; padding: 12px 14px; font-size: .88rem; margin-top: 12px; }
.klaster-tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--border); margin-top: 18px; flex-wrap: wrap; }
.klaster-tab { border: none; background: none; padding: 10px 18px; font-weight: 700; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.klaster-tab--on { color: var(--brand); border-bottom-color: var(--brand); }
.member-card { display: flex; flex-direction: column; }
.chip-link { display: inline-block; background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font-size: .78rem; margin: 2px 4px 2px 0; color: var(--text); text-decoration: none; }
.chip-link:hover { background: var(--brand); color: #fff; }

/* Tematyczna grafika nagłówka klastra */
.cluster-graphic { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px 20px; color: #fff; aspect-ratio: 16/9; }
.cluster-graphic__eyebrow { position: absolute; top: 16px; left: 20px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; opacity: .85; }
.cluster-graphic__name { font-size: 1.35rem; font-weight: 800; line-height: 1.1; position: relative; z-index: 1; max-width: 75%; }
.cluster-graphic__ico { position: absolute; right: -16px; top: 50%; transform: translateY(-50%); width: 116px; height: 116px; opacity: .20; color: #fff; }
.cluster-graphic__ico svg { width: 100%; height: 100%; }
.cluster-tile--member { border-color: #1E9E5A; }

/* Wspólny nagłówek portalu */
.site-header {
  display: flex; align-items: center; gap: 20px; padding: 10px 24px;
  background: var(--dark); position: sticky; top: 0; z-index: 100; flex-wrap: wrap;
}
.site-header__logo { display: flex; align-items: center; }
.site-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.site-nav a {
  color: #E8E8E8; padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: .95rem;
  text-decoration: none; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.06); text-decoration: none; }
.site-nav a.active { color: #fff; border-bottom-color: var(--brand); }
.site-auth { display: flex; gap: 12px; align-items: center; }
.site-auth a { color: #E8E8E8; text-decoration: none; font-weight: 600; }
.site-auth a:hover { color: #fff; }
.btn--sm { padding: 7px 14px; font-size: .9rem; }
.site-profile { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff !important; font-weight: 800; font-size: 1rem; flex-shrink: 0; border: none; cursor: pointer; transition: background .15s; }
.site-profile:hover { background: var(--brand); }

/* Ikony nagłówka (koperta, dzwonek) */
.hdr-iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.10); color: #fff !important; border: none; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.hdr-iconbtn:hover { background: var(--brand); }
.hdr-badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--header-bg, #1b1b1b); }

/* Popover (rozwijane menu) */
.hdr-pop { position: relative; }
.hdr-menu { position: absolute; top: calc(100% + 10px); right: 0; min-width: 230px; background: var(--surface, #fff); color: var(--text, #1b1b1b); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .14s, transform .14s; z-index: 1200; }
.hdr-menu--wide { min-width: 320px; max-width: 360px; max-height: 70vh; overflow-y: auto; }
.hdr-pop.open .hdr-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.hdr-menu__head { padding: 8px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.hdr-menu__head strong { color: var(--text); }
.hdr-menu__item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text) !important; text-decoration: none; font-weight: 600; }
.hdr-menu__item:hover { background: var(--bg, #f5f5f5); }
.hdr-menu__item:hover .hdr-menu__ico { color: var(--brand); }
.hdr-menu__ico { display: inline-flex; align-items: center; justify-content: center; width: 22px; flex-shrink: 0; color: var(--text-muted); transition: color .15s; }
.hdr-menu__divider { height: 1px; background: var(--border); margin: 4px 6px; }
.hdr-menu__item--admin { color: var(--brand) !important; font-weight: 700; }
.hdr-menu__item--admin .hdr-menu__ico { color: var(--brand); }
.notif-item { display: flex; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--text) !important; text-decoration: none; align-items: flex-start; }
.notif-item:hover { background: var(--bg, #f5f5f5); }
.notif-item__ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; }
.notif-item__ico svg { width: 17px; height: 17px; }
.notif-item__ico--commission { background: rgba(30,158,90,.12); color: #1E9E5A; }
.notif-item__ico--sale { background: rgba(240,80,16,.12); color: var(--brand); }
.notif-item__ico--review { background: rgba(245,180,20,.14); color: #E0A800; }
.notif-item__ico--payout { background: rgba(30,158,90,.12); color: #1E9E5A; }
.notif-item__ico--reply { background: rgba(60,120,240,.12); color: #3C78F0; }
.notif-item__ico--price { background: rgba(150,90,220,.12); color: #965ADC; }
.notif-item__ico--stock { background: rgba(200,60,20,.12); color: #C83C14; }
.tile__lowstock, .badge-lowstock { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: rgba(200,60,20,.12); color: #C83C14; }
.ad-banner--image { position: relative; padding: 0; overflow: hidden; display: block; }
.ad-banner__img { display: block; max-width: 100%; height: auto; }

/* Kreator krokowy (wizard) */
.wiz { width: 640px; max-width: 94vw; }
.wiz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.wiz-steps { display: flex; gap: 6px; margin-bottom: 16px; }
.wiz-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.wiz-step:not(:last-child)::after { content: ''; position: absolute; top: 13px; left: 50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.wiz-step--done:not(:last-child)::after { background: var(--brand); }
.wiz-step__dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 700; background: var(--surface-2, var(--border)); color: var(--text-muted); border: 2px solid transparent; }
.wiz-step--on .wiz-step__dot { background: var(--brand); color: #fff; }
.wiz-step--done .wiz-step__dot { background: var(--brand); color: #fff; }
.wiz-step__label { font-size: .74rem; color: var(--text-muted); text-align: center; line-height: 1.2; }
.wiz-step--on .wiz-step__label { color: var(--text); font-weight: 600; }
.wiz-content { overflow-y: auto; flex: 1; padding: 2px; }
.wiz-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.wiz-foot .btn { min-width: 120px; }
@media (max-width: 560px) { .wiz-step__label { display: none; } }

/* Globalny „+ Dodaj" (FAB) + menu wyboru */
/* „+" obok (na lewo od) pływającego pomocnika „?" (right:18/bottom:18), żeby się nie nakładały ani nie kolidowały z panelem pomocy */
.add-fab { position: fixed; right: 82px; bottom: 18px; z-index: 899; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; background: var(--brand); color: #fff; font-size: 1.9rem; line-height: 1; box-shadow: 0 6px 20px rgba(240,80,16,.45); transition: transform .12s ease, box-shadow .12s ease; }

/* Stepper ilości , ładny +/- zamiast systemowego pola number */
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.qty-stepper .qty-btn { border: 0; background: transparent; color: var(--text); width: 40px; height: 40px; font-size: 1.3rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .12s ease, color .12s ease; }
.qty-stepper .qty-btn:hover { background: var(--brand); color: #fff; }
.qty-stepper .qty-input { width: 46px; height: 40px; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; background: transparent; color: var(--text); font-size: 1rem; -moz-appearance: textfield; }
.qty-stepper .qty-input::-webkit-outer-spin-button, .qty-stepper .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper .qty-input:focus { outline: none; }
/* Kompaktowy wariant do szybkiego dodania z listy/kafla ofert */
.qty-stepper--sm { border-radius: 8px; }
.qty-stepper--sm .qty-btn { width: 30px; height: 30px; font-size: 1.1rem; }
.qty-stepper--sm .qty-input { width: 34px; height: 30px; font-size: .9rem; }
.offer-row__actions { align-items: center; }
.add-fab:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 10px 26px rgba(240,80,16,.5); }
.add-menu__item { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: transparent; border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; cursor: pointer; color: var(--text); transition: border-color .12s, background .12s; }
.add-menu__item:hover { border-color: var(--brand); background: var(--surface-2, rgba(240,80,16,.06)); }
.add-menu__ico { font-size: 1.7rem; line-height: 1; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--surface-2, var(--border)); flex-shrink: 0; }

/* Pusty stan */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px; }
.empty-state__ico { font-size: 2.6rem; width: 76px; height: 76px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-2, var(--border)); color: var(--brand); margin-bottom: 14px; }
.empty-state__ico .tico { width: 38px; height: 38px; }

/* Szybki start (checklista onboardingu) */
.qs-track { height: 8px; background: var(--surface-2, var(--border)); border-radius: 4px; overflow: hidden; }
.qs-fill { height: 100%; background: var(--brand); transition: width .3s ease; }
.qs-row { display: flex; align-items: center; gap: 10px; }
.qs-check { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: .8rem; color: #fff; }
.qs-check--on { background: #1E9E5A; border-color: #1E9E5A; }
.qgroup { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: 20px 0 2px; }
@media print {
  .no-print { display: none !important; }
  .cert-holder { box-shadow: none !important; max-width: none !important; border-radius: 0 !important; }
  body { background: #fff !important; }
  @page { size: landscape; margin: 0; }
}
.notif-item__text { font-size: .88rem; line-height: 1.35; }
.notif-item__time { font-size: .74rem; margin-top: 2px; }
.notif-empty { padding: 16px 12px; text-align: center; }

/* Pulpit admina, centrum dowodzenia */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.dash-range { font-size: .85rem; }
.seg-toggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.seg { border: none; background: none; padding: 7px 16px; border-radius: 8px; font-weight: 600; font-size: .9rem; color: var(--text-muted); cursor: pointer; }
.seg--on { background: var(--brand); color: #fff; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.kpi--accent { border-left: 4px solid var(--brand); }
.kpi__value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.kpi__label { font-weight: 600; margin-top: 4px; }
.kpi__sub { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.alert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.alert-card { display: flex; align-items: center; gap: 12px; background: rgba(240,80,16,.06); border: 1px solid var(--brand); border-radius: 12px; padding: 14px 16px; color: var(--text) !important; text-decoration: none; }
.alert-card__n { font-size: 1.6rem; font-weight: 800; color: var(--brand); }
.alert-card__l { font-weight: 600; font-size: .9rem; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 170px; margin-top: 12px; padding: 8px 0; }
.chart__col { flex: 1; min-width: 3px; height: 100%; display: flex; align-items: flex-end; }
.chart__bar { width: 100%; background: linear-gradient(var(--brand), #f7935f); border-radius: 3px 3px 0 0; min-height: 2px; transition: opacity .15s; }
.chart__col:hover .chart__bar { opacity: .75; }
.chart__axis { display: flex; justify-content: space-between; font-size: .76rem; margin-top: 4px; }
.dash-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-top: 16px; }

/* Admin → Klienci */
.table--rows tbody tr { transition: background .12s; }
.table--rows tbody tr:hover { background: var(--bg); }
.klienci-toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 14px 0 12px; }
.role-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.role-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .88rem; cursor: pointer; color: var(--text); }
.role-chip:hover { border-color: var(--brand); }
.role-chip--on { background: var(--brand); color: #fff; border-color: var(--brand); }
.role-chip__n { background: rgba(0,0,0,.12); border-radius: 999px; padding: 1px 8px; font-size: .78rem; }
.role-chip--on .role-chip__n { background: rgba(255,255,255,.28); }
.role-badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); vertical-align: middle; }
.role-klient { background: #eef2f7; color: #4a5568; }
.role-polecajacy { background: rgba(30,158,90,.14); color: #1E9E5A; }
.role-pracownik { background: rgba(58,95,217,.14); color: #3A5FD9; }
.role-dyrektor { background: rgba(240,80,16,.14); color: var(--brand); }
.role-superadmin { background: #2b2b2b; color: #fff; }
.wallet-mini { display: flex; gap: 18px; }
.wallet-stat__v { font-weight: 800; }
.wallet-stat__l { font-size: .74rem; color: var(--text-muted); }
.klient-actions { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.klient-actions .inline { display: flex; gap: 6px; align-items: center; }
.inline { display: flex; gap: 10px; flex-wrap: wrap; }
.inline > .field { flex: 1; min-width: 130px; margin: 0; }
.checkrow { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: .9rem; }
.note-ok { background: rgba(30,158,90,.10); border: 1px solid #1E9E5A; border-radius: 8px; padding: 12px; font-size: .9rem; margin-top: 8px; }
.manage-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.manage-row:last-of-type { border-bottom: none; }
.manage-row__l { font-weight: 600; }
.manage-row__c { display: flex; gap: 6px; align-items: center; }

/* Zakładka Produkty w profilu klienta */
.bulk-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.bulk-bar__all { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; }
.bulk-bar__btns { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.btn--xs { padding: 4px 10px; font-size: .8rem; border-radius: 7px; }
.product-creator { margin: 16px 0; }
.product-creator > summary { display: inline-block; list-style: none; cursor: pointer; }
.product-creator > summary::-webkit-details-marker { display: none; }
.product-creator[open] > summary { margin-bottom: 12px; }
.product-creator > .card { margin: 0; }
.prod-list { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.prod-row { display: grid; grid-template-columns: 34px 52px minmax(180px, 1.4fr) minmax(150px, 1fr) 150px minmax(150px, auto); align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.prod-row:last-child { border-bottom: none; }
.prod-row--head { background: var(--surface-2); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding: 9px 16px; }
.prod-row--sel { background: rgba(240,80,16,.05); }
.prod-row__sel { display: flex; justify-content: center; }
.prod-row__sel input { width: 17px; height: 17px; cursor: pointer; }
.prod-row__thumb { width: 48px; height: 48px; border-radius: 8px; background: var(--surface-2) center/cover no-repeat; display: block; }
.prod-row__main { min-width: 0; }
.prod-row__name { font-weight: 700; color: var(--text); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-row__name:hover { color: var(--brand); }
.prod-row__price { font-size: .85rem; color: var(--text-muted); margin-top: 2px; }
.prod-row__stats { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-cell { display: flex; flex-direction: column; line-height: 1.1; }
.stat-cell strong { font-size: .95rem; }
.stat-cell small { font-size: .68rem; color: var(--text-muted); }
.prod-row__status { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.prod-row__actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 900px) {
  .prod-row { grid-template-columns: 28px 44px 1fr; row-gap: 8px; }
  .prod-row--head { display: none; }
  .prod-row__stats { grid-column: 2 / -1; }
  .prod-row__status { grid-column: 2 / -1; flex-direction: row; }
  .prod-row__actions { grid-column: 2 / -1; justify-content: flex-start; }
}
.overlay .card { max-height: 88vh; overflow-y: auto; }

/* Rozwijane sekcje (accordion) */
.acc { display: flex; flex-direction: column; gap: 12px; }
.acc__item { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.acc__item[open] { border-color: var(--brand); box-shadow: 0 6px 22px rgba(0,0,0,.06); }
.acc__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; font-weight: 700; font-size: 1.02rem; list-style: none; user-select: none; }
.acc__head::-webkit-details-marker { display: none; }
.acc__head:hover { background: var(--bg); }
.acc__chev { display: inline-flex; color: var(--text-muted); transition: transform .2s; }
.acc__item[open] .acc__chev { transform: rotate(180deg); color: var(--brand); }
.acc__body { padding: 4px 20px 20px; }

/* Strony konta */
.konto-title { margin: 4px 0 18px; font-size: 1.7rem; }
.konto-form { display: flex; flex-direction: column; gap: 2px; max-width: 520px; }
.konto-form .btn { align-self: flex-start; margin-top: 12px; }
.konto-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.konto-row:last-child { border-bottom: none; }
.konto-stats { display: flex; gap: 32px; margin-bottom: 16px; flex-wrap: wrap; }
.konto-stat__val { font-size: 1.5rem; font-weight: 800; }
.konto-stat__lbl { font-size: .82rem; color: var(--text-muted); }
.btn--danger { background: var(--red, #d33); border-color: var(--red, #d33); color: #fff; }
.btn--danger:hover { filter: brightness(.94); }
.site-burger { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
@media (max-width: 820px) {
  .site-nav, .site-auth { display: none; width: 100%; flex-direction: column; }
  .site-header.open .site-nav, .site-header.open .site-auth { display: flex; }
  .site-burger { display: block; margin-left: auto; }
}

/* Panel admina, układ z lewym menu */
.admin-layout { flex: 1 0 auto; display: flex; align-items: flex-start; background: var(--bg); }
/* Pasek boczny przyklejony na całą wysokość ekranu z własnym scrollem, aby wszystkie zakładki
   (np. Konfigurator na dole) były zawsze dostępne bez zjeżdżania długiej strony. */
/* Pasek boczny przyklejony POD topbarem, z własnym scrollem na resztę okna.
   Wcześniej top:0 + height:100vh chował górę paska pod topbarem, a dół (Konfigurator)
   wypadał poniżej ekranu i trzeba było zjeżdżać całą stroną. */
.admin-sidebar { width: 248px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px; position: sticky; top: var(--topbar-h); align-self: flex-start; height: calc(100vh - var(--topbar-h)); overflow-y: auto; overscroll-behavior: contain; }
.admin-content { flex: 1; min-width: 0; padding: 26px 32px; }
.admin-nav { display: flex; flex-direction: column; gap: 3px; }
.admin-nav__title { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); padding: 6px 12px 10px; }
.admin-nav__link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; transition: background .12s, color .12s; }
.admin-nav__ico { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: 0 0 auto; color: var(--text-muted); transition: color .12s; }
.admin-nav__ico svg { width: 20px; height: 20px; }
.admin-nav__label { line-height: 1.1; }
.admin-nav__link:hover { background: var(--surface-2); text-decoration: none; }
.admin-nav__link:hover .admin-nav__ico { color: var(--text); }
.admin-nav__link.active { background: rgba(240,80,16,.12); color: var(--brand); }
.admin-nav__link.active .admin-nav__ico { color: var(--brand); }
@media (max-width: 820px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); position: static; height: auto; overflow: visible; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; position: static; gap: 4px; }
  .admin-nav__title { width: 100%; padding: 2px 8px 6px; }
  .admin-nav__link { padding: 8px 12px; }
  .admin-content { padding: 18px; }
}

/* Kalendarz, widok miesięczny */
.cal-toolbar { display: flex; align-items: center; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.cal-legend { display: flex; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.cal-leg { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-muted); }
.cal-leg i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-wd { font-weight: 700; color: var(--text-muted); text-align: center; padding: 4px 0; font-size: .82rem; }
.cal-cell { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; min-height: 58px; padding: 5px 6px; display: flex; flex-direction: column; gap: 5px; }
.cal-out { opacity: .38; }
.cal-today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cal-daynum { font-weight: 700; font-size: .82rem; line-height: 1; }
.cal-dots { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; display: block; }
.cal-dot:hover { transform: scale(1.25); }
.cal-more { font-size: .64rem; color: var(--text-muted); line-height: 10px; }
.cat-szkolenie { background: #F05010; } .cat-webinar { background: #3A5FD9; } .cat-networking { background: #1E9E5A; } .cat-wydarzenie { background: #B07800; }
@media (max-width: 760px) { .cal-cell { min-height: 46px; padding: 4px; } .cal-dot { width: 8px; height: 8px; } .cal-legend { width: 100%; margin-left: 0; } }

/* Popover wydarzenia (hover na kropce w widoku miesiąca) */
.cal-pop { position: fixed; z-index: 9999; width: 268px; max-width: 88vw; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 34px rgba(20,34,75,.20); padding: 12px 14px; }
.cal-pop__cat { display: inline-block; color: #fff; font-size: .68rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; margin-bottom: 7px; }
.cal-pop__title { font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 6px; }
.cal-pop__meta { color: var(--text-muted); font-size: .8rem; margin-top: 2px; }
.cal-pop__desc { color: var(--text-muted); font-size: .8rem; margin-top: 7px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cal-monthnav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-gridwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Kalendarz, widok listy (agenda) */
.agenda { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.agenda__day { display: grid; grid-template-columns: 104px 1fr; border-bottom: 1px solid var(--border); }
.agenda__day:last-child { border-bottom: none; }
.agenda__date { padding: 12px 14px; font-weight: 700; color: var(--text-muted); text-transform: capitalize; background: var(--surface-2); font-size: .85rem; }
.agenda__items { display: flex; flex-direction: column; min-width: 0; }
.agenda__item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 11px 14px; color: inherit; border-bottom: 1px solid var(--border); }
.agenda__items .agenda__item:last-child { border-bottom: none; }
.agenda__item:hover { background: var(--surface-2); text-decoration: none; }
.agenda__time { font-weight: 700; color: var(--brand); font-size: .9rem; font-variant-numeric: tabular-nums; }
.agenda__main { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.agenda__title { font-weight: 600; color: var(--text); }
.agenda__dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: middle; }
.agenda__loc { font-size: .85rem; }
.agenda__cat { font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
@media (max-width: 640px) {
  .agenda__day { grid-template-columns: 1fr; }
  .agenda__item { grid-template-columns: 46px 1fr; }
  .agenda__cat { display: none; }
}

/* Baner produktu */
.product-banner { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--radius); margin-bottom: 20px; display: block; box-shadow: var(--shadow); }

/* Banery reklamowe */
.ad-carousel { margin-bottom: 18px; }
.ad-banner { position: relative; display: flex; align-items: center; gap: 20px; padding: 18px 24px; border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow); overflow: hidden; }
.ad-banner:hover { text-decoration: none; filter: brightness(1.06); }
.ad-banner__label { position: absolute; top: 8px; right: 12px; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; opacity: .55; }
.ad-banner__logo { height: 56px; width: auto; max-width: 130px; object-fit: contain; background: #fff; border-radius: 10px; padding: 7px; flex-shrink: 0; }
.ad-banner__txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ad-banner__txt strong { font-size: 1.2rem; }
.ad-banner__txt span { opacity: .92; }
.ad-banner__cta { font-weight: 700; white-space: nowrap; border: 1px solid currentColor; padding: 8px 16px; border-radius: 8px; }
@media (max-width: 620px) { .ad-banner__cta { display: none; } .ad-banner__txt strong { font-size: 1.05rem; } }

/* Tablica ogłoszeń (Aktualności) */
.announce { display: flex; gap: 0; padding: 0; overflow: hidden; margin-bottom: 16px; }
.announce__img { width: 300px; aspect-ratio: 16/9; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.announce__body { padding: 20px 24px; flex: 1; min-width: 0; }
.announce__date { color: var(--brand); font-weight: 700; font-size: .85rem; margin-bottom: 6px; }
.announce__text { margin-top: 8px; }
@media (max-width: 700px) { .announce { flex-direction: column; } .announce__img { width: 100%; } }

/* Stopka */
.site-footer { background: var(--dark); color: #D8D8D8; margin-top: auto; flex-shrink: 0; }
.site-footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; padding: 40px 24px; }
.site-footer__name { font-weight: 800; color: #fff; margin-top: 10px; }
.site-footer__tag { font-size: .88rem; margin-top: 4px; }
.site-footer__col h4, .site-footer__social h4 { color: #fff; font-size: .9rem; margin: 0 0 10px; }
.site-footer__col a { display: block; color: #D8D8D8; text-decoration: none; padding: 4px 0; }
.site-footer__col a:hover { color: var(--brand); }
.site-footer__social { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.site-footer__social a { color: #fff; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 24px; text-align: center; font-size: .82rem; color: #9A9A9A; }
@media (max-width: 720px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }

/* Baner cookies */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9997;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; display: flex; gap: 16px; align-items: center;
  justify-content: space-between; flex-wrap: wrap; max-width: 1100px; margin: 0 auto;
}
.cookie-banner__text { flex: 1; min-width: 240px; font-size: .9rem; color: var(--text-muted); line-height: 1.5; }
.cookie-banner__opt { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; color: var(--text); font-size: .88rem; cursor: pointer; }
.cookie-banner__opt input { margin-top: 3px; }
.cookie-banner__btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Strony treści (regulamin/polityka) */
.legal-content { line-height: 1.7; }
.legal-content h1, .legal-content h2, .legal-content h3 { margin-top: 1.2em; }

/* Toast */
.toast-host { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 9999; }
.toast { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border);
  box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: all .25s; max-width: 340px; }
.toast--show { opacity: 1; transform: translateY(0); }
.toast--ok  { border-left: 3px solid var(--green); }
.toast--err { border-left: 3px solid var(--red); }

/* =====================================================
   Awatary + Grupy (społeczność) + lista ofert + segmenty
   ===================================================== */

/* Awatar (zdjęcie lub inicjały) */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex: 0 0 auto; overflow: hidden; }
.avatar--initials { color: #fff; font-weight: 700; line-height: 1; letter-spacing: .02em; }

/* Kompaktowy rząd członków (hub klastra / grupa) */
.member-avatars { display: flex; flex-wrap: wrap; gap: 12px; }
.member-chip { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; background: none; border: none; cursor: pointer; padding: 6px 4px; border-radius: var(--radius-sm); }
.member-chip:hover { background: var(--surface-2); }
.member-chip__name { font-size: .74rem; color: var(--text); text-align: center; line-height: 1.15; word-break: break-word; }

/* Segment (przełącznik kafle/lista) */
.seg-group { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.seg { border: none; background: var(--surface); padding: 6px 12px; font-size: .82rem; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.seg + .seg { border-left: 1px solid var(--border); }
.seg--on { background: var(--brand); color: #fff; }

/* Lista ofert (obok kafli) */
.offer-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.offer-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.offer-row:last-child { border-bottom: none; }
.offer-row__thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--surface-2) center/cover no-repeat; display: block; }
.offer-row__main { min-width: 0; color: inherit; }
.offer-row__main:hover { text-decoration: none; }
.offer-row__name { font-weight: 700; color: var(--text); }
.offer-row__desc { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offer-row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.offer-row__price { font-weight: 800; color: var(--brand); white-space: nowrap; }
.offer-row__actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Picker gotowych grafik klastra */
.kl-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.kl-preset { width: 104px; height: 58px; border-radius: 8px; background: var(--surface-2) center/cover no-repeat; border: 2px solid transparent; cursor: pointer; padding: 0; transition: border-color .12s, transform .12s; }
.kl-preset:hover { transform: translateY(-1px); }
.kl-preset--on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(240,80,16,.2); }

/* Paginacja (oferty, produkty, klastry) */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.pager__info { font-size: .86rem; }
.pager__nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pager__pages { font-size: .86rem; font-weight: 600; color: var(--text-muted); min-width: 44px; text-align: center; }
.pager__per { height: 34px; }

/* Okno potwierdzenia (zamiast natywnego confirm) */
.confirm-card { max-width: 420px; }
.confirm-card__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Lista grup */
.group-list { display: flex; flex-direction: column; gap: 12px; }
.group-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: inherit; }
.group-row:hover { text-decoration: none; box-shadow: var(--shadow); }
.group-row__cover { width: 84px; height: 60px; border-radius: var(--radius-sm); background: var(--surface-2) center/cover no-repeat; display: block; }
.group-row__body { min-width: 0; }
.group-row__title { font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.group-row__side { display: flex; align-items: center; }

/* Nagłówek grupy */
.group-hero { border-radius: 18px; overflow: hidden; margin: 18px 0 8px; background: var(--surface); border: 1px solid var(--border); }
.group-hero__cover { height: 180px; background: var(--surface-2) center/cover no-repeat; }
.group-hero__head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 20px; }

/* Composer i posty */
.group-composer { margin-top: 16px; }
.group-composer__ta { flex: 1; width: 100%; resize: vertical; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; }
.post { margin-top: 14px; }
.post--pinned { border-left: 3px solid var(--brand); }
.post__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post__author { font-weight: 700; }
.post__body { white-space: pre-wrap; word-break: break-word; }
.post__foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.post__count { font-size: .82rem; }

/* Reakcje */
.react-picker { display: flex; gap: 4px; margin-top: 8px; }
.react-emoji { border: 1px solid var(--border); background: var(--surface); border-radius: 20px; padding: 4px 8px; font-size: 1.1rem; cursor: pointer; line-height: 1; }
.react-emoji:hover { transform: scale(1.15); }
.react-emoji--on { background: var(--brand); border-color: var(--brand); }

/* Komentarze */
.post__comments { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.comment { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; }
.comment__bubble { background: var(--surface-2); border-radius: 14px; padding: 8px 12px; flex: 1; min-width: 0; }
.comment__author { font-weight: 700; font-size: .84rem; }
.post__addcomment { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.post__addcomment input { flex: 1; border: 1px solid var(--border); border-radius: 20px; padding: 8px 14px; font: inherit; }

/* --- Mobile: hub klastra + grupy jednokolumnowo --- */
@media (max-width: 640px) {
  .klaster-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .klaster-tab { white-space: nowrap; }
  .offer-row { grid-template-columns: 56px 1fr; }
  .offer-row__side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .group-row { grid-template-columns: 64px 1fr; }
  .group-row__side { grid-column: 2 / -1; justify-content: flex-start; }
  .group-row__cover { width: 64px; height: 48px; }
  .group-hero__cover { height: 120px; }
  .member-chip { width: 72px; }
  .dash-cols { grid-template-columns: 1fr; }
  .manage-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Panel admina, dopracowanie treści */
.admin-content h1 { font-size: 1.5rem; font-weight: 800; margin: 0 0 16px; }
.admin-content h2 { font-size: 1.15rem; }
.admin-content .card { border-radius: 14px; }
.admin-content .card + .card { margin-top: 16px; }
