/* Organizer — kolory i rozmiary jak WWW (organizer-realizacja) */
.cal-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1f2937;
  width: 100%;
  max-width: 100%;
  --cp-accent: #4e73df;
  --cp-accent-soft: #c5d4f7;
  --cp-accent-soft-fg: #3148a8;
}
.cal-page-title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.2;
}
.cal-tab-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid #eef0f4;
  margin: 0 0 10px;
  position: relative;
  z-index: 8;
}
.cal-tabs {
  display: flex;
  align-items: center;
  gap: 0;
}
.cal-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;
}
.cal-tab:hover { color: #3f4254; }
.cal-tab.is-active {
  color: var(--cp-accent);
  border-bottom-color: var(--cp-accent);
  font-weight: 600;
}
.cal-tab-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.cal-tab-bar-actions > .flt-wrap {
  margin-left: auto;
}
.cal-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;
}
.cal-btn:hover { background: #f9f9f9; border-color: #b5b5c3; }
.cal-btn-primary {
  background: #4e73df;
  border-color: #4e73df;
  color: #fff;
  font-weight: 500;
}
.cal-btn-primary:hover {
  background: #3b5cc9;
  border-color: #3b5cc9;
  color: #fff;
}

.cal-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

#calBox.fc {
  font-family: inherit;
  max-width: 100%;
  font-size: 13px;
}
#calBox.fc .fc-toolbar-title {
  font-size: 13px !important;
  font-weight: 600;
  color: #1f2937;
  line-height: 32px;
}
/* FC: #calBox jest korzeniem .fc — nie .fc .fc-button wewnątrz potomka */
.cal-page #calBox.fc .fc-button,
.cal-page #calBox.fc .fc-button-primary,
.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;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 12px !important;
  margin: 0 !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  text-transform: none !important;
  vertical-align: middle !important;
}
.cal-page #calBox.fc .fc-button-group > .fc-button,
#tab-calendar #calBox.fc .fc-button-group > .fc-button {
  padding: 0 12px !important;
}
.cal-page #calBox.fc .fc-button .fc-icon,
#tab-calendar #calBox.fc .fc-button .fc-icon {
  font-size: 13px !important;
  line-height: 1 !important;
  width: 1em !important;
  height: 1em !important;
  vertical-align: middle !important;
}
.cal-page #calBox.fc .fc-prev-button,
.cal-page #calBox.fc .fc-next-button,
#tab-calendar #calBox.fc .fc-prev-button,
#tab-calendar #calBox.fc .fc-next-button {
  padding: 0 8px !important;
  min-width: 32px !important;
}
#calBox.fc .fc-button-group {
  display: inline-flex;
  gap: 0;
  align-items: center;
}
#calBox.fc .fc-toolbar-chunk {
  display: flex;
  align-items: center;
  gap: 6px;
}
#calBox.fc .fc-header-toolbar {
  margin-bottom: 8px;
  gap: 8px;
  align-items: center;
}
#calBox.fc .fc-button-primary {
  background: #fff !important;
  border: 1px solid #d1d5db !important;
  color: #374151 !important;
}
#calBox.fc .fc-button-primary:hover {
  background: #eef3ff !important;
  border-color: #c5d4f7 !important;
  color: #3148a8 !important;
}
#calBox.fc .fc-button-primary:disabled {
  opacity: 0.45;
  background: #fff !important;
  color: #9ca3af !important;
}
#calBox.fc .fc-button-primary:not(:disabled).fc-button-active,
#calBox.fc .fc-button-primary:not(:disabled):active {
  background: #c5d4f7 !important;
  border-color: #b8c9f4 !important;
  color: #3148a8 !important;
}

#calBox .fc-day-sat,
#calBox .fc-day-sun { background-color: #f3f4f6; }
#calBox .fc-col-header-cell.fc-day-sat,
#calBox .fc-col-header-cell.fc-day-sun { background-color: #e5e7eb; }
#calBox .fc-timegrid-col.fc-day-sat,
#calBox .fc-timegrid-col.fc-day-sun { background-color: #f3f4f6; }
#calBox .fc-day-sat.fc-day-today,
#calBox .fc-day-sun.fc-day-today { background-color: #e8edf3; }
#calBox .fc-day-mon.fc-day-today,
#calBox .fc-day-tue.fc-day-today,
#calBox .fc-day-wed.fc-day-today,
#calBox .fc-day-thu.fc-day-today,
#calBox .fc-day-fri.fc-day-today { background-color: #fff8e6; }

#calBox .fc-col-header-cell-cushion {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  padding: 8px 4px;
}
#calBox .fc-daygrid-day-number {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 8px;
  color: #374151;
}
#calBox .fc-daygrid-day-frame { min-height: 92px; }
#calBox .fc-daygrid-event {
  margin: 1px 3px;
  border-radius: 4px;
}
#calBox .fc-event {
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.25;
  padding: 1px 5px 2px;
}
/* Pastelowe tła zadań — JS ustawia kolory; CSS jako fallback gdy brak inline */
#calBox .fc-event.fc-event-zadanie {
  background: #d0e3f3;
  border-color: #a8c5dd;
  border-left: 4px solid #7a94e8;
  color: #004080;
}
#calBox .fc-event.fc-event-oblozenie {
  background: #c7e9d5;
  border-color: #86efac;
  border-left: 4px solid #50cd89;
  color: #14532d;
}
/* Zaległe → dziś (Aktualne) — jak Obciążenie .is-overdue */
#calBox .fc-event.fc-event-overdue {
  background: #ffedd5 !important;
  border-color: #fdba74 !important;
  border-left: 4px solid #fb923c !important;
  color: #9a3412 !important;
}
#calBox .fc-event.fc-event-done {
  background: #e5e7eb;
  border-color: #d1d5db;
  border-left-color: #9ca3af;
  color: #4b5563;
}
#calBox .fc-event.fc-event-reject {
  background: #fecaca;
  border-color: #fca5a5;
  border-left-color: #f87171;
  color: #7f1d1d;
}
#calBox .fc-event.fc-event-szansa {
  background: #e5e7eb !important;
  border-color: #d1d5db !important;
  border-left-color: #9ca3af !important;
  color: #4b5563 !important;
}
#calBox .fc-event-title-with-osoba {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  gap: 1px;
  white-space: normal;
}
#calBox .fc-event-title-with-osoba strong {
  font-weight: 600;
  font-size: 12px;
}
#calBox .fc-event-title-with-osoba small {
  font-size: 11px;
  opacity: 0.9;
}
#calBox .fc-event-title-with-osoba .fc-event-projekt {
  font-size: 11px;
  font-style: italic;
  opacity: 0.85;
}
#calBox .fc-list-event-title { font-size: 13px; }
#calBox .fc-list-day-cushion { font-size: 13px; }
#calFltBtn.has-filters {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}
