:root {
  --arm-blue: var(--fiolet, #6128b5);
  --arm-teal: #934de0;
  --arm-graphite: #231a31;
  --arm-gradient: linear-gradient(135deg, #8240d8 0%, #4d2098 100%);
  --navy: var(--arm-graphite);
  --navy-dark: #191322;
  --navy-light: #352448;
  --accent: var(--arm-blue);
  --accent-2: var(--arm-teal);
  --bg: var(--fiolet-tlo, #f7f6fb);
  --surface: #ffffff;
  --border: #ded4e9;
  --text: var(--fiolet-tekst, #33234a);
  --muted: #685b7a;
  --green: #1f9d55;
  --amber: #d97706;
  --red: #dc2626;
  --red-dark: #991b1b;
  --grey: #94a3b8;
  --na-akcencie: #ffffff;
  --pole: #ffffff;
  --pole-obwodka: #818fa3;
  --pole-obwodka-hover: #5f6d80;
  --kontrolka-h: 34px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .05);
  --sidebar-w: 248px;
  --szyna-tlo: #fff;
  --szyna-tekst: #33234a;
  --szyna-opis: #685b7a;
  --szyna-aktywna: #f1ebfc;
  --szyna-marka: #6128b5;
  --wyloguj-tekst: #a52a44;
  --mono: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  --przewijanie: rgba(22, 32, 43, .26);
  --przewijanie-hover: rgba(22, 32, 43, .45);
}
body.portal-backoffice {
  --accent: #7833bc;
  --navy: #2e1b45;
  --navy-dark: #211335;
  --navy-light: #492769;
}
* { box-sizing: border-box; }
*::-webkit-scrollbar { width: 12px; height: 12px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--przewijanie);
  border: 3px solid transparent;
  border-radius: 12px;
  background-clip: padding-box;
  min-height: 40px;
}
*::-webkit-scrollbar-thumb:hover { background: var(--przewijanie-hover); background-clip: padding-box; border-width: 2px; }
*::-webkit-scrollbar-thumb:active { background: var(--accent); background-clip: padding-box; border-width: 2px; }
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--przewijanie) transparent; }
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}
button, input, select, textarea { font-family: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.login-body {
  display: grid;
  place-items: center;
  padding: 1rem;
  position: relative;
  overflow: auto;
  background: var(--arm-graphite);
}
.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: .28;
  filter: grayscale(.3);
}
.login-body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(140deg, #8240d870 0%, #4d20986b 55%, #191322db 100%);
}
.login-card { position: relative; z-index: 2; }
.portal-badge {
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #8240d81c;
  color: var(--arm-blue);
  border: 1px solid #8240d854;
}
.portal-badge.backoffice {
  background: #934de022;
  color: #7833bc;
  border-color: #934de066;
}
.lang-switch { position: absolute; top: 1rem; right: 1rem; z-index: 3; display: flex; gap: .25rem; }
.lang-switch.inline { position: static; }
.lang-switch.inline button {
  border-color: var(--border);
  background: var(--bg);
  color: var(--muted);
}
.lang-switch.inline button.active { background: var(--accent); color: #fff; border-color: transparent; }
.lang-switch button {
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
  padding: .25rem .5rem;
  cursor: pointer;
}
.lang-switch button.active { background: #fff; color: var(--arm-graphite); font-weight: 600; }
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.login-head { text-align: center; margin-bottom: 1.5rem; }
.login-head h1 { font: 700 23px/1.1 var(--font-marki, system-ui); color: var(--accent); margin-top: .75rem; }
.login-head p { margin: .25rem 0 0; font-size: 12.5px; }
.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--arm-gradient);
  color: #fff;
  font-weight: 700;
  letter-spacing: .05em;
  font-size: 17px;
}
.logo-mark.small { width: 34px; height: 34px; font-size: 12px; border-radius: 9px; }
.logo-img { display: block; height: 34px; width: auto; }
.logo-img.logo-badge { height: 34px; width: 34px; border-radius: 9px; }
.logo-plate {
  display: inline-block;
  max-width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: .6rem .9rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.logo-img.login { width: 100%; max-width: 320px; height: auto; margin: 0 auto; }
.login-foot {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: 11px;
  text-align: center;
}
.pw-wrap { position: relative; display: block; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); font-size: 11.5px; cursor: pointer;
}
.msg {
  margin: 1rem 0 0;
  padding: .65rem .8rem;
  border-radius: 8px;
  font-size: 13px;
  background: #fdecec;
  color: var(--red-dark);
  border: 1px solid #f7c9c9;
}
.msg.ok { background: #e8f7ef; color: #15603a; border-color: #bfe6d0; }
.msg.info { background: #eaf2fd; color: #1a4d8f; border-color: #c6dcf8; }
.msg.warn { background: #fff6e5; color: #7a4a00; border-color: #f3d39b; }
.cepik-api-srodowisko { border: 1px solid var(--border); border-radius: 8px; padding: .75rem; display: grid; gap: .55rem; min-width: 0; }
.cepik-api-srodowisko h4 { margin: 0; }
.kod-pole { width: 100%; font-family: var(--mono); font-size: 12px; }
table.kv td { padding: .2rem .6rem .2rem 0; vertical-align: top; }
table.kv td:first-child { color: var(--muted); white-space: nowrap; }
.shell { display: flex; min-height: 100vh; }
@supports (height: 100dvh) {
  .shell { min-height: 100dvh; }
  .sidebar { height: 100dvh !important; }
}
.leaflet-container { isolation: isolate; }
body[data-view="map"] .map-layout { isolation: isolate; }
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--szyna-tlo);
  color: var(--szyna-tekst);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 31;
  height: 100vh;
}
.brand {
  display: flex; align-items: center; justify-content: space-between; gap: .4rem;
  min-height: 62px; padding: .55rem .7rem; flex: none;
  border-bottom: 1px solid var(--border);
}
.brand-lockup { display: flex; align-items: center; gap: .55rem; white-space: nowrap; }
.brand-icon { display: block; flex: none; width: 40px; height: 40px; }
.brand-name { color: var(--brand-era, var(--szyna-marka)); font: 800 28px/1 var(--font-marki, system-ui); letter-spacing: -.065em; }
.brand-name-tacho { color: var(--brand-tacho, inherit); }
#sidebar-toggle { display: grid; flex: none; place-items: center; width: 32px; height: 34px; padding: 0; }
#sidebar-toggle svg { width: 17px; height: 17px; }
.nav { flex: 1; overflow-y: auto; padding: .5rem 0; }
.nav a {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem;
  color: var(--szyna-opis); font-size: 13.5px; text-decoration: none;
  border-left: 3px solid transparent;
}
.nav a:hover { background: var(--szyna-aktywna); color: var(--szyna-marka); text-decoration: none; }
.nav a.active { background: var(--szyna-aktywna); color: var(--szyna-marka); border-left-color: var(--szyna-marka); font-weight: 700; }
.nav a .ico { width: 18px; text-align: center; }
.nav .group-label {
  padding: .9rem 1rem .3rem; font-size: 10px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--szyna-opis);
}
.nav { scrollbar-width: thin; scrollbar-color: var(--przewijanie) transparent; }
.nav::-webkit-scrollbar { width: 8px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb { background: var(--przewijanie); border-radius: 8px; }
.nav::-webkit-scrollbar-thumb:hover { background: var(--przewijanie-hover); }
@media (min-width: 821px) {
  .shell.nav-collapsed { --sidebar-w: 62px; }
  .shell.nav-collapsed .brand { flex-direction: column; padding-inline: .25rem; }
  .shell.nav-collapsed .brand-icon { width: 34px; height: 34px; }
  .shell.nav-collapsed #sidebar-toggle svg { transform: rotate(180deg); }
  .shell.nav-collapsed .brand-name,
  .shell.nav-collapsed .nav .group-label,
  .shell.nav-collapsed .nav a > span:not(.ico),
  .shell.nav-collapsed .konto-skrot { display: none; }
  .shell.nav-collapsed .nav a { justify-content: center; padding: .6rem 0; border-left-width: 0; }
  .shell.nav-collapsed .nav a.active { box-shadow: inset 3px 0 0 var(--szyna-marka); }
  .shell.nav-collapsed .sidebar-foot { padding-inline: 4px; }
  .shell.nav-collapsed .konto-przycisk { justify-content: center; }
  .shell.nav-collapsed .konto-panel { left: calc(100% - 4px); bottom: 3px; width: min(290px, calc(100vw - 66px)); }
}
.sidebar { transition: width .16s ease-out, flex-basis .16s ease-out; }
.sidebar-foot { position: relative; padding: .55rem .62rem; border-top: 1px solid var(--border); --stan-polaczenia: var(--amber); }
.sidebar-foot[data-polaczenie="open"] { --stan-polaczenia: #22a366; }
.sidebar-foot:is([data-polaczenie="closed"], [data-polaczenie="unauthorized"], [data-polaczenie="error"]) { --stan-polaczenia: var(--red); }
.konto-przycisk {
  width: 100%; display: flex; align-items: center; gap: .68rem; text-align: left;
  padding: .4rem; min-height: 49px; border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--szyna-tekst); cursor: pointer;
}
.konto-przycisk:hover, .konto-przycisk[aria-expanded="true"] { background: var(--szyna-aktywna); }
.konto-awatar { position: relative; flex-shrink: 0; }
.konto-awatar .avatar { width: 34px; height: 34px; background: #7137bf; color: #fff; }
.konto-sygnal { width: 9px; height: 9px; border-radius: 50%; background: var(--stan-polaczenia); flex: none; }
.konto-awatar .konto-sygnal { position: absolute; right: -2px; bottom: -1px; box-shadow: 0 0 0 2px var(--szyna-tlo); }
.konto-skrot, .konto-panel-naglowek { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.konto-skrot strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.konto-skrot small { color: var(--szyna-opis); font-size: 11px; }
.menu-karty {
  position: absolute; z-index: 5; border: 1px solid var(--border); border-radius: 13px;
  background: var(--surface); color: var(--text); box-shadow: 0 10px 28px #21133d33;
}
.konto-panel { bottom: calc(100% - 2px); left: .65rem; width: min(290px, calc(100vw - 22px)); padding: 5px; }
.konto-panel-naglowek { padding: 9px 10px; overflow-wrap: anywhere; }
.konto-panel-naglowek span { color: var(--muted); font-size: 11px; }
.konto-stan { display: flex; align-items: center; gap: .5rem; padding: 7px 10px; border-block: 1px solid var(--border); margin-bottom: 4px; font-size: 12px; }
.menu-akcja {
  display: flex; width: 100%; align-items: center; gap: .6rem; min-height: 35px;
  padding: .36rem .6rem; border: 0; border-radius: 7px; color: var(--text);
  background: none; text-align: left; text-decoration: none; cursor: pointer;
}
.menu-akcja:hover, .menu-akcja:focus-visible { background: var(--szyna-aktywna); color: var(--szyna-marka); text-decoration: none; }
.konto-wyloguj { color: var(--wyloguj-tekst); }
.konto-warstwa { margin-top: 4px; padding: 7px 10px 5px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 17px; margin: 0; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: .6rem; }
.topbar .icon-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; }
.topbar #burger { display: none; }
.topbar svg, .menu-karty svg { width: 18px; height: 18px; flex: none; }
.topbar .pasek-jezyk { width: auto; padding-inline: .45rem; gap: .3rem; font-size: 11px; font-weight: 750; }
.topbar .pasek-ai { font-size: 12px; font-weight: 750; color: var(--szyna-marka); }
.historia-commity { list-style: none; padding: 0; }
.historia-commity li { padding: .8rem 0; border-bottom: 1px solid var(--border); }
.historia-commity a { display: inline-block; margin-bottom: .25rem; font-weight: 650; }
.historia-zmian h2 { margin-top: .75rem; }
.historia-zmian h3 { margin-top: 1rem; }
.historia-tekst { white-space: pre-wrap; overflow-wrap: anywhere; }
.historia-diff { white-space: pre; max-height: 60vh; overflow: auto; padding: .75rem; background: var(--bg); }
.trial-pasek { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; padding: .65rem 1.1rem; background: var(--szyna-aktywna); border-bottom: 1px solid var(--border); }
.trial-pasek strong { margin-right: .6rem; color: var(--szyna-marka); }
.firmy-przelacznik, #tenant-switch { min-width: 0; }
.firmy-przelacznik { position: relative; }
.firma-przycisk {
  display: flex; align-items: center; gap: .45rem; min-height: 36px; max-width: min(250px, 35vw); min-width: 0;
  border: 1px solid var(--border); border-radius: 8px; padding: .3rem .6rem;
  color: var(--text); background: var(--surface); cursor: pointer;
}
.firma-przycisk:hover, .firma-przycisk[aria-expanded="true"] { background: var(--szyna-aktywna); border-color: var(--szyna-marka); }
.firma-nazwa { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; }
.firmy-panel { top: calc(100% + 5px); right: 0; width: min(312px, calc(100vw - 24px)); padding: 6px; }
.firmy-szukaj { display: flex; align-items: center; gap: 7px; margin: 2px 2px 5px; color: var(--muted); }
.firmy-szukaj input { width: 100%; min-width: 0; }
.firmy-lista { overflow-y: auto; max-height: min(52vh, 330px); overscroll-behavior: contain; }
.firma-pozycja {
  width: 100%; padding: .46rem .56rem; border: 0; border-radius: 7px; display: flex; align-items: center;
  justify-content: space-between; gap: .7rem; text-align: left; background: transparent; color: var(--text);
}
button.firma-pozycja { cursor: pointer; }
.firma-pozycja:hover, .firma-pozycja.aktywna { background: var(--szyna-aktywna); color: var(--szyna-marka); }
.firma-pozycja span { min-width: 0; overflow-wrap: anywhere; }
.firma-pozycja small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.firmy-puste { padding: .35rem .55rem; color: var(--muted); }
.firmy-edycja { margin-top: 4px; border-top: 1px solid var(--border); }
.firmy-bez { color: var(--muted); }
.icon-btn {
  position: relative;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 34px; height: 34px; cursor: pointer; font-size: 15px;
  color: var(--text);
}
.icon-btn:hover { background: var(--bg); }
.badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--red); color: #fff; border-radius: 9px;
  min-width: 17px; height: 17px; font-size: 10.5px; line-height: 17px; padding: 0 4px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy-light); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.view { padding: 1.25rem; flex: 1; }
.loading { padding: 3rem; text-align: center; color: var(--muted); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin-bottom: 1rem;
}
.card > h2, .card > h3 { font-size: 13.5px; letter-spacing: .01em; font-weight: 650; color: var(--text); }
.card.flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1rem; border-bottom: 1px solid var(--border);
}
.card-head h2, .card-head h3 {
  margin: 0; font-size: 13.5px; font-weight: 650; letter-spacing: .01em; color: var(--text);
}
.card-body { padding: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid.kpi { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid.form { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.kpi-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .9rem 1rem; box-shadow: var(--shadow);
}
.kpi-tile .label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi-tile .value { font-size: 26px; font-weight: 650; line-height: 1.15; margin-top: .2rem; }
.kpi-tile .sub { font-size: 11.5px; color: var(--muted); margin-top: .15rem; }
.kpi-tile .kpi-head {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  min-height: 18px;
}
.kpi-tile .kpi-ikona { display: inline-flex; opacity: .85; }
.kpi-tile .kpi-ikona .znak-czynnosci { gap: 0; }
.kpi-tile.z-akcentem {
  position: relative; padding-left: 1.15rem; overflow: hidden;
}
.kpi-tile.z-akcentem::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--kpi-akcent, var(--border));
}
.kpi-tile.green .value { color: var(--green); }
.kpi-tile.amber .value { color: var(--amber); }
.kpi-tile.red .value { color: var(--red); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.stack.tight { gap: .4rem; }
.spacer { flex: 1 1 auto; }
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.grid-2, .grid-3 { display: grid; gap: .75rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.field-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .8rem;
  background: var(--bg);
}
.split-2 { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 1rem; align-items: start; }
.split-2-even { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; align-items: start; margin-bottom: 1rem; }
@media (max-width: 900px) { .split-2 { grid-template-columns: 1fr; } }
.thread-list { max-height: 70vh; overflow-y: auto; }
.thread-item {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex; flex-direction: column; gap: .15rem;
}
.thread-item:hover { background: var(--bg); }
.thread-item.active { background: #e8f0fd; border-left: 3px solid var(--accent); }
.thread-item.unhandled { border-left: 3px solid var(--amber); }
.thread-last {
  font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.chat-pane { display: flex; flex-direction: column; min-height: 420px; }
.chat-log {
  flex: 1;
  max-height: 52vh;
  overflow-y: auto;
  padding: 1rem;
  display: flex; flex-direction: column; gap: .6rem;
}
.chat-msg { max-width: 78%; display: flex; flex-direction: column; gap: .2rem; }
.chat-msg.out { align-self: flex-end; align-items: flex-end; }
.chat-msg.in { align-self: flex-start; }
.chat-msg .chat-body {
  padding: .5rem .75rem;
  border-radius: 12px;
  font-size: 13px;
  white-space: pre-wrap;
}
.chat-msg.out .chat-body { background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }
.chat-msg.in .chat-body { background: var(--bg); border: 1px solid var(--border); border-bottom-left-radius: 3px; }
.chat-msg .chat-meta { font-size: 10.5px; color: var(--muted); }
.chat-compose {
  border-top: 1px solid var(--border);
  padding: .75rem 1rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.chat-compose textarea { width: 100%; }
.cond-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.cond-row {
  display: flex; gap: .4rem; align-items: center; flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .4rem .5rem;
}
.cond-row select, .cond-row input { margin: 0; }
.cond-row input[type=number] { width: 100px; }
.warn-box {
  background: #fdf6e7;
  border: 1px solid #f0d69a;
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  padding: .75rem .9rem;
  margin-bottom: 1rem;
  font-size: 12.5px;
  color: #6b4a08;
}
ol.steps { margin: 0; padding-left: 1.3rem; font-size: 13px; line-height: 1.55; }
ol.steps li { margin-bottom: .35rem; }
select.matrix-cell {
  font-size: 11.5px;
  padding: .2rem .3rem;
  min-width: 88px;
  border-radius: 6px;
}
select.matrix-cell.changed {
  border-color: var(--arm-blue);
  background: rgba(27, 77, 228, .08);
  font-weight: 600;
}
.assign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .3rem;
  max-height: 45vh;
  overflow-y: auto;
  margin-top: .75rem;
  padding: .5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.assign-item { padding: .25rem .4rem; border-radius: 6px; }
.assign-item:hover { background: var(--bg); }
.tabs.sub { border-bottom: 0; margin-bottom: .75rem; gap: .25rem; }
.tabs.sub button {
  font-size: 12px;
  padding: .35rem .7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.tabs.sub button.active {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.licence-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem .6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.licence-row.changed {
  border-color: var(--arm-blue);
  background: rgba(27, 77, 228, .06);
}
.licence-row.blocked { opacity: .6; }
.licence-row .lic-name { font-weight: 600; font-size: 13.5px; }
.licence-row .lic-meta { text-align: right; }
pre.code {
  background: var(--navy-dark);
  color: #e6edf3;
  padding: .8rem 1rem;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .04em;
  overflow-x: auto;
  user-select: all;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .licence-row { background: #231a31; }
  :root:not([data-theme="light"]) .licence-row.changed { background: rgba(27, 77, 228, .14); }
}
:root[data-theme="dark"] .licence-row { background: #231a31; }
  :root[data-theme="dark"] .licence-row.changed { background: rgba(27, 77, 228, .14); }
label { display: block; font-size: 12.5px; color: var(--muted); }
.pole-nazwy-dokumentu[hidden] { display: none; }
input, select, textarea {
  width: 100%;
  min-height: var(--kontrolka-h);
  margin-top: .25rem;
  padding: .45rem .65rem;
  border: 1px solid var(--pole-obwodka);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  background: var(--pole);
  transition: border-color .12s, box-shadow .12s;
}
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) {
  border-color: var(--pole-obwodka-hover);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}
textarea { min-height: calc(var(--kontrolka-h) * 2); }
input[type=checkbox], input[type=radio] { width: auto; margin: 0 .35rem 0 0; }
.check { display: flex; align-items: center; font-size: 12.5px; color: var(--text); }
.hint { font-size: 11.5px; color: var(--muted); margin: 0; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: .8rem; margin: 0 0 .8rem; }
legend { font-size: 12px; color: var(--muted); padding: 0 .35rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: var(--kontrolka-h);
  padding: .4rem .9rem;
  border: 1px solid var(--pole-obwodka);
  border-radius: 8px;
  background: var(--pole);
  font: inherit; font-size: 13px; font-weight: 500; line-height: 1.4;
  cursor: pointer; color: var(--text);
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.btn:hover { background: var(--bg); border-color: var(--pole-obwodka-hover); }
.btn:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--na-akcencie);
  font-weight: 600;
}
.btn.primary:hover {
  background: color-mix(in srgb, var(--accent) 85%, #000);
  border-color: color-mix(in srgb, var(--accent) 85%, #000);
}
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { background: var(--red-dark); }
.btn.ghost { background: none; border-color: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--bg); }
.btn.danger.ghost {
  background: none;
  border-color: var(--red);
  color: var(--red);
  font-weight: 600;
}
.btn.danger.ghost:hover { background: rgba(220, 38, 38, .08); color: var(--red-dark); border-color: var(--red-dark); }
.btn.big { justify-content: center; min-height: 42px; padding: .65rem 1rem; font-size: 14px; font-weight: 600; }
.btn.small { min-height: 28px; padding: .25rem .6rem; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600;
  padding: .5rem .7rem; border-bottom: 1px solid var(--border);
  background: #fafbfd; position: sticky; top: 0;
}
tbody td { padding: .5rem .7rem; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
tbody tr:hover { background: #f8fafc; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: rgba(37, 99, 235, .06); }
tbody tr.wyrozniony td { background: rgba(217, 119, 6, .1); font-weight: 600; }
tbody tr.wyrozniony td:first-child { box-shadow: inset 3px 0 0 #d97706; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow: auto; max-height: 70vh; }
.table-empty { padding: 2rem; text-align: center; color: var(--muted); }
.pill {
  display: inline-block; padding: .12rem .5rem; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  background: #eef1f6; color: var(--muted); white-space: nowrap;
}
.pill.green { background: #e4f6ea; color: #15603a; }
.pill.amber { background: #fdf1de; color: #8a4e04; }
.pill.red { background: #fdecec; color: var(--red-dark); }
.pill.blue { background: #e8f0fd; color: #1a4d8f; }
.pill.grey { background: #eef1f6; color: #475569; }
.status-driving { color: var(--green); }
.status-idle { color: var(--amber); }
.status-off { color: var(--grey); }
.status-alarm { color: var(--red); }
.sev-MI { background: #eef1f6; color: #475569; }
.sev-SI { background: #fdf1de; color: #8a4e04; }
.sev-VSI { background: #fdecec; color: var(--red-dark); }
.sev-MSI { background: #7f1d1d; color: #fff; }
.toolbar {
  display: flex; gap: .5rem; align-items: end; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.toolbar label { min-width: 130px; }
.toolbar .grow { flex: 1; min-width: 160px; }
#map { height: calc(100vh - 190px); min-height: 420px; border-radius: var(--radius); }
.map-layout { display: grid; grid-template-columns: 300px 1fr; gap: 1rem; }
.map-side { max-height: calc(100vh - 190px); overflow-y: auto; }
body[data-view="map"] .view { padding: 0; min-height: 0; display: flex; }
body[data-view="map"] .map-layout {
  display: block; position: relative; flex: 1; min-width: 0; gap: 0;
}
body[data-view="map"] .map-layout > .card:not(.map-side) {
  border-radius: 0; border: 0; height: 100%;
}
body[data-view="map"] #map {
  height: 100%; min-height: 0; border-radius: 0;
}
body[data-view="map"] .map-side {
  position: absolute; z-index: 500; top: .75rem; left: .75rem;
  width: 300px; max-height: calc(100% - 1.5rem);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(9px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(15,23,42,.28);
  display: flex; flex-direction: column;
}
body[data-view="map"] .map-side .card-head { flex: none; }
body[data-view="map"] .map-side > div:last-child { overflow-y: auto; }
.map-side.collapsed > *:not(.card-head) { display: none; }
.map-side .side-toggle {
  background: none; border: 0; cursor: pointer; color: var(--muted);
  font-size: 15px; line-height: 1; padding: 0 .2rem;
}
.map-side .side-toggle:hover { color: var(--accent); }
.row-tight { display: flex; align-items: center; gap: .45rem; }
.blocked-screen {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: 1.5rem; background: var(--bg); overflow: auto;
}
.blocked-card {
  max-width: 560px; background: var(--surface); border-radius: 14px;
  border: 1px solid var(--border); border-top: 4px solid var(--red);
  padding: 2rem; box-shadow: var(--shadow);
}
.blocked-card h1 { font-size: 20px; margin-bottom: .75rem; }
.blocked-icon { font-size: 34px; line-height: 1; margin-bottom: .5rem; }
.blocked-lead { font-size: 14.5px; margin: 0 0 1rem; }
.blocked-box {
  background: rgba(220, 38, 38, .07); border: 1px solid rgba(220, 38, 38, .25);
  border-radius: 10px; padding: 1rem; margin: 0 0 1.25rem;
}
.blocked-amount { font-size: 26px; font-weight: 650; color: var(--red-dark); margin-bottom: .2rem; }
.blocked-card p { font-size: 13.5px; line-height: 1.6; }
.blocked-card .row-tight { margin-top: 1.25rem; }
.split-help { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .split-help { grid-template-columns: minmax(0, 1fr); } }
.tutorial { margin: 0; padding-left: 1.35rem; display: flex; flex-direction: column; gap: .7rem; }
.tutorial li::marker { color: var(--accent); font-weight: 600; }
.tutorial strong { display: block; margin-bottom: .15rem; }
.faq details {
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: .5rem; background: var(--surface);
}
.faq summary {
  cursor: pointer; padding: .6rem .75rem; font-weight: 500; font-size: 13.5px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '+ '; color: var(--accent); font-weight: 700; }
.faq details[open] summary::before { content: '\2212 '; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq-answer { padding: .65rem .75rem; font-size: 13px; color: var(--muted); line-height: 1.55; }
body[data-view="map"] .leaflet-top.leaflet-left { margin-left: 312px; }
@media (max-width: 700px) {
  body[data-view="map"] .leaflet-top.leaflet-left { margin-left: 0; }
  body[data-view="map"] .map-side { width: calc(100% - 1.5rem); top: 4.5rem; }
}
.veh-item {
  padding: .55rem .7rem; border-bottom: 1px solid #eef1f6; cursor: pointer;
  display: flex; justify-content: space-between; gap: .5rem; align-items: center;
}
.veh-item:hover { background: #f8fafc; }
.veh-item.sel { background: #eaf2fd; }
.veh-item .plate { font-weight: 650; font-size: 13px; }
.veh-item .meta { font-size: 11px; color: var(--muted); }
.vehicle-marker {
  position: relative;
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4);
  color: #fff;
}
.vehicle-marker svg { display: block; width: 20px; height: 20px; filter: drop-shadow(0 0 .5px rgba(0,0,0,.25)); }
.vm-driving { background: var(--green); }
.vm-idle { background: var(--amber); }
.vm-off { background: var(--grey); }
.vehicle-marker.vm-tacho { background: #fff; color: #8a4e04; border: 2px dashed #b45309; position: relative; }
.vehicle-marker.vm-tacho .vm-tacho-t { position: absolute; right: -5px; bottom: -5px; background: #b45309; color: #fff; font: 700 9px/12px sans-serif; width: 12px; height: 12px; border-radius: 50%; text-align: center; }
.vm-alarm { background: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.14); } }
.leaflet-control-layers label { margin: 0; font-size: 12.5px; color: var(--text); cursor: pointer; }
.leaflet-control-layers label > span { display: flex; align-items: center; gap: .1rem; }
.leaflet-control-layers label:hover { color: var(--accent); }
.leaflet-control-layers input {
  width: auto; margin: 0 .4rem 0 0; padding: 0;
  border: 0; border-radius: 0; background: none; flex: none;
}
.leaflet-control-layers {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(8, 12, 20, .28);
}
.leaflet-control-layers-toggle { border-radius: 12px; }
.leaflet-container .leaflet-control-layers,
.leaflet-container .leaflet-control-layers-expanded {
  background: var(--surface); color: var(--text);
}
.leaflet-container .leaflet-control-layers-list { max-height: calc(100vh - 220px); overflow-y: auto; }
.leaflet-container .leaflet-bar a { background: var(--surface); color: var(--text); border-bottom-color: var(--border); }
.leaflet-container .leaflet-bar a:hover { background: var(--bg); color: var(--accent); }
.leaflet-container .leaflet-bar a.leaflet-disabled { background: var(--bg); color: var(--muted); }
.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--muted); }
.leaflet-container .leaflet-control-attribution a { color: var(--accent); }
.leaflet-control-layers-expanded { padding: 0; min-width: 238px; animation: arm-warstwy-wejscie .16s ease-out; }
@keyframes arm-warstwy-wejscie { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.leaflet-control-layers-list { padding: .6rem .6rem .5rem; }
.arm-warstwy-naglowek { display: flex; flex-direction: column; padding: 0 .2rem .5rem; }
.arm-warstwy-naglowek b { font-size: 13px; color: var(--text); }
.arm-warstwy-naglowek span { font-size: 11px; color: var(--muted); }
.leaflet-control-layers-base { display: grid; gap: .3rem; }
.leaflet-control-layers label.arm-podklad {
  position: relative; display: block; padding: .35rem .5rem; border: 1px solid var(--border);
  border-radius: 9px; background: var(--bg); transition: transform .12s, border-color .12s, box-shadow .12s, background .12s;
}
.leaflet-control-layers label.arm-podklad > span { gap: .55rem; }
.leaflet-control-layers label.arm-podklad input { position: absolute; opacity: 0; pointer-events: none; }
.leaflet-control-layers label.arm-podklad:hover { transform: translateX(-2px); border-color: var(--accent); }
.leaflet-control-layers label.arm-podklad:has(input:checked) {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.arm-podklad-nazwa { display: flex; flex-direction: column; line-height: 1.2; }
.arm-podklad-nazwa { font-weight: 600; font-size: 12.5px; }
.arm-podklad-opis { font-weight: 400; font-size: 10.5px; color: var(--muted); }
.arm-probka { flex: none; width: 34px; height: 34px; border-radius: 7px; border: 1px solid rgba(0,0,0,.25); }
.arm-pod-osm .arm-probka { background: linear-gradient(135deg, #f2efe9 0 40%, #aad3df 40% 55%, #c8e6a0 55% 70%, #f7d58b 70%); }
.arm-pod-sat .arm-probka { background: linear-gradient(135deg, #3b4a2f, #6a7d4a 45%, #2d3b4a); }
.arm-pod-hyb .arm-probka { background: linear-gradient(135deg, #3b4a2f, #6a7d4a 45%, #2d3b4a); box-shadow: inset 0 -10px 0 -6px rgba(255,255,255,.55); }
.arm-pod-jas .arm-probka { background: linear-gradient(135deg, #f1f3f5, #d9dde1); }
.arm-pod-ciem .arm-probka { background: linear-gradient(135deg, #3a3f46, #20242a); }
.leaflet-control-layers-separator { margin: .55rem 0 .4rem; border-top: 1px solid var(--border); }
.leaflet-control-layers-overlays { display: grid; gap: .15rem; }
.leaflet-control-layers label.arm-nakladka { position: relative; padding: .3rem .2rem; border-radius: 7px; }
.leaflet-control-layers label.arm-nakladka > span { justify-content: space-between; flex-direction: row-reverse; }
.leaflet-control-layers label.arm-nakladka:hover { background: var(--bg); }
.leaflet-control-layers label.arm-nakladka input { position: absolute; opacity: 0; pointer-events: none; }
.arm-przelacznik { position: absolute; right: .25rem; top: 50%; width: 30px; height: 17px; margin-top: -8.5px; border-radius: 9px; background: var(--border); transition: background .15s; }
.arm-przelacznik::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s; }
label.arm-nakladka:has(input:checked) .arm-przelacznik { background: var(--accent); }
label.arm-nakladka:has(input:checked) .arm-przelacznik::after { transform: translateX(13px); }
.leaflet-control-layers label.arm-nakladka > span { padding-right: 38px; }
.leaflet-control-layers-base label + label,
.leaflet-control-layers-overlays label + label { margin-top: .25rem; }
.leaflet-control-layers-separator { margin: .45rem 0; border-top: 1px solid var(--border); }
.leaflet-control-layers .layers-hint {
  margin-top: .45rem; padding-top: .4rem; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted); cursor: help; white-space: nowrap;
}
.marker-arrow {
  position: absolute; top: -9px; left: 50%;
  transform-origin: 50% 26px; font-size: 12px; line-height: 1;
  color: var(--green); text-shadow: 0 0 2px rgba(0,0,0,.5);
}
.modal-back {
  position: fixed; inset: 0; background: rgba(15,23,42,.5);
  display: grid; place-items: center; z-index: 100; padding: 1rem;
}
.modal-back.modal-back-inactive { background: transparent; pointer-events: none; }
.modal {
  background: var(--surface); border-radius: 12px; width: 100%; max-width: 640px;
  display: flex; flex-direction: column;
  max-height: 90vh; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.modal.wide { max-width: 960px; }
.modal-head { display: flex; flex: none; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.modal-head { cursor: move; user-select: none; gap: .75rem; }
.okno-przyciski { display: flex; gap: .3rem; align-items: center; flex-shrink: 0; cursor: default; }
.okno-przyciski .icon-btn { width: 30px; height: 30px; font-size: 14px; line-height: 1; color: var(--text); }
.okno-przyciski .okno-zamknij:hover { background: var(--red); border-color: var(--red); color: #fff; }
.modal.okno-przesuniete { position: fixed; margin: 0; }
.modal.okno-max {
  position: fixed; left: 6px !important; top: 6px !important; right: 6px; bottom: 6px;
  width: auto !important; max-width: none !important; height: auto !important; max-height: none !important;
}
.modal.okno-max .modal-head { cursor: default; }
.modal.okno-max .modal-body { flex: 1; }
.modal-back.okno-zwiniete { display: none; }
.pasek-okien {
  position: fixed; left: 50%; bottom: 8px; transform: translateX(-50%);
  display: flex; gap: .4rem; z-index: 1000; max-width: 96vw; flex-wrap: wrap; justify-content: center;
}
.pasek-okien:empty { display: none; }
.pasek-okien-kafel {
  display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.35); overflow: hidden;
}
.pasek-okien-tytul {
  background: none; border: 0; color: var(--text); padding: .45rem .8rem; cursor: pointer;
  max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: inherit; font-size: 13px;
}
.pasek-okien-tytul:hover { background: var(--bg); }
.pasek-okien-x {
  background: none; border: 0; border-left: 1px solid var(--border); color: var(--muted, #94a3b8);
  padding: .45rem .6rem; cursor: pointer; font-size: 14px;
}
.pasek-okien-x:hover { background: var(--red); color: #fff; }
.wskaznik-pracy {
  position: fixed; right: 16px; bottom: 16px; z-index: 1100; display: flex; align-items: center; gap: .6rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px;
  padding: .6rem .9rem; box-shadow: 0 10px 30px rgba(0,0,0,.35); font-size: 13px; max-width: 90vw;
}
.wskaznik-pracy-kolko {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid rgba(127,127,127,.3); border-top-color: var(--accent, #14b8a6);
  animation: wskaznik-obrot .8s linear infinite;
}
@keyframes wskaznik-obrot { to { transform: rotate(360deg); } }
.praca-w-toku { display: flex; align-items: center; gap: .6rem; font-size: 13px; padding: .4rem 0; }
.modal-body { min-height: 0; overflow: auto; padding: 1rem; }
.modal-foot { flex: none; padding: .8rem 1rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .5rem; }
.modal.podglad {
  max-width: min(1280px, 96vw); width: 96vw; height: 94vh; max-height: 94vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.modal.podglad .modal-body { flex: 1; min-height: 0; padding: 0; display: flex; overflow: hidden; }
.modal.podglad .modal-foot { flex-wrap: wrap; }
.podglad-okno { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.podglad-pasek {
  display: flex; gap: .75rem; align-items: baseline; padding: .45rem 1rem;
  border-bottom: 1px solid var(--border); font-size: 12px; min-width: 0;
}
.podglad-nazwa { font-family: ui-monospace, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podglad-pdf { flex: 1; width: 100%; border: 0; background: #525659; }
.podglad-obraz { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.podglad-czytnik { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.podglad-czytnik-pasek {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .35rem .75rem; border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.podglad-zoom { display: inline-flex; align-items: center; gap: .35rem; }
.podglad-procent { min-width: 3.2em; text-align: center; font-variant-numeric: tabular-nums; }
.podglad-strony {
  flex: 1; min-height: 0; min-width: 0; overflow: auto; background: #525659; padding: 8px;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.podglad-strona { margin: 0 auto 8px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.podglad-strona canvas { display: block; width: 100%; height: 100%; }
.podglad-strona-blad { padding: 1rem; color: #991b1b; font-size: 13px; }
.podglad-csv { flex: 1; min-width: 0; overflow: auto; padding: .75rem 1rem; }
.podglad-brak { flex: 1; display: grid; place-items: center; padding: 2rem; text-align: center; }
.drzewo-raportow { display: grid; grid-template-columns: minmax(190px, 250px) 1fr; gap: 1rem; align-items: start; }
.drzewo-galezie {
  border: 1px solid var(--border); border-radius: 8px; padding: .3rem 0;
  max-height: 66vh; overflow: auto; position: sticky; top: var(--gora-tacho, 0);
}
.drzewo-galaz {
  display: flex; align-items: center; gap: .4rem; width: 100%; text-align: left;
  background: none; border: 0; color: var(--text); padding: .28rem .6rem; cursor: pointer; font-size: 13px;
}
.drzewo-galaz:hover { background: var(--surface-2, rgba(127, 127, 127, .12)); }
.drzewo-galaz.wybrana { background: var(--accent-soft, rgba(37, 99, 235, .12)); font-weight: 600; }
.drzewo-znak { width: .9rem; color: var(--muted); flex: none; text-align: center; }
.drzewo-nazwa { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drzewo-ile { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.drzewo-pliki { min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
.row.nowrap { flex-wrap: nowrap; }
@media (max-width: 820px) {
  .drzewo-raportow { grid-template-columns: 1fr; }
  .drzewo-galezie { position: static; max-height: 40vh; }
}
.paczka-uklad { display: grid; grid-template-columns: 1fr minmax(260px, 360px); gap: 1rem; align-items: start; }
.paczka-raporty { display: grid; gap: .75rem; }
.paczka-sekcja { border: 1px solid var(--border); border-radius: 8px; padding: .5rem .75rem; }
.paczka-naglowek { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; padding-bottom: .35rem; margin-bottom: .25rem; border-bottom: 1px solid var(--border); }
.paczka-raport { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .12rem 0; }
.paczka-raport select.maly { width: auto; padding: .1rem .3rem; font-size: 12px; min-height: 0; }
.paczka-podmioty { display: grid; gap: .75rem; position: sticky; top: var(--gora-tacho, 0); }
.paczka-wybor { border: 1px solid var(--border); border-radius: 8px; padding: .5rem .75rem; display: grid; gap: .4rem; }
.paczka-wybor input[type=search] { flex: 1; min-width: 0; }
.paczka-lista { max-height: 30vh; overflow: auto; display: grid; gap: .1rem; }
.paczka-pasek { height: 8px; background: var(--surface-2, rgba(127, 127, 127, .18)); border-radius: 4px; overflow: hidden; }
.paczka-pasek-wypelnienie { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
@media (max-width: 900px) {
  .paczka-uklad { grid-template-columns: 1fr; }
  .paczka-podmioty { position: static; }
}
.toast-root { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 200; }
.toast {
  background: var(--navy-dark); color: #fff; padding: .65rem .9rem; border-radius: 8px;
  font-size: 13px; box-shadow: var(--shadow); max-width: 380px;
  animation: slidein .18s ease-out;
}
.toast.ok { background: #15603a; }
.toast.err { background: var(--red-dark); }
.toast.warn { background: #8a4e04; }
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.notif-panel {
  position: absolute; right: 1.25rem; top: 56px; z-index: 40;
  width: 380px; max-height: 60vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 12px 30px rgba(16,24,40,.16);
}
.notif-item { padding: .7rem .9rem; border-bottom: 1px solid #eef1f6; font-size: 12.5px; }
.notif-item.unread { background: #f5f9ff; }
.notif-item .t { font-weight: 600; }
.notif-item .d { color: var(--muted); font-size: 11px; margin-top: .15rem; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: .5rem; }
.bars .bar { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bars .bar:hover { background: var(--navy); }
.bars .bar span { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 9px; color: var(--muted); white-space: nowrap; }
.bars-wrap { padding-bottom: 20px; }
.gantt { display: flex; height: 22px; border-radius: 4px; overflow: hidden; background: #eef1f6; }
.gantt i { display: block; height: 100%; }
.gantt i.D { background: #2f80ed; }
.gantt i.W { background: #d97706; }
.gantt i.A { background: #94a3b8; }
.gantt i.R { background: #1f9d55; }
.legend { display: flex; gap: .9rem; font-size: 11.5px; color: var(--muted); margin-top: .4rem; flex-wrap: wrap; }
.legend b { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.progress { height: 7px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); }
.progress.warn i { background: var(--amber); }
.progress.over i { background: var(--red); }
pre.code {
  background: #0f1b2a; color: #d5e2f0; padding: .7rem .85rem; border-radius: 8px;
  font-family: var(--mono); font-size: 12px; overflow-x: auto; margin: .4rem 0;
  white-space: pre-wrap; word-break: break-all;
}
.warn-box {
  background: #fff8e6; border: 1px solid #f2dfae; color: #7a4e02;
  padding: .7rem .85rem; border-radius: 8px; font-size: 12.5px; margin-bottom: 1rem;
}
.info-box {
  background: #eff6ff; border: 1px solid #c8ddfa; color: #1a4d8f;
  padding: .7rem .85rem; border-radius: 8px; font-size: 12.5px; margin-bottom: 1rem;
}
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: .5rem .8rem; cursor: pointer; font: inherit; color: var(--muted);
}
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.only-mobile { display: none; }
@media (max-width: 1024px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-side { max-height: 260px; }
}
@media (max-width: 820px) {
  .only-mobile { display: inline-flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%); visibility: hidden;
    transition: transform .18s ease-out, visibility 0s linear .18s;
  }
  .shell.nav-open .sidebar { transform: translate3d(0, 0, 0); visibility: visible; transition-delay: 0s; }
  .sidebar { z-index: 1200; }
  .shell.nav-open::after {
    content: ''; position: fixed; inset: 0; z-index: 1150;
    background: rgba(15, 23, 42, .5); -webkit-tap-highlight-color: transparent;
  }
  .nav, .map-side > div:last-child { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .view { padding: .85rem; }
  .notif-panel { width: calc(100vw - 1.7rem); right: .85rem; }
  .topbar { gap: .42rem; padding: .45rem .6rem; flex-wrap: wrap; }
  .topbar h1 { font-size: 15px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { gap: .3rem; margin-left: auto; }
  .topbar:has(.firmy-przelacznik:not(.hidden)) .topbar-right { width: 100%; order: 3; }
  .topbar .icon-btn { width: 32px; height: 32px; }
  .topbar #burger { display: inline-flex; }
  .topbar .pasek-jezyk { width: auto; }
  #tenant-switch { flex: 1; }
  .firma-przycisk { width: 100%; max-width: none; min-height: 32px; padding-inline: .35rem; }
  .topbar .firmy-panel { right: auto; left: 0; }
  .topbar .tenant-global { display: none; }
  body .pasek-przyklejony, body .tabs.tabs-przyklejone { position: static; margin-left: -.85rem; margin-right: -.85rem; padding-left: .85rem; padding-right: .85rem; }
  .modal-back { padding: .5rem; grid-template-columns: minmax(0, 1fr); }
  .modal { min-width: 0; max-height: 94vh; }
  .modal.podglad { width: 100%; max-width: none; height: calc(100vh - 1rem); max-height: none; }
  @supports (height: 100dvh) { .modal.podglad { height: calc(100dvh - 1rem); } }
  .modal.podglad .modal-head { padding: .55rem .75rem; }
  .modal.podglad .modal-foot { padding: .5rem .6rem; gap: .35rem; justify-content: center; }
  .modal.podglad .modal-foot .btn { padding: .4rem .65rem; font-size: 13px; }
}
@media (max-width: 820px) {
  *:has(> svg.tacho-wykres) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  svg.tacho-wykres { min-width: 900px; }
}
@media (pointer: coarse) {
  body .opis-btn { width: 28px; height: 28px; font-size: 14px; }
  body .btn.small { min-height: 34px; padding: .3rem .7rem; }
  body select.maly, body .paczka-raport select.maly { min-height: 32px; }
  body .map-side .side-toggle { min-width: 34px; min-height: 34px; font-size: 18px; }
  body .veh-akcja { min-width: 32px; min-height: 32px; }
  body .pw-toggle { padding: .5rem .6rem; }
  body .kal-miesiac-link { min-height: 28px; padding-top: .25rem; padding-bottom: .25rem; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #191322;
    --surface: #231a31;
    --szyna-tlo: #231a31;
    --szyna-tekst: #f0e5fa;
    --szyna-opis: #baacc9;
    --szyna-aktywna: #352448;
    --szyna-marka: #d5adff;
    --brand-era: #d1aeff;
    --brand-tacho: #a16def;
    --wyloguj-tekst: #ffadc2;
    --border: #49385b;
    --text: #f0e5fa;
    --accent: #d5adff;
    --muted: #baacc9;
    --na-akcencie: #231439;
    --pole: #1d1629;
    --pole-obwodka: #606f81;
    --pole-obwodka-hover: #8395a8;
    --przewijanie: rgba(229, 234, 240, .2);
    --przewijanie-hover: rgba(229, 234, 240, .38);
  }
  :root:not([data-theme="light"]) thead th { background: #30253e; }
  :root:not([data-theme="light"]) tbody td { border-bottom-color: #392b49; }
  :root:not([data-theme="light"]) tbody tr:hover { background: #30253e; }
  :root:not([data-theme="light"]) .veh-item:hover { background: #30253e; }
  :root:not([data-theme="light"]) .veh-item.sel { background: #3a2852; }
  :root:not([data-theme="light"]) .login-card { background: var(--surface); }
  .pill { background: #232f3d; color: #a7b4c2; }
  :root:not([data-theme="light"]) .pill.green { background: #14301f; color: #6ee7a0; }
  :root:not([data-theme="light"]) .pill.amber { background: #33270c; color: #f0b849; }
  :root:not([data-theme="light"]) .pill.red { background: #3a1616; color: #f98a8a; }
  :root:not([data-theme="light"]) .pill.blue { background: #14263c; color: #7fb2f0; }
  :root:not([data-theme="light"]) .pill.grey { background: #232f3d; color: #a7b4c2; }
  :root:not([data-theme="light"]) .logo-plate { background: #fff; }
  :root:not([data-theme="light"]) .thread-item.active { background: #3a2852; }
  :root:not([data-theme="light"]) .chat-msg.in .chat-body { background: #30253e; border-color: #26313d; }
  :root:not([data-theme="light"]) .cond-row { background: #231a31; }
  :root:not([data-theme="light"]) .field-block { background: #131c25; }
  :root:not([data-theme="light"]) .bars .bar { background: #3a7bd5; }
  :root:not([data-theme="light"]) .warn-box { background: #2b2410; border-color: #574616; color: #f0d597; }
  :root:not([data-theme="light"]) .info-box { background: #14263c; border-color: #22456f; color: #a8c8ee; }
  :root:not([data-theme="light"]) .kpi-tile, :root:not([data-theme="light"]) .card { box-shadow: none; }
}
:root[data-theme="dark"] {
    --przewijanie: rgba(229, 234, 240, .2);
    --przewijanie-hover: rgba(229, 234, 240, .38);
    --bg: #191322;
    --surface: #231a31;
    --szyna-tlo: #231a31;
    --szyna-tekst: #f0e5fa;
    --szyna-opis: #baacc9;
    --szyna-aktywna: #352448;
    --szyna-marka: #d5adff;
    --brand-era: #d1aeff;
    --brand-tacho: #a16def;
    --wyloguj-tekst: #ffadc2;
    --na-akcencie: #231439;
    --pole: #1d1629;
    --pole-obwodka: #606f81;
    --pole-obwodka-hover: #8395a8;
    --border: #49385b;
    --text: #f0e5fa;
    --accent: #d5adff;
    --muted: #baacc9;
  }
  :root[data-theme="dark"] thead th { background: #30253e; }
  :root[data-theme="dark"] tbody td { border-bottom-color: #392b49; }
  :root[data-theme="dark"] tbody tr:hover { background: #30253e; }
  :root[data-theme="dark"] .veh-item:hover { background: #30253e; }
  :root[data-theme="dark"] .veh-item.sel { background: #3a2852; }
  :root[data-theme="dark"] .login-card { background: var(--surface); }
  .pill { background: #232f3d; color: #a7b4c2; }
  :root[data-theme="dark"] .pill.green { background: #14301f; color: #6ee7a0; }
  :root[data-theme="dark"] .pill.amber { background: #33270c; color: #f0b849; }
  :root[data-theme="dark"] .pill.red { background: #3a1616; color: #f98a8a; }
  :root[data-theme="dark"] .pill.blue { background: #14263c; color: #7fb2f0; }
  :root[data-theme="dark"] .pill.grey { background: #232f3d; color: #a7b4c2; }
  :root[data-theme="dark"] .logo-plate { background: #fff; }
  :root[data-theme="dark"] .thread-item.active { background: #3a2852; }
  :root[data-theme="dark"] .chat-msg.in .chat-body { background: #30253e; border-color: #26313d; }
  :root[data-theme="dark"] .cond-row { background: #231a31; }
  :root[data-theme="dark"] .field-block { background: #131c25; }
  :root[data-theme="dark"] .bars .bar { background: #3a7bd5; }
  :root[data-theme="dark"] .warn-box { background: #2b2410; border-color: #574616; color: #f0d597; }
  :root[data-theme="dark"] .info-box { background: #14263c; border-color: #22456f; color: #a8c8ee; }
  :root[data-theme="dark"] .kpi-tile, :root[data-theme="dark"] .card { box-shadow: none; }
.tacho-wykres { display: block; width: 100%; height: auto; }
.tacho-wykres .tw-tlo { fill: #fff; stroke: var(--border); stroke-width: 1; }
.tacho-wykres .tw-siatka { stroke: rgba(15, 23, 42, .16); stroke-width: .5; }
.tacho-wykres .tw-godzina { font-size: 7px; fill: var(--muted); }
.tacho-wykres .tw-godzina-pelna { font-weight: 700; fill: var(--fg); }
.tacho-wykres .tw-os-linia { stroke: var(--muted); stroke-width: .6; opacity: .55; }
.tacho-wykres .tw-data { font-size: 11px; font-weight: 650; fill: var(--text); }
.tacho-wykres .tw-meta { font-size: 9.5px; fill: var(--muted); }
.tacho-wykres .tw-akt { shape-rendering: crispEdges; }
.tacho-wykres .tw-akt-U { stroke: #cbd5e1; stroke-width: .5; }
.tacho-wykres .tw-tyg-tlo { fill: rgba(37, 99, 235, .07); }
.tacho-wykres .tw-tyg-nazwa { font-size: 10.5px; font-weight: 700; fill: var(--text); }
.tacho-wykres .tw-tyg-sumy { font-size: 9.5px; fill: var(--muted); }
.tacho-wykres .tw-os-kreska { stroke: var(--muted); stroke-width: .8; }
.tacho-wykres .tw-os-kreska-mala { stroke: var(--muted); stroke-width: .4; opacity: .5; }
.tacho-wykres .tw-siatka-gruba { stroke: rgba(15, 23, 42, .3); stroke-width: .9; }
.tacho-wykres .tw-godz-odcinka { font-size: 8px; fill: var(--muted); }
.tacho-wykres .tw-luka { fill: url(#tw-kratka); stroke: #cbd5e1; stroke-width: .5; }
.tacho-wykres .tw-naruszenie { fill: none; stroke: #e5177b; stroke-width: 1.4; }
.tacho-wykres .tw-naruszenie-pasek { fill: #ff5fb0; }
.tacho-wykres .tw-naruszenie-tekst { font-size: 8px; font-weight: 700; fill: #3b0724; }
.tw-dymek,
.kal-dymek,
.linia-dymek,
.sl-dymek,
.leaflet-container .leaflet-tooltip:not(.veh-label) {
  padding: .6rem .8rem;
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent-2);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .24);
  font-size: .8125rem;
  line-height: 1.45;
}
.leaflet-container .leaflet-tooltip:not(.veh-label) {
  width: max-content;
  max-width: min(360px, calc(100vw - 16px));
  white-space: normal;
  overflow-wrap: anywhere;
}
.leaflet-container .leaflet-tooltip:not(.veh-label)::before { display: none; }
.leaflet-container .leaflet-popup-content-wrapper,
.leaflet-container .leaflet-popup-tip {
  background: var(--surface);
  color: var(--text);
}
.leaflet-container .leaflet-popup-content { overflow-wrap: anywhere; }
.leaflet-container .leaflet-popup a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-container .leaflet-popup a.leaflet-popup-close-button:hover,
.leaflet-container .leaflet-popup a.leaflet-popup-close-button:focus { color: var(--text); }
.tw-dymek {
  position: fixed;
  z-index: 1400;
  pointer-events: none;
  width: max-content;
  max-width: min(360px, calc(100vw - 16px));
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.tacho-wykres .tw-odp-dobowy { fill: #60a5fa; }
.tacho-wykres .tw-odp-tygodniowy { fill: #f5c518; }
.tacho-wykres .tw-odp-tygodniowy.tw-odp-tygodniowy-skrocony { fill: #fb923c; }
.tacho-wykres .tw-odp-tekst { font-size: 7.5px; font-weight: 700; fill: #1e293b; }
.tacho-wykres .tw-rekompensata { fill: #8b5cf6; }
.tacho-wykres .tw-rekompensata-pakiet-1 { fill: #7c3aed; }
.tacho-wykres .tw-rekompensata-pakiet-2 { fill: #5b21b6; }
.tacho-wykres .tw-rekompensata-tekst { font-size: 7px; font-weight: 700; fill: #4c1d95; }
:root[data-theme="dark"] .tacho-wykres .tw-rekompensata-tekst { fill: #ddd6fe; }
.tw-legenda .tw-rekompensata { background: #8b5cf6; }
.tacho-wykres .tw-kraj-reczny { fill: #fff; stroke: #64748b; stroke-width: .7; }
.tacho-wykres .tw-kraj-auto { fill: #111827; }
.tacho-wykres .tw-gnss-punkt { fill: #0e7490; stroke: #fff; stroke-width: .7; cursor: pointer; }
.tacho-wykres .tw-gnss-punkt:hover { fill: #155e75; stroke-width: 1.2; }
.tacho-wykres .tw-kraj-klik { cursor: pointer; }
.tw-legenda .tw-gnss-punkt { background: #0e7490; border-radius: 50%; }
.tacho-wykres .tw-pikt { color: #fff; }
.tacho-wykres .tw-pikt-A { color: #4a3a00; }
.tacho-wykres .tw-pikt-R { color: #384049; }
.tacho-wykres .tw-odp-lozko { color: #2b3440; }
.tacho-wykres .tw-kraj-olowek { color: #fff; }
.tacho-wykres .tw-kraj-olowek-reczny { color: #111827; }
.tacho-wykres .tw-akt-czas { font-size: 6.6px; font-weight: 700; fill: #fff; }
.tacho-wykres .tw-akt-czas-A { fill: #4a3a00; }
.tacho-wykres .tw-akt-czas-R { fill: #2b3440; }
.tacho-wykres .tw-luka-czas { font-size: 7px; font-weight: 700; fill: #64748b; }
.tacho-wykres .tw-odp-dobowy-granica {
  stroke: #1d4ed8;
  stroke-width: 1.2;
  stroke-dasharray: 3 2.2;
}
.tacho-wykres .tw-odp-dobowy-znak { color: #1d4ed8; }
.tacho-wykres .tw-odp-dobowy-opis { font-size: 6.8px; font-weight: 700; fill: #1d4ed8; }
.tacho-wykres .tw-24-linia { stroke: #15803d; stroke-width: 1; stroke-dasharray: 2 2; }
.tacho-wykres .tw-24-linia-termin { stroke: #b45309; stroke-width: 1.4; stroke-dasharray: 3 2; }
.tacho-wykres .tw-24-pole { fill: #dcfce7; stroke: #15803d; stroke-width: .7; }
.tacho-wykres .tw-24-pole-termin { fill: #fef3c7; stroke: #b45309; stroke-width: 1; }
.tacho-wykres .tw-24-tekst { font-size: 6.4px; font-weight: 700; fill: #14532d; }
.tacho-wykres .tw-kraj-tekst { font-size: 6.6px; font-weight: 700; }
.tacho-wykres .tw-kraj-znak { cursor: help; }
.tacho-wykres .tw-kraj-tekst-reczny { fill: #111827; }
.tacho-wykres .tw-kraj-tekst-auto { fill: #fff; }
.kraj-znak { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.kraj-znak .flaga {
  flex: 0 0 auto;
  display: block;
  border-radius: 1px;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12);
}
.kraj-znak .kraj-kod { font-weight: 600; font-size: 11.5px; letter-spacing: .02em; }
.flaga-brak {
  display: block;
  width: 21px;
  height: 14px;
  border: 1px dashed var(--border, #cbd5e1);
  border-radius: 1px;
}
:root[data-theme="dark"] .tacho-wykres .tw-24-pole { fill: #14532d; stroke: #4ade80; }
:root[data-theme="dark"] .tacho-wykres .tw-24-tekst { fill: #dcfce7; }
:root[data-theme="dark"] .tacho-wykres .tw-24-linia { stroke: #4ade80; }
:root[data-theme="dark"] .tacho-wykres .tw-24-pole-termin { fill: #78350f; stroke: #fbbf24; }
:root[data-theme="dark"] .tacho-wykres .tw-24-linia-termin { stroke: #fbbf24; }
:root[data-theme="dark"] .tacho-wykres .tw-odp-dobowy-granica { stroke: #93c5fd; }
:root[data-theme="dark"] .tacho-wykres .tw-odp-dobowy-znak { color: #93c5fd; }
:root[data-theme="dark"] .tacho-wykres .tw-odp-dobowy-opis { fill: #93c5fd; }
:root[data-theme="dark"] .tacho-wykres .tw-luka-czas { fill: #94a3b8; }
:root[data-theme="dark"] .tacho-wykres .tw-odp-lozko { color: #e2e8f0; }
:root[data-theme="dark"] .tacho-wykres .tw-tlo { fill: #0f172433; stroke: #2a3441; }
:root[data-theme="dark"] .tacho-wykres .tw-siatka { stroke: rgba(226, 232, 240, .18); }
:root[data-theme="dark"] .tacho-wykres .tw-siatka-gruba { stroke: rgba(226, 232, 240, .32); }
:root[data-theme="dark"] .tacho-wykres .tw-tyg-tlo { fill: rgba(127, 178, 240, .12); }
:root[data-theme="dark"] .tacho-wykres .tw-odp-tekst { fill: #231439; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tacho-wykres .tw-tlo { fill: #0f172433; stroke: #2a3441; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-siatka { stroke: rgba(226, 232, 240, .18); }
  :root:not([data-theme="light"]) .tacho-wykres .tw-siatka-gruba { stroke: rgba(226, 232, 240, .32); }
  :root:not([data-theme="light"]) .tacho-wykres .tw-tyg-tlo { fill: rgba(127, 178, 240, .12); }
  :root:not([data-theme="light"]) .tacho-wykres .tw-odp-tekst { fill: #231439; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tacho-wykres .tw-rekompensata-tekst{ fill: #ddd6fe; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-24-pole{ fill: #14532d; stroke: #4ade80; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-24-tekst{ fill: #dcfce7; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-24-linia{ stroke: #4ade80; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-24-pole-termin{ fill: #78350f; stroke: #fbbf24; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-24-linia-termin{ stroke: #fbbf24; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-odp-dobowy-granica{ stroke: #93c5fd; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-odp-dobowy-znak{ color: #93c5fd; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-odp-dobowy-opis{ fill: #93c5fd; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-luka-czas{ fill: #94a3b8; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-odp-lozko{ color: #e2e8f0; }
  :root:not([data-theme="light"]) .tw-legenda .tw-leg-24{ background: #14532d; border-color: #4ade80; }
  :root:not([data-theme="light"]) .tw-legenda .tw-leg-dop{ background: linear-gradient(90deg, #c4b5fd 0 55%, transparent 55%), repeating-linear-gradient(90deg, #8b7cc8 0 2px, transparent 2px 4px); }
  :root:not([data-theme="light"]) .tacho-wykres .tw-dop-praca{ stroke: #c4b5fd; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-dop-zapas{ stroke: #8b7cc8; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-dop-koniec{ stroke: #c4b5fd; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-dop-tekst{ fill: #c4b5fd; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-odp-tekst-ponad{ fill: #fca5a5; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-wpis-reczny{ color: #94a3b8; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-wpis-reczny-tlo{ fill: #30253e; stroke: #64748b; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-przerwa{ fill: #22d3ee; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-przerwa-dodatkowa{ fill: #64748b; opacity: .6; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-przerwa-tekst{ fill: #67e8f9; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-tyg-linia-tekst{ fill: #fcd34d; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-zaloga{ color: #c4b5fd; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-pojazd-linia{ stroke: #93c5fd; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-pojazd-tekst{ fill: #bfdbfe; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-godz-dop{ fill: #c4b5fd; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-zaznaczenie-pole{ fill: rgba(147, 197, 253, .18); stroke: #93c5fd; }
}
.tw-legenda { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-top: .5rem; font-size: 11px; color: var(--muted); }
.tw-leg-poz { display: inline-flex; align-items: center; gap: .3rem; }
.tw-leg-kolor {
  width: 13px; height: 11px; border-radius: 2px; display: inline-block; flex: none;
  border: 1px solid rgba(15, 23, 42, .25);
}
.tw-leg-naruszenie { background: #ff5fb0; border-color: #e5177b; }
.tw-leg-tygodniowy { background: #f5c518; height: 6px; }
.tw-leg-tygodniowy-skrocony { background: #fb923c; height: 6px; }
.tw-leg-dobowy { background: #60a5fa; height: 6px; }
.tw-leg-U {
  background:
    repeating-linear-gradient(45deg, #cbd5e1 0 1.6px, #fff 1.6px 5px);
}
.tw-leg-poziomy {
  width: 16px; height: 13px; display: inline-block; flex: none; border: 0;
  background:
    linear-gradient(#e02b2b, #e02b2b) 0 1px / 16px 1.6px no-repeat,
    linear-gradient(#2fa84f, #2fa84f) 0 4.5px / 16px 1.6px no-repeat,
    linear-gradient(#e8c33a, #e8c33a) 0 8px / 16px 1.6px no-repeat,
    linear-gradient(#9aa4b0, #9aa4b0) 0 11.5px / 16px 1.6px no-repeat;
}
.tw-legenda .tw-kraj-reczny { background: #fff; }
.tw-legenda .tw-kraj-auto { background: #111827; }
.tenant-global {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 36px;
  font-size: 12px; color: var(--muted); cursor: help; background: var(--surface);
  border: 1px dashed var(--border); border-radius: 8px; padding: .3rem .55rem; white-space: nowrap;
}
.tenant-global:hover { border-color: var(--accent); color: var(--accent); }
.track-player {
  width: 250px;
  padding: .6rem .7rem .5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(15, 23, 42, .32);
  color: var(--text);
  font-size: 12px;
}
.track-player.hidden { display: none; }
.tp-head { display: flex; align-items: center; gap: .4rem; margin-bottom: .45rem; }
.tp-plate { font-weight: 700; font-size: 13px; flex: 1; min-width: 0; }
.tp-licznik { color: var(--muted); font-size: 11px; white-space: nowrap; }
.tp-head-akcje { display: flex; align-items: center; gap: .25rem; }
.tp-mnoznik { width: auto; padding: .1rem .2rem; font-size: 11px; }
.tp-sterowanie { display: flex; justify-content: center; gap: .35rem; margin-bottom: .35rem; }
.tp-btn {
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  border-radius: 7px; padding: .25rem .55rem; cursor: pointer; font-size: 12px; line-height: 1.4;
}
.tp-btn:hover { border-color: var(--accent); color: var(--accent); }
.tp-graj { min-width: 46px; font-size: 13px; }
.tp-graj.graje { background: var(--accent); border-color: var(--accent); color: #fff; }
.tp-zamknij { padding: .15rem .4rem; }
.tp-suwak { width: 100%; margin: .1rem 0 .25rem; cursor: pointer; }
.tp-czas { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.tp-szczegoly { color: var(--muted); font-size: 11px; text-align: center; margin-top: .15rem; line-height: 1.35; }
.tp-zdarzenia {
  display: flex; align-items: center; gap: .35rem; margin: .4rem 0 0;
  padding-top: .35rem; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted);
}
.tp-zdarzenia input { width: auto; margin: 0; }
.tp-strzalka {
  color: #fff; font-size: 11px; line-height: 14px; text-align: center;
  text-shadow: 0 0 2px #6128b5, 0 0 3px #6128b5;
}
.tp-zdarzenie {
  width: 20px; height: 20px; border-radius: 50%; background: var(--amber); color: #fff;
  border: 2px solid #fff; font-weight: 800; font-size: 12px; line-height: 16px; text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
.tp-zdarzenie.tp-prio-high, .tp-zdarzenie.tp-prio-critical { background: var(--red); }
.tp-zdarzenie.tp-prio-low { background: var(--grey); }
.veh-prawa { display: flex; align-items: center; gap: .3rem; flex: none; }
.veh-akcja {
  border: 1px solid var(--border); background: var(--surface); border-radius: 6px;
  padding: .1rem .3rem; cursor: pointer; font-size: 12px; line-height: 1.3;
}
.veh-akcja:hover { border-color: var(--accent); }
.leaflet-tooltip.veh-label {
  background: rgba(17, 24, 39, .82); color: #fff; border: none; box-shadow: none;
  font-weight: 650; font-size: 11px; padding: 1px 5px; border-radius: 4px; white-space: nowrap;
}
.leaflet-tooltip.veh-label::before { display: none; }
@media print {
  .sidebar, .topbar, .toolbar, .btn, .icon-btn { display: none !important; }
  .view { padding: 0; }
  .card { box-shadow: none; border-color: #ccc; page-break-inside: avoid; }
}
.akcje-ddd {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}
.akcja-ddd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color .15s, box-shadow .15s, transform .05s;
}
.akcja-ddd:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(30, 99, 200, .12); }
.akcja-ddd:active { transform: translateY(1px); }
.akcja-ddd strong { display: block; font-size: 14px; }
.akcja-ddd small { display: block; color: var(--muted); font-size: 11px; }
.akcja-ikona { font-size: 20px; line-height: 1; }
.akcja-ddd.glowna {
  background: linear-gradient(135deg, var(--accent), #934de0);
  border-color: transparent;
  color: #fff;
}
.akcja-ddd.glowna small { color: rgba(255, 255, 255, .85); }
.akcja-ddd.glowna:hover { box-shadow: 0 4px 14px rgba(30, 99, 200, .35); }
.btn.small.danger {
  background: transparent;
  border-color: var(--red);
  color: var(--red);
}
.btn.small.danger:hover { background: var(--red); color: #fff; }
.kal-pasek { align-items: flex-end; gap: 12px; }
.kal-nawigacja { display: flex; align-items: center; gap: 8px; }
.kal-rok { font-size: 18px; min-width: 62px; text-align: center; }
.kal-widoki { display: flex; gap: 6px; }
.kal-przewijanie { overflow-x: auto; }
.kal-rok-tabela { border-collapse: separate; border-spacing: 2px; width: 100%; }
.kal-rok-tabela th { font-weight: 600; font-size: 11px; color: var(--muted); padding: 2px 4px; }
.kal-naglowek-dzien { width: 26px; text-align: center; }
.kal-naglowek-miesiac { text-align: left; }
.kal-miesiac { text-align: left; white-space: nowrap; padding-right: 10px !important; }
.kal-miesiac-link {
  display: block; background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--accent); text-align: left;
}
.kal-miesiac-link:hover { text-decoration: underline; }
.kal-miesiac-sumy { display: block; font-size: 10px; color: var(--muted); font-weight: 400; }
.kal-czynnosci, .kal-miesiac-czynnosci, .kal-tydzien-czynnosci, .kal-dzien-czynnosci {
  display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center;
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.kal-miesiac-czynnosci { font-size: 10px; gap: 1px 6px; margin-top: 1px; }
.kal-tydzien-czynnosci { font-size: 10px; gap: 1px 5px; justify-content: flex-end; }
.kal-dzien-czynnosci { font-size: 10px; gap: 1px 6px; }
.znak-czynnosci {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  color: inherit; font-variant-numeric: tabular-nums;
}
.znak-czynnosci svg { flex: none; }
.kpi-tile .value > .znak-czynnosci { margin-top: 0; }
.kal-dzien {
  width: 26px; height: 26px; text-align: center; vertical-align: middle;
  border: 1px solid var(--border); border-radius: 5px; position: relative;
  cursor: pointer; background-color: var(--surface); user-select: none;
}
.kal-dzien:hover { outline: 2px solid var(--accent); outline-offset: -1px; }
.kal-dzien.sobota { background-color: #d8f0e2; }
.kal-dzien.niedziela { background-color: #fbd8d8; }
.kal-dzien.swieto { background-color: #fbe3bd; }
.kal-dzien.swieto::after {
  content: ''; position: absolute; inset: 0; border-radius: 4px;
  border: 2px solid #d97706; pointer-events: none;
}
.kal-dzien.brak {
  background-image: repeating-linear-gradient(45deg,
    rgba(15, 23, 42, .07) 0 3px, rgba(15, 23, 42, 0) 3px 6px);
}
.kal-dzien.jazda { box-shadow: inset 0 -3px 0 #2563eb; }
.kal-dzien.praca { box-shadow: inset 0 -3px 0 #94a3b8; }
.kal-dzien.naruszenie { box-shadow: inset 0 -3px 0 var(--red); }
.kal-dzien.zaznaczony { outline: 2px solid var(--accent); background-color: #cfe0f8; }
.kal-mies-dzien.zaznaczony { outline: 2px solid var(--accent); background-color: #cfe0f8; }
.kal-poza { background: transparent; border: 0; }
.kal-km { font-size: 9px; color: #22314a; }
.kal-kropka { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: #c3cbd8; }
.kal-absencja-znak { display: block; width: 100%; height: 100%; border-radius: 4px; opacity: .85; }
.kal-zrodlo {
  position: absolute; bottom: 1px; width: 4px; height: 4px; border-radius: 50%;
}
.kal-zrodlo.karta { left: 2px; background: #1f9d55; }
.kal-zrodlo.pojazd { right: 2px; background: #7c3aed; }
.kal-legenda-gora { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.kal-legenda-gora span { display: inline-flex; align-items: center; gap: 5px; }
.kal-skroty { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-size: 12.5px; color: var(--text); margin: 0 0 12px; }
.kal-skrot { display: inline-flex; align-items: center; gap: 7px; }
.kal-skrot kbd {
  font: 600 11.5px/1 system-ui, "Segoe UI", sans-serif; padding: 4px 8px; white-space: nowrap;
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px;
  background: var(--surface); color: var(--text);
}
.kal-probka { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--border); display: inline-block; background-color: var(--surface); }
.kal-probka.sobota { background-color: #d8f0e2; }
.kal-probka.niedziela { background-color: #fbd8d8; }
.kal-probka.swieto { background-color: #fbe3bd; border-color: #d97706; }
.kal-probka.jazda { box-shadow: inset 0 -3px 0 #2563eb; }
.kal-probka.naruszenie { box-shadow: inset 0 -3px 0 var(--red); }
.kal-probka.brak {
  background-image: repeating-linear-gradient(45deg,
    rgba(15, 23, 42, .07) 0 3px, rgba(15, 23, 42, 0) 3px 6px);
}
.kal-probka-rodzaj { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 6px; }
.kal-menu {
  position: absolute; z-index: 400; min-width: 260px; max-height: 60vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px;
}
.kal-menu-naglowek { font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.kal-menu-tytul { font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 8px 8px 4px; }
.kal-menu-grupa { font-size: 11px; color: var(--muted); padding: 6px 8px 2px; }
.kal-menu-poz {
  display: flex; align-items: center; width: 100%; text-align: left; gap: 4px;
  background: none; border: 0; padding: 6px 8px; border-radius: 6px; cursor: pointer;
  font: inherit; color: var(--text);
}
.kal-menu-poz:hover { background: #eef2fa; }
.kal-menu-poz.usun { color: var(--red); }
.kal-mies-tabela { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.kal-mies-tabela th { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.kal-mies-tabela th.sobota { color: #15803d; }
.kal-mies-tabela th.niedziela { color: var(--red); }
.kal-mies-swieto {
  font-size: 10px; color: #92400e; font-weight: 600; line-height: 1.2;
  margin: 2px 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kal-mies-dzien {
  vertical-align: top; height: 92px; padding: 6px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); position: relative;
}
.kal-mies-dzien.sobota { background: #f2fbf5; }
.kal-mies-dzien.niedziela { background: #fef5f5; }
.kal-mies-dzien.absencja { border-style: dashed; }
.kal-mies-naglowek { display: flex; justify-content: space-between; align-items: center; }
.kal-mies-absencja { font-size: 10px; border-left: 3px solid; padding-left: 5px; margin: 4px 0; }
.kal-mies-sumy { font-size: 11px; line-height: 1.4; }
.kal-mies-zrodla { position: absolute; bottom: 5px; right: 6px; display: flex; gap: 3px; }
.kal-mies-zrodla .kal-zrodlo { position: static; width: 6px; height: 6px; }
.kal-suma-tyg { width: 88px; text-align: right; font-size: 11px; color: var(--muted); vertical-align: middle; }
.kal-odcinki { width: 100%; border-collapse: collapse; margin-top: 12px; }
.kal-odcinki th, .kal-odcinki td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.kal-odcinki th { font-size: 11px; text-transform: uppercase; color: var(--muted); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kal-dzien { background-color: #16202c; }
  :root:not([data-theme="light"]) .kal-dzien.sobota { background-color: #1c4430; }
  :root:not([data-theme="light"]) .kal-dzien.niedziela { background-color: #4a2124; }
  :root:not([data-theme="light"]) .kal-dzien.swieto { background-color: #48350f; }
  :root:not([data-theme="light"]) .kal-dzien.swieto::after { border-color: #f0b849; }
  :root:not([data-theme="light"]) .kal-dzien.brak { background-image: repeating-linear-gradient(45deg, rgba(226,232,240,.08) 0 3px, rgba(226,232,240,0) 3px 6px); }
  :root:not([data-theme="light"]) .kal-dzien.jazda { box-shadow: inset 0 -3px 0 #7fb2f0; }
  :root:not([data-theme="light"]) .kal-dzien.praca { box-shadow: inset 0 -3px 0 #64748b; }
  :root:not([data-theme="light"]) .kal-dzien.naruszenie { box-shadow: inset 0 -3px 0 #f98a8a; }
  :root:not([data-theme="light"]) .kal-dzien.zaznaczony,
  :root:not([data-theme="light"]) .kal-mies-dzien.zaznaczony { background-color: #1e3a5f; }
  :root:not([data-theme="light"]) .kal-km { color: #cfe0f8; }
  :root:not([data-theme="light"]) .kal-kropka { background: #3d4b5c; }
  :root:not([data-theme="light"]) .kal-probka { background-color: #16202c; }
  :root:not([data-theme="light"]) .kal-probka.sobota { background-color: #1c4430; }
  :root:not([data-theme="light"]) .kal-probka.niedziela { background-color: #4a2124; }
  :root:not([data-theme="light"]) .kal-probka.swieto { background-color: #48350f; border-color: #f0b849; }
  :root:not([data-theme="light"]) .kal-probka.jazda { box-shadow: inset 0 -3px 0 #7fb2f0; }
  :root:not([data-theme="light"]) .kal-probka.naruszenie { box-shadow: inset 0 -3px 0 #f98a8a; }
  :root:not([data-theme="light"]) .kal-probka.brak { background-image: repeating-linear-gradient(45deg, rgba(226,232,240,.08) 0 3px, rgba(226,232,240,0) 3px 6px); }
  :root:not([data-theme="light"]) .kal-mies-dzien { background-color: #16202c; }
  :root:not([data-theme="light"]) .kal-mies-dzien.sobota { background-color: #1c4430; }
  :root:not([data-theme="light"]) .kal-mies-dzien.niedziela { background-color: #4a2124; }
  :root:not([data-theme="light"]) .kal-mies-dzien.swieto { background-color: #48350f; }
  :root:not([data-theme="light"]) .kal-mies-swieto { color: #f0b849; }
  :root:not([data-theme="light"]) .kal-mies-tabela th.sobota { color: #6ee7a0; }
  :root:not([data-theme="light"]) .kal-menu-poz:hover { background: #1e2b3a; }
}
:root[data-theme="dark"] .kal-dzien { background-color: #16202c; }
:root[data-theme="dark"] .kal-dzien.sobota { background-color: #1c4430; }
:root[data-theme="dark"] .kal-dzien.niedziela { background-color: #4a2124; }
:root[data-theme="dark"] .kal-dzien.swieto { background-color: #48350f; }
:root[data-theme="dark"] .kal-dzien.swieto::after { border-color: #f0b849; }
:root[data-theme="dark"] .kal-dzien.brak { background-image: repeating-linear-gradient(45deg, rgba(226,232,240,.08) 0 3px, rgba(226,232,240,0) 3px 6px); }
:root[data-theme="dark"] .kal-dzien.jazda { box-shadow: inset 0 -3px 0 #7fb2f0; }
:root[data-theme="dark"] .kal-dzien.praca { box-shadow: inset 0 -3px 0 #64748b; }
:root[data-theme="dark"] .kal-dzien.naruszenie { box-shadow: inset 0 -3px 0 #f98a8a; }
:root[data-theme="dark"] .kal-dzien.zaznaczony,
:root[data-theme="dark"] .kal-mies-dzien.zaznaczony { background-color: #1e3a5f; }
:root[data-theme="dark"] .kal-km { color: #cfe0f8; }
:root[data-theme="dark"] .kal-kropka { background: #3d4b5c; }
:root[data-theme="dark"] .kal-probka { background-color: #16202c; }
:root[data-theme="dark"] .kal-probka.sobota { background-color: #1c4430; }
:root[data-theme="dark"] .kal-probka.niedziela { background-color: #4a2124; }
:root[data-theme="dark"] .kal-probka.swieto { background-color: #48350f; border-color: #f0b849; }
:root[data-theme="dark"] .kal-probka.jazda { box-shadow: inset 0 -3px 0 #7fb2f0; }
:root[data-theme="dark"] .kal-probka.naruszenie { box-shadow: inset 0 -3px 0 #f98a8a; }
:root[data-theme="dark"] .kal-probka.brak { background-image: repeating-linear-gradient(45deg, rgba(226,232,240,.08) 0 3px, rgba(226,232,240,0) 3px 6px); }
:root[data-theme="dark"] .kal-mies-dzien { background-color: #16202c; }
:root[data-theme="dark"] .kal-mies-dzien.sobota { background-color: #1c4430; }
:root[data-theme="dark"] .kal-mies-dzien.niedziela { background-color: #4a2124; }
:root[data-theme="dark"] .kal-mies-dzien.swieto { background-color: #48350f; }
:root[data-theme="dark"] .kal-mies-swieto { color: #f0b849; }
:root[data-theme="dark"] .kal-mies-tabela th.sobota { color: #6ee7a0; }
:root[data-theme="dark"] .kal-menu-poz:hover { background: #1e2b3a; }
.tw-legenda .tw-leg-24 { background: #dcfce7; border: 1px solid #15803d; }
.tw-legenda .tw-leg-dobowy-w-tyg {
  background: repeating-linear-gradient(45deg, #60a5fa 0 3px, #f5c518 3px 6px);
}
.tw-legenda .tw-leg-uwaga {
  display: block;
  flex-basis: 100%;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}
:root[data-theme="dark"] .tw-legenda .tw-leg-24 { background: #14532d; border-color: #4ade80; }
.tacho-wykres .tw-dop-praca { stroke: #7c3aed; stroke-width: 1.6; }
.tacho-wykres .tw-dop-zapas { stroke: #a78bfa; stroke-width: 1.2; stroke-dasharray: 1.6 2.4; }
.tacho-wykres .tw-dop-koniec { stroke: #7c3aed; stroke-width: 1.6; }
.tacho-wykres .tw-dop-koniec-po { stroke: #dc2626; stroke-width: 2.2; }
.tacho-wykres .tw-dop-tekst { font-size: 6.6px; font-weight: 600; fill: #6d28d9; }
.tacho-wykres .tw-odp-tekst-ponad { fill: #b91c1c; font-weight: 700; }
.tw-legenda .tw-leg-dop {
  background: linear-gradient(90deg, #7c3aed 0 55%, transparent 55%),
    repeating-linear-gradient(90deg, #a78bfa 0 2px, transparent 2px 4px);
  height: 4px;
}
.tw-legenda .tw-leg-dop-po { background: #dc2626; height: 4px; }
:root[data-theme="dark"] .tw-legenda .tw-leg-dop {
  background: linear-gradient(90deg, #c4b5fd 0 55%, transparent 55%),
    repeating-linear-gradient(90deg, #8b7cc8 0 2px, transparent 2px 4px);
}
:root[data-theme="dark"] .tacho-wykres .tw-dop-praca { stroke: #c4b5fd; }
:root[data-theme="dark"] .tacho-wykres .tw-dop-zapas { stroke: #8b7cc8; }
:root[data-theme="dark"] .tacho-wykres .tw-dop-koniec { stroke: #c4b5fd; }
:root[data-theme="dark"] .tacho-wykres .tw-dop-tekst { fill: #c4b5fd; }
:root[data-theme="dark"] .tacho-wykres .tw-odp-tekst-ponad { fill: #fca5a5; }
.tacho-wykres .tw-meta-znak { opacity: .95; }
.tacho-wykres .tw-meta-czas { font-variant-numeric: tabular-nums; }
.tacho-wykres .tw-wpis-reczny { color: #64748b; }
.tacho-wykres .tw-wpis-reczny-tlo {
  fill: #ffffff; stroke: #94a3b8; stroke-width: 1;
}
:root[data-theme="dark"] .tacho-wykres .tw-wpis-reczny { color: #94a3b8; }
:root[data-theme="dark"] .tacho-wykres .tw-wpis-reczny-tlo { fill: #30253e; stroke: #64748b; }
.tw-legenda .tw-leg-wpis-reczny {
  background: repeating-linear-gradient(90deg, #7c2d12 0 2px, transparent 2px 3.4px);
}
.tacho-wykres .tw-przerwa { fill: #0891b2; }
.tacho-wykres .tw-przerwa-dodatkowa { fill: #94a3b8; opacity: .55; }
.tacho-wykres .tw-przerwa-gotowosc { fill: #7dd3fc; stroke: #0891b2; stroke-width: .5; }
.tacho-wykres .tw-przerwa-tekst { font-size: 6px; font-weight: 600; fill: #0e7490; }
:root[data-theme="dark"] .tacho-wykres .tw-przerwa { fill: #22d3ee; }
:root[data-theme="dark"] .tacho-wykres .tw-przerwa-dodatkowa { fill: #64748b; opacity: .6; }
:root[data-theme="dark"] .tacho-wykres .tw-przerwa-tekst { fill: #67e8f9; }
:root .tacho-wykres .tw-przerwa.tw-przerwa-praca { fill: #0e7490; }
.tw-legenda .tw-leg-przerwa { background: #0891b2; height: 4px; }
.tacho-wykres .tw-tyg-linia { stroke: #f5c518; stroke-width: 3; stroke-linecap: round; }
.tacho-wykres .tw-tyg-linia-tekst { font-size: 6.5px; font-weight: 600; fill: #a16207; }
:root[data-theme="dark"] .tacho-wykres .tw-tyg-linia-tekst { fill: #fcd34d; }
.tacho-wykres .tw-zaloga { color: #7c3aed; }
:root[data-theme="dark"] .tacho-wykres .tw-zaloga { color: #c4b5fd; }
.tacho-wykres .tw-pojazd-linia { stroke: #2563eb; stroke-width: 1.2; }
.tacho-wykres .tw-pojazd-tekst { font-size: 7px; font-weight: 700; fill: #1d4ed8; }
.tacho-wykres .tw-karta-we { fill: #16a34a; }
.tacho-wykres .tw-karta-wy { fill: #dc2626; }
:root[data-theme="dark"] .tacho-wykres .tw-pojazd-linia { stroke: #93c5fd; }
.tacho-wykres .tw-pojazd-linia.tw-pojazd-zaloga { stroke: #7c3aed; stroke-width: 2; }
:root[data-theme="dark"] .tacho-wykres .tw-pojazd-linia.tw-pojazd-zaloga { stroke: #c4b5fd; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tacho-wykres .tw-pojazd-linia.tw-pojazd-zaloga { stroke: #c4b5fd; }
}
:root[data-theme="dark"] .tacho-wykres .tw-pojazd-tekst { fill: #bfdbfe; }
.pasek-przyklejony {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg, #fff);
  margin: 0 -1.25rem;
  padding: .5rem 1.25rem .25rem;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .45);
}
.pasek-przyklejony .card { margin-bottom: .5rem; }
.pasek-przyklejony .toolbar { gap: .45rem; margin-bottom: .4rem; }
.pasek-przyklejony label.checkbox {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .18rem .5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.5;
  background: var(--surface);
  cursor: pointer;
}
.pasek-przyklejony label.checkbox:hover { border-color: var(--accent, #2563eb); }
.pasek-przyklejony label.checkbox input { margin: 0; }
.warstwy { margin-bottom: .5rem; }
.warstwy-wiersz { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.warstwy-otworz {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .3rem .65rem .3rem .55rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer; user-select: none; transition: border-color .15s, background .15s;
}
.warstwy-otworz:hover { border-color: var(--accent, #2563eb); }
.warstwy-otworz[aria-expanded="true"] { background: color-mix(in srgb, var(--accent, #2563eb) 9%, var(--surface)); border-color: color-mix(in srgb, var(--accent, #2563eb) 45%, var(--border)); }
.warstwy-otworz:focus-visible, .warstwa:focus-visible, .warstwy-akcja:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }
.warstwy-otworz-ikona { color: var(--accent, #2563eb); font-size: 14px; }
.warstwy-licznik {
  min-width: 2.3rem; text-align: center; padding: 0 .4rem; border-radius: 999px;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--amber, #d97706) 20%, transparent); color: var(--text);
}
.warstwy-licznik.komplet { background: color-mix(in srgb, var(--accent, #2563eb) 18%, transparent); }
.warstwy-strzalka { font-size: 11px; color: var(--muted); transition: transform .25s; }
.warstwy-otworz[aria-expanded="true"] .warstwy-strzalka { transform: rotate(180deg); }
.warstwy-wylaczone { font-size: 11.5px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warstwy-wylaczone:empty { display: none; }
.warstwy-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s cubic-bezier(.2, .8, .2, 1); }
.warstwy[data-otwarte="true"] .warstwy-panel { grid-template-rows: 1fr; }
.warstwy-panel-wew { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s .3s; }
.warstwy[data-otwarte="true"] .warstwy-panel-wew { visibility: visible; transition-delay: 0s; }
.warstwy-grupy { display: flex; flex-wrap: wrap; gap: .5rem .9rem; padding: .6rem 0 .15rem; }
.warstwy-grupa { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .3rem .4rem .4rem; border-radius: 12px;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 85%, transparent); }
.warstwy-grupa-nazwa { flex: 0 0 100%; font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--muted); padding: 0 .2rem; }
.warstwy-akcje { display: flex; gap: .4rem; padding: .35rem 0 .1rem; }
.warstwy-akcja {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11.5px;
  padding: .15rem .4rem; border-radius: 6px; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px;
}
.warstwy-akcja:hover { color: var(--accent, #2563eb); }
.warstwa {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .28rem .45rem .28rem .55rem; border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 500; line-height: 1.4;
  cursor: pointer; user-select: none;
  transition: background .15s, color .15s, border-color .15s;
}
.warstwa:hover { background: color-mix(in srgb, var(--accent, #2563eb) 8%, transparent); color: var(--text); }
.warstwa-ikona { font-size: 13px; filter: grayscale(1); opacity: .5; transition: filter .15s, opacity .15s; }
.warstwa-suwak {
  position: relative; width: 24px; height: 14px; flex: none; border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 35%, transparent); transition: background .2s;
}
.warstwa-galka {
  position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1);
}
.warstwa[aria-checked="true"] {
  color: var(--text); font-weight: 600;
  background: color-mix(in srgb, var(--accent, #2563eb) 11%, var(--surface));
  border-color: color-mix(in srgb, var(--accent, #2563eb) 35%, var(--border));
}
.warstwa[aria-checked="true"] .warstwa-ikona { filter: none; opacity: 1; }
.warstwa[aria-checked="true"] .warstwa-suwak { background: var(--accent, #2563eb); }
.warstwa[aria-checked="true"] .warstwa-galka { transform: translateX(10px); }
.warstwa.zalezny-wyl { opacity: .45; }
.pasek-przyklejony .card { margin-bottom: .4rem; }
.pasek-przyklejony .kpi-tile { padding: .45rem .7rem; }
.pasek-przyklejony .kpi-tile .value { font-size: 19px; }
.pasek-przyklejony .kpi-tile .label { font-size: 10px; letter-spacing: .03em; }
.tacho-wykres .tw-tyg-suma { font-size: 11px; font-weight: 600; fill: var(--muted); }
.tacho-wykres .tw-odp-dobowy.tw-odp-w-tygodniowym { fill: url(#tw-zolto-niebieski); }
.tacho-wykres .tw-odp-dobowy.tw-odp-w-tygodniowym.tw-odp-tygodniowy-skrocony { fill: url(#tw-pomaranczowo-niebieski); }
.tacho-wykres .tw-rekompensata-tekst { fill: #ffffff; }
.tacho-wykres .tw-godz-dop { font-weight: 700; fill: #6d28d9; }
:root[data-theme="dark"] .tacho-wykres .tw-godz-dop { fill: #c4b5fd; }
.tacho-wykres.tw-klikalny { cursor: crosshair; }
.tacho-wykres .tw-zaznaczenie-pole {
  fill: rgba(37, 99, 235, .16);
  stroke: #2563eb;
  stroke-width: 1;
  stroke-dasharray: 3 2;
  pointer-events: none;
}
:root[data-theme="dark"] .tacho-wykres .tw-zaznaczenie-pole {
  fill: rgba(147, 197, 253, .18);
  stroke: #93c5fd;
}
.tabs.tabs-przyklejone {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--bg, #fff);
  margin: 0 -1.25rem;
  padding: 0 1.25rem;
}
.tacho-wykres .tw-tyg-ikona { color: currentColor; }
.tacho-wykres .tw-tyg-linia-znak { font-size: 11px; font-weight: 700; fill: var(--muted); }
.tacho-wykres .tw-akt-skorygowany { stroke: #7c3aed; stroke-width: 1; opacity: .82; }
.tacho-wykres .tw-akt-blad-selektora {
  stroke: #7c3aed; stroke-width: 1.4; stroke-dasharray: 3 2; opacity: .7;
}
.tabela-sort th.sortowalna { cursor: pointer; user-select: none; position: relative; }
.tabela-sort th.sortowalna:hover { background: var(--surface-2); }
.tabela-sort th .th-tresc { display: inline-block; padding-right: 14px; }
.tabela-sort th.sortowalna::after {
  content: '';
  position: absolute; right: 5px; top: 50%; margin-top: -2px;
  border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
  border-bottom: 4px solid currentColor;
  opacity: .22;
}
.tabela-sort th.sort-rosnaco::after { opacity: 1; }
.tabela-sort th.sort-malejaco::after {
  opacity: 1;
  border-bottom: 0; border-top: 4px solid currentColor;
}
.tabela-sort th.filtr-wlaczony { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.tabela-stopka {
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
  padding: .35rem .5rem;
}
.tabela-stopka:empty { display: none; }
.chip-filtr {
  border: 1px solid var(--accent); background: none; color: var(--accent);
  border-radius: 999px; padding: .1rem .5rem; font-size: 11.5px; cursor: pointer;
}
.chip-filtr::after { content: ' ×'; font-weight: 700; }
.chip-filtr:hover { background: var(--accent); color: #fff; }
.panel-filtra {
  position: absolute; z-index: 1300; width: 240px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: .5rem; display: flex; flex-direction: column; gap: .4rem;
}
.panel-filtra-naglowek { font-weight: 700; font-size: 12px; }
.panel-filtra input[type="search"] { width: 100%; }
.panel-filtra-lista {
  max-height: 220px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 6px; padding: .25rem;
}
.panel-filtra-poz {
  display: flex; gap: .4rem; align-items: center;
  padding: .15rem .25rem; font-size: 12px; cursor: pointer; border-radius: 4px;
}
.panel-filtra-poz:hover { background: var(--surface-2); }
.panel-filtra-poz span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-filtra-stopka { justify-content: flex-end; }
.panel-filtra { resize: none; }
.panel-filtra .panel-filtra-lista { flex: 1 1 auto; max-height: none; min-height: 90px; }
.panel-filtra-uchwyt {
  position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 0 46%, var(--border) 46% 54%, transparent 54% 100%),
    linear-gradient(135deg, transparent 0 70%, var(--border) 70% 78%, transparent 78% 100%);
}
.panel-filtra-uchwyt:hover { background:
    linear-gradient(135deg, transparent 0 46%, var(--accent) 46% 54%, transparent 54% 100%),
    linear-gradient(135deg, transparent 0 70%, var(--accent) 70% 78%, transparent 78% 100%);
}
.panel-filtra-akcja {
  width: 100%; text-align: left; background: none; border: 0;
  color: var(--text); font: inherit; font-size: 12px;
  padding: .3rem .25rem; border-radius: 4px; cursor: pointer;
}
.panel-filtra-akcja:hover:not(:disabled) { background: var(--surface-2); }
.panel-filtra-akcja:disabled { opacity: .45; cursor: default; }
.panel-filtra-ikona {
  display: inline-block; width: 16px; text-align: center; color: var(--muted);
}
.panel-filtra-kreska { height: 1px; background: var(--border); margin: .15rem 0; }
.lista-wyboru { position: relative; display: block; width: 100%; }
.lista-wyboru > select {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; pointer-events: none;
}
.lista-wyboru-pole { padding-right: 1.8rem; text-overflow: ellipsis; }
.lista-wyboru-pole::placeholder { color: var(--muted); }
.lista-wyboru-strzalka {
  position: absolute; right: .65rem; top: calc(50% + .125rem); width: 0; height: 0; margin-top: -2px;
  border: 4.5px solid transparent; border-top-color: var(--muted); cursor: pointer;
}
.lista-wyboru.otwarta .lista-wyboru-strzalka { margin-top: -7px; border-top-color: transparent; border-bottom-color: var(--muted); }
.lista-wyboru.wylaczona .lista-wyboru-strzalka { opacity: .4; cursor: default; }
.lista-wyboru-menu {
  position: fixed; z-index: 1300; overflow-y: auto; max-width: min(92vw, 520px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .25rem;
}
.lista-wyboru-poz {
  padding: .32rem .55rem; border-radius: 5px; cursor: pointer; font-size: 13px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lista-wyboru-poz.aktywna { background: var(--surface-2); }
.lista-wyboru-poz.wybrana { font-weight: 650; color: var(--accent); }
.lista-wyboru-poz.wylaczona { opacity: .5; cursor: default; }
.lista-wyboru-pusto { padding: .4rem .55rem; font-size: 12px; color: var(--muted); }
.panel-filtra-wszystkie { font-weight: 600; }
.th-strzalka { margin-left: .3rem; font-size: 9px; color: var(--muted); }
th.sortowalna:hover .th-strzalka, th.filtrowalna:hover .th-strzalka { color: var(--accent); }
th.filtr-wlaczony .th-strzalka { color: var(--accent); }
thead th { position: relative; }
.th-uchwyt {
  position: absolute; top: 0; right: -3px; width: 7px; height: 100%;
  cursor: col-resize; user-select: none;
}
.th-uchwyt::after {
  content: ""; position: absolute; top: 20%; bottom: 20%; left: 3px; width: 1px;
  background: var(--border);
}
.th-uchwyt:hover::after { background: var(--accent); width: 2px; left: 2.5px; }
body.rozciaganie-kolumny { cursor: col-resize; user-select: none; }
table.tabela-staly-uklad { table-layout: fixed; }
table.tabela-staly-uklad td { overflow: hidden; text-overflow: ellipsis; }
:root { --surface-2: #f2f5f9; }
.pasek-kpi {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 1rem; align-items: stretch;
}
.pasek-kpi .kpi-tile {
  flex: 0 0 auto; padding: .5rem .8rem; display: flex;
  flex-direction: column; justify-content: center; gap: .1rem;
}
.pasek-kpi .kpi-tile {
  min-width: 128px; padding: .45rem .7rem; gap: .15rem;
}
.pasek-kpi .kpi-tile.z-akcentem { padding-left: 1rem; }
.pasek-kpi .kpi-tile .label { white-space: nowrap; font-size: 10.5px; }
.pasek-kpi .kpi-tile .value { font-size: 21px; margin-top: 0; line-height: 1.1; }
.pasek-kpi .kpi-tile .sub { font-size: 10.5px; }
.pasek-kpi .kpi-tile .kpi-head { min-height: 16px; }
.pasek-kpi .kpi-tile.bez-podpisu { padding: .5rem .7rem; }
.kpi-tile .value, .kal-czynnosc-czas, td.num { font-variant-numeric: tabular-nums; }
.table-wrap tbody tr:nth-child(even) { background: rgba(127, 127, 127, .035); }
.table-wrap tbody tr:hover { background: rgba(27, 77, 228, .07); }
.table-wrap thead th { box-shadow: 0 1px 0 var(--border); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
.toolbar label {
  min-width: 0; display: flex; flex-direction: column; gap: .15rem;
  font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; font-weight: 600;
}
.toolbar label > select,
.toolbar label > input { text-transform: none; letter-spacing: 0; font-weight: 400; }
.toolbar .grow { flex: 1 1 220px; }
.tabs.tabs-przyklejone button { transition: color .12s, box-shadow .12s; }
.zakladka-powrot { animation: zakladka-wejscie .16s ease-out; }
@keyframes zakladka-wejscie { from { opacity: .45; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .zakladka-powrot { animation: none; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --surface-2: #30253e; }
  :root:not([data-theme="light"]) .table-wrap tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, .022);
  }
  :root:not([data-theme="light"]) .table-wrap tbody tr:hover { background: #30253e; }
  :root:not([data-theme="light"]) .panel-filtra { box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
}
:root[data-theme="dark"] { --surface-2: #30253e; }
:root[data-theme="dark"] .table-wrap tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, .022);
}
:root[data-theme="dark"] .table-wrap tbody tr:hover { background: #30253e; }
:root[data-theme="dark"] .panel-filtra { box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.wczytywanie {
  opacity: .4;
  pointer-events: none;
  transition: opacity .12s ease-out;
  position: relative;
}
.tabela-podpowiedz { font-style: italic; }
.tacho-wykres .tw-dzien-wskazany rect.tw-tlo-doby,
.tacho-wykres .tw-dzien-wskazany .tw-siatka { transition: none; }
.tacho-wykres .tw-dzien-wskazany { animation: blysk-doby 2s ease-out; }
@keyframes blysk-doby {
  0%, 55% { filter: drop-shadow(0 0 0 var(--accent)) brightness(1.35); }
  100% { filter: none; }
}
.znacznik-cepik { font-size: 10px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }
.pasek-cepik { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.kafelek-cepik {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px;
  border: 1px solid var(--border); border-left-width: 5px; border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-weight: 600; font-size: 13px;
}
.kafelek-cepik.green { border-color: var(--green); }
.kafelek-cepik.amber { border-color: var(--amber); }
.kafelek-cepik.red { border-color: var(--red); }
.kafelek-cepik.blue { border-color: var(--accent); }
.kafelek-cepik.grey { border-color: var(--grey); }
.kafelek-cepik-przycisk {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border: 1px solid var(--pole-obwodka); border-radius: 8px; background: var(--pole); color: var(--text);
  cursor: pointer; text-decoration: none; font-size: 15px; line-height: 1;
}
.kafelek-cepik-przycisk:hover:not([disabled]) { border-color: var(--pole-obwodka-hover); }
.kafelek-cepik-przycisk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kafelek-cepik-przycisk[disabled] { opacity: .45; cursor: progress; }
.analiza-okresu { margin: 18px 0; }
.analiza-pasek { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.analiza-pasek h3 { margin: 0 6px 0 0; }
.analiza-siatka { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.kafel-ikona { font-size: 1.05em; }
.stat-rzad { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-bottom: 10px; }
.stat { min-width: 96px; }
.stat-etykieta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.stat-etykieta i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.stat-wartosc { font-size: 1.35rem; font-weight: 700; color: var(--text); }
.duza-liczba { font-size: 2rem; font-weight: 700; margin: 4px 0 8px; color: var(--text); }
.duza-liczba.mala { font-size: 1.15rem; }
.przypis { margin: 8px 0 0; }
.wykres-os { fill: var(--muted); font-size: 10px; }
.linia-wykres, .punkty-kierowcow { display: block; max-width: 100%; }
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.donut-srodek { fill: var(--text); font-size: 20px; font-weight: 700; }
.donut-podpis { fill: var(--muted); font-size: 11px; }
.donut-legenda { list-style: none; margin: 0; padding: 0; flex: 1 1 180px; display: grid; gap: 6px; }
.donut-legenda li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: baseline; font-size: 13px; }
.donut-legenda i { width: 12px; height: 12px; border-radius: 3px; align-self: center; }
.donut-wartosc { font-weight: 600; text-align: right; white-space: nowrap; }
.przelacznik-kar { display: flex; gap: 6px; margin-bottom: 10px; }
.lista-powiadomien { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lista-powiadomien li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.lista-powiadomien .tekst { overflow-wrap: anywhere; }
.pulpit-przelacznik { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.dok-komorka { display: grid; gap: 2px; min-width: 130px; }
.dok-rozbieznosc { color: var(--amber); font-size: 12px; font-weight: 600; cursor: help; }
.dok-uwaga { color: var(--muted); max-width: 220px; }
.dok-cepik { display: grid; gap: 3px; min-width: 190px; max-width: 280px; }
.dok-alarmy { display: grid; gap: 4px; }
pre.kod {
  margin: 0; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--pole);
  color: var(--text); overflow: auto; max-height: 280px; font-family: var(--mono); font-size: 12px;
}
.analiza-okno { position: relative; }
.analiza-okno.laduje .analiza-tresc { opacity: .4; pointer-events: none; transition: opacity .15s; }
.analiza-ladowanie { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; z-index: 5; pointer-events: none; }
.analiza-ladowanie-box { position: sticky; top: 96px; margin-top: 40px; display: flex; align-items: center; gap: 14px; padding: 14px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); color: var(--text); }
.spinner { width: 26px; height: 26px; flex: none; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: obrot .8s linear infinite; }
@keyframes obrot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.analiza-bez-danych { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.okno-plywajace {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: min(420px, calc(100vw - 32px));
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
}
.okno-plywajace-naglowek {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 8px 7px 14px; border-bottom: 1px solid var(--border);
  font-weight: 600; cursor: move; user-select: none; touch-action: none;
}
.okno-plywajace-x {
  background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1;
  cursor: pointer; padding: 0 6px; border-radius: 6px;
}
.okno-plywajace-x:hover { color: var(--text); background: var(--bg); }
.okno-plywajace-tresc { padding: 10px 14px 12px; max-height: 70vh; overflow: auto; }
.zakres-sumy { display: grid; grid-template-columns: 18px 1fr auto; gap: 5px 10px; align-items: center; font-size: 13px; }
.zakres-znak { display: inline-flex; align-items: center; }
.zakres-wartosc { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.zakres-okres { margin: 8px 0 10px; }
.zakres-korekta { display: grid; gap: 8px; margin-bottom: 6px; }
.zakres-korekta label { display: grid; gap: 4px; font-size: 12px; }
.zakres-korekta label.checkbox { display: flex; align-items: center; gap: 6px; }
.zakres-promy { display: grid; gap: 6px; margin: 4px 0 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.zakres-promy-lista { display: grid; gap: 4px; }
.zakres-prom-wiersz { display: grid; grid-template-columns: auto auto 1fr auto; gap: 8px; align-items: center; font-size: 12px; }
.zakres-prom-wiersz.pominiety > span:not(.muted) { text-decoration: line-through; opacity: .6; }
.kal-dymek {
  position: absolute; z-index: 450; min-width: 200px; max-width: 280px;
  pointer-events: none;
  opacity: 0; transform: translateY(2px); transition: opacity .12s ease, transform .12s ease;
}
.kal-dymek.widoczny { opacity: 1; transform: none; }
body:has(.tw-dymek) .kal-dymek.widoczny { opacity: 0; }
.kal-dymek-naglowek {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--border);
}
.kal-dymek-naglowek strong { font-size: 13.5px; }
.kal-dymek-naglowek span { color: var(--muted); font-size: 12px; }
.kal-dymek-swieto { color: var(--red); font-weight: 600; margin-bottom: 4px; }
.kal-dymek-absencja { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 4px; }
.kal-dymek-absencja i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.kal-dymek-pusto { color: var(--muted); font-style: italic; padding: 2px 0; }
.kal-dymek-czynnosci, .kal-dymek-szczegoly { display: grid; gap: 3px; }
.kal-dymek-szczegoly { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.kal-dymek-wiersz { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.kal-dymek-szczegoly .kal-dymek-wiersz { grid-template-columns: auto 1fr; }
.kal-dymek-szczegoly .kal-dymek-wiersz > span:last-child { text-align: right; font-weight: 600; }
.kal-dymek-nazwa { color: var(--muted); }
.kal-dymek-wiersz strong { font-variant-numeric: tabular-nums; }
.kal-dymek .znak-czynnosci { display: inline-flex; }
.kal-dymek-naruszenia {
  margin-top: 6px; padding: 3px 8px; border-radius: 6px; font-weight: 700;
  color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent);
}
input[type=date] {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23656f7d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
  cursor: pointer;
}
input[type=date]::-webkit-calendar-picker-indicator { display: none; }
:root[data-theme="dark"] input[type=date] {
  color-scheme: dark;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) input[type=date] {
    color-scheme: dark;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E");
  }
}
.wybor-daty {
  position: absolute; z-index: 600; width: 268px; padding: 10px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .22);
  font-size: 13px; user-select: none;
}
.wybor-daty button {
  font: inherit; color: inherit; background: none; border: 0; cursor: pointer;
  border-radius: 7px; min-height: 0; margin: 0; width: auto;
}
.wybor-daty button:disabled { opacity: .3; cursor: default; }
.wd-naglowek { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; margin-bottom: 6px; }
.wd-strzalka { height: 30px; font-size: 18px; line-height: 1; color: var(--muted) !important; }
.wd-strzalka:hover, .wd-tytul:hover { background: color-mix(in srgb, var(--accent) 12%, transparent) !important; color: var(--text) !important; }
.wd-tytul { height: 30px; font-weight: 700; font-size: 13.5px; }
.wd-siatka { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.wd-dzien-tyg { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.wd-dzien { height: 32px; font-variant-numeric: tabular-nums; }
.wd-dzien:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 14%, transparent) !important; }
.wd-dzien.weekend { color: var(--red) !important; }
.wd-dzien.poza { opacity: .38; }
.wd-dzien.dzis { box-shadow: inset 0 0 0 1.5px var(--accent-2); font-weight: 700; }
.wd-dzien.wybrany, .wd-miesiac.wybrany {
  background: var(--accent) !important; color: var(--na-akcencie) !important; font-weight: 700; opacity: 1;
}
.wd-miesiace { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 0; }
.wd-miesiac { height: 40px; text-transform: capitalize; }
.wd-miesiac:hover:not(.wybrany) { background: color-mix(in srgb, var(--accent) 14%, transparent) !important; }
.wd-stopka { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.wd-link { padding: 4px 8px; color: var(--accent) !important; font-weight: 600; }
.wd-link:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 12%, transparent) !important; }
.wd-wyczysc { color: var(--muted) !important; }
.menu-raportow { position: relative; display: inline-block; }
.menu-raportow-lista {
  position: fixed; z-index: 1200;
  width: 320px; max-width: calc(100vw - 32px); padding: 6px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .22);
}
.menu-raportow-lista[hidden] { display: none; }
.menu-raportow-pozycja {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  width: 100%; min-height: 0; margin: 0; padding: 7px 10px;
  font: inherit; text-align: left; color: inherit; background: none; border: 0; border-radius: 7px; cursor: pointer;
}
.menu-raportow-pozycja:hover:not(:disabled),
.menu-raportow-pozycja:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); outline: none; }
.menu-raportow-pozycja:disabled { opacity: .5; cursor: default; }
.menu-raportow-pozycja .mr-nazwa { font-weight: 600; font-size: 13px; }
.menu-raportow-pozycja .mr-opis { font-size: 11.5px; color: var(--muted); }
.menu-raportow-stopka {
  display: block; margin-top: 4px; padding: 7px 10px 3px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted); text-decoration: none;
}
.menu-raportow-stopka:hover { color: var(--accent); }
.tacho-wykres .tw-prom-okres { fill: #0284c7; }
.tacho-wykres .tw-prom-znak { color: #0369a1; }
.tacho-wykres .tw-prom-okres.tw-prom-nieuznany { fill: #94a3b8; }
.tacho-wykres .tw-prom-znak.tw-prom-nieuznany { color: #64748b; }
.tacho-wykres .tw-prom-przerwanie { fill: #fbbf24; stroke: #b45309; stroke-width: .6; stroke-dasharray: 2 1.2; }
.tacho-wykres .tw-prom-wyciete-pole { stroke: #b45309; stroke-width: .8; stroke-dasharray: 2 1.2; }
.tacho-wykres .tw-prom-wyciete-podpis { font-size: 6.5px; font-weight: 700; fill: #b45309; paint-order: stroke; stroke: var(--surface, #fff); stroke-width: 2px; stroke-linejoin: round; }
.tacho-wykres .tw-prom-operator .tw-prom-tlo { stroke-dasharray: 2 1.4; stroke-width: 1.2; }
.tw-legenda .tw-leg-prom { background: #0284c7; }
.tw-legenda .tw-leg-prom-przerwanie { background: repeating-linear-gradient(45deg, #fbbf24 0 3px, #fde68a 3px 6px); }
:root[data-theme="dark"] .tacho-wykres .tw-prom-okres { fill: #38bdf8; }
:root[data-theme="dark"] .tacho-wykres .tw-prom-znak { color: #7dd3fc; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tacho-wykres .tw-prom-okres { fill: #38bdf8; }
  :root:not([data-theme="light"]) .tacho-wykres .tw-prom-znak { color: #7dd3fc; }
}
.tacho-wykres .tw-prom-tlo { fill: #e0f2fe; stroke: #0369a1; stroke-width: .9; }
.tacho-wykres .tw-prom-plakietka.tw-prom-nieuznany .tw-prom-tlo { fill: #f1f5f9; stroke: #94a3b8; }
.tacho-wykres .tw-prom-kreska { stroke: #0369a1; stroke-width: .8; stroke-dasharray: 2 1.5; }
.tacho-wykres .tw-prom-plakietka.tw-prom-nieuznany .tw-prom-kreska { stroke: #94a3b8; }
.tacho-wykres .tw-odp-prom { color: #0c4a6e; }
:root[data-theme="dark"] .tacho-wykres .tw-prom-tlo { fill: #0c4a6e; stroke: #7dd3fc; }
:root[data-theme="dark"] .tacho-wykres .tw-odp-prom { color: #0c4a6e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tacho-wykres .tw-prom-tlo { fill: #0c4a6e; stroke: #7dd3fc; }
}
.modal.import-ddd { width: min(1500px, 97vw); max-width: 97vw; }
.imp-okno { display: flex; flex-direction: column; gap: 10px; }
.imp-okno label.btn input[type=file] { display: none; }
.imp-postep { display: flex; align-items: center; gap: 10px; }
.imp-pasek { flex: 1; height: 10px; border-radius: 5px; background: var(--surface-2, rgba(127,127,127,.15)); overflow: hidden; }
.imp-pasek-wypelnienie { height: 100%; width: 0; background: #16a34a; transition: width .25s; }
.imp-uklad { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(300px, 1fr); gap: 12px; min-height: 360px; }
.imp-lista { overflow: auto; max-height: 60vh; border: 1px solid var(--border, rgba(127,127,127,.25)); border-radius: 6px; }
.imp-tabela { max-height: none; overflow: visible; }
.imp-tabela table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.imp-tabela .imp-znak { cursor: help; }
.imp-szczeg { display: inline-block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.imp-nazwa { display: inline-block; vertical-align: bottom; }
.imp-wszystkie { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.imp-tabela th { position: sticky; top: 0; background: var(--surface, #fff); text-align: left; padding: 6px; font-weight: 600; }
.imp-tabela td { padding: 4px 6px; border-top: 1px solid var(--border, rgba(127,127,127,.15)); white-space: nowrap; }
.imp-tabela tr { cursor: pointer; }
.imp-tabela tr.imp-wybrany td { background: rgba(37, 99, 235, .12); }
.imp-nazwa { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.imp-tabela td:nth-child(6) { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.imp-kierowca { max-width: 220px; font-size: 12px; }
.imp-znak { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; }
.imp-ok { background: #16a34a; } .imp-uwaga { background: #d97706; } .imp-blad { background: #dc2626; } .imp-szary { background: #94a3b8; }
.imp-zapis { background: #2563eb; }
.imp-zapisany { background: #15803d; border-radius: 4px; }
.imp-kreci { animation: imp-obrot 1.1s linear infinite; }
.imp-pulsuje { animation: imp-puls .9s ease-in-out infinite alternate; }
@keyframes imp-obrot { to { transform: rotate(360deg); } }
@keyframes imp-puls { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .imp-kreci, .imp-pulsuje { animation: none; } }
.imp-tabela tr.imp-wiersz-zapisany td { background: rgba(22, 163, 74, .09); }
.imp-tabela tr.imp-wybrany td { background: rgba(37, 99, 235, .12); }
.imp-usun { border: 0; background: none; color: var(--muted, #94a3b8); cursor: pointer; font-size: 13px; padding: 0 4px; }
.imp-usun:hover:not(:disabled) { color: #dc2626; }
.imp-usun:disabled { opacity: .3; cursor: default; }
.imp-kierowca-wybor { display: inline-flex; align-items: center; max-width: 220px; font: inherit; font-size: 12px; color: inherit;
  background: none; border: 1px solid var(--border, rgba(127,127,127,.3)); border-radius: 4px; padding: 1px 6px; cursor: pointer; }
.imp-kierowca-wybor:disabled { cursor: default; opacity: .7; }
.imp-kierowca-tekst { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-strzalka { margin-left: 6px; opacity: .6; }
.imp-akcje { margin-left: auto; display: inline-flex; gap: 6px; flex-wrap: wrap; }
.imp-okno label.btn.disabled { opacity: .55; pointer-events: none; }
.imp-szczegoly { border: 1px solid var(--border, rgba(127,127,127,.25)); border-radius: 6px; padding: 10px 12px; overflow: auto; max-height: 60vh; font-size: 13px; }
.imp-szczegoly h4 { margin: 0 0 8px; word-break: break-all; }
.imp-pole { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px dashed var(--border, rgba(127,127,127,.2)); }
.imp-pole > span:last-child { text-align: right; }
.imp-uwagi { margin: 8px 0; } .imp-uwagi ul { margin: 4px 0 0 18px; padding: 0; }
.imp-liczniki { display: flex; gap: 22px; font-size: 13px; flex-wrap: wrap; align-items: center; }
@media (max-width: 900px) { .imp-uklad { grid-template-columns: 1fr; } }
.opis-btn {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%; margin-left: .45rem; padding: 0;
  border: 1px solid var(--border); background: var(--surface); color: var(--accent, #14b8a6);
  font-weight: 700; font-size: 12px; line-height: 1; cursor: pointer; vertical-align: middle;
}
.opis-btn:hover { background: var(--accent, #14b8a6); color: #fff; border-color: var(--accent, #14b8a6); }
.ustaw-naglowek { display: flex; align-items: center; margin: .6rem 0 .1rem; }
.ustaw-gora { justify-content: flex-end; margin-bottom: .75rem; }
.nazwy-szablon { width: 100%; font-family: var(--mono); }
.nazwy-pola { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.nazwy-pola .btn.small { font-family: var(--mono); }
.nazwy-lista { margin: .35rem 0 0; padding-left: 1.1rem; }
.nazwy-lista li { margin: .2rem 0; }
.nazwy-lista code { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.ustaw-wiersz { display: flex; align-items: center; gap: .2rem; }
.ustaw-wiersz .check { margin: 0; }
.ustaw-etykieta { display: inline-flex; align-items: center; }
.ustaw-wciecie { margin-left: 1.6rem; max-width: 520px; }
.modal.opis-ustawienia { max-width: min(1040px, 96vw); width: 96vw; }
.opis-punkt { margin: .1rem 0 .1rem 1rem; position: relative; }
.opis-punkt::before { content: '•'; position: absolute; left: -.8rem; color: var(--accent, #14b8a6); }
.opis-na-przykladzie { font-style: italic; }
.opis-wariant { border: 1px solid var(--border); border-radius: 8px; padding: .6rem .8rem; margin: .6rem 0; }
.opis-wariant-tytul { font-weight: 700; margin-bottom: .4rem; }
.opis-wariant svg { width: 100%; height: auto; }
.opis-naruszenia ul { margin: .3rem 0 0 1.1rem; padding: 0; }
.opis-naruszenia li { margin: .15rem 0; font-size: 13px; }
.opis-kod { font-weight: 600; color: var(--red, #dc2626); }
.opis-bez { color: var(--green, #16a34a); font-size: 13px; margin: .3rem 0 0; }
.pill.violet { background: #efe9fd; color: #5b21b6; }
:root[data-theme="dark"] .pill.violet { background: #2a1d4a; color: #c4b5fd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.violet { background: #2a1d4a; color: #c4b5fd; } }
.delegacje .kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin: .6rem 0; }
.del-legenda { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: 11.5px; color: var(--muted); margin-top: .4rem; }
.del-leg { display: inline-flex; align-items: center; gap: .3rem; }
.del-leg-kolor { width: 12px; height: 9px; border-radius: 2px; display: inline-block; }
.del-kraje { display: inline-flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.del-rozl { font-size: 12px; line-height: 1.45; }
.del-uwagi { color: #92400e; }
.del-pole { width: 7.5rem; }
.skreslone { text-decoration: line-through; color: var(--muted); }
.del-zasady summary { cursor: pointer; font-weight: 600; }
.del-zasady ul { margin: .5rem 0 0 1.1rem; font-size: 12.5px; line-height: 1.5; }
.del-wstep { margin-bottom: .7rem; }
.del-wykres-wrap { overflow-x: auto; }
.card.flush.del-karta-wykresu { overflow: visible; }
.del-wykres-wrap .tacho-wykres { min-width: 760px; }
.del-podtytul { margin: 1rem 0 .4rem; font-size: 13px; }
.dz-przybornik { position: sticky; top: var(--gora-tacho, 0px); z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem;
  padding: .4rem .5rem; margin: -.2rem 0 .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.dz-przybornik-opis { font-size: 12px; color: var(--muted); }
.dz-poz { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .55rem; font-size: 12.5px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--bg); color: var(--text); cursor: grab; user-select: none; touch-action: none; }
.dz-poz:hover { border-color: #2563eb; }
.dz-poz.aktywny { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, .25); }
.dz-kraj { display: inline-flex; align-items: center; gap: .3rem; font-size: 12px; color: var(--muted); }
.dz-kraj select { padding: .15rem .3rem; }
.dz-duch { position: fixed; z-index: 1000; pointer-events: none; display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .5rem;
  font-size: 12px; background: var(--surface); color: var(--text); border: 1px solid #2563eb; border-radius: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.dz-ikona { display: inline-block; vertical-align: middle; overflow: visible; }
.dz-op { display: inline-flex; align-items: center; gap: .2rem; }
.dz-menu { position: fixed; z-index: 1000; min-width: 170px; padding: .3rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.dz-menu-tytul { font-size: 11.5px; color: var(--muted); padding: .2rem .4rem .35rem; }
.dz-menu-poz { display: flex; width: 100%; align-items: center; gap: .35rem; padding: .3rem .4rem; border: 0; background: none; color: var(--text);
  font-size: 13px; text-align: left; border-radius: 5px; cursor: pointer; }
.dz-menu-poz:hover { background: var(--bg); }
.tacho-wykres.dz-wstawianie { cursor: crosshair; }
.dz-okres { fill: #14b8a6; filter: drop-shadow(0 0 2px rgba(20, 184, 166, .95)); }
.dz-okres.zagraniczna { fill: #8b5cf6; filter: drop-shadow(0 0 2px rgba(139, 92, 246, .95)); }
.dz-leg-linia { display: inline-block; width: 18px; height: 3px; border-radius: 2px; background: var(--dz-linia, #14b8a6); box-shadow: 0 0 4px var(--dz-linia, #14b8a6); }
.dz-leg-zagraniczna .dz-leg-linia { --dz-linia: #8b5cf6; }
.dz-okres.pomin { fill: #94a3b8; opacity: .55; }
.dz-znacznik { --dz: #0f766e; outline: none; }
.dz-znacznik.zagraniczna, .dz-leg-zagraniczna { --dz: #6d28d9; --dz-obszar: rgba(139, 92, 246, .35); }
.dz-leg-krajowa { --dz: #0f766e; --dz-obszar: rgba(20, 184, 166, .35); }
.del-przelacznik { display: flex; align-items: flex-start; gap: .5rem; grid-column: 1 / -1; font-weight: 600; }
.del-przelacznik input { margin-top: .2rem; }
.del-przelacznik .hint { display: block; font-weight: 400; }
.dz-znacznik.pomin { --dz: #94a3b8; }
.dz-znacznik.szkic { --dz: #7c3aed; }
.dz-granica, .dz-granica.karta { --dz: #111827; }
.dz-granica.operator { --dz: #2563eb; }
.dz-granica.szacowane { --dz: #d97706; }
.dz-zaladunek { --dz: #15803d; }
.dz-rozladunek { --dz: #c2410c; }
.dz-trzon { stroke: var(--dz, #0369a1); stroke-width: 1.4; }
.dz-granica.szacowane .dz-trzon, .dz-znacznik.szkic .dz-trzon { stroke-dasharray: 2.5 1.6; }
.dz-glowka { fill: var(--dz, #0369a1); stroke: rgba(15, 23, 42, .35); stroke-width: .7; }
.dz-glowka-znak { fill: #fff; }
.dz-tachograf .dz-glowka { fill: #fff; stroke: var(--dz); stroke-width: 1.2; }
.dz-tachograf .dz-glowka-znak { fill: var(--dz); }
.dz-kod { font-size: 6.6px; font-weight: 700; fill: #fff; stroke: none; }
.dz-nr { font-size: 8px; font-weight: 700; fill: var(--dz, #0369a1); paint-order: stroke; stroke: var(--surface); stroke-width: 2.4px; }
.dz-flaga-brak { fill: #e5e7eb; stroke: rgba(0, 0, 0, .5); stroke-width: .8; }
.dz-uchwyt { fill: transparent; }
.dz-przesuwalny { cursor: grab; }
.dz-ciagniety { cursor: grabbing; opacity: .9; }
.dz-znacznik:hover .dz-trzon, .dz-znacznik:focus .dz-trzon { stroke-width: 2.4; }
.dz-znacznik:focus-visible .dz-glowka { stroke: #2563eb; stroke-width: 2; }
.dz-prowadnica-linia { stroke: #2563eb; stroke-width: 1.2; stroke-dasharray: 3 2; }
.dz-czas { font-size: 8px; font-weight: 700; fill: #1d4ed8; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.dz-prowadnica.hidden { display: none; }
:root[data-theme="dark"] .dz-okres { fill: #2dd4bf; }
:root[data-theme="dark"] .dz-okres.zagraniczna { fill: #a78bfa; }
:root[data-theme="dark"] .dz-znacznik.krajowa, :root[data-theme="dark"] .dz-leg-krajowa { --dz: #2dd4bf; }
:root[data-theme="dark"] .dz-znacznik.zagraniczna, :root[data-theme="dark"] .dz-leg-zagraniczna { --dz: #a78bfa; }
:root[data-theme="dark"] .dz-znacznik.krajowa .dz-glowka-znak, :root[data-theme="dark"] .dz-leg-krajowa .dz-glowka-znak { fill: #0f172a; }
:root[data-theme="dark"] .dz-granica.karta { --dz: #e5e7eb; }
:root[data-theme="dark"] .dz-granica.karta .dz-kod { fill: #0f172a; }
:root[data-theme="dark"] .dz-znacznik.zagraniczna .dz-glowka-znak, :root[data-theme="dark"] .dz-leg-zagraniczna .dz-glowka-znak { fill: #0f172a; }
:root[data-theme="dark"] .dz-czas { fill: #93c5fd; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dz-okres { fill: #2dd4bf; }
  :root:not([data-theme="light"]) .dz-okres.zagraniczna { fill: #a78bfa; }
  :root:not([data-theme="light"]) .dz-znacznik.krajowa, :root:not([data-theme="light"]) .dz-leg-krajowa { --dz: #2dd4bf; }
  :root:not([data-theme="light"]) .dz-znacznik.zagraniczna, :root:not([data-theme="light"]) .dz-leg-zagraniczna { --dz: #a78bfa; }
  :root:not([data-theme="light"]) .dz-znacznik.krajowa .dz-glowka-znak, :root:not([data-theme="light"]) .dz-leg-krajowa .dz-glowka-znak { fill: #0f172a; }
  :root:not([data-theme="light"]) .dz-granica.karta { --dz: #e5e7eb; }
  :root:not([data-theme="light"]) .dz-granica.karta .dz-kod { fill: #0f172a; }
  :root:not([data-theme="light"]) .dz-znacznik.zagraniczna .dz-glowka-znak, :root:not([data-theme="light"]) .dz-leg-zagraniczna .dz-glowka-znak { fill: #0f172a; }
  :root:not([data-theme="light"]) .dz-czas { fill: #93c5fd; }
}
.modal.ai-modal {
  display: flex; flex-direction: column; overflow: hidden;
  width: 90vw; max-width: 1200px; height: 80vh; max-height: 80dvh;
}
.ai-modal .modal-head { flex: 0 0 auto; touch-action: none; padding: .65rem .8rem; }
.ai-modal .modal-body { min-height: 0; flex: 1; padding: 0; overflow: auto; }
.ai-modal-container { padding: .8rem; }
.modal.okno-ustawien-firmy { max-width: min(1240px, 96vw); }
.ustawienia-firmy-zakladki { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.ustawienia-zakladka .card { margin-bottom: .8rem; }
.ewid-niedziela { align-items: center; gap: .8rem; }
.ewid-niedziela input[type="time"] { width: 7.5rem; }
.del-polowa { border: 1px solid var(--border); border-radius: 8px; padding: .5rem .8rem .2rem; }
.del-polowa legend { font-weight: 600; padding: 0 .3rem; }
.modal-foot .btn.lewy { margin-right: auto; }
.modal-foot .btn.lewy + .btn.lewy { margin-right: 0; }
.widok-box { display: inline-flex; margin-right: .5rem; }
.widok-przelacznik { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.widok-btn { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border: 0; border-right: 1px solid var(--border);
  background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.widok-btn:last-child { border-right: 0; }
.widok-btn:hover { color: var(--text); }
.widok-btn.active { background: color-mix(in srgb, var(--accent, #2563eb) 14%, var(--surface)); color: var(--text); }
.widok-ikona { display: inline-flex; }
.widok-doba { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: 0 0 .4rem; }
.widok-doba-nazwa { min-width: 15rem; text-align: center; text-transform: capitalize; }
.del-widok { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .45rem; }
.del-widok .widok-doba { margin: 0; }
svg.tacho-wykres.tw-widok-dzien { min-width: 0; }
.tacho-wykres.tw-miesiac .twm-doba { font-size: 8.5px; font-weight: 600; fill: var(--muted); }
.tacho-wykres.tw-miesiac .twm-doba.weekend { fill: #b91c1c; }
.tacho-wykres.tw-miesiac .twm-weekend { fill: rgba(220, 38, 38, .045); }
.tacho-wykres.tw-miesiac .twm-poza { fill: var(--bg, #f1f5f9); opacity: .85; }
.tacho-wykres.tw-miesiac .twm-blok { shape-rendering: crispEdges; }
.tacho-wykres.tw-miesiac .twm-podpis { font-size: 7px; font-weight: 700; fill: #2b3440; pointer-events: none; }
.tacho-wykres.tw-miesiac .twm-czas { font-size: 7px; font-weight: 700; fill: #fff; pointer-events: none; }
.tacho-wykres.tw-miesiac .twm-czas-A { fill: #4a3a00; }
.tacho-wykres.tw-miesiac .twm-czas-R, .tacho-wykres.tw-miesiac .twm-czas-U { fill: #2b3440; }
.tacho-wykres.tw-miesiac .twm-naruszenie { fill: #e5177b; }
.tacho-wykres.tw-miesiac .twm-odp-dobowy { fill: #60a5fa; }
.tacho-wykres.tw-miesiac .twm-odp-tygodniowy { fill: #f5c518; }
.tacho-wykres.tw-miesiac .twm-rekompensata { fill: #8b5cf6; }
.tacho-wykres.tw-miesiac .twm-odp-tekst { font-size: 6.4px; font-weight: 700; fill: #231439; pointer-events: none; }
.tacho-wykres.tw-miesiac .twm-kraj-tekst { font-size: 6.4px; font-weight: 700; fill: #1e293b; pointer-events: none; }
.tacho-wykres.tw-miesiac .twm-kraj-tekst-auto { fill: #fff; }
.tacho-wykres.tw-miesiac .twm-znak-kreska { stroke: #64748b; stroke-width: .5; stroke-dasharray: 1 1; }
.tacho-wykres.tw-miesiac .twm-os { stroke: var(--muted); stroke-width: .5; opacity: .6; }
.tacho-wykres.tw-miesiac .twm-os-doba { stroke: var(--muted); stroke-width: .9; }
.tacho-wykres.tw-miesiac .twm-granica-doby { stroke: rgba(15, 23, 42, .28); stroke-width: .7; }
:root[data-theme="dark"] .tacho-wykres.tw-miesiac .twm-granica-doby { stroke: rgba(226, 232, 240, .3); }
:root[data-theme="dark"] .tacho-wykres.tw-miesiac .twm-weekend { fill: rgba(248, 113, 113, .07); }
:root[data-theme="dark"] .tacho-wykres.tw-miesiac .twm-doba.weekend { fill: #fca5a5; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tacho-wykres.tw-miesiac .twm-granica-doby { stroke: rgba(226, 232, 240, .3); }
  :root:not([data-theme="light"]) .tacho-wykres.tw-miesiac .twm-weekend { fill: rgba(248, 113, 113, .07); }
  :root:not([data-theme="light"]) .tacho-wykres.tw-miesiac .twm-doba.weekend { fill: #fca5a5; }
}
.tryb-kierowcow { display: inline-block; margin: 0 0 .25rem; font-size: 11px; }
.tryb-legenda { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .4rem 0 .6rem; font-size: 12px; }
.tryb-legenda .pill { margin-right: .3rem; }
.tabs button .licznik-zakladki { margin-left: .35rem; padding: 0 .4rem; font-size: 11px; }
.znacznik-konfliktu { white-space: nowrap; }
.ramka-konfliktow ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.ramka-konfliktow li { margin: .3rem 0; }
.ramka-konfliktow li .btn { margin-left: .25rem; }
.konflikt-kart h4 { margin: .7rem 0 .3rem; }
.konflikty-filtr { gap: 1rem; margin-bottom: .8rem; flex-wrap: wrap; }
.konflikt-opis { min-width: 18rem; }
.tacho-wykres .tw-obciete { font-size: 11px; font-weight: 600; fill: var(--amber); }
.ai-stan { gap: .4rem; }
.ai-czat {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 1rem;
  height: calc(100vh - 230px);
  min-height: 460px;
}
.ai-bok { display: flex; flex-direction: column; gap: .6rem; min-height: 0; }
.ai-lista { overflow-y: auto; display: flex; flex-direction: column; gap: .3rem; }
.ai-pozycja {
  padding: .5rem .6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.ai-pozycja:hover { border-color: var(--accent); }
.ai-pozycja.active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.ai-pozycja-tytul { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-glowna {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.ai-glowna.ai-upusc { outline: 2px dashed var(--accent); outline-offset: -6px; }
.ai-naglowek-rozmowy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--border);
}
.ai-naglowek-rozmowy h3 { margin: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.ai-wiadomosci { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .8rem; }
.ai-pusto { margin: auto; max-width: 520px; text-align: center; }
.ai-msg { max-width: min(860px, 92%); border-radius: 10px; padding: .6rem .8rem; overflow-wrap: anywhere; }
.ai-msg-ja { align-self: flex-end; background: rgba(27, 77, 228, .1); border: 1px solid rgba(27, 77, 228, .25); }
.ai-msg-ai { align-self: flex-start; background: var(--bg); border: 1px solid var(--border); }
.ai-msg.ai-pisze .ai-tekst:empty::after { content: 'Pracuję...'; color: var(--muted); }
.ai-msg.ai-pisze .ai-tekst:not(:empty)::after { content: '▍'; color: var(--accent); }
.ai-tekst p { margin: 0 0 .5rem; }
.ai-tekst p:last-child { margin-bottom: 0; }
.ai-tekst ul, .ai-tekst ol { margin: .2rem 0 .5rem 1.2rem; padding: 0; }
.ai-tekst code { font-family: var(--mono); font-size: 12px; background: rgba(127, 127, 127, .15); padding: 0 .25rem; border-radius: 4px; }
.ai-naglowek { margin: .4rem 0; font-size: 14px; }
.ai-kod {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--navy-dark);
  color: #e6edf3;
  padding: .6rem .7rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: .3rem 0 .5rem;
  white-space: pre;
}
.ai-kroki { font-size: 12px; margin-bottom: .4rem; color: var(--muted); }
.ai-kroki summary { cursor: pointer; }
.ai-kroki ol { margin: .3rem 0 0 1.2rem; padding: 0; max-height: 240px; overflow-y: auto; }
.ai-kroki li { font-family: var(--mono); overflow-wrap: anywhere; }
.ai-kroki li.ai-krok-blad { color: var(--red); }
.ai-blad { margin-top: .4rem; padding: .4rem .6rem; border-radius: 6px; background: rgba(220, 38, 38, .1); color: var(--red); white-space: pre-wrap; font-size: 12px; }
.ai-stopka { margin-top: .3rem; }
.ai-stopka:empty { display: none; }
.ai-kompozytor { border-top: 1px solid var(--border); padding: .6rem .9rem; display: flex; flex-direction: column; gap: .5rem; }
.ai-pole { width: 100%; resize: vertical; min-height: 64px; font: inherit; }
.ai-miniatury { display: flex; gap: .4rem; flex-wrap: wrap; }
.ai-miniatury:empty { display: none; }
.ai-msg .ai-miniatury { margin-bottom: .4rem; }
.ai-miniatura { position: relative; }
.ai-miniatura img { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.ai-msg .ai-miniatura img { width: 160px; height: auto; max-height: 160px; }
.ai-limity { line-height: 1.5; }
.ai-podglad { display: block; padding: 0; border: 0; border-radius: 6px; background: none; cursor: zoom-in; }
.ai-podglad:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.ai-galeria { display: grid; gap: 12px; }
.ai-galeria-obraz { display: grid; place-items: center; min-height: 120px; }
.ai-galeria-obraz img { display: block; max-width: 100%; max-height: 70vh; object-fit: contain; }
.ai-pdf { max-width: min(40vw, 320px); overflow-wrap: anywhere; text-align: left; }
.ai-kompozytor .ai-miniatura:has(.ai-pdf) { padding-inline-end: 22px; }
.ai-miniatura .ai-usun-obraz {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  border: 0; background: var(--red); color: #fff; cursor: pointer; line-height: 20px; padding: 0; font-size: 13px;
}
.ai-dziennik {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--navy-dark);
  color: #e6edf3;
  padding: .6rem .7rem;
  border-radius: 8px;
  height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0;
}
.ai-ostrzezenie:not(:empty) { color: var(--amber); }
@media (max-width: 820px) {
  .ai-czat { grid-template-columns: 1fr; height: auto; }
  .ai-lista { max-height: 180px; }
  .ai-glowna { height: 70vh; }
}
.wyk { display: grid; gap: 14px; }
.wyk-gora { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.wyk-gora .stat-rzad { margin: 0; flex: 1 1 210px; gap: 10px 20px; }
.wyk-pierscien { display: grid; justify-items: center; gap: 4px; }
.wyk-pierscien-opis { display: grid; justify-items: center; font-size: 12px; line-height: 1.3; }
.pierscien-proc { fill: var(--text); font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat { padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border); min-width: 120px; }
.stat-wartosc { font-variant-numeric: tabular-nums; }
.rank { display: grid; gap: 8px; }
.rank-tryby { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 10px; background: color-mix(in srgb, var(--muted) 12%, transparent); width: fit-content; max-width: 100%; }
.rank-tryb { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s; }
.rank-tryb:hover { color: var(--text); }
.rank-tryb[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.rank-tryb:focus-visible, .rank-wiecej:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rank-lista { display: grid; gap: 3px; }
.rank-lista.rozwinieta { max-height: 340px; overflow-y: auto; padding-right: 4px; }
.rank-wiersz { display: grid; grid-template-columns: 1.6rem minmax(0, 11rem) minmax(60px, 1fr) auto; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 4px; border-radius: 8px; transition: background .15s; }
.rank-wiersz:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.rank-poz { color: var(--muted); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.rank-nazwa { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-tor { position: relative; height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 16%, transparent); overflow: hidden; }
.rank-pasek { position: absolute; inset: 0; border-radius: 999px; background: var(--kol, var(--accent)); transform-origin: left center; transform: scaleX(var(--w, 0)); }
.rank-norma { position: absolute; top: -1px; bottom: -1px; width: 2px; margin-left: -1px; background: var(--text); opacity: .75; }
.rank-wart { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.rank-wiersz.ponad .rank-wart { color: var(--kol); }
.rank-stopka { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rank-wiecej { border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; cursor: pointer; transition: border-color .15s; }
.rank-wiecej:hover { border-color: var(--accent); }
.rank-szukaj { flex: 1 1 140px; min-width: 0; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.rank-legenda { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.rank-norma-wzor { display: inline-block; width: 2px; height: 12px; background: var(--text); opacity: .75; }
.donut-luk { transition: opacity .2s, filter .2s; }
.donut-luk.przygaszony { opacity: .28; }
.donut-luk.aktywny { filter: brightness(1.18) drop-shadow(0 0 5px rgba(0, 0, 0, .35)); }
.donut-srodek, .donut-podpis { transition: opacity .15s; }
.donut-legenda li { padding: 2px 6px; margin: 0 -6px; border-radius: 8px; cursor: default; transition: background .15s, opacity .2s; }
.donut-legenda li.aktywny { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.donut-legenda li.przygaszony { opacity: .45; }
.donut-legenda li:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.linia-box { position: relative; }
.linia-kreska { position: absolute; top: 0; bottom: 24px; width: 1px; margin-left: -.5px; background: var(--accent); opacity: 0; pointer-events: none; transition: opacity .12s; }
.linia-dymek {
  position: absolute; top: 2px; display: grid; gap: 1px; padding: 4px 9px; transform: translateX(-50%);
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s;
}
.linia-dymek span { color: var(--muted); font-size: 11px; }
.linia-box.aktywny .linia-kreska { opacity: .55; }
.linia-box.aktywny .linia-dymek { opacity: 1; }
.linia-punkt { opacity: 0; transition: opacity .15s; }
.linia-box:hover .linia-punkt { opacity: .55; }
.linia-punkt:hover { opacity: 1; }
.bars .bar { transition: background .15s, transform .15s; transform-origin: bottom; }
.bars .bar:hover { transform: scaleY(1.04); }
.lista-powiadomien li { padding: 4px 6px; margin: 0 -6px; border-radius: 8px; transition: background .15s; }
.lista-powiadomien li:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.stat-rzad.zwarty { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; }
.stat-rzad.zwarty .stat { min-width: 0; padding: 7px 11px; }
.stat-rzad.zwarty .stat-wartosc { font-size: 1.08rem; overflow-wrap: anywhere; }
.wyk .duza-liczba { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.01em; overflow-wrap: anywhere; }
.wyk .duza-liczba.mala { font-size: 1.1rem; }
.sl { display: grid; gap: 4px; }
.sl-pole {
  position: relative; display: flex; align-items: stretch; gap: var(--przerwa, 2px);
  padding-top: 22px; border-bottom: 1px solid var(--border);
  background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), color-mix(in srgb, var(--border) 55%, transparent) calc(25% - 1px) 25%);
}
.sl-kol { flex: 1 1 0; min-width: 1px; display: flex; align-items: flex-end; border-radius: 4px 4px 0 0; outline-offset: 1px; cursor: default; }
.sl-kol:focus-visible { outline: 2px solid var(--accent); }
.sl-slupek {
  display: block; width: 100%; height: calc(var(--w, 0) * 100%); min-height: 2px; border-radius: 4px 4px 0 0; transform-origin: bottom;
  background: linear-gradient(to top, color-mix(in srgb, var(--kol, var(--accent)) 55%, transparent), var(--kol, var(--accent)));
  transition: filter .15s, transform .15s;
}
.sl-kol:hover .sl-slupek, .sl-kol:focus-visible .sl-slupek { filter: brightness(1.25); }
.sl-pole.aktywny .sl-kol:not(:hover):not(:focus-visible) .sl-slupek { opacity: .55; }
.sl-kol.szczyt .sl-slupek { box-shadow: 0 0 0 1px color-mix(in srgb, var(--kol, var(--accent)) 70%, #fff), 0 -4px 14px -4px var(--kol, var(--accent)); }
.sl-srednia { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed var(--text); opacity: .6; pointer-events: none; }
.sl-srednia span { position: absolute; right: 0; bottom: 2px; padding: 0 6px; border-radius: 6px; background: var(--surface); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.sl-dymek {
  position: absolute; top: 0; display: grid; gap: 1px; padding: 4px 9px; transform: translateX(-50%); z-index: 2;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s;
}
.sl-dymek span { color: var(--muted); font-size: 11px; }
.sl-pole.aktywny .sl-dymek { opacity: 1; }
.sl-os { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); }
.uwaga-kafla { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 7px 10px; border-radius: 10px; font-size: 12px; line-height: 1.4; color: var(--text);
  background: color-mix(in srgb, var(--accent) 9%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)); }
.uwaga-ikona { flex: none; width: 16px; height: 16px; display: inline-grid; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 700; background: var(--accent); color: #fff; }
.tt-modal { width: min(1180px, 96vw); }
.tt-okno { display: flex; flex-direction: column; gap: .5rem; }
.tt-okres { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; }
.tt-okres label { display: flex; flex-direction: column; gap: 2px; }
.tt-okres input[type=date] { width: auto; }
.tt-skroty { display: flex; flex-wrap: wrap; gap: .3rem; }
.tt-skrot { border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 999px; padding: .2rem .65rem; font-size: 12px; cursor: pointer; transition: all .12s; }
.tt-skrot:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.tt-mapa { height: 46vh; min-height: 300px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.tt-tabela .table-wrap { max-height: 34vh; border: 1px solid var(--border); border-radius: 10px; }
.tt-tabela table { font-size: 12.5px; }
.tt-tabela td:nth-child(2), .tt-tabela td:nth-child(6), .tt-tabela td.num { white-space: nowrap; }
.tt-tabela tbody tr.tt-aktywny { background: color-mix(in srgb, var(--accent) 22%, transparent); outline: 1px solid var(--accent); }
.tt-tabela tr.tt-bez { opacity: .6; font-style: italic; cursor: default; }
.tt-czynnosci { display: inline-flex; flex-wrap: wrap; gap: .25rem .7rem; vertical-align: middle; }
.tt-czynnosci > span { display: inline-flex; gap: .25rem; align-items: center; white-space: nowrap; }
.tt-porownanie:empty { display: none; }
.tt-od-punktu { border-top: 1px solid var(--border); margin-top: .35rem; padding-top: .35rem; }
.tt-ostrzezenie { margin-top: 4px; padding: .3rem .5rem; border-radius: 6px; background: color-mix(in srgb, var(--amber) 22%, transparent); color: var(--text); }
.tt-planowanie { display: flex; flex-direction: column; gap: 4px; }
.tt-planowanie .row-tight { flex-wrap: wrap; }
.tt-planowanie .btn { white-space: nowrap; }
.tt-zrodlo { margin-top: 4px; }
.tt-zrodlo summary { cursor: pointer; color: var(--accent); }
.tt-kraje { overflow-wrap: anywhere; }
.tt-postep { height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; transition: opacity .3s; }
.tt-postep > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2563eb, #22d3ee); transition: width .25s; }
.tt-glowa { display: block; width: 14px; height: 14px; margin: 2px; border-radius: 50%; background: #22d3ee; border: 2px solid #fff; box-shadow: 0 0 0 0 rgba(34, 211, 238, .7); animation: tt-puls 1s infinite; }
@keyframes tt-puls { 0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, .7); } 100% { box-shadow: 0 0 0 14px rgba(34, 211, 238, 0); } }
