/* Obłożenie pełne – 20260824c: host w app-main + instancja Gantt v9 */
:root {
  --obl-pastel-ok-bg: #dcfce7;
  --obl-pastel-ok-fg: #166534;
  --obl-pastel-over-bg: #fee2e2;
  --obl-pastel-over-fg: #991b1b;
  --obl-pastel-task-bg: #d0e3f3;
  --obl-pastel-task-fg: #004080;
  --obl-pastel-task-border: #a8c5dd;
  --obl-pastel-overdue-bg: #ffedd5;
  --obl-pastel-overdue-fg: #9a3412;
  --obl-pastel-overdue-border: #fdba74;
  --obl-accent: #4e73df;
  --obl-drawer-width: 360px;
}

.obl-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1f2937;
  padding: 12px 16px 8px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  position: relative;
}

.obl-page.obl-chosen-open {
  overflow: visible;
}

.obl-page.obl-filters-open,
.obl-page.obl-chosen-open {
  overflow: visible !important;
}

.obl-page.obl-filters-open .obl-header,
.obl-page.obl-chosen-open .obl-header {
  z-index: 200;
}

.obl-page.obl-drawer-open .obl-gantt {
  margin-right: 0;
}

html.obl-fixed-view,
body.obl-fixed-view {
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100% !important;
}

.obl-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
  flex: 0 0 auto;
  position: relative;
  z-index: 80;
  overflow: visible;
}

.obl-header-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: 100%;
  overflow: visible;
}

.obl-header h1,
.obl-page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.2;
}

.obl-tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid #eef0f4;
  margin: 0;
  position: relative;
  z-index: 50;
  overflow: visible;
}

.obl-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: none;
  margin: 0;
  flex: 0 0 auto;
}

.obl-tab {
  appearance: none;
  border: 0;
  background: transparent;
  height: 38px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #5e6278;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.obl-tab:hover {
  color: #3f4254;
}

.obl-tab.is-active {
  color: var(--obl-accent);
  border-bottom-color: var(--obl-accent);
}

.obl-tab-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.obl-user {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.obl-user[hidden] {
  display: none !important;
}

.obl-page.obl-chosen-open .obl-tab-bar,
.obl-page.obl-filters-open .obl-tab-bar {
  overflow: visible;
}

.obl-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.obl-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.obl-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-left: auto;
  position: relative;
  z-index: 90;
  overflow: visible;
}

.obl-nav {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.obl-tree-btns {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.obl-toolbar-sep {
  color: #c4c7d4;
  font-size: 14px;
  line-height: 1;
  user-select: none;
}

.obl-icon-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #e4e6ef;
  border-radius: 6px;
  background: #fff;
  color: #3f4254;
  cursor: pointer;
}

.obl-icon-btn:hover {
  background: #f3f4f6;
}

.obl-icon-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}

.obl-nav button,
.obl-nav input,
.obl-view-btn,
#btnRefresh,
#btnFilters,
#occFltBtn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e4e6ef;
  border-radius: 6px;
  background: #fff;
  color: #3f4254;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  white-space: nowrap;
}

.obl-nav button:hover,
.obl-nav input:hover,
.obl-view-btn:hover,
#btnRefresh:hover,
#btnFilters:hover,
#occFltBtn:hover {
  background: #f3f4f6;
}

.obl-view-btn.is-active,
#occToday.is-active {
  background: #4e73df;
  border-color: #4e73df;
  color: #fff;
}

.obl-view-btn.is-active:hover,
#occToday.is-active:hover {
  background: #7a94e8;
  border-color: #7a94e8;
  color: #fff;
}

#occPrev,
#occNext {
  min-width: 32px;
  padding: 0 10px;
  font-size: 16px;
  line-height: 1;
}

#occPrev.is-disabled,
#occPrev:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.obl-range-label {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-width: 148px;
  padding: 0 12px;
  border: 1px solid #e4e6ef;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
}

.obl-weekend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e4e6ef;
  border-radius: 6px;
  background: #fff;
  color: #3f4254;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  box-sizing: border-box;
}

.obl-weekend-toggle input {
  margin: 0;
  cursor: pointer;
}

.obl-weekend-toggle:hover {
  background: #f3f4f6;
}

#btnRefresh {
  border: 1px solid #e4e6ef;
  background: #fff;
  color: #3f4254;
  font-weight: 500;
}

#btnRefresh:hover {
  background: #f3f4f6;
}

#tab-occupancy #occFltBtn {
  background: #fff;
  border: 1px solid #e4e6ef;
  color: #3f4254;
}

#tab-occupancy #occFltBtn:hover {
  background: #f3f4f6;
}

#tab-occupancy #occFltBtn.has-filters {
  background: #fff;
  border-color: #e4e6ef;
  color: #3f4254;
}

#tab-occupancy #occLoadMode.um-view-seg {
  height: 32px;
  box-sizing: border-box;
  flex-shrink: 0;
}

#tab-occupancy #occLoadMode .um-view-btn {
  height: 100%;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
}

#btnFilters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3f4f6;
}

#occFltBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#btnFilters.has-filters {
  border-color: var(--obl-accent);
  color: #1e3a8a;
  background: #eff6ff;
}

.obl-filter-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 2px;
  border-top-width: 4px;
  box-sizing: border-box;
  opacity: 0.75;
}

/* —— Popover Filtry —— */
.obl-filters-wrap {
  position: relative;
  z-index: 60;
}

.obl-filters-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 640px;
  max-width: min(640px, 96vw);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  padding: 16px 18px;
  box-sizing: border-box;
  z-index: 120;
  overflow: visible;
  color: #111827;
}

.obl-filters-popover[hidden] {
  display: none !important;
}

.obl-filters-popover.obl-shown {
  display: block !important;
}

.obl-filters-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 15px;
}

.obl-link-btn {
  border: none;
  background: transparent;
  color: #5b7c9a;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 4px;
}

.obl-link-btn:hover {
  color: #3d5a73;
  text-decoration: underline;
}

.obl-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--obl-accent);
  border-radius: 6px;
  background: #fff;
  color: var(--obl-accent);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}

.obl-btn-outline:hover:not(:disabled) {
  background: #eff6ff;
}

.obl-btn-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.obl-plus {
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
}

.obl-filters-active {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.obl-filter-add-wrap {
  position: relative;
  margin-top: 10px;
}

.obl-btn-outline .obl-chevron {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--obl-accent);
}

.obl-filter-type-menu {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  width: min(280px, 100%);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 8px;
  z-index: 80;
  box-sizing: border-box;
}

.obl-filter-type-menu[hidden] {
  display: none !important;
}

.obl-filter-type-menu.obl-shown {
  display: block !important;
}

.obl-filter-type-search {
  margin-bottom: 6px;
}

.obl-filter-type-search input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  background: #f9fafb;
  color: #374151;
}

.obl-filter-type-opt {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #111827;
  cursor: pointer;
}

.obl-filter-type-opt:hover {
  background: #f3f4f6;
}

.obl-filter-type-opt[hidden] {
  display: none !important;
}

.obl-filter-row {
  display: grid;
  grid-template-columns: 130px 1fr 36px;
  gap: 10px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.obl-filter-row[hidden] {
  display: none !important;
}

.obl-filter-row.obl-shown {
  display: grid !important;
}

.obl-filter-row-static {
  grid-template-columns: 130px 1fr;
}

.obl-filter-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 0;
}

.obl-filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.obl-filter-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--obl-accent);
}

.obl-filter-row.is-open {
  z-index: 40;
}

.obl-filter-type {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
}

.obl-filter-value {
  min-width: 0;
}

.obl-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.obl-icon-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.obl-filters-popover .chosen-container,
.obl-filters-popover .chosen-container-multi {
  width: 100% !important;
  font-size: 13px;
  z-index: 1;
  position: relative;
}

.obl-filters-popover .chosen-container.chosen-with-drop,
.obl-filters-popover .chosen-container.obl-force-open {
  z-index: 50 !important;
}

/* Jedna ramka „Wybierz…” + strzałka w dół (jak select) */
.obl-filters-popover .chosen-container-multi::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 18px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #9ca3af;
  pointer-events: none;
  z-index: 3;
}

.obl-filters-popover .chosen-container .chosen-drop {
  z-index: 60 !important;
  position: absolute !important;
  top: 100% !important;
  left: -9999px !important;
  right: auto !important;
  width: 100% !important;
  border: 1px solid #5897fb;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  max-height: none !important;
  overflow: visible !important;
  display: none !important;
  margin-top: 2px;
  border-radius: 6px;
}

.obl-filters-popover .chosen-container.chosen-with-drop .chosen-drop,
.obl-filters-popover .chosen-container.obl-force-open .chosen-drop {
  left: 0 !important;
  right: 0 !important;
  display: block !important;
}

.obl-filters-popover .chosen-container .chosen-results {
  max-height: 280px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin: 0;
  padding: 0 0 6px;
}

.obl-filters-popover .chosen-choices {
  min-height: 36px;
  padding: 5px 28px 5px 8px !important;
  border-radius: 6px !important;
  background: #fff !important;
  border: 1px solid #d1d5db !important;
  box-shadow: none !important;
  box-sizing: border-box;
}

.obl-filters-popover .chosen-container-active .chosen-choices,
.obl-filters-popover .chosen-container-active.chosen-with-drop .chosen-choices {
  border-color: #93c5fd !important;
  box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.35) !important;
}

.obl-filters-popover .chosen-choices li.search-field {
  margin: 0 !important;
  padding: 0 !important;
}

.obl-filters-popover .chosen-choices li.search-field input[type="text"] {
  height: 24px !important;
  line-height: 24px !important;
  margin: 0 !important;
  padding: 0 2px !important;
  color: #6b7280 !important;
  font-size: 13px !important;
}

.obl-filters-popover .chosen-choices li.search-choice {
  margin: 2px 4px 2px 0 !important;
  border-radius: 4px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
}

.obl-status {
  min-height: 20px;
  margin-top: 8px;
  margin-bottom: 0;
  color: #6b7280;
  font-size: 0.9rem;
  flex: 0 0 auto;
}

.obl-status.is-error {
  color: #b91c1c;
}

.obl-gantt-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  color: #b91c1c;
  font-weight: 600;
  background: #fff5f5;
  border: 1px dashed #fecaca;
  border-radius: 10px;
  box-sizing: border-box;
}

.obl-gantt {
  width: 100%;
  flex: 1 1 auto;
  min-height: 220px;
  height: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  transition: margin-right 0.2s ease;
}

#occ_here .gantt_layout_cell[data-cell-id="resources"] .gantt_grid,
#occ_here .gantt_resource_grid,
#occ_here .gantt_grid_data,
#occ_here .gantt_grid {
  min-width: 280px;
}

#occ_here .gantt_layout_outer > .gantt_layout_cell > .gantt_layout_content > .gantt_layout_cell:first-child {
  min-width: 280px !important;
  width: 280px;
}

.obl-person {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 2px;
  line-height: 1.25;
}

.obl-person-name {
  font-weight: 600;
  font-size: 13px;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obl-person-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
}

.obl-person-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  min-width: 48px;
}

.obl-person-bar > span {
  display: block;
  height: 100%;
  background: #86efac;
  border-radius: 999px;
}

.obl-person-bar.is-over > span {
  background: #fca5a5;
}

.obl-person-pct {
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: right;
}

.obl-project {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 2px 0 2px 2px;
  line-height: 1.25;
}

.obl-project-icon {
  flex: 0 0 auto;
  margin-top: 2px;
  color: #6b7280;
  display: inline-flex;
}

.obl-project-body {
  min-width: 0;
  flex: 1;
}

.obl-project-name {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obl-project-dates {
  font-size: 10px;
  color: #6b7280;
}

.obl-task {
  padding: 2px 0 2px 2px;
  line-height: 1.25;
  cursor: pointer;
}

.obl-task-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--obl-pastel-task-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obl-task-dates {
  font-size: 10px;
  color: #6b7280;
}

/* Komórki load diagramu — pastel */
.resource_marker {
  text-align: center;
  /* NIE ustawiać position — Gantt wymaga absolute na .gantt_resource_marker */
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}

#occ_here .gantt_resource_marker {
  position: absolute !important;
}

.resource_marker .obl-cell {
  width: calc(100% - 8px);
  min-height: 24px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  margin: 2px 0;
  padding: 0 3px;
  box-sizing: border-box;
  white-space: nowrap;
}

.resource_marker .obl-cell .obl-cell-sep {
  opacity: 0.55;
  font-weight: 500;
  margin: 0 1px;
}

.resource_marker .obl-cell.is-over {
  color: #b42318;
}

#occ_here.obl-scale-week .resource_marker .obl-cell-week,
#occ_here.obl-scale-month .resource_marker .obl-cell-week,
#occ_here.obl-scale-month .resource_marker .obl-cell-month {
  min-height: 28px;
  font-size: 11px;
  padding: 0 4px;
  flex-wrap: wrap;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
}

#occ_here.obl-scale-month .gantt_scale_cell {
  white-space: nowrap;
  font-weight: 600;
}

#occ_here.obl-scale-week .gantt_scale_cell,
#occ_here.obl-scale-month .gantt_scale_cell,
#occ_here.obl-scale-day .gantt_scale_cell {
  white-space: nowrap;
}

#occ_here.obl-scale-week .gantt_task_scale {
  line-height: 1.15;
}

#occ_here.obl-scale-week .gantt_task_scale .gantt_scale_line:last-child .gantt_scale_cell {
  font-size: 11px;
  font-weight: 500;
  color: #5e6278;
}

.resource_marker.workday_ok .obl-cell {
  background: var(--obl-pastel-ok-bg);
  color: var(--obl-pastel-ok-fg);
}

.resource_marker.workday_over .obl-cell {
  background: var(--obl-pastel-over-bg);
  color: var(--obl-pastel-over-fg);
}

.resource_marker.workday_empty .obl-cell {
  display: none;
}

.resource_marker.obl-project-marker {
  overflow: visible !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  line-height: normal !important;
}

.resource_marker.obl-project-bars-host {
  overflow: visible !important;
  z-index: 8;
}

#occ_here.obl-scale-day .gantt_resource_marker.obl-project-bars-host {
  min-height: 88px;
  overflow: visible !important;
}

.obl-proj-bars {
  position: relative;
  width: 0;
  max-width: 0;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.obl-proj-bars .obl-tl-task {
  pointer-events: auto;
}

.obl-tl-task {
  position: absolute;
  box-sizing: border-box;
  border-radius: 6px;
  background: var(--obl-pastel-task-bg);
  border: 1px solid var(--obl-pastel-task-border);
  color: var(--obl-pastel-task-fg);
  padding: 5px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  box-shadow: none;
  overflow: hidden;
  z-index: 9;
}

.obl-tl-task.is-szansa,
.obl-task-bar-seg.is-szansa {
  background: #e5e7eb !important;
  border-color: #d1d5db !important;
  color: #4b5563 !important;
}
.obl-tl-task.is-szansa .obl-tl-task-title,
.obl-tl-task.is-szansa .obl-tl-task-dates,
.obl-tl-task.is-szansa .obl-tl-task-meta,
.obl-tl-task.is-szansa .obl-tl-task-hours,
.obl-tl-task.is-szansa .obl-task-path,
.obl-tl-task.is-szansa .obl-task-path span,
.obl-task-bar-seg.is-szansa .obl-task-bar-title,
.obl-task-bar-seg.is-szansa .obl-task-bar-hours {
  color: #4b5563 !important;
}

.obl-risk-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
  pointer-events: none;
  flex: 0 0 auto;
}
.obl-tl-task.is-risk-week .obl-risk-dot {
  background: #f59e0b;
}
.obl-tl-task.is-risk-day .obl-risk-dot {
  background: #ef4444;
}

.obl-tl-task:hover {
  filter: brightness(0.98);
}

.obl-tl-task.is-overdue {
  background: var(--obl-pastel-overdue-bg) !important;
  border-color: var(--obl-pastel-overdue-border) !important;
  color: var(--obl-pastel-overdue-fg) !important;
  z-index: 11;
}
.obl-tl-task.is-overdue .obl-tl-task-title,
.obl-tl-task.is-overdue .obl-tl-task-dates,
.obl-tl-task.is-overdue .obl-tl-task-meta,
.obl-tl-task.is-overdue .obl-tl-task-hours,
.obl-tl-task.is-overdue .obl-task-path,
.obl-tl-task.is-overdue .obl-task-path span {
  color: var(--obl-pastel-overdue-fg) !important;
}

.obl-tl-task-main {
  min-width: 0;
  flex: 1;
}

.obl-task-path {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  opacity: 0.72;
  margin-bottom: 1px;
}

.obl-task-path span {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.obl-task-path .obl-path-sep {
  color: inherit;
  opacity: 0.7;
  max-width: none;
}

.obl-tl-task-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--obl-pastel-task-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obl-tl-task-dates {
  font-size: 10px;
  font-weight: 500;
  color: var(--obl-pastel-task-fg);
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obl-tl-task-meta {
  font-size: 10px;
  font-weight: 500;
  color: var(--obl-pastel-task-fg);
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obl-tl-task-hours {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--obl-pastel-task-fg);
  padding-top: 2px;
  white-space: nowrap;
}

/* Weekendy — białe komórki, delikatne szare paski */
#occ_here .gantt_task_cell.week_end,
#occ_here .gantt_resource_cell.week_end,
#occ_here .gantt_resource_marker.week_end,
#occ_here .resource_marker.week_end,
#occ_here .gantt_scale_cell.week_end,
#occ_here .gantt_task .gantt_task_scale .gantt_scale_cell.week_end {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 5px,
    rgba(156, 163, 175, 0.08) 5px,
    rgba(156, 163, 175, 0.08) 10px
  ) !important;
  background-color: #ffffff !important;
}

.obl-task-bar-seg {
  position: absolute;
  left: 0;
  right: 0;
  height: 28px;
  box-sizing: border-box;
  background: var(--obl-pastel-task-bg);
  border-top: 1px solid var(--obl-pastel-task-border);
  border-bottom: 1px solid var(--obl-pastel-task-border);
  color: var(--obl-pastel-task-fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  pointer-events: auto;
  padding: 0 6px;
  z-index: 2;
}

.obl-task-bar-seg.is-start {
  border-left: 1px solid var(--obl-pastel-task-border);
  border-radius: 8px 0 0 8px;
  left: 3px;
  padding-left: 8px;
}

.obl-task-bar-seg.is-end {
  border-right: 1px solid var(--obl-pastel-task-border);
  border-radius: 0 8px 8px 0;
  right: 3px;
}

.obl-task-bar-seg.is-start.is-end {
  border-radius: 8px;
  left: 3px;
  right: 3px;
}

.obl-task-bar-seg:hover {
  filter: brightness(0.98);
}

.obl-tl-overlay {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}

.obl-tl-load {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 26px;
  border-radius: 6px;
  background: var(--obl-pastel-ok-bg);
  color: var(--obl-pastel-ok-fg);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-sizing: border-box;
}

.obl-tl-load.is-over {
  background: var(--obl-pastel-over-bg);
  color: var(--obl-pastel-over-fg);
}

/* Markery resource — overflow tylko dla hosta pasków projektu */
#occ_here .gantt_layout_cell[data-cell-id="resources"] .gantt_resource_marker.obl-project-bars-host {
  overflow: visible !important;
}

#occ_here .gantt_layout_cell[data-cell-id="resources"] .gantt_task_row,
#occ_here .gantt_layout_cell[data-cell-id="resources"] .gantt_resource_row,
#occ_here .gantt_layout_cell[data-cell-id="resources"] .gantt_task_bg {
  overflow: visible !important;
}

.obl-task-bar-title {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.obl-task-bar-hours {
  font-size: 11px;
  font-weight: 600;
  flex: 0 0 auto;
  opacity: 0.9;
}

#occ_here .gantt_grid_scale .gantt_grid_head_cell,
#occ_here .gantt_task .gantt_task_scale .gantt_scale_cell {
  font-weight: 600;
  font-size: 12px;
}

#occ_here .gantt_row,
#occ_here .gantt_resource_row {
  border-bottom: 1px solid #f1f5f9;
}

#occ_here .gantt_message_area {
  display: none !important;
}

#occ_here .obl-hidden-gantt,
#occ_here .gantt_layout_cell.obl-hidden-gantt {
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
#occ_here .obl-hidden-gantt .gantt_grid,
#occ_here .obl-hidden-gantt .gantt_task,
#occ_here .obl-hidden-gantt .gantt_layout_content {
  display: none !important;
}

/* stary drawer z poprzednich wersji — nigdy nie pokazuj */
#oblTaskDrawer,
#oblDrawerBackdrop {
  display: none !important;
}

/* —— Prawy panel (Bryntum-style) —— */
.obl-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
  z-index: 90;
}

.obl-task-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--obl-drawer-width);
  max-width: 94vw;
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 28px rgba(15, 23, 42, 0.12);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.22s ease;
}

.obl-task-drawer.is-open {
  transform: translateX(0);
}

.obl-task-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
  flex: 0 0 auto;
}

.obl-task-drawer-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.obl-drawer-close {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}

.obl-drawer-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.obl-task-drawer-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 16px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.obl-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.obl-field > span {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.obl-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  color: #111827;
  font-size: 14px;
}

.obl-task-drawer-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid #e5e7eb;
}

.obl-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #4e73df;
  border-radius: 6px;
  background: #4e73df;
  color: #fff;
  font-weight: 500;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.obl-btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.obl-btn-primary:hover:not(:disabled) {
  background: #3b5cc9;
  border-color: #3b5cc9;
  color: #fff;
}

.obl-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #4b5563;
  font-size: 13px;
  cursor: pointer;
}

.obl-btn-ghost:hover {
  background: #f3f4f6;
  color: #111827;
}

/* Obciążenie: content padding=0 (full height), inset na shellu = jak .content (12/16) */
.content:has(#tab-occupancy.occ-page:not(.hidden)) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
#tab-occupancy.occ-page:not(.hidden) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  padding: 0;
  max-width: none;
}
#tab-occupancy .obl-page {
  flex: 1;
  min-height: 0;
  height: 100%;
}
#tab-occupancy .obl-user { display: none; }
#tab-occupancy .flt-wrap { position: relative; z-index: 90; }
#tab-occupancy .flt-pop {
  z-index: 400;
  overflow: visible;
}
#tab-occupancy .flt-pop .flt-row {
  position: relative;
  z-index: 1;
}
#tab-occupancy .flt-pop .flt-row:has(.mpick.is-open),
#tab-occupancy .flt-pop .mpick.is-open {
  z-index: 50;
}
#tab-occupancy .flt-pop .mpick.is-open .mpick-drop {
  z-index: 60;
}
#tab-occupancy .obl-page.obl-filters-open .obl-header {
  z-index: 220;
  overflow: visible;
}
#occ_here { min-height: 220px; flex: 1; }

#tab-occupancy .gantt_tooltip,
.gantt_tooltip.obl-bar-tip {
  z-index: 10050 !important;
}

@media (max-width: 900px) {
  .obl-gantt {
    min-height: 200px;
  }

  .obl-range-label {
    min-width: 0;
  }

  .obl-filter-row {
    grid-template-columns: 1fr 32px;
  }

  .obl-filter-type {
    grid-column: 1 / -1;
  }
}
