/* CRM SKiL — wygląd marki strony (makiety/_system/costa.css + lux.css): systemowy SF, czerń i biel, kafle 28 px,
   półprzezroczyste paski. Ruch jak w NL workspace: tylko transform/opacity, naciśnięcie 120 ms --ease-out + scale .97,
   arkusze, przejścia ekranów i gesty = sprężyny ruch.js; reduced motion = zanik. Tokeny tylko tutaj, w :root. */
:root {
  --ink: #1d1d1f; --ink-2: #6e6e73; --ink-3: #86868b;
  --paper: #ffffff; --mist: #f5f5f7; --mist-2: #ebebef; --line: #d2d2d7; --line-2: #e5e5ea;
  --acc: #000000; --on-acc: #ffffff; --night: #000000; --night-2: #1d1d1f;
  --ok: #1e7a45; --ok-bg: #e5f3ea; --warn: #a15c00; --warn-bg: #fdf0dc; --err: #c4241c; --err-bg: #fbe7e5;
  --amber: #e89d1c; --pole: #f5f5f7;
  --scrim: rgba(0, 0, 0, .38);
  --bar: rgba(255, 255, 255, .72); --bar-edge: rgba(0, 0, 0, .08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --r-tile: 28px; --r-card: 18px; --r-field: 12px; --r-pill: 980px;
  --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --gora: 52px; --pasek: 58px; --bok: 232px;
  --top: env(safe-area-inset-top, 0px); --bot: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #8e8e93;
    --paper: #1c1c1e; --mist: #000000; --mist-2: #2c2c2e; --line: #3a3a3c; --line-2: #2c2c2e;
    --acc: #f5f5f7; --on-acc: #000000; --pole: #2c2c2e;
    --ok: #4fc27c; --ok-bg: #12301f; --warn: #f1a94a; --warn-bg: #33240d; --err: #ff6b62; --err-bg: #3a1513;
    --scrim: rgba(0, 0, 0, .6); --bar: rgba(22, 22, 24, .72); --bar-edge: rgba(255, 255, 255, .08);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body { overscroll-behavior: none; }
body { margin: 0; background: var(--mist); color: var(--ink); font: 400 17px/1.47 var(--font); letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a, label, [role=button] { touch-action: manipulation; }
button, .btn, .seg a, .pasek a, .bok a, .rynek button, .etapy button, .plus, .chk { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 8px; }
img { display: block; max-width: 100%; }
i { font-style: normal; }
.ik { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--ink-2); }
.male { font-size: 14px; line-height: 1.43; letter-spacing: -.006em; }
.mikro { font-size: 12px; line-height: 1.33; letter-spacing: 0; color: var(--ink-2); }
.marka { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.marka b { font-weight: 700; font-size: 19px; letter-spacing: .06em; }
.marka span { font-size: 12px; color: var(--ink-2); letter-spacing: 0; }

/* ---------- logowanie / zaproszenie ---------- */
.wejscie { min-height: 100svh; display: grid; place-items: center; padding: 16px; background: var(--night); color: #f5f5f7; }
.wejscie-box { width: 100%; max-width: 360px; display: grid; gap: 14px; }
.wejscie-box .marka { flex-direction: column; align-items: center; gap: 6px; margin-bottom: 18px; }
.wejscie-box .marka b { font-size: 34px; letter-spacing: .1em; }
.wejscie-box .marka span { color: #a1a1a6; font-size: 14px; }
.wejscie-box h1 { font-size: 24px; text-align: center; margin: 0 0 4px; letter-spacing: -.02em; }
.wejscie-box p { color: #a1a1a6; text-align: center; margin: 0; font-size: 15px; }
.wejscie .pole { color: #a1a1a6; }
.wejscie input { background: #1d1d1f; color: #f5f5f7; }
.wejscie input:focus { box-shadow: inset 0 0 0 2px #f5f5f7; }
.wejscie .btn.glowny { background: #f5f5f7; color: #000; }
.blad { color: #ff6b62; min-height: 1.3em; margin: 0; font-size: 14px; text-align: center; }

/* ---------- układ: pasek górny, dolny (telefon), boczny (komputer) ---------- */
.gora { position: sticky; top: 0; z-index: 30; height: calc(var(--gora) + var(--top)); padding: var(--top) 16px 0;
  display: flex; align-items: center; gap: 10px; background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.gora::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--bar-edge) 20%, var(--bar-edge) 80%, transparent); }
.gora .marka { margin-right: auto; }
.gora .wstecz { margin-right: auto; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding-right: 8px;
  font-size: 17px; color: var(--ink); max-width: 55%; min-width: 0; }
.gora .wstecz span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gora .wstecz .ik { width: 24px; height: 24px; stroke-width: 2.1; margin-left: -6px; }
.awatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center;
  font-size: 13px; font-weight: 600; letter-spacing: 0; flex: none; }
.gora .awatar-btn { min-width: 44px; min-height: 44px; display: grid; place-items: center; margin-right: -6px; }

.widok { padding: 6px 16px calc(var(--pasek) + 34px + var(--bot)); max-width: 1120px; margin: 0 auto; outline: none; min-height: 60svh; }
.tryb { background: var(--warn-bg); color: var(--warn); font-size: 13px; line-height: 1.35; padding: 8px 16px; text-align: center; letter-spacing: -.006em; }
.tryb a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.pasek { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; padding: 6px 4px calc(6px + var(--bot));
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 1px 0 var(--bar-edge); transform: translateZ(0); }
.pasek a { flex: 1; min-height: var(--pasek); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; letter-spacing: 0; color: var(--ink-2); position: relative; -webkit-user-select: none; user-select: none; }
.pasek a .ik { width: 25px; height: 25px; transition: transform .12s var(--ease-out); }
.pasek a:active .ik { transform: scale(.9); }
.pasek a.on { color: var(--ink); font-weight: 600; }
.pasek a.on .ik { stroke-width: 2.1; }
.licznik { position: absolute; top: 4px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--amber); color: #000; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.bok { display: none; }

@media (min-width: 900px) {
  .pasek { display: none; }
  .bok { display: flex; flex-direction: column; position: fixed; z-index: 31; top: 0; bottom: 0; left: 0; width: var(--bok);
    padding: 22px 12px 16px; background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    box-shadow: inset -1px 0 0 var(--bar-edge); }
  .bok .marka { padding: 4px 12px 22px; }
  .bok nav { display: grid; gap: 2px; }
  .bok nav a { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 15px;
    color: var(--ink); position: relative; transition: transform .12s var(--ease-out); }
  .bok nav a:active { transform: scale(.98); }
  .bok nav a.on { background: var(--paper); font-weight: 600; }
  .bok nav a .licznik { position: static; margin-left: auto; }
  .bok .ja { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; text-align: left; font-size: 14px; }
  .bok .ja span { min-width: 0; line-height: 1.3; }
  .bok .ja b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .gora, .tryb, .widok { margin-left: var(--bok); }
  .widok { margin-left: max(var(--bok), calc(var(--bok) + (100vw - var(--bok) - 1120px) / 2)); }
  .gora { padding: 0 32px; }
  .gora .marka { display: none; }
  .gora .awatar-btn { display: none; }
  .gora .rynek { margin-left: auto; }
  .widok { padding: 8px 32px 64px; }
}
@media (hover: hover) and (pointer: fine) {
  .bok nav a:not(.on):hover, .bok .ja:hover { background: color-mix(in srgb, var(--paper) 60%, transparent); }
}

/* ---------- przełącznik rynku (jak .market na stronie) ---------- */
.rynek { display: inline-flex; border: 1px solid var(--ink); border-radius: var(--r-pill); padding: 2px; font-size: 13px; line-height: 1; flex: none; }
.rynek button { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 11px; border-radius: var(--r-pill);
  color: var(--ink); letter-spacing: -.01em; transition: background-color .16s ease, color .16s ease, transform .12s var(--ease-out); white-space: nowrap; }
.rynek button .ik { width: 15px; height: 15px; stroke-width: 1.8; }
.rynek button[aria-pressed="true"] { background: var(--ink); color: var(--paper); font-weight: 600; }
.rynek button:active { transform: scale(.96); }
@media (max-width: 420px) { .rynek .pelna { display: none; } .rynek button { padding: 0 9px; } }
@media (min-width: 421px) { .rynek .krotka { display: none; } }

/* ---------- typografia stron ---------- */
.naglowek { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 10px 0 18px; }
.naglowek h1 { flex: 1; min-width: 0; margin: 0; font-size: 34px; line-height: 1.07; font-weight: 700; letter-spacing: -.028em; overflow-wrap: anywhere; }
.naglowek .pod { flex-basis: 100%; margin: -6px 0 0; color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; }
@media (min-width: 900px) { .naglowek h1 { font-size: 40px; } }
.naglowek.szczegol h1 { font-size: 28px; line-height: 1.12; letter-spacing: -.024em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 900px) { .naglowek.szczegol h1 { font-size: 34px; } }
h2 { font-size: 21px; line-height: 1.14; font-weight: 600; letter-spacing: -.018em; margin: 0 0 12px; }
h3 { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin: 22px 4px 8px; }
h3:first-child { margin-top: 0; }

/* ---------- przyciski ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .12s var(--ease-out), opacity .12s; -webkit-user-select: none; user-select: none; }
.btn:active { transform: scale(.97); }
.btn.glowny { background: var(--acc); color: var(--on-acc); }
.btn.szary { background: var(--mist-2); }
.btn.zle { background: transparent; color: var(--err); box-shadow: inset 0 0 0 1px var(--line); }
.btn.male { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.szeroki { width: 100%; }
.btn .ik { width: 18px; height: 18px; stroke-width: 2; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.czeka { opacity: .7; pointer-events: none; }
.link { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.plus { width: 44px; height: 44px; border-radius: 50%; background: var(--acc); color: var(--on-acc); display: grid; place-items: center; flex: none;
  transition: transform .12s var(--ease-out); }
.plus:active { transform: scale(.94); }
.plus .ik { width: 22px; height: 22px; stroke-width: 2.2; }

/* ---------- karty, listy ---------- */
.karta { background: var(--paper); border-radius: var(--r-card); padding: 18px; margin-bottom: 14px; min-width: 0; }
.karta > h2:first-child { margin-bottom: 14px; }
.lista { background: var(--paper); border-radius: var(--r-card); overflow: hidden; margin-bottom: 14px; }
.wiersz { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; position: relative; width: 100%; text-align: left;
  transition: background-color .2s ease; }
.wiersz + .wiersz::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; height: 1px; background: var(--line-2); }
a.wiersz:active, button.wiersz:active { background: var(--mist-2); transition: none; }
.wiersz .t { flex: 1; min-width: 0; }
.wiersz .t b { display: block; font-weight: 600; font-size: 16px; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiersz .t small { display: block; color: var(--ink-2); font-size: 14px; letter-spacing: -.006em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiersz .r { text-align: right; font-size: 13px; color: var(--ink-2); white-space: nowrap; display: grid; justify-items: end; gap: 3px; letter-spacing: 0; }
.wiersz .chev { width: 16px; height: 16px; color: var(--ink-3); stroke-width: 2.2; margin-right: -4px; }
.pusto { padding: 26px 18px; text-align: center; color: var(--ink-2); background: var(--paper); border-radius: var(--r-card); margin-bottom: 14px; font-size: 15px; }
.pusto .ik { width: 30px; height: 30px; margin: 0 auto 8px; display: block; color: var(--ink-3); }
.pusto .btn { margin-top: 12px; }
.chk { width: 44px; height: 44px; margin: -10px -6px -10px -12px; display: grid; place-items: center; flex: none; }
.chk i { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1.6px var(--line); display: grid; place-items: center; color: transparent;
  transition: background-color .18s ease, box-shadow .18s ease, transform .12s var(--ease-out); }
.chk:active i { transform: scale(.88); }
.chk.on i { background: var(--ink); box-shadow: none; color: var(--paper); }
.chk i .ik { width: 14px; height: 14px; stroke-width: 2.6; }
.zalegle { color: var(--err); }

/* plakietki */
.pl { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; letter-spacing: 0; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--mist-2); color: var(--ink); white-space: nowrap; line-height: 1.2; }
.pl.ok { background: var(--ok-bg); color: var(--ok); }
.pl.warn { background: var(--warn-bg); color: var(--warn); }
.pl.err { background: var(--err-bg); color: var(--err); }
.pl.nowy { background: var(--amber); color: #000; }
.pl.szklo { background: rgba(0, 0, 0, .42); color: #fff; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.pl .kropka { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* liczby na Dziś */
.liczby { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
@media (min-width: 700px) { .liczby { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.liczba { background: var(--paper); border-radius: var(--r-card); padding: 14px 16px; transition: transform .12s var(--ease-out); }
.liczba:active { transform: scale(.98); }
.liczba b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.liczba span { color: var(--ink-2); font-size: 13px; letter-spacing: -.006em; }
.dwie { display: grid; gap: 0 18px; }
.dwie > * { min-width: 0; }
@media (min-width: 900px) { .dwie { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

/* segmenty (filtry) */
.filtry { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.seg { display: inline-flex; background: var(--mist-2); border-radius: var(--r-pill); padding: 3px; gap: 2px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button, .seg a { padding: 9px 14px; border-radius: var(--r-pill); font-size: 14px; white-space: nowrap; letter-spacing: -.01em; color: var(--ink);
  transition: background-color .16s ease, transform .12s var(--ease-out); }
.seg button:active, .seg a:active { transform: scale(.96); }
.seg .on { background: var(--paper); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
.szukaj { position: relative; flex: 1 1 220px; min-width: 0; }
.szukaj .ik { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }
.szukaj input { padding-left: 36px; background: var(--paper); }

/* ---------- kafle ofert (jak .lux na stronie) ---------- */
.kafle { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.kafel { position: relative; display: block; border-radius: var(--r-tile); overflow: hidden; background: #111; color: #fff; isolation: isolate;
  aspect-ratio: 4 / 3; transition: transform .12s var(--ease-out); }
.kafel:active { transform: scale(.98); }
.kafel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .9s var(--ease-out); }
.kafel::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 30%, rgba(0,0,0,.42) 55%, rgba(0,0,0,.86) 100%); }
.kafel.bez-zdj { background: var(--night-2); }
.kafel.bez-zdj .brak { position: absolute; inset: 0 0 40%; display: grid; place-items: center; color: #8e8e93; font-size: 13px; z-index: -1; text-align: center; }
.kafel.bez-zdj .brak .ik { width: 30px; height: 30px; margin: 0 auto 6px; display: block; }
.kafel .tagi { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.kafel .tagi .p { margin-left: auto; }
.kafel .tresc { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px; display: grid; gap: 3px; }
.kafel .tresc small { color: rgba(255, 255, 255, .78); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.006em; }
.kafel .tresc b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.18; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.kafel .cena { font-size: 17px; font-weight: 600; letter-spacing: -.014em; margin-top: 2px; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .kafel:hover img { transform: scale(1.025); } }

/* ---------- formularze ---------- */
.pole { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); letter-spacing: -.006em; min-width: 0; }
input, select, textarea { font: inherit; font-size: 17px; letter-spacing: -.022em; color: var(--ink); background-color: var(--pole); border: 0; border-radius: var(--r-field);
  padding: 11px 14px; width: 100%; min-height: 46px; outline: none; transition: box-shadow .16s ease; -webkit-appearance: none; appearance: none; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px; }
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 2px var(--acc); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
input[type=radio] { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: 50%; flex: none; cursor: pointer;
  background: var(--paper); box-shadow: inset 0 0 0 1.6px var(--line); transition: box-shadow .16s var(--ease-out); }
input[type=radio]:checked { box-shadow: inset 0 0 0 7px var(--acc); }
input[type=radio]:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
input[type=radio]:disabled { opacity: .5; cursor: default; }
textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
input[type=date], input[type=time] { min-width: 0; }
.przelacznik { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--pole); border-radius: var(--r-field); color: var(--ink); font-size: 15px; cursor: pointer; position: relative; }
.przelacznik input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; }
.przelacznik i { width: 51px; height: 31px; border-radius: 16px; background: var(--line); position: relative; flex: none; transition: background-color .2s ease; }
.przelacznik i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18); transition: transform .26s var(--ease-out); }
.przelacznik input:checked + i { background: var(--ok); }
.przelacznik input:checked + i::after { transform: translateX(20px); }
.przelacznik input:focus-visible + i { outline: 2px solid var(--acc); outline-offset: 2px; }
.przelacznik span { flex: 1; min-width: 0; }
.siatka { display: grid; gap: 14px; }
.siatka > * { min-width: 0; }
@media (min-width: 600px) { .siatka.dwa { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .siatka .cale { grid-column: 1 / -1; } }

/* edytor oferty */
.edytor { display: grid; gap: 0 20px; }
.edytor > * { min-width: 0; }
@media (min-width: 1000px) { .edytor { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .edytor .strona { position: sticky; top: calc(var(--gora) + 16px); } }
@media (max-width: 999px) { .edytor .strona { order: -1; } }
.zdjecia { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 150px), 1fr)); gap: 10px; }
.zd { position: relative; border-radius: 14px; overflow: hidden; background: var(--mist); aspect-ratio: 4 / 3; }
.zd img { width: 100%; height: 100%; object-fit: cover; }
.zd .nr { position: absolute; top: 8px; left: 8px; }
.zd .akcje { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; justify-content: space-between; gap: 4px; }
.zd .akcje button { width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; display: grid; place-items: center;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform .12s var(--ease-out); }
.zd .akcje button:active { transform: scale(.9); }
.zd .akcje button[disabled] { opacity: .3; }
.zd .akcje button.on { background: #fff; color: #000; }
.zd .akcje .ik { width: 16px; height: 16px; stroke-width: 2.1; }
.dodaj-zdj { border-radius: 14px; aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; color: var(--ink-2); font-size: 14px; padding: 8px;
  background: var(--mist); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; transition: transform .12s var(--ease-out); }
.dodaj-zdj:active { transform: scale(.97); }
.dodaj-zdj .ik { width: 26px; height: 26px; margin: 0 auto 4px; display: block; }
.dodaj-zdj input { display: none; }

/* panel „Strona www” */
.strona-www { border-radius: var(--r-card); padding: 18px; margin-bottom: 14px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.strona-www.na_stronie { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 55%, transparent); }
.strona-www.zmiany, .strona-www.plakietka { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--warn) 55%, transparent); }
.strona-www .stan { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 600; letter-spacing: -.012em; margin: 4px 0 4px; }
.strona-www .stan i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); flex: none; }
.strona-www.na_stronie .stan i { background: var(--ok); }
.strona-www.zmiany .stan i, .strona-www.plakietka .stan i { background: var(--warn); }
.strona-www .opis { color: var(--ink-2); font-size: 14px; margin: 0; }
.strona-www .zobacz { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 15px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.strona-www .zobacz .ik { width: 15px; height: 15px; }
.strona-www .przyciski { display: grid; gap: 8px; margin-top: 14px; }
.strona-www .przyciski .btn:not(.glowny):not(.zle) { background: var(--mist-2); }
.komunikat { border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-top: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.komunikat.err { background: var(--err-bg); color: var(--err); }
.komunikat.info { background: var(--mist); color: var(--ink-2); }
.historia { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line-2); display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); letter-spacing: 0; }
.historia .zle { color: var(--err); }
.zapisz-pasek { position: sticky; bottom: calc(var(--pasek) + var(--bot) + 18px); z-index: 20; display: flex; justify-content: center; pointer-events: none;
  margin: -6px 0 12px; opacity: 0; transform: translateY(12px); transition: opacity .2s var(--ease-out), transform .2s var(--ease-out); }
.zapisz-pasek.on { opacity: 1; transform: none; }
.zapisz-pasek.on .btn { pointer-events: auto; }
.zapisz-pasek .btn { box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
@media (min-width: 900px) { .zapisz-pasek { bottom: 24px; } }

/* szczegóły zapytania / klienta */
.kontakt { display: flex; gap: 8px; flex-wrap: wrap; }
.kontakt .btn { flex: 1 1 auto; }
.kontakt .btn { background: var(--mist-2); }
.kontakt .btn.glowny { background: var(--acc); }
.dane { margin: 12px 0 0; display: grid; gap: 2px; font-size: 15px; overflow-wrap: anywhere; }
.etapy { display: flex; flex-wrap: wrap; gap: 6px; }
.etapy button { padding: 8px 14px; border-radius: var(--r-pill); background: var(--mist-2); font-size: 14px; letter-spacing: -.01em;
  transition: background-color .16s ease, color .16s ease, transform .12s var(--ease-out); }
.etapy button:active { transform: scale(.96); }
.etapy button.on { background: var(--acc); color: var(--on-acc); font-weight: 600; }
.notka { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px 14px; background: var(--mist); border-radius: 14px; margin-top: 10px; font-size: 15px; line-height: 1.45; }
.notka small { display: block; margin-top: 6px; color: var(--ink-2); font-size: 12px; letter-spacing: 0; }
.formka { display: grid; gap: 10px; }

/* zespół */
.osoba .awatar { width: 40px; height: 40px; font-size: 14px; }
.osoba.wyl .t, .osoba.wyl .awatar { opacity: .5; }
.link-pole { display: flex; gap: 8px; align-items: stretch; margin-top: 8px; }
.link-pole input { font-size: 14px; min-height: 44px; }

/* ---------- arkusze (wzór NL: od dołu na telefonie, okno na komputerze) ---------- */
.zaslona { position: fixed; inset: 0; z-index: 60; background: var(--scrim); opacity: 0; transition: opacity .22s ease; }
.zaslona.on { opacity: 1; }
.ark { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 92svh; display: flex; flex-direction: column; background: var(--paper);
  border-radius: var(--r-tile) var(--r-tile) 0 0; transform: translateY(105%); transition: transform .24s var(--ease-drawer); will-change: transform; }
.ark.on { transform: none; transition-duration: .34s; } /* wejście spokojniej, wyjście szybciej */
.ark .uchwyt { width: 36px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; flex: none; }
.ark .glowa { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px; flex: none; }
.ark .glowa h2 { flex: 1; margin: 0; text-align: center; font-size: 17px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ark .glowa .zamknij { min-width: 76px; min-height: 44px; padding: 0 10px; font-size: 17px; color: var(--ink-2); text-align: left; }
.ark .glowa .miejsce { min-width: 76px; }
.ark .cialo { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 6px 18px calc(22px + var(--bot)); flex: 1; }
.ark .cialo .opis-ark { color: var(--ink-2); font-size: 15px; margin: 0 0 14px; }
@media (min-width: 700px) {
  .ark { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, 92vw); max-height: 86vh; border-radius: var(--r-tile);
    transform: translate(-50%, -50%) scale(.96); opacity: 0; transition: transform .15s var(--ease-out), opacity .15s var(--ease-out); }
  .ark.on { transform: translate(-50%, -50%); opacity: 1; transition-duration: .22s; }
  .ark .uchwyt { display: none; }
  .ark .glowa { padding-top: 12px; }
}

/* ---------- przejścia ekranów (wzór NL: zdjęcie starego ekranu + sprężyna) ---------- */
.zdjecie-ekranu { position: fixed; z-index: 25; background: var(--mist); pointer-events: none; will-change: transform; overflow: hidden; }
.widok.wjazd { will-change: transform; position: relative; z-index: 26; background: var(--mist); }
.widok.wjazd.dalej { box-shadow: -10px 0 30px rgba(0, 0, 0, .06); }
.zdjecie-ekranu.wstecz { z-index: 27; box-shadow: -10px 0 30px rgba(0, 0, 0, .06); }

/* ---------- toast z „Cofnij” ---------- */
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--pasek) + 22px + var(--bot)); transform: translate(-50%, 14px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: var(--r-pill);
  background: var(--night-2); color: #f5f5f7; font-size: 15px; letter-spacing: -.01em; box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
  transition: transform .22s var(--ease-out), opacity .22s var(--ease-out); }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast.err { background: var(--err); color: #fff; }
.toast.err span { white-space: normal; }
.toast button { color: var(--amber); font-weight: 600; white-space: nowrap; min-height: 32px; }
@media (min-width: 900px) { .toast { bottom: 28px; left: calc(50% + var(--bok) / 2); } }

/* ---------- ładowanie ---------- */
.szkielet { background: var(--paper); border-radius: var(--r-card); height: 76px; margin-bottom: 10px; position: relative; overflow: hidden; }
.szkielet::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--mist) 70%, transparent), transparent); animation: blysk 1.2s ease-in-out infinite; }
@keyframes blysk { to { transform: translateX(100%); } }

/* ---------- dostępność ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .zaslona, .toast, .zapisz-pasek { transition: opacity .2s ease !important; }
  .ark, .ark.on { transform: none !important; }
  .ark { opacity: 0; transition: opacity .2s ease !important; }
  .ark.on { opacity: 1; }
  .toast, .toast.on { transform: translate(-50%, 0); }
  .zapisz-pasek { transform: none; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 700px) { .ark, .ark.on { transform: translate(-50%, -50%) !important; } }
@media (prefers-reduced-transparency: reduce) {
  .gora, .pasek, .bok { background: var(--mist); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .pl.szklo, .zd .akcje button { background: rgba(0, 0, 0, .72); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) { :root { --line: #8e8e93; --line-2: #aeaeb2; --ink-2: #48484a; } }

/* pociągnij, aby odświeżyć (ruch.js, jak w NL) */
.ptr { position: fixed; left: 50%; top: 0; z-index: 29; width: 32px; height: 32px; border-radius: 50%; background: var(--paper); box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
  opacity: 0; pointer-events: none; transform: translate(-50%, -20px); display: grid; place-items: center; }
.ptr i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink-3); border-top-color: transparent; }
.ptr.gotowe i, .ptr.kreci i { border-color: var(--acc); border-top-color: transparent; }
.ptr.kreci i { animation: ptrKrec .7s linear infinite; }
@keyframes ptrKrec { to { transform: rotate(360deg); } }
.pole .wiersz { color: var(--ink); font-size: 16px; }

/* ---------- własność, kolejka „Nowe”, szybkie dodawanie (09.11, odpowiedzi SKiL) ---------- */
/* chipy: jeden dotyk zamiast listy (źródło klienta, rynek); 44 px celu dotyku */
.chipy { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px; border-radius: var(--r-pill); background: var(--pole);
  color: var(--ink); font-size: 15px; letter-spacing: -.012em; transition: transform .12s var(--ease-out), background-color .16s ease; }
.chip:active span { transform: scale(.96); }
.chip input:checked + span { background: var(--acc); color: var(--on-acc); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
details.wiecej summary { cursor: pointer; color: var(--ink-2); font-size: 15px; padding: 8px 2px; list-style: none; min-height: 44px; display: flex; align-items: center; gap: 6px; }
details.wiecej summary::-webkit-details-marker { display: none; }
details.wiecej summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--mist-2); color: var(--ink); font-weight: 600; }
details.wiecej[open] summary::before { content: "–"; }
details.wiecej > .formka { padding-top: 4px; }

/* wiersz kolejki: treść + czas + „Biorę” */
.wiersz.kolejka .btn { flex: none; min-height: 40px; padding: 0 16px; }
.wiersz.kolejka .r { align-self: center; }
@media (max-width: 420px) { .wiersz.kolejka .r { display: none; } }
.biore-karta .stan-kolejki { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.biore-karta .stan-kolejki .ik { width: 28px; height: 28px; flex: none; color: var(--amber); stroke-width: 1.8; }
.biore-karta .stan-kolejki b { display: block; font-size: 17px; letter-spacing: -.016em; }
.biore-karta .stan-kolejki span { display: block; color: var(--ink-2); font-size: 14px; margin-top: 2px; }

/* licznik leadów z reklam */
.karta.reklamy { display: grid; gap: 10px; }
.karta.reklamy > h2:first-child { margin-bottom: 4px; }
.rek-wiersz { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: 8px; align-items: baseline; font-size: 13px; color: var(--ink-2); }
.rek-wiersz b { color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: -.012em; }
.rek-wiersz em { font-style: normal; color: var(--ink); font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-right: 3px; }
.rek-wiersz .czeka em { color: var(--warn); }
@media (max-width: 420px) { .rek-wiersz { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rek-wiersz b { grid-column: 1 / -1; } }

/* opiekun i przekazanie */
.opiekun-wiersz { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 15px; }
.opiekun-wiersz span { min-width: 0; overflow-wrap: anywhere; }
.akcje-naglowka { display: flex; gap: 8px; flex-basis: 100%; }
.btn.male .ik { width: 16px; height: 16px; }
.kafel .tresc small.kto { color: rgba(255, 255, 255, .92); font-weight: 500; }

/* oferta innego agenta: tylko do odczytu */
.tylko-odczyt input:disabled, .tylko-odczyt select:disabled, .tylko-odczyt textarea:disabled { opacity: 1; color: var(--ink); -webkit-text-fill-color: var(--ink); background-image: none; cursor: default; }
.tylko-odczyt .przelacznik { cursor: default; }
.chk[disabled] { opacity: .35; pointer-events: none; }
/* komunikat: szerokość z treści (a nie z połowy ekranu), dłuższy błąd zawija się w zaokrąglonym prostokącie */
.toast { width: max-content; }
.toast span { min-width: 0; }
.toast.err { border-radius: 20px; }
@media (min-width: 900px) { .toast { max-width: min(560px, calc(100vw - var(--bok) - 48px)); } }
.opiekun-wiersz .btn, .karta .akcje-naglowka .btn { background: var(--mist-2); }
.akcje-naglowka .btn { background: var(--paper); }
.komunikat.odczyt { display: flex; gap: 10px; align-items: center; background: var(--paper); margin: 0 0 14px; color: var(--ink-2); }
.komunikat.odczyt .ik { width: 20px; height: 20px; flex: none; }
/* materiały partnerów: przycisk przy inwestycji (otwiera folder Dropbox w nowej karcie) */
.btn.materialy, .btn.pdf-btn { background: var(--paper); }
.btn.materialy .ik:last-child { width: 14px; height: 14px; opacity: .6; }
.akcje-naglowka.pod-naglowkiem { margin: -6px 0 16px; }

/* ofertownik PDF */
.pdf-gotowy { display: flex; gap: 12px; align-items: center; padding: 4px 2px 18px; }
.pdf-gotowy > .ik { width: 34px; height: 34px; flex: none; }
.pdf-gotowy b { display: block; font-size: 16px; overflow-wrap: anywhere; }
.pdf-gotowy small { color: var(--ink-2); font-size: 13px; }
.zest-glowa { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; font-size: 15px; }
.zest-lista { max-height: 42vh; overflow-y: auto; overscroll-behavior: contain; margin: 0; }
.zest-wiersz { cursor: pointer; min-height: 56px; }
.zest-wiersz input[type=checkbox] { width: 22px; height: 22px; min-height: 0; padding: 0; flex: none; accent-color: var(--acc); }
.naglowek > .btn.male { align-self: center; }
.akcje-naglowka { flex-wrap: wrap; }
.zest-wiersz input[type=checkbox] { -webkit-appearance: checkbox; appearance: auto; background: none; border-radius: 4px; }
.zest-filtry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.zest-filtry .cale { grid-column: 1 / -1; }
#f-zest #z-utworz { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 2; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }

/* materiały dewelopera (pliki w CRM) */
.materialy-karta h2 { margin-bottom: 12px; }
.mat-grupa { border-top: 1px solid var(--line-2); }
.mat-grupa summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 48px; cursor: pointer; font-size: 16px; }
.mat-grupa summary::-webkit-details-marker { display: none; }
.mat-grupa summary span { color: var(--ink-2); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.mat-grupa summary span::after { content: ""; width: 8px; height: 8px; border-right: 1.8px solid var(--ink-3); border-bottom: 1.8px solid var(--ink-3); transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease-out); }
.mat-grupa[open] summary span::after { transform: rotate(-135deg) translateY(-2px); }
.mat-lista { background: var(--mist); margin: 0 0 12px; }
.mat-lista.zwiniete .wiersz:nth-child(n+9) { display: none; }
.wiersz.plik { padding: 0 6px 0 0; min-height: 56px; }
.wiersz.plik > a.t { display: flex; align-items: center; gap: 12px; padding: 10px 0 10px 14px; min-width: 0; }
.wiersz.plik .typ { flex: none; width: 38px; height: 38px; border-radius: 9px; background: var(--paper); display: grid; place-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2); }
.wiersz.plik .opis-pliku { min-width: 0; display: block; }
.wiersz.plik .opis-pliku b { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiersz.plik .opis-pliku small { display: block; color: var(--ink-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usun-plik { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink-3); border-radius: 50%; }
.usun-plik .ik { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) { .usun-plik:hover { color: var(--err); background: var(--err-bg); } }
.mat-siatka { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(30%, 120px), 1fr)); gap: 6px; margin: 0 0 12px; }
.mat-siatka.zwiniete .mat-foto:nth-child(n+13) { display: none; }
.mat-foto { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--mist); display: block; transition: transform .12s var(--ease-out); }
.mat-foto:active { transform: scale(.97); }
.mat-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pokaz-wszystkie { margin: -4px 0 12px; font-size: 14px; }
.wiersz.dropbox { border-top: 1px solid var(--line-2); padding-left: 2px; padding-right: 2px; border-radius: 0; }
.dodaj-plik { margin-top: 12px; position: relative; }
.dodaj-plik input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
#materialy { scroll-margin-top: calc(var(--gora) + var(--top) + 12px); }

/* zgłoszenia od właścicieli */
.pl.wl { background: var(--acc); color: var(--on-acc); padding: 2px 8px; margin-right: 8px; font-size: 11px; vertical-align: 2px; }
.zgl-fakty { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; }
.zgl-fakty .cale { grid-column: 1 / -1; }
.zgl-fakty small { display: block; color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.zgl-fakty b { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.zgl-zdjecia { margin: 16px 0 0; }

/* punkt na mapie (ofertownik PDF) */
.pole.geo > span:first-child { font-size: 13px; color: var(--ink-2); }
.geo-wiersz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.geo-opis { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.geo-akcje { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
