/* Zbiory, Nawożenie, Magazyn, Finanse, Maszyny i szkolenia. Ten sam system co panel: papier i tusz, wiersze z liniami,
   kolor tylko w danych (uprawy, zysk/strata, N/P/K) i statusach (tokeny panel.css), r=6px. Bez atrybutów style. */

.gs-segment { margin-bottom: 18px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.gs-segment::-webkit-scrollbar { display: none; }
.gs-segment .segment-btn { white-space: nowrap; }
.gs-tresc { min-width: 0; }
.gs-sekcja { margin-top: 32px; }
.gs-sekcja:first-child { margin-top: 0; }
.gs .liczby-sekcja { margin-bottom: 8px; }
.gs .liczba-w { font-size: clamp(1.625rem, 3vw, 2.375rem); overflow-wrap: anywhere; }
.gs .filtry { margin-bottom: 22px; }

/* wiersze list: ok. 40 px na komputerze (jedna linia), opis drobniej pod nazwą */
.gs-lista { min-width: 0; }
.gs-lista > li { display: flex; align-items: center; }
.gs-wiersz {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; width: 100%; min-height: 40px;
  padding: 6px 4px; background: none; border: 0; text-align: left; line-height: 1.3; cursor: pointer; min-width: 0;
  transition: background-color .2s var(--ease);
}
.gs-lista > li > .gs-wiersz { flex: 1; }
.gs-lista > li > .ikona-btn, .gs-lista .gs-wiersz-staly > .ikona-btn { flex: none; margin-left: 4px; width: var(--wys-btn-sm); height: var(--wys-btn-sm); }
.gs-lista .ikona-btn .ph { font-size: 1.125rem; }
li.gs-wiersz { cursor: default; }
li.gs-wiersz-staly { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; }
button.gs-wiersz:hover:not([disabled]) { background: var(--white); }
button.gs-wiersz:hover:not([disabled]) .gs-t b { text-decoration: underline; text-underline-offset: .22em; }
button.gs-wiersz[disabled] { cursor: default; color: inherit; }
.gs-data { font-size: .8125rem; color: var(--mute); font-variant-numeric: tabular-nums; min-width: 76px; }
.gs-ikona { font-size: 1.25rem; display: grid; place-items: center; width: 24px; color: var(--ink-2); }
.gs-t { min-width: 0; display: grid; gap: 0; }
.gs-t b { font-weight: 650; overflow-wrap: anywhere; }
.gs-t small { color: var(--mute); font-size: .8125rem; line-height: 1.35; overflow-wrap: anywhere; }
.gs-partie { font-size: .8125rem !important; }
.gs-p { display: grid; justify-items: end; text-align: right; gap: 0; line-height: 1.3; font-variant-numeric: tabular-nums; }
.gs-p b { font-weight: 700; font-stretch: 108%; white-space: nowrap; }
.gs-p small { color: var(--mute); font-size: .8125rem; }
.gs-p .plak { margin-top: 2px; }
.gs-znak { display: inline-flex; align-items: center; gap: 4px; color: var(--uwaga) !important; font-weight: 620; }
.gs-znak-stop { color: var(--stop) !important; }
.gs-znak-ok { color: var(--ok) !important; }
.gs-ujemny b { color: var(--stop); }
.gs-alarm { box-shadow: inset 3px 0 0 var(--stop-znak); padding-left: 12px !important; }
.gs-alarm-uwaga { box-shadow: inset 3px 0 0 var(--uwaga-znak); }

@media (max-width: 639px) {
  .gs-wiersz, li.gs-wiersz-staly { grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; min-height: 48px; padding: 8px 2px; }
  .gs-data { grid-column: 1 / -1; min-width: 0; font-size: .8125rem; line-height: 1.25; }
  .gs-ikona { display: none; }
  li.gs-wiersz-staly > .ikona-btn { grid-column: 2; grid-row: 3; justify-self: end; }
  /* wiersz z przyciskiem usuwania: przycisk w tej samej linii co kwota, bez osobnego rzędu */
  li.gs-wiersz-staly:has(> .ikona-btn) { grid-template-columns: minmax(0, 1fr) auto auto; }
  li.gs-wiersz-staly:has(> .ikona-btn) > .gs-data { grid-column: 1 / 3; }
  li.gs-wiersz-staly:has(> .ikona-btn) > .ikona-btn { grid-column: 3; grid-row: 1 / span 2; align-self: center; margin-left: 0; }
  .gs-p b { white-space: normal; }
  .widok-akcje { width: 100%; }
}

/* wykresy */
.wyk { margin: 6px 0 0; min-width: 0; }
.wyk-plotno { width: 100%; min-width: 0; }
.wyk-svg { display: block; overflow: visible; }
.wyk-etyk { font: 600 13px var(--font); fill: var(--ink); }
.wyk-wart { font: 500 12px var(--font); fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.wyk-slupek.wyk-s0 { fill: var(--ink); }
.wyk-slupek.wyk-s1 { fill: #8a8a84; }
.wyk-slupek.wyk-s2 { fill: var(--rule-strong); }
.wyk-slupek.wyk-s3 { fill: var(--rule); }
.wyk-slupek.wyk-ujemny { fill: var(--white); stroke: var(--ink); stroke-width: 1.5; }
.wyk-os { stroke: var(--ink); stroke-width: 1; }
.wyk-limit { stroke: var(--stop-znak); stroke-width: 1.5; stroke-dasharray: 4 3; }
.wyk-limit-t { font: 650 12px var(--font); fill: var(--stop); }
.wyk-legenda { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: .8125rem; color: var(--mute); }
.wyk-legenda li { display: inline-flex; align-items: center; gap: 7px; }
.wyk-probka { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.wyk-probka.wyk-s0 { background: var(--ink); }
.wyk-probka.wyk-s1 { background: #8a8a84; }
.wyk-probka.wyk-s2 { background: var(--rule-strong); }
.wyk-probka.wyk-s3 { background: var(--rule); }

.gs-zrodlo { display: flex; gap: 8px; align-items: flex-start; margin-top: 18px; font-size: .8125rem; color: var(--mute); line-height: 1.45; }
.gs-zrodlo .ph { font-size: 1rem; margin-top: 1px; }
.gs-wstecz { margin-bottom: 6px; }
.gs-ilosc { gap: 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 120px) !important; }

/* pasek budżetu */
.gs-pasek { width: 100%; }
.gs-pasek-svg { display: block; width: 100%; height: 8px; }
.gs-pasek-tlo { fill: var(--paper-2); }

/* finanse */
.fin-bloki { display: grid; gap: 14px; }
@media (min-width: 900px) { .fin-bloki { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fin-blok { background: var(--white); border: 1px solid var(--rule-strong); border-radius: var(--r); overflow: hidden; min-width: 0; }
.fin-blok-glowa { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.fin-blok-glowa h3 { font-size: 1.0625rem; font-weight: 700; font-stretch: 110%; letter-spacing: -.01em; }
.fin-blok-glowa p { color: var(--mute); font-size: .875rem; }
.fin-wynik { display: grid; justify-items: end; text-align: right; }
.fin-wynik b { font-size: 1.25rem; font-weight: 760; font-stretch: 118%; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.fin-wynik small { color: var(--mute); font-size: .8125rem; white-space: nowrap; }
.fin-minus b { color: var(--stop) !important; }
.fin-plus b { color: var(--ok) !important; }
.fin-blok .komorki .kom:nth-last-child(-n+2) { border-bottom: 0; }
@media (min-width: 640px) { .fin-blok .komorki .kom:nth-last-child(-n+4) { border-bottom: 0; } }
.fin-budzet { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 14px 4px; }
.fin-budzet-t { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; min-width: 0; }
.fin-budzet-t b { font-weight: 650; }
.fin-budzet-t span { font-variant-numeric: tabular-nums; }
.fin-budzet-t small { color: var(--mute); }
.fin-budzet .gs-pasek { grid-column: 1; }
.fin-budzet .ikona-btn { grid-column: 2; grid-row: 1 / span 2; }

/* zachęta do planu Plus */
.gs-zacheta { max-width: 620px; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--ink); border-radius: var(--r); background: var(--white); display: grid; gap: 12px; }
.gs-zacheta-ikona { font-size: 2.25rem; }
.gs-zacheta h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 760; font-stretch: 120%; letter-spacing: -.03em; line-height: 1.1; }
.gs-zacheta p { color: var(--ink-2); }
.gs-zacheta-lista { display: grid; gap: 8px; margin-top: 6px; }
.gs-zacheta-lista li { display: flex; gap: 10px; align-items: flex-start; }
.gs-zacheta-lista .ph { margin-top: 3px; }
.gs-zacheta-akcje { margin-top: 22px; }

/* karta wyniku agenta */
.karta-wynik .karta-tytul h3 { display: flex; align-items: center; gap: 8px; }
.karta-wynik-ikona { font-size: 1.25rem; }
@media (max-width: 639px) {
  .karta-wynik .karta-glowa { flex-wrap: wrap; }
  .karta-wynik .karta-tytul { flex: 1 1 100%; }
}
.fin-plak { margin-left: 8px; }
/* N, P, K stałymi kolorami (tokeny --n-*) */
.skl { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.skl + .skl { margin-left: 10px; }
.skl-k { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
