/* cowork.medloop.pl: wygląd 1:1 z zaakceptowanej makiety v6 (tokeny z frontend/app/globals.css). Bez CDN. */
:root {
  --background: #ffffff; --foreground: #0f172a; --muted: #f4f7fb; --muted-foreground: #5b6b80;
  --border: #e6eaf2; --input: #d3dbe8; --primary: #35c5b2; --primary-hover: #2bb3a1; --primary-text: #0a6f61;
  --secondary: #1143ac; --sidebar: #ddedf8; --sidebar-border: #c3dcef; --sidebar-accent: rgba(66,157,210,.18);
  --destructive: #d93036; --danger-ink: #c62a2f; --warning: #f5a524; --warning-ink: #916200; --info-ink: #1e6f9e;
  --caution: #ff8904; --violet: #722deb; --azure: #429dd2;
  --gradient-ai: linear-gradient(120deg, #1143ac, #7a45ec 52%, #35c5b2);
  --font: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-h: Sora, Inter, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 var(--font); color: var(--foreground); background: var(--background); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
svg.i { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 15px; height: 15px; }
svg.i.l { width: 20px; height: 20px; }
kbd { border: 1px solid var(--input); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; font-size: 12px; background: #fff; font-family: inherit; }
h1, h2, h3 { font-family: var(--font-h); font-weight: 600; }

/* ===== Rama aplikacji: kontener zapytań jak w makiecie ===== */
.frame { container: app / inline-size; }
.app { position: relative; height: 100vh; height: 100dvh; background: var(--background); overflow: hidden; display: flex; }
#scena { display: contents; }

/* ===== Wspólne ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--muted); }
.btn.pri { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.pri:hover { background: var(--primary-hover); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.ico-btn { width: 36px; height: 36px; border: 0; background: none; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--foreground); flex-shrink: 0; }
.ico-btn:hover { background: var(--muted); }
.sp { flex: 1; }
.muted { color: var(--muted-foreground); }
.cnt { font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.bdg { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--destructive); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.av { width: 26px; height: 26px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.av.lukasz { background: var(--primary-text); }
.av.przemek { background: var(--secondary); }
/* Człowiek = okrągły, pełny, inicjał. Agent = zaokrąglony kwadrat, jasne tło, obwódka i robocik w kolorze właściciela. */
.av.ag { border-radius: 7px; background: #fff; }
.av.ag svg { width: 15px; height: 15px; }
.av.ag.lukasz { background: rgba(53,197,178,.14); border: 1.5px solid var(--primary-text); color: var(--primary-text); }
.av.ag.przemek { background: rgba(17,67,172,.08); border: 1.5px solid var(--secondary); color: var(--secondary); }
.av.nikt { background: #fff; border: 1.5px dashed var(--input); color: var(--muted-foreground); }
.av.lg { width: 36px; height: 36px; font-size: 14px; }
.av.lg svg { width: 18px; height: 18px; }
.who { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; min-width: 0; }
.who svg { width: 14px; height: 14px; }
.who.ag { color: #5b21b6; font-weight: 500; }
.who small { color: var(--muted-foreground); font-weight: 400; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.pill { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.pill .dot { width: 7px; height: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.who.ag.lukasz { color: var(--primary-text); }
.who.ag.przemek { color: var(--secondary); }
.mention { font-weight: 600; border-radius: 6px; padding: 0 5px; margin-right: 4px; white-space: nowrap; }
.mention.lukasz { background: rgba(53,197,178,.16); color: var(--primary-text); }
.mention.przemek { background: rgba(17,67,172,.1); color: var(--secondary); }
.filtry { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.do-sel { height: 30px; font-size: 12.5px; max-width: 170px; }
.nr { font-weight: 700; color: var(--foreground); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip.on { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.sel { height: 34px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; background: #fff; font-size: 13px; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--input); border-radius: 8px; height: 34px; padding: 0 10px; background: #fff; color: var(--muted-foreground); min-width: 220px; }
.search input { border: 0; outline: 0; flex: 1; min-width: 0; background: none; color: var(--foreground); }
.tb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.panel > h3 { font-size: 14px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.pusto { border: 1.5px dashed var(--input); border-radius: 10px; padding: 18px 10px; text-align: center; color: var(--muted-foreground); font-size: 13px; }
.m-only { display: none; }
.link { color: var(--primary-text); font-weight: 600; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.nrchip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px 1px 6px; font-size: 12px; background: #fff; max-width: 100%; }
.nrchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.nrchip:hover { border-color: var(--primary); }

/* ===== Logowanie ===== */
.login { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px; background: linear-gradient(180deg, #f4f7fb, #ddedf8); }
.lcard { width: min(400px, 100%); background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 10px 30px rgba(15,23,42,.08); }
.lcard .brand { display: flex; align-items: center; gap: 8px; }
.lcard p { margin: -4px 0 6px; color: var(--muted-foreground); }
.lcard .btn { height: 42px; width: 100%; }
.btn:disabled { background: var(--muted); border-color: var(--border); color: var(--muted-foreground); cursor: not-allowed; }
.alert { display: flex; gap: 8px; align-items: center; color: var(--danger-ink); background: #fdecec; border: 1px solid #f7c6c7; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.cw-tag { font-size: 12px; font-weight: 700; color: var(--primary-text); background: rgba(53,197,178,.16); border-radius: 6px; padding: 2px 7px; letter-spacing: .02em; }

/* ===== Shell ===== */
.sb { width: 240px; flex-shrink: 0; background: var(--sidebar); border-right: 1px solid var(--sidebar-border); display: flex; flex-direction: column; }
.sb-logo { height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--sidebar-border); }
.sb-logo img { height: 28px; }
.sb nav { padding: 8px; display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.sb nav button { display: flex; align-items: center; gap: 12px; padding: 0 12px; height: 40px; border-radius: 8px; font-size: 14px; font-weight: 500; color: rgba(15,23,42,.7); border: 0; background: none; text-align: left; }
.sb nav button:hover { background: var(--sidebar-accent); color: var(--foreground); }
.sb nav button.on { background: var(--primary); color: #fff; }
.sb nav button span:first-of-type { flex: 1; }
.sb nav button.on .bdg { background: #fff; color: var(--primary-text); }
.sb-user { border-top: 1px solid var(--sidebar-border); padding: 10px 12px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.sb-user div { flex: 1; min-width: 0; line-height: 1.25; }
.sb-user small { color: var(--muted-foreground); display: block; overflow: hidden; text-overflow: ellipsis; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.topbar { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 20px; border-bottom: 1px solid var(--border); background: #fff; flex-shrink: 0; }
.topbar h2 { font-size: 18px; margin: 0; display: flex; align-items: center; gap: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar h2 svg { color: var(--primary); width: 22px; height: 22px; }
.content { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px 24px; }
.content.pelny { display: flex; flex-direction: column; overflow: hidden; }
.bnav { display: none; }


.termin { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 12.5px; }
.termin.po { color: var(--danger-ink); font-weight: 600; }
.termin.dzis { color: var(--warning-ink); font-weight: 600; }

/* ===== Tablica ===== */
.board-w { position: relative; flex: 1; min-height: 0; display: flex; }
.board { flex: 1; min-width: 0; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--kol, 3) - 1) * 12px) / var(--kol, 3)); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; position: relative; scrollbar-width: thin; }
.board .col { scroll-snap-align: start; }
.strz { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 64px; border-radius: 10px; border: 1px solid var(--border); background: #fff; box-shadow: 0 4px 14px rgba(15,23,42,.14); z-index: 3; font-size: 24px; line-height: 1; color: var(--foreground); }
.strz.l { left: -12px; } .strz.p { right: -12px; }
.strz:disabled { opacity: 0; pointer-events: none; }
.kpasek { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 10px; background: var(--muted); border-radius: 10px; padding: 4px; scrollbar-width: none; }
.kpasek button { flex: 1 0 auto; border: 0; background: none; border-radius: 7px; min-height: 34px; padding: 0 10px; font-size: 12.5px; font-weight: 500; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.kpasek button.wid { background: #fff; color: var(--foreground); box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.pt { position: relative; border: 0; background: none; padding: 14px 6px; margin: -14px -2px; font-size: 12px; font-weight: 800; letter-spacing: -4px; color: #94a3b8; cursor: help; line-height: 1; }
.pt-d { display: none; position: absolute; bottom: calc(100% - 8px); left: 50%; transform: translateX(-50%); width: 230px; background: #0f172a; color: #fff; letter-spacing: 0; font-weight: 400; font-size: 12px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; z-index: 30; text-align: left; box-shadow: 0 8px 20px rgba(15,23,42,.3); }
.doc { position: relative; }
.frag { flex: 1; font-style: italic; color: var(--foreground); border-left: 3px solid #f5a524; padding-left: 8px; }
#pvhost { position: absolute; z-index: 45; display: none; background: #fff; }
#pvhost iframe { width: 100%; height: 100%; border: 0; display: block; }
.pv-slot { flex: 1; min-width: 0; }
.uwk { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; background: #fff; }
.uwk.akt { border-color: #722deb; box-shadow: 0 0 0 1px #722deb; }
.uwk.roz { background: var(--muted); }
.uwk.roz .msg-t { color: var(--muted-foreground); }
.pinnr { width: 22px; height: 22px; border-radius: 50% 50% 50% 4px; background: #722deb; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.uwk.roz .pinnr { background: #94a3b8; }
.dot-el { display: flex; gap: 8px; align-items: center; font-size: 12.5px; background: var(--muted); border-radius: 8px; padding: 6px; }
.dot-el img { width: 96px; height: 60px; border-radius: 4px; border: 1px solid var(--border); background: #fff; flex-shrink: 0; }
.dot-el b { font-weight: 600; }
.bell { position: relative; }
.bell .bdg { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; font-size: 10px; }
.pow { position: absolute; top: 60px; right: 12px; width: 400px; max-height: 70%; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 50px rgba(15,23,42,.25); z-index: 55; display: flex; flex-direction: column; overflow: hidden; animation: wsun .2s ease-out; }
.pow-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 600; }
.pow-l { overflow-y: auto; }
.pow-r { display: flex; gap: 10px; align-items: flex-start; width: 100%; border: 0; border-bottom: 1px solid var(--muted); background: #fff; padding: 10px 14px; text-align: left; }
.pow-r:hover { background: var(--muted); }
.pow-r.nowe { background: rgba(53,197,178,.06); }
.pow-r div { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; }
.pow-r small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted-foreground); }
.pow-r time { font-size: 11.5px; color: var(--muted-foreground); }
.pow-r .kr { width: 9px; height: 9px; border-radius: 50%; background: var(--destructive); margin-top: 6px; flex-shrink: 0; }
.os li.swiec > .bubble, .os li.swiec > .ev { animation: swiec 2.4s ease-out; border-radius: 12px; }
@keyframes swiec { 0%, 60% { box-shadow: 0 0 0 3px #f5a524; } 100% { box-shadow: 0 0 0 0 transparent; } }
.col { background: var(--muted); border-radius: 12px; display: flex; flex-direction: column; min-height: 0; border: 1.5px solid transparent; }
.col.over { border-color: var(--primary); background: rgba(53,197,178,.08); }
.col.bok { background: #f1f2f5; }
.col-h { display: flex; align-items: center; gap: 7px; padding: 10px 10px 8px; font-weight: 600; font-size: 13px; }
.col-b { flex: 1; overflow-y: auto; padding: 0 7px 8px; display: flex; flex-direction: column; gap: 8px; }
.card { background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--pc); border-radius: 10px; padding: 9px 10px; cursor: grab; display: flex; flex-direction: column; gap: 7px; position: relative; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.card:hover { box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.card.dragging { opacity: .45; }
.card-top { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-foreground); padding-right: 26px; flex-wrap: wrap; }
.card-t { font-weight: 500; line-height: 1.33; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-bot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted-foreground); }
.mi { display: inline-flex; align-items: center; gap: 3px; }
.mi svg { width: 14px; height: 14px; }

/* ===== Szczegół zgłoszenia ===== */
.det-h { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.det-h h1 { font-size: 22px; margin: 4px 0 4px; line-height: 1.25; }
.det-h .tt { flex: 1; min-width: 260px; }
.stepper { display: flex; align-items: stretch; margin: 16px 0 12px; background: var(--muted); border-radius: 12px; padding: 4px; gap: 2px; }
.stepper button { flex: 1; border: 0; background: none; border-radius: 9px; min-height: 40px; font-size: 12.5px; font-weight: 600; color: var(--muted-foreground); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 6px; position: relative; }
.stepper button.done { color: var(--foreground); }
.stepper button.done .dot { background: var(--c) !important; }
.stepper button .dot { background: #c9d3e3; }
.stepper button.cur { background: #fff; color: var(--foreground); box-shadow: 0 1px 3px rgba(15,23,42,.14); }
.stepper button.cur .dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.mbox { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: #fff; text-align: left; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mbox > span:first-child { font-size: 11.5px; color: var(--muted-foreground); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.mbox .v { display: flex; align-items: center; gap: 6px; font-weight: 500; min-height: 26px; }
button.mbox:hover { border-color: #c9d3e3; }
.mbox input[type=date] { border: 0; padding: 0; background: none; font-weight: 500; min-height: 26px; }
.det-b { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.det-side { order: 2; display: flex; flex-direction: column; gap: 12px; }
.zw { border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.zw > button { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 12px 14px; font-weight: 600; text-align: left; min-height: 44px; }
.zw > button .chev { transition: transform .15s; }
.zw.otw > button .chev { transform: rotate(90deg); }
.zw-b { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.wer { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 6px; text-align: left; background: #fff; width: 100%; }
.wer:hover { border-color: #c9d3e3; }
.wer.akc { border-color: var(--primary); background: rgba(53,197,178,.06); }
.wer img { width: 88px; height: 56px; border-radius: 6px; border: 1px solid var(--border); object-fit: cover; object-position: top; flex-shrink: 0; }
.wer div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.wer b { font-size: 14px; }
.akc-b { font-size: 11px; font-weight: 700; color: var(--primary-text); background: rgba(53,197,178,.18); border-radius: 999px; padding: 1px 7px; display: inline-flex; align-items: center; gap: 3px; width: fit-content; }
.akc-b.czeka { color: var(--warning-ink); background: #fff3dc; }
.akc-b.stara { color: var(--muted-foreground); background: var(--muted); }
.plan-r { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; text-align: left; background: #fff; width: 100%; }
.plan-r:hover { border-color: #c9d3e3; }
.typ { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.typ.plan { background: rgba(53,197,178,.16); color: var(--primary-text); }
.typ.research { background: rgba(17,67,172,.1); color: var(--secondary); }
.typ.weryfikacja { background: #fff3dc; color: var(--warning-ink); }
.os { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; display: flex; flex-direction: column; gap: 12px; }
.os::before { content: ""; position: absolute; left: 16px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.os li { position: relative; padding-left: 40px; }
.os .ev { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted-foreground); min-height: 26px; }
.os .ev b { color: var(--foreground); font-weight: 600; }
.os .ev time, .msg-h time { font-size: 12px; color: var(--muted-foreground); }
.os .knot { position: absolute; left: 4px; top: 0; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted-foreground); }
.os .knot svg { width: 13px; height: 13px; }
.os .knot.c { border-color: var(--c); color: var(--c); }
.os li.msg .knot { border: 0; background: none; }
.bubble { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.bubble.ag { background: #faf8ff; border-color: #e6defc; }
.msg-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; margin-bottom: 4px; }
.msg-t { white-space: pre-wrap; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 140px)); gap: 8px; margin-top: 8px; }
.shot { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--muted); cursor: zoom-in; padding: 0; display: block; width: 100%; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.files { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; font-size: 12.5px; background: #fff; max-width: 100%; }
.fchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip button { border: 0; background: none; padding: 0; display: inline-flex; color: var(--muted-foreground); }
.comp-w { margin-top: 16px; position: sticky; bottom: -24px; background: linear-gradient(to top, #fff 80%, rgba(255,255,255,0)); padding: 10px 0 24px; }
.comp { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--input); border-radius: 12px; padding: 8px; background: #fff; }
.comp.over { border-color: var(--primary); background: rgba(53,197,178,.05); }
.comp textarea { border: 0; outline: 0; resize: vertical; min-height: 44px; padding: 4px 6px; width: 100%; }
.comp .row { display: flex; align-items: center; gap: 8px; }
.phi-mini { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--warning-ink); }
.zone { border: 1.5px dashed var(--input); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #fbfcfe; }
.zone.over { border-color: var(--primary); background: rgba(53,197,178,.06); }
.zone-l { display: flex; align-items: center; gap: 10px; color: var(--muted-foreground); }
.phi { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--warning-ink); background: #fff8eb; border: 1px solid #fde3b0; border-radius: 8px; padding: 7px 10px; }
.pend { display: flex; gap: 8px; flex-wrap: wrap; }
.pend .p { position: relative; width: 84px; height: 56px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.pend .p img { width: 100%; height: 100%; object-fit: cover; }
.pend .p button { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(15,23,42,.7); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.pend .p button svg { width: 12px; height: 12px; }
.potw { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff8eb; border: 1px solid #fde3b0; border-radius: 10px; padding: 10px 12px; color: var(--warning-ink); }
.potw span { flex: 1 1 220px; }
.potw b { color: var(--foreground); }
.err { color: var(--danger-ink); font-size: 12.5px; margin-top: 4px; }

/* ===== Nakładki ===== */
.ov { position: absolute; inset: 0; background: rgba(15,23,42,.35); z-index: 30; display: flex; justify-content: center; align-items: center; padding: 24px; }
.ov.lb { background: rgba(15,23,42,.88); z-index: 60; cursor: zoom-out; }
.ov.lb img { max-width: 100%; max-height: 100%; border-radius: 8px; background: #fff; }
.ov.lb .ico-btn { position: absolute; top: 12px; right: 12px; color: #fff; }
@keyframes wsun { from { transform: translateY(8px); opacity: .6; } to { transform: none; opacity: 1; } }
.dlg { width: min(620px, 100%); max-height: 100%; background: #fff; border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(15,23,42,.25); animation: wsun .2s ease-out; }
.dlg-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.dlg-h h2 { font-size: 17px; margin: 0; flex: 1; }
.dlg-b { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dlg-f { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.dlg-f .potw { flex: 1 1 100%; }
.fld label:not(.btn), .fld .lab { display: block; font-weight: 500; margin-bottom: 5px; font-size: 13px; }
.fld .opc { color: var(--muted-foreground); font-weight: 400; }
.req { color: var(--destructive); }
.inp { width: 100%; height: 38px; border: 1px solid var(--input); border-radius: 8px; padding: 0 10px; background: #fff; }
.ta { width: 100%; border: 1px solid var(--input); border-radius: 8px; padding: 8px 10px; resize: vertical; min-height: 44px; display: block; }
.inp[aria-invalid="true"], .ta[aria-invalid="true"] { border-color: var(--destructive); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sheet { width: min(360px, 100%); background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 20px 50px rgba(15,23,42,.25); animation: wsun .2s ease-out; max-height: 100%; overflow-y: auto; }
.sheet h3 { margin: 6px 10px 8px; font-size: 13px; color: var(--muted-foreground); font-family: var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 42px; border: 0; background: none; border-radius: 8px; padding: 0 12px; text-align: left; }
.opt:hover { background: var(--muted); }
.opt.on { font-weight: 600; color: var(--primary-text); }
.toast { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 70; font-size: 13px; display: flex; gap: 8px; align-items: center; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(15,23,42,.3); animation: wsun .2s ease-out; }
.toast svg { color: var(--primary); }

/* ===== Makiety ===== */
.mgr { display: flex; flex-direction: column; gap: 12px; }
.mgr-g { border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.mgr-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
.mgr-h > button.tg { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font-weight: 600; font-size: 15px; text-align: left; min-height: 36px; }
.mgr-h .chev { transition: transform .15s; }
.mgr-g.otw .mgr-h .chev { transform: rotate(90deg); }
.mgr-b { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 0 14px 14px; }
.mver { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; text-align: left; padding: 0; display: flex; flex-direction: column; }
.mver:hover { box-shadow: 0 4px 14px rgba(15,23,42,.08); }
.mver.akc { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.mver img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; display: block; border-bottom: 1px solid var(--border); }
.mver div { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.mver b { font-size: 14px; }
.pv { position: absolute; inset: 0; background: #fff; z-index: 40; display: flex; flex-direction: column; }
.pv-h { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pv-h .tt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pv-h .tt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-b { flex: 1; min-height: 0; display: flex; position: relative; }
.uw { width: 380px; border-left: 1px solid var(--border); display: flex; flex-direction: column; background: #fff; }
.uw-h { display: flex; align-items: center; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--border); font-weight: 600; }
.uw-b { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.uw-f { border-top: 1px solid var(--border); padding: 12px 16px; }
.uw-f .comp .row { flex-wrap: wrap; }
.uw-f .dot-el { margin-bottom: 8px; }

/* ===== Plany ===== */
.dwa { display: grid; grid-template-rows: minmax(0, 1fr); grid-template-columns: 340px minmax(0, 1fr); gap: 16px; flex: 1; min-height: 0; }
.lista { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; padding-right: 2px; }
.li-r { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; text-align: left; background: #fff; display: flex; flex-direction: column; gap: 5px; width: 100%; }
.li-r:hover { border-color: #c9d3e3; }
.li-r.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.li-r b { font-weight: 600; line-height: 1.3; }
.li-r .m { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted-foreground); }
.doc { border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow-y: auto; min-height: 0; }
.doc-h { padding: 16px 24px 12px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; background: #fff; }
.doc-h h2 { margin: 0; font-size: 20px; }
.md { padding: 8px 24px 24px; max-width: 860px; }
.md h1, .md h2, .md h3 { margin: 20px 0 8px; line-height: 1.3; }
.md h1 { font-size: 20px; } .md h2 { font-size: 17px; } .md h3 { font-size: 15px; }
.md p { margin: 8px 0; }
.md ul { margin: 8px 0; padding-left: 22px; }
.md li { margin: 3px 0; }
.md ul.tasks { list-style: none; padding-left: 2px; }
.md ul.tasks li { display: flex; gap: 8px; align-items: flex-start; }
.md .cb { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--input); flex-shrink: 0; margin-top: 1px; display: inline-flex; align-items: center; justify-content: center; }
.md .cb.x { background: var(--primary); border-color: var(--primary); color: #fff; }
.md .cb svg { width: 12px; height: 12px; stroke-width: 3; }
.md li.x span { color: var(--muted-foreground); text-decoration: line-through; }
.md code { background: var(--muted); border-radius: 4px; padding: 1px 5px; font-size: 12.5px; }
.md .tw { overflow-x: auto; margin: 10px 0; border: 1px solid var(--border); border-radius: 10px; }
.md table { border-collapse: collapse; width: 100%; font-size: 13px; }
.md th { background: var(--muted); text-align: left; font-weight: 600; padding: 8px 10px; white-space: nowrap; }
.md td { border-top: 1px solid var(--border); padding: 8px 10px; vertical-align: top; }
.md tr:nth-child(even) td { background: #fafcfe; }
.md blockquote { margin: 10px 0; padding: 8px 12px; border-left: 3px solid var(--primary); background: rgba(53,197,178,.07); border-radius: 0 8px 8px 0; }


/* ===== Kanał agentów ===== */
.watek-h { display: flex; flex-direction: column; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.watek-h h2 { margin: 0; font-size: 18px; }
.strony { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; font-size: 13px; }
.strony > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.strony > div:last-child { justify-content: flex-end; text-align: right; }
.podglad { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted-foreground); background: var(--muted); border-radius: 8px; padding: 6px 10px; }
.lanes { position: relative; padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.lanes::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--border); transform: translateX(-1px); }
.lw { display: grid; grid-template-columns: 1fr 64px 1fr; align-items: start; }
.lw .os-c { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 6px; z-index: 1; }
.lw .os-c time { font-size: 11px; color: var(--muted-foreground); background: #fff; padding: 0 2px; }
.lw .os-c .dot { width: 12px; height: 12px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.lw .bl { grid-column: 1; }
.lw .br { grid-column: 3; }
.lw .bubble { max-width: 100%; }
.lw .bubble.l { border-color: rgba(53,197,178,.45); background: rgba(53,197,178,.06); }
.lw .bubble.p { border-color: rgba(17,67,172,.25); background: rgba(17,67,172,.04); }
.lw.sys { grid-template-columns: 1fr; justify-items: center; }
.lw.sys span { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px; font-size: 12px; color: var(--muted-foreground); z-index: 1; }
.decyzja { border: 1.5px solid var(--warning); background: #fffaf0; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; margin: 0 18px 18px; }
.decyzja .row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Ustawienia ===== */
.ust { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; max-width: 980px; }
.ust .panel { display: flex; flex-direction: column; gap: 12px; }
.ok-msg { display: flex; gap: 8px; align-items: center; color: var(--primary-text); background: rgba(53,197,178,.12); border-radius: 8px; padding: 8px 10px; font-size: 13px; }

/* ===== Telefon / wąska ramka (container query) ===== */
@container app (max-width: 820px) {
  .d-only { display: none !important; }
  .m-only { display: inline-flex; }
  .topbar { padding: 0 6px 0 4px; gap: 4px; }
  .topbar h2 { font-size: 17px; }
  .topbar h2 svg { display: none; }
  .content { padding: 14px 12px 96px; }
  .content.pelny { padding-bottom: 72px; }
  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--border); background: #fff; position: absolute; left: 0; right: 0; bottom: 0; height: 62px; z-index: 20; }
  .bnav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 500; color: var(--muted-foreground); position: relative; min-height: 44px; }
  .bnav button.on { color: var(--primary-text); }
  .bnav .bdg { position: absolute; top: 5px; left: calc(50% + 5px); min-width: 18px; height: 18px; font-size: 10px; }
  .toast { bottom: 80px; }
  .btn, .chip, .sel, .inp, .opt { min-height: 44px; }
  .two, .ust { grid-template-columns: 1fr; }
  .mgr-h > button.tg { min-height: 44px; }
  .search { height: 44px; min-width: 0; flex: 1 1 0; }
  .filtry { gap: 8px; align-items: center; }
  .do-sel { height: 44px; }
  .ico-btn { width: 44px; height: 44px; }
  .chips.przew { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; padding-bottom: 2px; }
  .chips.przew > * { flex-shrink: 0; }
  .board { grid-auto-columns: 100%; gap: 10px; }
  .strz { display: none; }
  .kpasek button { min-height: 44px; }
  .pow { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 80%; border-radius: 16px 16px 0 0; }
  .dwa.z-uw { display: flex; flex-direction: column; }
  .dwa.z-uw .doc { flex: 0 0 34%; min-height: 0; }
  .dwa.z-uw > .uw { flex: 1 1 auto; min-height: 0; }
  .dwa.z-uw .doc-h { position: static; }
  .content:has(.dwa.z-uw) > .filtry, .content:has(.dwa.z-uw) > .tb { display: none; }
  .dwa.z-uw .uw-f textarea { min-height: 40px; }
  .pv-b .uw { position: static; height: 58%; flex-shrink: 0; width: auto; border-left: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: 0 -6px 18px rgba(15,23,42,.12); }
  .card { cursor: pointer; }
  .card-top { padding-right: 38px; }
  .det-h h1 { font-size: 19px; }
  .stepper { display: none; }
  .st-mob { display: flex !important; }
  .det-b { grid-template-columns: 1fr; }
  .det-side { order: 0; }
  .os li { padding-left: 34px; }
  .os::before { left: 13px; }
  .os .knot { left: 1px; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comp-w { bottom: 62px; padding-bottom: 8px; }
  .mgr-b { grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 10px 10px; }
  .uw { position: absolute; left: 0; right: 0; bottom: 0; height: 72%; width: auto; border-left: 0; border-top: 1px solid var(--border); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(15,23,42,.18); }
  .pv-h .d-hide { display: none; }
  .dwa { grid-template-columns: 1fr; }
  .dwa.wybrany .lista { display: none; }
  .dwa:not(.wybrany) .doc, .dwa:not(.wybrany) .watek { display: none; }
  .md, .doc-h { padding-left: 14px; padding-right: 14px; }
  .lanes { padding: 12px 10px; }
  .lw { grid-template-columns: 1fr 44px 1fr; }
  .lw .bl, .lw .br { grid-column: 1 / 4; }
  .lw .os-c { display: none; }
  .lanes::before { display: none; }
  .lw .bl .bubble { margin-right: 28px; } .lw .br .bubble { margin-left: 28px; }
  .strony { grid-template-columns: 1fr; gap: 4px; }
  .strony > div:last-child { justify-content: flex-start; text-align: left; }
  .strony .arrow { display: none; }
  .ov.c { padding: 0; align-items: stretch; }
  .dlg { width: 100%; max-height: none; border-radius: 0; }
  .dlg-b { flex: 1; }
  .ov.s { align-items: flex-end; padding: 0; }
  .sheet { width: 100%; border-radius: 16px 16px 0 0; padding-bottom: 16px; }
  .pend .p button { width: 32px; height: 32px; }
  .link { min-height: 44px; display: inline-flex; align-items: center; }
}
.st-mob { display: none; align-items: center; gap: 8px; margin: 14px 0 10px; }
@media (pointer: coarse) {
  .btn, .chip, .sel, .inp, .opt { min-height: 44px; }
  .ico-btn { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* ===== v6: odchudzenie ===== */
#dymhost { position: absolute; inset: 0; pointer-events: none; z-index: 55; }
#dymhost > * { pointer-events: auto; }
.dymek-uw { position: absolute; width: 340px; max-width: calc(100% - 16px); background: #fff; border: 1px solid var(--border); border-left: 4px solid #722deb; border-radius: 12px; box-shadow: 0 16px 40px rgba(15,23,42,.25); padding: 10px; display: flex; flex-direction: column; gap: 8px; animation: wsun .15s ease-out; }
.dymek-uw textarea { width: 100%; border: 1px solid var(--input); border-radius: 8px; padding: 8px 10px; resize: vertical; min-height: 64px; }
.dymek-uw .row { display: flex; align-items: center; gap: 6px; }
.frag { display: block; font-style: italic; color: var(--foreground); margin-top: 3px; }
.pilne { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--danger-ink); background: #fdecec; border-radius: 999px; padding: 1px 8px; }
.card.pil { border-left: 3px solid var(--destructive); }
.card { border-left: 1px solid var(--border); }
.btn.pilne-on { background: #fdecec; border-color: #f7c6c7; color: var(--danger-ink); }
.pola { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin: 0 0 18px; }
.pola .mbox { min-width: 220px; }
.pola .btn { height: auto; min-height: 44px; }
.termin-pole input { border: 0; background: none; padding: 0; font: inherit; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--primary-text); }
.kpasek button.pusta { opacity: .45; }
.akt-dot { width: 8px; height: 8px; border-radius: 50%; background: #c3cbd8; display: inline-block; margin: 0 4px; }
.akt-dot.on { background: #16c0aa; box-shadow: 0 0 0 3px rgba(22,192,170,.18); }
.pt { position: relative; border: 0; background: none; padding: 10px 4px; margin: -10px 0; font-size: 13px; font-weight: 800; color: var(--primary); cursor: help; line-height: 1; }
.pt-d { display: none; position: absolute; bottom: calc(100% - 4px); left: 50%; transform: translateX(-50%); width: 230px; background: #0f172a; color: #fff; font-weight: 400; font-size: 12px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; z-index: 30; text-align: left; }
.pt-d b { color: #fff; }
.pt:hover .pt-d, .pt:focus .pt-d { display: block; }
.mimg { position: relative; display: block; }
.dec-r { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px 3px 3px; box-shadow: 0 2px 8px rgba(15,23,42,.12); white-space: nowrap; }
.dec-r small { display: block; font-size: 10px; color: var(--muted-foreground); line-height: 1.1; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.dec-r b { display: block; font-size: 12.5px; line-height: 1.15; }
.mimg .dec-r { position: absolute; top: 8px; right: 8px; }
.kroki { display: flex; align-items: center; gap: 6px; padding: 8px 12px 4px; border-bottom: 0; }
.kroki-l { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.krok { position: relative; flex: 0 0 150px; border: 1.5px solid var(--border); border-radius: 10px; background: #fff; padding: 4px; display: flex; flex-direction: column; gap: 4px; text-align: left; font-size: 12px; font-weight: 500; }
.krok img { width: 100%; height: 56px; object-fit: cover; object-position: top; border-radius: 6px; display: block; }
.krok span:not(.bdg) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.krok.on { border-color: #722deb; box-shadow: 0 0 0 1px #722deb; }
.krok .bdg { position: absolute; top: -6px; right: -6px; background: #722deb; }
.krok-tyt { padding: 2px 14px 8px; font-size: 13px; border-bottom: 1px solid var(--border); }
.dwa.z-uw { grid-template-columns: 300px minmax(0, 1fr) 360px; }
.dwa > .uw { position: static; width: auto; min-height: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.pv-b > .uw { width: 360px; }
.md .uw-el { background: rgba(114,45,235,.06); box-shadow: inset 3px 0 0 #722deb; border-radius: 4px; }
.md tr.uw-el td { background: rgba(114,45,235,.08); }
.md .uw-pin { margin-right: 6px; vertical-align: middle; cursor: pointer; border: 0; }
.md mark.uw-mark { background: rgba(245,165,36,.22); border-bottom: 2px solid #f5a524; color: inherit; cursor: pointer; padding: 0 1px; }
.md .uw-grp { background: rgba(245,165,36,.16); box-shadow: inset 0 -2px 0 #f5a524; cursor: pointer; }
.md tr.uw-grp td { background: rgba(245,165,36,.16); }
.md .md-swiec { outline: 3px solid #f5a524; outline-offset: 3px; }
.md tbody tr, .md li, .md h1, .md h2, .md h3 { cursor: pointer; }
.md tbody tr:hover td, .md li:hover, .md h1:hover, .md h2:hover, .md h3:hover { background: rgba(114,45,235,.05); }
.uw-zw { width: 48px; flex-shrink: 0; border-left: 1px solid var(--border); background: #fff; display: flex; }
.dwa > .uw-zw { border: 1px solid var(--border); border-radius: 12px; }
.uw-zw button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 14px; color: #5b21b6; cursor: pointer; }
.uw-zw button:hover { background: rgba(114,45,235,.06); }
.uw-zw b { font-size: 13px; }
.dwa.z-uw.uw-zwin { grid-template-columns: 300px minmax(0, 1fr) 48px; }
.uw-h .ico-btn[data-a="uwZwin"] { margin: -6px 2px -6px -8px; }
@container app (max-width: 820px) {
  .uw-zw { width: auto; height: 48px; border-left: 0; border-top: 1px solid var(--border); }
  .uw-zw button { flex-direction: row; justify-content: center; padding: 0; }
  .dwa.z-uw.uw-zwin { grid-template-columns: 1fr; }
  .dwa.z-uw:not(.uw-otw) > .uw-zw { display: none; }
  .sb { display: none; }
  .bnav { grid-template-columns: repeat(5, 1fr); }
  .dwa.z-uw { grid-template-columns: 1fr; }
  .dwa.z-uw:not(.uw-otw) > .uw { display: none; }
  .dwa.z-uw.uw-otw.wybrany { display: flex; flex-direction: column; }
  .dwa.z-uw.uw-otw.wybrany .doc { flex: 0 0 34%; min-height: 0; }
  .dwa.z-uw.uw-otw.wybrany > .uw { display: flex; flex: 1 1 auto; min-height: 0; }
  .content:has(.dwa.uw-otw.wybrany) > .filtry { display: none; }
  .pv-b > .uw { width: auto; position: static; height: 46%; flex-shrink: 0; border-left: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: 0 -6px 18px rgba(15,23,42,.12); }
  .pv-b { flex-direction: column; }
  .krok { flex-basis: 120px; }
  .krok img { height: 44px; }
  .pola .mbox { min-width: 0; flex: 1 1 100%; }
  .dymek-uw { width: calc(100% - 16px); left: 8px !important; }
  button.nrchip { padding-top: 12px; padding-bottom: 12px; margin: -11px 0; }
  .pt { padding: 15px 8px; margin: -15px -4px; }
}
