/* FJN System — E1-21…E1-23 intake in 3 steps (block 4, ModZlecenia „przyjecie”, „zdjecia”, „etykiety”). */

/* ---------- Common ---------- */
.fjn-intake { gap: var(--fjn-sp-4); min-height: calc(100vh - var(--fjn-topbar-h)); padding-bottom: 0; }
.fjn-intake > .fjn-form-footer { margin-top: auto; }
@media (max-width: 767px) { .fjn-intake { min-height: calc(100vh - var(--fjn-topbar-h-m) - var(--fjn-bottomnav-h)); } }
.fjn-intake--step1 > :not(.fjn-form-footer) { max-width: 960px; width: 100%; }
.fjn-intake--photos > :not(.fjn-form-footer) { max-width: 900px; width: 100%; }
.fjn-intake--labels > :not(.fjn-form-footer) { max-width: 1100px; width: 100%; }
.fjn-intake .fjn-page__intro { display: flex; flex-direction: column; gap: 6px; }
.fjn-intake__title { font-size: 26px; line-height: 34px; }
.fjn-intake__step { font-size: 14px; line-height: 20px; color: var(--fjn-text-2); }
.fjn-intake__card { gap: 14px; }
.fjn-intake__card .fjn-card__title { margin: 0; }
.fjn-intake .fjn-field--error .fjn-field__label { color: var(--fjn-danger-700); }
.fjn-intake-errors { box-shadow: 0 0 0 3px rgba(179, 38, 30, .25); }
.fjn-intake .fjn-form-footer .fjn-btn { white-space: nowrap; }

/* ---------- Step 1: scope of work (checkbox tiles) ---------- */
.fjn-intake-scope { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--fjn-sp-2); }
.fjn-intake-scope__tile {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 var(--fjn-sp-3);
  border: 1px solid var(--fjn-border-strong); border-radius: 8px; background: var(--fjn-surface);
  font-size: 15px; cursor: pointer;
}
.fjn-intake-scope__input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.fjn-intake-scope__box {
  flex: none; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border: 2px solid var(--fjn-border-strong); border-radius: 4px; color: transparent;
}
.fjn-intake-scope__tile:has(input:checked) { border: 2px solid var(--fjn-brand-600); background: var(--fjn-brand-50); font-weight: var(--fjn-fw-bold); padding: 0 11px; }
.fjn-intake-scope__input:checked + .fjn-intake-scope__box { background: var(--fjn-brand-600); border-color: var(--fjn-brand-600); color: var(--fjn-text-inverse); }
.fjn-intake-scope__input:focus-visible + .fjn-intake-scope__box { box-shadow: var(--fjn-focus-btn); }
.fjn-intake-scope__tile.fjn-intake-scope__tile--error { border: 2px solid var(--fjn-danger-700); padding: 0 11px; }

/* ---------- Step 1: set ---------- */
.fjn-intake__set { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1279px) { .fjn-intake__set { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .fjn-intake__set { grid-template-columns: minmax(0, 1fr); } }
.fjn-intake__instructions .fjn-textarea { min-height: 72px; }

/* ---------- Step 2: photos (D118 ModZlecUzup „foto”) ---------- */
.fjn-intake-retry { align-items: flex-start; }
.fjn-intake-retry[hidden] { display: none; }
.fjn-intake-retry .fjn-alert__body { display: block; font-size: 14px; line-height: 20px; }
.fjn-intake-shots__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fjn-intake-shots__title { margin: 0; font-size: 16px; line-height: 22px; }
.fjn-intake-shots__count { font-size: 13px; color: var(--fjn-text-2); white-space: nowrap; }
.fjn-intake-shots { gap: 10px; padding: 12px 14px; }
.fjn-intake-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.fjn-intake-photo, .fjn-intake-photos__add { flex: none; width: 104px; height: 104px; border-radius: 8px; box-sizing: border-box; }
@media (max-width: 767px) { .fjn-intake-photo, .fjn-intake-photos__add { width: 92px; height: 92px; } }
.fjn-intake-photo {
  position: relative; overflow: hidden;
  background: repeating-linear-gradient(135deg, var(--fjn-surface-2) 0 6px, #E4E7EB 6px 12px);
}
.fjn-intake-photo__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fjn-intake-photo__tag {
  position: absolute; left: 4px; bottom: 4px; max-width: calc(100% - 8px); display: flex; align-items: center; height: 20px; padding: 0 6px;
  border-radius: 4px; background: var(--fjn-surface); color: var(--fjn-text-2); font-size: 11px; font-weight: var(--fjn-fw-bold);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fjn-intake-photo__tag--damage { background: var(--fjn-warning-100); color: var(--fjn-warning-700); }
.fjn-intake-photo__delete {
  position: absolute; top: 4px; right: 4px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 6px; background: rgba(21, 24, 28, .7); color: var(--fjn-text-inverse);
}
.fjn-intake-photo__delete:hover { background: rgba(21, 24, 28, .85); color: var(--fjn-text-inverse); }
.fjn-intake-photo__delete:focus-visible { outline: none; box-shadow: var(--fjn-focus-btn); }
.fjn-intake-photo__retry {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 0; background: rgba(251, 230, 228, .92); color: var(--fjn-danger-700); font: inherit; font-size: 12px; font-weight: var(--fjn-fw-bold); cursor: pointer;
}
.fjn-intake-photo--failed { box-shadow: 0 0 0 2px var(--fjn-danger-700); }
.fjn-intake-photo--failed .fjn-intake-photo__retry { display: flex; }
.fjn-intake-photo__retry:focus-visible { outline: none; box-shadow: var(--fjn-focus-btn); }
.fjn-intake-photo--refused { border: 2px solid var(--fjn-danger-700); background: var(--fjn-danger-100); }
.fjn-intake-photo__refused {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 4px; color: var(--fjn-danger-700); font-size: 11px; font-weight: var(--fjn-fw-bold); text-align: center;
}
.fjn-intake-photos__add {
  display: flex; align-items: flex-end; padding: 0 10px 8px; border: 1.5px dashed var(--fjn-border-strong); background: var(--fjn-surface);
  color: var(--fjn-brand-600); font: inherit; font-size: 11px; font-weight: var(--fjn-fw-bold); cursor: pointer;
}
.fjn-intake-photos__add:hover { background: var(--fjn-brand-50); }
.fjn-intake-photos__add:focus-visible { outline: none; box-shadow: var(--fjn-focus-btn); }
.fjn-intake-refusals { display: flex; flex-direction: column; gap: 8px; }
.fjn-intake-refusals:empty { display: none; }
.fjn-intake-refusal { align-items: flex-start; gap: 10px; padding: 10px 12px; }
.fjn-intake-refusal__text { margin: 0; font-size: 14px; line-height: 20px; color: var(--fjn-text); }
.fjn-intake-refusal__retry { padding: 0; border: 0; background: none; color: var(--fjn-brand-600); font: inherit; font-weight: var(--fjn-fw-bold); text-decoration: underline; cursor: pointer; }
/* „Rodzaj zdjęcia” and „Usunąć zdjęcie?” (480 px, M bottom sheet) */
.fjn-intake-dlg { --fjn-modal-w: 480px; }
.fjn-intake-dlg .fjn-dialog__title { font-size: 19px; line-height: 26px; }
.fjn-intake-dlg__text { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--fjn-text-2); }
.fjn-intake-dlg__photo { display: block; width: 120px; height: 120px; border-radius: 8px; object-fit: cover; background: var(--fjn-surface-2); }
.fjn-intake-kind__body { gap: 8px; color: var(--fjn-text); }
.fjn-intake-kind__options, .fjn-intake-kind__rims { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.fjn-intake-kind__opt {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px;
  border: 1px solid var(--fjn-border); border-radius: 8px; cursor: pointer;
}
.fjn-intake-kind__opt:has(input:checked) { border: 2px solid var(--fjn-brand-600); background: var(--fjn-brand-50); padding: 7px 11px; }
.fjn-intake-kind__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.fjn-intake-kind__dot { flex: none; width: 20px; height: 20px; border: 2px solid var(--fjn-border-strong); border-radius: 50%; box-sizing: border-box; }
.fjn-intake-kind__input:checked + .fjn-intake-kind__dot { border: 6px solid var(--fjn-brand-600); }
.fjn-intake-kind__input:focus-visible + .fjn-intake-kind__dot { box-shadow: var(--fjn-focus-btn); }
.fjn-intake-kind__text { display: flex; flex-direction: column; gap: 1px; font-size: 13px; color: var(--fjn-text-2); }
.fjn-intake-kind__text b { font-size: 15px; color: var(--fjn-text); }
.fjn-intake-kind__legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: var(--fjn-fw-bold); }
.fjn-intake-kind__body:has(input[name=rodzaj][value=general]:checked) .fjn-intake-kind__rims { display: none; }
.fjn-intake-kind__rim-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fjn-intake-kind__rim {
  position: relative; display: flex; align-items: center; justify-content: center; height: 48px; border: 1px solid var(--fjn-border);
  border-radius: 8px; background: var(--fjn-surface); font: 700 16px var(--fjn-font-mono); cursor: pointer;
}
.fjn-intake-kind__rim:has(input:checked) { border: 2px solid var(--fjn-brand-600); background: var(--fjn-brand-600); color: var(--fjn-text-inverse); }
.fjn-intake-kind__rim:has(input:focus-visible) { box-shadow: var(--fjn-focus-btn); }
.fjn-intake-kind__shoot { cursor: pointer; }
.fjn-intake-kind__shoot:focus-within { box-shadow: var(--fjn-focus-btn); }

/* ---------- Step 3: labels ---------- */
.fjn-intake-print { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--fjn-sp-5); align-items: start; }
@media (max-width: 1279px) { .fjn-intake-print { grid-template-columns: minmax(0, 1fr); } }
.fjn-intake-labels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 767px) { .fjn-intake-labels { grid-template-columns: minmax(0, 1fr); } }
.fjn-intake-label {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: var(--fjn-sp-3); align-items: center;
  aspect-ratio: 62 / 29; padding: var(--fjn-sp-3); border: 1.5px solid var(--fjn-text); border-radius: 6px;
}
.fjn-intake-label__qr { width: 84px; height: 84px; }
.fjn-intake-label__qr-svg { display: block; width: 100%; height: 100%; }
.fjn-intake-label__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fjn-intake-label__order { font: 700 13px var(--fjn-font-mono); }
.fjn-intake-label__rim { font: 700 32px/36px var(--fjn-font-mono); }
.fjn-intake-label__caption { overflow: hidden; font-size: 11px; color: var(--fjn-text-2); white-space: nowrap; text-overflow: ellipsis; }
.fjn-intake-print__panel { gap: 14px; padding: 18px; }
.fjn-intake-print__panel .fjn-btn { width: 100%; justify-content: center; }
.fjn-intake-print__hint { margin: 0; font-size: 13px; line-height: 18px; color: var(--fjn-text-2); }
.fjn-intake-done { align-items: center; padding: var(--fjn-sp-3) 14px; }
.fjn-intake-done__text { flex: 1 1 240px; margin: 0; font-size: 15px; color: var(--fjn-text); }

/* ---------- Unfinished intake (D118 ModZlecUzup „przyj”, „przyj-szkic”) ---------- */
.fjn-intake--status > :not(.fjn-form-footer) { max-width: 1200px; width: 100%; }
.fjn-intake__heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fjn-intake-chip { background: var(--fjn-warning-100); color: var(--fjn-warning-700); }
.fjn-intake-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 8px; }
.fjn-intake-bar > .fjn-icon { flex: none; }
.fjn-intake-bar--draft { background: var(--fjn-warning-100); color: var(--fjn-warning-700); }
.fjn-intake-bar--saved { background: var(--fjn-success-100); color: var(--fjn-success-700); }
.fjn-intake-bar__text { flex: 1 1 220px; margin: 0; font-size: 15px; line-height: 21px; color: var(--fjn-text); }
.fjn-intake-bar--draft b { color: var(--fjn-warning-700); }
.fjn-intake-bar--saved b { color: var(--fjn-success-700); }
.fjn-intake-check { gap: 10px; padding: 14px 16px; }
.fjn-intake-check__head { display: flex; justify-content: space-between; align-items: center; }
.fjn-intake-check__title { margin: 0; font-size: 16px; line-height: 22px; }
.fjn-intake-check__count { font-size: 13px; color: var(--fjn-text-2); white-space: nowrap; }
.fjn-intake-check__list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fjn-intake-check__row { display: flex; align-items: center; gap: 10px; min-height: 36px; color: var(--fjn-text); font-weight: var(--fjn-fw-regular); text-decoration: none; }
.fjn-intake-check__row:hover { color: var(--fjn-text); }
a.fjn-intake-check__row:hover .fjn-intake-check__label { text-decoration: underline; }
.fjn-intake-check__mark {
  flex: none; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border: 2px solid var(--fjn-border-strong); border-radius: 50%; box-sizing: border-box; color: var(--fjn-text-inverse);
}
.fjn-intake-check__row--done .fjn-intake-check__mark { border: 0; background: var(--fjn-success-700); }
.fjn-intake-check__row--missing .fjn-intake-check__mark { border-color: var(--fjn-danger-700); }
.fjn-intake-check__label { flex: 1; min-width: 0; font-size: 15px; }
.fjn-intake-check__value { font-size: 13px; color: var(--fjn-text-2); white-space: nowrap; }
.fjn-intake-check__row--missing .fjn-intake-check__value { color: var(--fjn-danger-700); }

/* ---------- Step 3 without a label printer (D118 ModZlecUzup „etyk”) ---------- */
.fjn-intake-noprinter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 767px) { .fjn-intake-noprinter { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.fjn-intake-noprinter__side { display: flex; flex-direction: column; gap: 12px; }
.fjn-intake-card-title { margin: 0; font-size: 16px; line-height: 22px; }
.fjn-intake-mini, .fjn-intake-printer, .fjn-intake-hq { gap: 10px; padding: 14px 16px; }
.fjn-intake-mini__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fjn-intake-mini__label { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border: 1.5px dashed var(--fjn-border-strong); border-radius: 6px; }
.fjn-intake-mini__qr { flex: none; width: 44px; height: 44px; }
.fjn-intake-mini__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fjn-intake-mini__rim { font: 700 18px var(--fjn-font-mono); }
.fjn-intake-mini__order { overflow: hidden; font: 10px var(--fjn-font-mono); color: var(--fjn-text-2); white-space: nowrap; text-overflow: ellipsis; }
.fjn-intake-printer__warning { align-items: flex-start; gap: 10px; padding: 10px 12px; }
.fjn-intake-printer__text { margin: 0; font-size: 14px; line-height: 20px; color: var(--fjn-text); }
.fjn-intake-printer__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fjn-intake-printer__pdf { height: 44px; font-size: 14px; }
.fjn-intake-hq { gap: 8px; border: 2px solid var(--fjn-brand-600); }
.fjn-intake-hq__text { margin: 0; font-size: 14px; line-height: 20px; }
.fjn-intake-hq__label { font-size: 15px; }

/* D179 / SPEC 1.161: the accepted variant read only + „Do ustalenia przy przyjęciu” */
.fjn-oaccept { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fjn-oaccept__card { border: 1px solid var(--fjn-border); border-radius: var(--fjn-r-lg); background: var(--fjn-surface-2); }
.fjn-oaccept__head { display: flex; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid var(--fjn-border); }
.fjn-oaccept__lock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fjn-text-2); }
.fjn-oaccept__title { margin: 4px 0 2px; font-size: 18px; }
.fjn-oaccept__meta { font-size: 13px; color: var(--fjn-text-2); }
.fjn-oaccept__price { display: flex; flex-direction: column; align-items: flex-end; }
.fjn-oaccept__price b { font-size: 22px; }
.fjn-oaccept__price span { font-size: 12px; color: var(--fjn-text-2); }
.fjn-oaccept__lines { margin: 0; padding: 0 16px; list-style: none; }
.fjn-oaccept__lines li { display: grid; grid-template-columns: minmax(0, 1fr) 72px 64px; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--fjn-border); font-size: 15px; }
.fjn-oaccept__lines li span:last-child { text-align: right; }
.fjn-oaccept__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 14px 16px; }
.fjn-oaccept__facts dt { font-size: 13px; color: var(--fjn-text-2); }
.fjn-oaccept__facts dd { margin: 2px 0 0; font-weight: 700; }
.fjn-oaccept__facts dd.is-missing { color: var(--fjn-warning-700); }
.fjn-oaccept__foot { margin: 0; padding: 10px 16px; border-top: 1px solid var(--fjn-border); font-size: 13px; color: var(--fjn-text-2); }
.fjn-oaccept__edit { gap: 12px; }
.fjn-oaccept__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fjn-oaccept__banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 8px; background: var(--fjn-warning-100); color: var(--fjn-warning-700); }
.fjn-oaccept__banner div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.fjn-oaccept__banner span { color: var(--fjn-text); }
.fjn-oaccept__fix { flex: none; }
@media (max-width: 767px) {
  .fjn-oaccept { grid-template-columns: minmax(0, 1fr); }
  .fjn-oaccept__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fjn-oaccept__banner { flex-wrap: wrap; }
}

/* D240 (c) the card „Klient” of the step 1 opened from the quote, the blocks of E1-09 */
.fjn-iq-block { margin-bottom: 12px; border: 1px solid transparent; }
.fjn-iq-block.is-marked { border: 2px solid var(--fjn-danger-700); }
.fjn-iq.is-error { border-color: var(--fjn-danger-700); }
.fjn-iq .fjn-field--error .fjn-field__label, .fjn-iq .fjn-field--error .fjn-field__error { color: var(--fjn-danger-700); font-weight: 600; }
.fjn-iq .fjn-iq__addbtn { display: inline-flex; width: auto; align-self: flex-start; margin-top: 4px; }
.fjn-iq__search { display: flex; gap: 8px; }
.fjn-iq__search .fjn-input { flex: 1; min-width: 0; }
.fjn-iq__list { display: flex; flex-direction: column; margin: 6px 0 0; padding: 0; list-style: none; border: 1px solid var(--fjn-border); border-radius: 8px; background: var(--fjn-surface); box-shadow: 0 4px 12px rgba(16, 24, 40, .08); overflow: hidden; }
.fjn-iq__list > li + li { border-top: 1px solid var(--fjn-border); }
.fjn-iq__list > li.fjn-small { padding: 12px; }
.fjn-iq__hit { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 12px; border: 0; background: none; text-align: left; font: inherit; color: var(--fjn-text); cursor: pointer; }
.fjn-iq__hit > svg { flex: none; color: var(--fjn-text-2); }
.fjn-iq__hit:hover { background: #F1F5FB; }
.fjn-iq__row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fjn-iq__row-text > span { font-size: 13px; color: var(--fjn-text-2); }
.fjn-iq__chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 12px; border: 2px solid #1E4F8A; border-radius: 8px; background: #F1F5FB; }
.fjn-iq__add { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; padding: 12px; border: 1px solid var(--fjn-border); border-radius: 8px; }
.fjn-iq__btns { display: flex; gap: 10px; }
.fjn-iq__branches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.fjn-iq__transfer { display: flex; gap: 8px; align-items: center; margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: #E5F2F3; font-size: 14px; }
@media (max-width: 767px) { .fjn-iq__branches { grid-template-columns: 1fr; } .fjn-iq__search .fjn-btn, .fjn-iq__btns .fjn-btn { min-height: 56px; } }
