/* FJN System — E1-30 „Tablica produkcji” and the E1-31 assignment panel (ModProdukcja „tablica”,
   „przydzial”; screenshots E1-30_K 1440 px, E1-30_T 1024 px, E1-31_K, E1-31_T). */

.fjn-board { display: flex; flex-direction: column; min-height: calc(100vh - var(--fjn-topbar-h, 64px)); background: var(--fjn-bg); }
/* D126: header (title, switch or badge, filters on the right), „Obecni (N)” below */
.fjn-board__top { display: flex; flex-direction: column; gap: 10px; padding: 16px 24px 12px; background: var(--fjn-surface); border-bottom: 1px solid var(--fjn-border); }
.fjn-board__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fjn-board__heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fjn-board__title { margin: 0; font-size: 24px; line-height: 32px; white-space: nowrap; }
.fjn-board__switch { display: flex; border: 1px solid var(--fjn-border-strong); border-radius: 8px; overflow: hidden; }
.fjn-board__switch-item { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; font-weight: 700; color: var(--fjn-text); text-decoration: none; background: var(--fjn-surface); }
.fjn-board__switch-item:hover { text-decoration: none; background: var(--fjn-surface-2); color: var(--fjn-text); }
.fjn-board__switch-item.is-active { background: var(--fjn-brand-600); color: var(--fjn-text-inverse); }
.fjn-board__badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--fjn-surface-2); color: var(--fjn-text-2); font-size: 13px; font-weight: 700; }
.fjn-board__filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fjn-board__filters .fjn-filter__button { height: 44px; }
.fjn-board__filters .fjn-filter__value { font-weight: var(--fjn-fw-bold); }
.fjn-board__present { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fjn-board__present-label { margin-right: 4px; font-size: 14px; color: var(--fjn-text-2); }
.fjn-board__person { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 4px; border-radius: 999px; background: var(--fjn-bg); font-size: 14px; white-space: nowrap; }
.fjn-board__avatar, .fjn-bcard__avatar, .fjn-assign__avatar {
  display: flex; align-items: center; justify-content: center; flex: none; border-radius: 50%;
  background: var(--fjn-brand-100); color: var(--fjn-brand-700); font-weight: 700;
}
.fjn-board__avatar { width: 24px; height: 24px; font-size: 11px; }
.fjn-board__count { font-weight: 700; }
.fjn-board__nobody { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--fjn-warning-100); color: var(--fjn-warning-700); font-size: 14px; font-weight: 700; }
.fjn-board__ring { width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 50%; }
.fjn-board__link { font-weight: 700; }

/* Columns: 6 stages side by side without scrolling, also on the tablet (D127 pt 13) */
.fjn-board__columns {
  flex: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px;
  padding: 16px 24px; align-items: start;
}
.fjn-board__col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fjn-board__colhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; min-height: 36px; padding: 0 2px; font-size: 13px; line-height: 18px; text-wrap: balance; }
.fjn-board__colcount { font: 700 12px var(--fjn-font-mono); color: var(--fjn-text-2); }

.fjn-bcard {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px 9px; line-height: 18px; background: var(--fjn-surface);
  border: 1px solid var(--fjn-border); border-radius: 10px; color: var(--fjn-text); text-decoration: none; font-weight: 400;
}
a.fjn-bcard:hover { background: #F1F5FB; text-decoration: none; color: var(--fjn-text); }
.fjn-bcard--urgent { box-shadow: inset 4px 0 0 var(--fjn-danger-700); }
.fjn-bcard--mine { border: 2px solid var(--fjn-brand-600); }
.fjn-bcard__top { display: flex; justify-content: space-between; align-items: center; gap: 6px; color: var(--fjn-text-2); }
.fjn-bcard__nr { min-width: 0; font: 700 12px var(--fjn-font-mono); color: var(--fjn-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fjn-bcard__top svg { flex: none; width: 14px; height: 14px; }
.fjn-bcard__flag { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 22px; box-sizing: border-box; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fjn-bcard__flag svg { flex: none; width: 12px; height: 12px; }
.fjn-bcard__flag i { flex: none; width: 8px; height: 8px; background: currentColor; }
.fjn-bcard__flag--urgent { background: var(--fjn-danger-700); color: var(--fjn-text-inverse); }
.fjn-bcard__flag--material { background: var(--fjn-warning-100); color: var(--fjn-warning-700); }
.fjn-bcard__flag--pool { background: #FFFBF2; color: var(--fjn-warning-700); box-shadow: inset 0 0 0 1.5px var(--fjn-warning-700); } /* D235 */
.fjn-bcard__flag--held { background: var(--fjn-neutral-100); color: var(--fjn-neutral-700); }
.fjn-bcard__vehicle { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fjn-bcard__row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 12px; color: var(--fjn-text-2); white-space: nowrap; }
.fjn-bcard__due { font-family: var(--fjn-font-mono); }
.fjn-bcard__due--late { font-family: inherit; font-weight: 700; color: var(--fjn-danger-700); }
.fjn-bcard__who { display: flex; align-items: center; gap: 6px; min-width: 0; padding-top: 6px; border-top: 1px solid var(--fjn-surface-2); font-size: 12px; white-space: nowrap; }
.fjn-bcard__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fjn-bcard__who--none { color: var(--fjn-warning-700); }
.fjn-bcard__avatar { width: 20px; height: 20px; font-size: 10px; }
.fjn-bcard__who--none .fjn-bcard__avatar { background: var(--fjn-surface-2); color: var(--fjn-text-2); }

/* E1-31 side panel */
/* Below the top bar as in E1-31 (the bar stays in place under the backdrop). */
.fjn-assign { --fjn-panel-w: 460px; 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); box-shadow: -8px 0 24px rgba(21, 24, 28, .12); }
.fjn-assign[open]:not(:modal) { position: static; width: 100%; height: auto; box-shadow: none; border: 1px solid var(--fjn-border); }
.fjn-assign::backdrop { background: rgba(21, 24, 28, .25); }
.fjn-assign__form { display: flex; flex-direction: column; height: 100%; }
.fjn-assign__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--fjn-surface-2); }
.fjn-assign__heading { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fjn-assign__kicker, .fjn-assign__section { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fjn-text-2); }
.fjn-assign__section { font-size: 14px; }
.fjn-assign__nr { font: 700 20px var(--fjn-font-mono); white-space: nowrap; }
.fjn-assign__meta { font-size: 14px; color: var(--fjn-text-2); }
.fjn-assign__state { font-size: 14px; font-weight: 700; color: var(--fjn-warning-700); } /* D235 */
.fjn-assign__state--progress { color: var(--fjn-brand-700); }
.fjn-assign__inprogress { display: flex; gap: 8px; margin: 0 20px 12px; padding: 10px 12px; border-radius: 8px; background: #ECEEF1; color: var(--fjn-text); font-size: 14px; line-height: 20px; }
.fjn-assign__inprogress svg { flex: none; margin-top: 1px; }
.fjn-assign__body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; }
.fjn-assign__proposal {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 2px solid var(--fjn-border); border-radius: 10px; cursor: pointer;
}
.fjn-assign__proposal:has(input:checked) { border-color: var(--fjn-brand-600); background: #F1F5FB; }
.fjn-assign__ptitle { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--fjn-brand-600); }
.fjn-assign__who { display: flex; align-items: center; gap: 12px; }
.fjn-assign__avatar { width: 36px; height: 36px; font-size: 13px; background: var(--fjn-neutral-100); color: var(--fjn-text-2); }
.fjn-assign__avatar--lg { width: 44px; height: 44px; font-size: 16px; background: var(--fjn-brand-100); color: var(--fjn-brand-700); }
.fjn-assign__whotext { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fjn-assign__whotext b { font-size: 15px; }
.fjn-assign__who .fjn-assign__whotext b { font-size: 17px; }
.fjn-assign__whotext span { font-size: 13px; color: var(--fjn-text-2); }
.fjn-assign__reasons { display: flex; flex-direction: column; gap: 2px; margin: 0; padding-left: 18px; font-size: 14px; line-height: 20px; }
.fjn-assign__option {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 60px;
  padding: 8px 12px; border: 1px solid var(--fjn-border); border-radius: 8px; background: var(--fjn-surface); cursor: pointer;
}
.fjn-assign__option:has(input:checked) { border-color: var(--fjn-brand-600); box-shadow: inset 0 0 0 1px var(--fjn-brand-600); }
.fjn-assign__option:has(input:focus-visible), .fjn-assign__proposal:has(input:focus-visible) { box-shadow: var(--fjn-focus); }
.fjn-assign__load { font: 700 14px var(--fjn-font-mono); color: var(--fjn-text-2); white-space: nowrap; }
.fjn-assign__load--high { color: var(--fjn-danger-700); }
.fjn-assign__field { display: flex; flex-direction: column; gap: 6px; }
.fjn-assign__label { font-size: 14px; font-weight: 700; }
.fjn-assign__opt { font-weight: 400; color: var(--fjn-text-2); }
.fjn-assign__history { display: flex; flex-direction: column; gap: 6px; }
.fjn-assign__history span { font-size: 13px; line-height: 18px; color: var(--fjn-text-2); }
.fjn-assign__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--fjn-border); }

@media (max-width: 1279px) {
  .fjn-board__top { padding: 14px 20px 12px; }
  .fjn-board__columns { padding: 14px 20px; }
  .fjn-assign { --fjn-panel-w: 420px; }
}
@media (max-width: 767px) {
  .fjn-board__columns { grid-template-columns: minmax(0, 1fr); overflow-x: visible; }
}
/* D126 „Oznacz pilne” dialog */
.fjn-urgent__head { display: flex; gap: 14px; align-items: flex-start; padding: 20px 24px 8px; }
.fjn-urgent__heading { display: flex; flex-direction: column; gap: 4px; }
.fjn-urgent__title { margin: 0; font-size: 19px; line-height: 26px; }
.fjn-urgent__sub { margin: 0; font-size: 14px; color: var(--fjn-text-2); }
.fjn-urgent__body { display: flex; flex-direction: column; gap: 6px; padding: 8px 24px 0; }
.fjn-urgent__label { font-size: 14px; font-weight: 700; }
.fjn-urgent__hint { font-size: 12px; color: var(--fjn-text-2); }

/* D126 panel states (E1-31_T_zadanie-w-toku, E1-31_T_brak-kandydatow) */
.fjn-assign__title2 { font-size: 18px; }
.fjn-assign__chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 4px; font-size: 13px; font-weight: 700; }
.fjn-assign__chip i { width: 8px; height: 8px; background: currentColor; }
.fjn-assign__chip--progress { background: var(--fjn-brand-100); color: var(--fjn-brand-700); }
.fjn-assign__chip--todo { background: var(--fjn-warning-100); color: var(--fjn-warning-700); }
.fjn-assign__urgent { align-self: flex-start; padding: 0; color: var(--fjn-danger-700); }
.fjn-assign__lock { display: flex; gap: 10px; padding: 14px; border-radius: 10px; background: var(--fjn-surface-2); font-size: 14px; }
.fjn-assign__lock div { display: flex; flex-direction: column; gap: 4px; color: var(--fjn-text-2); }
.fjn-assign__lock b { color: var(--fjn-text); }
.fjn-assign__option--static { cursor: default; grid-template-columns: 36px minmax(0, 1fr); }
.fjn-assign__avatar--brand { background: var(--fjn-brand-100); color: var(--fjn-brand-700); }
.fjn-assign__section--muted { color: var(--fjn-text-3); }
.fjn-assign__others, .fjn-assign__row { border: 1px solid var(--fjn-border); border-radius: 8px; }
.fjn-assign__others .fjn-assign__row { border: 0; }
.fjn-assign__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; }
.fjn-assign__row--off { color: var(--fjn-text-3); }
.fjn-assign__empty { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1.5px dashed var(--fjn-border-strong); border-radius: 10px; font-size: 14px; color: var(--fjn-text-2); }
.fjn-assign__empty b { font-size: 16px; color: var(--fjn-text); }
.fjn-assign__empty-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; background: var(--fjn-warning-100); color: var(--fjn-warning-700); }
.fjn-assign__note { font-size: 13px; color: var(--fjn-text-2); }
/* D127 pt 12: reason of a manual assignment without a proposal (ModBlok7 „panel-reczny”) */
.fjn-assign__manual { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 0; padding: 0; border: 0; }
.fjn-assign__manual legend { margin-bottom: 8px; padding: 0; }
.fjn-assign__mreason { position: relative; display: flex; }
.fjn-assign__mreason input { position: absolute; opacity: 0; }
.fjn-assign__mreason span {
  flex: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; box-sizing: border-box;
  border: 1px solid var(--fjn-border); border-radius: 8px; font-size: 15px; white-space: nowrap; cursor: pointer;
}
.fjn-assign__mreason span::before { content: ""; flex: none; width: 18px; height: 18px; box-sizing: border-box; border: 2px solid var(--fjn-border-strong); border-radius: 50%; }
.fjn-assign__mreason input:checked + span { border: 2px solid var(--fjn-brand-600); padding: 0 11px; background: var(--fjn-brand-50); font-weight: 700; }
.fjn-assign__mreason input:checked + span::before { border: 6px solid var(--fjn-brand-600); }
.fjn-assign__mreason input:focus-visible + span { box-shadow: var(--fjn-focus); }
.fjn-assign__req { font-weight: 400; color: var(--fjn-danger-700); }
.fjn-assign__notearea { min-height: 56px; font-size: 15px; }
.fjn-assign__footbtn { height: 52px; padding: 0 16px; }
@media (min-width: 1280px) { .fjn-assign__footbtn { height: 40px; } }
/* D126 (SPEC 1.62): „Pilne” also on the „Moje zadania” and hall dashboard cards */
.fjn-htask--urgent { box-shadow: inset 4px 0 0 var(--fjn-danger-700); }

/* D238 „Przekaż”: the choice of a person is seen (circle, „Wybrano”); „Wybierz osobę” and the red
   go at the first tap of a person; „Wybierz powód przekazania.” under the reason */
.fjn-assign__people { display: flex; flex-direction: column; gap: 8px; }
.fjn-assign__people .fjn-assign__section { margin-bottom: -6px; }
.fjn-assign__req { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--fjn-text-2); }
.fjn-assign__hint { font-size: 14px; color: var(--fjn-text-2); }
.fjn-assign__list { display: flex; flex-direction: column; gap: 8px; }
.fjn-assign__option { grid-template-columns: 24px 36px minmax(0, 1fr) auto; border-color: #AEB5BE; }
.fjn-assign__radio { width: 22px; height: 22px; border: 2px solid #626B77; border-radius: 50%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.fjn-assign__tag { display: none; font-size: 13px; font-weight: 700; color: var(--fjn-brand-600); white-space: nowrap; }
.fjn-assign__option:has(input:checked) { border: 2px solid var(--fjn-brand-600); box-shadow: none; background: #F1F5FB; padding: 7px 11px; }
.fjn-assign__option:has(input:checked) .fjn-assign__radio { border-color: var(--fjn-brand-600); }
.fjn-assign__option:has(input:checked) .fjn-assign__radio::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--fjn-brand-600); }
.fjn-assign__option:has(input:checked) .fjn-assign__avatar { background: var(--fjn-brand-100); color: var(--fjn-brand-700); }
.fjn-assign__option:has(input:checked) .fjn-assign__tag { display: inline; }
.fjn-assign__err { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 700; color: var(--fjn-danger-700); }
.fjn-assign__people.is-error:not(:has(input:checked)) .fjn-assign__section { color: var(--fjn-danger-700); }
.fjn-assign__people.is-error:not(:has(input:checked)) .fjn-assign__option { border-color: var(--fjn-danger-700); }
.fjn-assign__people.is-error:not(:has(input:checked)) .fjn-assign__radio { border-color: var(--fjn-danger-700); }
.fjn-assign__people.is-error:has(input:checked) .fjn-assign__err { display: none; }
.fjn-assign__err2 { margin: 0; font-size: 14px; font-weight: 700; color: var(--fjn-danger-700); }
.fjn-assign__field.is-error:has(option[value=""]:checked) .fjn-select { border: 2px solid var(--fjn-danger-700); }
.fjn-assign__field.is-error:not(:has(option[value=""]:checked)) .fjn-assign__err2 { display: none; }
@media (max-width: 1279px) {
  .fjn-assign__option { min-height: 64px; }
  .fjn-assign .fjn-select, .fjn-assign__foot .fjn-btn { height: 56px; }
  .fjn-assign__head .fjn-btn--icon { width: 56px; height: 56px; }
}
@media (max-width: 767px) { .fjn-assign__foot .fjn-btn { flex: 1; justify-content: center; } }
