/* FJN System — E1-39 „Magazyn renowacja” (D166): tiles, grid of racks A–F × levels 4→1, place panel.
   The states and colours of the E2-15 map (fjn-storage-map.css: tiles, legend, chips, free slots). */
.fjn-rstore { display: flex; flex-direction: column; gap: 14px; }
.fjn-rstore__head { display: flex; flex-direction: column; gap: 12px; }
.fjn-rstore__title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.fjn-rstore__title > span { font-size: 15px; color: var(--fjn-text-2); }
.fjn-rstore__head .fjn-board__switch { align-self: flex-start; }
.fjn-rstore__bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fjn-rstore__bar .fjn-map__legend { margin-left: auto; }
.fjn-rstore__q { flex: 0 1 380px; min-width: 0; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #fff; border: 1px solid var(--fjn-border-strong); border-radius: 6px; box-sizing: border-box; color: var(--fjn-text-2); }
.fjn-rstore__q:focus-within { border: 2px solid var(--fjn-brand-600); padding: 0 11px; }
.fjn-rstore__q input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--fjn-text); }
.fjn-rstore__tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fjn-rstore__empty { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 8px; background: #E3ECF7; color: #173F6F; font-size: 14px; }
.fjn-rstore__empty > span { flex: 1; color: var(--fjn-text); }
.fjn-rstore__empty b { color: #173F6F; }
.fjn-rstore__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.fjn-rstore.has-panel .fjn-rstore__main { grid-template-columns: minmax(0, 1fr) 340px; }
.fjn-rstore__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 14px 16px 16px; background: #fff; border: 1px solid var(--fjn-border); border-radius: 10px; }
.fjn-rstore__rack { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fjn-rstore__rackhead { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.fjn-rstore__rackhead b { font-size: 15px; white-space: nowrap; }
.fjn-rstore__rackhead span { font-size: 13px; color: var(--fjn-text-2); }

/* a place: the whole tile opens the panel, the order numbers open the order */
.fjn-rplace { position: relative; min-height: 90px; padding: 10px 10px 8px; border-radius: 6px; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; }
.fjn-rplace.is-free { background: #fff; border: 1.5px solid #1B6B41; color: #1B6B41; }
.fjn-rplace.is-part { background: #E3ECF7; border: 1.5px solid #1E4F8A; color: #173F6F; }
.fjn-rplace.is-full { background: #1E4F8A; border: 1.5px solid #1E4F8A; color: #fff; }
.fjn-rplace.is-dim { opacity: .3; }
.fjn-rplace.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #15181C; z-index: 1; }
.fjn-rplace__open { position: absolute; inset: 0; border-radius: 6px; }
.fjn-rplace__head { display: flex; justify-content: space-between; gap: 6px; font-size: 15px; pointer-events: none; }
.fjn-rplace__orders { display: flex; flex-wrap: wrap; gap: 2px 8px; position: relative; }
.fjn-rplace__orders a, .fjn-rplace__orders span { font-size: 13px; font-weight: 700; color: inherit; text-decoration: underline; }
.fjn-rplace__free { font-size: 13px; pointer-events: none; }

/* panel of a place */
.fjn-rstore__panel { background: #fff; border: 1px solid var(--fjn-border); border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; }
.fjn-rstore__phead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--fjn-surface-2); }
.fjn-rstore__phead > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.fjn-rstore__phead b { font-size: 24px; line-height: 30px; }
.fjn-rstore__phead small { flex-basis: 100%; font-size: 13px; color: var(--fjn-text-2); }
.fjn-rstore__phead .fjn-map__chip.is-part { background: #D7E3F4; }
.fjn-rstore__plist { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 16px; overflow-y: auto; }
.fjn-rstore__plist .fjn-map__free { min-height: 48px; }
.fjn-rstore__order { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--fjn-border); border-radius: 8px; font-size: 13px; color: var(--fjn-text-2); }
.fjn-rstore__order > b { font-size: 14px; color: var(--fjn-text); }
.fjn-rstore__order span b { color: var(--fjn-text); }
.fjn-rstore__ohead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fjn-rstore__ohead a, .fjn-rstore__ohead > b { font-size: 16px; font-weight: 700; }
.fjn-rstore__scrim { display: none; }

/* tablet: the panel from the right over the dimmed list */
@media (max-width: 1199px) {
  .fjn-rstore.has-panel .fjn-rstore__main { grid-template-columns: minmax(0, 1fr); }
  .fjn-rstore__panel { position: fixed; top: var(--fjn-topbar-h); right: 0; bottom: 0; width: 400px; border-radius: 0; border-width: 0 0 0 1px; z-index: 30; box-shadow: -8px 0 30px rgba(21, 24, 28, .15); }
  .fjn-rstore__scrim { display: block; position: fixed; inset: var(--fjn-topbar-h) 0 0 0; background: rgba(21, 24, 28, .25); z-index: 29; }
  .fjn-rstore__q, .fjn-rstore__bar .fjn-filter__button { height: 56px; }
  .fjn-rstore__grid { gap: 8px; padding: 12px; }
  .fjn-rplace { min-height: 90px; padding: 8px; }
}

/* phone: one rack at a time, levels as big rows, the panel as a sheet from the bottom */
@media (max-width: 767px) {
  /* E1-39_M_pusty: the text above, „Przejdź do zleceń” under it across the width (4.12.3) */
  .fjn-rstore__empty { flex-wrap: wrap; align-items: flex-start; }
  .fjn-rstore__empty > span { flex: 1 1 calc(100% - 28px); }
  .fjn-rstore__empty .fjn-btn { flex: 1 1 100%; }
  .fjn-rstore { gap: 12px; }
  .fjn-rstore__q { flex-basis: 100%; height: 56px; }
  .fjn-rstore__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fjn-rstore__phone { display: flex; flex-direction: column; gap: 10px; }
  .fjn-rstore__phone .fjn-map__rowsel { justify-content: flex-start; }
  .fjn-rstore__phone .fjn-map__rowsel > span.fjn-mono { margin-left: auto; font-size: 13px; color: var(--fjn-text-2); }
  .fjn-rplace { min-height: 72px; padding: 10px 14px; border-radius: 8px; }
  .fjn-rplace__head { font-size: 18px; }
  .fjn-rplace__orders a, .fjn-rplace__orders span { font-size: 15px; }
  .fjn-rstore__panel { top: auto; left: 0; right: 0; bottom: var(--fjn-bottomnav-h); width: auto; max-height: 82vh; border-radius: 16px 16px 0 0; border-width: 0; box-shadow: 0 -8px 30px rgba(21, 24, 28, .2); }
  .fjn-rstore__scrim { background: rgba(21, 24, 28, .45); }
}

/* E1-24 „Magazyn renowacja” window: counters and the place list */
.fjn-rentry { width: min(520px, calc(100vw - 32px)); }
.fjn-rentry__error { display: flex; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: 6px; background: #FBE9E7; color: #8C1D18; font-size: 14px; }
.fjn-rentry__counts { border: 1px solid var(--fjn-border); border-radius: 8px; }
.fjn-rentry__count { display: grid; grid-template-columns: 1fr 44px 56px 44px; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; }
.fjn-rentry__count + .fjn-rentry__count { border-top: 1px solid var(--fjn-surface-2); }
.fjn-rentry__count label { font-weight: 700; }
.fjn-rentry__step { width: 44px; height: 44px; padding: 0; justify-content: center; }
.fjn-rentry__value { width: 56px; height: 44px; border: 0; background: none; text-align: center; font-size: 20px; font-weight: 700; }
.fjn-rentry__label { display: block; margin: 16px 0 6px; }
.fjn-rentry__search { height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 2px solid var(--fjn-brand-600); border-radius: 6px; box-sizing: border-box; color: var(--fjn-text-2); }
.fjn-rentry__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 15px var(--fjn-font-mono); color: var(--fjn-text); }
.fjn-rentry__shown { font-size: 13px; white-space: nowrap; }
.fjn-rentry__places { margin-top: 6px; max-height: 240px; overflow-y: auto; border: 1px solid var(--fjn-border); border-radius: 8px; }
.fjn-rentry__place { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 14px; border-top: 1px solid var(--fjn-surface-2); cursor: pointer; }
.fjn-rentry__place:first-child { border-top: 0; }
.fjn-rentry__place[hidden] { display: none; }
.fjn-rentry__place input { width: 20px; height: 20px; margin: 0; accent-color: var(--fjn-brand-600); }
.fjn-rentry__place > b { width: 72px; font-size: 15px; }
.fjn-rentry__place .fjn-map__chip { height: 22px; font-size: 12px; }
.fjn-rentry__place .fjn-map__chip.is-free { background: #fff; box-shadow: inset 0 0 0 1.5px #1B6B41; }
.fjn-rentry__place .fjn-map__chip.is-part { box-shadow: inset 0 0 0 1.5px #1E4F8A; }
.fjn-rentry__nums { font: 13px var(--fjn-font-mono); color: var(--fjn-text-2); }
.fjn-rentry__place:has(input:checked) {  /* 4.34.1: only the checked place */ background: #F4F7FB; box-shadow: inset 3px 0 0 var(--fjn-brand-600); }
.fjn-rentry__place.is-full { cursor: not-allowed; background: var(--fjn-surface); color: var(--fjn-text-2); }
.fjn-rentry__place.is-full > b, .fjn-rentry__place.is-full .fjn-map__chip { opacity: .55; }
@media (max-width: 1199px) {
  .fjn-rentry__count { grid-template-columns: 1fr 56px 64px 56px; }
  .fjn-rentry__step { width: 56px; height: 56px; }
  .fjn-rentry__place { min-height: 56px; }
}

/* E1-24 section „Magazyn renowacja” (D167: the first card of „Felgi i etapy”, blue frame; computer:
   next to the rims, tablet and phone: above them) */
.fjn-rtab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 1199px) { .fjn-rtab { grid-template-columns: minmax(0, 1fr); } }
.fjn-rcard { padding: 0; border: 1.5px solid var(--fjn-brand-600); }
.fjn-rprint { border-color: var(--fjn-brand-600); color: var(--fjn-brand-600); }
.fjn-rcard__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--fjn-surface-2); }
.fjn-rcard__head .fjn-card__title { margin: 0; }
.fjn-rcard__chip { height: 26px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.fjn-rcard__chip i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.fjn-rcard__chip.is-stored { background: #E3ECF7; color: #173F6F; }
.fjn-rcard__chip.is-missing { background: #FCEFD6; color: #8A5300; }
.fjn-rcard__chip.is-freed { background: var(--fjn-surface-2); color: var(--fjn-text-2); }
.fjn-rcard__body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.fjn-rcard__place { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.fjn-rcard__place b { font-size: 26px; line-height: 32px; }
.fjn-rcard__place span, .fjn-rcard__meta, .fjn-rcard__old { font-size: 13px; color: var(--fjn-text-2); }
.fjn-rcard__meta, .fjn-rcard__old, .fjn-rcard__text { margin: 0; }
.fjn-rcard__counts { align-self: stretch; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fjn-rcard__counts > div { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--fjn-border); border-radius: 6px; }
.fjn-rcard__counts span { font-size: 12px; color: var(--fjn-text-2); }
.fjn-rcard__counts b { font-size: 18px; }
.fjn-rcard__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fjn-rcard__link { font-weight: 700; }

/* E1-30 preview of an order (D166 „karta-podglad”) in the side panel of the board */
.fjn-bprev { display: flex; flex-direction: column; }
.fjn-bprev__body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 18px; }
.fjn-bprev__h { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fjn-text-2); }
.fjn-bprev__bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.fjn-bprev__bar i { height: 10px; border-radius: 2px; background: #D8DCE1; }
.fjn-bprev__bar i.is-done { background: #1B6B41; }
.fjn-bprev__bar i.is-active { background: #1E4F8A; }
.fjn-bprev__bar i.is-skip { background: repeating-linear-gradient(135deg, #D8DCE1 0 3px, #F4F5F6 3px 6px); }
.fjn-bprev__now, .fjn-bprev__none { margin: 8px 0 0; font-size: 13px; color: var(--fjn-text-2); }
.fjn-bprev__place { margin: 0; display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: var(--fjn-text-2); }
.fjn-bprev__place b { font-size: 20px; color: var(--fjn-text); }
.fjn-bprev__text { margin: 0; font-size: 15px; }
.fjn-bprev__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--fjn-border); }
.fjn-bprev__open { flex-basis: auto; margin-left: auto; }
.fjn-bprev__foot .fjn-bprev__open:last-child { order: 3; }
