/* =========================================================
   WK PLAN PAGE – uporządkowana wersja CSS
   ========================================================= */

/* =========================================================
   1. GŁÓWNY UKŁAD STRONY
   ========================================================= */

.wk-plan-page {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #1f2937;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,0.10) 0%, transparent 28%),
    radial-gradient(circle at top right, rgba(139,92,246,0.08) 0%, transparent 24%),
    linear-gradient(180deg, #eef4ff 0%, #f8fbff 38%, #f5f7fb 100%);
}

.wk-plan-page #plan-viewport {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.wk-plan-page #plan-wrapper {
  width: 85vw;
  max-width: 1600px;
  margin: 24px auto;
  padding: 0 15px 24px;
  box-sizing: border-box;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.wk-plan-page h2 {
  text-align: center;
  font-style: normal;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #17345f;
  margin: 18px 0 14px;
}

.wk-plan-page .selector-container {
  margin: 0 0 0 20px;
  padding: 5px;
  display: inline-block;
  vertical-align: top;
  width: fit-content;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
  text-align: center;
  font-size: 1.3em;
}

.wk-plan-page select {
  padding: 8px;
  font-size: 1.3em;
  line-height: 1.6em;
}

.wk-plan-page .tippy-box {
  white-space: pre-line;
  max-width: 400px;
  text-align: center;
}


/* =========================================================
   2. NAGŁÓWEK
   ========================================================= */

.wk-plan-page .headerNaglowek {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 200px;
  background: url('../images/logo_2.png') no-repeat center center;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  overflow: hidden;
  background-color: rgba(255,255,255,0.7);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.wk-plan-page .headerNaglowek img {
  width: 100%;
  max-width: 1200px;
  height: auto;
}

.wk-plan-page .logo {
  margin: 0 5px;
  min-height: 100px;
}

.wk-plan-page .clickable-area {
  position: absolute;
  width: 80px;
  height: 80px;
  background-color: rgba(255, 0, 0, 0);
  cursor: pointer;
}

.wk-plan-page .left-logo {
  top: 15px;
  left: 8.1%;
}

.wk-plan-page .right-logo {
  top: 15px;
  right: 51%;
}


/* =========================================================
   3. ZAKŁADKI
   ========================================================= */

.wk-plan-page .tab-container {
  display: flex;
  border-bottom: 2px solid #dbe7fb;
  margin-top: 24px;
  padding: 0 4px;
  gap: 10px;
}

.wk-plan-page .tab {
  padding: 12px 20px;
  cursor: pointer;
  background: #e9eef7;
  border-radius: 14px 14px 0 0;
  margin-right: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.wk-plan-page .tab:hover {
  background: #dde7f5;
  transform: translateY(-1px);
}

.wk-plan-page .tab.active {
  background: linear-gradient(135deg, #1677ff, #0f5fd7);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.20);
}

.wk-plan-page .sub-tab-container {
  display: flex;
  border-bottom: 2px solid #dbe7fb;
  margin: 0;
  padding: 8px 10px 0;
  gap: 8px;
}

.wk-plan-page .sub-tab {
  padding: 9px 16px;
  cursor: pointer;
  background: #eef2f7;
  border-radius: 12px 12px 0 0;
  margin-right: 0;
  transition: all 0.2s ease;
  color: #475569;
  font-weight: 600;
}

.wk-plan-page .sub-tab:hover {
  background: #e3eaf5;
  transform: translateY(-1px);
}

.wk-plan-page .sub-tab.active {
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

.wk-plan-page .tab-content {
  display: none;
  padding: 0;
  background: rgba(255,255,255,0.9);
  border: 1px solid #dbe4f0;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.wk-plan-page .tab-content.active {
  display: block;
  width: 100%;
}


/* =========================================================
   4. SELECTY / FILTRY
   ========================================================= */

.wk-plan-page #faculty-select,
.wk-plan-page #faculty-select-n,
.wk-plan-page #room-select,
.wk-plan-page #room-select-n,
.wk-plan-page #instructor-select,
.wk-plan-page #instructor-select-n {
  margin-bottom: 20px;
  padding: 10px 14px;
  font-size: 1.08rem;
  border-radius: 14px;
  border: 1px solid #d7dfeb;
  width: auto;
  min-height: 50px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wk-plan-page #faculty-select:focus,
.wk-plan-page #faculty-select-n:focus,
.wk-plan-page #room-select:focus,
.wk-plan-page #room-select-n:focus,
.wk-plan-page #instructor-select:focus,
.wk-plan-page #instructor-select-n:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.14);
}


/* =========================================================
   5. KONTENERY KALENDARZY
   ========================================================= */

.wk-plan-page #calendar-kierunek,
.wk-plan-page #calendar-kierunek-n,
.wk-plan-page #calendar-sala,
.wk-plan-page #calendar-instructor,
.wk-plan-page #calendar-sala-n,
.wk-plan-page #calendar-instructor-n {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 14px;
  min-height: 80vh;
  box-sizing: border-box;
  overflow-x: auto;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #e3ebf5;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}


/* =========================================================
   6. FULLCALENDAR – TOOLBAR I SIATKA
   ========================================================= */

.wk-plan-page .fc .fc-toolbar-title {
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  color: #17345f !important;
  letter-spacing: -0.02em;
}

.wk-plan-page .fc .fc-button {
  border-radius: 10px !important;
  border: 1px solid #d9e2f0 !important;
  background: #ffffff !important;
  color: #1e3a5f !important;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06) !important;
  transition: all 0.18s ease !important;
  font-weight: 700 !important;
}

.wk-plan-page .fc .fc-button:hover {
  background: #f8fbff !important;
  transform: translateY(-1px);
}

.wk-plan-page .fc .fc-button-primary:not(:disabled).fc-button-active,
.wk-plan-page .fc .fc-button-primary:not(:disabled):active {
  background: linear-gradient(135deg, #1677ff, #0f5fd7) !important;
  border-color: #0f5fd7 !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(22, 119, 255, 0.20) !important;
}

.wk-plan-page .fc-theme-standard td,
.wk-plan-page .fc-theme-standard th {
  border-color: #d9e2ef !important;
}

.wk-plan-page .fc-scrollgrid,
.wk-plan-page .fc-theme-standard .fc-scrollgrid {
  border-radius: 14px;
  overflow: hidden;
}

.wk-plan-page .fc-col-header-cell {
  background: #f7faff;
}

.wk-plan-page .fc-col-header-cell-cushion {
  color: #22599d !important;
  font-weight: 700 !important;
}

.wk-plan-page .fc-timegrid-slot {
  height: 35px !important;
}


/* =========================================================
   7. FULLCALENDAR – KOLUMNA GODZIN
   ========================================================= */

.wk-plan-page .fc .fc-timegrid-axis,
.wk-plan-page .fc .fc-timegrid-axis-frame,
.wk-plan-page .fc .fc-timegrid-slot-label,
.wk-plan-page .fc .fc-timegrid-slot-label-cushion {
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  box-sizing: border-box !important;
}

.wk-plan-page .fc .fc-timegrid-slot-label,
.wk-plan-page .fc .fc-timegrid-slot-label-cushion {
  font-weight: 600 !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
  text-align: right !important;
  padding-right: 8px !important;
  overflow: hidden !important;
  color: #475569 !important;
}


/* =========================================================
   8. FULLCALENDAR – WIDOK TYDZIEŃ / DZIEŃ
   ========================================================= */


.wk-plan-page .fc-timegrid-event {
  border: none !important;
  border-radius: 4px !important;
  height: 100% !important;
  min-height: 20px !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

.wk-plan-page .fc-timegrid-event-harness {
  margin-right: 1px !important;
}

.wk-plan-page .fc-timegrid-event .fc-event-main {
  height: 100% !important;
  padding: 2px 4px !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.wk-plan-page .fc-timegrid-event .fc-event-title,
.wk-plan-page .fc-timegrid-event .fc-event-time,
.wk-plan-page .fc-timegrid-event .fc-event-main {
  color: #fff !important;
  font-weight: normal !important;
  font-size: 0.9em !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow: hidden !important;
}

.wk-plan-page .fc-timegrid-event .fc-event-title {
  white-space: normal !important;
  overflow: hidden !important;
}

.wk-plan-page .fc-timegrid-event .fc-event-time {
  white-space: normal !important;
  font-weight: normal !important;
  overflow: hidden !important;
}




/* =========================================================
   9. WŁASNA TREŚĆ EVENTÓW (wk-time / wk-line / wk-chip)
   ========================================================= */

.wk-plan-page .wk-time {
  font-size: 10px !important;
  line-height: 1.05 !important;
  margin-bottom: 2px !important;
  color: #fff !important;
}

.wk-plan-page .wk-time b {
  display: block !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
}

.wk-plan-page .wk-line {
  font-size: 10px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  color: #fff !important;
}

.wk-plan-page .wk-chip {
  display: inline !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #fff !important;
  cursor: pointer !important;
  user-select: none !important;
}

.wk-plan-page .wk-chip:hover {
  text-decoration: underline !important;
}


/* =========================================================
   10. FULLCALENDAR – WIDOK MIESIĄC
   ========================================================= */

.wk-plan-page .fc-daygrid-event,
.wk-plan-page .fc-daygrid-event-harness,
.wk-plan-page .fc-daygrid-dot-event {
  max-width: 100% !important;
  overflow: hidden !important;
}

.wk-plan-page .fc-daygrid-event .fc-event-main,
.wk-plan-page .fc-daygrid-dot-event .fc-event-main {
  position: relative !important;
  overflow: hidden !important;
  padding: 4px 4px !important;
}

.wk-plan-page .fc-daygrid-event .fc-event-title,
.wk-plan-page .fc-daygrid-event .fc-event-time,
.wk-plan-page .fc-daygrid-dot-event .fc-event-title,
.wk-plan-page .fc-daygrid-dot-event .fc-event-time {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  word-break: normal !important;
  font-size: 8px !important;
  line-height: 1.15 !important;
  color: #fff !important;
}

/* godziny jedna pod drugą tylko w miesiącu */
.wk-plan-page .fc-daygrid-event .wk-time-month,
.wk-plan-page .fc-daygrid-dot-event .wk-time-month {
  float: left !important;
  width: 10px !important;
  margin-right: 8px !important;
  margin-top: 1px !important;
  margin-bottom: 1px !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  color: #fff !important;
}

.wk-plan-page .fc-daygrid-event .wk-time-month b,
.wk-plan-page .fc-daygrid-dot-event .wk-time-month b {
  display: block !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
  white-space: normal !important;
}

.wk-plan-page .fc-daygrid-event .wk-line,
.wk-plan-page .fc-daygrid-dot-event .wk-line {
  margin-left: 20px !important;
  padding-top: 1px !important;
  padding-bottom: 1px !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  color: #fff !important;
}


/* =========================================================
   11. TRYB „CAŁOŚĆ”
   ========================================================= */

/* ukrycie standardowego widoku FC */
.wk-plan-page .fc.fc-calosc-mode {
  min-height: 0 !important;
}

.wk-plan-page .fc.fc-calosc-mode .fc-view-harness,
.wk-plan-page .fc.fc-calosc-mode .fc-scroller-harness,
.wk-plan-page .fc.fc-calosc-mode .fc-scrollgrid,
.wk-plan-page .fc.fc-calosc-mode .fc-daygrid,
.wk-plan-page .fc.fc-calosc-mode .fc-timegrid {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* toolbar w trybie Całość */
.wk-plan-page .fc.fc-calosc-mode .fc-header-toolbar .fc-toolbar-chunk:nth-child(1),
.wk-plan-page .fc.fc-calosc-mode .fc-header-toolbar .fc-toolbar-chunk:nth-child(2) {
  display: none !important;
}

.wk-plan-page .fc.fc-calosc-mode .fc-header-toolbar.fc-toolbar {
  display: flex !important;
  justify-content: flex-end !important;
}

.wk-plan-page .fc.fc-calosc-mode .fc-header-toolbar .fc-toolbar-chunk:nth-child(3) {
  margin-left: auto !important;
}


/* =========================================================
   12. TABELA „CAŁOŚĆ”
   ========================================================= */

.wk-plan-page .scroll-container {
  display: none;
  width: 100%;
  height: 90vh;
  overflow: auto;
  position: relative;
  margin-top: 0 !important;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #e3ebf5;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.wk-plan-page .grid-container {
  display: grid;
  width: 95vw;
  transform-origin: top left;
  border-left: 1px solid rgba(0,0,0,.18);
  border-bottom: 1px solid rgba(0,0,0,.18);
  border-top: 1px solid rgba(0,0,0,.18);
}

.wk-plan-page .header-cell {
  background: linear-gradient(135deg, #1677ff, #0f5fd7);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  padding: 4px;
  border-bottom: 1px solid #dbe7fb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.wk-plan-page .date-cell {
  background: #f7faff;
  color: #0f2d57;
  font-weight: 800;
  font-size: 11px;
  text-align: center;
  border-bottom: 1px solid #d8e2f0;
  padding: 4px;
  position: relative;
}

.wk-plan-page .cell,
.wk-plan-page .break-cell {
  position: relative;
  border-bottom: 1px solid #d8e2f0;
  min-height: 50px;
}

.wk-plan-page .event {
  position: absolute;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  padding: 6px 8px;
  line-height: 1.25;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  box-sizing: border-box;
  z-index: 1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}


/* =========================================================
   13. STICKY HEADER DLA „CAŁOŚĆ”
   ========================================================= */

.wk-plan-page .n-sticky-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid #d0ddef;
  overflow: visible;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.wk-plan-page .n-sticky-content {
  width: max-content;
  transform-origin: 0 0;
  will-change: transform;
}

.wk-plan-page .n-sticky-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 10px;
  background: transparent;
}

.wk-plan-page .n-sticky-header-inner {
  display: grid;
  width: max-content;
}

.wk-plan-page .n-sticky-header .header-cell {
  background: linear-gradient(135deg, #1677ff, #0f5fd7);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  padding: 4px;
  border-bottom: 1px solid #dbe7fb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.wk-plan-page .n-sticky-header .header-break {
  background: transparent;
  border-bottom: 1px solid #dbe7fb;
}

.wk-plan-page .grid-container .header-cell,
.wk-plan-page .grid-container .header-break {
  display: none !important;
}


/* =========================================================
   14. ZOOM UI
   ========================================================= */

.wk-plan-page .n-zoombar {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin: 0 !important;
}

.wk-plan-page .n-zoombtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 52px !important;
  height: 38px !important;
  padding: 0 14px !important;
  border: 1px solid #d7dce5 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #1f2937 !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
  cursor: pointer !important;
}

.wk-plan-page .n-zoombtn:hover {
  background: #f8fafc !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12) !important;
  transform: translateY(-1px) !important;
}

.wk-plan-page .n-zoombtn:active {
  transform: translateY(0) scale(0.98) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}

.wk-plan-page .n-zoombtn:focus {
  outline: none !important;
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.18),
    0 6px 18px rgba(15, 23, 42, 0.12) !important;
}

.wk-plan-page .n-zoomlabel {
  display: inline-flex !important;
  align-items: center !important;
  height: 38px !important;
  padding: 0 8px !important;
  color: #334155 !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}


/* =========================================================
   15. PODSUMOWANIE GODZIN
   ========================================================= */

.wk-plan-page .hours-summary {
  width: min(900px, 95%);
  margin: 14px auto 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,.06);
}

.wk-plan-page .hours-summary h3 {
  margin: 4px 0 10px;
  text-align: center;
  font-size: 18px;
}

.wk-plan-page .hours-summary table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.wk-plan-page .hours-summary td {
  padding: 7px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.wk-plan-page .hours-summary tr:last-child td {
  border-bottom: none;
}

.wk-plan-page .hours-summary .hs-name {
  text-align: left;
  font-weight: 600;
}

.wk-plan-page .hours-summary .hs-hours {
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 700;
  white-space: nowrap;
}


/* =========================================================
   16. EXPORT BAR
   ========================================================= */

.wk-plan-page #export-bar {
  width: 100%;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  padding: 16px 10px 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  box-sizing: border-box;
}

.wk-plan-page #export-bar button {
  appearance: none;
  -webkit-appearance: none;
  min-width: 170px;
  padding: 11px 16px;
  border: 1px solid #d8e1ee;
  border-radius: 14px;
  cursor: pointer;
  background: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #1f2937;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transition: all 0.18s ease;
}

.wk-plan-page #export-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.10);
  background: #f8fbff;
}

.wk-plan-page #export-hint {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  padding-bottom: 12px;
  box-sizing: border-box;
}


/* =========================================================
   17. SEPARATORY I KOLORY W TABELI „CAŁOŚĆ”
   ========================================================= */

.wk-plan-page .grid-end-line {
  border-right: 1px solid rgba(15, 23, 42, 0.18) !important;
}

.wk-plan-page .grid-container .date-cell,
.wk-plan-page .grid-container .cell,
.wk-plan-page .grid-container .break-cell,
.wk-plan-page .grid-container .header-cell,
.wk-plan-page .grid-container .header-break,
.wk-plan-page .n-sticky-header .header-cell,
.wk-plan-page .n-sticky-header .header-break {
  border-left: none !important;
  border-right: none !important;
  box-shadow: none !important;
}

.wk-plan-page .grid-container .date-cell,
.wk-plan-page .grid-container .cell,
.wk-plan-page .grid-container .break-cell {
  border-bottom: 1px solid #d8e2f0 !important;
}

.wk-plan-page .grid-container .major-sep,
.wk-plan-page .n-sticky-header .major-sep {
  border-left: 1px solid rgba(15, 23, 42, 0.14) !important;
}

.wk-plan-page .grid-container .weekend-sep {
  border-top: 6px double rgba(15, 23, 42, 0.18) !important;
  box-shadow: none !important;
}

.wk-plan-page .grid-container .grid-end-line,
.wk-plan-page .n-sticky-header .grid-end-line {
  border-right: 1px solid rgba(15, 23, 42, 0.14) !important;
}

.wk-plan-page .grid-container .date-cell.date-friday {
  background: rgba(34, 197, 94, 0.14) !important;
  color: #14532d !important;
}

.wk-plan-page .grid-container .date-cell.date-saturday {
  background: rgba(59, 130, 246, 0.14) !important;
  color: #1e3a8a !important;
}

.wk-plan-page .grid-container .date-cell.date-sunday {
  background: rgba(239, 68, 68, 0.14) !important;
  color: #991b1b !important;
}

.wk-plan-page .grid-container .date-cell.blocked-day.date-friday,
.wk-plan-page .grid-container .date-cell.blocked-day.date-saturday,
.wk-plan-page .grid-container .date-cell.blocked-day.date-sunday {
  background: rgba(120, 120, 120, 0.24) !important;
  color: #334155 !important;
}


/* =========================================================
   18. RESPONSYWNOŚĆ
   ========================================================= */

@media (max-width: 991px) {
  .wk-plan-page #plan-wrapper {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 12px !important;
    border-radius: 0 !important;
  }
}

@media (max-width: 768px) {
  .wk-plan-page .headerNaglowek {
    width: 100%;
    height: auto;
    min-height: 80px;
    padding: 1px;
    border-radius: 16px;
  }

  .wk-plan-page .tab-container,
  .wk-plan-page .sub-tab-container {
    gap: 4px;
    overflow-x: auto;
  }

  .wk-plan-page .tab {
    padding: 8px 12px;
    font-size: 3.4vw;
  }

  .wk-plan-page .sub-tab {
    padding: 8px 12px;
    font-size: 3.3vw;
  }

  .wk-plan-page h2 {
    font-size: 5vw;
  }

  .wk-plan-page .filter-container {
    margin: 10px;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
  }

  .wk-plan-page .filter-container label {
    display: block;
    margin-bottom: 30px;
  }

  .wk-plan-page .filter-container select {
    width: 100%;
    max-width: 100%;
  }

  .wk-plan-page .fc .fc-timegrid-axis,
  .wk-plan-page .fc .fc-timegrid-axis-frame,
  .wk-plan-page .fc .fc-timegrid-slot-label,
  .wk-plan-page .fc .fc-timegrid-slot-label-cushion {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
  }

  .wk-plan-page .fc .fc-timegrid-slot-label,
  .wk-plan-page .fc .fc-timegrid-slot-label-cushion {
    font-size: 11px !important;
    padding-right: 6px !important;
  }

  .wk-plan-page .hours-summary {
    width: 98%;
    padding: 8px;
  }

  .wk-plan-page .hours-summary table {
    font-size: 13px;
  }

  .wk-plan-page .hours-summary .hs-hours {
    white-space: normal;
  }
}

.wk-plan-page .fc-timegrid-event .wk-time,
.wk-plan-page .fc-timegrid-event .wk-line,
.wk-plan-page .fc-timegrid-event .wk-chip {
  overflow: hidden !important;
  word-break: break-word !important;
}

.wk-plan-page .fc .fc-timeGridDay-view .wk-time {
  font-size: 14px !important;
  line-height: 1.1 !important;
}

.wk-plan-page .fc .fc-timeGridDay-view .wk-line {
  font-size: 14px !important;
  line-height: 1.25 !important;
}

/* =========================================================
   MOBILE – poprawione wyświetlanie na telefonie
   ========================================================= */
@media (max-width: 768px) {
  .wk-plan-page #plan-wrapper {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 8px !important;
    border-radius: 0 !important;
  }

  .wk-plan-page .headerNaglowek {
    min-height: 90px !important;
    border-radius: 14px !important;
    background-size: contain !important;
  }

  .wk-plan-page .clickable-area {
    width: 48px !important;
    height: 48px !important;
  }

  .wk-plan-page .tab-container,
  .wk-plan-page .sub-tab-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
  }

  .wk-plan-page .tab,
  .wk-plan-page .sub-tab {
    flex: 0 0 auto !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  .wk-plan-page h2 {
    font-size: 20px !important;
    line-height: 1.2 !important;
    margin: 14px 0 10px !important;
  }

  .wk-plan-page .filter-container {
    margin: 8px 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .wk-plan-page #faculty-select,
  .wk-plan-page #faculty-select-n,
  .wk-plan-page #room-select,
  .wk-plan-page #room-select-n,
  .wk-plan-page #instructor-select,
  .wk-plan-page #instructor-select-n {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 44px !important;
    font-size: 15px !important;
    margin-bottom: 12px !important;
  }

  .wk-plan-page #calendar-kierunek,
  .wk-plan-page #calendar-kierunek-n,
  .wk-plan-page #calendar-sala,
  .wk-plan-page #calendar-sala-n,
  .wk-plan-page #calendar-instructor,
  .wk-plan-page #calendar-instructor-n {
    padding: 8px !important;
    min-height: auto !important;
    border-radius: 14px !important;
  }

  /* toolbar FC */
  .wk-plan-page .fc .fc-toolbar.fc-header-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  .wk-plan-page .fc .fc-toolbar-chunk {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    align-items: center !important;
  }

  .wk-plan-page .fc .fc-toolbar-title {
    font-size: 1.05rem !important;
    line-height: 1.2 !important;
  }

  .wk-plan-page .fc .fc-button {
    padding: 0.32rem 0.5rem !important;
    font-size: 12px !important;
    border-radius: 8px !important;
  }

  /* kolumna godzin */
  .wk-plan-page .fc .fc-timegrid-axis,
  .wk-plan-page .fc .fc-timegrid-axis-frame,
  .wk-plan-page .fc .fc-timegrid-slot-label,
  .wk-plan-page .fc .fc-timegrid-slot-label-cushion {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
  }

  .wk-plan-page .fc .fc-timegrid-slot-label,
  .wk-plan-page .fc .fc-timegrid-slot-label-cushion {
    font-size: 10px !important;
    padding-right: 4px !important;
  }

  .wk-plan-page .fc-timegrid-slot {
    height: 30px !important;
  }

  /* eventy tydzień / dzień */
  .wk-plan-page .fc-timegrid-event .fc-event-main {
    padding: 2px 3px !important;
  }

  .wk-plan-page .fc-timegrid-event .wk-time {
    font-size: 8px !important;
    line-height: 1.0 !important;
    margin-bottom: 1px !important;
  }

  .wk-plan-page .fc-timegrid-event .wk-line {
    font-size: 8px !important;
    line-height: 1.05 !important;
  }

  /* widok Dzień – trochę większa czytelność */
  .wk-plan-page .fc .fc-timeGridDay-view .wk-time {
    font-size: 10px !important;
    line-height: 1.05 !important;
  }

  .wk-plan-page .fc .fc-timeGridDay-view .wk-line {
    font-size: 10px !important;
    line-height: 1.15 !important;
  }

  /* widok Miesiąc */
  .wk-plan-page .fc-daygrid-event .fc-event-main,
  .wk-plan-page .fc-daygrid-dot-event .fc-event-main {
    padding: 3px 3px !important;
  }

  .wk-plan-page .fc-daygrid-event .wk-time-month,
  .wk-plan-page .fc-daygrid-dot-event .wk-time-month {
    width: 26px !important;
    margin-right: 4px !important;
    font-size: 7px !important;
    line-height: 1.05 !important;
  }

  .wk-plan-page .fc-daygrid-event .wk-line,
  .wk-plan-page .fc-daygrid-dot-event .wk-line {
    margin-left: 30px !important;
    font-size: 7px !important;
    line-height: 1.05 !important;
  }

  .wk-plan-page .fc-daygrid-event,
  .wk-plan-page .fc-daygrid-event-harness,
  .wk-plan-page .fc-daygrid-dot-event {
    overflow: hidden !important;
  }

  /* tryb "Całość" */
  .wk-plan-page .scroll-container {
    height: 78vh !important;
    border-radius: 12px !important;
  }

  .wk-plan-page .grid-container {
    width: max-content !important;
  }

  .wk-plan-page .n-zoombar {
    gap: 6px !important;
    margin-bottom: 8px !important;
  }

  .wk-plan-page .n-zoombtn {
    min-width: 44px !important;
    height: 34px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
  }

  .wk-plan-page .n-zoomlabel {
    font-size: 13px !important;
    height: 34px !important;
  }

  /* export */
  .wk-plan-page #export-bar {
    gap: 8px !important;
    padding: 12px 8px 8px !important;
  }

  .wk-plan-page #export-bar button {
    min-width: 140px !important;
    font-size: 13px !important;
    padding: 10px 12px !important;
  }

  .wk-plan-page #export-hint {
    font-size: 11px !important;
  }

  .wk-plan-page .hours-summary {
    width: 100% !important;
    padding: 8px !important;
    border-radius: 10px !important;
  }

  .wk-plan-page .hours-summary h3 {
    font-size: 15px !important;
  }

  .wk-plan-page .hours-summary table {
    font-size: 12px !important;
  }

  .wk-plan-page .hours-summary .hs-hours {
    white-space: normal !important;
  }
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .wk-plan-page .fc .fc-timeGridWeek-view .wk-time {
    font-size: 6px !important;
    line-height: 1 !important;
  }

  .wk-plan-page .fc .fc-timeGridWeek-view .wk-line {
    font-size: 6px !important;
    line-height: 1.05 !important;
  }
}
