/* FJN System — E1-34 „Obecność” for the Kierownik (ModHala kier-dzien, kier-korekta, kier-okres;
   screenshots E1-34_K at 1440 px, E1-34_T at 1024 px). Computer and tablet only (D81 pt 5). */

.fjn-att { gap: 16px; }
.fjn-att__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fjn-att__heading { display: flex; flex-direction: column; gap: 4px; }
.fjn-att__heading .fjn-breadcrumb a { font-weight: var(--fjn-fw-bold); text-decoration: none; }
.fjn-att__title { margin: 0; font-size: 28px; line-height: 36px; white-space: nowrap; }
.fjn-att__headright { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fjn-att__views { display: flex; gap: 4px; padding: 3px; background: var(--fjn-surface); border: 1px solid var(--fjn-border); border-radius: 8px; }
.fjn-att__view {
  display: flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 6px;
  font-size: 15px; color: var(--fjn-text-2); text-decoration: none; white-space: nowrap;
}
.fjn-att__view:hover { text-decoration: none; background: var(--fjn-surface-2); color: var(--fjn-text); }
.fjn-att__view.is-active { background: var(--fjn-brand-600); color: var(--fjn-text-inverse); font-weight: var(--fjn-fw-bold); }

/* Toolbar: date with arrows, filters, actions (tablet: actions on the second line) */
.fjn-att__toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fjn-att__date {
  display: flex; align-items: stretch; height: 40px; border: 1px solid var(--fjn-border-strong);
  border-radius: 6px; background: var(--fjn-surface);
}
.fjn-att__step { display: flex; align-items: center; justify-content: center; width: 40px; color: var(--fjn-text); }
.fjn-att__step:first-child { border-right: 1px solid var(--fjn-border); border-radius: 6px 0 0 6px; }
.fjn-att__step:last-child { border-left: 1px solid var(--fjn-border); border-radius: 0 6px 6px 0; }
.fjn-att__step:hover { background: var(--fjn-surface-2); }
.fjn-att__day { display: flex; align-items: center; gap: 8px; padding: 0 12px; font: 15px var(--fjn-font-mono); white-space: nowrap; }
.fjn-att__day .fjn-icon { color: var(--fjn-text-2); }
.fjn-att__toolbar .fjn-filter__button { height: 40px; }
.fjn-att__toolbar .fjn-filter__value { font-weight: var(--fjn-fw-bold); }
.fjn-att__gap { flex: 1; }
.fjn-att__actions { display: flex; gap: 10px; }
.fjn-att__btn { height: 40px; padding: 0 14px; font-size: 14px; gap: 6px; }
.fjn-att__btn:disabled { opacity: .5; cursor: not-allowed; }

/* Counters */
.fjn-att__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fjn-att__stat {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 16px;
  background: var(--fjn-surface); border: 1px solid var(--fjn-border); border-radius: 10px;
}
.fjn-att__stat-label { font-size: 13px; color: var(--fjn-text-2); white-space: nowrap; }
.fjn-att__stat-value { font: 700 26px var(--fjn-font-mono); color: var(--fjn-text); }
.fjn-att__stat--missing { box-shadow: inset 0 -3px 0 var(--fjn-warning-700); }
.fjn-att__stat--missing .fjn-att__stat-value { color: var(--fjn-warning-700); }
.fjn-att__stat--corrected .fjn-att__stat-value { color: var(--fjn-brand-600); }

/* Day table */
.fjn-att__table { background: var(--fjn-surface); border: 1px solid var(--fjn-border); border-radius: 10px; overflow: hidden; }
.fjn-att__row {
  display: grid; align-items: center; min-height: 56px; border-bottom: 1px solid var(--fjn-surface-2); font-size: 14px;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 120px 90px 100px 170px 130px;
}
.fjn-att__row:last-child, .fjn-att__prow:last-child { border-bottom: 0; }
.fjn-att__row--head, .fjn-att__prow.fjn-att__row--head {
  min-height: 40px; height: 40px; background: var(--fjn-bg); border-bottom: 1px solid var(--fjn-border);
  font-size: 12px; font-weight: var(--fjn-fw-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--fjn-text-2);
}
.fjn-att__row--head > span { padding: 0 12px; }
.fjn-att__row--head > span:first-child { padding-left: 16px; }
.fjn-att__row--missing { background: var(--fjn-row-pending); }
.fjn-att__cell { padding: 6px 12px; min-width: 0; }
.fjn-att__person, .fjn-att__time { display: flex; flex-direction: column; gap: 1px; }
.fjn-att__person { padding-left: 16px; }
.fjn-att__person b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fjn-att__person span { font-size: 13px; color: var(--fjn-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fjn-att__time b { font: 700 15px var(--fjn-font-mono); }
.fjn-att__time span { font-size: 12px; color: var(--fjn-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fjn-att__time--missing b { color: var(--fjn-warning-700); }
.fjn-att__num { padding: 0 12px; text-align: right; white-space: nowrap; }
.fjn-att__mono { font: 15px var(--fjn-font-mono); }
.fjn-att__muted { font-size: 14px; color: var(--fjn-text-2); }
.fjn-att__center { text-align: center; }
.fjn-att__act { display: flex; justify-content: flex-end; }
.fjn-att__rowbtn { height: 36px; padding: 0 12px; font-size: 14px; gap: 6px; }
.fjn-att__note { margin: 0; font-size: 13px; line-height: 18px; color: var(--fjn-text-2); }

/* Week table */
.fjn-att__prow {
  display: grid; align-items: center; min-height: 52px; border-bottom: 1px solid var(--fjn-surface-2); font-size: 14px;
  grid-template-columns: minmax(0, 1.6fr) repeat(5, minmax(0, 1fr)) 100px 120px;
}
.fjn-att__prow.fjn-att__row--head > span { padding: 0 8px; }
.fjn-att__prow.fjn-att__row--head > span:first-child { padding-left: 16px; }
.fjn-att__prow.fjn-att__row--head > span:last-child { padding-right: 16px; }
.fjn-att__pname { padding: 0 16px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fjn-att__prow > .fjn-att__num:last-child { padding-right: 16px; }
.fjn-att__prow > b.fjn-att__num { font-weight: 700; }
.fjn-att__pcell {
  display: flex; align-items: center; justify-content: center; height: 36px; margin: 0 4px; border-radius: 6px;
  font: 14px var(--fjn-font-mono); white-space: nowrap;
}
.fjn-att__pcell--missing { background: var(--fjn-warning-100); color: var(--fjn-warning-700); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--fjn-warning-700); }
.fjn-att__pcell--corrected { background: var(--fjn-brand-100); color: var(--fjn-brand-700); }
.fjn-att__pcell--absent { background: var(--fjn-bg); color: var(--fjn-text-3); }
.fjn-att__pcell--leave { background: var(--fjn-info-100); color: var(--fjn-info-700); font-weight: 700; }
.fjn-att__legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--fjn-text-2); }
.fjn-att__legend span { display: flex; align-items: center; gap: 6px; }
.fjn-att__swatch { display: inline-block; width: 14px; height: 14px; margin: 0; border-radius: 3px; }

/* Status chips of E1-34: „Skorygowano” (brand), „Urlop” (rounded square) */
.fjn-status--brand { background: var(--fjn-brand-100); color: var(--fjn-brand-700); }
.fjn-status__marker--rsquare { border-radius: 2px; background: currentColor; }

/* „Korekta obecności” dialog (520 px) */
.fjn-attcorr { --fjn-modal-w: 520px; }
.fjn-attcorr__head { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px 12px; }
.fjn-attcorr__title { margin: 0; font-size: 19px; line-height: 26px; }
.fjn-attcorr__sub { font-size: 15px; color: var(--fjn-text-2); }
.fjn-attcorr__body { display: flex; flex-direction: column; gap: 14px; padding: 0 24px; }
.fjn-attcorr__times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fjn-attcorr__field { display: flex; flex-direction: column; gap: 6px; }
.fjn-attcorr__label { font-size: 14px; font-weight: var(--fjn-fw-bold); }
.fjn-attcorr__opt { font-weight: 400; color: var(--fjn-text-2); }
.fjn-attcorr__time { height: 40px; font: 15px var(--fjn-font-mono); }
.fjn-attcorr__time:disabled { background: var(--fjn-bg); border-color: var(--fjn-border); color: var(--fjn-text); }
.fjn-attcorr__was, .fjn-attcorr__hint { font-size: 12px; line-height: 16px; color: var(--fjn-text-2); }
.fjn-attcorr__was--missing { color: var(--fjn-warning-700); font-weight: var(--fjn-fw-bold); }
.fjn-attcorr .fjn-textarea { min-height: 64px; }
.fjn-attcorr__info {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px;
  background: var(--fjn-info-100); font-size: 14px; line-height: 20px; color: var(--fjn-text);
}
.fjn-attcorr__info .fjn-icon { flex: none; margin-top: 1px; color: var(--fjn-info-700); }

/* Tablet 768–1279 px (E1-34_T): no „Poza 7–16” column, actions on the second line */
@media (max-width: 1279px) {
  .fjn-att { padding: 20px 24px; }
  .fjn-att__date, .fjn-att__toolbar .fjn-filter__button, .fjn-att__btn { height: 44px; }
  .fjn-att__gap { display: none; }
  .fjn-att__actions { flex-basis: 100%; }
  .fjn-att__row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr) minmax(0, 1.1fr) 96px 80px 150px 118px; }
  .fjn-att__k { display: none; }
  .fjn-att__prow { grid-template-columns: minmax(0, 1.4fr) repeat(5, minmax(0, 1fr)) 80px 96px; }
}

/* ---------- D125 ---------- */
.fjn-attcorr__head--close { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fjn-attcorr__head--close > div { display: flex; flex-direction: column; gap: 4px; }
.fjn-attcorr__field--wide { grid-column: 1 / -1; }
.fjn-attcorr .fjn-field--error .fjn-attcorr__label { color: var(--fjn-danger-700); }
.fjn-dialog__foot--split { justify-content: flex-start; }
.fjn-att__danger { color: var(--fjn-danger-700); gap: 6px; }
.fjn-att__danger:hover { color: var(--fjn-danger-700); background: var(--fjn-danger-100); }
/* Typ: Urlop / Zwolnienie as two large buttons */
.fjn-att-seg { margin: 0; padding: 0; border: 0; }
.fjn-att-seg__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fjn-att-seg__option { position: relative; display: flex; }
.fjn-att-seg__option input { position: absolute; opacity: 0; }
.fjn-att-seg__option span {
  flex: 1; display: flex; align-items: center; justify-content: center; height: 40px; border: 1px solid var(--fjn-border-strong);
  border-radius: 6px; background: var(--fjn-surface); font-weight: var(--fjn-fw-bold); cursor: pointer;
}
.fjn-att-seg__option input:checked + span { background: var(--fjn-brand-600); border-color: var(--fjn-brand-600); color: var(--fjn-text-inverse); }
.fjn-att-seg__option input:focus-visible + span { box-shadow: var(--fjn-focus); }
/* Date field with a calendar icon and the month calendar (D125 „wybór daty”) */
.fjn-att-date { position: relative; display: flex; align-items: center; }
.fjn-att-date__input { width: 100%; padding-right: 40px; font-family: var(--fjn-font-mono); }
.fjn-att-date__icon { position: absolute; right: 10px; display: flex; color: var(--fjn-text-2); cursor: pointer; }
.fjn-att-cal { position: relative; display: flex; }
button.fjn-att__day { border: 0; border-left: 0; background: none; cursor: pointer; font: inherit; font-weight: var(--fjn-fw-bold); color: var(--fjn-text); }
.fjn-att-calpop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 324px; padding: 12px; box-sizing: border-box;
  background: var(--fjn-surface); border: 1px solid var(--fjn-border); border-radius: 10px; box-shadow: var(--fjn-shadow-3);
}
.fjn-att-calpop__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 8px; font-weight: 700; }
.fjn-att-calpop__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.fjn-att-calpop__dow { font-size: 12px; font-weight: 700; color: var(--fjn-text-2); padding: 4px 0; }
.fjn-att-calpop__day { height: 38px; border: 1px solid transparent; border-radius: 6px; background: none; font: 15px var(--fjn-font-mono); cursor: pointer; }
.fjn-att-calpop__day:hover:not(:disabled) { background: var(--fjn-surface-2); }
.fjn-att-calpop__day:disabled { color: #B7BDC5; cursor: default; }
.fjn-att-calpop__day.is-today { border-color: var(--fjn-brand-600); }
.fjn-att-calpop__day.is-selected { background: var(--fjn-brand-600); color: var(--fjn-text-inverse); font-weight: 700; }
.fjn-att-calpop__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--fjn-surface-2); font-size: 13px; color: var(--fjn-text-2); }
/* Empty result (D125 „pusta po filtrze”) */
.fjn-att__empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 16px; text-align: center; }
.fjn-att__empty-icon { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 10px; background: var(--fjn-surface-2); color: var(--fjn-text-2); }
.fjn-att__empty-title { font-size: 18px; }
.fjn-att__empty-text { margin: 0; max-width: 420px; font-size: 15px; line-height: 21px; color: var(--fjn-text-2); }
/* Week cells as links; a corrected cell has a corner mark (#8A5300) */
a.fjn-att__pcell { color: inherit; text-decoration: none; }
a.fjn-att__pcell:hover { outline: 2px solid var(--fjn-brand-600); outline-offset: -2px; }
.fjn-att__pcell--marked { box-shadow: inset -8px 8px 0 -4px var(--fjn-warning-700); }
/* Day panel of the Okres view */
.fjn-attday { --fjn-panel-w: 420px; margin: var(--fjn-topbar-h) 0 0 auto; height: calc(100vh - var(--fjn-topbar-h)); padding: 0; border: 0; border-left: 1px solid var(--fjn-border); }
.fjn-attday__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 14px; border-bottom: 1px solid var(--fjn-surface-2); }
.fjn-attday__title { margin: 0; font-size: 18px; }
.fjn-attday__sub { font-size: 14px; color: var(--fjn-text-2); }
.fjn-attday__body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 16px 18px; }
.fjn-attday__times { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.fjn-attday__times dt { color: var(--fjn-text-2); }
.fjn-attday__times dd { margin: 0; font: 700 14px var(--fjn-font-mono); }
.fjn-attday__corr { align-self: stretch; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--fjn-border); border-radius: 8px; background: var(--fjn-bg); font-size: 14px; }
.fjn-att-change { font-family: var(--fjn-font-mono); font-size: 13px; }
.fjn-att-change s { color: var(--fjn-danger-700); background: var(--fjn-danger-100); padding: 0 3px; }
.fjn-att-change ins { text-decoration: none; color: var(--fjn-success-700); background: var(--fjn-success-100); padding: 0 3px; }
/* E1-33 banner and „korekta” tag */
.fjn-attendance__corrected { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--fjn-warning-100); color: var(--fjn-text); }
.fjn-attendance__corrected > .fjn-icon { color: var(--fjn-warning-700); flex: none; }
.fjn-attendance__corrected-body { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.fjn-attendance__corrected-title { font-size: 16px; color: var(--fjn-warning-700); }
.fjn-attendance__corrected-change { font-size: 14px; }
.fjn-attendance__corrected-note { font-size: 13px; color: var(--fjn-text-2); }
.fjn-attendance__day:has(.fjn-attendance__tag) { grid-template-columns: minmax(0, 1fr) auto auto; }
.fjn-attendance__day--corrected { background: var(--fjn-row-pending); }
.fjn-attendance__tag { padding: 2px 8px; border-radius: 999px; background: var(--fjn-warning-100); color: var(--fjn-warning-700); font-size: 12px; font-weight: 700; }

/* D126 „Tablica | Obecność” and „Zadania dziś” */
.fjn-att__titlerow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fjn-att__tasks { font-weight: 700; white-space: nowrap; }
