@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url(fonts/Montserrat-Regular.ttf) format('truetype'); }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url(fonts/Montserrat-Medium.ttf) format('truetype'); }
@font-face { font-family: 'Montserrat'; font-weight: 600 700; font-display: swap; src: url(fonts/Montserrat-SemiBold.ttf) format('truetype'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url(fonts/SpaceGrotesk-Bold.ttf) format('truetype'); }

:root {
  --granat: #0B1533; --tekst2: #5B6478; --tekst3: #9AA1B1; --pole: #F3F4F8; --pole2: #E9ECF2; --akcent: #495EFF; --akcent-ciemny: #3443D9;
  --akcentT: #EEF0FF; --linia: #E4E7EE; --pierscien: #C6D1DC; --czerwony: #D93A44; --czerwonyT: #FDECEE; --ostrz: #B5650B; --ostrzT: #FFF3E3;
  --tlo: #FFFFFF; --tlo2: #F8F9FB; --krzywa: cubic-bezier(.25, 0, 0, 1); --r: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 Montserrat, system-ui, sans-serif; color: var(--granat); background: var(--tlo); -webkit-tap-highlight-color: transparent; }
h1, h2, h3, .logo, .logo-duze { font-family: 'Space Grotesk', Montserrat, sans-serif; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 30px; line-height: 1.15; margin: 4px 0 8px; }
h2 { font-size: 21px; margin: 32px 0 12px; }
h3 { font-size: 17px; margin: 24px 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
a { color: var(--akcent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--akcentT); outline-offset: 2px; }

/* ---------- przyciski ---------- */
.przycisk { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border: 0; border-radius: var(--r);
  background: var(--akcent); color: #fff; font-weight: 600; text-decoration: none; transition: background .2s var(--krzywa), transform .2s var(--krzywa); }
.przycisk:hover { background: var(--akcent-ciemny); }
.przycisk:active { transform: scale(.98); }
.przycisk.drugi { background: var(--pole); color: var(--granat); }
.przycisk.drugi:hover { background: var(--pole2); }
.przycisk.niebezpieczny { color: var(--czerwony); }
.przycisk.niebezpieczny:not(.drugi) { background: var(--czerwony); color: #fff; }
.przycisk.duzy { width: 100%; min-height: 54px; font-size: 17px; }
.przycisk:disabled { opacity: .55; cursor: default; }
.przycisk.trwa { position: relative; color: transparent; }
.przycisk.trwa::after { content: ''; position: absolute; width: 20px; height: 20px; border: 2.5px solid #fff; border-right-color: transparent; border-radius: 50%; animation: obrot .7s linear infinite; }
.przycisk.drugi.trwa::after { border-color: var(--akcent); border-right-color: transparent; }
@keyframes obrot { to { transform: rotate(360deg); } }
.link { background: none; border: 0; color: var(--akcent); font-weight: 600; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.mini { border: 0; background: var(--akcentT); color: var(--akcent); font-size: 12px; font-weight: 600; border-radius: 8px; padding: 3px 8px; }

/* ---------- pola ---------- */
.wejscie, .pole input, .pole textarea, .wybor, .szukaj, .sortuj {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 2px solid transparent; border-radius: var(--r); background: var(--pole); outline: none;
  transition: border-color .2s var(--krzywa), background .2s var(--krzywa); }
.pole textarea { resize: none; overflow: hidden; line-height: 1.5; }
.wejscie:focus, .pole input:focus, .pole textarea:focus, .wybor:focus, .szukaj:focus { border-color: var(--akcent); background: #fff; }
.pole input.srodek { text-align: center; }
.pole input.liczone { background: var(--akcentT); }
.pole input::placeholder, .pole textarea::placeholder { color: var(--tekst3); font-size: 14px; }
.pole { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pole-wejscie { position: relative; display: flex; align-items: center; }
.pole-wejscie .jedn { position: absolute; right: 12px; font-size: 13px; color: var(--tekst3); pointer-events: none; }
.etk { font-size: 13px; font-weight: 500; color: var(--tekst2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pod-polem { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 0; }
.pod-polem:empty { display: none; }
.poprzednio { font-size: 12px; color: var(--tekst3); }
.ocena { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 8px; }
.trojka .ocena, .pole.maly .ocena { padding: 1px 5px; font-size: 11px; white-space: nowrap; }
.ocena-ponizej, .ocena-powyzej { background: var(--ostrzT); color: var(--ostrz); }
.ocena-flaga { background: var(--czerwonyT); color: var(--czerwony); }
.ocena-norma { background: var(--akcentT); color: var(--akcent); }
.rzad { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.rzad > .pole { flex: 1; }
.pole.maly { flex: 0 0 76px !important; }
.pole.maly input { padding: 10px 6px; text-align: center; }
.pole.sredni { max-width: 180px; }
.akapit { font-size: 14px; color: var(--tekst2); margin: 4px 0 14px; }
.info { background: var(--tlo2); border-radius: 16px; padding: 16px 18px; color: var(--tekst2); font-size: 15px; margin: 12px 0; }
.info p { margin: 6px 0; }

/* ---------- normy ---------- */
.pig { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; line-height: 1; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.pig-z { background: var(--akcentT); color: var(--akcent); }
.pig-l { box-shadow: inset 0 0 0 1px var(--pierscien); color: var(--tekst2); }
.pig-flaga { background: var(--czerwonyT); color: var(--czerwony); margin-left: 6px; }
.pigulki { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 16px; }
.legenda { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--tlo2); border-radius: 16px; padding: 14px 16px; margin: 16px 0; }
.norma-slowo { color: var(--akcent); font-size: 12px; }

/* ---------- kratki ---------- */
.blok { margin-bottom: 18px; }
.kratki { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-top: 6px; }
.kratki-lista { grid-template-columns: 1fr; }
.kratka { display: flex; align-items: flex-start; gap: 10px; min-height: 46px; padding: 11px 12px; border: 0; border-radius: var(--r); background: var(--pole); text-align: left; font-size: 15px;
  transition: background .2s var(--krzywa); }
.kratka .znak { flex: 0 0 22px; height: 22px; border-radius: 7px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--pierscien); position: relative; transition: background .2s var(--krzywa); }
.kratka[aria-pressed="true"] { background: var(--akcentT); font-weight: 600; }
.kratka[aria-pressed="true"] .znak { background: var(--akcent); box-shadow: none; }
.kratka[aria-pressed="true"] .znak::after { content: ''; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.flagi .kratka[aria-pressed="true"] { background: var(--czerwonyT); }
.flagi .kratka[aria-pressed="true"] .znak { background: var(--czerwony); }
.kratka-mala { min-height: 38px; padding: 7px 10px; font-size: 14px; }
.segment { display: flex; flex-wrap: wrap; gap: 4px; background: var(--pole); border-radius: var(--r); padding: 4px; }
.segment button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 9px 8px; font-size: 14px; color: var(--tekst2); min-height: 40px; transition: background .2s var(--krzywa); }
.segment button[aria-pressed="true"] { background: #fff; color: var(--akcent); font-weight: 600; box-shadow: 0 0 0 1px var(--linia); }
.wiersz-wyboru { display: grid; grid-template-columns: 200px 1fr; gap: 12px; align-items: center; margin-bottom: 8px; }

/* ---------- zakresy ruchu i pomiary ---------- */
.staw { margin-top: 30px; padding-top: 6px; }
.ruch { border-bottom: 1px solid var(--linia); padding: 14px 0; }
.ruch-nazwa { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.plaszczyzna { display: inline-grid; place-items: center; width: 26px; height: 22px; border-radius: 11px; background: var(--akcentT); color: var(--akcent); font: 700 12px 'Space Grotesk', sans-serif; }
.ruch-tab { display: grid; grid-template-columns: 170px 1fr 1fr; gap: 10px 18px; align-items: start; }
.ruch-tab .kol { font-size: 12.5px; font-weight: 600; color: var(--tekst2); text-align: center; }
.ruch-norma { font-weight: 600; font-size: 14px; padding-top: 12px; }
.ruch-norma small { display: block; font-size: 11.5px; font-weight: 500; color: var(--tekst3); }
.trojka { display: flex; gap: 4px; justify-content: center; align-items: flex-start; }
.trojka .pole.maly { flex: 0 0 64px !important; }
.trojka .pole:not(:last-child)::after { content: none; }
.palce .kol { align-self: center; flex: 0 0 60px; font-size: 13px; font-weight: 600; color: var(--tekst2); }
.pomiar { display: flex; gap: 16px; align-items: flex-start; border-bottom: 1px solid var(--linia); padding: 12px 0; }
.pomiar-opis { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pomiar-opis small { color: var(--tekst2); font-size: 13px; }
.pomiar-pola { display: flex; gap: 8px; }
.sila { display: grid; grid-template-columns: 1fr; }
.sila-wiersz { display: grid; grid-template-columns: 1fr 76px 76px; gap: 10px; align-items: end; padding: 4px 0; }
.sila-wiersz .pole .etk { justify-content: center; }
.parametr { display: grid; grid-template-columns: 190px 160px 1fr; gap: 14px; align-items: center; padding: 6px 0; }
.param-nazwa { font-weight: 600; font-size: 15px; }
.lista-nag, .lista-wiersz { display: flex; gap: 10px; }
.lista-nag { font-size: 12.5px; font-weight: 600; color: var(--tekst2); margin-bottom: 6px; }
.lista-wiersz { margin-bottom: 10px; }
.pytanie { margin-bottom: 22px; }
.pyt-tresc { font-weight: 600; margin-bottom: 4px; }
.pyt-tresc .nr { color: var(--akcent); font-family: 'Space Grotesk', sans-serif; }
.region { border-bottom: 1px solid var(--linia); padding-bottom: 12px; margin-bottom: 12px; }
.region-gora { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cel { margin-bottom: 14px; }
.vas { margin-bottom: 22px; }
.vas-rzad { display: flex; gap: 18px; align-items: center; }
.vas-skala { flex: 1; }
.vas-suwak { width: 100%; height: 44px; accent-color: var(--czerwony); }
.vas-suwak.pusty { opacity: .45; }
.vas-opis { display: flex; justify-content: space-between; font-size: 12px; color: var(--tekst2); }
.mapa { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; background: var(--tlo2); border-radius: 18px; padding: 14px; }
.mapa figure { margin: 0; text-align: center; }
.mapa figcaption { font-weight: 600; font-size: 14px; }
.sylwetka { width: 190px; height: auto; cursor: crosshair; touch-action: manipulation; }
.porownanie { margin: 8px 0 14px; }
.por-wiersz { display: grid; grid-template-columns: 1fr auto 100px; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--linia); font-size: 14px; }
.kier { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 8px; }
.kier-poprawa { background: var(--akcentT); color: var(--akcent); }
.kier-pogorszenie { background: var(--ostrzT); color: var(--ostrz); }
.kier-bez-zmian { color: var(--tekst2); }

/* ---------- wejscie ---------- */
.wejscie-tlo { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(180deg, var(--tlo2), #fff); }
.karta-wejscia { width: 100%; max-width: 440px; background: #fff; border-radius: 24px; padding: 28px 24px; box-shadow: 0 0 0 1px var(--linia); display: flex; flex-direction: column; gap: 14px; }
.karta-wejscia h2 { margin: 0; }
.logo-duze { display: flex; align-items: center; gap: 12px; font-size: 26px; }
.logo-ikona { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; background: url(ikony/ikona.svg) center / cover; }
.zakladki { display: flex; gap: 4px; background: var(--pole); border-radius: var(--r); padding: 4px; overflow-x: auto; }
.zakladki > * { flex: 1; border: 0; background: none; border-radius: 9px; padding: 9px 10px; font-size: 14px; font-weight: 500; color: var(--tekst2); text-align: center; text-decoration: none; white-space: nowrap; }
.zakladki > [aria-pressed="true"] { background: #fff; color: var(--akcent); font-weight: 600; box-shadow: 0 0 0 1px var(--linia); }
.serwer summary { color: var(--tekst2); font-size: 14px; cursor: pointer; }
.kod-odzyskiwania { font: 700 20px/1.6 'Space Grotesk', monospace; letter-spacing: .04em; background: var(--akcentT); color: var(--granat); border-radius: 16px; padding: 16px; text-align: center; word-break: break-word; user-select: all; }
.zgoda { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.zgoda input { width: 22px; height: 22px; accent-color: var(--akcent); }
.wejscie.pin { font-size: 24px; letter-spacing: .4em; text-align: center; }

/* ---------- powloka ---------- */
.pasek { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 18px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linia); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--granat); font-size: 19px; }
.logo .logo-ikona { width: 30px; height: 30px; border-radius: 8px; }
.pasek nav { margin-left: auto; display: flex; gap: 4px; }
.link-pasek { border: 0; background: none; padding: 10px 12px; border-radius: 10px; color: var(--tekst2); font-weight: 500; text-decoration: none; font-size: 15px; }
.link-pasek:hover { background: var(--pole); }
.sync { border: 0; background: var(--pole); border-radius: 999px; padding: 6px 12px 6px 26px; font-size: 12.5px; color: var(--tekst2); position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.sync::before { content: ''; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--tekst3); }
.sync-ok::before { background: #2BAA6B; }
.sync-trwa::before { background: var(--akcent); animation: puls 1s ease-in-out infinite alternate; }
.sync-blad::before, .sync-zaloguj::before { background: var(--czerwony); }
.sync-zaloguj { color: var(--czerwony); }
@keyframes puls { to { opacity: .3; } }
.uklad { display: grid; grid-template-columns: 330px 1fr; min-height: calc(100vh - 60px); }
#boczny { border-right: 1px solid var(--linia); background: var(--tlo2); height: calc(100vh - 60px); position: sticky; top: 60px; display: flex; flex-direction: column; }
.boczny-gora { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.boczny-akcje { display: flex; gap: 8px; }
.boczny-akcje .przycisk { flex: 1; }
.sortuj { width: auto; min-height: 46px; padding: 8px 10px; background: #fff; }
.szukaj { background: #fff; }
.lista-pacjentow { overflow-y: auto; padding: 0 8px 20px; }
.pacjent-wiersz { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; color: var(--granat); text-decoration: none; transition: background .2s var(--krzywa); }
.pacjent-wiersz:hover { background: var(--pole2); }
.pacjent-wiersz.aktywny { background: #fff; box-shadow: 0 0 0 1px var(--linia); }
.inicjaly { flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--akcentT); color: var(--akcent); font: 700 14px 'Space Grotesk', sans-serif; }
.pacjent-opis { display: flex; flex-direction: column; min-width: 0; }
.pacjent-opis b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pacjent-opis small { color: var(--tekst2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pusto { color: var(--tekst3); text-align: center; padding: 24px 12px; }
#tresc { min-width: 0; outline: none; }
.widok { max-width: 1020px; padding: 24px 28px 80px; animation: wejscie .32s var(--krzywa); }
@keyframes wejscie { from { opacity: 0; transform: translateY(8px); } }
.naglowek { margin-bottom: 8px; }
.naglowek-rzad { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.wstecz { color: var(--tekst2); text-decoration: none; font-size: 14px; font-weight: 500; }
.akcje { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.akcje-dol { display: flex; justify-content: space-between; gap: 10px; margin-top: 36px; flex-wrap: wrap; }
.kafle { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.kafel { display: flex; flex-direction: column; gap: 4px; text-align: left; border: 0; border-radius: 18px; background: var(--pole); padding: 18px; color: var(--granat); text-decoration: none; min-height: 96px; transition: background .2s var(--krzywa); }
.kafel:hover { background: var(--pole2); }
.kafel small { color: var(--tekst2); font-size: 13px; }
.karty { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 10px 0; }
.karta-badania { display: flex; flex-direction: column; gap: 4px; text-align: left; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--linia); padding: 14px 16px; color: var(--granat); text-decoration: none; transition: box-shadow .2s var(--krzywa); }
.karta-badania:hover { box-shadow: 0 0 0 2px var(--akcent); }
.karta-badania small { color: var(--tekst2); font-size: 13px; }
.rodzaj { align-self: flex-start; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 8px; background: var(--akcentT); color: var(--akcent); }
.rodzaj-koncowe { background: var(--granat); color: #fff; }
.rodzaj-kontrolne { background: var(--pole2); color: var(--granat); }
.terapia-karta { background: var(--tlo2); border-radius: 20px; padding: 18px 20px; margin: 16px 0; }
.terapia-gora { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.terapia-gora a { color: var(--granat); text-decoration: none; }
.terapia-gora h2 { margin: 0; }
.status { white-space: nowrap; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 8px; background: var(--akcentT); color: var(--akcent); }
.status-zakonczona { background: var(--pole2); color: var(--tekst2); }
.wizyty { display: flex; flex-direction: column; gap: 6px; }
.wizyta-wiersz { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--pole); color: var(--granat); text-decoration: none; font-size: 15px; }
.vas-mini { color: var(--tekst2); font-size: 13px; white-space: nowrap; }
.postepy { background: var(--tlo2); border-radius: 20px; padding: 18px; }
.wykres { width: 100%; height: auto; margin: 8px 0 12px; }
.wykres .siatka { stroke: var(--linia); }
.wykres .os { fill: var(--tekst3); font-size: 11px; }
.wykres .linia { fill: none; stroke: var(--akcent); stroke-width: 2.5; stroke-linejoin: round; }
.wykres .pkt-b { fill: var(--akcent); stroke: #fff; stroke-width: 2; }
.wykres .pkt-w { fill: #fff; stroke: var(--akcent); stroke-width: 2; }
.podsumowanie { font-weight: 600; }
.przewijane { overflow-x: auto; }
.tabela-postepow { border-collapse: collapse; width: 100%; font-size: 14px; background: #fff; border-radius: 14px; overflow: hidden; }
.tabela-postepow th, .tabela-postepow td { padding: 8px 10px; border-bottom: 1px solid var(--linia); text-align: left; white-space: nowrap; }
.tabela-postepow td:first-child { white-space: normal; min-width: 260px; }
.tabela-postepow th { font-size: 12.5px; color: var(--tekst2); font-weight: 600; }
.zmiana { font-weight: 600; }
.wiersz-ust { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linia); }
.dziennik { font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.dziennik small { color: var(--tekst3); }
.stopka { margin-top: 40px; }
.opcje { display: flex; flex-direction: column; gap: 12px; }
.opcje label { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.opcje input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--akcent); margin-top: 2px; }
.siatka-zdjec { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.siatka-zdjec figure { margin: 0; background: var(--tlo2); border-radius: 16px; overflow: hidden; }
.siatka-zdjec img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.siatka-zdjec figcaption { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.maly-tekst { min-height: 40px; font-size: 14px; padding: 8px 10px; }

/* ---------- edytor badania ---------- */
.widok-badania { max-width: 1240px; }
.badanie-uklad { display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start; }
.sekcje-nav { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 96px); overflow-y: auto; padding-right: 4px; }
.sekcje-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; color: var(--tekst2); text-decoration: none; font-size: 14px; font-weight: 500; }
.sekcje-nav a::before { content: ''; flex: 0 0 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--pierscien); }
.sekcje-nav a.wypelniona::before { background: var(--akcent); box-shadow: none; }
.sekcje-nav a[aria-current="page"] { background: var(--akcentT); color: var(--akcent); font-weight: 600; }
.badanie-tresc { min-width: 0; }
.nad { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--akcent); }
.opis { color: var(--tekst2); max-width: 760px; }
.data-badania { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--tekst2); }
.data-badania .wejscie { width: auto; min-height: 44px; padding: 8px 10px; }
.wybor { width: auto; min-height: 44px; padding: 8px 12px; }

/* ---------- toasty i okna ---------- */
#toasty { position: fixed; left: 0; right: 0; bottom: 20px; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: var(--granat); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 15px; max-width: 560px; opacity: 0; transform: translateY(16px);
  transition: opacity .3s var(--krzywa), transform .3s var(--krzywa); }
.toast.widoczny { opacity: 1; transform: none; }
.toast.blad { background: var(--czerwony); }
.okno-tlo { position: fixed; inset: 0; z-index: 90; background: rgba(11, 21, 51, .38); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .25s var(--krzywa); }
.okno-tlo.widoczne { opacity: 1; }
.okno { width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 22px; padding: 24px; transform: translateY(12px); transition: transform .25s var(--krzywa); }
.okno-tlo.widoczne .okno { transform: none; }
.okno h2 { margin: 0 0 12px; }
.okno-przyciski { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.okno .pole { margin-bottom: 12px; }

/* ---------- mniejsze ekrany ---------- */
@media (max-width: 1100px) {
  .badanie-uklad { grid-template-columns: 1fr; gap: 12px; }
  .sekcje-nav { position: sticky; top: 60px; z-index: 10; flex-direction: row; overflow-x: auto; max-height: none; background: rgba(255, 255, 255, .96); padding: 8px 0; margin: 0 -4px; }
  .sekcje-nav a { white-space: nowrap; }
}
@media (max-width: 900px) {
  .uklad { grid-template-columns: 1fr; }
  #boczny { position: static; height: auto; border-right: 0; background: #fff; }
  body.tryb-aplikacja:not(.widok-lista) #boczny { display: none; }
  body.tryb-aplikacja.widok-lista #tresc { display: none; }
  .widok { padding: 18px 16px 80px; }
  .ruch-tab { grid-template-columns: 1fr 1fr; }
  .ruch-tab > span:first-child { display: none; }
  .ruch-norma { grid-column: 1 / -1; padding-top: 4px; }
  .parametr { grid-template-columns: 1fr 140px; }
  .parametr > span:last-child { grid-column: 1 / -1; }
  .wiersz-wyboru { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 620px) {
  h1 { font-size: 25px; }
  .rzad { flex-direction: column; gap: 12px; }
  .rzad > .pole { width: 100%; }
  .rzad.palce { flex-direction: row; flex-wrap: wrap; }
  .pomiar { flex-direction: column; }
  .trojka .pole.maly { flex-basis: 54px !important; }
  .pasek { gap: 8px; padding: 0 12px; }
  .logo span:last-child { display: none; }
  .lista-nag { display: none; }
  .lista-wiersz { flex-wrap: wrap; }
  .lista-wiersz > .pole { flex: 1 1 100% !important; }
  .wizyta-wiersz { grid-template-columns: 1fr; gap: 2px; }
  .por-wiersz { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
