/* 05.10.2026 (Dawid 06:17 „napraw”, po audycie Akademii)
   2. Telefon: okno dokumentu (audyt / analiza / notatka) — tekst miał ok. 30 px wysokości, stopka z podpisem wychodziła w bok.
   3. Telefon / wąski ekran: okno Finału „Dokumenty do weryfikacji” — druga wąska kolumna z pionowym tekstem przycisków.
   4. Finał: w oświadczeniu dwa akapity nachodziły na siebie. */

/* ——— 2. Okno dokumentu na telefonie ——— */
@media (max-width:760px){
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .doc-modal{display:flex!important;flex-direction:column!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .doc-studio{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important}
 /* spis dokumentu (na komputerze lewa kolumna) — na telefonie zabierał pół ekranu */
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .doc-index{display:none!important}
 /* baner „Dokument wymaga weryfikacji” — zwarty, jedna linijka tytułu + krótki opis */
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .client-verification-banner{padding:6px 10px!important;margin:0 0 6px!important;font-size:var(--fs-sm,12.5px)!important;line-height:1.35!important;max-height:76px;overflow:hidden}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .doc-work{flex:1 1 auto!important;min-height:0!important;display:flex!important;flex-direction:column!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .doc-paper-wrap{flex:1 1 auto!important;min-height:220px!important}
 /* stopka: zawijanie zamiast wychodzenia poza ekran */
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .modal-foot{flex-wrap:wrap!important;justify-content:stretch!important;gap:8px!important;padding:6px 10px!important;flex:none!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .modal-foot>*{max-width:100%!important;min-width:0!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .modal-foot>.btn{flex:1 1 auto}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .modal-foot>.hu-podpis{flex:1 1 100%!important;width:100%!important;box-sizing:border-box;padding:8px 10px!important;margin:0!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .hu-podpis .sig-stmt{padding:0!important;margin:0 0 6px!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .hu-podpis .sig-role{font-size:var(--fs-xs,11.5px)!important;margin:0 0 2px!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .hu-podpis .sig-txt{font-size:var(--fs-sm,12.5px)!important;line-height:1.35!important;margin:0 0 4px!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .hu-podpis .sig-who{flex-wrap:wrap!important;font-size:var(--fs-sm,12.5px)!important;gap:4px 8px!important;padding:4px 0!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .hu-podpis *{max-width:100%;white-space:normal!important;overflow-wrap:anywhere}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .hu-podpis .sig-act{padding-top:6px!important;margin:0!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #docOverlay .hu-podpis .hu-podpisz{min-height:44px!important;padding:6px 10px!important}
}

/* ——— 3. Okno Finału na wąskim ekranie: jedna kolumna ——— */
@media (max-width:1000px){
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>*{grid-column:1/-1!important}
}
@media (max-width:700px){
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;padding:10px!important;border-radius:0!important;margin:0!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-lista{flex-direction:row!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;max-height:none!important;padding:0 0 6px!important;gap:6px!important;border-right:0!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-lista>.fin-l-h{flex:0 0 86px!important;font-size:var(--fs-xs,11.5px);line-height:1.3;align-self:center}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-lista>.fin-l-h>b,
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-lista>.fin-l-h>small{display:none!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-lista .fin-it{flex:0 0 auto!important;width:auto!important;min-width:140px;max-width:190px;grid-template-columns:22px minmax(0,1fr) auto!important;padding:7px 8px!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-lista .fin-it b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:var(--fs-sm,12.5px);line-height:1.3}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-lista .fin-it small{display:none!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>header{padding:0 46px 6px 0!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>header h2,
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>header h3{font-size:var(--fs-xl,17px)!important;line-height:1.25!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-dane{gap:4px 12px!important;font-size:var(--fs-sm,12.5px)!important;padding:6px 10px!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-foot,
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-foot .fin-foot-l,
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-foot .fin-foot-r{flex-wrap:wrap!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-foot .fin-foot-l,
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-foot .fin-foot-r{width:100%}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-foot button{flex:1 1 auto;white-space:normal!important;writing-mode:horizontal-tb!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno .fin-2{grid-template-columns:1fr!important}
 html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-foot>.fin-podpis,html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) #handoffPdfDialog.fin-okno>.fin-foot .document-signature-box{flex:1 1 100%!important;width:100%!important;max-width:100%!important;box-sizing:border-box}
}

/* ——— 4. Oświadczenie: akapity jeden pod drugim (dotąd oba w tym samym wierszu siatki) ——— */
html body:not(#pz1):not(#pz2):not(#pz3):not(#pz4) .document-signature-box.sig-g>*{grid-row:auto!important}

/* ——— 6. Telefon: „+” — nowy klient z wiadomości (jak „+” przy Moich klientach na komputerze) ——— */
#htTop .ht-plus-nowy{margin-left:2px}
