:root {
  --header: rgba(244, 247, 250, 0.88);
  --header-solid: #f4f7fa;
  --header-fg: #5b6b79;
  --page: #f5f8fa;
  --card: #ffffff;
  --text: #181c32;
  --muted: #a1a5b7;
  --line: #eff2f5;
  --primary: #4e73df;
  --primary-dark: #7a94e8;
  --primary-btn: #4e73df;
  --primary-btn-fg: #fff;
  --primary-btn-hover: #3b5cc9;
  --danger: #f1416c;
  --aside-w: 220px;
  --aside-mini-w: 48px;
  --aside-compact-w: 180px;
  --header-h: 64px;
  --ctrl-h: 32px;
  --ctrl-radius: 6px;
  --ctrl-border: #e4e6ef;
  --radius: 12px;
  --shadow: 0 0 20px 0 rgba(76, 87, 125, 0.08);
  /* Admindek dark sidebar (#263544) */
  --aside: #263544;
  --aside-2: #263544;
  --aside-text: #a9b7d0;
  --aside-hover: rgba(0, 0, 0, 0.1);
  --aside-active: #4680ff;
  --aside-active-bg: rgba(0, 0, 0, 0.1);
  --aside-heading: #e8edf7;
  --aside-border: transparent;
  --aside-on-fg: #ffffff;
  --aside-icon: #a9b7d0;
  --aside-shadow: 1px 0 20px 0 #263544;
}
/* Menu: light */
html[data-menu-color="light"],
html[data-menu-theme="light"] {
  --aside: #ffffff;
  --aside-2: #ffffff;
  --aside-text: #5b6b79;
  --aside-hover: #f3f5f7;
  --aside-active: #4680ff;
  --aside-active-bg: rgba(70, 128, 255, 0.1);
  --aside-heading: #8995a3;
  --aside-border: #eff2f5;
  --aside-on-fg: #1e293b;
  --aside-icon: #5b6b79;
  --aside-shadow: 1px 0 20px 0 rgba(38, 53, 68, 0.12);
}
/* Menu: brand */
html[data-menu-color="brand"] {
  --aside: linear-gradient(180deg, #4e73df 0%, #3b5cc9 100%);
  --aside-2: #3b5cc9;
  --aside-text: rgba(255, 255, 255, 0.78);
  --aside-hover: rgba(255, 255, 255, 0.12);
  --aside-active: #ffffff;
  --aside-active-bg: rgba(255, 255, 255, 0.16);
  --aside-heading: rgba(255, 255, 255, 0.92);
  --aside-border: transparent;
  --aside-on-fg: #ffffff;
  --aside-icon: rgba(255, 255, 255, 0.85);
  --aside-shadow: 1px 0 20px 0 rgba(78, 115, 223, 0.35);
}
/* Topbar colors */
html[data-topbar-color="light"] {
  --header: rgba(244, 247, 250, 0.88);
  --header-solid: #f4f7fa;
  --header-fg: #5b6b79;
}
html[data-topbar-color="dark"] {
  --header: rgba(38, 53, 68, 0.88);
  --header-solid: #263544;
  --header-fg: #e8edf7;
}
html[data-topbar-color="brand"] {
  --header: linear-gradient(90deg, rgba(78, 115, 223, 0.92) 0%, rgba(59, 92, 201, 0.92) 100%);
  --header-solid: #4e73df;
  --header-fg: #ffffff;
}
/* Color scheme: dark page */
html[data-color-scheme="dark"] {
  --page: #151c27;
  --card: #1e293b;
  --text: #e8edf7;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.1);
  --ctrl-border: rgba(255, 255, 255, 0.14);
  --shadow: 0 0 24px 0 rgba(0, 0, 0, 0.35);
  --input-bg: #151c27;
  --panel: #1e293b;
  --panel-2: #243447;
  --hover: rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}
/* Dark page + ciemne menu: ten sam kolor co toolbar, bez cienia */
html[data-color-scheme="dark"]:not([data-menu-color="light"]):not([data-menu-theme="light"]):not([data-menu-color="brand"]) {
  --aside: var(--header-solid);
  --aside-2: var(--header-solid);
  --aside-shadow: none;
  --aside-border: transparent;
}
html[data-color-scheme="dark"][data-topbar-color="light"] {
  --header: rgba(30, 41, 59, 0.9);
  --header-solid: #1e293b;
  --header-fg: #e8edf7;
}
html[data-sidenav-size="compact"] {
  --aside-w: var(--aside-compact-w);
}

* { box-sizing: border-box; }
html {
  color-scheme: light;
}
html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #181c32;
  color: var(--text);
  background: #f5f8fa;
  background: var(--page);
}
body { overflow: hidden; height: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
code { font-size: 12px; background: #f1f3f8; padding: 1px 6px; border-radius: 4px; }

/* Login */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f5f8fa 0%, #eef3f7 100%);
  padding: 24px;
}
.login-card {
  width: 400px;
  max-width: 100%;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 36px 32px;
}
.login-logo {
  display: block;
  max-width: 180px;
  max-height: 50px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 8px;
}
.login-card label {
  display: block;
  margin: 16px 0 6px;
  font-size: 13px;
  font-weight: 500;
  color: #3f4254;
}
.login-card input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ctrl-border);
  border-radius: var(--ctrl-radius);
  background: #fff;
  color: var(--text);
  font: inherit;
}
.login-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.18);
}
.login-card .chk { margin-top: 14px; }
.error { color: var(--danger); min-height: 1.2em; font-size: 13px; margin: 10px 0 0; }

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}

.btn-primary {
  margin-top: 0;
  height: var(--ctrl-h);
  padding: 0 12px;
  border: 1px solid var(--primary-btn);
  border-radius: 6px;
  background: var(--primary-btn);
  color: var(--primary-btn-fg);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.login-card .btn-primary { margin-top: 20px; height: 44px; font-size: 14px; }

/* Multi jak Chosen w WWW (chipy + lista zostaje otwarta, checkmark) */
.mpick-src { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.mpick { position: relative; width: 100%; min-width: 180px; font-size: 13px; z-index: 1; }
.mpick.is-open { z-index: 80; }
.mpick-box {
  min-height: 36px; padding: 5px 28px 5px 8px; border: 1px solid #d1d5db; border-radius: 6px;
  background: #fff; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; cursor: text;
}
.mpick.is-open .mpick-box { border-color: #93c5fd; box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.35); }
.mpick::after {
  content: ""; position: absolute; right: 12px; top: 16px; border: 5px solid transparent; border-top-color: #9ca3af; pointer-events: none;
}
.mpick-ph { color: #6b7280; }
.mpick-q {
  border: 0; outline: none; flex: 1; min-width: 80px; height: 24px; font: inherit; font-size: 13px; background: transparent;
}
.mpick-chip {
  position: relative; display: inline-block; margin: 0; padding: 3px 22px 3px 8px;
  background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 4px; color: #374151; font-size: 12px; line-height: 16px;
}
.mpick-x {
  position: absolute; right: 4px; top: 2px; border: 0; background: none; cursor: pointer; color: #9ca3af; font-size: 14px; line-height: 1;
}
.mpick-drop {
  display: none; position: absolute; left: 0; right: 0; top: 100%; margin-top: 2px;
  background: #fff; border: 1px solid #5897fb; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.18);
  max-height: 280px; overflow: auto; z-index: 90;
}
.mpick.is-open .mpick-drop { display: block; }
.mpick-opt {
  display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 28px 7px 10px;
  font: inherit; font-size: 13px; cursor: pointer; position: relative;
}
.mpick-opt:hover { background: #f3f4f6; }
.mpick-opt.on { background: #e6f4ff; color: #1677ff; }
.mpick-opt.on:hover { background: #bae0ff; color: #0958d9; }
.mpick-opt.on::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 5px; height: 10px; margin-top: -7px;
  border: solid #1677ff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.mpick-empty { padding: 10px; color: #6b7280; font-size: 13px; }
.mpick-group {
  padding: 8px 10px 2px;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.02em;
}
.integ-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.integ-card { margin: 0; }
.integ-card-head { display: flex; gap: 12px; align-items: flex-start; }
.integ-card-head h3 { margin: 0 0 4px; font-size: 16px; }
.integ-ico {
  width: 36px; height: 36px; border-radius: 8px; background: #eef2ff; color: #3730a3;
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.integ-features { margin: 8px 0 12px; font-size: 12px; }
.integ-actions { display: flex; gap: 8px; align-items: center; }
.integ-actions .btn-primary { text-decoration: none; display: inline-block; padding: 8px 14px; }
.ok-msg { color: #047857; margin: 0 0 10px; }
.drv-list { max-height: 320px; overflow: auto; margin: 0; padding: 0; list-style: none; }
.drv-list li { padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.zp-file-links { margin: 8px 0 12px; padding: 8px 10px; background: #f8fafc; border-radius: 8px; }
.zp-file-links ul { margin: 6px 0 0; }
.integ-setup-steps { margin: 8px 0 12px; padding-left: 1.25rem; line-height: 1.55; }
.integ-setup-steps li { margin-bottom: 6px; }
.integ-code {
  display: inline-block; margin-top: 4px; padding: 4px 8px; background: #f3f4f6;
  border-radius: 4px; font-size: 12px; word-break: break-all;
}
.integ-cfg-form { margin-top: 10px; }
/* W dialogach .form-grid input styluje też .mpick-q → podwójna ramka; wyłącz */
.form-grid .mpick-q,
.form-grid .mpick-box input.mpick-q {
  width: auto;
  height: 24px;
  min-height: 0;
  border: 0 !important;
  border-radius: 0;
  padding: 0;
  box-shadow: none !important;
  background: transparent;
  flex: 1;
  min-width: 80px;
}
.form-grid .mpick-q:focus,
.form-grid .mpick-box input.mpick-q:focus {
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
}
.modal-card { overflow: visible; }
.modal-card .mpick.is-open { z-index: 90; }
.modal-card .fk-other-proj-modal .um-field {
  position: relative;
}
.modal-card .fk-other-proj-modal .um-combo.is-open {
  z-index: 140;
}
.modal-card .fk-other-proj-modal .um-combo-list {
  z-index: 150;
}
.modal-card .fk-other-proj-modal .um-combo-q:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: #f5f8fa;
}
.flt-row:has(.mpick.is-open) { z-index: 70; position: relative; }

.flt-wrap { position: relative; }
.flt-pop {
  position: absolute; right: 0; top: calc(100% + 6px); width: 420px; max-width: calc(100vw - 32px);
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 12px 40px rgba(15,23,42,.16);
  padding: 12px; z-index: 200; overflow: visible;
}
.flt-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 600; font-size: 13px; }
.flt-head button { border: 0; background: none; color: var(--primary); cursor: pointer; font: inherit; font-size: 13px; }
.flt-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: start; margin-bottom: 10px; }
.flt-type { font-size: 12px; font-weight: 600; color: #6b7280; padding-top: 10px; }
.flt-badge {
  display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; align-items: center; justify-content: center;
}
.flt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e4e6ef;
  border-radius: 6px;
  background: #fff;
  color: #3f4254;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.flt-btn:hover {
  background: #f9f9f9;
  border-color: #b5b5c3;
}
.flt-btn.has-filters {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}
.flt-btn-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M3 5h18l-7 8v5l-4 2v-7L3 5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M3 5h18l-7 8v5l-4 2v-7L3 5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn-primary:hover { background: var(--primary-btn-hover); border-color: var(--primary-btn-hover); color: var(--primary-btn-fg); }
.btn-danger {
  margin-top: 8px;
  height: var(--ctrl-h);
  padding: 0 12px;
  border: 1px solid #b91c1c;
  border-radius: 6px;
  background: #dc2626;
  color: #fff;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-danger:hover { background: #b91c1c; }
.btn-danger:disabled { opacity: 0.6; cursor: default; }
.settings-danger {
  border-color: #fecaca;
  background: #fff7f7;
}
.settings-danger h3 { color: #991b1b; }
.btn-ghost {
  height: var(--ctrl-h);
  padding: 0 12px;
  border: 1px solid var(--ctrl-border);
  border-radius: 6px;
  background: #fff;
  color: #3f4254;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.btn-ghost:hover { background: #f9f9f9; }

/* Shell */
.shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative;
}
.aside {
  width: var(--aside-w);
  flex-shrink: 0;
  background: var(--aside);
  color: var(--aside-text);
  display: flex;
  flex-direction: column;
  z-index: 30;
  border-right: 1px solid var(--aside-border);
  box-shadow: var(--aside-shadow);
}
.aside-brand {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 12px;
  border-bottom: 1px solid var(--aside-border);
}
.aside-logo {
  max-height: 50px;
  height: auto;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: 10px;
}
/* Domyślne logo SBM na ciemnym / brand menu — jasna wersja bez psucia custom logo */
html:not([data-menu-color="light"]):not([data-menu-theme="light"]) .aside-logo.is-default-logo,
html[data-menu-color="brand"] .aside-logo.is-default-logo,
html[data-menu-color="dark"] .aside-logo.is-default-logo {
  filter: brightness(0) invert(1);
  opacity: 0.96;
}
html[data-menu-color="light"] .aside-logo.is-default-logo {
  filter: none;
  opacity: 1;
}
.aside-mini-btn {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--aside-icon);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.aside-mini-btn:hover { background: var(--aside-hover); color: var(--aside-on-fg); }
.aside-mini-btn svg { width: 18px; height: 18px; }
.aside-brand-text {
  color: var(--aside-on-fg);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.aside-nav {
  flex: 1;
  overflow: auto;
  padding: 16px 16px 24px;
}
.aside-heading {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aside-heading);
  padding: 16px 12px 8px;
}
.aside-section { margin: 0; }
.aside-section-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aside-heading);
  padding: 16px 12px 8px;
  text-align: left;
}
.aside-section-toggle:hover { color: var(--aside-text); }
.aside-section-toggle span { flex: 1; min-width: 0; }
.aside-section-chevron {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.15s ease;
}
.aside-section.is-open .aside-section-chevron { transform: rotate(90deg); }
.aside-section-body { display: none; }
.aside-section.is-open .aside-section-body { display: block; }
.aside-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: 8px;
  color: var(--aside-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.aside-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
  color: var(--aside-icon);
}
.aside-link:hover {
  background: var(--aside-hover);
  color: var(--aside-on-fg);
}
.aside-link:hover svg { color: var(--aside-on-fg); }
.aside-link.on {
  background: var(--aside-active-bg);
  color: var(--aside-active);
  box-shadow: inset 3px 0 0 var(--aside-active);
}
.aside-link.on svg { color: var(--aside-active); opacity: 1; }
.fk_page[hidden] { display: none !important; }
.fk_page.is-on { display: block; }
#fkKsefMsg.error { color: #b42318; }
.aside-parent {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--aside-text);
  text-align: left;
}
.aside-parent:hover { background: var(--aside-hover); color: var(--aside-on-fg); }
.aside-parent.on {
  background: var(--aside-active-bg);
  color: var(--aside-active);
  box-shadow: inset 3px 0 0 var(--aside-active);
}
.aside-parent-label { flex: 1; min-width: 0; }
.aside-chevron {
  width: 14px;
  height: 14px;
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform 0.15s ease;
}
.aside-group.is-open .aside-chevron { transform: rotate(90deg); }
.aside-subs { display: none; }
.aside-group.is-open .aside-subs { display: block; }
.aside-sub {
  display: block;
  margin: 0 12px 2px 44px;
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--aside-text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}
.aside-sub:hover { background: var(--aside-hover); color: var(--aside-on-fg); }
.aside-sub.on {
  background: var(--aside-active-bg);
  color: var(--aside-active);
}

/* Panel wyglądu (jak Hyper Theme Settings) */
.ui-theme-panel { max-width: 560px; }
.ui-theme-sec { margin: 0 0 18px; }
.ui-theme-sec h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
}
.ui-theme-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.ui-theme-pick {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 108px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  text-align: center;
}
.ui-theme-pick:disabled { opacity: 0.55; cursor: not-allowed; }
.ui-theme-swatch {
  height: 72px;
  border-radius: 8px;
  border: 2px solid var(--ctrl-border);
  overflow: hidden;
  background: #fff;
  display: flex;
  box-sizing: border-box;
}
.ui-theme-pick.is-on .ui-theme-swatch {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.22);
}
.ui-theme-pick:hover .ui-theme-swatch { border-color: #c9cdd8; }
.ui-theme-pick.is-on:hover .ui-theme-swatch { border-color: var(--primary); }
.ui-theme-pick strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.ui-theme-pick.is-on strong { color: var(--text); font-weight: 600; }
.ui-sw-v { display: flex; width: 100%; height: 100%; }
.ui-sw-side {
  width: 28%;
  background: #263544;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 5px;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}
.ui-sw-side.is-light { background: #f4f7fa; }
.ui-sw-side.is-brand { background: linear-gradient(180deg, #4e73df, #3b5cc9); }
.ui-sw-side.is-narrow { width: 18%; padding: 6px 3px; }
.ui-sw-side.is-mini { width: 12%; padding: 4px 2px; }
.ui-sw-side.is-hidden { display: none; }
.ui-sw-dot {
  display: block;
  height: 5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
}
.ui-sw-side.is-light .ui-sw-dot { background: #263544; }
.ui-sw-line {
  display: block;
  height: 4px;
  border-radius: 2px;
  border: 1.5px solid rgba(169, 183, 208, 0.45);
}
.ui-sw-side.is-light .ui-sw-line { border-color: rgba(91, 107, 121, 0.35); }
.ui-sw-side.is-brand .ui-sw-line { border-color: rgba(255, 255, 255, 0.35); }
.ui-sw-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f5f8fa;
}
.ui-sw-main.is-dark-page { background: #1a2332; }
.ui-sw-top {
  height: 12px;
  background: rgba(244, 247, 250, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 3px;
}
.ui-sw-top.is-dark { background: #263544; }
.ui-sw-top.is-brand { background: linear-gradient(90deg, #4e73df, #3b5cc9); }
.ui-sw-chip {
  width: 8px;
  height: 5px;
  border-radius: 2px;
  border: 1.5px solid rgba(91, 107, 121, 0.35);
  margin-left: auto;
}
.ui-sw-top.is-dark .ui-sw-chip,
.ui-sw-top.is-brand .ui-sw-chip { border-color: rgba(255, 255, 255, 0.4); }
.ui-sw-body { flex: 1; margin: 4px; border-radius: 3px; background: #fff; }
.ui-sw-main.is-dark-page .ui-sw-body { background: #243447; }
.ui-sw-h { flex-direction: column; }
.ui-sw-h .ui-sw-top { height: 14px; }
.ui-theme-btns {
  display: inline-flex;
  border: 1px solid var(--ctrl-border);
  border-radius: 8px;
  overflow: hidden;
}
.ui-theme-btn {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.ui-theme-btn.is-on {
  background: rgba(78, 115, 223, 0.12);
  color: var(--primary);
}
.ui-theme-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ui-theme-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.ui-theme-switch-row label { font-size: 15px; font-weight: 700; margin: 0; }
.ui-theme-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
#uiThemeHint { min-height: 1.2em; margin-top: 8px; }

/* legacy aliases */
.menu-theme-picks { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 8px; }
.menu-theme-pick {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  width: 148px; padding: 10px; border: 1px solid var(--ctrl-border); border-radius: 10px;
  background: var(--card); cursor: pointer; font: inherit; color: var(--text); text-align: left;
}
.menu-theme-pick.is-on { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.2); }
.menu-theme-swatch { height: 56px; border-radius: 8px; border: 1px solid rgba(0,0,0,.06); display: flex; overflow: hidden; }
.menu-theme-swatch-aside { width: 34%; background: #263544; }
.menu-theme-swatch-aside.is-light { background: #ffffff; border-right: 1px solid #eff2f5; }
.menu-theme-swatch-main { flex: 1; background: linear-gradient(180deg, #f5f8fa 0%, #eef3f7 100%); }
.menu-theme-pick strong { font-size: 13px; font-weight: 600; }
.menu-theme-pick span { font-size: 12px; color: var(--muted); line-height: 1.35; }

.wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  color: #181c32;
  color: var(--text);
  background: #f5f8fa;
  background: var(--page);
}
.header {
  height: var(--header-h);
  background: var(--header);
  color: var(--header-fg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  box-shadow: none;
  z-index: 40;
  /* Lekko przezroczysty + blur — treść widać pod spodem przy scrollu */
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}
html[data-topbar-color="dark"] .header,
html[data-topbar-color="brand"] .header {
  border-bottom-color: transparent;
}
.header-spacer {
  flex: 1;
  min-width: 0;
}
.header-back {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--header-fg) 35%, transparent);
  border-radius: 8px;
  background: transparent;
  color: var(--header-fg);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.header-back:hover { background: color-mix(in srgb, var(--header-fg) 12%, transparent); }
.header-back[hidden] { display: none !important; }
.header-back.is-arrow {
  width: 32px;
  padding: 0;
  font-size: 18px;
}
.header-doc {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  color: var(--header-fg);
}
.header-doc[hidden] { display: none !important; }
.header:has(.header-doc:not([hidden])) .header-spacer { flex: 0 0 12px; }
.header-doc-ico {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  opacity: 0.9;
}
.header-doc-ico svg { width: 18px; height: 18px; display: block; }
.header-doc-type {
  flex: 0 0 auto;
  font-size: calc(15.6px - 2pt);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
  line-height: 1;
}
.header-doc-sep {
  flex: 0 0 auto;
  width: 1px;
  height: 16px;
  background: currentColor;
  opacity: 0.35;
}
.header-doc-sep[hidden] { display: none !important; }
.header-doc-name {
  min-width: 0;
  font-size: calc(19.5px - 2pt);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-right { flex-shrink: 0; }
.header .icon-btn {
  color: inherit;
}
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}
html[data-topbar-color="dark"] .theme-toggle-btn:hover,
html[data-topbar-color="brand"] .theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.theme-toggle-btn svg { width: 18px; height: 18px; }
.theme-toggle-btn .icon-moon { display: none; }
html[data-color-scheme="dark"] .theme-toggle-btn .icon-sun { display: none; }
html[data-color-scheme="dark"] .theme-toggle-btn .icon-moon { display: block; }

.notif-wrap { position: relative; flex-shrink: 0; }
.notif-btn { position: relative; }
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #f1416c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}
.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 360px;
  max-width: min(360px, calc(100vw - 24px));
  max-height: min(420px, 70vh);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(24, 28, 50, 0.16);
  z-index: 80;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.notif-panel-head strong { font-size: 14px; }
.notif-read-all {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.notif-read-all:hover { text-decoration: underline; }
.notif-list {
  overflow: auto;
  flex: 1;
  padding: 6px 0;
}
.notif-empty { padding: 24px 16px; text-align: center; }
.notif-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-left: 3px solid transparent;
}
.notif-item:hover { background: rgba(78, 115, 223, 0.06); }
.notif-item.is-unread {
  background: rgba(78, 115, 223, 0.08);
  border-left-color: var(--primary);
}
.notif-item-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.notif-item-body {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.notif-item-meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.platform-org-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
  font-size: 13px;
  color: var(--muted, #5e6278);
}
.platform-org-wrap.hidden { display: none; }
.platform-org-wrap select {
  height: 32px;
  border-radius: 8px;
  border: 1px solid #d8dbe6;
  padding: 0 8px;
  min-width: 180px;
}
.acl-hidden { display: none !important; }
.aside-link[hidden],
.aside-heading[hidden],
.aside-sub[hidden] { display: none !important; }
.pp-perm-matrix { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow: auto; }
.pp-perm-group { margin: 16px 0 6px; font-size: 13px; font-weight: 700; }
.pp-perm-group .muted { font-weight: 500; color: #6b7280; }
.pp-perm-sec { margin: 12px 0 4px; font-size: 13px; }
.pf-mod-group { margin: 16px 0 8px; }
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-wrap { position: relative; }
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.user-avatar:hover { filter: brightness(1.06); }
.user-avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.25); }
.user-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.user-avatar-img[hidden] { display: none !important; }
.user-avatar.has-photo #userInitials[hidden] { display: none !important; }
.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(24, 28, 50, 0.18);
  padding: 8px;
  z-index: 50;
}
.user-menu-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.user-menu-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.user-menu-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  word-break: break-word;
}
.user-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 10px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.user-menu button:hover { background: #f5f8fa; }
.user-menu-danger { color: var(--danger) !important; }
.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: #7e8299;
  display: none;
  align-items: center;
  justify-content: center;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: #f1f1f2; }

.content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  /* padding-top zawiera wysokość paska — treść scrolluje się pod półprzezroczysty header */
  padding: calc(var(--header-h) + 12px) 16px 24px;
}
.page { max-width: none; }
.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
}
.settings-stack-wide { max-width: none; }
.org-mod-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.org-mod-group {
  border: 1px solid #eef0f4;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fafbff;
}
.org-mod-group h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
}
.org-mod-group .muted { margin: 0 0 8px; }
.org-mod-list { display: flex; flex-direction: column; gap: 4px; }
.settings-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 20px;
}
.settings-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.settings-card .form-grid { margin-bottom: 12px; }
.settings-card .table { margin: 0 0 12px; }
.settings-card .muted { margin: 0 0 12px; }
.lic-seats-input {
  width: 72px;
  padding: 6px 8px;
}
.lic-org-actions {
  white-space: nowrap;
}
.lic-org-table td .muted { margin: 4px 0 0; }
.org-logo-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.org-logo-preview-wrap {
  position: relative;
  width: 180px;
  height: 50px;
  border: 1px dashed #cdd2de;
  border-radius: 8px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 8px;
  box-sizing: border-box;
  overflow: hidden;
}
.org-logo-preview {
  max-width: 180px;
  max-height: 50px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
  display: block;
}
.org-logo-actions { flex: 1 1 200px; min-width: 180px; }
.org-logo-actions .muted { margin-top: 10px; }

/* Koszty wspólne */
.kw-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px;
}
.kw-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 24px;
}
.kw-toolbar-right { display: flex; gap: 8px; }
.kw-toolbar label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.kw-toolbar input[type="number"] {
  width: 100px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
.kw-list-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.kw-doc-year {
  font-size: 16px;
  color: var(--text);
}
.kw-toolbar-left .kw-hint { margin: 0; max-width: 520px; }
.kw-list-table { font-size: 13px; width: 100%; }
.kw-list-table th,
.kw-list-table td { padding: 10px 12px; }
.kw-list-table thead th {
  background: #6c757d;
  color: #fff;
  text-align: right;
  white-space: nowrap;
}
.kw-list-table thead th:first-child { text-align: left; }
.kw-list-row { cursor: pointer; }
.kw-list-row:hover { background: #f1faff; }
.kw-list-row:focus { outline: 2px solid #009ef7; outline-offset: -2px; }
.kw-list-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.kw-toolbar-right { display: flex; gap: 8px; align-items: flex-end; }
.kw-typ {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.kw-typ legend {
  font-size: 13px;
  color: var(--muted);
  padding: 0;
  margin: 0 0 4px;
  width: 100%;
}
.kw-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px;
}
.kw-summary > div { display: flex; flex-direction: column; gap: 4px; }
.kw-summary strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.kw-hint { margin: 0; font-size: 12px; line-height: 1.45; }
.kw-hint code { font-size: 11px; }
.kw-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 4px;
}
.kw-tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
}
.kw-tab:hover { color: var(--text); }
.kw-tab.on {
  color: var(--text);
  border-bottom-color: #2563eb;
}
.kw-tab-body { display: flex; flex-direction: column; gap: 16px; }
.kw-budget-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.kw-budget-table td.num.kw-odch-plus { color: #0bb783; font-weight: 600; }
.kw-budget-table td.num.kw-odch-minus { color: #f1416c; font-weight: 600; }
.kw-budget-table input[type="number"] {
  width: 100%;
  max-width: 140px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  text-align: right;
}
.kw-toolbar-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
}
.kw-stawka-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .kw-stawka-layout { grid-template-columns: 1fr; }
}
.kw-year-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: #f7f9fc;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.kw-year-box > div { display: flex; flex-direction: column; gap: 2px; }
.kw-year-box strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.kw-table tr.kw-wynik-row th,
.kw-table tr.kw-wynik-row td,
.kw-budget-table tr.kw-wynik-row th,
.kw-budget-table tr.kw-wynik-row td {
  background: #6c757d;
  color: #c5dfeb;
}
.kw-table tr.kw-wynik-row th:first-child { background: #6c757d; color: #c5dfeb; }
.kw-table tr.kw-cum th,
.kw-table tr.kw-cum td { color: #0060a0; }
.kw-scroll { overflow-x: auto; }
.kw-table { min-width: 1100px; font-size: 12px; }
.kw-table th, .kw-table td { padding: 14px; white-space: nowrap; vertical-align: middle; line-height: 1.35; }
.kw-table th:first-child, .kw-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--card);
  min-width: 220px;
  z-index: 1;
}
.kw-table thead th { text-align: right; background: #6c757d; color: #fff; }
.kw-table thead th:first-child { background: #6c757d; color: #fff; }
.kw-table td.num, .kw-table .kw-sum { text-align: right; font-variant-numeric: tabular-nums; }
.kw-table tr.kw-strong th, .kw-table tr.kw-strong td { font-weight: 600; }
.kw-table tr.kw-strong:not(.kw-wynik-row) th:first-child,
.kw-table tr.kw-strong:not(.kw-wynik-row) td { background: #f7f9fc; }

/* Import Norma */
.norma-shell { max-width: 1100px; }
.norma-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.norma-title {
  margin: 0;
  flex: 1 1 auto;
  font-size: 18px;
  font-weight: 600;
}
.norma-status {
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef3ff;
  color: #3f4254;
  font-size: 13px;
  margin-bottom: 12px;
}
.norma-status.is-error { background: #fff5f8; color: var(--danger, #f1416c); }
.norma-status.is-ok { background: #e8fff3; color: #0a7a3e; }
.norma-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px 18px;
  margin-bottom: 14px;
}
.norma-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}
.norma-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 14px;
}
.norma-field label {
  display: block;
  font-size: 11px;
  color: var(--muted, #7e8299);
  margin-bottom: 4px;
}
.norma-field input,
.norma-field select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border, #e4e6ef);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  background: #fff;
}
.norma-field input[readonly] { background: #f9f9fb; color: #5e6278; }
.norma-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}
.norma-file { position: relative; overflow: hidden; display: inline-flex; align-items: center; cursor: pointer; }
.norma-file input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.norma-table-wrap { max-height: min(70vh, 720px); overflow: auto; }
.norma-table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.norma-table-head h3 { margin: 0; }
.norma-table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.norma-seg {
  display: inline-flex;
  border: 1px solid var(--border, #e4e6ef);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.norma-seg-btn {
  border: 0;
  background: transparent;
  color: #7e8299;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.norma-seg-btn + .norma-seg-btn { border-left: 1px solid var(--border, #e4e6ef); }
.norma-seg-btn.is-on,
.norma-seg-btn.is-on:hover {
  background: #e8f0fe;
  color: #3148a8;
  font-weight: 600;
  box-shadow: inset 0 0 0 0.5px #3148a8;
}
.norma-dzial td {
  background: #f1f3f8;
  font-weight: 600;
  color: #3f4254;
}
.norma-table tr.norma-rms td { color: #5e6278; }
.norma-table tr.norma-rms td:nth-child(2),
.norma-table tr.norma-rms td:nth-child(3) { padding-left: 18px; }
.norma-table.is-flat th { font-size: 10px; white-space: nowrap; }
.norma-table.is-flat td { font-size: 11px; }
.data-table th.num,
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Hierarchia widoku: mały moduł + duży tytuł formularza (SBM) */
.sbm-view-head {
  margin: 0 0 14px;
  flex: 0 0 auto;
}
/* Nazwa zestawienia jest na górnym pasku. W treści nie ma etykiety modułu ani dużego tytułu. */
.sbm-view-head,
.page.is-doc-open > .sbm-view-head { display: none; }
.kw-list-title { display: none; }
.sbm-mod-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3148a8;
  line-height: 1.2;
}
.sbm-mod-kicker::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: #3148a8;
}
.sbm-view-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.sbm-toolbar {
  align-items: center;
  gap: 10px;
}
.sbm-toolbar-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}
.sbm-search-wrap {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 340px;
  display: block;
}
.sbm-search-ico {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a5b7' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.sbm-search {
  width: 100%;
  padding-left: 32px !important;
}
.sbm-crit {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sbm-crit-btn {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e1e3ea;
  border-radius: 6px;
  background: #fff;
  color: #5e6278;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sbm-crit-ico {
  font-size: 11px;
  font-weight: 700;
  color: #3148a8;
  opacity: 0.85;
}
.sbm-crit-ico-user,
.sbm-crit-ico-org {
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: #3148a8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm0 2c-4 0-8 2-8 4v2h16v-2c0-2-4-4-8-4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm0 2c-4 0-8 2-8 4v2h16v-2c0-2-4-4-8-4z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.sbm-crit-ico-org {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 21V7l9-4 9 4v14h-6v-6H9v6H3zm4-2h2v-4h6v4h2V8.5L12 6 7 8.5V19z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 21V7l9-4 9 4v14h-6v-6H9v6H3zm4-2h2v-4h6v4h2V8.5L12 6 7 8.5V19z'/%3E%3C/svg%3E");
}
.sbm-crit-btn:hover { border-color: #b5b5c3; color: #181c32; }
.sbm-crit-btn.is-active {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3148a8;
}
.sbm-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}
.sbm-flt-secondary .flt-btn {
  height: 32px;
  font-size: 12px;
  color: #7e8299;
  border-color: #e8eaf0;
  background: #f9f9fb;
}
.sbm-primary-action {
  flex: 0 0 auto;
  height: var(--ctrl-h);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(49, 72, 168, 0.18);
}
.proj-table .proj-name-cell { min-width: 180px; }
.proj-table .proj-col-members { min-width: 140px; max-width: 280px; }
.proj-table .prp-status-pill {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 11px;
}
#tab-projects .sbm-toolbar-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
#tab-projects #projViewModes { flex: 0 1 auto; }
#tab-projects #projTreeBtns { flex: 0 0 auto; }
@media (max-width: 1200px) {
  .proj-table .proj-col-members { display: none; }
}
@media (max-width: 1100px) {
  .proj-table .proj-col-lead { display: none; }
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  min-height: var(--ctrl-h);
  overflow: visible;
  position: relative;
  z-index: 4;
  flex-wrap: wrap;
}
.page-head > .btn-primary,
.page-head > .btn-ghost { flex: 0 0 auto; margin-top: 0; }
.page-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 0;
}
.fk-inv-tools { flex-wrap: wrap; }
.page-head-left > .btn-primary,
.page-head-left > .btn-ghost { flex: 0 0 auto; margin-top: 0; }
.page-head .www-tabs { margin: 0; border-bottom: 0; }
a.doc-link {
  color: #4e73df;
  text-decoration: none;
  font-weight: 500;
}
a.doc-link:hover { text-decoration: underline; }
#fkProjLinkWrap { margin-top: 6px; }
#fkProjLinkWrap[hidden] { display: none; }
.field-doc-link { display: block; margin-top: 6px; font-size: 13px; line-height: 1.35; }
.field-doc-link[hidden] { display: none !important; }
td .field-doc-link, .um-split-pick .field-doc-link, .um-mpk-field .field-doc-link { margin-top: 4px; }
tr.prp-mpk-link-focus > td { box-shadow: inset 0 0 0 2px #4e73df; }

.card-list { display: grid; gap: 12px; }
.item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.item b { display: block; font-size: 15px; margin-bottom: 4px; }
.item small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin: -2px 0 4px; }
.item span { color: var(--muted); font-size: 13px; }

.empty-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.empty-card h3 { margin: 0 0 8px; }
.empty-card p { margin: 0; color: #7e8299; line-height: 1.55; }

.aside-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 25;
}

@media (max-width: 991px) {
  body { overflow: auto; }
  .icon-btn { display: inline-flex; }
  .aside {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .shell.aside-open .aside { transform: none; }
  .shell.aside-open .aside-backdrop { display: block; }
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
@media (max-width: 900px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
}
.stat b { display: block; font-size: 26px; margin-top: 6px; }
.stat span { font-size: 13px; color: var(--muted); }
.head-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.head-actions select, .page-head select {
  height: var(--ctrl-h);
  border: 1px solid var(--ctrl-border);
  border-radius: var(--ctrl-radius);
  padding: 0 10px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  min-width: 160px;
  color: var(--text);
}
.head-actions select:focus, .page-head select:focus,
.head-actions input[type="date"]:focus, .page-head input[type="date"]:focus,
.search:focus, .form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.16);
}
.head-date-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.head-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.head-actions input[type="date"],
.page-head input[type="date"] {
  height: var(--ctrl-h);
  border: 1px solid var(--ctrl-border);
  border-radius: var(--ctrl-radius);
  padding: 0 10px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  width: 10.5rem;
  min-width: 0;
}
.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
}
.scroll-x { overflow-x: auto; }
.item { cursor: pointer; }
.item:hover { outline: 1px solid #dbe4ec; }
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f3f8;
  color: #5e6278;
  margin-right: 6px;
}
.badge.ok { background: #e8fff3; color: #50cd89; }
.badge.warn { background: #fff8dd; color: #ffc700; }
.badge.run { background: #e0e7ff; color: #3730a3; }
.item-actions { float: right; display: flex; gap: 6px; }
.item-actions button { margin: 0; height: var(--ctrl-h); padding: 0 12px; font-size: 13px; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(24, 28, 50, 0.45);
  z-index: 4600;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow: auto;
}
.modal-card {
  width: 560px;
  max-width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}
.modal-card h3 { margin: 0 0 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.modal-actions .btn-primary { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: 12px; font-weight: 600; color: #5e6278; margin-bottom: 4px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  height: var(--ctrl-h);
  border: 1px solid var(--ctrl-border);
  border-radius: var(--ctrl-radius);
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: #fff;
}
.form-grid textarea { height: auto; min-height: 80px; padding: 8px 10px; resize: vertical; }
.kh-lookup-row {
  display: flex;
  gap: 6px;
  align-items: center;
  width: 100%;
}
.kh-lookup-row input { flex: 1 1 auto; min-width: 0; }
.kh-lookup-btn {
  flex: 0 0 auto;
  height: var(--ctrl-h);
  padding: 0 10px;
  border: 1px solid #c5d4f7;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e3a8a;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.kh-lookup-btn:hover:not(:disabled) { background: #dbeafe; }
.kh-lookup-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.form-grid .kh-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}
.form-grid label.chk,
.form-grid label.embz-param-chk {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 500;
  color: #5e6278;
  cursor: pointer;
  user-select: none;
}
.form-grid p.f-tpl-hint {
  margin: 6px 0 0;
}
.form-grid p.f-tpl-hint label.chk {
  display: inline-flex;
  margin: 0 0 0 8px;
  vertical-align: -3px;
}
.form-grid label.chk input[type="checkbox"],
.form-grid label.embz-param-chk input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  margin: 0;
  accent-color: var(--primary, #009ef7);
  cursor: pointer;
  flex-shrink: 0;
}
.form-grid .chk input { height: auto; width: auto; }
.form-grid input:disabled, .form-grid select:disabled {
  background: #f4f5f8;
  color: #5e6278;
  cursor: not-allowed;
}

.gantt { min-width: 700px; }
.gantt-head, .gantt-row { display: flex; align-items: center; }
.gantt-lab { width: 220px; flex-shrink: 0; font-size: 12px; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-track { flex: 1; position: relative; height: 28px; background: #f5f8fa; border-bottom: 1px solid #eef2f6; }
.gantt-bar {
  position: absolute;
  top: 6px;
  height: 16px;
  border-radius: 4px;
  background: #009ef7;
  min-width: 4px;
}
.gantt-bar.st-oprac { background: #ffc700; }
.gantt-bar.st-real { background: #009ef7; }
.gantt-bar.st-zak { background: #50cd89; }
.gantt-scale { display: flex; font-size: 10px; color: var(--muted); padding-left: 220px; gap: 0; }
.gantt-scale span { flex: 1; text-align: center; }

.occ-table { border-collapse: collapse; font-size: 12px; min-width: 800px; }
.occ-table th, .occ-table td { border: 1px solid #eef2f6; padding: 6px 8px; text-align: center; }
.occ-table th { background: #f5f8fa; font-weight: 600; }
.occ-table td.name { text-align: left; white-space: nowrap; font-weight: 500; }
.occ-legend { margin: -8px 0 12px; }
.cell-hot { background: #f1416c22; }
.cell-mid { background: #ffc70033; }
.cell-ok { background: #50cd8922; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); background: transparent; }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); color: var(--text); }

.seg { display: flex; background: #f5f8fa; border-radius: 8px; padding: 3px; gap: 2px; height: var(--ctrl-h); box-sizing: border-box; }
.seg-btn {
  border: 0; background: transparent; height: 100%; padding: 0 12px; border-radius: 6px;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.seg-btn.on {
  background: #e8f0fe;
  color: #3148a8;
  box-shadow: inset 0 0 0 0.5px #3148a8;
}

/* Umowy (profil / projekt): Przychód / Koszt */
#umKatSwitch,
#prpUmKat {
  background: #e8f0fe;
  border: 1px solid #c9d7f5;
}
#umKatSwitch .seg-btn,
#prpUmKat .seg-btn {
  color: #3d527f;
}
#umKatSwitch .seg-btn.on,
#prpUmKat .seg-btn.on {
  background: #c5d6f6;
  color: #1e3a8a;
  box-shadow: 0 1px 2px rgba(49, 72, 168, 0.12);
}
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #5e6278; white-space: nowrap; }
.chk input { width: auto; }
.inv-view-opt.hidden { display: none !important; }
.cal-label { font-weight: 600; min-width: 140px; text-align: center; }
.prp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 900px) { .prp-stats { grid-template-columns: 1fr 1fr; } }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: #eef2f6; border: 1px solid #eef2f6; border-radius: 8px; overflow: hidden; }
.cal-dow { background: #f5f8fa; font-size: 11px; font-weight: 600; color: var(--muted); padding: 8px; text-align: center; }
.cal-cell { background: #fff; min-height: 92px; padding: 6px; font-size: 11px; }
.cal-cell.out { background: #fafbfc; color: #c0c4d0; }
.cal-cell .d { font-weight: 700; margin-bottom: 4px; }
.cal-cell.today { outline: 2px solid var(--primary); outline-offset: -2px; }
.cal-ev { display: block; background: #e1f0ff; color: #009ef7; border-radius: 4px; padding: 1px 4px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cal-ev.obc { background: #e8fff3; color: #50cd89; }
.week-grid { width: 100%; border-collapse: collapse; font-size: 12px; }
.week-grid th, .week-grid td { border: 1px solid #eef2f6; padding: 8px; text-align: center; }
.week-grid th { background: #f5f8fa; }
.week-grid td.name { text-align: left; font-weight: 500; white-space: nowrap; }
.week-h { font-weight: 700; }
.comments { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.comment { font-size: 13px; padding: 8px 0; border-bottom: 1px solid #f3f5f8; }
.comment .muted { display: block; font-size: 11px; }
.modal-card.wide { width: 720px; }
.modal-card.xl { width: 980px; }
.modal-card.xl #modalBody { max-height: calc(100vh - 220px); overflow: auto; padding-right: 4px; }
.form-grid.cols3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 720px) {
  .form-grid.cols3 { grid-template-columns: 1fr 1fr; }
}
.umowa-form .form-sec {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.umowa-form .form-sec:first-child { border-top: 0; padding-top: 0; }
.umowa-form .hint { font-size: 11px; font-weight: 500; color: #a1a5b7; margin-top: 4px; }
.umowa-form .vat-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.umowa-form .vat-table th {
  text-align: left; color: #5e6278; font-weight: 600; padding: 4px 4px 6px; font-size: 11px;
}
.umowa-form .vat-table td { padding: 3px 4px; }
.umowa-form .vat-table .nr { width: 28px; color: #a1a5b7; font-weight: 600; }
.umowa-form .vat-table input,
.umowa-form .vat-table select {
  width: 100%; height: var(--ctrl-h); border: 1px solid var(--ctrl-border);
  border-radius: var(--ctrl-radius); padding: 0 8px; font: inherit; font-size: 13px;
  color: var(--text); background: var(--input-bg, var(--card));
}
.umowa-form .totals {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 8px;
}
.umowa-form .tot {
  background: var(--page); border-radius: 8px; padding: 8px 10px;
  color: var(--text);
}
.umowa-form .tot label { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.umowa-form .tot b { font-size: 14px; color: var(--text); }
.umowa-form .kh-preview {
  font-size: 12px; color: var(--muted); line-height: 1.5; min-height: 1.5em;
}
.umowa-form .child-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 8px; background: var(--card);
  color: var(--text);
}
.umowa-form .child-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
  font-size: 12px; font-weight: 700;
}
.umowa-form .addr-box.hidden { display: none; }
.umowa-form .godz-box.hidden { display: none; }
.um-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 32px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px 20px;
  color: var(--text);
}
@media (max-width: 980px) {
  .um-cols { grid-template-columns: 1fr; }
}
.umowa-form .um-col { min-width: 0; }
.umowa-form .um-block { margin-bottom: 14px; }
.umowa-form .um-sec {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding: 0 0 8px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.umowa-form .um-sec-body { display: flex; flex-direction: column; gap: 10px; }
.umowa-form .um-sec-plain { padding-top: 0; }
.umowa-form .um-field { min-width: 0; }
.umowa-form .um-field > label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.umowa-form .um-field input,
.umowa-form .um-field select,
.umowa-form .um-field textarea,
.umowa-form .um-repr-row input {
  width: 100%;
  height: var(--ctrl-h);
  border: 1px solid var(--ctrl-border);
  border-radius: var(--ctrl-radius);
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--input-bg, var(--card));
}
.umowa-form .um-field textarea {
  height: auto;
  min-height: 96px;
  padding: 8px 10px;
  resize: vertical;
}
.umowa-form .um-field input[type="checkbox"] {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  box-shadow: none;
}
.umowa-form .um-field input:focus,
.umowa-form .um-field select:focus,
.umowa-form .um-field textarea:focus,
.umowa-form .um-repr-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.16);
}
.umowa-form .um-field input[readonly] { background: var(--page); color: var(--muted); }
.umowa-form .um-field.kh-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}
.umowa-form .um-field.kh-flags > label { margin-bottom: 0; font-weight: 500; color: #3f4254; }
.umowa-form .um-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.umowa-form .vat-table { margin-top: 4px; }
.umowa-form .vat-table thead th {
  background: var(--page);
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}
.umowa-form .vat-table thead th:first-child { border-radius: 0; }
.umowa-form .um-sums { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.umowa-form .um-sums-sub {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.umowa-form .um-sum label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.umowa-form .um-sum-val {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--ctrl-h);
  padding: 0 10px;
  border: 1px solid var(--ctrl-border);
  border-radius: var(--ctrl-radius);
  background: var(--page);
  font-size: 13px;
  color: var(--text);
}
.umowa-form .um-sum-val b { font-size: 13px; font-weight: 600; color: var(--text); }
.umowa-form .um-sum-val span { color: var(--muted); font-size: 12px; }
.umowa-form .um-pay {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.umowa-form .um-repr-box {
  border: 1px solid var(--ctrl-border);
  border-radius: var(--ctrl-radius);
  padding: 8px 10px;
  background: var(--input-bg, var(--card));
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.umowa-form .um-repr-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
  align-items: center;
}
.umowa-form .um-repr-row span {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 520px) {
  .umowa-form .um-repr-row { grid-template-columns: 1fr; gap: 2px; }
}
.umowa-form .um-podzial {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px 20px;
  color: var(--text);
}
.umowa-form .um-podzial-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.umowa-form .um-kind {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 0;
  margin: 0;
}
.umowa-form .um-kat-seg {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: var(--ctrl-h);
}
.umowa-form .um-kat-seg .seg-btn {
  flex: 1 1 0;
  width: 50%;
  justify-content: center;
  text-align: center;
}
.umowa-form .um-kind-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #3f4254;
  white-space: nowrap;
  line-height: 1.2;
}
.umowa-form .um-kind-opt input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #3148a8;
}
.umowa-form .um-combo {
  position: relative;
  z-index: 1;
}
.umowa-form .um-combo.is-open {
  z-index: 120;
}
.umowa-form .um-combo-inline {
  min-width: 160px;
}
.umowa-form .um-combo-q {
  width: 100%;
}
.umowa-form .um-split-pick {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.umowa-form .um-split-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 0 0 auto;
}
.umowa-form .um-split-actions .um-link {
  font-size: 12px;
  white-space: nowrap;
}
.umowa-form .um-split-pick .um-combo {
  flex: 1;
}
.umowa-form .um-combo-list {
  position: absolute;
  z-index: 130;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 220px;
  overflow: auto;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(24, 28, 50, 0.12);
  padding: 4px;
}
.umowa-form .um-combo-list.um-combo-list-fixed {
  position: fixed;
  z-index: 5000;
  right: auto;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(24, 28, 50, 0.18);
}
.umowa-form tr:has(.um-combo.is-open),
.umowa-form td:has(.um-combo.is-open),
.umowa-form .um-field:has(.um-combo.is-open),
.umowa-form .um-split-pick:has(.um-combo.is-open) {
  position: relative;
  z-index: 110;
}
.umowa-form .um-podzial:has(.um-combo.is-open),
.umowa-form .um-block:has(.um-combo.is-open) {
  position: relative;
  z-index: 100;
  overflow: visible;
}
.umowa-form .um-combo-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  color: #181c32;
  cursor: pointer;
}
.umowa-form .um-combo-item:hover { background: #f1f3f8; }
.umowa-form .um-combo-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #a1a5b7;
  line-height: 1.3;
  margin-bottom: 2px;
}
.umowa-form .um-combo-path span {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.umowa-form .um-combo-sep {
  color: #d1d5db;
  max-width: none;
}
.umowa-form .um-combo-title {
  font-size: 13px;
  font-weight: 600;
  color: #181c32;
  line-height: 1.35;
}
.umowa-form .um-combo-empty {
  padding: 10px;
  font-size: 12px;
  color: #a1a5b7;
}
.umowa-form .um-link {
  border: 0;
  background: none;
  padding: 0;
  color: #0060a0;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.umowa-form .um-link:hover { text-decoration: underline; }
.umowa-form .um-split-wrap {
  overflow-x: auto;
  overflow-y: visible;
}
.umowa-form .um-split-wrap:has(.um-combo.is-open) {
  overflow: visible;
}
.umowa-form .um-draft:has(.um-combo.is-open),
.umowa-form .um-draft-card:has(.um-combo.is-open),
.umowa-form .prp-table-wrap:has(.um-combo.is-open) {
  overflow: visible;
  position: relative;
  z-index: 100;
}
.umowa-form .um-tr-list-draft tr:has(.um-combo.is-open),
.umowa-form .um-tr-list-draft td:has(.um-combo.is-open) {
  position: relative;
  z-index: 110;
}
.umowa-form .um-draft .um-combo.is-open {
  z-index: 120;
}
.umowa-form .um-draft .um-combo-list {
  min-width: 260px;
  max-height: 280px;
  background: #fff;
}
.umowa-form .um-split .nr {
  width: 28px;
  color: #7e8299;
  font-weight: 600;
  font-size: 12px;
}
.umowa-form .um-split th.col-pct,
.umowa-form .um-split td.col-pct {
  width: 56px;
  max-width: 64px;
  text-align: right;
  white-space: nowrap;
}
.umowa-form .um-split th.col-amt,
.umowa-form .um-split td.col-amt {
  width: 128px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.umowa-form .um-split .s-pct,
.umowa-form .um-split .s-um,
.umowa-form .um-split .s-amt,
.umowa-form .um-split .s-an,
.umowa-form .um-split .s-tot {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.umowa-form .um-split td.col-pct input.s-pct {
  width: 48px;
  min-width: 0;
  padding: 0 6px;
  margin-left: auto;
  display: block;
}
.umowa-form .um-split td.col-amt input.s-um,
.umowa-form .um-split td.col-amt input.s-amt,
.umowa-form .um-split td.col-amt input.s-an,
.umowa-form .um-split td.col-amt input.s-tot {
  width: 100%;
  max-width: 120px;
  margin-left: auto;
  display: block;
}
.umowa-form .um-split-pick {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.umowa-form .um-split .s-ref { flex: 1; min-width: 160px; }
.umowa-form .um-split input,
.umowa-form .um-split select {
  width: 100%;
  height: var(--ctrl-h);
  border: 1px solid var(--ctrl-border);
  border-radius: var(--ctrl-radius);
  padding: 0 8px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: #fff;
}
.umowa-form .um-split input[readonly] { background: #f4f5f8; color: #5e6278; }
.umowa-form .um-split tfoot td {
  font-weight: 600;
  border-top: 1px solid #eef0f4;
  background: #fafbfc;
  color: #3f4254;
}
.umowa-form #umAddSplit,
.umowa-form #fkAddSplit { margin-top: 10px; }
.um-kpi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 720px) {
  .um-kpi { grid-template-columns: 1fr; }
}
#umErr { margin: 0 0 8px; }
#umBody { padding-bottom: 24px; }
.badge.layer { background: #f8f5ff; color: #7239ea; }
.add-wrap { position: relative; }
.add-wrap .btn-primary { margin-top: 0; height: var(--ctrl-h); }
.add-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px;
  background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(24,28,50,.18);
  padding: 8px; z-index: 40;
}
.add-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 10px 12px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer;
}
.add-menu button:hover { background: #f5f8fa; }
.head-actions.wrap { flex-wrap: wrap; justify-content: flex-end; }
.search {
  height: var(--ctrl-h); border: 1px solid var(--ctrl-border); border-radius: var(--ctrl-radius); padding: 0 12px;
  font: inherit; font-size: 13px; min-width: 180px; background: #fff; color: var(--text);
}
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.kanban-col { background: #f5f8fa; border-radius: 12px; padding: 10px; min-height: 140px; }
.kanban-col h4 { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.kanban-card {
  background: #fff; border-radius: 8px; padding: 10px; margin-bottom: 8px;
  box-shadow: var(--shadow); cursor: grab; font-size: 13px;
}
.kanban-card b { display: block; margin-bottom: 4px; }
.kanban-col.drag { outline: 2px dashed var(--primary); }
.group-h { font-size: 13px; font-weight: 700; margin: 18px 0 8px; color: #5e6278; }
.occ-table td[data-emp] { cursor: pointer; }
.occ-table td[data-emp]:hover { filter: brightness(0.96); }
.search-wrap { position: relative; }
.search-hits {
  position: absolute; top: calc(100% + 6px); right: 0; width: 360px; max-height: 360px; overflow: auto;
  background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(24,28,50,.18); padding: 8px; z-index: 45;
}
.search-hits button {
  display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px;
  border-radius: 8px; font: inherit; cursor: pointer;
}
.search-hits button:hover { background: #f5f8fa; }
.search-group { font-size: 11px; font-weight: 700; color: var(--muted); padding: 8px 10px 4px; text-transform: uppercase; }
.gantt-bar { cursor: ew-resize; }
.week-grid td[data-day] { cursor: pointer; }

.www-tabs {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #e5e7eb;
  margin: 0 0 10px;
  gap: 2px;
  padding: 4px 0 0;
}
.www-tab {
  appearance: none; border: 0; background: transparent;
  height: 36px; padding: 0 14px; font: inherit; font-size: 13px; font-weight: 500;
  color: #6b7280; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px;
  border-radius: 8px 8px 0 0; box-sizing: border-box;
}
.www-tab:hover { color: #3148a8; background: rgba(49, 72, 168, 0.06); }
.www-tab.on {
  color: #3148a8;
  background: #e8f0fe;
  border-bottom-color: #3148a8;
  font-weight: 600;
}

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--text); background: transparent; }
.data-table th {
  text-align: left; font-size: 11px; font-weight: 600; color: var(--muted);
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--page); white-space: nowrap;
  vertical-align: middle;
}
.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  line-height: 1.35;
  color: var(--text);
}
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: rgba(78, 115, 223, 0.08); }
.data-table tbody tr:hover td { background: transparent; color: var(--text); }
.data-table tbody tr.um-group-row,
.data-table tbody tr.um-group-row:hover {
  cursor: pointer;
  background: rgba(78, 115, 223, 0.06);
}
.data-table tbody tr.um-group-row:hover td { background: rgba(78, 115, 223, 0.1); }
.data-table .um-group-row td {
  padding: 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
  background: rgba(78, 115, 223, 0.05);
  font-weight: 600;
  color: var(--text);
}
.data-table .um-group-row td.um-group-amt {
  padding: 14px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}
.data-table .um-group-row td.um-group-pad {
  padding: 14px;
}
.um-group-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 14px;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}
.um-group-toggle:hover { background: rgba(78, 115, 223, 0.08); }
.um-group-row.um-group-depth-1 td:first-child .um-group-toggle { padding-left: 28px; }
.um-group-row.um-group-depth-2 td:first-child .um-group-toggle { padding-left: 44px; }
.um-group-row.um-group-depth-3 td:first-child .um-group-toggle { padding-left: 60px; }
.um-group-row.um-group-depth-4 td:first-child .um-group-toggle { padding-left: 76px; }
#tab-tranches th.tr-pick,
#tab-tranches td.tr-pick { width: 36px; text-align: center; padding-left: 8px; padding-right: 4px; }
#tab-tranches .tr-pair-msg { color: #b42318; font-size: 13px; font-weight: 600; }
#tab-tranches .tr-unpair {
  border: 0; background: transparent; color: #4e73df; font: inherit;
  font-size: 12px; font-weight: 600; cursor: pointer; margin-left: 8px;
}
#tab-tranches td.tr-plus { color: #1e7a46; }
#tab-tranches td.tr-minus { color: #b42318; }
#tab-tranches tr.tr-pair-line[data-depth="2"] td:first-child { padding-left: 48px; }
#tab-tranches tr.tr-pair-line[data-depth="3"] td:first-child { padding-left: 64px; }
#tab-tranches tr.tr-pair-line[data-depth="4"] td:first-child { padding-left: 80px; }
#trPairBtn[hidden] { display: none !important; }
.um-group-chevron {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.um-group-chevron svg {
  width: 12px;
  height: 12px;
  display: block;
  transition: transform 0.15s ease;
}
.um-group-row.is-collapsed .um-group-chevron svg { transform: rotate(90deg); }
.um-group-row:not(.is-collapsed) .um-group-chevron svg { transform: rotate(180deg); }
.um-group-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
}
.um-group-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  margin-left: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.um-group-sums {
  display: none;
}
.um-group-sum {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.um-group-sum em {
  margin-right: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
}
.um-tree-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.um-tree-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--ctrl-border);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}
.um-tree-btn:hover {
  background: rgba(78, 115, 223, 0.08);
  border-color: var(--ctrl-border);
  color: var(--text);
}
.um-tree-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}
.gantt_toolbar .gantt_tree_btns > button.um-tree-btn {
  width: 32px;
  min-width: 32px;
  padding: 0;
  color: #3f4254;
}
.um-view-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--ctrl-border);
  border-radius: 8px;
  background: var(--page);
}
.um-view-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.um-view-btn:hover {
  background: rgba(78, 115, 223, 0.08);
  color: var(--text);
}
.um-view-btn.on,
.um-view-btn.on:hover {
  color: #3148a8;
  background: #e8f0fe;
  box-shadow: inset 0 0 0 0.5px #3148a8;
}
.ctrl-group {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
  flex: 0 0 auto;
}
.ctrl-group:has(> .hidden),
.ctrl-group:has(> [hidden]) { display: none !important; }
.ctrl-group-label {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  color: #6b7280;
  padding: 0 2px;
}
.ctrl-group-box {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  background: #f7f9fc;
  border: 1px solid rgb(220, 226, 235);
  border-radius: 7px;
}
.page-head,
.page-head-left,
.head-actions,
.sbm-toolbar,
.sbm-toolbar-main,
.prp-section-head,
.pp-section-head,
.cp-toolbar,
.cp-toolbar-left,
.cp-toolbar-right,
.zm-toolbar,
.zm-toolbar-left,
.zm-view-bar,
.embz-toolbar,
.gantt_toolbar,
.gantt_header_row,
.gantt_toolbar_right,
.obl-toolbar,
.obl-toolbar-left,
.obl-toolbar-right,
.cal-tab-bar-actions {
  align-items: flex-end;
}
.gantt_toolbar .ctrl-group-box input[type="button"],
.ctrl-group-box .obl-view-btn,
.ctrl-group-box .um-view-btn,
.ctrl-group-box .cp-view-btn,
.ctrl-group-box .seg-btn {
  height: 26px;
  min-height: 26px;
  padding: 0 6px;
}
.gantt_toolbar .ctrl-group-box .gantt_planowane_switch,
.ctrl-group-box .embz-switch,
.ctrl-group-box .obl-weekend-toggle {
  height: 26px;
  gap: 4px;
  padding: 0 6px 0 4px;
  border-color: transparent;
  background: transparent;
}
.ctrl-group-box.um-view-seg,
#tab-occupancy #occLoadMode.ctrl-group-box {
  height: auto;
}
.tzr-status {
  font-size: 13px;
  color: var(--muted, #6c757d);
  margin: 0 0 8px;
  min-height: 1.2em;
}
.tzr-status.is-error { color: #b42318; }
#tzrList .tzr-table { width: 100%; }
#tzrList .tzr-table th {
  padding: 12px 14px;
  vertical-align: middle;
}
#tzrList .tzr-table td {
  padding: 14px;
  vertical-align: middle;
  line-height: 1.35;
}
#tzrList .tzr-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
#tzrList .tzr-sum { font-weight: 700; }
#tzrList .tzr-group-row td {
  background: #f8f9fb;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  padding: 14px;
  border-bottom: 1px solid #eef0f4;
  vertical-align: middle;
}
#tzrList .tzr-group-row.tzr-depth-2 td { background: #f8f9fb; font-weight: 600; }
#tzrList .tzr-group-row.tzr-depth-3 td { background: #f8f9fb; font-weight: 600; }
#tzrList .tzr-group-row:hover td { background: #f4f6fa; }
#tzrList .tzr-indent {
  display: inline-block;
  width: 14px;
  vertical-align: middle;
}
#tzrList .tzr-group-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
#tzrList .tzr-group-row .um-group-chevron {
  display: inline-flex;
}
#tzrList .tzr-group-row.is-collapsed .um-group-chevron svg { transform: rotate(90deg); }
#tzrList .tzr-group-row:not(.is-collapsed) .um-group-chevron svg { transform: rotate(180deg); }
#tzrList .tzr-leaf .tzr-cat-col { color: #98a2b3; font-size: 12px; }
#tzrViewModes[hidden] { display: none !important; }
#tzrMonthNav[hidden] { display: none !important; }

#tab-trash .trash-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
#tab-trash .trash-status {
  font-size: 13px;
  color: var(--muted, #6c757d);
  margin: 0 0 8px;
  min-height: 1.2em;
}
#tab-trash .trash-status.is-error { color: #b42318; }
#tab-trash .trash-sel-count {
  font-size: 13px;
  color: #3b6ea5;
  font-weight: 600;
  align-self: center;
}
#trashTable {
  width: 100%;
  border-collapse: collapse;
}
#trashTable thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9f9f9;
  font-weight: 600;
  font-size: calc(11px + 2pt);
  color: #7e8299;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #eff2f5;
  white-space: nowrap;
  vertical-align: middle;
}
#trashTable tbody td,
#trashTable tfoot td {
  padding: 14px;
  border-bottom: 1px solid #f4f6f8;
  vertical-align: middle;
  font-size: 10pt;
  color: #3f4254;
  line-height: 1.35;
}
#trashTable tbody tr.trash-row {
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}
#trashTable tbody tr.trash-row:hover td {
  background: #f9f9f9;
}
#trashTable tbody tr.trash-row.embz-selected td {
  background: #dbeafe !important;
}
#trashTable tbody tr.trash-row.embz-selected:hover td {
  background: #bfdbfe !important;
}
#trashTable .trash-empty {
  text-align: center;
  color: var(--muted, #6c757d);
  padding: 24px 12px !important;
}
#trashTable thead th.trash-sort-th {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
#trashTable thead th.trash-sort-th:hover {
  color: #3f4254;
}
#trashTable thead th.trash-sort-th.is-sorted {
  color: #1e4f8c;
}
#trashTable .trash-doc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
#trashTable .trash-form-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #7e8299;
}
#trashTable .trash-doc-detail {
  font-size: 10pt;
  color: #3f4254;
  word-break: break-word;
}
#trashTable .trash-col-project { white-space: nowrap; }
#trashTable .trash-col-date {
  width: 148px;
  white-space: nowrap;
}
#trashTable .trash-col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
#trashTable .trash-row-btn {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  margin-left: 6px;
}
#trashTable .trash-row-btn:first-child { margin-left: 0; }

.tzr-month-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.tzr-month-label {
  min-width: 9.5rem;
  font-weight: 600;
  cursor: default;
}
#tab-contracts.ctr-fs-open {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2000 !important;
  display: flex !important;
  flex-direction: column;
  margin: 0 !important;
  padding: 16px 20px 12px !important;
  background: #fff;
  overflow: hidden;
}
#tab-contracts.ctr-fs-open .page-head { flex: 0 0 auto; margin-bottom: 10px; }
#tab-contracts.ctr-fs-open #ctrList {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}
body.ctr-fs-open { overflow: hidden !important; }
.table-wrap {
  background: var(--card); border-radius: 8px; border: 1px solid var(--line); overflow: auto;
  color: var(--text);
}
/* Zestawienia: opis kolumn zostaje przy przewijaniu strony. */
#tab-timesheet-reports #tzrList.table-wrap,
#tab-wynik .wyn-wrap {
  overflow: visible;
}
#tzrList .tzr-table,
.wyn-table {
  border-collapse: separate;
  border-spacing: 0;
}
#tzrList .tzr-table thead th,
.wyn-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--card, #fff);
  box-shadow: inset 0 -1px 0 var(--line, #e4e6ef);
}

.gantt-www { overflow: auto; background: #fff; border: 1px solid #eef0f4; border-radius: 8px; font-size: 12px; }
.gantt-www-scale { display: flex; position: sticky; top: 0; z-index: 2; background: #fff; border-bottom: 1px solid #e4e6ef; }
.gantt-www-lab {
  width: 260px; flex-shrink: 0; position: sticky; left: 0; z-index: 1;
  background: #fff; padding: 4px 8px; border-right: 1px solid #eef0f4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gantt-www-scale .gantt-www-lab { z-index: 3; font-weight: 600; color: #7e8299; }
.gantt-www-days { display: flex; }
.gantt-www-d {
  flex: 0 0 auto; text-align: center; border-right: 1px solid #f3f5f8;
  color: #9ca3af; font-size: 10px; line-height: 18px;
}
.gantt-www-d.we { background: #f8fafc; }
.gantt-www-d.mo { border-left: 1px solid #e5e7eb; font-weight: 600; color: #6b7280; }
.gantt-www-row { display: flex; min-height: 28px; border-bottom: 1px solid #f3f5f8; }
.gantt-www-row.proj { background: #f5f3ff; }
.gantt-www-row.proj .gantt-www-lab { font-weight: 700; color: #5b21b6; background: #f5f3ff; }
.gantt-www-row.own .gantt-www-lab { color: #14532d; padding-left: 22px; font-size: 11px; }
.gantt-www-track { position: relative; height: 28px; flex: 1; min-width: 0; }
.gantt-www-bar {
  position: absolute; top: 6px; height: 16px; border-radius: 3px; min-width: 4px;
  background: #d0e3f3; border: 1px solid #a8c5dd; box-sizing: border-box;
}
.gantt-www-bar.proj { background: #ddd6fe; border-color: #c4b5fd; top: 7px; height: 14px; }
.gantt-www-bar.own { background: #c7e9d5; border-color: #86efac; top: 8px; height: 12px; }
.gantt-www-bar.over { background: #ffedd5; border-color: #fdba74; }
.gantt-www-bar.parent { background: #d1fae5; border-color: #6ee7b7; }
.gantt-www-today {
  position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; z-index: 1; pointer-events: none;
}

.occ-table .cell-hot { background: #fecaca; }
.occ-table .cell-mid { background: #fed7aa; }
.occ-table .cell-ok { background: #bbf7d0; }
.occ-table .cell-empty { background: #fff; color: #d1d5db; }

.header-right .btn-ghost { height: var(--ctrl-h); }
.header-right .search { min-width: 220px; }

@media (min-width: 992px) {
  .shell.is-aside-mini .aside {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: var(--aside-mini-w);
    overflow: hidden;
    transition: width 0.16s ease;
  }
  .shell.is-aside-mini .wrapper { margin-left: var(--aside-mini-w); }
  .shell.is-aside-mini .aside-brand { padding: 0; justify-content: center; }
  .shell.is-aside-mini .aside-logo,
  .shell.is-aside-mini .aside-brand .brand-mark,
  .shell.is-aside-mini .aside-brand-text,
  .shell.is-aside-mini .aside-heading,
  .shell.is-aside-mini .aside-section-toggle,
  .shell.is-aside-mini .aside-subs,
  .shell.is-aside-mini .aside-sub,
  .shell.is-aside-mini .aside-parent-label,
  .shell.is-aside-mini .aside-chevron { display: none; }
  .shell.is-aside-mini .aside-mini-btn { margin-left: 0; }
  .shell.is-aside-mini .aside-mini-btn svg { transform: rotate(180deg); }
  .shell.is-aside-mini .aside-nav { padding: 8px 4px 24px; }
  /* Mini: ikony z sekcji zawsze widoczne, nawet gdy sekcja zwinięta */
  .shell.is-aside-mini:not(.is-aside-hover) .aside-section-body { display: block; }
  .shell.is-aside-mini .aside-link {
    justify-content: center;
    gap: 0;
    padding: 10px 0;
    font-size: 0;
    overflow: hidden;
  }
  .shell.is-aside-mini .aside-parent { justify-content: center; }
  .shell.is-aside-mini.is-aside-hover .aside {
    width: var(--aside-w);
    overflow: auto;
    box-shadow: 12px 0 32px rgba(24, 28, 50, 0.12);
    z-index: 40;
  }
  .shell.is-aside-mini.is-aside-hover .aside .aside-brand {
    justify-content: flex-start;
    padding: 0 10px 0 12px;
  }
  .shell.is-aside-mini.is-aside-hover .aside .aside-logo { display: block; }
  .shell.is-aside-mini.is-aside-hover .aside .aside-brand .brand-mark { display: inline-flex; }
  .shell.is-aside-mini.is-aside-hover .aside .aside-brand-text,
  .shell.is-aside-mini.is-aside-hover .aside .aside-heading,
  .shell.is-aside-mini.is-aside-hover .aside .aside-section-toggle,
  .shell.is-aside-mini.is-aside-hover .aside .aside-parent-label,
  .shell.is-aside-mini.is-aside-hover .aside .aside-chevron { display: block; }
  .shell.is-aside-mini.is-aside-hover .aside .aside-section-toggle { display: flex; }
  .shell.is-aside-mini.is-aside-hover .aside .aside-parent-label { display: inline; }
  .shell.is-aside-mini.is-aside-hover .aside .aside-section:not(.is-open) .aside-section-body { display: none; }
  .shell.is-aside-mini.is-aside-hover .aside .aside-section.is-open .aside-section-body { display: block; }
  .shell.is-aside-mini.is-aside-hover .aside .aside-group.is-open .aside-subs { display: block; }
  .shell.is-aside-mini.is-aside-hover .aside .aside-sub { display: block; }
  .shell.is-aside-mini.is-aside-hover .aside .aside-mini-btn { margin-left: auto; }
  .shell.is-aside-mini.is-aside-hover .aside .aside-mini-btn svg { transform: none; }
  .shell.is-aside-mini.is-aside-hover .aside .aside-nav { padding: 16px 16px 24px; }
  .shell.is-aside-mini.is-aside-hover .aside .aside-link {
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 12px;
    font-size: 13px;
  }
}
@media (max-width: 991px) {
  .aside-mini-btn { display: none; }
}

/* Layout mode: boxed */
html[data-layout-mode="boxed"] body {
  background: #e9eef3;
}
html[data-layout-mode="boxed"] .shell {
  max-width: 1440px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(38, 53, 68, 0.12);
}
html[data-color-scheme="dark"][data-layout-mode="boxed"] body {
  background: #121820;
}
/* Layout mode: detached */
html[data-layout-mode="detached"] .shell {
  background: var(--page);
  padding: 12px 12px 12px 0;
  gap: 0;
}
html[data-layout-mode="detached"] .aside {
  margin: 12px 0 12px 12px;
  border-radius: 12px;
  height: calc(100vh - 24px);
  border-right: 0;
}
html[data-layout-mode="detached"] .wrapper {
  border-radius: 12px;
  margin: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card);
}
/* Sidenav: full / fullscreen — offcanvas (hamburger), nie display:none */
html[data-layout="vertical"][data-sidenav-size="full"] .wrapper,
html[data-layout="vertical"][data-sidenav-size="fullscreen"] .wrapper,
html[data-layout="horizontal"] .wrapper {
  margin-left: 0;
  width: 100%;
}
html[data-layout="vertical"][data-sidenav-size="full"] .aside,
html[data-layout="vertical"][data-sidenav-size="fullscreen"] .aside {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--aside-w);
  transform: translateX(-105%);
  transition: transform 0.2s ease;
  z-index: 50;
  display: flex;
}
html[data-layout="vertical"][data-sidenav-size="full"] .shell.aside-open .aside,
html[data-layout="vertical"][data-sidenav-size="fullscreen"] .shell.aside-open .aside {
  transform: none;
  box-shadow: 12px 0 32px rgba(24, 28, 50, 0.22);
}
html[data-layout="vertical"][data-sidenav-size="full"] .shell.aside-open .aside-backdrop,
html[data-layout="vertical"][data-sidenav-size="fullscreen"] .shell.aside-open .aside-backdrop {
  display: block;
  z-index: 45;
}
html[data-layout="vertical"][data-sidenav-size="full"] .icon-btn,
html[data-layout="vertical"][data-sidenav-size="fullscreen"] .icon-btn {
  display: inline-flex;
}
html[data-sidenav-size="fullscreen"] .header {
  display: none;
}
/* Fullscreen bez topbara — hamburger w stałym rogu */
html[data-layout="vertical"][data-sidenav-size="fullscreen"] .icon-btn#asideToggle {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 60;
  display: inline-flex;
  background: var(--card);
  box-shadow: var(--shadow);
}

/* —— Układ horizontal: menu pod topbarem —— */
html[data-layout="horizontal"] .shell {
  flex-direction: column;
}
html[data-layout="horizontal"] .aside {
  width: 100%;
  flex-direction: row;
  align-items: stretch;
  flex-shrink: 0;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  border-right: 0;
  border-bottom: 1px solid var(--aside-border);
  box-shadow: none;
  overflow: visible;
  z-index: 35;
}
html[data-layout="horizontal"] .aside-brand {
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 0 8px 0 16px;
  border-bottom: 0;
  border-right: 1px solid var(--aside-border);
  flex-shrink: 0;
}
html[data-layout="horizontal"] .aside-mini-btn { display: none !important; }
html[data-layout="horizontal"] .aside-logo {
  max-height: 36px;
  margin-left: 0;
}
html[data-layout="horizontal"] .aside-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  overflow: visible;
  height: 48px;
  max-height: 48px;
  padding: 0 12px;
  flex: 1;
  min-width: 0;
}
html[data-layout="horizontal"] .aside-heading { display: none; }
html[data-layout="horizontal"] .aside-section {
  position: relative;
  flex: 0 0 auto;
}
html[data-layout="horizontal"] .aside-section-toggle {
  width: auto;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--aside-text);
}
html[data-layout="horizontal"] .aside-section-toggle:hover,
html[data-layout="horizontal"] .aside-section.is-open > .aside-section-toggle {
  background: var(--aside-hover);
  color: var(--aside-on-fg);
}
html[data-layout="horizontal"] .aside-section-chevron {
  width: 12px;
  height: 12px;
  transform: rotate(90deg);
}
html[data-layout="horizontal"] .aside-section.is-open .aside-section-chevron {
  transform: rotate(-90deg);
}
html[data-layout="horizontal"] .aside-section-body {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  max-height: min(70vh, 480px);
  overflow: auto;
  padding: 8px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(24, 28, 50, 0.18);
  z-index: 80;
}
html[data-layout="horizontal"] .aside-section-body::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 18px;
  width: 10px;
  height: 10px;
  background: var(--card);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
html[data-layout="horizontal"] .aside-section.is-open > .aside-section-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html[data-layout="horizontal"] .aside-section-body .aside-link,
html[data-layout="horizontal"] .aside-section-body .aside-parent,
html[data-layout="horizontal"] .aside-section-body .aside-sub {
  color: var(--text);
  box-shadow: none;
}
html[data-layout="horizontal"] .aside-section-body .aside-link svg,
html[data-layout="horizontal"] .aside-section-body .aside-chevron {
  color: var(--muted);
}
html[data-layout="horizontal"] .aside-section-body .aside-sub {
  margin: 0 0 2px 28px;
}
html[data-layout="horizontal"] .aside-section-body .aside-link:hover,
html[data-layout="horizontal"] .aside-section-body .aside-parent:hover,
html[data-layout="horizontal"] .aside-section-body .aside-sub:hover {
  background: var(--page);
  color: var(--text);
}
html[data-layout="horizontal"] .aside-section-body .aside-link.on,
html[data-layout="horizontal"] .aside-section-body .aside-parent.on,
html[data-layout="horizontal"] .aside-section-body .aside-sub.on {
  background: rgba(70, 128, 255, 0.12);
  color: var(--aside-active);
  box-shadow: none;
}
html[data-layout="horizontal"] .aside-nav > .aside-link {
  flex: 0 0 auto;
  white-space: nowrap;
}
html[data-layout="horizontal"] .aside-group { position: relative; }
html[data-layout="horizontal"] .aside-section-body .aside-subs {
  position: static;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
html[data-layout="horizontal"] .aside-group.is-open .aside-subs { display: block; }
html[data-layout="horizontal"] .aside-user-info {
  display: none !important;
}
html[data-layout="horizontal"] .header {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
}
html[data-layout="horizontal"] .content {
  padding-top: 12px;
}
/* Horizontal + Full/Fullscreen: zostaw poziome menu widoczne */
html[data-layout="horizontal"][data-sidenav-size="full"] .aside,
html[data-layout="horizontal"][data-sidenav-size="fullscreen"] .aside {
  display: flex;
  position: relative;
  transform: none;
  width: 100%;
}
html[data-layout="horizontal"][data-sidenav-size="fullscreen"] .header {
  display: flex;
}
html[data-layout="horizontal"] .icon-btn#asideToggle {
  display: none;
}
@media (max-width: 991px) {
  html[data-layout="horizontal"] .aside {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 88vw);
    height: 100%;
    flex-direction: column;
    transform: translateX(-105%);
    z-index: 50;
  }
  html[data-layout="horizontal"] .shell.aside-open .aside { transform: none; }
  html[data-layout="horizontal"] .aside-nav {
    flex-direction: column;
    align-items: stretch;
    overflow: auto;
  }
  html[data-layout="horizontal"] .aside-section-body {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 8px;
    min-width: 0;
  }
  html[data-layout="horizontal"] .aside-section.is-open > .aside-section-body {
    display: block;
  }
  html[data-layout="horizontal"] .aside-subs {
    position: static;
    box-shadow: none;
    border: 0;
  }
  html[data-layout="horizontal"] .icon-btn#asideToggle {
    display: inline-flex;
  }
  html[data-layout="horizontal"] .header {
    position: absolute;
  }
  html[data-layout="horizontal"] .content {
    padding-top: calc(var(--header-h) + 12px);
  }
}
html[data-layout-position="scrollable"] body { overflow: auto; height: auto; }
html[data-layout-position="scrollable"] .shell { height: auto; min-height: 100vh; overflow: visible; }
html[data-layout-position="scrollable"] .aside { position: sticky; top: 0; height: 100vh; }
html[data-layout="horizontal"][data-layout-position="scrollable"] .aside {
  position: relative;
  top: auto;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
}
html[data-layout-position="scrollable"] .content { overflow: visible; }

/* Dark scheme: podstawowe powierzchnie */
html[data-color-scheme="dark"] .login-screen {
  background: linear-gradient(180deg, #1a2332 0%, #121820 100%);
}
html[data-color-scheme="dark"] .login-card,
html[data-color-scheme="dark"] .settings-card,
html[data-color-scheme="dark"] .empty-card,
html[data-color-scheme="dark"] .card,
html[data-color-scheme="dark"] .user-menu,
html[data-color-scheme="dark"] .add-menu,
html[data-color-scheme="dark"] .search-hits {
  background: var(--card);
  color: var(--text);
  border-color: var(--line);
}
html[data-color-scheme="dark"] .btn-ghost {
  color: var(--text);
  border-color: var(--ctrl-border);
}
html[data-color-scheme="dark"] .btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
html[data-color-scheme="dark"] input,
html[data-color-scheme="dark"] select,
html[data-color-scheme="dark"] textarea,
html[data-color-scheme="dark"] .search {
  background: #1a2332;
  color: var(--text);
  border-color: var(--ctrl-border);
}
html[data-color-scheme="dark"] .table th,
html[data-color-scheme="dark"] .table td {
  border-color: var(--line);
  color: var(--text);
}
html[data-color-scheme="dark"] .ui-theme-swatch { background: #1a2332; }
html[data-color-scheme="dark"][data-topbar-color="dark"] .header .search,
html[data-color-scheme="dark"][data-topbar-color="brand"] .header .search,
html[data-topbar-color="dark"] .header .search,
html[data-topbar-color="brand"] .header .search {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}
html[data-topbar-color="dark"] .header .user-avatar,
html[data-topbar-color="brand"] .header .user-avatar {
  border-color: rgba(255, 255, 255, 0.25);
}
.aside-user-info {
  display: none;
  padding: 12px 16px;
  border-top: 1px solid var(--aside-border);
  gap: 10px;
  align-items: center;
}
html[data-sidebar-user="1"] .aside-user-info { display: flex; }
.aside-user-info .aui-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--aside-hover);
  color: var(--aside-on-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
.aside-user-info .aui-avatar img { width: 100%; height: 100%; object-fit: cover; }
.aside-user-info .aui-meta { min-width: 0; }
.aside-user-info .aui-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--aside-on-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aside-user-info .aui-mail {
  font-size: 11px;
  color: var(--aside-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tab-gantt.gantt-page:not(.hidden) {
  display: flex;
  flex-direction: column;
  /* .content dokłada 12px pod headerem i 24px na dole — bez odjęcia strona się scrolluje */
  height: calc(100vh - var(--header-h) - 36px);
  padding: 0;
  max-width: none;
}
.gantt_page {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.gantt_page.is-on { display: flex !important; }
/* Inset jak #calendar: .content daje 12/16 — shell bez dodatkowego paddingu */
#tab-gantt .gantt_shell,
.gantt_page .gantt_shell {
  flex: 1;
  min-height: 0;
  padding: 0;
  background: transparent;
}
/* Pełny ekran: nieprzezroczyste tło (ID #tab-gantt inaczej przebija transparent i widać nawigator) */
#tab-gantt .gantt_shell.gantt-fs-open,
.gantt_page .gantt_shell.gantt-fs-open,
.gantt_shell.gantt-fs-open {
  background: #fff !important;
}
#tab-gantt .gantt_shell.gantt-fs-open .gantt_header_bar,
.gantt_page .gantt_shell.gantt-fs-open .gantt_header_bar,
.gantt_shell.gantt-fs-open .gantt_header_bar {
  background: #fff;
  position: relative;
  z-index: 5;
}
#tab-gantt .gantt_shell.gantt-fs-open .gantt_toolbar,
.gantt_page .gantt_shell.gantt-fs-open .gantt_toolbar,
.gantt_shell.gantt-fs-open .gantt_toolbar {
  background: #fff;
}
.gantt_chart { flex: 1; min-height: 200px; }
.gantt_task_cell.week_end { background: #fff !important; }
.domino_projekt .gantt_task_content { font-weight: 700; }
.domino_zadanie_done .gantt_task_content { background: #4b5563; color: #f3f4f6; }
.domino_zadanie_overplan .gantt_task_content { background: #fecaca; color: #7f1d1d; }

.zp-form label { font-size: 12px; font-weight: 600; color: var(--muted, #5e6278); }
.zp-form select, .zp-form textarea {
  width: 100%; max-width: 280px; height: var(--ctrl-h); min-height: var(--ctrl-h); padding: 0 10px;
  border: 1px solid var(--ctrl-border); border-radius: var(--ctrl-radius); font: inherit; font-size: 13px;
  background: #fff; color: var(--text);
}
.zp-form textarea { max-width: none; min-height: 80px; }
.zp-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.zp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.zp-table th, .zp-table td { padding: 6px 8px; border-bottom: 1px solid #eef0f4; text-align: left; }
.zp-table input { width: 100%; height: var(--ctrl-h); border: 1px solid var(--ctrl-border); border-radius: var(--ctrl-radius); padding: 0 8px; font: inherit; }
.zp-muted { color: #a1a5b7; font-size: 13px; }
.zp-chk { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.zp-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zp-inline input, .zp-inline select { max-width: 160px; }

/* Całe pole daty otwiera kalendarz (nie tylko ikona) */
input[type="date"]:not([disabled]):not([readonly]) {
  cursor: pointer;
  position: relative;
}
input[type="date"]:not([disabled]):not([readonly]):not(.gantt_grid_inp)::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.zp-err { color: #f1416c; font-size: 13px; }
.zp-cmt { padding: 8px 0; border-bottom: 1px solid #eef0f4; }
.zp-x { border: 0; background: none; cursor: pointer; font-size: 16px; color: #9ca3af; }
.zp-table-wrap { overflow: auto; }
#zpCmtNew { width: 100%; min-height: 80px; margin: 12px 0; }

.fc { font-family: inherit; }
.fc .fc-toolbar-title { font-size: 13px; font-weight: 600; }
/* Organizer: ładowanie widoku — tylko wizualnie, UI pozostaje klikalne */
#calBox.is-loading {
  opacity: 0.72;
  transition: opacity 0.15s ease;
}

/* Organizer: przyciski FC = wielkość .cal-btn (32px) — #calBox jest korzeniem .fc */
.cal-page #calBox.fc .fc-button,
.cal-page #calBox.fc .fc-button-group > .fc-button,
#tab-calendar #calBox.fc .fc-button,
#tab-calendar #calBox.fc .fc-button-group > .fc-button {
  box-sizing: border-box !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  border-radius: 6px !important;
}
.cal-page #calBox.fc .fc-button .fc-icon,
#tab-calendar #calBox.fc .fc-button .fc-icon {
  font-size: 13px !important;
}
.fc .fc-button-primary {
  background: #fff;
  border-color: #d1d5db;
  color: #374151;
}
.fc .fc-button-primary:not(:disabled).fc-button-active {
  background: #c5d4f7;
  border-color: #b8c9f4;
  color: #3148a8;
}
.fc .fc-day-today { background: #fff8e6; }

#aneksProfil .um-cols {
  gap: 24px 40px;
  padding: 20px 22px 28px;
}
#aneksProfil .um-cols .um-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#aneksProfil .um-field > label { margin-bottom: 6px; }
#aneksProfil .um-field input,
#aneksProfil .um-field select,
#aneksProfil .um-field textarea { margin-top: 0; }
#aneksProfil .um-podzial .hint {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: #a1a5b7;
}
.um-list-aneks {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #3148a8;
  line-height: 1.3;
}
.um-draft { margin-bottom: 12px; }
.um-draft-card { border: 1px solid #c5d4f7; box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.08); }
.um-draft-note { margin: 0 0 12px; font-size: 12px; line-height: 1.45; }
.um-draft-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.um-tr-badge {
  font-size: 11px;
  font-weight: 600;
  color: #3148a8;
  background: #eff6ff;
  border: 1px solid #c5d4f7;
  border-radius: 999px;
  padding: 2px 8px;
  margin-right: auto;
}
.um-tr-meta { margin: -4px 0 10px; font-size: 12px; }
.um-tr-list-draft input {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--ctrl-border);
  border-radius: 6px;
  padding: 0 8px;
  font: inherit;
  font-size: 12px;
}
.um-tr-list-draft .um-tr-lp { text-align: center; color: #5e6278; width: 36px; }
.um-tr-list-draft tr.um-tr-pos td { background: #f8fafc; }
.um-tr-list-draft .um-tr-pos-nr,
.um-tr-list-draft .um-tr-razem { text-align: center; color: #5e6278; font-size: 12px; }
.um-tr-list-draft input[readonly] { background: #f3f4f6; }
.um-tr-list-draft .um-tr-add-pos { font-size: 12px; }
.um-linked-table tbody tr.um-linked-row { cursor: pointer; }
.um-linked-table tbody tr.um-linked-row:hover { background: #f3f6ff; }
.um-linked-table td.num { text-align: right; white-space: nowrap; }
.um-tr-list-draft select.td-mpk,
.um-draft .td-mpk,
.um-draft select.td-mpk { min-width: 180px; max-width: 100%; }
.um-row-actions { white-space: nowrap; }
.um-linked-table .js-delete-linked { font-size: 12px; }


/* ——— Pulpit (widgety, Keen-like) ——— */
.dash-page { max-width: 1400px; margin: 0 auto; }
.dash { display: flex; flex-direction: column; gap: 16px; }
.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 2px 2px;
}
.dash-date {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--muted);
}
.dash-hello {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.dash-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-left: auto;
}
.dash-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #7e8299;
}
.dash-meta svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #3699ff;
}
.dash-meta-names svg { color: #1bc5bd; }
#dashWeather svg { color: #7e8299; }
.dash-kpi-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-kpi-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.dash-kpi-ico svg { width: 18px; height: 18px; }
.dash-kpi-ico.is-blue { background: #e8f4ff; color: #3699ff; }
.dash-kpi-ico.is-orange { background: #fff4e6; color: #ff9f1a; }
.dash-kpi-ico.is-red { background: #ffe8ee; color: #f1416c; }
.dash-kpi-ico.is-violet { background: #f3e8ff; color: #8950fc; }
.dash-kpi-ico.is-teal { background: #e6f8f4; color: #1bc5bd; }
.dash-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1200px) {
  .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dash-kpi {
  appearance: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 96px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.dash-kpi-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 2px;
  margin-left: auto;
  min-width: 0;
}
.dash-kpi-side em { max-width: 148px; }
.dash-kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(76, 87, 125, 0.12);
}
.dash-kpi span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.dash-kpi b {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}
.dash-kpi b small {
  font-size: 13px;
  font-weight: 600;
  color: #7e8299;
}
.dash-kpi em {
  font-style: normal;
  font-size: 11px;
  color: #7e8299;
}
.dash-kpi.warn b { color: #f1416c; }
.dash-kpi-hours .dash-prog {
  height: 6px;
  width: 92px;
  border-radius: 999px;
  background: #eef0f4;
  overflow: hidden;
  margin: 2px 0;
  align-self: flex-end;
}
.dash-kpi-hours .dash-prog i {
  display: block;
  height: 100%;
  background: #3699ff;
  border-radius: 999px;
}
.dash-kpi-hours .dash-prog.over i { background: #f1416c; }
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.dash-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.dash-grid-2 .dash-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.dash-grid-2 .dash-card-h { flex: 0 0 auto; }
.dash-grid-2 .dash-seg { flex: 0 0 auto; }
.dash-grid-2 .dash-card > :last-child {
  flex: 1 1 auto;
  min-height: 0;
}
.dash-grid-2 .dash-list {
  max-height: none;
}
.dash-board {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 280px) minmax(0, 1.2fr);
  grid-template-areas:
    "org alerts mail"
    "org alerts tasks";
  gap: 14px;
  align-items: stretch;
}
.dash-slot-org { grid-area: org; min-width: 0; display: flex; }
.dash-slot-mail { grid-area: mail; min-width: 0; display: flex; }
.dash-slot-alerts {
  grid-area: alerts;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}
.dash-slot-alerts > .dash-card {
  flex: 0 0 auto;
  min-height: 0;
  width: 100%;
  padding: 8px 10px;
}
.dash-slot-alerts .dash-card-h { gap: 6px; margin-bottom: 4px; }
.dash-slot-alerts .dash-card-title { gap: 6px; }
.dash-slot-alerts .dash-card-h h3 { font-size: 13px; }
.dash-slot-alerts .dash-kpi-ico { width: 28px; height: 28px; border-radius: 8px; }
.dash-slot-alerts .dash-kpi-ico svg { width: 15px; height: 15px; }
.dash-slot-alerts .dash-card-h .btn-ghost { height: 26px; padding: 0 8px; }
.dash-slot-tasks { grid-area: tasks; min-width: 0; display: flex; }
.dash-slot-org > .dash-card,
.dash-slot-mail > .dash-card,
.dash-slot-tasks > .dash-card { flex: 1 1 auto; width: 100%; }
.dash-slot-org .dash-card-h { flex-wrap: wrap; }
.dash-org-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.dash-org-nav { margin-bottom: 0; justify-content: flex-start; gap: 6px; }
.dash-org-nav b { min-width: 11.5em; text-align: center; }
.dash-slot-org .dash-list { max-height: 420px; }
.dash-slot-mail .dash-list,
.dash-slot-alerts .dash-list { max-height: 240px; }
.dash-tasks-card .dash-card-h { align-items: flex-end; flex-wrap: wrap; }
.dash-kanban {
  display: flex;
  gap: 8px;
  overflow: auto;
  max-height: 520px;
  padding-bottom: 4px;
}
.dash-kcol {
  flex: 1 1 180px;
  min-width: 180px;
  max-height: 520px;
  display: flex;
  flex-direction: column;
  background: #f4f6fa;
  border-radius: 8px;
}
.dash-kcol header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.dash-kcol header em { font-style: normal; color: var(--muted); font-weight: 650; }
.dash-kcol-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
  padding: 0 8px 8px;
  min-height: 80px;
}
.dash-kcard {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 8px 8px 8px 10px;
  border: 0;
  border-left: 3px solid #9e9e9e;
  border-radius: 6px;
  background: var(--card, #fff);
  text-align: left;
  font: inherit;
  cursor: grab;
}
.dash-kcard.is-dragging { opacity: 0.45; }
.dash-kcol.is-drop {
  outline: 2px solid #4e73df;
  outline-offset: -2px;
  background: rgba(78, 115, 223, 0.08);
}
.dash-kcard b { font-size: 13px; font-weight: 650; color: var(--text); line-height: 1.3; }
.dash-kcard span,
.dash-kcard em { font-size: 11px; font-style: normal; color: var(--muted); }
.dash-kcard.is-todo { border-left-color: #2095f3; }
.dash-kcard.is-done { border-left-color: #22b14c; }
.dash-kcard.is-ok { border-left-color: #14b8a6; }
.dash-kcard.is-rej { border-left-color: #e53935; }
.dash-task-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef0f4;
  font-size: 10px;
  font-weight: 700;
  color: #5e6278;
}
.dash-task-pill.is-todo { color: #2095f3; }
.dash-task-pill.is-done { color: #22b14c; }
.dash-task-pill.is-ok { color: #0f9f93; }
.dash-task-pill.is-rej { color: #e53935; }
.dash-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.dash-cal-nav b { font-size: 13px; text-transform: capitalize; }
.dash-cal-nav button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card, #fff);
  color: var(--text);
  cursor: pointer;
}
.dash-cal { max-height: 520px; overflow: auto; }
.dash-cal-week,
.dash-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.dash-cal-week span { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; }
.dash-cal-day {
  min-height: 68px;
  padding: 3px;
  border-radius: 6px;
  background: #f7f9fc;
  overflow: hidden;
}
.dash-cal-day.is-other { opacity: 0.45; }
.dash-cal-day.is-today { box-shadow: inset 0 0 0 1.5px #3699ff; }
.dash-cal-num { display: block; font-size: 11px; font-weight: 700; }
.dash-cal-chip {
  display: block;
  width: 100%;
  margin-top: 2px;
  padding: 1px 4px;
  border: 0;
  border-radius: 4px;
  background: #e8f4ff;
  color: #1e40af;
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.dash-cal-chip.is-done { background: #e8f8ee; color: #047857; }
.dash-cal-chip.is-ok { background: #e6f8f4; color: #0f766e; }
.dash-cal-chip.is-rej { background: #fee2e2; color: #b91c1c; }
.dash-cal-chip.is-draft { background: #eef0f4; color: #4b5563; }
.dash-cal-more { display: block; font-size: 10px; color: var(--muted); }
.dash-cal-undated { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.dash-cal-undated b { width: 100%; font-size: 12px; }
.dash-cal-undated .dash-cal-chip { width: auto; max-width: 220px; }
@media (max-width: 1100px) {
  .dash-board {
    grid-template-columns: 1fr;
    grid-template-areas:
      "org"
      "alerts"
      "mail"
      "tasks";
  }
  .dash-slot-alerts > .dash-card { max-width: none; }
}
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
}
.dash-span-2 { grid-column: span 2; }
@media (max-width: 700px) {
  .dash-span-2 { grid-column: span 1; }
}
.dash-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px 12px;
  min-height: 120px;
}
.dash-card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.dash-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.dash-card-h h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.dash-card-h .muted { margin: 2px 0 0; font-size: 12px; }
.dash-card-h .btn-ghost {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}
.dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 320px;
  overflow: auto;
  font-size: 11.5px;
  color: #7e8299;
}
.dash-li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.dash-li:hover { background: var(--hover, #f5f8fa); }
.dash-li-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.dash-li-main strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #5e6278);
}
.dash-li-main .muted,
.dash-li-main p {
  font-size: 10.5px;
  color: #b5b5c3;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-li-main p { margin-top: 3px; line-height: 1.4; color: #7e8299; }
.dash-li-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex: 0 0 auto;
  font-size: 10.5px;
  color: #a1a5b7;
}
.dash-li-meta .badge {
  font-size: 10px;
  padding: 2px 6px;
}
.dash-empty {
  margin: 8px 0 4px;
  font-size: 12px;
  color: #a1a5b7;
}
.dash-org-day {
  margin: 10px 2px 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.dash-org-day:first-child { margin-top: 2px; }
.dash-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.dash-seg-btn {
  appearance: none;
  border: 1px solid var(--ctrl-border);
  background: var(--card, #fff);
  color: var(--text, #5e6278);
  border-radius: 999px;
  height: 28px;
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.dash-seg-btn em {
  font-style: normal;
  margin-left: 4px;
  color: var(--muted);
}
.dash-seg-btn.on,
.dash-seg-btn.on:hover {
  background: #e8f0fe;
  border-color: transparent;
  color: #3148a8;
  box-shadow: inset 0 0 0 0.5px #3148a8;
}
.dash-seg-btn.on em { color: #3148a8; }
.dash-risk { display: flex; flex-direction: column; gap: 8px; }
.dash-risk-group {
  border: 1px solid var(--line, #eef0f4);
  border-radius: 10px;
  background: var(--card, #fff);
  overflow: hidden;
}
.dash-risk-sum {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
}
.dash-risk-sum::-webkit-details-marker { display: none; }
.dash-risk-name { font-weight: 600; flex: 1; min-width: 0; color: var(--text, #5e6278); font-size: 12px; }
.dash-risk-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #a1a5b7;
  font-size: 11px;
  font-weight: 600;
}
.dash-risk-go { flex: 0 0 auto; padding: 3px 7px; font-size: 11px; }
.dash-risk-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 2px;
}
.dash-risk-dot.day { background: #ef4444; }
.dash-risk-dot.week { background: #f59e0b; }
.dash-risk-group .dash-list { margin: 0; border-top: 1px solid #eef0f4; }
.dash-risk-group .dash-li strong { display: inline-flex; align-items: center; gap: 6px; }
.badge.dash-odch-plus { background: #fff5f8; color: #f1416c; border-color: #f7c8d5; }
.badge.dash-odch-minus { background: #e8fff3; color: #50cd89; border-color: #b7f0d0; }
.dash-table {
  font-size: 11.5px;
  color: var(--muted, #7e8299);
}
.dash-table td, .dash-table th {
  font-size: 11.5px;
  padding: 7px 8px;
}
.dash-table th {
  font-weight: 600;
  color: var(--muted, #a1a5b7);
  letter-spacing: 0.01em;
}
.dash-table td b {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #5e6278);
}
.dash-table td .muted {
  font-size: 10.5px;
  color: var(--muted, #b5b5c3);
  margin-top: 2px;
}
.dash-table .badge {
  font-size: 10px;
  padding: 2px 6px;
}
.dash-prog {
  position: relative;
  height: 8px;
  background: #eff2f5;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
  max-width: 140px;
}
.dash-prog i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4e73df, #7a94e8);
  border-radius: inherit;
}
.dash-prog span {
  position: absolute;
  right: 0;
  top: -16px;
  font-size: 11px;
  font-weight: 600;
  color: #5e6278;
}
.dash-metric {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.dash-metric b { font-size: 28px; font-weight: 700; }
.dash-metric span { font-size: 12px; color: var(--muted); }
.dash-metric.subtle b { font-size: 18px; }
.dash-spark {
  width: 100%;
  height: 56px;
  display: block;
  margin-bottom: 12px;
}
.dash-bar { fill: #e4e6ef; }
.dash-bar.on { fill: #4e73df; }
.dash-bars { display: flex; flex-direction: column; gap: 10px; }
.dash-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.dash-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #5e6278;
  font-weight: 600;
}
.dash-bar-track {
  height: 8px;
  background: #eff2f5;
  border-radius: 999px;
  overflow: hidden;
}
.dash-bar-track i {
  display: block;
  height: 100%;
  background: #4e73df;
  border-radius: inherit;
}
.dash-tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 1100px) {
  .dash-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dash-tile {
  appearance: none;
  border: 1px solid var(--line);
  background: #f9fafc;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.dash-tile:hover {
  border-color: #c5d4f7;
  background: #eef3ff;
}
.dash-tile strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.dash-tile span {
  font-size: 12px;
  color: var(--muted);
}

/* —— Budżet projektu (RBH / Przychód / Koszty / Wynik) —— */
.prp-budzet-box { margin-top: 8px; }
.prp-bud-card {
  background: #fff;
  border: 1px solid #e4e6ef;
  border-radius: 8px;
  overflow: hidden;
}
.prp-bud-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #5e6278;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 14px;
}
.prp-bud-save-inline { margin-left: auto; }
.prp-bud-table th {
  background: #5e6278;
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.prp-bud-table td,
.prp-bud-table th { padding: 8px 10px; vertical-align: middle; }
.prp-bud-table tr.prp-bud-sum td {
  background: #6c757d;
  color: #fff;
  font-weight: 700;
}
.prp-bud-table tr.prp-bud-sum td.num { color: #fff; }
.prp-table-wrap tbody tr.prp-bud-sum:hover td,
.prp-bud-table tbody tr.prp-bud-sum:hover td {
  background: #6c757d !important;
  color: #fff !important;
}
.prp-bud-inp {
  width: 100%;
  max-width: 140px;
  text-align: right;
  font: inherit;
  padding: 4px 8px;
  border: 1px solid #e4e6ef;
  border-radius: 4px;
  background: #fff;
}
.prp-bud-inp[readonly] { background: #f4f5f8; color: #5e6278; }
.prp-bud-meta { font-size: 12px; color: #7e8299; }
.prp-bud-plus { color: #0bb783 !important; }
.prp-bud-minus { color: #f1416c !important; }
.prp-bud-wide { min-width: 960px; }
.prp-section-head .um-view-seg { margin-left: 0; }
.prp-section-head > h2 + .um-view-seg { margin-left: auto; }
.prp-section-head.prp-section-tools-left > .um-view-seg { margin-left: 0; }
.prp-section-head.prp-section-tools-left > .um-view-seg + .um-view-seg { margin-left: 8px; }
.prp-section-head.prp-section-tools-left > .um-tree-btns {
  margin-left: 0;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.prp-section-head.prp-section-tools-left > .um-tree-btns + .um-view-seg { margin-left: 0; }
.prp-section-head.prp-section-tools-left > .prp-tab-tools { margin-left: 0; margin-right: 0; }
.prp-section-head.prp-section-tools-left > .prp-docs-add { margin-left: auto; margin-right: 0; }
#prpMpkPlanTools #prpMpkParam {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
#prpMpkPlanTools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#prpMpkPlanTools.hidden { display: none !important; }
#prpMpkPlanTools #prpMpkApprove,
#prpMpkPlanTools #prpMpkUnlock {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
#prpMpkPlanTools #prpMpkParam.hidden,
#prpMpkPlanTools #prpMpkApprove.hidden,
#prpMpkPlanTools #prpMpkUnlock.hidden,
#prpMpkPlanTools #prpMpkLockMeta.hidden { display: none !important; }
#prpMpkLockMeta {
  font-size: 12px;
  white-space: nowrap;
}
#prpMpkTable tr.prp-mpk-parent-row td {
  background: rgba(0, 0, 0, 0.02);
}
#prpMpkSearchTools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#prpMpkPlanImportWrap.hidden,
#prpMpkAddBtn.hidden { display: none !important; }
#prpMpkTable th.prp-mpk-col-vis,
#prpMpkTable td.prp-mpk-col-vis {
  width: 1px;
  white-space: nowrap;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}
/* Jak .embz-vis-mark w harmonogramie */
.prp-mpk-vis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  padding: 0;
  border: 0;
  background: transparent;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.prp-mpk-vis.is-on { color: #0bb783; }
.prp-mpk-vis.is-off { color: #f1416c; }
.prp-mpk-vis.is-locked,
.prp-mpk-vis:disabled {
  opacity: 0.55;
  cursor: default;
}
.prp-mpk-sel-lab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}
/* Parametryzacja tuż przed Zapisz; Szukaj + MPK skrajnie po prawej */
#prpMpkPlanTools:not(.hidden) {
  margin-left: 8px !important;
  margin-right: 0 !important;
}
#prpMpkSearchTools,
#prpWynikSearchTools {
  margin-left: auto !important;
  margin-right: 0 !important;
}
#prpMpkPlanTools.hidden { display: none !important; }
#prpMpkKosztTabs.hidden { display: none !important; }
#prpMpkTable th.num,
#prpMpkTable td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#prpMpkTable td.num.prp-bud-plus { color: #0bb783; font-weight: 600; }
#prpMpkTable td.num.prp-bud-minus { color: #f1416c; font-weight: 600; }
.prp-mpk-zad {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.prp-mpk-toggle,
.prp-mpk-toggle-spacer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7e8299;
  cursor: pointer;
}
.prp-mpk-toggle-spacer { cursor: default; }
.prp-mpk-toggle .um-group-chevron {
  width: 18px;
  height: 18px;
}
.prp-mpk-toggle.is-collapsed .um-group-chevron svg { transform: rotate(90deg); }
.prp-mpk-toggle:not(.is-collapsed) .um-group-chevron svg { transform: rotate(180deg); }
.prp-mpk-kod-txt { font-weight: 600; }
.prp-mpk-kod-txt.is-project,
.prp-mpk-project-row .prp-mpk-kod-txt { font-weight: 700; }
.prp-mpk-project-row td { background: #f3f6fb; }
.prp-mpk-opis-project { font-weight: 600; }
.prp-card-full { margin: 0 0 14px; }
.prp-overview-bud { min-width: 880px; }
.prp-overview-bud th {
  white-space: normal;
  line-height: 1.25;
  max-width: 7.5rem;
}

/* —— Wynik (ścieżka projekt/MPK) —— */
.wyn-box { margin-top: 4px; }
.wyn-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #eef0f4);
  border-radius: 10px;
  padding: 14px 16px 8px;
  color: var(--text);
}
.wyn-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.wyn-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #181c32);
}
.wyn-head p { margin: 0; font-size: 12px; color: var(--muted); }
.wyn-count { white-space: nowrap; font-size: 12px; color: var(--muted); }
.wyn-table { table-layout: auto; min-width: 960px; }
.wyn-table thead th {
  padding: 12px 14px;
  vertical-align: middle;
}
.wyn-table tbody td {
  padding: 14px;
  vertical-align: middle;
  line-height: 1.35;
}
.wyn-table th:first-child,
.wyn-table td.wyn-path { min-width: 220px; width: 28%; }
.wyn-table.wyn-wide {
  table-layout: fixed;
  min-width: 900px;
  width: 100%;
}
.wyn-table.wyn-wide th:first-child,
.wyn-table.wyn-wide td.wyn-path { width: auto; min-width: 260px; }
.wyn-table.wyn-wide th.num,
.wyn-table.wyn-wide td.num {
  width: 5.6rem;
  max-width: 5.6rem;
  padding-left: 4px;
  padding-right: 6px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wyn-table.wyn-wide thead th.num {
  white-space: normal;
  line-height: 1.15;
  font-size: 11px;
  vertical-align: bottom;
  overflow: visible;
  text-overflow: clip;
}
.wyn-table tbody tr.wyn-row { cursor: default; }
.wyn-table tbody tr.wyn-leaf[data-open-project],
.wyn-table tbody tr.wyn-leaf[data-open-time],
.wyn-table tbody tr.wyn-leaf[data-open-invoice],
.wyn-table tbody tr.wyn-leaf[data-open-fk-inv] { cursor: pointer; }
.wyn-table tbody tr.wyn-doc-fs .wyn-label { color: #0f766e; }
.wyn-table tbody tr.wyn-doc-fv .wyn-label { color: #b45309; }
.wyn-table tbody tr.wyn-doc-cz .wyn-label { color: #1d4ed8; }
.wyn-table tbody tr.wyn-kind-task .wyn-label { font-weight: 600; }
.wyn-table tbody tr.wyn-group { background: var(--panel-2, #f8f9fb); }
.wyn-table tbody tr.wyn-group:hover { background: var(--hover, #f4f6fa); }
.wyn-table tbody tr.wyn-kind-year { background: var(--panel-2, #eef2f6); }
.wyn-table tbody tr.wyn-kind-year .wyn-label { font-weight: 800; letter-spacing: 0.01em; }
.wyn-table tbody tr.wyn-kind-project .wyn-label { font-weight: 700; color: var(--text, #181c32); }
.wyn-table tbody tr.wyn-kind-mpk .wyn-label { font-weight: 600; color: var(--text, #3f4254); }
.wyn-table td.wyn-path { padding: 0; vertical-align: middle; }
.wyn-toggle,
.wyn-leaf-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 14px;
  min-height: 48px;
  box-sizing: border-box;
}
.wyn-toggle {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.wyn-toggle:hover { background: var(--hover, #f4f6fa); }
.wyn-leaf-pad {
  display: inline-block;
  width: 14px;
  flex: 0 0 14px;
}
.wyn-depth-0 .wyn-toggle,
.wyn-depth-0 .wyn-leaf-inner { padding-left: 12px; }
.wyn-depth-1 .wyn-toggle,
.wyn-depth-1 .wyn-leaf-inner { padding-left: 28px; }
.wyn-depth-2 .wyn-toggle,
.wyn-depth-2 .wyn-leaf-inner { padding-left: 44px; }
.wyn-depth-3 .wyn-toggle,
.wyn-depth-3 .wyn-leaf-inner { padding-left: 60px; }
.wyn-depth-4 .wyn-toggle,
.wyn-depth-4 .wyn-leaf-inner { padding-left: 76px; }
.wyn-depth-5 .wyn-toggle,
.wyn-depth-5 .wyn-leaf-inner { padding-left: 92px; }
.wyn-depth-6 .wyn-toggle,
.wyn-depth-6 .wyn-leaf-inner { padding-left: 108px; }
.wyn-depth-7 .wyn-toggle,
.wyn-depth-7 .wyn-leaf-inner { padding-left: 124px; }
.wyn-depth-8 .wyn-toggle,
.wyn-depth-8 .wyn-leaf-inner { padding-left: 140px; }
.wyn-row.is-collapsed .um-group-chevron svg { transform: rotate(90deg); }
.wyn-row:not(.is-collapsed) .um-group-chevron svg { transform: rotate(180deg); }
.wyn-label {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text, #181c32);
}
.wyn-table tr.wyn-total td {
  font-weight: 700;
  background: var(--panel-2, #f0f2f5);
  border-top: 1px solid var(--line, #d8dce6);
  padding-top: 10px;
  padding-bottom: 10px;
}
.wyn-odch-plus { color: #0d9488; }
.wyn-odch-minus { color: #dc2626; }
.page-head-left .um-tree-btns { margin-left: 8px; }

/* Kategorie — tabela rodzajów + panel boczny */
#catGroupsTable tbody tr.cat-group-row {
  cursor: pointer;
}
#catGroupsTable tbody tr.cat-group-row:hover {
  background: #f8fafc;
}
#catGroupsTable tbody tr.cat-group-row td {
  padding: 14px;
  vertical-align: middle;
  border-bottom: 1px solid #eef0f4;
}
.cat-panel .zp-body {
  overflow: auto;
}
.cat-panel-inner {
  padding: 12px 16px 20px;
}
.cat-panel-table {
  width: 100%;
}
.cat-panel-table td.cat-panel-actions {
  white-space: nowrap;
  text-align: right;
  width: 1%;
}
/* Nagłówki Gantta — 3 poziomy. Paski zadań i znacznik Dziś bez zmian. */
.gantt_page .gantt_grid_scale,
.gantt_page .gantt_grid_head_cell {
  background: rgb(226, 235, 247) !important;
  background-color: rgb(226, 235, 247) !important;
  color: rgb(55, 70, 92) !important;
  font-weight: 700 !important;
  border-right: 1px solid rgb(220, 228, 238) !important;
  border-bottom: 1px solid rgb(190, 205, 225) !important;
}
.gantt_page .gantt_rbh_sub,
.gantt_page .gantt_szac_sub,
.gantt_page .gantt_avg_sub,
.gantt_page .gantt_prog_sub,
.gantt_page .gantt_real_sub,
.gantt_page .gantt_szanse_sub,
.gantt_page .gantt_plan_szanse_sub {
  color: rgb(55, 70, 92) !important;
  font-weight: 700 !important;
}
.gantt_page .gantt_rbh_group_head,
.gantt_page .gantt_szac_group_head,
.gantt_page .gantt_avg_group_head,
.gantt_page .gantt_real_group_head,
.gantt_page .gantt_prog_group_head,
.gantt_page .gantt_szanse_group_head,
.gantt_page .gantt_plan_szanse_group_head {
  background: rgb(210, 224, 242) !important;
  background-color: rgb(210, 224, 242) !important;
  color: rgb(31, 41, 55) !important;
  font-weight: 700 !important;
  border-bottom: 1px solid rgb(184, 201, 222) !important;
  border-right: 1px solid rgb(184, 201, 222) !important;
}
.gantt_page .gantt_grid_head_cell.gantt-head-group-end {
  border-right-color: rgb(184, 201, 222) !important;
}
.gantt_page .gantt_scale_cell:not(.gantt_today) {
  background: rgb(228, 236, 247) !important;
  background-color: rgb(228, 236, 247) !important;
  color: rgb(51, 65, 85) !important;
  font-weight: 600 !important;
  border-right: 1px solid rgb(220, 228, 238) !important;
  border-bottom: 1px solid rgb(220, 228, 238) !important;
}
.gantt_page .gantt_task_scale .gantt_scale_line:first-child,
.gantt_page .gantt_task_scale .gantt_scale_line:first-child .gantt_scale_cell:not(.gantt_today) {
  background: rgb(210, 224, 242) !important;
  background-color: rgb(210, 224, 242) !important;
  color: rgb(31, 41, 55) !important;
  font-weight: 700 !important;
  border-right-color: rgb(184, 201, 222) !important;
  border-bottom-color: rgb(184, 201, 222) !important;
}
.gantt_page .gantt_task_scale .gantt_scale_line:nth-child(3),
.gantt_page .gantt_task_scale .gantt_scale_line:nth-child(3) .gantt_scale_cell:not(.gantt_today) {
  background: rgb(245, 248, 252) !important;
  background-color: rgb(245, 248, 252) !important;
  color: rgb(71, 85, 105) !important;
  font-weight: 500 !important;
  border-right-color: rgb(220, 228, 238) !important;
  border-bottom-color: rgb(220, 228, 238) !important;
}
.gantt_page.gantt-scale-day .gantt_task_scale:not(:has(.gantt_scale_line:nth-child(2))) .gantt_scale_cell:not(.gantt_today),
.gantt_page.gantt-scale-day .gantt_task_scale:not(:has(.gantt_scale_line:nth-child(2))) {
  background: rgb(245, 248, 252) !important;
  background-color: rgb(245, 248, 252) !important;
  color: rgb(71, 85, 105) !important;
  font-weight: 500 !important;
  border-right-color: rgb(220, 228, 238) !important;
  border-bottom-color: rgb(220, 228, 238) !important;
}
.gantt_page.gantt-scale-week .gantt_task_scale:not(:has(.gantt_scale_line:nth-child(2))) .gantt_scale_cell:not(.gantt_today),
.gantt_page.gantt-scale-week .gantt_task_scale:not(:has(.gantt_scale_line:nth-child(2))) {
  background: rgb(228, 236, 247) !important;
  background-color: rgb(228, 236, 247) !important;
  color: rgb(51, 65, 85) !important;
  font-weight: 600 !important;
  border-right-color: rgb(220, 228, 238) !important;
  border-bottom-color: rgb(220, 228, 238) !important;
}
.gantt_page.gantt-scale-month .gantt_task_scale .gantt_scale_line,
.gantt_page.gantt-scale-month .gantt_task_scale .gantt_scale_cell:not(.gantt_today) {
  background: rgb(210, 224, 242) !important;
  background-color: rgb(210, 224, 242) !important;
  color: rgb(31, 41, 55) !important;
  font-weight: 700 !important;
  border-right-color: rgb(184, 201, 222) !important;
  border-bottom-color: rgb(184, 201, 222) !important;
}
.gantt_grid_data .gantt_row,
.gantt_grid_data .gantt_row.odd,
.gantt_grid_data .gantt_cell,
.gantt_task_row,
.gantt_task_cell:not(.gantt_today):not(.column_overload) {
  background-color: #fff;
}
.gantt_cell,
.gantt_row,
.gantt_task_row,
.gantt_task_cell {
  border-color: #e2e8f0;
}
.gantt_task_cell {
  border-right-color: #e2e8f0;
}
.gantt_resource_summary_panel,
.gantt_resource_summary_panel .gantt_layout_cell,
.gantt_resource_summary_panel .gantt_layout_content,
.gantt_resource_summary_label {
  background: #dce7f5 !important;
  background-color: #dce7f5 !important;
  color: #344054 !important;
  font-weight: 600 !important;
}
.gantt_summary_col_remainder_ok {
  background-color: #d4edda !important;
  color: #1e6b3a !important;
}
.gantt_summary_col_remainder_over {
  background-color: #f8d7da !important;
  color: #8b2635 !important;
}

.cat-panel-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #eef0f4;
}

.wc-page { display: flex; flex-direction: column; min-height: 0; }
.wc-toolbar { margin-bottom: 8px; }
.wc-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted, #6b7280); }
.wc-wrap + .wc-legend { margin: 10px 2px 0; }
.wc-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.wc-legend i.is-zero { background: #f1416c; }
.wc-legend i.is-short { background: #ff9f1a; }
.wc-legend i.is-ok { background: #1bc5bd; }
.wc-legend i.is-over { background: #8950fc; }
.wc-wrap { overflow: auto; border: 1px solid var(--line, #e4e6ef); border-radius: 8px; background: var(--card, #fff); max-height: calc(100vh - 180px); }
.wc-table { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.wc-table th, .wc-table td { padding: 5px 6px; border-bottom: 1px solid var(--line, #eef0f4); text-align: center; white-space: nowrap; }
.wc-table th { position: sticky; top: 0; background: var(--page, #f8f9fc); font-weight: 600; font-size: 11px; color: var(--muted, #7e8299); z-index: 2; }
.wc-table th span { display: block; font-size: 10px; font-weight: 500; color: var(--muted, #7e8299); }
.wc-table th.is-today, .wc-table td.is-today { box-shadow: inset 0 -2px 0 #3699ff; }
.wc-name { text-align: left !important; position: sticky; left: 0; background: var(--card, #fff); z-index: 1; min-width: 180px; }
.wc-table th.wc-name { z-index: 3; background: var(--panel-2, #f8f9fc); }
.wc-person { border: 0; background: transparent; padding: 0; font: inherit; font-weight: 650; color: inherit; cursor: pointer; text-align: left; }
.wc-person:hover { color: #3699ff; }
.wc-miss { color: #f1416c; font-weight: 700; }
.wc-over { color: #8950fc; font-weight: 700; }
.wc-cell.is-zero { background: #ffe8ee; color: #f1416c; font-weight: 700; }
.wc-cell.is-short { background: #fff4e6; color: #c2410c; font-weight: 700; }
.wc-cell.is-ok { background: #e6f8f4; color: #0f766e; }
.wc-cell.is-over { background: #f3e8ff; color: #6d28d9; font-weight: 700; }
.wc-cell.is-future { color: var(--muted, #a1a5b7); }
.wc-cell.is-off { color: var(--muted, #a1a5b7); }
.wc-cell { cursor: pointer; }
.wc-cell:hover { filter: brightness(0.96); }
.wc-pop {
  position: fixed;
  z-index: 4000;
  width: 340px;
  max-height: min(420px, calc(100vh - 24px));
  overflow: auto;
  background: var(--card, #fff);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  padding: 12px;
  box-sizing: border-box;
}
.wc-pop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; }
.wc-pop-who { font-size: 13px; font-weight: 700; color: #1e3a5f; }
.wc-pop-date { font-size: 12px; color: #64748b; margin-top: 2px; }
.wc-pop-x { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 6px; color: #6b7280; font-size: 18px; line-height: 1; cursor: pointer; }
.wc-pop-x:hover { background: #f3f4f6; }
.wc-pop-sum { font-size: 12px; font-weight: 600; color: #64748b; margin: 0 0 8px; }
.wc-pop-empty { font-size: 13px; color: #7e8299; padding: 6px 0 2px; }
.wc-pop-entry { padding: 7px 0; border-bottom: 1px solid #f3f4f6; }
.wc-pop-entry:last-child { border-bottom: 0; }
.wc-pop-meta { font-size: 12px; color: #3f4254; }
.wc-pop-task { font-size: 13px; color: #1f2937; margin-top: 2px; }
.wc-pop-opis { font-size: 12px; color: #7e8299; margin-top: 2px; }
.wc-note { margin: 8px 0 0; font-size: 12px; color: var(--muted, #7e8299); }
.wc-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #f4f6fb;
  font-weight: 700;
  border-top: 2px solid #e4e6ef;
}
.wc-table tfoot td.wc-name { z-index: 4; }
.wc-year { margin: 14px 0 8px; font-size: 15px; color: #1e3a5f; }
.wc-sum-wrap { margin-bottom: 8px; }
.wc-sum th[data-wc-open], .wc-mcell, .wc-sum tfoot td[data-wc-open] { cursor: pointer; }
.wc-mcell b { display: block; font-weight: 700; }
.wc-mcell small { display: block; font-size: 10px; font-weight: 600; color: #c2410c; }
.wc-mcell.is-miss { background: #fff4e6; }
.wc-mcell.is-ok { background: #e6f8f4; }
.wc-mcell.is-over { background: #f3e8ff; }
.wc-mcell.is-over small { color: #6d28d9; }
.wc-total {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line, #e4e6ef);
  border-radius: 8px;
  background: var(--card, #fff);
  font-size: 13px;
  color: #5e6278;
}
.wc-total > span:first-child { font-weight: 700; color: #1e3a5f; margin-right: 6px; }
.wc-total b { color: #1f2937; }
.wc-total-gap { width: 10px; }
.wc-files { display: flex; flex-direction: column; gap: 12px; }
.wc-file {
  border: 1px solid var(--line, #e4e6ef);
  border-radius: 10px;
  background: var(--card, #fff);
  padding: 12px 14px 14px;
}
.wc-file-person {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #1e3a5f;
  cursor: pointer;
}
.wc-file-person:hover { color: #3699ff; }
.wc-file-year { margin-top: 12px; }
.wc-file-year-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #3148a8;
}
.wc-file-year-h small { font-weight: 600; color: #7e8299; }
.wc-file-months {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.wc-month {
  text-align: left;
  border: 1px solid #e4e6ef;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.wc-month:hover { border-color: #3699ff; }
.wc-month b { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #7e8299; }
.wc-month span { display: block; margin-top: 2px; font-size: 14px; font-weight: 700; color: #1f2937; }
.wc-month small { display: block; margin-top: 2px; font-size: 11px; color: #7e8299; }
.wc-month.is-miss { background: #fff5f7; border-color: #fecdd3; }
.wc-month.is-miss small { color: #f1416c; }
.wc-month.is-ok { background: #f3fbf9; border-color: #b7ebe6; }
.wc-month.is-over { background: #f8f5ff; border-color: #ddd6fe; }
.wc-month.is-over small { color: #6d28d9; }
@media (max-width: 900px) {
  .wc-file-months { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Nagłówki tabel w zakładkach projektu: kolumny i grupy. */
html:not([data-color-scheme="dark"]) #projektProfil thead th,
html:not([data-color-scheme="dark"]) #projektProfil .prp-scroll .prp-table thead th,
html:not([data-color-scheme="dark"]) #projektProfil #prpMpkTable th.prp-mpk-sub-koszty,
html:not([data-color-scheme="dark"]) #projektProfil #prpMpkTable th.prp-mpk-sub-plan,
html:not([data-color-scheme="dark"]) #projektProfil #prpMpkTable th.prp-mpk-sub-laczne,
html:not([data-color-scheme="dark"]) #projektProfil #prpWynikTable th.prp-mpk-sub-laczne,
html:not([data-color-scheme="dark"]) #projektProfil #prpProgTable th.prp-mpk-sub-laczne,
html:not([data-color-scheme="dark"]) #projektProfil #prpProgTable th.prp-mpk-sub-plan,
html:not([data-color-scheme="dark"]) #projektProfil #prpProgTable th.prp-mpk-sub-koszty {
  background: rgb(226, 235, 247);
  background-color: rgb(226, 235, 247);
  color: rgb(55, 70, 92);
  font-weight: 700;
  border-bottom: 1px solid rgb(190, 205, 225);
  box-shadow: inset 0 -1px 0 rgb(190, 205, 225);
}
html:not([data-color-scheme="dark"]) #projektProfil thead tr:first-child th[colspan],
html:not([data-color-scheme="dark"]) #projektProfil thead th.prp-mpk-grp-koszty,
html:not([data-color-scheme="dark"]) #projektProfil thead th.prp-mpk-grp-plan {
  background: rgb(210, 224, 243);
  background-color: rgb(210, 224, 243);
  color: rgb(55, 70, 92);
}
#prpProgZakGroup .ctrl-group-label { white-space: nowrap; }
#prpProgZakBtns .prp-prog-zak-btn {
  height: 26px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 5px;
}
.fk-pack-lab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
  font-weight: 600;
}
.fk-pack-lab input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
}
html:not([data-color-scheme="dark"]) #projektProfil .prp-ov-table thead th {
  background: transparent;
  background-color: transparent;
  color: rgb(55, 70, 92);
  font-weight: 700;
  border-bottom: 2px solid rgb(55, 70, 92);
  box-shadow: none;
}

/* Nagłówki kolumn list w Workspace, Finanse i Planowanie. */
html:not([data-color-scheme="dark"]) :is(
  #tab-projects,
  #tab-calendar,
  #tab-timesheet,
  #tab-employees,
  #tab-employee,
  #tab-leave-requests,
  #tab-contractors,
  #tab-contractor,
  #tab-contracts,
  #tab-fk,
  #tab-invoices,
  #tab-wynik,
  #tab-common-costs,
  #tab-timesheet-reports,
  #tab-tasks,
  #tab-harmonogramy,
  #tab-occupancy
) thead th {
  background: rgb(226, 235, 247) !important;
  background-color: rgb(226, 235, 247) !important;
  color: rgb(55, 70, 92) !important;
  font-weight: 700 !important;
  border-bottom-color: rgb(190, 205, 225) !important;
  box-shadow: inset 0 -1px 0 rgb(190, 205, 225);
}
html:not([data-color-scheme="dark"]) :is(#tab-timesheet, #tab-timesheet-reports) .wc-table th,
html:not([data-color-scheme="dark"]) #tab-occupancy #occ_here .gantt_grid_head_cell {
  background: rgb(226, 235, 247) !important;
  background-color: rgb(226, 235, 247) !important;
  color: rgb(55, 70, 92) !important;
  font-weight: 700 !important;
  border-bottom-color: rgb(190, 205, 225) !important;
}
html:not([data-color-scheme="dark"]) :is(#tab-timesheet, #tab-project) :is(#cpTable, #prpCpTable) thead th :is(.cp-th-dow, .cp-th-date),
html:not([data-color-scheme="dark"]) :is(#tab-timesheet, #tab-timesheet-reports) .wc-table th span {
  color: rgb(55, 70, 92) !important;
  font-weight: 700 !important;
}
