/* Planner – panel w układzie Tabler (web/layouts/tabler.html).
   Menu pionowe przy lewej krawędzi (układ „fluid” Tablera), treść na całą szerokość; menu stałe, na życzenie same ikony (N28).
   Kolory tylko ze zmiennych Tablera, więc działają w trybie jasnym i ciemnym (N23). Krój Inter (N26, P1). */

:root { --tblr-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --gr-line: var(--tblr-border-color); --gr-surface: var(--tblr-bg-surface); --gr-muted: var(--tblr-secondary);
  --gr-soft: var(--tblr-bg-surface-secondary); --gr-strong: color-mix(in srgb, var(--tblr-body-color) 38%, var(--tblr-bg-surface));
  /* Kolory zależne od trybu: mieszane z tłem karty, więc działają w jasnym i ciemnym. */
  --gr-danger-soft: color-mix(in srgb, var(--tblr-red) 13%, var(--tblr-bg-surface));
  --gr-hc1: color-mix(in srgb, var(--tblr-body-color) 5%, var(--tblr-bg-surface));
  --gr-hc2: color-mix(in srgb, var(--tblr-body-color) 11%, var(--tblr-bg-surface));
  --gr-hc3: color-mix(in srgb, var(--tblr-body-color) 20%, var(--tblr-bg-surface)); }
/* ---------- N33: kolory jak w Voucherach (vouchery panel.css, N48 wariant B) ----------
   Jasny: szare tło strony, białe karty z lekkim cieniem, linia między menu a treścią, ciemniejszy tekst pomocniczy
   (#5F6368: 6,1:1 na bieli). Ciemny: neutralny grafit – tło #141619, menu #1A1D21, karty #212429, linie #30343B,
   tekst pomocniczy #A3A9B3. Reguła ciemna musi stać po jasnej (ta sama waga). */
:root, [data-bs-theme=light] {
  --tblr-body-bg: #f2f3f5; --tblr-secondary: #5f6368; --tblr-secondary-rgb: 95, 99, 104;
  --gr-side: var(--tblr-bg-surface); --gr-side-line: #e3e4e8; --gr-th-bg: #f4f5f7; --gr-th-text: #4b5563;
  --gr-card-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
}
[data-bs-theme=dark] {
  --tblr-body-bg: #141619; --tblr-body-bg-rgb: 20, 22, 25; --tblr-bg-surface: #212429; --tblr-bg-surface-secondary: #292c32;
  --tblr-bg-surface-tertiary: #1a1d21; --tblr-bg-forms: #1a1d21; --tblr-border-color: #30343b; --tblr-border-color-translucent: rgba(255, 255, 255, .08);
  --tblr-secondary: #a3a9b3; --tblr-secondary-rgb: 163, 169, 179;
  --gr-side: #1a1d21; --gr-side-line: #30343b; --gr-th-bg: #292c32; --gr-th-text: #c3c8d0;
  --gr-card-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .2);
}
body { background: var(--tblr-body-bg); }
.card { box-shadow: var(--gr-card-shadow); }
/* Nagłówki tabel Tablera na szarym tle (pełny kolor – także pod przyklejonym nagłówkiem). Siatki harmonogramu i kart czasu
   (.gr-schedule, .gr-matrix) nie mają klasy .table i zostają przy swoich nagłówkach. */
.table thead th { background: var(--gr-th-bg); color: var(--gr-th-text); font-weight: 600; }

body { font-feature-settings: "cv11", "ss01"; }   /* Inter: proste „1” i „l”, czytelniejsze liczby (jak w makiecie N26) */
.num, .text-end, td, .gr-schedule, .gr-matrix { font-variant-numeric: tabular-nums; }
.text-small { font-size: .8125rem; }

/* ---------- znak aplikacji (N34: znak Plannera w rodzinie NEX, makieta rejestr/proto/n34-ikona) ----------
   Znak to SVG z własnymi kolorami (web/partials/app_mark.html) – zawsze fiolet Plannera, niezależnie od trybu i od koloru
   głównego panelu (kolor firmy, N43). Napis „NexApp Planner” (web/partials/logo_word.html) to ścieżki SVG krojem
   Bricolage Grotesque, wysokość 1em: „NexApp” w kolorze tekstu (color), „Planner” w fiolecie (--nx-accent), jak „NexApp POS”. */
.app-brand-mark { display: block; width: 2rem; height: 2rem; flex: none; }
.app-brand-mark-lg { width: 3rem; height: 3rem; }
.app-brand-name { display: inline-flex; align-items: center; min-width: 0; font-size: 1.25rem; line-height: 1; white-space: nowrap;
  color: var(--tblr-body-color); --nx-accent: #6741d9; }
[data-bs-theme=dark] .app-brand-name { color: #f2f5f8; --nx-accent: #a58bf0; }   /* jaśniejszy fiolet, czytelny na ciemnym tle (jak logo-ciemne.svg) */

/* ---------- menu boczne (N16: jak w centrali Eyebar – eyebar_pos/centrala/static/app.css:27-85; N28: stałe, wariant B) ---------- */
.gr-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.gr-brand:hover { text-decoration: none; }
.navbar-vertical {
  --tblr-navbar-active-bg: color-mix(in srgb, var(--tblr-primary) 12%, transparent);
  --nav-active-bar: var(--tblr-primary);
  background: var(--gr-side);
  box-shadow: inset -1px 0 0 var(--gr-side-line);  /* N33: linia oddzielająca menu od treści */
}
.navbar-vertical .navbar-nav .nav-link { position: relative; border-radius: var(--tblr-border-radius); }
/* Nagłówki sekcji (PRACA, ZESPÓŁ, FIRMA, SYSTEM): szare napisy Tablera, nieklikalne; mniejszy odstęp niż domyślny */
.navbar-vertical .nav-section-title { --tblr-sidebar-section-title-margin-top: .9rem; padding-top: .2rem; padding-bottom: .2rem; }
/* Aktywna pozycja: tło w kolorze głównym (12%), pasek 3 px po lewej, pogrubienie, ikona w kolorze głównym */
.navbar-vertical .navbar-nav > .nav-item.active > .nav-link { background: var(--tblr-navbar-active-bg); color: var(--tblr-body-color); font-weight: 600; }
.navbar-vertical .navbar-nav > .nav-item.active > .nav-link::before {
  content: ""; position: absolute; inset-block: .4rem; inset-inline-start: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--nav-active-bar);
}
.navbar-vertical .navbar-nav > .nav-item.active > .nav-link .nav-link-icon { color: var(--tblr-primary); }
/* Liczniki: małe, przy prawej krawędzi; znak „nowa karta” przy „Aplikacja wykonawcy” */
.navbar-vertical .navbar-nav .nav-link .badge { position: static; transform: none; margin-inline-start: auto; }
.navbar-vertical .nav-link .gr-ext { margin-inline-start: .35rem; font-size: .875rem; color: var(--tblr-secondary); }
/* „Zwiń do ikon” nad kontem, zawsze widoczny; ikona zależna od stanu bez czekania na skrypt */
.navbar-vertical .gr-fold { width: 100%; text-align: start; color: var(--tblr-secondary); border-radius: 8px; }
.navbar-vertical .gr-fold:hover { color: var(--tblr-body-color); }
.navbar-vertical .gr-fold:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: -2px; }
.navbar-vertical .gr-fold:focus:not(:focus-visible):not(:hover) { background-color: transparent; }   /* po kliknięciu nie zostaje podświetlony */
.navbar-vertical .gr-fold kbd { margin-inline-start: auto; font-size: .6875rem; padding: .05rem .3rem; background: var(--tblr-bg-surface-secondary);
  color: var(--tblr-secondary); border: 1px solid var(--tblr-border-color); box-shadow: none; }
/* N33: ikona panelu z wypełnioną lewą częścią (jak w Voucherach); w trybie ikon w kolorze głównym */
.navbar-vertical .gr-fold .gr-fold-ico { width: 20px; height: 20px; display: block; }
html[data-bs-sidebar=folded] .navbar-vertical .gr-fold, html[data-bs-sidebar=folded] .navbar-vertical .gr-fold .nav-link-icon { color: var(--tblr-primary); }
/* Tryb ikon: stały pasek 64 px (Tabler „folded”, bez wysuwania po najechaniu); liczniki w rogu ikony, nazwy w dymkach */
html[data-bs-sidebar=folded] .navbar-vertical .app-brand-name,
html[data-bs-sidebar=folded] .navbar-vertical .nav-link .gr-ext { display: none; }
html[data-bs-sidebar=folded] .navbar-vertical .nav-link { justify-content: center; }
html[data-bs-sidebar=folded] .navbar-vertical .nav-link .nav-link-icon { margin: 0; }
html[data-bs-sidebar=folded] .navbar-vertical .nav-link .badge {
  position: absolute; top: .15rem; inset-inline-end: .15rem; margin: 0; padding: .1rem .3rem; font-size: .625rem; line-height: 1; }
.gr-tip { position: fixed; z-index: 1100; pointer-events: none; padding: .3rem .55rem; border-radius: 4px; font-size: .75rem; font-weight: 500;
  line-height: 1.3; white-space: nowrap; background: var(--tblr-gray-800); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.gr-tip::before { content: ""; position: absolute; top: 50%; left: -4px; margin-top: -4px; border: 4px solid transparent; border-left: 0; border-right-color: var(--tblr-gray-800); }
[data-bs-theme=dark] .gr-tip { background: var(--tblr-gray-200); color: var(--tblr-gray-900); }
[data-bs-theme=dark] .gr-tip::before { border-right-color: var(--tblr-gray-200); }
/* Konto na dole menu: imię i rola w dwóch wierszach, strzałki wyboru */
.navbar-vertical .account-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.navbar-vertical .account-title small { color: var(--tblr-secondary); font-size: .75rem; }
/* Na komputerze gęstsze menu: cały spis mieści się bez przewijania (telefon bez zmian) */
@media (min-width: 992px) {
  .navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-link { padding-top: .4rem; padding-bottom: .4rem; min-height: 0; }
}
/* Przycisk konta na telefonie: kółko z inicjałami */
.gr-account-btn { padding: 0; border: 0; background: none; border-radius: 50%; }
.gr-account-btn:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 2px; }
/* ---------- N33: menu konta jako karta (wzór: Vouchery N55) – web/partials/account_card.html, web/static/web/account.js ---------- */
/* Przycisk konta w stopce menu bocznego (<button>): awatar w kolorze głównym, stan otwarty podświetlony */
.navbar-vertical .gr-acc-btn { width: 100%; border: 0; background: transparent; text-align: start; border-radius: 10px; }
.navbar-vertical .gr-acc-btn[aria-expanded=true] { background: var(--tblr-navbar-active-bg); box-shadow: inset 0 0 0 2px var(--tblr-primary); }
.navbar-vertical .gr-acc-btn:focus-visible { outline: 3px solid var(--tblr-primary); outline-offset: 1px; }
.navbar-vertical .gr-acc-btn .avatar { background: var(--tblr-primary); color: var(--tblr-primary-fg); border-radius: 50%; font-weight: 700; box-shadow: none; }
/* karta */
.gr-acc { position: fixed; z-index: 1060; width: 300px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto;
  overscroll-behavior: contain; padding: 6px; border: 1px solid var(--tblr-border-color); border-radius: 12px; background: var(--tblr-bg-surface);
  color: var(--tblr-body-color); box-shadow: 0 12px 32px rgba(15, 23, 42, .18); font-size: 14px; }
[data-bs-theme=dark] .gr-acc { box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
.gr-acc[hidden] { display: none !important; }
.gr-acc form { margin: 0; }
.gr-acc-head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 10px; border-bottom: 1px solid var(--tblr-border-color); margin-bottom: 4px; }
.gr-acc-av { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--tblr-primary); color: var(--tblr-primary-fg); font-weight: 700; font-size: 15px; }
.gr-acc-head b { display: block; font-weight: 600; line-height: 1.3; }
.gr-acc-head small { display: block; color: var(--tblr-secondary); font-size: 12px; overflow-wrap: anywhere; line-height: 1.35; }
.gr-acc-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 8px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--tblr-body-color); text-align: start; text-decoration: none; font: inherit; font-size: 14px; line-height: 1.35; cursor: pointer; }
.gr-acc-item:hover { background: var(--tblr-bg-surface-secondary); color: var(--tblr-body-color); text-decoration: none; }
.gr-acc-item:focus-visible, .gr-acc-seg button:focus-visible { outline: 3px solid var(--tblr-primary); outline-offset: 1px; }
.gr-acc-item > .ti:first-child { font-size: 18px; color: var(--tblr-secondary); flex: 0 0 20px; text-align: center; }
.gr-acc-item > span { flex: 1 1 auto; min-width: 0; }
.gr-acc-item small { display: block; font-size: 12px; color: var(--tblr-secondary); overflow-wrap: anywhere; }
.gr-acc-item .gr-acc-end { flex: none; color: var(--tblr-secondary); font-size: 15px; }
.gr-acc-sep { border: 0; border-top: 1px solid var(--tblr-border-color); margin: 4px 0; opacity: 1; }
/* tryb: kafelki Jasny / Ciemny / Jak w systemie */
.gr-acc-mode { margin: 2px 0 4px; padding: 6px 6px 10px; border-top: 1px solid var(--tblr-border-color); border-bottom: 1px solid var(--tblr-border-color); }
.gr-acc-mode-head { display: flex; align-items: center; gap: 12px; min-height: 36px; padding-inline-start: 4px; }
.gr-acc-mode-head > .ti { font-size: 18px; color: var(--tblr-secondary); flex: 0 0 20px; text-align: center; }
.gr-acc-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 4px; }
.gr-acc-seg button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 5px 6px;
  border: 1px solid var(--tblr-border-color); border-radius: 8px; background: transparent; color: var(--tblr-secondary); font: inherit;
  font-size: 12px; font-weight: 500; line-height: 1.15; text-align: center; cursor: pointer; }
.gr-acc-seg button .ti { font-size: 18px; }
.gr-acc-seg button:hover { color: var(--tblr-body-color); background: var(--tblr-bg-surface-secondary); }
.gr-acc-seg button[aria-checked=true] { border-color: var(--tblr-primary); background: color-mix(in srgb, var(--tblr-primary) 14%, transparent);
  color: var(--tblr-body-color); font-weight: 650; box-shadow: inset 0 0 0 1px var(--tblr-primary); }
.gr-acc-seg button[aria-checked=true] .ti { color: var(--tblr-primary); }
.gr-acc-note { display: block; margin-top: 6px; padding-inline-start: 4px; font-size: 12px; color: var(--tblr-secondary); line-height: 1.35; }
@media (max-width: 991.98px) { .gr-acc-item { min-height: 44px; } }

/* Główna treść dostaje fokus z linku „Przejdź do treści”; bez ramki wokół całej strony */
#tresc:focus { outline: none; }

/* ---------- telefon: dolny pasek i arkusz „Więcej” (jak w Zamówieniach) ---------- */
.app-mobile-bar { display: none; }
.gr-mobile-top { background: var(--tblr-bg-surface); border-bottom: 1px solid var(--gr-line); }
.app-navigation-sheet .offcanvas-header { gap: 8px; border-bottom: 1px solid var(--gr-line); padding: 12px 16px; }
.app-navigation-sheet .offcanvas-body { padding: 12px 16px max(20px, env(safe-area-inset-bottom)); overflow-y: auto; }
.app-navigation-handle { flex: none; width: 36px; height: 4px; border-radius: 3px; background: var(--gr-strong); margin: 10px auto 0; }
.app-navigation-group { margin: 18px 10px 6px; font-size: 12px; font-weight: 600; color: var(--gr-muted); }
.app-navigation-choice { display: flex; align-items: center; gap: 12px; min-height: 50px; width: 100%; padding: 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--tblr-body-color); text-align: left; font-size: 14px; text-decoration: none; }
.app-navigation-choice > span:not(.app-nav-icon):not(.badge) { flex: 1; }
.app-navigation-choice.active { background: var(--tblr-primary-lt); color: var(--tblr-primary); font-weight: 600; }
.app-nav-icon { display: inline-flex; width: 1.5rem; height: 1.5rem; flex: 0 0 1.5rem; align-items: center; justify-content: center; font-size: 1.25rem; line-height: 1; color: var(--gr-muted); }
.app-navigation-choice.active .app-nav-icon { color: inherit; }
#app-navigation-sheet { height: auto; max-height: min(85dvh, 760px); border-radius: 18px 18px 0 0; }
@media (max-width: 991.98px) {
  .page > .navbar-vertical { display: none !important; }
  .page-wrapper { padding-bottom: 76px; }
  .app-mobile-bar { position: fixed; inset: auto 0 0; z-index: 1035; display: flex; gap: 4px; padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    background: var(--tblr-bg-surface); border-top: 1px solid var(--gr-line); box-shadow: 0 -2px 12px color-mix(in srgb, var(--tblr-body-color) 6%, transparent); }
  .app-mobile-link { position: relative; display: flex; flex: 1; min-width: 0; min-height: 58px; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; border-radius: 8px; background: transparent; color: var(--gr-muted); font-size: 12px; line-height: 1.25; padding: 5px 2px; text-align: center; text-decoration: none; }
  .app-mobile-link .app-nav-icon { font-size: 24px; width: 24px; height: 24px; color: inherit; }
  .app-mobile-link .badge { position: absolute; top: 4px; left: calc(50% + 6px); }
  .app-mobile-link.active { color: var(--tblr-primary); background: var(--tblr-primary-lt); font-weight: 600; }
  .app-mobile-link > span:not(.app-nav-icon):not(.badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; letter-spacing: -.01em; }
  #gr-toasts { bottom: 76px !important; }
}
.app-mobile-link:focus-visible, .app-navigation-choice:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: -3px; }

/* ---------- nagłówek strony (N26, makieta rejestr/proto/naglowek-strony) ----------
   page-header Tablera: nad tytułem dział z menu, tytuł, opis, przyciski po prawej (btn-list); zakładki pod tytułem
   (nav-bordered, aktywna to napis z aria-current – N14); lokal, okres i widok w pasku .gr-filters pod zakładkami (P5). */
.gr-main { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.gr-head { margin-top: 1.25rem; min-height: 2.5rem; }
.gr-head .page-title { font-size: 1.375rem; line-height: 1.3; }
.gr-head .page-title .dot { width: .75rem; height: .75rem; }
.gr-head .page-subtitle { font-size: .875rem; color: var(--tblr-secondary); margin-top: .1rem; }
.gr-head .page-subtitle:empty { display: none; }
.gr-head-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title act" "sub act"; column-gap: 1rem; align-items: center; }
.gr-head-grid .page-title { grid-area: title; }
.gr-head-grid .page-subtitle { grid-area: sub; }
.gr-head-acts { grid-area: act; }
.gr-head-acts .btn-list { flex-wrap: nowrap; justify-content: flex-end; }
.gr-head-acts .btn-list:not(:has(> *)) { display: none; }
.gr-head-acts .btn-list > form { display: inline-flex; margin: 0; }
.gr-head-more, .gr-head .gr-short { display: none; }
.gr-head .page-tabs { margin-top: .9rem; }
.gr-head .page-tabs .nav-bordered { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.gr-head .page-tabs .nav-bordered::-webkit-scrollbar { display: none; }
.gr-head .page-tabs .nav-link { white-space: nowrap; gap: .35rem; padding-top: .5rem; padding-bottom: .6rem; }
.gr-head .page-tabs .nav-link .badge { margin-inline-start: .15rem; }
.gr-head .page-tabs span.nav-link.active { cursor: default; }
.gr-head .page-tabs .nav-link:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: -2px; border-radius: 3px; }
.gr-main > .page-body { margin-top: 1rem; }
/* pasek pod zakładkami: lokal, okres, widok, szukanie (P5) */
.gr-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; margin-bottom: 1rem; }
.gr-filters .form-control, .gr-filters .form-select { width: auto; }
.gr-filters .input-icon { width: 15rem; flex: none; }
.gr-filters .input-icon .form-control { width: 100%; }
.gr-filters > form:not(.input-icon) { display: contents; }
.gr-filters .gr-sub { color: var(--gr-muted); font-size: .875rem; }
.gr-filters .gr-end { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.gr-period .gr-period-label { min-width: 7.5rem; justify-content: center; }
.gr-period .gr-period-label.disabled { color: var(--tblr-body-color); opacity: 1; }
@media (max-width: 575.98px) {
  .gr-head { margin-top: .75rem; }
  .gr-head .page-title { font-size: 1.25rem; }
  .gr-head .page-subtitle { font-size: .8125rem; }
  .gr-head-grid { grid-template-areas: "pre act" "title act" "sub sub"; column-gap: .5rem; }
  /* P3: na telefonie przycisk główny (krótki podpis) + „⋯” z resztą */
  .gr-head-acts .btn-list > :not([data-main]):not(.gr-head-more) { display: none !important; }
  .gr-head-more { display: inline-flex; }
  .gr-head .gr-short { display: inline; }
  .gr-head .gr-long { display: none; }
  .gr-head .page-tabs .nav-link .icon { display: none; }
  .gr-head .page-tabs .nav-bordered .nav-item + .nav-item { margin-inline-start: 1rem; }
  .gr-head .page-tabs .nav-bordered { mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .gr-filters .input-icon { width: auto; flex: 1 1 100%; }
  .gr-filters .gr-end { margin-inline-start: 0; }
}
.gr-messages { max-width: 860px; }
/* Komunikat (N14): wiersz wyśrodkowany w pionie, „X” na końcu (Tabler przypina go do góry z innym odstępem). */
.gr-messages .alert-dismissible { display: flex; align-items: center; gap: .75rem; padding-inline-end: .75rem; }
.gr-messages .alert-dismissible .btn-close { position: static; margin-inline-start: auto; padding: .5rem; flex: none; }

.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 2px; background: var(--c, var(--tblr-secondary)); margin-right: .35rem; flex: none; }

/* ---------- liczby strony (w The Fry: czarna „tablica menu”) ---------- */
.gr-stats { display: flex; flex-wrap: wrap; background: var(--gr-surface); border: 1px solid var(--gr-line); border-radius: var(--tblr-border-radius-lg); margin-bottom: 1rem; overflow: hidden; }
.gr-stat { flex: 1 1 150px; padding: .85rem 1.1rem; border-right: 1px solid var(--gr-line); }
.gr-stat:last-child { border-right: 0; }
.gr-stat b { display: block; font-weight: 600; font-size: 1.5rem; line-height: 1.15; color: var(--tblr-body-color); font-variant-numeric: tabular-nums; }
.gr-stat span { display: block; color: var(--gr-muted); font-size: .8125rem; margin-top: .1rem; }
.gr-stat.warn b { color: var(--tblr-red); }

/* ---------- grafik ---------- */
.gr-schedule { overflow: auto; background: var(--gr-surface); border: 1px solid var(--gr-line); border-radius: var(--tblr-border-radius-lg); }
.gr-schedule table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 1100px; }
.gr-schedule th, .gr-schedule td { border-right: 1px solid var(--gr-line); border-bottom: 1px solid var(--gr-line); padding: .3rem; vertical-align: top; }
.gr-schedule thead th { position: sticky; top: 0; background: var(--gr-surface); z-index: 3; text-align: left; font-weight: 600; font-size: .875rem; border-bottom: 1px solid var(--gr-strong); }
/* kolor „-lt” jest półprzezroczysty – kładziemy go na pełne tło, żeby przewijane zmiany nie prześwitywały */
.gr-schedule thead th.today { background: linear-gradient(var(--tblr-primary-lt), var(--tblr-primary-lt)), var(--gr-surface); color: var(--tblr-primary); }
.gr-schedule thead th.today .day-meta { color: var(--tblr-primary); }
.gr-schedule .emp-col { position: sticky; left: 0; background: var(--gr-surface); z-index: 2; width: 200px; min-width: 200px; text-align: left; }
.gr-schedule thead .emp-col { z-index: 4; }
.gr-schedule .day-meta { font-weight: 400; color: var(--gr-muted); font-size: .75rem; display: block; }
.gr-schedule .cost-row th, .gr-schedule .cost-row td { background: var(--gr-soft); font-size: .8125rem; position: static; border-bottom-width: 1px; }
.gr-schedule .cost-row .emp-col { background: var(--gr-soft); font-weight: 600; position: sticky; left: 0; top: auto; z-index: 2; }
.gr-schedule .cost-actual { color: var(--gr-muted); display: block; }
.gr-schedule .emp-name { font-weight: 600; font-size: .875rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 185px; }
.gr-schedule .emp-meta { color: var(--gr-muted); font-size: .75rem; }
.drop-cell { min-width: 132px; height: 50px; position: relative; }
.drop-cell.drop-target { background: var(--tblr-primary-lt); }
.drop-cell.unavailable { background: repeating-linear-gradient(135deg, var(--tblr-bg-surface), var(--tblr-bg-surface) 6px, var(--gr-danger-soft) 6px, var(--gr-danger-soft) 12px); }
.drop-cell.time-off { background: var(--gr-soft); }
.cell-label { font-size: .75rem; color: var(--tblr-red); font-weight: 600; }
.cell-label.blue { color: var(--tblr-body-color); }
.shift-tile { background: var(--gr-surface); border: 1px solid color-mix(in srgb, var(--c) 45%, var(--tblr-bg-surface)); border-left: 4px solid var(--c); border-radius: 4px; padding: .2rem .4rem; margin-bottom: .25rem; font-size: .8125rem; cursor: grab; line-height: 1.25; }
.shift-tile:hover { border-color: var(--c); }
.shift-tile.draft { border-style: dashed; border-left-style: solid; background: repeating-linear-gradient(135deg, var(--tblr-bg-surface), var(--tblr-bg-surface) 6px, var(--gr-soft) 6px, var(--gr-soft) 12px); }
.shift-tile.dragging { opacity: .4; }
.shift-tile .loc { font-weight: 600; }
.shift-tile .who { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* N35: wg lokali zawsze dwa wiersze – godziny, pod nimi osoba */
.shift-tile .worked { display: block; color: var(--gr-muted); font-size: .75rem; }
.cell-add { position: absolute; right: 3px; bottom: 2px; opacity: 0; font-size: .875rem; font-weight: 700;
  /* stały kwadrat – przycisk Tablera po najechaniu dostawał tło szersze niż znak i nachodził na sąsiedni */
  width: 1.125rem; height: 1.125rem; min-width: 0; min-height: 0; padding: 0; line-height: 1; border: 0; border-radius: var(--tblr-border-radius-sm);
  display: inline-flex; align-items: center; justify-content: center; }
.cell-add:hover { background: var(--tblr-bg-surface-secondary); }
.drop-cell:hover .cell-add, .cell-add:focus-visible { opacity: 1; }
.cell-add.cell-off { right: calc(3px + 1.125rem + 3px); }
.issue-list > div { padding: .3rem 0; border-bottom: 1px solid var(--gr-line); }
.issue-list > div:last-child { border-bottom: 0; }
.gr-note-input { font-size: .8125rem; border: 0; background: transparent; padding: 0; width: 100%; }
.gr-note-input:focus { outline: 2px solid var(--tblr-primary); outline-offset: 1px; background: var(--tblr-primary-lt); }

/* grafik: menu zmiany (N1) – przycisk ⋮ na kafelku, zaznaczenie Ctrl + klik, pasek zaznaczonych */
.shift-tile { position: relative; }
.shift-tile:not(.mini) { padding-right: 1.3rem; }
.shift-tile:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 1px; }
.shift-tile .tile-more { position: absolute; top: 1px; right: 1px; width: 1.2rem; height: 1.2rem; padding: 0; border: 0; border-radius: 3px;
  background: transparent; color: var(--gr-muted); line-height: 1; opacity: 0; }
.shift-tile:hover .tile-more, .shift-tile:focus-within .tile-more, .shift-tile .tile-more[aria-expanded="true"] { opacity: 1; }
.shift-tile .tile-more:hover { background: var(--gr-soft); color: var(--tblr-body-color); }
@media (hover: none) { .shift-tile .tile-more { opacity: 1; } }
.shift-tile.selected { box-shadow: 0 0 0 2px var(--tblr-primary); }
.gr-sel-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 1rem; z-index: 1040; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  padding: .5rem .75rem; border-radius: 10px; background: var(--gr-surface); border: 1px solid var(--gr-line); box-shadow: 0 8px 28px rgba(0, 0, 0, .18); max-width: calc(100vw - 2rem); }
@media (max-width: 991.98px) { .gr-sel-bar { bottom: 84px; } }
@media (max-width: 575.98px) {
  .gr-sel-bar { left: .5rem; right: .5rem; transform: none; max-width: none; }
  /* Telefon: wąska kolumna osób – imię i nazwisko w dwóch liniach; węższe dni. */
  .gr-schedule:not(.gr-month) .emp-col { width: 96px; min-width: 96px; padding: .25rem .3rem; }
  .gr-schedule:not(.gr-month) .emp-name { white-space: normal; max-width: none; font-size: .8125rem; line-height: 1.2; overflow-wrap: anywhere; }
  .gr-schedule:not(.gr-month) .emp-meta { font-size: .6875rem; }
  .gr-schedule:not(.gr-month) .cost-row .emp-col .cost-actual { display: none; }
  .gr-schedule:not(.gr-month) .drop-cell { min-width: 104px; }
  .gr-schedule:not(.gr-month) .shift-tile { font-size: .75rem; }
}

/* karta osoby (web/person.js, N8) */
.gr-person { all: unset; cursor: pointer; border-radius: 3px; }
.gr-person:hover { text-decoration: underline; text-underline-offset: 2px; }
.gr-person:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 2px; }
.gr-person-card { position: fixed; z-index: 1080; width: 19rem; max-width: calc(100vw - 16px); }
.gr-person-card .card-body { padding: 1rem; }

/* grafik: komórka osoby – nazwisko (karta osoby, N8) i przycisk ⋮ (menu osoby, N7) */
.gr-schedule .emp-head { display: flex; align-items: flex-start; gap: .15rem; }
.gr-schedule .emp-head .emp-name { flex: 1; min-width: 0; }
.gr-schedule .row-more { flex: none; width: 1.5rem; height: 1.5rem; min-height: 0; padding: 0; margin: -.15rem -.15rem 0 0; }
.gr-month .row-more { width: 1.25rem; height: 1.25rem; }

/* menu podręczne (web/menu.js) i arkusz od dołu na telefonie */
.gr-menu { position: fixed; z-index: 1090; display: block; min-width: 15rem; max-width: 21rem; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px);
  overflow-y: auto; overflow-x: hidden; margin: 0; padding: .35rem 0; }
.gr-menu .dropdown-item { display: flex; align-items: flex-start; gap: .55rem; white-space: normal; min-height: 2.25rem; padding-top: .45rem; padding-bottom: .45rem; }
.gr-menu .dropdown-item .dropdown-item-icon { margin: 0; flex: none; text-align: center; font-size: 1.25rem; line-height: 1; color: var(--gr-muted); }
.gr-menu .dropdown-item.text-danger .dropdown-item-icon { color: inherit; }
.gr-menu .dropdown-item[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.gr-menu .dropdown-item[aria-disabled="true"]:hover { background: none; }
.gr-menu .dropdown-item.sub-open { background: var(--tblr-dropdown-link-hover-bg, var(--gr-soft)); }
.gr-mi-label { flex: 1; min-width: 0; }
.gr-mi-note { display: block; font-size: .75rem; color: var(--gr-muted); margin-top: .1rem; }
.gr-mi-hint { flex: none; margin-left: .75rem; font-size: .75rem; color: var(--gr-muted); padding-top: .1rem; }
.gr-menu-confirm { padding: .5rem 1rem .6rem; display: grid; gap: .5rem; font-size: .8125rem; }
.gr-sheet-backdrop { position: fixed; inset: 0; z-index: 1085; background: rgba(15, 23, 42, .45); }
.gr-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1090; max-height: 85vh; max-height: 85dvh; overflow-y: auto; background: var(--gr-surface);
  border-radius: 18px 18px 0 0; box-shadow: 0 -4px 24px rgba(0, 0, 0, .18); padding: 0 12px max(16px, env(safe-area-inset-bottom)); }
.gr-sheet .app-navigation-handle { margin: 10px auto 6px; }
.gr-sheet-head { display: flex; align-items: center; gap: 8px; padding: 6px 4px 10px; border-bottom: 1px solid var(--gr-line); margin-bottom: 6px; }
.gr-sheet-head h2 { flex: 1; margin: 0; font-size: 1rem; }
.gr-sheet .app-navigation-choice[aria-disabled="true"] { opacity: .55; }
.gr-sheet .app-navigation-choice.text-danger, .gr-sheet .app-navigation-choice.text-danger .app-nav-icon { color: var(--tblr-red); }

/* okno „Przypisz osobę…” i „Kopiuj na inne dni…” */
.gr-pick-list { display: grid; gap: 2px; max-height: min(52vh, 420px); overflow-y: auto; margin: 0 -.5rem; }
.gr-pick-row { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .45rem .5rem; border: 0; border-radius: 6px; background: none; color: inherit; text-align: left; }
.gr-pick-row:hover:not([aria-disabled="true"]), .gr-pick-row:focus-visible { background: var(--tblr-primary-lt); outline: none; }
.gr-pick-row[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.gr-pick-group { font-size: .75rem; font-weight: 600; color: var(--gr-muted); text-transform: uppercase; letter-spacing: .04em; margin: .5rem .5rem .15rem; }
.gr-copy-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.gr-copy-days .form-selectgroup-label { padding: .35rem 0; }

/* Karty czasu → Dzień (N5): liczniki-filtry, plakietki lokali, wiersze, oś dnia w szczegółach */
.gr-day-filters .gr-stat { border: 0; border-right: 1px solid var(--gr-line); background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.gr-day-filters .gr-stat:last-child { border-right: 0; }
.gr-day-filters .gr-stat:hover { background: var(--gr-soft); }
.gr-day-filters .gr-stat[aria-pressed="true"] { background: var(--tblr-primary-lt); box-shadow: inset 0 -3px 0 var(--tblr-primary); }
.gr-day-filters .gr-stat:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: -2px; }
.gr-loc { background: color-mix(in srgb, var(--c) 18%, var(--tblr-bg-surface)); color: var(--tblr-body-color); border-left: 3px solid var(--c); border-radius: 3px; font-weight: 600; }
.gr-day-table tbody.gr-day-row { cursor: pointer; }
.gr-day-table tbody.gr-day-row:hover td { background: var(--gr-soft); }
.gr-day-table tbody.gr-day-row + tbody.gr-day-row tr:first-child td { border-top: 1px solid var(--gr-line); }
.gr-day-card { cursor: pointer; }
.gr-day-axis { position: relative; padding-bottom: 1.1rem; margin-left: 5.75rem; }
.gr-day-axis .lane { position: relative; height: 22px; background: var(--gr-soft); border-radius: 4px; margin-bottom: 4px; }
.gr-day-axis .lane-label { position: absolute; left: -5.75rem; width: 5.25rem; text-align: right; top: 3px; font-size: .6875rem; color: var(--gr-muted); }
.gr-day-axis .bar { position: absolute; top: 4px; height: 14px; border-radius: 3px; }
.gr-day-axis .bar.plan { background: none; border: 2px solid var(--tblr-body-color); top: 2px; height: 18px; }
.gr-day-axis .bar.work { background: var(--tblr-green); }
.gr-day-axis .now { position: absolute; top: 0; bottom: 1rem; width: 2px; background: var(--tblr-red); }
.gr-day-axis .ticks { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: .6875rem; color: var(--gr-muted); }

/* zapotrzebowanie (N2): tydzień wzorcowy, pozycje, obsada w ciągu dnia, wiersz „Obsada” w harmonogramie */
.gr-dm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .25rem; }
.gr-dm-week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: .5rem; min-width: 1090px; }
.gr-dm-day { background: var(--gr-surface); border: 1px solid var(--gr-line); border-radius: var(--tblr-border-radius-lg); display: flex; flex-direction: column; min-width: 0; }
.gr-dm-day.weekend { background: var(--gr-soft); }
.gr-dm-head { display: flex; align-items: flex-start; gap: .25rem; padding: .5rem .6rem .4rem; border-bottom: 1px solid var(--gr-line); }
.gr-dm-body { display: grid; gap: .4rem; padding: .5rem; align-content: start; flex: 1; }
.gr-dm-slot { all: unset; box-sizing: border-box; display: block; cursor: pointer; padding: .4rem .5rem; border-radius: 6px; background: var(--gr-surface);
  border: 1px solid var(--gr-line); border-left: 4px solid var(--tblr-orange); font-size: .8125rem; line-height: 1.3; }
.gr-dm-slot:hover { border-color: var(--tblr-orange); }
.gr-dm-slot:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 1px; }
.gr-dm-slot .t { font-weight: 600; }
.gr-dm-slot .cnt { float: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.gr-dm-slot .r { display: block; color: var(--gr-muted); }
.gr-dm-slot .n { display: block; color: var(--gr-muted); font-size: .75rem; font-style: italic; }
.gr-dm-heat { border-collapse: separate; border-spacing: 2px; font-size: .75rem; font-variant-numeric: tabular-nums; min-width: 560px; width: 100%; }
.gr-dm-heat th { font-weight: 600; color: var(--gr-muted); text-align: center; padding: .15rem .25rem; }
.gr-dm-heat th.h { text-align: right; width: 3.25rem; }
.gr-dm-heat td { text-align: center; height: 1.6rem; border-radius: 3px; }
.gr-dm-heat td.zero { color: var(--gr-muted); }
.gr-dm-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .5rem; }
.gr-dm-sum div { padding: .5rem .7rem; border: 1px solid var(--gr-line); border-radius: 6px; }
.gr-dm-sum b { display: block; font-size: 1.25rem; }
.gr-dm-sum span { font-size: .75rem; color: var(--gr-muted); }
.gr-cover { font-weight: 600; }
.gr-cover.short { color: var(--tblr-red); }
.gr-cover.ok { color: var(--tblr-green); }
.shift-tile .gr-count-x { float: right; margin-left: .25rem; }

/* grafik: widok miesiąca – cały miesiąc na szerokość ekranu */
.gr-month table { table-layout: fixed; width: 100%; min-width: 1240px; }
.gr-month .emp-col { width: 150px; min-width: 0; }
.gr-month .sum-col { width: 52px; }
.gr-month .emp-name { max-width: 140px; font-size: .8125rem; }
.gr-month th, .gr-month td { padding: .15rem; overflow: hidden; }
.gr-month .day-head { text-align: center; padding: .25rem 0; }
.gr-month .day-head .wd { display: block; font-weight: 400; font-size: .66rem; color: var(--gr-muted); line-height: 1; }
.gr-month .day-head .dn { display: block; font-weight: 600; font-size: .9375rem; line-height: 1.1; }
.gr-month .day-head.today .wd { color: var(--tblr-primary); }
.gr-month .weekend, .gr-month thead th.weekend { background: var(--gr-soft); }
.gr-month .cost-row td { text-align: center; font-size: .66rem; padding-left: 0; padding-right: 0; }
.gr-month .drop-cell { min-width: 0; height: 38px; }
.shift-tile.mini { font-size: .66rem; line-height: 1.15; padding: .08rem .15rem; margin-bottom: .12rem; border-left-width: 3px; }
.shift-tile.mini .t, .shift-tile.mini .w { display: block; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.shift-tile.mini .w { font-weight: 600; text-overflow: ellipsis; }
.shift-tile.mini.done, .shift-tile.mini.draft.done { background: color-mix(in srgb, var(--c) 24%, var(--tblr-bg-surface)); }

/* ---------- karty czasu ---------- */
.gr-matrix { overflow: auto; background: var(--gr-surface); border: 1px solid var(--gr-line); border-radius: var(--tblr-border-radius-lg); }
.gr-matrix table { border-collapse: separate; border-spacing: 0; font-size: .8125rem; }
.gr-matrix th, .gr-matrix td { border-bottom: 1px solid var(--gr-line); padding: .25rem .3rem; text-align: center; white-space: nowrap; }
.gr-matrix thead th { position: sticky; top: 0; background: var(--gr-surface); z-index: 2; border-bottom: 1px solid var(--gr-strong); font-weight: 600; }
.gr-matrix .emp-col { position: sticky; left: 0; background: var(--gr-surface); z-index: 1; text-align: left; min-width: 210px; }
.gr-matrix thead .emp-col { z-index: 3; }
.gr-matrix .weekend { background: var(--gr-soft); }
.gr-matrix tr.warn > td, .gr-matrix tr.warn > .emp-col { background: var(--gr-danger-soft); }
.hcell { display: inline-block; min-width: 44px; border-radius: 3px; padding: .05rem .25rem; font-weight: 500; }
.hcell.hc1 { background: var(--gr-hc1); }   /* do 6 h */
.hcell.hc2 { background: var(--gr-hc2); }   /* 6–10 h */
.hcell.hc3 { background: var(--gr-hc3); }   /* ponad 10 h */
.diff-neg { color: var(--tblr-red); }
/* 510 px stałych kolumn + 31 dni × 36 px (tyle potrzebuje „12:15” w kroju systemowym Tablera); węziej – przewijanie w poziomie. */
.gr-ts { table-layout: fixed; width: 100%; min-width: 1640px; }
.gr-ts .sel-col { width: 30px; }
.gr-ts .emp-col { width: 230px; min-width: 0; white-space: normal; }
.gr-ts .status-col { width: 92px; }
.gr-ts .hours-col { width: 62px; }
.gr-ts .pay-col { width: 96px; }
.gr-ts td, .gr-ts th { overflow: hidden; }
/* Dni: krój systemowy Tablera jest szerszy niż Barlow Semi Condensed z układu The Fry – mniejsze marginesy i czcionka,
   żeby „12:15” mieściło się w plakietce także w wąskiej kolumnie. */
.gr-ts td:not(.emp-col) { padding-left: .12rem; padding-right: .12rem; }
.gr-ts td .hcell { display: block; min-width: 0; padding: .05rem 0; font-size: .75rem; letter-spacing: -.02em;
  text-align: center; overflow: hidden; text-overflow: clip; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- wnioski: oś dnia ---------- */
.timeline { position: relative; height: 16px; background: var(--gr-soft); border-radius: 3px; }
.timeline .bar { position: absolute; top: 3px; height: 10px; border-radius: 2px; }
.timeline .bar.orig { background: var(--gr-strong); }
.timeline .bar.req { background: var(--tblr-primary); }
.timeline .bar.plan { background: none; border: 2px solid var(--tblr-body-color); top: 1px; height: 14px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- komunikator ---------- */
.min-w-0 { min-width: 0; }
.gr-chat { height: calc(100vh - 9.5rem); height: calc(100dvh - 9.5rem); min-height: 22rem; overflow: hidden; }   /* dokładnie: web/static/web/panel.js (data-fit="height", N14) */
.gr-chat > .row { height: 100%; }
.gr-chat-side { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.gr-chat-list { flex: 1; overflow-y: auto; }
.gr-chat-list .list-group-item.active { background: var(--tblr-primary-lt); color: inherit; border-color: var(--gr-line); box-shadow: inset 3px 0 0 var(--tblr-primary); }
.gr-chat-main { height: 100%; min-height: 0; }
.gr-chat-body { flex: 1; overflow-y: auto; }
.gr-chat-form textarea { resize: none; max-height: 160px; }
.gr-chat-people { max-height: 22rem; overflow-y: auto; }
.gr-chat-members { max-height: 18rem; overflow-y: auto; }
.chat-bubble-body p { overflow-wrap: anywhere; }
@media (max-width: 991.98px) {
  .gr-chat { height: calc(100dvh - 15rem); }
  .gr-chat-open .gr-chat-side { display: none; }
  .gr-chat:not(.gr-chat-open) .gr-chat-main { display: none !important; }
}
/* komunikator: załączniki, kontakt, potwierdzenia */
.gr-chat-media { display: grid; gap: .35rem; margin-top: .35rem; max-width: 22rem; }
.gr-chat-media.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gr-chat-img img { display: block; width: 100%; max-height: 18rem; object-fit: cover; border-radius: var(--tblr-border-radius); }
.gr-chat-video { display: block; width: 100%; max-height: 18rem; border-radius: var(--tblr-border-radius); background: #000; }
.gr-chat-file { display: inline-flex; align-items: center; gap: .4rem; }
.gr-chat-contact { display: flex; gap: .6rem; align-items: center; margin-top: .35rem; padding: .5rem .6rem; border-radius: var(--tblr-border-radius); background: var(--tblr-bg-surface); }
.gr-chat-receipt { text-align: right; font-size: .75rem; color: var(--gr-muted); margin-top: -.5rem; }
.gr-chat-files { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.gr-chat-file-chip { display: inline-flex; align-items: center; gap: .4rem; max-width: 14rem; padding: .25rem .4rem; border: 1px solid var(--gr-line); border-radius: var(--tblr-border-radius); background: var(--tblr-bg-surface-secondary); font-size: .8125rem; }
.gr-chat-file-chip img { width: 2rem; height: 2rem; object-fit: cover; border-radius: 4px; }
.gr-chat-main.is-dropping { outline: 2px dashed var(--tblr-primary); outline-offset: -6px; }

/* Komunikator: stan rozmowy, kropka „nieprzeczytana”, przyciski opcji (N6) */
.gr-chat-state { display: flex; align-items: center; gap: .5rem; padding: .4rem .75rem; font-size: .8125rem; background: var(--tblr-bg-surface-secondary); border-bottom: 1px solid var(--gr-line); }
.gr-dot { width: .6rem; height: .6rem; padding: 0; border-radius: 50%; }
.gr-chat-row .gr-chat-more { opacity: .55; }
.gr-chat-row:hover .gr-chat-more, .gr-chat-row .gr-chat-more:focus-visible, .gr-chat-row .gr-chat-more[aria-expanded=true] { opacity: 1; }
.chat-item .gr-msg-more { padding: 0 .15rem; min-height: 0; height: 1.25rem; opacity: .45; }
.chat-item:hover .gr-msg-more, .chat-item .gr-msg-more:focus-visible { opacity: 1; }
@media (hover: none) { .gr-chat-row .gr-chat-more, .chat-item .gr-msg-more { opacity: .8; } }

/* Wolne zmiany i zastępstwa (N9) */
.gr-open { display: grid; gap: .5rem; padding: .75rem; border: 1px solid var(--gr-line); border-left: 4px solid var(--c); border-radius: 8px; background: var(--tblr-bg-surface); }
.gr-open + .gr-open { margin-top: .6rem; }
.gr-open.done { border-left-color: var(--tblr-green); background: var(--tblr-bg-surface-secondary); }
.gr-open-head { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; }
.gr-open-cand { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; border-top: 1px dashed var(--gr-line); }
.gr-loc-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--c); margin-right: .3rem; }

/* Strona logowania panelu (N12, wariant A makiety rejestr/proto/logowanie-panel): wąska karta na środku.
   web/login.html wyłącza układ „fluid”, a kolumna ma własny limit 420 px. */
.lp { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; color: var(--tblr-body-color);
  background:
    radial-gradient(900px 520px at 8% -8%, color-mix(in srgb, var(--tblr-primary) 13%, transparent), transparent 70%),
    radial-gradient(760px 480px at 105% 108%, color-mix(in srgb, var(--tblr-primary) 9%, transparent), transparent 70%),
    var(--tblr-bg-surface-secondary); }
.lp-theme { position: absolute; top: .75rem; right: .75rem; z-index: 2; }
.lp-theme .btn { --tblr-btn-padding-x: .55rem; color: var(--tblr-secondary); background: var(--tblr-bg-surface); }
.lp-theme .lp-ico-light, [data-bs-theme=dark] .lp-theme .lp-ico-dark { display: none; }
[data-bs-theme=dark] .lp-theme .lp-ico-light { display: inline-block; }
.lp-main { flex: 1; display: flex; }
.lp-col { width: 100%; max-width: 420px; margin: auto; padding: 2.5rem 16px; }
.lp-head { text-align: center; margin-bottom: 1.5rem; }
.lp-head h1 { font-size: 1.5rem; font-weight: 700; margin: .75rem 0 .15rem; }
/* N34: znak (SVG, blok) na środku, pod nim napis „NexApp Planner” */
.lp-head .app-brand-mark { margin: 0 auto; }
.lp-head h1.app-brand-name { display: flex; justify-content: center; line-height: 1.2; }
.lp-head p { color: var(--tblr-secondary); margin: 0; }
.lp-card { background: var(--tblr-bg-surface); border: 1px solid var(--tblr-border-color); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(15, 23, 42, .07); padding: 1.75rem 1.75rem 1.5rem; }
[data-bs-theme=dark] .lp-card { box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.lp-card h2 { font-size: 1.125rem; font-weight: 600; margin: 0 0 .25rem; }
.lp-lead { color: var(--tblr-secondary); margin: 0 0 1.25rem; font-size: .875rem; }
.lp-steps { display: flex; align-items: center; gap: .5rem; margin: 0 0 1.25rem; padding: 0; list-style: none; font-size: .8125rem; color: var(--tblr-secondary); }
.lp-steps li { display: inline-flex; align-items: center; gap: .4rem; }
.lp-steps .n { display: inline-flex; width: 1.4rem; height: 1.4rem; align-items: center; justify-content: center; border-radius: 50%;
  border: 1px solid var(--tblr-border-color); font-size: .75rem; font-weight: 600; background: var(--tblr-bg-surface); }
.lp-steps .on { color: var(--tblr-body-color); font-weight: 600; }
.lp-steps .on .n { background: var(--tblr-primary); border-color: var(--tblr-primary); color: var(--tblr-primary-fg, #fff); }
.lp-steps .done .n { background: var(--tblr-green-lt); border-color: transparent; color: var(--tblr-green); }
.lp-steps .line { flex: 1; height: 1px; background: var(--tblr-border-color); min-width: 1.5rem; }
.lp-card .form-label { font-weight: 600; }
.lp-card .input-group-text { font-variant-numeric: tabular-nums; color: var(--tblr-secondary); padding-inline: .85rem; }
.lp-phone { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.lp-code { text-align: center; font-size: 1.6rem !important; font-weight: 600; letter-spacing: .5em; padding-left: 1.5em !important; font-variant-numeric: tabular-nums; }
.lp-code.is-invalid { background-image: none !important; padding-inline-end: 1.5rem !important; }
.lp-code::placeholder { letter-spacing: .5em; color: var(--tblr-border-color); }
.lp-card .form-control:focus, .lp-card .btn:focus-visible { box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--tblr-primary) 28%, transparent); }
.lp-card .btn-primary { min-height: 48px; }
.lp-sent { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .5rem; margin: 0 0 1.25rem; font-size: .875rem; color: var(--tblr-secondary); }
.lp-sent b { color: var(--tblr-body-color); font-variant-numeric: tabular-nums; }
.lp-link { background: none; border: 0; padding: 0; color: var(--tblr-primary); font: inherit; font-weight: 500; text-decoration: none; }
.lp-link:hover { text-decoration: underline; }
.lp-link:disabled { color: var(--tblr-secondary); text-decoration: none; cursor: default; }
.lp-link:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 2px; border-radius: 3px; }
.lp-resend { margin: 1rem 0 0; text-align: center; font-size: .875rem; color: var(--tblr-secondary); }
.lp-resend .num { font-variant-numeric: tabular-nums; }
.lp-alert { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 1rem; padding: .65rem .8rem; border-radius: 8px; font-size: .875rem;
  background: color-mix(in srgb, var(--tblr-red) 10%, var(--tblr-bg-surface)); color: var(--tblr-body-color); border: 1px solid color-mix(in srgb, var(--tblr-red) 30%, transparent); }
.lp-alert i { color: var(--tblr-red); font-size: 1rem; line-height: 1.3; }
.lp-alert.info { background: color-mix(in srgb, var(--tblr-primary) 8%, var(--tblr-bg-surface)); border-color: color-mix(in srgb, var(--tblr-primary) 25%, transparent); }
.lp-alert.info i { color: var(--tblr-primary); }
.lp-alert a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.lp-foot { margin: 1.25rem 0 0; text-align: center; font-size: .8125rem; color: var(--tblr-secondary); }
.lp-foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* N51: logowanie na adresie firmy – logo (albo inicjały) i kolor firmy, na dole „działa na NexApp Planner” */
.lp-flogo { display: flex; justify-content: center; height: 56px; }
.lp-flogo img { max-height: 56px; max-width: 240px; width: auto; }
.lp-flogo .gr-logo-l, .lp-flogo .gr-logo-d { align-items: center; justify-content: center; }
.lp-flogo .gr-logo-l { display: flex; }
.lp-flogo .gr-logo-d, [data-bs-theme=dark] .lp-flogo .gr-logo-l { display: none; }
[data-bs-theme=dark] .lp-flogo .gr-logo-d { display: flex; }
.lp-flogo .gr-plate-d { background: #1a1d21; border-radius: 8px; padding: 4px 10px; }
.lp-flogo .gr-plate-l { background: #fff; border-radius: 8px; padding: 4px 10px; }
.lp-ini { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 1.25rem;
  background: var(--tblr-primary); color: var(--tblr-primary-fg, #fff); }
.lp-powered { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: 1rem; font-size: .75rem; color: var(--tblr-secondary); }
.lp-powered .app-brand-mark { width: 1rem; height: 1rem; }
.lp-powered b { color: var(--tblr-body-color); font-weight: 600; }
.lp-others { display: grid; gap: .5rem; }
@media (max-width: 575.98px) {
  .lp-col { padding: 3.25rem 16px 1.5rem; margin-top: 0; }
  .lp-card { padding: 1.35rem 1.15rem 1.25rem; }
  .lp-head { margin-bottom: 1.25rem; }
}

/* ------------------------------------------------------------------ N13: tydzień wzorcowy – przeciąganie, kopia z Ctrl, kosz, Cofnij */
.gr-dm-hint { display: flex; gap: .6rem; align-items: flex-start; max-width: 80ch; }
.gr-dm-hint .icon { margin-top: .15rem; flex: none; }
.gr-dm-hint kbd { font-size: .75rem; }
.gr-dm-body { min-height: 6rem; }
.gr-dm-slot { position: relative; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.gr-dm-slot .r, .gr-dm-slot .n { padding-right: 2.85rem; }
.gr-dm-slot .acts { position: absolute; right: 2px; bottom: 2px; display: flex; gap: 2px; opacity: 0; background: var(--gr-surface); border-radius: 4px; }
.gr-dm-slot:hover .acts, .gr-dm-slot:focus-within .acts, .gr-dm-slot:focus .acts { opacity: 1; }
@media (hover: none) { .gr-dm-slot .acts { opacity: 1; } }
.gr-dm-slot .acts .btn { width: 1.45rem; height: 1.45rem; min-height: 0; padding: 0; border-radius: 4px; }
.gr-dm-slot .acts .icon { width: 1rem; height: 1rem; font-size: 1rem; margin: 0; }
.gr-dm-slot .acts .del:hover, .gr-dm-slot .acts .del:focus-visible { color: var(--tblr-red); background: color-mix(in srgb, var(--tblr-red) 12%, var(--gr-surface)); }
.gr-dm-slot.is-leaving { animation: grDmOut .18s ease-in forwards; }
@keyframes grDmOut { to { opacity: 0; transform: scale(.96); } }
.gr-dm-slot.is-source-move { opacity: .45; border-style: dashed; }
.gr-dm-slot.is-source-copy { box-shadow: 0 0 0 2px var(--tblr-primary); }
.gr-dm-slot.is-new { animation: grDmNew 1.6s ease-out; }
@keyframes grDmNew { 0% { box-shadow: 0 0 0 3px var(--tblr-green); background: var(--tblr-green-lt); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .gr-dm-slot.is-new, .gr-dm-slot.is-leaving { animation: none; } }
body.gr-dm-dragging, body.gr-dm-dragging * { cursor: grabbing !important; }
body.gr-dm-dragging.gr-dm-copy, body.gr-dm-dragging.gr-dm-copy * { cursor: copy !important; }
body.gr-dm-stamp .gr-dm-day { cursor: copy; }
.gr-dm-day { position: relative; transition: box-shadow .12s, border-color .12s; }
.gr-dm-day.target { border-color: var(--tblr-primary); box-shadow: 0 0 0 2px var(--tblr-primary); }
.gr-dm-day.dupe { box-shadow: 0 0 0 2px var(--tblr-secondary); }
.gr-dm-drop { display: none; border: 2px dashed var(--tblr-primary); border-radius: 6px; padding: .45rem .5rem; font-size: .75rem; color: var(--tblr-primary); background: var(--tblr-primary-lt); }
.gr-dm-day.target .gr-dm-drop { display: block; }
.gr-dm-day.dupe .gr-dm-drop { display: block; border-color: var(--tblr-secondary); color: var(--tblr-secondary); background: var(--gr-soft); }
.gr-dm-ghost { position: fixed; z-index: 1200; pointer-events: none; width: 150px; transform: translate(14px, 12px) rotate(-1.5deg); box-shadow: 0 10px 24px rgba(0,0,0,.22); opacity: .96; }
.gr-dm-ghost .acts { display: none; }
.gr-dm-ghost .badge-mode { position: absolute; top: -10px; right: -8px; display: inline-flex; align-items: center; gap: .25rem; font-size: .6875rem; font-weight: 600; padding: .15rem .45rem; border-radius: 1rem; color: #fff; background: var(--tblr-secondary); }
.gr-dm-ghost.copy .badge-mode { background: var(--tblr-primary); }
.gr-dm-stampbar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .5rem .75rem; margin-bottom: .5rem; border-radius: 6px; background: var(--tblr-primary-lt); color: var(--tblr-primary); font-size: .8125rem; }
.gr-dm-stampbar[hidden] { display: none; }
.gr-dm-stampbar b { color: var(--tblr-body-color); }
.gr-undo { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 1150; display: flex; align-items: center; gap: .75rem; padding: .55rem .6rem .55rem .9rem; border-radius: 8px;
  background: #1f2937; color: #fff; font-size: .875rem; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100vw - 2rem); }
[data-bs-theme=dark] .gr-undo { background: #e5e7eb; color: #111827; }
.gr-undo .btn { --tblr-btn-color: inherit; color: inherit; }
@media (max-width: 991.98px) { .gr-undo { bottom: 84px; } }
@media (max-width: 575.98px) { .gr-undo { left: .75rem; right: .75rem; transform: none; max-width: none; justify-content: space-between; } }
.gr-dm-menu { position: fixed; z-index: 1210; min-width: 14rem; max-width: calc(100vw - 1rem); display: block; }
.gr-dm-menu .dropdown-item small { display: block; color: var(--gr-muted); font-size: .75rem; }
.gr-dm-days-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .35rem .75rem; border: 0; padding: 0; margin: 0; }
.gr-dm-days-pick .form-check { margin: 0; }
.gr-dm-days-pick .why { font-size: .75rem; color: var(--gr-muted); }
@media (max-width: 575.98px) {
  .gr-dm-scroll:has(.gr-dm-week) { overflow: visible; }
  .gr-dm-week { grid-template-columns: 1fr; min-width: 0; }
  .gr-dm-body { min-height: 0; }
  .gr-dm-hint .desk { display: none; }
}
@media (min-width: 576px) { .gr-dm-hint .phone { display: none; } }

/* ------------------------------------------------------------------ N22: panel „Widok” w harmonogramie */
.gr-vo { position: relative; }
.gr-vo-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 1060; width: 21rem; max-width: calc(100vw - 2rem); max-height: min(78vh, 680px); overflow: auto;
  background: var(--tblr-bg-surface); border: 1px solid var(--gr-line); border-radius: 10px; box-shadow: 0 12px 36px rgba(0, 0, 0, .16); text-align: left; }
.gr-vo-head { display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem .5rem; border-bottom: 1px solid var(--gr-line); position: sticky; top: 0; background: var(--tblr-bg-surface); z-index: 1; }
.gr-vo-head h2 { font-size: .9375rem; margin: 0; flex: 1; }
.gr-vo-sec { padding: .55rem .9rem; border: 0; border-bottom: 1px solid var(--gr-line); margin: 0; min-width: 0; }
.gr-vo-sec:last-child { border-bottom: 0; }
.gr-vo-title { float: none; width: auto; font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gr-muted); font-weight: 600; margin-bottom: .35rem; padding: 0; line-height: 1.4; }
.gr-vo-opt { display: flex; align-items: flex-start; gap: .5rem; padding: .3rem 0; margin: 0; cursor: pointer; }
.gr-vo-opt.form-switch { padding-left: 0; }
.gr-vo-opt .form-check-input { margin: .15rem 0 0 0; flex: none; float: none; width: 2.1rem; }
.gr-vo-opt .txt { flex: 1; min-width: 0; font-size: .875rem; line-height: 1.3; }
.gr-vo-opt .txt small { display: block; color: var(--gr-muted); font-size: .75rem; }
.gr-vo-more { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .25rem; color: var(--tblr-primary); font-size: .8125rem; padding: .35rem 0 .1rem; }
.gr-vo-more:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 2px; border-radius: 3px; }
.gr-vo-sort { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .75rem; }
.gr-vo-sort .form-check { margin: 0; font-size: .875rem; }
.gr-vo-note { font-size: .75rem; color: var(--gr-muted); margin-top: .35rem; }
.gr-vo-foot { display: grid; gap: .5rem; }
.gr-vo-handle { display: none; width: 40px; height: 4px; border-radius: 2px; background: var(--gr-line); margin: 8px auto 0; }
.gr-vo-backdrop { position: fixed; inset: 0; z-index: 1055; background: rgba(15, 23, 42, .45); }
@media (max-width: 575.98px) {
  .gr-vo-panel.sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 85vh; max-height: 85dvh; border-radius: 16px 16px 0 0; z-index: 1065; }
  .gr-vo-panel.sheet .gr-vo-handle { display: block; }
  .gr-vo-sort { grid-template-columns: 1fr; }
  .gr-vo-opt { padding: .45rem 0; }
}

/* ------------------------------------------------------------------ N17: godziny otwarcia lokali */
.gl-week { display: grid; gap: 0; }
.gl-day { display: grid; grid-template-columns: 7.5rem 7.5rem minmax(0, 1fr); gap: .5rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--gr-line); }
.gl-day.ro { grid-template-columns: 7.5rem minmax(0, 1fr); }
.gl-day:last-child { border-bottom: 0; }
.gl-day .wd { font-weight: 600; }
.gl-day .times, .gl-day .gl-times { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.gl-day .gl-times[hidden], .gl-day .closed-label[hidden], .gl-day .next[hidden] { display: none; }
.gl-day .times input { width: 7.25rem; }
.gl-day .closed-label { color: var(--gr-muted); }
.gl-day .next { font-size: .75rem; color: var(--gr-muted); }
.gl-day.off .wd { color: var(--gr-muted); }
.gl-dirty { font-size: .8125rem; color: var(--tblr-orange); }
.gl-ver { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .25rem .6rem; align-items: baseline; font-size: .8125rem; padding: .3rem 0; border-top: 1px dashed var(--gr-line); }
.gl-ver .d { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gl-next { display: grid; gap: 0; font-size: .875rem; }
.gl-next > div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .5rem; padding: .3rem .4rem; border-radius: 4px; }
.gl-next > div.ex { background: color-mix(in srgb, var(--tblr-orange) 10%, transparent); }
.gl-next > div.closed { background: var(--gr-soft); }
.gl-next > div.today { outline: 1px solid var(--tblr-primary); }
.gl-next .d { color: var(--gr-muted); }
.gl-next .h { font-weight: 600; }
.gl-next .n { display: block; font-size: .75rem; color: var(--gr-muted); font-weight: 400; }
.gl-ex .past td { color: var(--gr-muted); }
.gl-badge-closed { background: var(--gr-soft); color: var(--tblr-body-color); border: 1px solid var(--gr-line); }
.gl-badge-other { background: color-mix(in srgb, var(--tblr-orange) 14%, transparent); color: var(--tblr-orange); }
.gl-hol { display: grid; grid-template-columns: auto 6.5rem minmax(0, 1fr) 11rem; gap: .5rem; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--gr-line); font-size: .875rem; }
.gl-hol:last-of-type { border-bottom: 0; }
.gl-hol .form-check-input { margin: 0; float: none; }
.gl-hol .times { grid-column: 3 / -1; display: flex; gap: .35rem; align-items: center; }
.gl-hol .times[hidden] { display: none; }
.gl-hol .times input { width: 7rem; }
.gl-hol .have { font-size: .75rem; color: var(--gr-muted); }
/* harmonogram: godziny w nagłówku dnia, dzień zamknięty, zmiana poza godzinami */
.gr-schedule thead th .gl-hrs { display: block; font-weight: 400; font-size: .75rem; color: var(--gr-muted); }
.gr-schedule thead th .gl-hrs .badge { white-space: normal; text-align: left; margin-top: .1rem; }
.gr-schedule thead th.gl-closed, .gr-schedule td.gl-closed { background: repeating-linear-gradient(135deg, var(--gr-surface), var(--gr-surface) 6px, var(--gr-soft) 6px, var(--gr-soft) 12px); }
.gr-schedule thead th.gl-ex:not(.gl-closed) { background: color-mix(in srgb, var(--tblr-orange) 10%, var(--gr-surface)); }
.gr-schedule td .gl-cell-hrs { display: block; font-size: .6875rem; color: var(--gr-muted); }
.shift-tile.gl-warn { border-color: var(--tblr-orange); box-shadow: 0 0 0 1px var(--tblr-orange); }
.shift-tile .gl-w { display: block; color: var(--tblr-orange); font-size: .75rem; }
.gl-dm-warn { color: var(--tblr-orange); }
@media (max-width: 575.98px) {
  .gl-day { grid-template-columns: minmax(0, 1fr) auto; }
  .gl-day.ro { grid-template-columns: minmax(0, 1fr) auto; }
  .gl-day .times { grid-column: 1 / -1; }
  .gl-day.ro .num { text-align: right; }
  .gl-day .times input { width: 6.75rem; }
  .gl-hol { grid-template-columns: auto 5.5rem minmax(0, 1fr); }
  .gl-hol select, .gl-hol .times { grid-column: 2 / -1; }
}

/* ------------------------------------------------------------------ N15: mapa lokalu (Leaflet + OpenStreetMap) */
.mp-card { max-width: 980px; }
.mp-section { border-top: 1px solid var(--gr-line); margin-top: 1rem; padding-top: 1rem; }
.mp-section h2 { font-size: 1rem; margin: 0 0 .25rem; }
.mp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 1rem; align-items: start; }
@media (max-width: 991.98px) { .mp-grid { grid-template-columns: 1fr; } }
.mp-search { position: relative; }
.mp-results { position: absolute; z-index: 1001; left: 0; right: 0; top: calc(100% + 4px); background: var(--tblr-bg-surface); border: 1px solid var(--gr-line); border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: .25rem 0; max-height: min(24rem, 60vh); overflow-y: auto; }
.mp-results button { all: unset; box-sizing: border-box; display: flex; gap: .5rem; width: 100%; padding: .45rem .75rem; cursor: pointer; font-size: .8125rem; }
.mp-results button:hover, .mp-results button:focus-visible { background: var(--gr-soft); }
.mp-results [role=option][aria-selected=true] { background: var(--tblr-primary-lt); }
.mp-results .sub { display: block; color: var(--gr-muted); font-size: .75rem; }
.mp-results .head { padding: .25rem .75rem .35rem; font-size: .75rem; border-bottom: 1px solid var(--gr-line); margin-bottom: .25rem; }
.mp-results .note { padding: .45rem .75rem; font-size: .8125rem; color: var(--gr-muted); }
.mp-results .foot { padding: .35rem .75rem 0; font-size: .6875rem; color: var(--gr-muted); border-top: 1px solid var(--gr-line); margin-top: .25rem; }
.mp-filled { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tblr-green) 35%, transparent); transition: box-shadow .3s; }
.mp-mapwrap { position: relative; border: 1px solid var(--gr-line); border-radius: 8px; overflow: hidden; }
#mp-map { height: 400px; background: var(--gr-soft); }
.mp-mapwrap.no-tiles #mp-map { background-image: linear-gradient(var(--gr-line) 1px, transparent 1px), linear-gradient(90deg, var(--gr-line) 1px, transparent 1px); background-size: 40px 40px; }
.mp-overlay-note { position: absolute; z-index: 1000; left: .5rem; right: .5rem; bottom: .5rem; font-size: .75rem; padding: .35rem .6rem; border-radius: 6px;
  background: color-mix(in srgb, var(--tblr-bg-surface) 92%, transparent); border: 1px solid var(--gr-line); }
.mp-wheel { position: absolute; z-index: 1000; top: .5rem; left: 50%; transform: translateX(-50%); font-size: .75rem; padding: .25rem .6rem; border-radius: 1rem;
  background: rgba(15,23,42,.75); color: #fff; pointer-events: none; opacity: 0; transition: opacity .2s; }
.mp-wheel.show { opacity: 1; }
.mp-phone-open { display: none; position: absolute; inset: 0; z-index: 1000; align-items: center; justify-content: center; background: rgba(15,23,42,.12); }
.mp-full-bar, .mp-full-top { display: none; }
.mp-mapwrap.full { position: fixed; inset: 0; z-index: 1300; border-radius: 0; border: 0; background: var(--tblr-bg-surface); display: flex; flex-direction: column; }
.mp-mapwrap.full #mp-map { height: auto; flex: 1; }
.mp-mapwrap.full .mp-full-bar { display: flex; gap: .5rem; align-items: center; padding: .6rem .75rem max(.6rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--gr-line); background: var(--tblr-bg-surface); }
.mp-mapwrap.full .mp-full-top { display: flex; gap: .5rem; align-items: center; padding: .6rem .75rem; border-bottom: 1px solid var(--gr-line); }
@media (max-width: 575.98px) {
  #mp-map { height: 220px; }
  .mp-mapwrap:not(.full) .mp-phone-open { display: flex; }
  .mp-mapwrap:not(.full) .mp-overlay-note { display: none; }
}
.mp-pin { color: var(--tblr-red); filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.mp-pin svg { width: 36px; height: 36px; fill: color-mix(in srgb, var(--tblr-red) 25%, #fff); }
.mp-handle { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--tblr-primary); box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: ew-resize; }
.mp-other { font-size: .6875rem; font-weight: 600; padding: .05rem .35rem; border-radius: 4px; color: #fff; white-space: nowrap; opacity: .85; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.mp-side .form-range { width: 100%; }
.mp-legend { display: grid; gap: .25rem; font-size: .8125rem; }
.mp-legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; }
.mp-coords summary { cursor: pointer; font-size: .8125rem; color: var(--gr-muted); }
.mp-coords summary:hover { color: var(--tblr-body-color); }
.mp-card .leaflet-container { font: inherit; }
[data-bs-theme=dark] .mp-card .leaflet-tile-pane { filter: brightness(.85) contrast(1.05); }
/* N27: pole „Adres” z podpowiedziami – oznaczenie przy etykiecie i linijka stanu pod polem */
.mp-tag { display: inline-block; font-size: .6875rem; font-weight: 600; padding: 0 .4rem; border-radius: 1rem; background: var(--tblr-primary-lt); color: var(--tblr-primary); margin-left: .35rem; vertical-align: 1px; }
.mp-addr-status { margin-top: .35rem; font-size: .8125rem; line-height: 1.5; color: var(--gr-muted); }
.mp-addr-status:empty { display: none; }
.mp-addr-status .icon { font-size: 1rem; width: 1rem; height: 1rem; vertical-align: -.2em; margin-right: .3rem; }
.mp-addr-status > span + span { margin-left: .35rem; }
.mp-addr-status .ok { color: var(--tblr-green); }
.mp-addr-status .warn { color: var(--tblr-orange); }
.mp-addr-status b { color: var(--tblr-body-color); font-weight: 600; }
.mp-addr-status .btn { margin-left: .5rem; vertical-align: baseline; --tblr-btn-padding-y: .05rem; --tblr-btn-padding-x: .5rem; --tblr-btn-font-size: .75rem; --tblr-btn-line-height: 1.4; }

/* ------------------------------------------------------------------ etap 2: N14, N23–N26 */
/* N14 P2: nazwisko w harmonogramie ucięte po literach („Aleksandra Wiśn…”), pełne w dymku (panel.js) */
.gr-schedule .emp-name { display: flex; align-items: center; min-width: 0; }
.gr-schedule .emp-name .gr-person, .gr-schedule .emp-name .gr-trunc { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575.98px) {
  .gr-schedule:not(.gr-month) .emp-name { align-items: flex-start; }
  .gr-schedule:not(.gr-month) .emp-name .gr-person { white-space: normal; overflow: visible; }
  .gr-schedule:not(.gr-month) .emp-name .dot { margin-top: .3rem; }
  /* wariant A na telefonie: mniej kafelków liczb, tabela dostaje więcej miejsca */
  .gr-stats-fit .gr-stat:nth-child(n+3) { display: none; }
  .gr-stats-fit .gr-stat b { font-size: 1.15rem; }
}
/* N14 P1: „Do sprawdzenia” w panelu z boku, legenda miesiąca w małym menu */
.gr-issues-panel { --tblr-offcanvas-width: min(420px, 100vw); }
.gr-issues-panel .offcanvas-title { font-size: 1rem; }
.gr-legend { width: min(22rem, calc(100vw - 2rem)); white-space: normal; color: var(--tblr-body-color); }
.gr-filters .gr-end .gr-vo-panel { text-align: left; }
/* N14 P3: „Może pracować także w” – pigułki z kolorem lokalu, według miasta */
.gr-locs { border: 0; padding: 0; margin: 0; min-width: 0; }
.gr-locs-city { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: start; gap: .35rem; margin-bottom: .4rem; }
.gr-locs-name { font-size: .75rem; color: var(--tblr-secondary); padding-top: .3rem; }
.gr-locs-pills { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.gr-locs-all { font-size: .75rem; margin-inline-start: .25rem; }
.gr-pill { position: relative; display: inline-flex; align-items: center; gap: .35rem; min-width: 4.25rem; padding: .2rem .6rem .2rem .45rem; margin: 0;
  border: 1px solid var(--tblr-border-color); border-radius: 1rem; background: var(--tblr-bg-surface); font-size: .8125rem; cursor: pointer; user-select: none; }
.gr-pill .form-check-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.gr-pill .dot { margin: 0; }
.gr-pill:has(input:checked) { background: var(--tblr-primary-lt); border-color: var(--tblr-primary); color: var(--tblr-primary); font-weight: 600; }
.gr-pill:has(input:focus-visible) { outline: 2px solid var(--tblr-primary); outline-offset: 1px; }
.gr-pill.home { opacity: .65; cursor: default; }
@media (max-width: 575.98px) { .gr-locs-city { grid-template-columns: 1fr; gap: .2rem; } .gr-locs-name { padding-top: 0; } }
/* N14: „Status”/„Lista płac” nad polem wyboru, pole na wysokości sąsiedniego pola (bez przesuwania „na oko”) */
.gr-check-field .gr-check-inline { display: flex; align-items: center; gap: .5rem; min-height: calc(1.4285em + .5rem + 2px); margin: 0; padding-left: 0; }
.gr-check-field .gr-check-inline .form-check-input { float: none; margin: 0; }
/* szerokości pól zamiast style="width…" w szablonach (N26, porządki) */
.gr-w-4 { width: 4.5rem; } .gr-w-5 { width: 5.5rem; } .gr-w-6 { width: 6.5rem; } .gr-w-7 { width: 7.5rem; } .gr-w-9 { width: 9rem; } .gr-w-12 { width: 12.5rem; }
.gr-rule-code { min-width: 3.5rem; }
.gr-req-who { min-width: 13.75rem; }
.gr-timeline-ticks { font-size: .65rem; }
.gr-narrow { max-width: 40rem; }
.gr-narrow-lg { max-width: 52rem; }
.gr-field-num .form-control { max-width: 9rem; }
/* N24: tabela w karcie Tablera przewijana w bok, karty dni na telefonie, puste listy */
.gr-matrix-card { border: 0; border-radius: 0; }
.gr-weekend > td, .gr-weekend.card { background: var(--gr-soft); }
.gr-ts-person td, .gr-ts-person th { white-space: nowrap; }
.gr-ts-person td:nth-last-child(2) { white-space: normal; min-width: 12rem; }
.gr-empty-sm { padding: 1.25rem 1rem; }
.gr-empty-sm .empty-icon { margin-bottom: .5rem; }
.card-table tfoot tr:last-child td { border-bottom: 0; }
/* N25: przycisk „⋯” nad odnośnikiem rozciągniętym na wiersz rozmowy; widoczny fokus */
.gr-chat-row .gr-chat-more { z-index: 2; }
.gr-chat-row .gr-chat-link:focus-visible { outline: none; }
.gr-chat-row:has(.gr-chat-link:focus-visible) { outline: 2px solid var(--tblr-primary); outline-offset: -2px; }
.gr-person:focus-visible, .cell-add:focus-visible, .gr-pill:focus-within { outline-color: var(--tblr-primary); }
#gr-toasts .btn-close { --tblr-btn-close-color: currentColor; }   /* toast na kolorowym tle: krzyżyk w kolorze tekstu (bez btn-close-white, którego Tabler nie ma) */
.gr-minw-12 { min-width: 12rem; } .gr-maxw-6 { max-width: 6rem; } .gr-maxw-11 { max-width: 11rem; }
/* N23: wybrana opcja w przełącznikach (Wg osób / Wg lokali, Tydzień / Miesiąc, Oczekujące …) – kolor główny zamiast szarego bloku,
   czytelna w trybie jasnym i ciemnym. */
.btn-group > .btn-outline-secondary { --tblr-btn-active-bg: var(--tblr-primary-lt); --tblr-btn-active-color: var(--tblr-primary);
  --tblr-btn-active-border-color: color-mix(in srgb, var(--tblr-primary) 55%, transparent); }
.btn-group > .btn-outline-secondary.active { font-weight: 600; z-index: 1; }
.gr-schedule .emp-name:not(:has(> *)) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* „Zmiany nieprzypisane” – sam tekst */

/* ------------------------------------------------------------------ N41: filtr ludzi w kolumnie „Osoba” grafiku (web/people-filter.js) */
.gr-pf { margin-top: .35rem; font-weight: 400; }
.gr-pf-bar { display: flex; gap: .3rem; align-items: center; }
.gr-pf-q { flex: 1; min-width: 0; height: 1.875rem; padding: .2rem .45rem; font-size: .8125rem; }
.gr-pf-btn { flex: none; display: inline-flex; align-items: center; gap: .2rem; height: 1.875rem; min-height: 0; padding: 0 .45rem; font-size: .8125rem; font-weight: 500;
  background: var(--tblr-bg-surface); border: 1px solid var(--tblr-border-color); color: var(--tblr-body-color); }
.gr-pf-btn .icon { margin: 0; font-size: 1rem; }
.gr-pf-btn.on { border-color: var(--tblr-primary); color: var(--tblr-primary); background: color-mix(in srgb, var(--tblr-primary) 8%, var(--tblr-bg-surface)); }
.gr-pf-btn:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 1px; }
.gr-pf-n { font-size: .6875rem; padding: .1rem .35rem; border-radius: 1rem; line-height: 1.1; }
.gr-pf-n[hidden], .gr-pf-cnt[hidden] { display: none; }
.gr-month .gr-pf-btn-t { display: none; }   /* miesiąc: wąska kolumna osób – sam symbol filtra (nazwa w aria-label) */
.gr-month .gr-pf { margin-top: .25rem; }
.gr-pf-cnt { margin-top: .25rem; font-size: .75rem; color: var(--gr-muted); white-space: normal; }
.gr-schedule tr.gr-pf-empty th, .gr-schedule tr.gr-pf-empty td { color: var(--gr-muted); font-size: .8125rem; padding: .75rem .4rem; background: var(--gr-soft); }
.gr-schedule tr.gr-pf-empty .emp-col { white-space: normal; }
.gr-pf-pop { position: fixed; z-index: 1070; width: 17.5rem; max-width: calc(100vw - 16px); max-height: min(30rem, calc(100vh - 24px)); display: flex; flex-direction: column;
  background: var(--tblr-bg-surface); border: 1px solid var(--gr-line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); text-align: left; }
[data-bs-theme=dark] .gr-pf-pop { box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
.gr-pf-pop[hidden] { display: none; }
.gr-pf-head { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem .45rem; border-bottom: 1px solid var(--gr-line); }
.gr-pf-head h2 { font-size: .9375rem; margin: 0; flex: 1; }
.gr-pf-body { overflow-y: auto; padding: .15rem 0; }
.gr-pf-sec { border: 0; margin: 0; padding: .45rem .55rem; min-width: 0; border-bottom: 1px solid var(--gr-line); }
.gr-pf-sec:last-child { border-bottom: 0; }
.gr-pf-sec legend { float: none; width: auto; font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gr-muted); font-weight: 600;
  margin: 0 0 .2rem; padding: 0 .3rem; line-height: 1.4; }
.gr-pf-opt { display: flex; align-items: center; gap: .5rem; padding: .3rem .3rem; border-radius: 6px; margin: 0; cursor: pointer; font-size: .875rem; }
.gr-pf-opt:hover { background: var(--gr-soft); }
.gr-pf-opt .form-check-input { margin: 0; flex: none; float: none; }
.gr-pf-opt .n { margin-left: auto; color: var(--gr-muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.gr-pf-foot { display: flex; justify-content: space-between; align-items: center; padding: .45rem .8rem; border-top: 1px solid var(--gr-line); }
@media (max-width: 575.98px) {
  /* telefon: wąska kolumna osób – pole na całą szerokość, pod nim sam symbol filtra z licznikiem; okienko jako arkusz od dołu */
  .gr-pf-bar { flex-wrap: wrap; }
  .gr-pf-q { flex-basis: 100%; }
  .gr-schedule:not(.gr-month) .gr-pf-btn-t { display: none; }
  .gr-pf-pop.sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 85vh; max-height: 85dvh; border-radius: 16px 16px 0 0; }
  .gr-pf-pop.sheet .gr-pf-opt { padding: .5rem .3rem; }
  .gr-pf-pop.sheet .gr-pf-foot { padding-bottom: calc(.6rem + env(safe-area-inset-bottom)); }
}

/* ---------- N42: ramka firmy pod znakiem NexApp Planner (makieta n42-firmy-wyglad) ----------
   Inicjały w kolorze głównym, nazwa i rola; przy kilku firmach przycisk z listą „Twoje firmy”. Logo i kolor firmy – N43. */
.gr-org { margin: .35rem .75rem .15rem; min-width: 0; }
.gr-orgbox { display: flex; align-items: center; gap: .6rem; width: 100%; min-width: 0; padding: .45rem .6rem; text-align: start;
  border: 1px solid var(--tblr-border-color); border-radius: 10px; background: var(--tblr-bg-surface); color: var(--tblr-body-color); }
button.gr-orgbox:hover { border-color: var(--tblr-border-color-translucent, #c9ccd1); background: var(--tblr-bg-surface-secondary); }
button.gr-orgbox:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 2px; }
.gr-orgbox-ph { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 8px;
  font-weight: 700; font-size: .8rem; background: var(--tblr-primary); color: var(--tblr-primary-fg, #fff); }
.gr-orgbox-ph-sm { width: 26px; height: 26px; border-radius: 6px; font-size: .68rem; }
.gr-orgbox-nm { font-weight: 600; line-height: 1.2; min-width: 0; font-size: .875rem; }
.gr-orgbox-nm small { display: block; color: var(--tblr-secondary); font-weight: 400; font-size: .75rem; }
.gr-orgbox-sel { color: var(--tblr-secondary); flex: none; }
.gr-org .dropdown-menu { min-width: 100%; }
.gr-org .dropdown-menu form { margin: 0; }
.gr-org-item { display: flex; align-items: center; gap: .5rem; min-width: 0; }
html[data-bs-sidebar=folded] .navbar-vertical .gr-org { margin-inline: .35rem; }
html[data-bs-sidebar=folded] .gr-orgbox { justify-content: center; padding: .3rem; }
html[data-bs-sidebar=folded] .gr-orgbox > .gr-orgbox-nm, html[data-bs-sidebar=folded] .gr-orgbox > .gr-orgbox-sel { display: none; }
@media (max-width: 991.98px) { .navbar-vertical .gr-org { display: none; } }
/* telefon: arkusz „Więcej” – lista firm (ciemna karta jak konto) */
.gr-sheet-orgs { display: grid; gap: 6px; margin-bottom: 4px; }
.gr-sheet-orgs form { margin: 0; }
.gr-sheet-org { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 12px; text-align: left;
  border: 1px solid var(--tblr-border-color); border-radius: 14px; background: var(--tblr-bg-surface); color: var(--tblr-body-color); }
.gr-sheet-org.active { border-color: var(--tblr-primary); box-shadow: inset 0 0 0 1px var(--tblr-primary); }
.gr-sheet-org:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 2px; }
/* lista firm (operator) */
.gr-companies td { vertical-align: middle; }

/* ---------- N43: logo firmy w ramce (web/partials/company_logo.html) ----------
   Tryb jasny – logo na jasne tło, ciemny – na ciemne. Jedno logo na niepasującym tle stoi na plakietce w kolorze swojego
   tła (P4). Kolor firmy przychodzi z /motyw/<rrggbb>.css (core/brand.py). */
.gr-orgbox-logo { display: flex; align-items: center; flex: none; min-width: 34px; max-width: 100px; height: 38px; }
.gr-orgbox:has(.gr-orgbox-logo) .gr-orgbox-nm { overflow: hidden; }
.gr-orgbox-logo > span { display: flex; align-items: center; justify-content: center; height: 100%; max-width: 100%; border-radius: 8px; }
.gr-orgbox-logo img { display: block; max-height: 28px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.gr-orgbox-logo .gr-plate-d { background: #1a1d21; padding: 0 6px; }
.gr-orgbox-logo .gr-plate-l { background: #fff; padding: 0 6px; border: 1px solid #e3e4e8; }
.gr-orgbox-logo .gr-logo-d { display: none; }
[data-bs-theme=dark] .gr-orgbox-logo .gr-logo-l { display: none; }
[data-bs-theme=dark] .gr-orgbox-logo .gr-logo-d { display: flex; }
html[data-bs-sidebar=folded] .gr-orgbox-logo { max-width: 44px; min-width: 0; }
.gr-sheet-org .gr-orgbox-logo { max-width: 96px; }
