/* Tokeny: PLAN.md, 8.2. Jedna kolumna do 480 px, cele dotyku >= 44 px. */
:root {
  --tlo: #111418;
  --karta: #181D24;
  --obramowanie: #262C35;
  --tekst: #F1F3F5;
  --tekst-pomocniczy: #AEB7C2;
  --akcent: #2F6FD6;
  --akcent-jasny: #7FB4FF;
  --plus: #5FD3A0;
  --minus: #FFB38A;
  --ikona-tlo: #222933;
  --aktywny-tlo: #2A3340;
  --promien: 14px;
  --nav-wysokosc: 68px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; background: var(--tlo); color: var(--tekst);
  font: 15px/1.4 Inter, system-ui, sans-serif;
}
a { color: var(--tekst-pomocniczy); text-decoration: none; }
a:hover { color: #fff; }
h1 { font-size: 17px; font-weight: 600; margin: 0; }
h2 { font-size: 14px; font-weight: 600; color: var(--tekst-pomocniczy); margin: 24px 0 10px; }
.m { color: var(--tekst-pomocniczy); font-size: 12px; }
.plus { color: var(--plus); }
.minus { color: var(--minus); }
.ik { flex: none; stroke: currentColor; fill: none; }

.ekran { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
.tresc { padding: 20px 18px calc(var(--nav-wysokosc) + 28px); display: flex; flex-direction: column; gap: 16px; }

.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: var(--nav-wysokosc);
  display: flex; justify-content: space-around; align-items: center;
  background: var(--karta); border-top: 1px solid var(--obramowanie);
}
.nav a, .nav .nieaktywny {
  min-width: 56px; min-height: 44px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; font-size: 12px; color: var(--tekst-pomocniczy);
}
.nav a.aktywny { color: var(--akcent-jasny); font-weight: 600; }
.nav .nieaktywny { opacity: .45; }
.nav a.dodaj {
  background: var(--akcent); color: #fff; border-radius: var(--promien); font-size: 14px;
  font-weight: 600; padding: 0 14px; flex-direction: row; gap: 6px;
}

.wyloguj { align-self: flex-end; margin: -8px 0 -8px; }
.link { background: none; border: 0; padding: 0 4px; min-height: 44px; display: inline-flex; align-items: center;
  gap: 4px; font: inherit; font-size: 13px; color: var(--tekst-pomocniczy); cursor: pointer; }
.link:hover { color: #fff; }
.pasek { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.majatek { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.duza { font-size: 32px; font-weight: 700; margin-top: 4px; }
.ostrzezenie { color: var(--minus); font-size: 12px; margin-top: 4px; }
.blad { color: var(--minus); background: var(--karta); border: 1px solid var(--minus);
  border-radius: 12px; padding: 10px 14px; margin: 0; }
.puste { text-align: center; padding: 24px 0; }
.przypis { margin: -8px 0 0; }

.etykieta { display: flex; justify-content: space-between; color: var(--tekst-pomocniczy);
  font-size: 12px; margin-bottom: 6px; }
.karta { background: var(--karta); border: 1px solid var(--obramowanie); border-radius: var(--promien); }
.karta.tekst { padding: 14px; }
.karta.tekst p { margin: 0; }
.wiersz { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 56px; padding: 10px 14px; border-top: 1px solid var(--obramowanie); color: var(--tekst); }
.wiersz:first-child { border-top: 0; }
a.wiersz:hover { background: #1d232b; border-radius: inherit; }
.wiersz .opis { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wiersz .prawa { text-align: right; white-space: nowrap; }
.ic { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--ikona-tlo);
  color: #C9D3DE; display: flex; align-items: center; justify-content: center; }
details.grupa summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }

.miesiac { display: flex; justify-content: space-between; align-items: center; }
.miesiac .tytul { font-size: 17px; font-weight: 600; }
.ikonowy { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--karta); border: 1px solid var(--obramowanie); border-radius: 12px;
  color: var(--tekst); cursor: pointer; padding: 0; }
.miesiac .ikonowy { background: none; border: 0; }
.podsumowanie { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.podsumowanie .karta { padding: 10px 12px; }
.podsumowanie .karta div:last-child { font-weight: 600; margin-top: 2px; font-size: 14px; }
.filtry { display: flex; gap: 8px; }
.filtry select { flex: 1; min-width: 0; }

.formularz { display: flex; flex-direction: column; gap: 16px; }
.f { display: flex; flex-direction: column; gap: 6px; }
input, select { height: 48px; width: 100%; padding: 0 14px; background: var(--karta);
  border: 1px solid var(--obramowanie); border-radius: 12px; color: var(--tekst); font: inherit; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--akcent-jasny); outline-offset: 2px; }
input[type=checkbox] { width: 20px; height: 20px; flex: none; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.f.kwota { align-items: center; }
.f.kwota input { height: 72px; text-align: center; font-size: 34px; font-weight: 700; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--karta); border: 1px solid var(--obramowanie);
  border-radius: var(--promien); }
.seg a { flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 13px; }
.seg a.aktywny { background: var(--aktywny-tlo); color: var(--tekst); font-weight: 600; }

button { font: inherit; }
.przycisk { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: var(--akcent); border: 0; border-radius: var(--promien); color: #fff;
  font-weight: 600; cursor: pointer; }
.przycisk.wtorny, .wtorny { background: var(--karta); border: 1px solid var(--obramowanie); color: var(--tekst); }
.przycisk.niebezpieczny { background: none; border: 1px solid var(--minus); color: var(--minus); margin-top: 8px; }
button.wtorny { min-height: 44px; padding: 0 14px; border-radius: 12px; cursor: pointer; }

.wiersz.kat { gap: 8px; }
.wiersz.kat.archiwalna input { opacity: .55; }
form.inline { display: flex; gap: 8px; margin: 0; }
form.inline:first-child { flex: 1; min-width: 0; }
form.inline input { height: 44px; }
