/* E1-37 quality control per rim (hall, block 5; D76; prototype ModHala „qc”, „qc-odrzuc”).
   Hall sizes: touch targets 52–64 px, numbers in Mono, one main action at the bottom. */

.fjn-hqc {
  display: flex; flex-direction: column; gap: 16px; min-height: calc(100vh - var(--fjn-topbar-h));
  padding: 20px 24px 0; box-sizing: border-box;
}
.fjn-hqc__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fjn-hqc__identity { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fjn-hqc__kicker { font-size: 14px; font-weight: var(--fjn-fw-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--fjn-text-2); }
.fjn-hqc__title { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: 0; font-size: 16px; font-weight: var(--fjn-fw-regular); }
.fjn-hqc__number { font: var(--fjn-fw-bold) 24px/32px var(--fjn-font-mono); white-space: nowrap; color: var(--fjn-text); }
.fjn-hqc__sub { color: var(--fjn-text-2); white-space: nowrap; }
.fjn-hqc__progress { font-size: 15px; color: var(--fjn-text-2); white-space: nowrap; }

/* Tiles F1…Fn: OK / sprawdzana / czeka */
.fjn-hqc__tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fjn-hqc__tile {
  height: 64px; border-radius: 10px; box-sizing: border-box; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; text-decoration: none;
  background: var(--fjn-surface); color: var(--fjn-text-2); border: 1px solid var(--fjn-border-strong);
}
.fjn-hqc__tile b { font: var(--fjn-fw-bold) 22px/26px var(--fjn-font-mono); }
.fjn-hqc__tile span { font-size: 12px; font-weight: var(--fjn-fw-bold); white-space: nowrap; }
.fjn-hqc__tile--ok { background: var(--fjn-success-100); color: var(--fjn-success-700); border: 2px solid var(--fjn-success-700); }
.fjn-hqc__tile--chosen { background: var(--fjn-brand-600); color: var(--fjn-text-inverse); border: 0; }
.fjn-hqc__tile:hover { text-decoration: none; }

/* Checklist: one row per point, Tak / Nie as a form toggle */
.fjn-hqc__list {
  margin: 0; padding: 0; list-style: none; overflow: hidden;
  background: var(--fjn-surface); border: 1px solid var(--fjn-border); border-radius: 12px;
}
.fjn-hqc__item {
  min-height: 64px; padding: 8px 16px; display: grid; grid-template-columns: minmax(0, 1fr) 208px;
  gap: 14px; align-items: center; border-bottom: 1px solid var(--fjn-surface-2); box-sizing: border-box;
}
.fjn-hqc__item:last-child { border-bottom: 0; }
.fjn-hqc__item--no { background: color-mix(in srgb, var(--fjn-danger-100) 45%, var(--fjn-surface)); }
.fjn-hqc__point { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fjn-hqc__label { font-size: 17px; line-height: 23px; font-weight: var(--fjn-fw-bold); }
.fjn-hqc__note { font-size: 14px; line-height: 19px; color: var(--fjn-danger-700); }
.fjn-hqc__toggle {
  display: grid; grid-template-columns: 1fr 1fr; height: 52px; margin: 0; overflow: hidden;
  border: 1px solid var(--fjn-border-strong); border-radius: 8px; box-sizing: border-box;
}
.fjn-hqc__toggle button {
  display: flex; align-items: center; justify-content: center; border: 0; margin: 0; padding: 0;
  background: var(--fjn-surface); color: var(--fjn-text); font: inherit; font-size: 17px; font-weight: var(--fjn-fw-bold); cursor: pointer;
}
.fjn-hqc__toggle .fjn-hqc__no { border-left: 1px solid var(--fjn-border-strong); }
.fjn-hqc__toggle .fjn-hqc__yes[aria-pressed="true"] { background: var(--fjn-success-700); color: var(--fjn-text-inverse); }
.fjn-hqc__toggle .fjn-hqc__no[aria-pressed="true"] { background: var(--fjn-danger-700); color: var(--fjn-text-inverse); }
.fjn-hqc__toggle button:disabled { cursor: default; }
.fjn-hqc__toggle button:disabled:not([aria-pressed="true"]) { color: var(--fjn-text-disabled); }
.fjn-hqc__toggle button:focus-visible { outline: none; box-shadow: inset var(--fjn-focus-btn); }

/* Photos of the rim + camera */
.fjn-hqc__photos { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fjn-hqc__photos-label { width: 64px; font-size: 15px; font-weight: var(--fjn-fw-bold); }
.fjn-hqc__thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--fjn-surface-2); }
.fjn-hqc__camera-form { margin: 0; }
.fjn-hqc__camera {
  width: 64px; height: 64px; border-radius: 8px; border: 1.5px dashed var(--fjn-border-strong); box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; color: var(--fjn-text-2); cursor: pointer;
}
.fjn-hqc__camera:focus-within { box-shadow: var(--fjn-focus-btn); }

/* One main action at the bottom: „Odrzuć F3” / „Zatwierdź F3” */
.fjn-hqc__footer {
  position: sticky; bottom: 0; z-index: 2; margin: auto -24px 0; padding: 12px 24px;
  display: grid; grid-template-columns: 1fr 1.8fr; gap: 12px;
  background: var(--fjn-bg); border-top: 1px solid var(--fjn-border);
}
.fjn-hqc__approve-form { margin: 0; display: flex; }
.fjn-hqc__reject, .fjn-hqc__approve {
  flex: 1; height: 64px; border-radius: 10px; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  font: inherit; font-size: 18px; font-weight: var(--fjn-fw-bold); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.fjn-hqc__reject { background: var(--fjn-surface); border: 2px solid var(--fjn-danger-700); color: var(--fjn-danger-700); }
.fjn-hqc__reject:hover { text-decoration: none; background: var(--fjn-danger-100); }
.fjn-hqc__approve { background: var(--fjn-brand-600); border: 0; color: var(--fjn-text-inverse); }
.fjn-hqc__approve:hover { background: var(--fjn-brand-700); }
.fjn-hqc__reject:disabled, .fjn-hqc__approve:disabled {
  background: var(--fjn-btn-disabled-bg); border-color: var(--fjn-btn-disabled-bg); color: var(--fjn-text-disabled); cursor: default;
}
.fjn-hqc__reject:focus-visible, .fjn-hqc__approve:focus-visible { outline: none; box-shadow: var(--fjn-focus-btn); }

/* „Odrzuć F3: poprawka” sheet */
.fjn-hqc-sheet { width: min(560px, calc(100vw - 32px)); }
.fjn-hqc-sheet form { margin: 0; }
.fjn-hqc-sheet__head { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 10px; }
.fjn-hqc-sheet__title { margin: 0; font-size: 21px; line-height: 28px; }
.fjn-hqc-sheet__sub { font-size: 15px; line-height: 21px; color: var(--fjn-text-2); }
.fjn-hqc-sheet__error { margin: 0 20px 8px; }
.fjn-hqc-sheet__options { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 4px 12px; border: 0; }
.fjn-hqc-sheet__option {
  position: relative; min-height: 60px; padding: 6px 12px; border-radius: 10px; box-sizing: border-box;
  display: flex; align-items: center; gap: 14px; cursor: pointer; border: 2px solid transparent;
}
.fjn-hqc-sheet__option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fjn-hqc-sheet__ring {
  width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2.5px solid var(--fjn-border-strong);
  box-sizing: border-box; display: flex; align-items: center; justify-content: center;
}
.fjn-hqc-sheet__ring::after { content: ""; width: 12px; height: 12px; border-radius: 50%; }
.fjn-hqc-sheet__option:has(input:checked) { background: var(--fjn-brand-50); border-color: var(--fjn-brand-600); }
.fjn-hqc-sheet__option:has(input:checked) .fjn-hqc-sheet__ring { border-color: var(--fjn-brand-600); }
.fjn-hqc-sheet__option:has(input:checked) .fjn-hqc-sheet__ring::after { background: var(--fjn-brand-600); }
.fjn-hqc-sheet__option:has(input:focus-visible) { box-shadow: var(--fjn-focus-btn); }
.fjn-hqc-sheet__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fjn-hqc-sheet__text b { font-size: 18px; }
.fjn-hqc-sheet__text span { font-size: 14px; color: var(--fjn-text-2); }
.fjn-hqc-sheet__reason { display: flex; flex-direction: column; gap: 6px; padding: 6px 24px 0; }
.fjn-hqc-sheet__label { font-size: 15px; font-weight: var(--fjn-fw-bold); }
.fjn-hqc-sheet__input.fjn-textarea { min-height: 56px; padding: 12px 14px; font-size: 16px; border-radius: 8px; }
.fjn-hqc-sheet__person { font-size: 14px; color: var(--fjn-text-2); }
.fjn-hqc-sheet__person:empty { display: none; }
.fjn-hqc-sheet__foot { display: flex; gap: 12px; padding: 16px 20px 20px; }
.fjn-hqc-sheet__foot .fjn-btn { height: 60px; padding: 0 20px; border-radius: 10px; font-size: 18px; white-space: nowrap; }
.fjn-hqc-sheet__cancel { flex: 1; background: var(--fjn-surface); border: 2px solid var(--fjn-text); color: var(--fjn-text); }
.fjn-hqc-sheet__submit { flex: 2; background: var(--fjn-danger-700); border: 0; color: var(--fjn-text-inverse); }
.fjn-hqc-sheet__submit:hover { background: var(--fjn-danger-800); }

@media (max-width: 767px) {
  .fjn-hqc { padding: 16px 16px 0; }
  .fjn-hqc__footer { margin: auto -16px 0; padding: 12px 16px; bottom: var(--fjn-bottomnav-h); }
  .fjn-hqc__item { grid-template-columns: minmax(0, 1fr); }
  .fjn-hqc__reject, .fjn-hqc__approve { height: 56px; font-size: 16px; }
  .fjn-hqc-sheet__foot { flex-direction: column-reverse; }
  .fjn-hqc-sheet__foot .fjn-btn { flex: none; width: 100%; }
}

/* ---------- D124 „Odrzuć {F} · poprawka” page (E1-37_T/M_odrzucenie-etapy) ---------- */
.fjn-hbtn--danger { background: var(--fjn-danger-700); color: var(--fjn-text-inverse); }
.fjn-hbtn--danger:hover { background: var(--fjn-danger-800); color: var(--fjn-text-inverse); }
.fjn-hqcr { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin: 0 auto; padding: 24px 24px 120px; }
.fjn-hqcr__head { display: flex; flex-direction: column; gap: 4px; }
.fjn-hqcr__kicker { font-size: 14px; color: var(--fjn-text-2); }
.fjn-hqcr__title { margin: 0; font-size: 26px; line-height: 34px; }
.fjn-hqcr__sub { font-size: 15px; color: var(--fjn-text-2); }
.fjn-hqcr__label { padding: 0; font-size: 15px; font-weight: 700; }
.fjn-hqcr__stages { margin: 0; padding: 0; list-style: none; background: var(--fjn-surface); border: 1px solid var(--fjn-border); border-radius: 10px; overflow: hidden; }
.fjn-hqcr__stage { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 14px; border-bottom: 1px solid var(--fjn-surface-2); font-size: 15px; }
.fjn-hqcr__stage:last-child { border-bottom: 0; }
.fjn-hqcr__num { display: flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--fjn-border-strong); font-size: 13px; font-weight: 700; }
.fjn-hqcr__name { flex: 1; }
.fjn-hqcr__state, .fjn-hqcr__repeat { font-size: 13px; color: var(--fjn-text-2); }
.fjn-hqcr__stage--done .fjn-hqcr__num { background: var(--fjn-success-700); border-color: var(--fjn-success-700); color: var(--fjn-text-inverse); }
.fjn-hqcr__stage--return { background: #F1F5FB; font-weight: 700; }
.fjn-hqcr__stage--return .fjn-hqcr__num { border-radius: 6px; background: var(--fjn-brand-600); border-color: var(--fjn-brand-600); color: var(--fjn-text-inverse); }
.fjn-hqcr__stage--repeat .fjn-hqcr__num { border-radius: 6px; background: var(--fjn-brand-100); border-color: var(--fjn-brand-600); color: var(--fjn-brand-700); }
.fjn-hqcr__stage--repeat:has(input:checked) .fjn-hqcr__name { font-weight: 700; }
.fjn-hqcr__stage--out { color: var(--fjn-text-3); }
.fjn-hqcr__stage--out .fjn-hqcr__num { border-color: var(--fjn-surface-2); background: var(--fjn-surface-2); color: var(--fjn-text-3); }
.fjn-hqcr__stage--rejected .fjn-hqcr__num { border-radius: 6px; border-color: var(--fjn-danger-100); background: var(--fjn-danger-100); color: var(--fjn-danger-700); }
.fjn-hqcr__s-done, .fjn-hqcr__s-return, .fjn-hqcr__repeat { display: none; }
.fjn-hqcr__stage--done .fjn-hqcr__s-done, .fjn-hqcr__stage--return .fjn-hqcr__s-return { display: inline; }
.fjn-hqcr__stage--repeat .fjn-hqcr__repeat { display: flex; }
.fjn-hqcr__repeat { align-items: center; gap: 8px; cursor: pointer; }
.fjn-hqcr__repeat input { width: 20px; height: 20px; accent-color: var(--fjn-brand-600); }
.fjn-hqcr__hint { margin: 0; font-size: 13px; color: var(--fjn-text-2); }
.fjn-hqcr__group { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }
.fjn-hqcr__chips { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 767px) { .fjn-hqcr { padding: 16px 16px 180px; } }

/* ---------- D124 „Nie” point: description and a pinned photo (E1-37_T_punkt-nie-zdjecie) ---------- */
.fjn-hqc__more { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.fjn-hqc__more-hint { font-size: 13px; color: var(--fjn-danger-700); }
.fjn-hqc__note-input { height: 44px; }
.fjn-hqc__more-error { font-size: 13px; color: var(--fjn-danger-700); }
.fjn-hqc__pin { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fjn-text-2); }
.fjn-hqc__pin img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; }
.fjn-hqc__pin-add { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border: 1.5px dashed var(--fjn-border-strong); border-radius: 6px; cursor: pointer; }
