/* Strefa klienta na stronie firmowej.
   Ekrany strefy są te same co w panelu (tabele, formularze, kafle, znaczniki
   stanu); ten arkusz rysuje je w kolorach i proporcjach strony. Reguły są
   zawężone do .strefa-tresc, bo część nazw (.sekcja, .pole, .dokument) strona
   używa już po swojemu. */

/* ---------------------------------------------------------- pasek strefy */

.strefa-pasek { background: var(--granat); color: #dfe6ec; }
.strefa-pasek-wnetrze {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px 24px; flex-wrap: wrap; min-height: 54px;
}
.strefa-nazwa { margin: 0; font-weight: 700; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.strefa-nazwa a { color: #fff; text-decoration: none; }
.strefa-nazwa span { font-weight: 400; color: #aab7c4; font-size: 0.92rem; }
.strefa-menu { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.strefa-menu a, .strefa-wyloguj button {
  color: #dfe6ec; text-decoration: none; padding: 8px 12px; border-radius: 6px;
  font: inherit; font-size: 0.93rem; background: none; border: 0; cursor: pointer;
}
.strefa-menu a:hover, .strefa-wyloguj button:hover { background: var(--granat-2); color: #fff; }
.strefa-menu a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--akcent); border-radius: 0; }
.strefa-wyloguj { margin: 0 0 0 8px; }
.strefa-wyloguj button { border: 1px solid var(--granat-linia); }
.strefa-przelacznik, .strefa-przycisk { display: none; }

@media (max-width: 820px) {
  .strefa-przycisk {
    display: inline-block; cursor: pointer; color: #fff; font-size: 0.93rem;
    padding: 7px 12px; border: 1px solid var(--granat-linia); border-radius: 6px;
  }
  .strefa-menu { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 0 0 12px; }
  .strefa-przelacznik:checked ~ .strefa-menu { display: flex; }
  .strefa-menu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--akcent); }
  .strefa-wyloguj { margin: 6px 0 0; }
  .strefa-wyloguj button { width: 100%; text-align: left; }
}

/* ----------------------------------------------------------------- treść */

/* Stopka na dole okna także przy krótkiej stronie (np. pusta lista). */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }

.strefa-tresc { padding-top: 32px; padding-bottom: 72px; font-size: 16px; }
.strefa-tresc h1 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); margin: 0; }
.strefa-tresc .tytul-blok {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 24px;
}
.strefa-tresc .podtytul { margin: 0; color: var(--szary); }

.strefa-tresc .sekcja { padding: 0; margin-top: 36px; }
.strefa-tresc .sekcja h2, .strefa-tresc > h2 {
  font-size: 1.15rem; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--linia);
}
.strefa-tresc .nota { color: var(--szary); font-size: 0.93rem; margin: 0 0 12px; }
.strefa-tresc .mocno .nota { font-weight: 400; }
.strefa-tresc .wroc { margin: 0 0 18px; font-size: 0.93rem; }
.strefa-tresc .mocno { font-weight: 650; }
.strefa-tresc code { font-size: 0.9em; background: var(--tlo); padding: 1px 5px; border-radius: 4px; }

/* komunikaty */
.strefa-tresc .komunikat {
  padding: 12px 16px; border-radius: 8px; margin: 0 0 16px; border: 1px solid; border-left-width: 4px;
}
.strefa-tresc .k-ok    { background: var(--ok-tlo); color: var(--ok); border-color: #b9e0c9; border-left-color: var(--ok); }
.strefa-tresc .k-uwaga { background: #fdf6e7; color: #7a4d06; border-color: #f0dcae; border-left-color: #c98a12; }
.strefa-tresc .k-alarm { background: var(--blad-tlo); color: var(--blad); border-color: #f1bfba; border-left-color: var(--blad); }

/* kafle */
.strefa-tresc .kafle {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 0 0 24px;
}
.strefa-tresc .kafel {
  background: var(--biel); border: 1px solid var(--linia); border-radius: var(--promien);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 4px;
}
.strefa-tresc .kafel-l { font-size: 1.7rem; font-weight: 700; line-height: 1.15; }
.strefa-tresc .kafel-o { font-size: 0.8rem; color: var(--szary); text-transform: uppercase; letter-spacing: 0.06em; }

/* tabele */
.strefa-tresc .tab {
  width: 100%; border-collapse: collapse; background: var(--biel);
  border: 1px solid var(--linia); border-radius: var(--promien); overflow: hidden; font-size: 0.95rem;
}
.strefa-tresc .tab th, .strefa-tresc .tab td {
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--linia); vertical-align: middle;
}
.strefa-tresc .tab thead th {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--szary);
  background: var(--tlo); font-weight: 600; white-space: nowrap;
}
.strefa-tresc .tab tbody tr:last-child td { border-bottom: 0; }
.strefa-tresc .tab tbody tr:hover { background: #fafbfc; }
.strefa-tresc .tab .pr { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.strefa-tresc .tab .nr { font-variant-numeric: tabular-nums; white-space: nowrap; }
.strefa-tresc .tab .akcja { text-align: right; white-space: nowrap; }
.strefa-tresc .tab .akcja form { display: inline; margin: 0; }
.strefa-tresc .tab .przyciete { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strefa-tresc .tab img { max-width: 80px; max-height: 80px; object-fit: contain; }

/* znaczniki stanu i materiału */
.strefa-tresc .status {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem;
  font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.strefa-tresc .st-nowe  { background: var(--tlo); color: var(--szary); border-color: var(--linia); }
.strefa-tresc .st-praca { background: var(--akcent-jasny); color: var(--akcent-ciemny); border-color: #f6d3bd; }
.strefa-tresc .st-uwaga { background: #fdf6e7; color: #7a4d06; border-color: #f0dcae; }
.strefa-tresc .st-ok    { background: var(--ok-tlo); color: var(--ok); border-color: #b9e0c9; }
.strefa-tresc .st-plus, .strefa-tresc .st-zapas { background: #eeeaf8; color: #5b45a0; border-color: #d6cdf0; }
.strefa-tresc .st-stop  { background: var(--tlo); color: var(--szary-jasny); border-color: var(--linia); }
.strefa-tresc .chip {
  display: inline-flex; overflow: hidden; border: 1px solid var(--linia); border-left-width: 3px;
  border-radius: 6px; font-size: 0.82rem; line-height: 1.7; white-space: nowrap; background: var(--biel);
}
.strefa-tresc .chip-gat { padding: 0 7px; font-weight: 600; }
.strefa-tresc .chip-gr { padding: 0 7px; background: var(--tlo); color: var(--szary); border-left: 1px solid var(--linia); }
.strefa-tresc .chip-stal { border-left-color: #5a636e; }
.strefa-tresc .chip-aluminium { border-left-color: #7fa3bd; }
.strefa-tresc .chip-nierdzewna { border-left-color: #3f8f86; }
.strefa-tresc .chip-pusty { border-style: dashed; color: var(--szary); padding: 0 7px; }

/* formularze */
.strefa-tresc label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 5px; }
.strefa-tresc input[type=text], .strefa-tresc input[type=email], .strefa-tresc input[type=password],
.strefa-tresc input[type=search], .strefa-tresc input[type=date], .strefa-tresc input[type=number],
.strefa-tresc input[type=file], .strefa-tresc select, .strefa-tresc textarea {
  font: inherit; font-size: 1rem; color: var(--tekst); background: var(--biel);
  border: 1px solid #c6ced7; border-radius: 7px; padding: 9px 12px; width: 100%;
}
.strefa-tresc input[type=file] { padding: 7px; background: var(--tlo); }
.strefa-tresc input:focus, .strefa-tresc select:focus, .strefa-tresc textarea:focus {
  outline: none; border-color: var(--akcent); box-shadow: 0 0 0 3px rgba(224, 89, 26, 0.18);
}
.strefa-tresc .podpowiedz { display: block; font-size: 0.84rem; color: var(--szary); margin-top: 4px; }
.strefa-tresc .form-siatka {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 20px;
  background: var(--biel); border: 1px solid var(--linia); border-radius: var(--promien); padding: 22px;
}
.strefa-tresc .pole { display: block; }
.strefa-tresc .pole-szeroki, .strefa-tresc .pole-szerokie, .strefa-tresc .pole-akcje { grid-column: 1 / -1; }
.strefa-tresc .pole-akcje { display: flex; gap: 10px; flex-wrap: wrap; }
.strefa-tresc .form-waski {
  max-width: 28rem; display: grid; gap: 16px; background: var(--biel);
  border: 1px solid var(--linia); border-radius: var(--promien); padding: 22px;
}
.strefa-tresc .form-linia {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; padding: 14px;
  background: var(--biel); border: 1px dashed #c6ced7; border-radius: var(--promien);
}
.strefa-tresc .form-linia label { margin: 0; }
/* min-width: 0 — pole pliku ma szeroką treść własną (przycisk i nazwa) i bez tego
   na telefonie wystawało poza formularz, dając poziome przewijanie strony. */
.strefa-tresc .form-linia input[type=file] { width: auto; flex: 1 1 14rem; min-width: 0; max-width: 100%; }
.strefa-tresc .w-krotkie { max-width: 8rem; }
.strefa-tresc .pasek-narzedzi {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 0 0 16px;
}
.strefa-tresc .form-szukaj { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.strefa-tresc .form-szukaj input { width: auto; min-width: 14rem; }
.strefa-tresc .pole-check { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.strefa-tresc .form-szukaj .pole-check input { width: auto; min-width: 0; margin: 0; }
.strefa-tresc .form-szukaj .pole-check, .strefa-tresc .filtry-listy .pole-check { font-weight: 400; white-space: nowrap; }
.strefa-tresc .rzad-akcji { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; margin: 16px 0 0; }
.strefa-tresc .rzad-akcji form { margin: 0; }

/* przyciski */
.strefa-tresc .btn {
  display: inline-block; padding: 9px 18px; border-radius: 8px; line-height: 1.4;
  border: 1px solid var(--linia); background: var(--biel); color: var(--tekst);
  font: inherit; font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer;
}
.strefa-tresc .btn:hover { border-color: var(--szary-jasny); color: var(--tekst); }
.strefa-tresc .btn-glowny { background: var(--akcent-przycisk); border-color: var(--akcent-przycisk); color: #fff; }
.strefa-tresc .btn-glowny:hover { background: var(--akcent-ciemny); border-color: var(--akcent-ciemny); color: #fff; }
.strefa-tresc .btn-alarm { color: var(--blad); border-color: #eab3ad; }
.strefa-tresc .btn-alarm:hover { color: var(--blad); border-color: var(--blad); }
.strefa-tresc .btn:disabled { opacity: 0.55; cursor: not-allowed; }
.strefa-tresc .lnk {
  font: inherit; font-size: 0.93rem; background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--akcent-ciemny); text-decoration: underline; text-underline-offset: 0.15em;
}
.strefa-tresc .lnk-alarm { color: var(--blad); }

/* listy danych, puste stany */
.strefa-tresc .dane {
  display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 12px;
  background: var(--biel); border: 1px solid var(--linia); border-radius: var(--promien); padding: 18px 22px;
}
.strefa-tresc .dane dt { color: var(--szary); font-size: 0.9rem; }
.strefa-tresc .dane dd { margin: 0; overflow-wrap: anywhere; }
.strefa-tresc .pusto {
  background: var(--biel); border: 1px dashed #c6ced7; border-radius: var(--promien);
  padding: 32px 24px; text-align: center; color: var(--szary);
}
.strefa-tresc .pusto p { margin: 0 0 12px; }
.strefa-tresc .pusto p:last-child { margin: 0; }

/* karta detalu */
.strefa-tresc .karta-detalu { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.strefa-tresc .karta-detalu-liczby { flex: 1 1 24rem; margin: 0; }
.strefa-tresc .miniatura-duza {
  width: 170px; height: 170px; object-fit: contain; flex: none;
  background: var(--biel); border: 1px solid var(--linia); border-radius: var(--promien);
}
.strefa-tresc .miniatura-brak {
  display: flex; align-items: center; justify-content: center;
  border-style: dashed; color: var(--szary); font-size: 0.85rem;
}
.strefa-tresc .miniatura-lista {
  width: 64px; height: 64px; object-fit: contain; display: block;
  background: var(--tlo); border: 1px solid var(--linia); border-radius: 6px;
}

/* logowanie */
.strefa-logowanie { max-width: 30rem; margin: 8px auto 0; }
.strefa-logowanie .karta-logowania {
  background: var(--biel); border: 1px solid var(--linia); border-radius: var(--promien); padding: 28px;
}
.strefa-logowanie h1 { margin-bottom: 8px; }
.strefa-logowanie .form-log { display: grid; gap: 14px; margin-top: 20px; }
.strefa-logowanie .form-log .btn { justify-self: start; }
.strefa-logowanie .log-nota { color: var(--szary); font-size: 0.93rem; margin: 18px 0 0; }
.strefa-logowanie .form-log .pamietaj { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; cursor: pointer; }
.strefa-logowanie .form-log .pamietaj input { width: auto; margin: 0; }
.strefa-logowanie .form-log .pamietaj-nota { display: block; font-size: 0.85rem; color: var(--szary); margin: 2px 0 0 26px; }
.strefa-logowanie .dol-dokumenty { display: flex; gap: 18px; justify-content: center; font-size: 0.9rem; margin-top: 18px; }

/* dokumenty i pomoc */
.strefa-tresc .dok-zakladki {
  display: flex; gap: 6px 20px; flex-wrap: wrap; margin: 0 0 24px; padding-bottom: 10px;
  border-bottom: 1px solid var(--linia);
}
.strefa-tresc .dok-zakladki a { text-decoration: none; color: var(--szary); }
.strefa-tresc .dok-zakladki a.aktywna { color: var(--akcent-ciemny); font-weight: 650; }
.strefa-tresc .dokument { max-width: 50rem; }
.strefa-tresc .dokument .tab { margin: 12px 0 20px; }
.strefa-tresc .wiedza-spis { display: none; }
.strefa-tresc .wiedza-tresc { max-width: 50rem; }

/* śledzenie zamówienia */
.strefa-tresc .sledzenie-szczyt {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 32px; flex-wrap: wrap;
  padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--linia);
}
.strefa-tresc .sledzenie-szczyt h1 { margin: 0 0 4px; }
.strefa-tresc .sledzenie-firma { text-align: right; font-size: 0.93rem; line-height: 1.5; }
.strefa-tresc .pasek-postepu {
  display: block; width: 100%; height: 10px; background: var(--biel); border: 1px solid var(--linia);
  border-radius: 999px; overflow: hidden; margin: -8px 0 28px;
}
.strefa-tresc .pasek-postepu rect { fill: var(--akcent); }
.strefa-tresc .karta-logowania h1 { font-size: 1.5rem; }

/* filtry i strony list */
.strefa-tresc .form-szukaj select { width: auto; min-width: 10rem; }
.strefa-tresc .filtry-listy { margin: 0 0 16px; }
.strefa-tresc .strony { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.strefa-tresc .strony .nota { margin: 0 8px 0 0; }
.strefa-tresc .strona {
  display: inline-block; min-width: 2.3rem; text-align: center; padding: 6px 10px; border-radius: 7px;
  border: 1px solid var(--linia); background: var(--biel); color: var(--tekst); text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.strefa-tresc .strona:hover { border-color: var(--szary-jasny); }
.strefa-tresc .strona.aktywna { background: var(--akcent-przycisk); border-color: var(--akcent-przycisk); color: #fff; }
.strefa-tresc .btn-maly { padding: 6px 12px; font-size: 0.9rem; }
.strefa-tresc .tab .pliki a { margin-right: 10px; }
.strefa-tresc .tab .pliki a:last-child { margin-right: 0; }

/* statystyki: wykresy SVG (kolory z klas — strefa nie przyjmuje stylów w atrybutach) */
.strefa-tresc .wykres-ramka {
  background: var(--biel); border: 1px solid var(--linia); border-radius: var(--promien); padding: 18px 18px 4px;
}
.strefa-tresc .wykres { display: block; overflow: visible; }
.strefa-tresc .wyk-siatka { stroke: var(--linia); stroke-width: 1; shape-rendering: crispEdges; }
.strefa-tresc .wyk-baza { stroke: #b9c2cc; }
.strefa-tresc .wyk-os {
  fill: var(--szary); font-size: 12px; font-variant-numeric: tabular-nums;
  paint-order: stroke; stroke: var(--biel); stroke-width: 3px; stroke-linejoin: round;
}
.strefa-tresc .wyk-wartosc { fill: var(--tekst); font-size: 12px; font-weight: 650; }
.strefa-tresc .wyk-kolumna { fill: var(--akcent); }
.strefa-tresc .wyk-cel { fill: transparent; }
.strefa-tresc .wyk-slot:hover .wyk-kolumna { fill: var(--akcent-ciemny); }
.strefa-tresc .wyk-pasek { display: block; min-width: 6rem; }
.strefa-tresc .tab-udzial .udzial { width: 38%; }
.strefa-tresc .wykres-tabela { margin-top: 12px; }
.strefa-tresc .wykres-tabela summary { cursor: pointer; color: var(--akcent-ciemny); font-size: 0.93rem; margin-bottom: 10px; }
.strefa-tresc .filtry-listy label { font-weight: 600; }

/* ------------------------------------------------------- mniejsze ekrany */

@media (max-width: 760px) {
  .strefa-tresc { padding-top: 22px; }
  .strefa-tresc .kafle { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .strefa-tresc .kafel { padding: 12px 14px; }
  .strefa-tresc .kafel-l { font-size: 1.3rem; }
  /* Tabela przewija się w swoim obszarze zamiast rozpychać stronę. */
  .strefa-tresc .tab { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .strefa-tresc .tab td, .strefa-tresc .tab th { white-space: nowrap; }
  .strefa-tresc .form-siatka { grid-template-columns: 1fr; padding: 16px; }
  .strefa-tresc .pasek-narzedzi, .strefa-tresc .rzad-akcji, .strefa-tresc .form-szukaj {
    flex-direction: column; align-items: stretch;
  }
  .strefa-tresc .form-szukaj input, .strefa-tresc .form-szukaj select { min-width: 0; width: 100%; }
  .strefa-tresc .rzad-akcji .btn, .strefa-tresc .form-szukaj .btn, .strefa-tresc .pasek-narzedzi .btn {
    width: 100%; text-align: center;
  }
  .strefa-tresc .pasek-narzedzi .rzad-akcji { margin: 0; }
  .strefa-tresc .dane { grid-template-columns: 1fr; gap: 2px; }
  .strefa-tresc .dane dt { margin-top: 8px; }
  .strefa-tresc .karta-detalu { flex-direction: column; }
  .strefa-tresc .sledzenie-firma { text-align: left; }
}
@media (max-width: 340px) {
  .strefa-tresc .kafle { grid-template-columns: 1fr; }
}

/* Odstępy między blokami, które w panelu stoją jeden pod drugim bez sekcji. */
.strefa-tresc .sekcja + .nota, .strefa-tresc .form-siatka + .nota,
.strefa-tresc .tab + .nota, .strefa-tresc .form-linia + .nota,
.strefa-tresc .rzad-akcji + .nota { margin-top: 14px; }
.strefa-tresc .sekcja + .pasek-narzedzi { margin-top: 28px; }
.strefa-tresc .rzad-akcji + .rzad-akcji { margin-top: 10px; }

/* Odpowiedniki stylów wpisanych w HTML w panelu — na końcu, żeby wygrywały
   z regułami komponentów o tej samej szczegółowości. */
.strefa-tresc .kafel-l-maly { font-size: 1.15rem; }
.strefa-tresc .bez-odstepu { margin: 0; }

/* Wycena online — wybór rodzaju blachy zwykłą czcionką */
.strefa-tresc .wo-blacha label { font-weight: 400; }
.strefa-tresc .wo-blacha legend { font-weight: 600; font-size: 0.93rem; }

/* Wycena bez rysunku — etykiety wariantu trójkąta zwykłą czcionką, grupy pól w siatce */
.strefa-tresc .ks-wariant label { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 4px 0; }
.strefa-tresc .ks-grupa legend { font-weight: 600; font-size: 0.93rem; }
.strefa-tresc .ks-uklad { margin-bottom: 16px; }
.strefa-tresc .wo-tryby { margin-bottom: 16px; }

/* Zestaw wycen — etykiety „bez tej blachy” zwykłą czcionką */
.strefa-tresc .wo-bez { display: flex; font-weight: 400; margin: 0; }
.strefa-tresc .wo-tabela-formularz select, .strefa-tresc .wo-tabela-formularz input[type=number] { width: 100%; }

/* Wycena w trzech krokach (od 0.111.0) — wybór dla wszystkich plików i dołączenie plików */
.strefa-tresc .wo-wspolny legend { font-weight: 600; font-size: 0.93rem; }
.strefa-tresc .wo-wspolny-pola label, .strefa-tresc .wo-dolacz > label { font-weight: 600; }
.strefa-tresc .wo-kroki-pasek { margin-bottom: 14px; }
.strefa-tresc .wo-formularz-szkicu { grid-template-columns: 1fr; }
