/* CMS Peter Gain: tokeny shadcn/ui (styl Nova, paleta neutral), kroje Geist */
/* Geist i Geist Mono z własnego serwera (licencja OFL w fonts/OFL.txt) */
@font-face { font-family: "Geist"; src: url("fonts/geist-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bebas Neue"; src: url("fonts/bebas-neue-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1E9F; }
:root {
  --background: #ffffff;
  --foreground: #0a0a0a;
  --card: #ffffff;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --border: #e5e5e5;
  --input: #e5e5e5;
  --primary: #171717;
  --primary-foreground: #fafafa;
  --accent: #f5f5f5;
  --destructive: #e7000b;
  --ring: #a1a1a1;
  --sidebar: #fafafa;
  --chart-muted: #e5e5e5;
  --green-bg: #dcfce7; --green-fg: #166534;
  --yellow-bg: #fef9c3; --yellow-fg: #854d0e;
  --blue-bg: #dbeafe; --blue-fg: #1e40af;
  --red-bg: #fee2e2; --red-fg: #991b1b;
  --purple-bg: #f3e8ff; --purple-fg: #6b21a8;
  --neutral-bg: #f5f5f5; --neutral-fg: #404040;
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 10px; --radius-xl: 14px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --font: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #0a0a0a; --foreground: #fafafa; --card: #141414; --muted: #262626; --muted-foreground: #a1a1a1;
    --border: #2a2a2a; --input: #333; --primary: #e5e5e5; --primary-foreground: #171717; --accent: #262626;
    --destructive: #ff6467; --sidebar: #111111; --chart-muted: #3a3a3a;
    --green-bg: #052e16; --green-fg: #86efac; --yellow-bg: #3a2a05; --yellow-fg: #fde047; --blue-bg: #172554; --blue-fg: #93c5fd;
    --red-bg: #450a0a; --red-fg: #fca5a5; --purple-bg: #3b0764; --purple-fg: #d8b4fe; --neutral-bg: #262626; --neutral-fg: #d4d4d4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --background: #0a0a0a; --foreground: #fafafa; --card: #141414; --muted: #262626; --muted-foreground: #a1a1a1;
  --border: #2a2a2a; --input: #333; --primary: #e5e5e5; --primary-foreground: #171717; --accent: #262626;
  --destructive: #ff6467; --sidebar: #111111; --chart-muted: #3a3a3a;
  --green-bg: #052e16; --green-fg: #86efac; --yellow-bg: #3a2a05; --yellow-fg: #fde047; --blue-bg: #172554; --blue-fg: #93c5fd;
  --red-bg: #450a0a; --red-fg: #fca5a5; --purple-bg: #3b0764; --purple-fg: #d8b4fe; --neutral-bg: #262626; --neutral-fg: #d4d4d4;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--background); color: var(--foreground); font-family: var(--font); font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted-foreground); }
.mono { font-family: var(--mono); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }

/* układ */
.app { display: grid; grid-template-columns: 255px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px; padding: 16px; background: var(--sidebar); border-right: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.logo { width: 32px; height: 32px; border-radius: var(--radius-md); background: var(--primary); color: var(--primary-foreground); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.brand b { display: block; font-weight: 500; }
.brand small, .user small { display: block; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted-foreground); padding: 0 8px 6px; }
.nav a { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: var(--radius-md); }
.nav a:hover { background: var(--accent); }
.nav a.active { background: var(--accent); font-weight: 500; }
.nav a .count { margin-left: auto; font-size: 12px; color: var(--muted-foreground); }
.nav a .nav-demo { margin-left: auto; height: 18px; padding: 0 6px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--muted); border: 1px solid var(--border); color: var(--muted-foreground); font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.sidebar .grow { flex: 1; }
.user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-md); }
.user b { display: block; font-weight: 500; }
.snapshot { font-size: 12px; line-height: 16px; color: var(--muted-foreground); padding: 10px 12px; border: 1px dashed var(--border); border-radius: var(--radius-md); }

.topbar { position: sticky; top: 0; z-index: 5; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--background) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.crumbs { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.crumbs a { color: var(--muted-foreground); }
.crumbs a:hover { color: var(--foreground); }
.crumbs span:last-child { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vsep { width: 1px; height: 16px; background: var(--border); }
.search { position: relative; width: 300px; }
.search > svg { position: absolute; left: 10px; top: 10px; color: var(--muted-foreground); }
.input { width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--input); border-radius: var(--radius-md); background: var(--background); color: var(--foreground); font: inherit; box-shadow: var(--shadow-xs); }
.search .input { padding-left: 32px; }
.input:focus-visible, .btn:focus-visible, a:focus-visible, .tab:focus-visible, .row-link:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.results { position: absolute; top: 42px; left: 0; right: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 6px; max-height: 380px; overflow: auto; }
.results a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); }
.results a:hover, .results a.sel { background: var(--accent); }
.results .kind { margin-left: auto; font-size: 12px; color: var(--muted-foreground); }

.content { --pad: 32px; container-type: inline-size; padding: 28px var(--pad) 48px; display: flex; flex-direction: column; gap: 24px; max-width: 1400px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.page-head > div:first-child { flex: 1; min-width: 240px; }
h1 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.4px; margin: 0 0 4px; }
h2 { font-size: 16px; line-height: 24px; font-weight: 600; margin: 0; }
p { margin: 0; }

/* elementy */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--radius-md); border: 1px solid transparent; font-weight: 500; cursor: pointer; white-space: nowrap; background: none; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { opacity: .9; }
.btn-outline { border-color: var(--border); background: var(--background); box-shadow: var(--shadow-xs); }
.btn-outline:hover, .btn-ghost:hover { background: var(--accent); }
.btn-sm { height: 32px; padding: 0 10px; }
.btn-icon { width: 36px; padding: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.b-green { background: var(--green-bg); color: var(--green-fg); }
.b-yellow { background: var(--yellow-bg); color: var(--yellow-fg); }
.b-blue { background: var(--blue-bg); color: var(--blue-fg); }
.b-red { background: var(--red-bg); color: var(--red-fg); }
.b-purple { background: var(--purple-bg); color: var(--purple-fg); }
.b-outline { border: 1px solid var(--border); color: var(--foreground); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 500; flex: none; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.progress { height: 6px; border-radius: 999px; background: var(--muted); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: #4ea36a; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; box-shadow: var(--shadow-xs); }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-head > div:first-child { flex: 1; min-width: 0; }
.card-head p { color: var(--muted-foreground); margin-top: 2px; }
.card.flush { padding: 0; gap: 0; }
.card.flush .card-head { padding: 20px 24px 16px; }

.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { gap: 6px; padding: 20px; }
.stat .top { display: flex; align-items: center; justify-content: space-between; color: var(--muted-foreground); font-weight: 500; }
.stat .val { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.6px; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.split { grid-template-columns: minmax(0, 1fr) 400px; align-items: stretch; }
.card > .chart-wrap { margin-top: 12px; flex: 1; display: flex; flex-direction: column; }
.chart-wrap .chart { flex: 1; height: auto; min-height: 260px; }
.more { font-size: 12px; color: var(--muted-foreground); }
.more:hover { color: var(--foreground); }
.halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* zakładki i filtry */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--muted); border-radius: var(--radius-lg); flex-wrap: wrap; }
.tab { height: 30px; padding: 0 10px; border: 0; border-radius: var(--radius-md); background: none; color: var(--muted-foreground); font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tab.on { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-xs); }
.tab .c { font-size: 12px; color: var(--muted-foreground); }
.toolbar .input { width: 240px; }
.toolbar .spacer { flex: 1; }

/* tabele */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted-foreground); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
th.r, td.r { text-align: right; }
/* ostatnia kolumna tabeli dosunięta do prawej krawędzi karty, tak jak przyciski nad nią */
.nowrap th:last-child, .nowrap td:last-child { text-align: right; }
td.r, td.nw, .nowrap td:not(:first-child) { white-space: nowrap; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: color-mix(in srgb, var(--muted) 60%, transparent); }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-main b { font-weight: 500; display: block; }
.cell-main small { display: block; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.late { color: var(--destructive); }
.empty { padding: 32px 16px; text-align: center; color: var(--muted-foreground); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty b { color: var(--foreground); font-weight: 500; }
.empty-box { background: var(--muted); border-radius: var(--radius-lg); }

/* listy */
.list > * { padding: 10px 0; border-bottom: 1px solid var(--border); }
.list > *:last-child { border-bottom: 0; }
.li { display: flex; align-items: center; gap: 12px; }
.li .grow { flex: 1; min-width: 0; }
.li .grow b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .grow small { display: block; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.li .end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.li .end b { font-weight: 500; }

/* wykres */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 260px; flex: none; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.bar-col .lbl { font-size: 12px; line-height: 16px; color: var(--muted-foreground); white-space: nowrap; }
.bar-col .v { font-size: 11px; line-height: 14px; color: var(--muted-foreground); white-space: nowrap; }
.bars { width: 100%; max-width: 40px; display: flex; flex-direction: column; justify-content: flex-end; flex: 1; }
.bars i { display: block; width: 100%; background: var(--primary); }
.bars i.pend { background: var(--chart-muted); }
.bars i.cost { background: var(--destructive); opacity: .55; }
.bars i:first-child { border-radius: 6px 6px 0 0; }
.bar-col.sel .lbl { color: var(--foreground); font-weight: 600; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted-foreground); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--primary); }
.legend i.pend { background: var(--chart-muted); }

/* karty projektów */
.cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pcard { gap: 12px; cursor: pointer; transition: border-color .15s; }
.pcard:hover { border-color: var(--ring); }
.pcard .row { display: flex; align-items: center; gap: 8px; }
.pcard .row .grow { flex: 1; min-width: 0; }
.pcard h3 { font-size: 14px; line-height: 20px; font-weight: 600; margin: 0; }
.pcard .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted-foreground); }

/* tablica zadań */
.board { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.col { background: var(--muted); border-radius: var(--radius-xl); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 6px; font-weight: 500; }
.col-head .c { color: var(--muted-foreground); font-weight: 400; }
.task { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; box-shadow: var(--shadow-xs); }
.task .chk { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--ring); flex: none; margin-top: 1px; cursor: pointer; background: none; padding: 0; display: grid; place-items: center; }
.task.done .chk { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.task.done .chk svg { width: 12px; height: 12px; stroke-width: 3; }
.task.done .t { color: var(--muted-foreground); text-decoration: line-through; }
.task .t { flex: 1; }
.task small { display: block; font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.task .mv { opacity: 0; border: 0; background: none; cursor: pointer; color: var(--muted-foreground); padding: 0; }
.task:hover .mv { opacity: 1; }
.add-task { display: flex; gap: 6px; }
.add-task .input { height: 32px; }
.hidden-note { font-size: 12px; line-height: 16px; color: var(--muted-foreground); padding: 4px; }

/* karta klienta */
.profile { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile .info { flex: 1; min-width: 240px; }
.contact { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted-foreground); margin-top: 6px; }
.contact span, .contact a { display: inline-flex; align-items: center; gap: 6px; }
.contact a:hover { color: var(--foreground); }
.note { background: var(--muted); border-radius: var(--radius-lg); padding: 12px 14px; color: var(--foreground); }

/* panel boczny */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; animation: fade .15s; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--background); border-left: 1px solid var(--border); z-index: 21; display: flex; flex-direction: column; animation: slide .2s ease-out; }
.sheet-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; }
.sheet-head > div { flex: 1; }
.sheet-body { padding: 20px 24px; overflow: auto; display: flex; flex-direction: column; gap: 18px; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 10px 12px; }
.dl dt { color: var(--muted-foreground); }
.dl dd { margin: 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }

.menu-btn { display: none; }
.scrim { display: none; }

@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 30; width: 270px; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 29; }
  .menu-btn { display: inline-flex; }
  .search { width: auto; flex: 0 1 220px; }
  .halves, .board { grid-template-columns: minmax(0, 1fr); }
  .content { --pad: 16px; padding: 20px var(--pad) 40px; }
  .topbar { padding: 0 16px; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .search { display: none; }
  .toolbar .input { width: 100%; }
  .card { padding: 16px; }
  .card.flush .card-head { padding: 16px; }
  th:first-child, td:first-child { padding-left: 16px; }
  th:last-child, td:last-child { padding-right: 16px; }
  .chart { gap: 4px; }
  .bar-col .v { display: none; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
}

/* pomocnicze (zamiast stylów w kodzie HTML, których nie wpuszcza polityka bezpieczeństwa) */
.back { align-self: flex-start; }
.li-col { flex-direction: column; align-items: stretch; gap: 8px; }
.fw5 { font-weight: 500; }
.m0 { margin: 0; }
.pad-x { padding: 0 24px 20px; }
.month-label { min-width: 150px; text-align: center; font-weight: 600; }
.sidebar .user { gap: 10px; }
.sidebar .user > .who { flex: 1; min-width: 0; text-align: left; }

/* logowanie */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--muted); }
.login .card { width: min(380px, 100%); padding: 28px; gap: 18px; }
.login .brand { padding: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 500; }
.field small { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.check { display: flex; align-items: center; gap: 8px; color: var(--muted-foreground); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.err { color: var(--destructive); background: color-mix(in srgb, var(--destructive) 8%, transparent); border-radius: var(--radius-md); padding: 8px 12px; }
.err:empty { display: none; }
textarea.input { height: auto; min-height: 96px; padding: 8px 12px; resize: vertical; }
select.input { -webkit-appearance: none; appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form-actions { display: flex; gap: 8px; align-items: center; padding-top: 4px; }
.form-actions .spacer { flex: 1; }
.btn-danger { color: var(--destructive); }
.btn-danger.armed { background: var(--destructive); color: #fff; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--primary-foreground); padding: 10px 16px; border-radius: var(--radius-lg); z-index: 40; box-shadow: 0 8px 24px rgba(0,0,0,.15); animation: fade .15s; }
.task .t { cursor: pointer; }
.task .t:hover { text-decoration: underline; text-decoration-color: var(--ring); }
.li.clickable { cursor: pointer; }
.li.clickable:hover b { text-decoration: underline; text-decoration-color: var(--ring); }

/* kod logowania i zaproszenie */
.code-input { font-family: var(--mono); font-size: 18px; letter-spacing: 4px; height: 44px; text-align: center; }
.qr { width: 184px; height: 184px; padding: 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); align-self: center; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr rect { fill: #000; }
.key { text-align: center; font-size: 14px; letter-spacing: 1px; background: var(--muted); border-radius: var(--radius-md); padding: 8px; word-break: break-all; user-select: all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--muted); border-radius: var(--radius-lg); padding: 12px; font-size: 14px; text-align: center; user-select: all; }

/* znak firmy: SVG jako maska, więc kolor idzie z motywu */
.brand { justify-content: flex-start; gap: 8px; align-items: center; }
.wordmark { display: block; width: 132px; height: 17px; background: var(--foreground); -webkit-mask: url("logo-petergain.svg") left center / contain no-repeat; mask: url("logo-petergain.svg") left center / contain no-repeat; }
/* napis CMS przy logo: wysoki krój Bebas Neue, przy prawej górnej krawędzi logo, z małym odstępem */
.brand-tag { align-self: flex-start; margin: -1px 0 0 -4px; font-family: "Bebas Neue", Geist, sans-serif; font-size: 15px; line-height: 1; font-weight: 400; letter-spacing: .05em; color: var(--muted-foreground); }
.login .brand { padding: 0; }

/* ---------- edytor oferty ---------- */
.ed-page { max-width: 760px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 4px; }
.ed-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ed-top .spacer { flex: 1; }
.ed-save { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }
.ed-save.blad { color: var(--destructive); }
.ed-cover { position: relative; height: 260px; border-radius: 0; overflow: hidden; background: var(--muted); margin: 0 0 0 calc(50% - 50cqw - var(--pad)); width: calc(100cqw + 2 * var(--pad)); max-width: none; }
.ed-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-cover-ctl { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.ed-cover:hover .ed-cover-ctl, .ed-cover:focus-within .ed-cover-ctl { opacity: 1; }
.ed-addcover { align-self: flex-start; }
.ed-title { font-size: 40px; line-height: 1.15; font-weight: 700; letter-spacing: -.8px; outline: none; margin: 0 0 24px; overflow-wrap: anywhere; }
.ed-title:empty::before { content: attr(data-ph); color: var(--muted-foreground); }
.ed-meta { color: var(--muted-foreground); padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.ed-szablony { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 520px; gap: 10px; margin: 6px 0 14px; }
.ed-szablon { text-align: left; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 14px; background: var(--card); cursor: pointer; font: inherit; color: inherit; }
.ed-szablon:hover { border-color: var(--ring); }
.ed-szablon b { display: block; font-weight: 600; margin-bottom: 2px; }
.ed-szablon small { display: block; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.ed-wrap { position: relative; padding-left: 56px; margin-left: -56px; }
.ed-doc .eb { position: relative; }
.eb-tools { position: absolute; left: -52px; top: 4px; display: flex; gap: 2px; opacity: 0; transition: opacity .1s; user-select: none; }
.eb:hover > .eb-tools, .eb:focus-within > .eb-tools { opacity: 1; }
.eb-tools button { width: 22px; height: 24px; border: 0; background: none; border-radius: 4px; color: var(--muted-foreground); cursor: pointer; font-size: 15px; line-height: 1; padding: 0; }
.eb-tools button:hover { background: var(--accent); color: var(--foreground); }
.eb-handle { cursor: grab; display: inline-flex; align-items: center; justify-content: center; }
.eb-tools { z-index: 6; background: var(--background); border: 1px solid var(--border); border-radius: 6px; padding: 1px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.eb-tools button { color: var(--foreground); opacity: .7; }
.eb-tools button:hover { opacity: 1; }
.ed-doc [contenteditable]:focus { outline: none; }
.ed-doc [contenteditable][data-ph]:empty::before { content: attr(data-ph); color: var(--muted-foreground); pointer-events: none; }
.ed-doc .b-p.ed-text:empty:not(:focus)::before { content: none; }
.ed-doc .eb.drop-przed { box-shadow: 0 -2px 0 0 var(--txt-niebieski); }
.ed-doc .eb.drop-po { box-shadow: 0 2px 0 0 var(--txt-niebieski); }
.ed-doc .eb.ciagniety { opacity: .4; }
.ed-doc .b-callout .ik, .ed-doc .b-price .ik { border: 0; background: none; cursor: pointer; padding: 0 2px; border-radius: 4px; height: fit-content; font-size: 20px; line-height: 1.4; }
.ed-doc .b-callout .ik:hover, .ed-doc .b-price .ik:hover { background: rgba(0,0,0,.06); }
.ed-doc .b-divider:focus { outline: none; }
.ed-upload { width: 100%; display: block; border: 1px dashed var(--border); background: var(--muted); color: var(--muted-foreground); border-radius: 8px; padding: 22px; text-align: center; cursor: pointer; font: inherit; margin: 8px 0; }
.ed-upload:hover { border-color: var(--ring); color: var(--foreground); }
.ed-doc .b-gallery .g-it { position: relative; }
.ed-doc .g-del { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; opacity: 0; line-height: 1; }
.ed-doc .g-it:hover .g-del { opacity: 1; }
.ed-doc .b-gallery .g-add { margin: 0; min-height: 90px; display: grid; place-items: center; }
.ed-doc .t-ctl { display: flex; gap: 6px; margin-top: 6px; opacity: 0; }
.ed-doc .eb:hover .t-ctl, .ed-doc .eb:focus-within .t-ctl { opacity: 1; }
.ed-doc .t-ctl button { border: 1px solid var(--border); background: var(--background); border-radius: 6px; font: inherit; font-size: 12px; padding: 2px 8px; cursor: pointer; color: var(--muted-foreground); }
.ed-doc .ed-cell { min-height: 1.4em; outline: none; }
.ed-tail { height: 160px; cursor: text; }
.ed-pop, .ed-slash, .ed-bar { position: fixed; z-index: 50; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(0,0,0,.14); color: var(--foreground); }
.ed-slash { width: 300px; max-height: 360px; overflow: auto; padding: 6px; }
.ed-slash button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 5px 8px; border-radius: 6px; cursor: pointer; font: inherit; color: inherit; }
.ed-slash button.on, .ed-slash button:hover { background: var(--accent); }
.ed-slash .si { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 6px; display: grid; place-items: center; font-weight: 600; background: var(--background); flex: none; font-size: 14px; }
.ed-slash b { display: block; font-weight: 500; }
.ed-slash small { display: block; font-size: 12px; color: var(--muted-foreground); line-height: 16px; }
.ed-slash-tyt, .ed-pop-tyt { font-size: 11px; font-weight: 600; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px 4px; }
.ed-slash-pusto { padding: 10px; color: var(--muted-foreground); }
.ed-pop { width: 250px; padding: 6px; max-height: 70vh; overflow: auto; }
.ed-pop button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 14px; color: inherit; }
.ed-pop button:hover, .ed-pop button.on { background: var(--accent); }
.ed-pop kbd { float: right; font-size: 11px; color: var(--muted-foreground); font-family: var(--mono); }
.ed-pop-siatka { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.ed-pop-kolory { display: flex; gap: 6px; padding: 4px 8px 8px; flex-wrap: wrap; }
.ed-pop .ed-pop-kolory .kol { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border); padding: 0; }
.ed-pop .kol.on { outline: 2px solid var(--ring); outline-offset: 1px; }
.ed-pop-emoji { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 4px; }
.ed-pop .ed-pop-emoji button { font-size: 18px; padding: 4px; text-align: center; }
.kol[data-pr=""] { background: var(--background); } .kol[data-pr="szare"] { background: var(--tlo-szare); } .kol[data-pr="czerwone"] { background: var(--tlo-czerwone); }
.kol[data-pr="zolte"] { background: var(--tlo-zolte); } .kol[data-pr="zielone"] { background: var(--tlo-zielone); } .kol[data-pr="niebieskie"] { background: var(--tlo-niebieskie); } .kol[data-pr="fioletowe"] { background: var(--tlo-fioletowe); }
.ed-bar { display: flex; align-items: center; gap: 2px; padding: 4px; }
.ed-bar button { border: 0; background: none; min-width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px; padding: 0 6px; color: var(--foreground); }
.ed-bar button:hover { background: var(--accent); }
.ed-bar .sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.ed-bar .kol-t { font-weight: 700; min-width: 22px; padding: 0 3px; }
.kol-t[data-pr="szary"] { color: var(--txt-szary); } .kol-t[data-pr="czerwony"] { color: var(--txt-czerwony); } .kol-t[data-pr="pomaranczowy"] { color: var(--txt-pomaranczowy); }
.kol-t[data-pr="zielony"] { color: var(--txt-zielony); } .kol-t[data-pr="niebieski"] { color: var(--txt-niebieski); } .kol-t[data-pr="fioletowy"] { color: var(--txt-fioletowy); }
.toast .toast-undo { margin-left: 12px; background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; font-weight: 600; }
.share-link { display: flex; gap: 6px; }
.share-link .input { font-family: var(--mono); font-size: 12px; }
@media (max-width: 900px) {
  .ed-wrap { padding-left: 34px; margin-left: -6px; }
  .eb-tools { left: -34px; opacity: .55; flex-direction: column; gap: 0; }
  .ed-title { font-size: 30px; }
  .ed-cover { height: 150px; }
}

/* ---------- strona oferty dla klienta ---------- */
.pub-cover { height: 260px; overflow: hidden; background: var(--muted); }
.pub-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pub-main { max-width: 808px; margin: 0 auto; padding: 32px 24px 64px; }
.pub-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; }
.pub-logo { display: grid; place-items: center; width: 150px; height: 150px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.pub-logo .wordmark { width: 132px; background: var(--foreground); }
.z-okladka .pub-head { margin-top: -75px; }
.z-okladka .pub-logo { border-color: transparent; box-shadow: 0 6px 24px rgba(0, 0, 0, .12); }
.pub-head .btn { margin-bottom: 6px; }
.pub-title { font-size: 40px; line-height: 1.15; font-weight: 700; letter-spacing: -.8px; margin: 0 0 24px; }
.pub-meta { color: var(--muted-foreground); padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.pub-akcept { margin-top: 40px; }
.pub-akcept h2 { font-size: 20px; }
.pub-akcept .ok { color: var(--green-fg); }
.pub-foot { margin-top: 48px; color: var(--muted-foreground); font-size: 13px; text-align: center; }
.pub-foot a { text-decoration: underline; }
@media (max-width: 560px) { .pub-logo { width: 110px; height: 110px; } .pub-logo .wordmark { width: 84px; } .z-okladka .pub-head { margin-top: -55px; } .pub-title { font-size: 30px; } .pub-main { padding: 24px 16px 48px; } .pub-cover { height: 160px; } }
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { background: #fff; }
  .pub-head button, #akceptForm, .pub-akcept .pub-btns { display: none !important; }
  .pub-main { padding: 0 40px; max-width: none; }
  .doc .b-callout, .doc .b-price, .doc .b-steps .krok { break-inside: avoid; }
}
/* puste punkty listy: kropka/numer zostaje (::before), podpowiedź tylko w aktywnym wierszu (::after) */
.ed-doc .b-bullet.ed-text:empty::before { content: "•"; color: inherit; }
.ed-doc [data-wciecie="1"].b-bullet.ed-text:empty::before { content: "◦"; }
.ed-doc [data-wciecie="2"].b-bullet.ed-text:empty::before { content: "▪"; }
.ed-doc .b-number.ed-text:empty::before { content: counter(num) "."; color: inherit; }
.ed-doc .b-bullet.ed-text:empty:focus::after, .ed-doc .b-number.ed-text:empty:focus::after { content: attr(data-ph); color: var(--muted-foreground); pointer-events: none; }

/* ---------- menu „/” i bloki: bliżej Notion ---------- */
.ed-slash { width: 280px; max-height: 340px; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ed-slash-lista { overflow: auto; padding: 4px 6px; flex: 1; }
.ed-slash button { height: 34px; padding: 0 8px; gap: 10px; }
.ed-slash .si { width: 24px; height: auto; border: 0; background: none; font-size: 16px; color: var(--muted-foreground); flex: none; text-align: center; font-weight: 500; }
.ed-slash .sn { flex: 1; font-size: 14px; }
.ed-slash .ss { font-size: 13px; color: var(--muted-foreground); }
.ed-slash-tyt { text-transform: none; font-size: 12px; font-weight: 500; letter-spacing: 0; padding: 8px 8px 4px; color: var(--muted-foreground); }
.ed-slash-stopka { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding: 9px 14px; font-size: 13px; color: var(--muted-foreground); }
.ed-slash-stopka kbd { font-family: var(--mono); font-size: 12px; }
.ed-upload { display: flex; align-items: center; gap: 12px; text-align: left; border: 0; background: var(--muted); padding: 16px 18px; border-radius: 8px; color: var(--muted-foreground); }
.ed-upload small { margin-left: auto; font-size: 12px; }
.ed-upload:hover { background: var(--accent); border: 0; }
.ed-doc .b-gallery .g-add { min-height: 0; justify-content: center; }
.ed-doc .opinia .ed-op { outline: none; }
.ed-doc .opinia .g-del { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; opacity: 0; line-height: 1; }
.ed-doc .opinia:hover .g-del { opacity: 1; }
.ed-doc .opinia .kto b[data-ph]:empty::before, .ed-doc .opinia .kto small[data-ph]:empty::before { content: attr(data-ph); color: var(--muted-foreground); }

/* przycisk konta w menu i okno ustawień */
button.user { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; text-align: left; }
button.user:hover { background: var(--accent); }
button.user:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 72px; height: 72px; font-size: 24px; }
.dialog { position: fixed; z-index: 21; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(900px, calc(100vw - 24px)); display: grid; grid-template-columns: 1fr 1fr; align-content: start; max-height: calc(100vh - 24px); overflow: auto; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: fade .15s; }
.dialog-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 12px; }
.dialog-head > div { flex: 1; }
.dialog-sec { padding: 18px 24px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.dialog-sec h3 { font-size: 14px; font-weight: 600; margin: 0; }
.dialog-sec .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-foot { padding: 16px 24px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.dialog-foot .spacer { flex: 1; }
.profile-top { display: flex; align-items: center; gap: 16px; }
.profile-top .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ok-msg { color: var(--green-fg); font-size: 13px; }
.dialog { display: flex; flex-direction: column; overflow: hidden; width: min(860px, calc(100vw - 24px)); height: min(600px, calc(100vh - 24px)); }
.dialog-head { padding: 18px 24px 16px; flex: none; }
.dialog-body { display: flex; flex: 1; min-height: 0; border-top: 1px solid var(--border); }
.dialog-nav { width: 220px; flex: none; padding: 12px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--border); background: var(--sidebar, var(--muted)); }
.dialog-nav .spacer { flex: 1; }
.dn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--foreground); font: inherit; text-align: left; cursor: pointer; }
.dn svg { width: 16px; height: 16px; flex: none; color: var(--muted-foreground); }
.dn:hover { background: var(--accent, var(--muted)); }
.dn.on { background: var(--accent, var(--muted)); font-weight: 500; }
.dn.on svg { color: var(--foreground); }
.dn-out { color: var(--destructive); }
.dialog-main { flex: 1; min-width: 0; overflow: auto; }
.dialog-sec { border-top: 0; padding: 24px; }
.dialog-sec[hidden] { display: none; }
@media (max-width: 760px) {
  .dialog { height: calc(100vh - 24px); }
  .dialog-body { flex-direction: column; }
  .dialog-nav { width: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px; }
  .dn { width: auto; white-space: nowrap; }
  .dialog-nav .spacer { display: none; }
}
@media (max-width: 480px) { .dialog-sec .row2 { grid-template-columns: 1fr; } }

/* sortowanie po kolumnach: strzałka pojawia się po najechaniu, aktywna kolumna ma ją zawsze */
.th-btn { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 0; font-weight: inherit; white-space: nowrap; border-radius: 4px; }
th.r .th-btn { flex-direction: row-reverse; }
.th-arr { width: 14px; height: 14px; display: inline-grid; place-items: center; opacity: 0; transition: opacity .1s; flex: none; }
.th-arr svg.i { width: 14px; height: 14px; }
th:hover .th-btn, .th-btn.on { color: var(--foreground); }
th:hover .th-arr, .th-btn:focus-visible .th-arr { opacity: .55; }
.th-btn.on .th-arr { opacity: 1; }
.th-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
@media (hover: none) { .th-arr { opacity: .4; } }

/* karty projektów w stylu galerii Notion: okładka, osoby, status, postęp, klient */
.pcard { padding: 0; gap: 0; overflow: hidden; }
.pcard .cover { position: relative; overflow: hidden; flex: none; height: 160px; background: var(--muted); display: grid; place-items: center; color: var(--muted-foreground); border-bottom: 1px solid var(--border); }
.pcard .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .cover svg.i { width: 28px; height: 28px; opacity: .5; }
.pcard .pbody { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pcard h3 { font-size: 16px; line-height: 22px; }
.pcard .prow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcard .prog { display: flex; align-items: center; gap: 12px; }
.pcard .prog .progress { flex: 1; }
.pcard .pct { font-size: 13px; font-variant-numeric: tabular-nums; min-width: 34px; }
.pcard .pclient { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-foreground); }
.pcard .pclient span { border-bottom: 1px solid var(--border); }
.avs { display: inline-flex; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; border: 2px solid var(--background); box-sizing: border-box; background: var(--muted); }
.avs .avatar.sm + .avatar.sm { margin-left: -8px; }
.people-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px; border-radius: var(--radius-md); cursor: pointer; font: inherit; color: inherit; }
.people-btn:hover { background: var(--muted); }
.people-btn svg.i { width: 14px; height: 14px; }
.person-opt { display: flex; align-items: center; gap: 10px; padding: 8px 4px; cursor: pointer; }
.person-opt input { width: 16px; height: 16px; accent-color: var(--primary); }

/* wybór statusu z kolorami (zamiast systemowej listy) */
.cs { position: relative; }
.cs-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cs-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; cursor: pointer; }
.cs-btn svg.i { color: var(--muted-foreground); }
.cs-list { position: fixed; z-index: 60; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.cs-list[hidden] { display: none; }
.cs-opt { display: flex; align-items: center; border: 0; background: none; padding: 6px 8px; border-radius: var(--radius-md); cursor: pointer; font: inherit; color: inherit; text-align: left; }
.cs-opt:hover, .cs-opt:focus-visible { background: var(--muted); }
.cs-opt[aria-selected="true"] { background: var(--muted); }
.sheet-sub { margin-top: 8px; }
.stats.no-hint .hint { display: none; }

/* poziome linie z poziomami wpłat za wykresem */
.chart-wrap { position: relative; padding-left: 44px; }
.chart-wrap .chart { position: relative; z-index: 1; }
.gl { position: absolute; left: 0; right: 0; top: 20px; bottom: 22px; pointer-events: none; }
.gl-row { position: absolute; left: 44px; right: 0; height: 0; border-top: 1px dashed var(--border-strong, var(--border)); }
.gl-row.base { border-top: 1px solid var(--border); }
.gl-row span { position: absolute; left: -44px; top: -8px; width: 38px; text-align: right; font-size: 11px; line-height: 14px; color: var(--muted-foreground); white-space: nowrap; }
@media (max-width: 560px) { .chart-wrap { padding-left: 38px; } .gl { top: 0; } .gl-row { left: 38px; } .gl-row span { left: -38px; width: 32px; } }
.muted.sm { font-size: 12px; font-weight: 400; }

/* słupki: pozycjonowanie absolutne, bo procenty wysokości nie działają w rozciągniętym kontenerze */
.chart { align-items: stretch; }
.bars { position: relative; min-height: 120px; }
.bars i { position: absolute; left: 0; right: 0; bottom: 0; }
.card > .chart-wrap { flex: none; }
.chart-wrap .chart { flex: none; height: 300px; min-height: 0; }

.sites { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.site-row { display: flex; gap: 6px; width: 100%; }
.site-row .input { flex: 1; min-width: 0; }

/* gradient przy przewijanej tabeli: nakładka na karcie, nie zmienia układu tabeli */
.has-more { position: relative; }
.has-more::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 72px; background: linear-gradient(to right, transparent, var(--card)); border-radius: 0 var(--radius-xl) var(--radius-xl) 0; pointer-events: none; z-index: 2; }

/* odnośniki w tabelach: podkreślenie po najechaniu */
.row-link:hover, .contact a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* wykres Finanse: koszty jako czerwona część słupka */
.bars i.cost { opacity: 1; background: var(--destructive); }
.legend i.cost { background: var(--destructive); }

/* okienko nad słupkiem wykresu */
.bar-tip { position: fixed; z-index: 60; min-width: 220px; padding: 12px 14px; background: var(--popover, var(--background)); color: var(--foreground); border: 1px solid var(--border); border-radius: var(--radius-lg, 10px); box-shadow: 0 8px 24px rgb(0 0 0 / .12); font-size: 13px; line-height: 18px; pointer-events: none; }
.bar-tip[hidden] { display: none; }
.tip-title { font-weight: 600; margin-bottom: 6px; }
.tip-row, .tip-sum { display: flex; align-items: center; gap: 8px; }
.tip-row b, .tip-sum b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.tip-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--primary); }
.tip-dot.pend { background: var(--chart-muted); }
.tip-dot.cost { background: var(--destructive); }
.tip-sum { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); color: var(--muted-foreground); }
.tip-sum b { color: var(--foreground); }

/* koszty: stonowana czerwień, żeby nie krzyczała na tle czerni */
:root { --koszt: #c4585c; }
.bars i.cost, .legend i.cost, .tip-dot.cost { background: var(--koszt); opacity: 1; }

/* podsumowanie na dole karty */
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted-foreground); margin-top: auto; }
.card-foot b { color: var(--foreground); font-weight: 600; font-variant-numeric: tabular-nums; }
.card:not(.flush) > .card-foot { margin: auto -24px -20px; }

/* obracający się okrąg wokół zdjęcia profilowego w menu */
.user .avatar { position: relative; overflow: visible; }
.user .avatar img { border-radius: 50%; }
.user .avatar::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, #8b5cf6, #ec4899, #f59e0b, #22d3ee, #6366f1, #8b5cf6);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  animation: avatar-obrot 2.8s linear infinite; }
@keyframes avatar-obrot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .user .avatar::before { animation: none; } }

/* edytor: zagnieżdżone bloki i nowe typy (wygląd zawartości bierze się z bloki.css, tak samo jak w podglądzie) */
.ed-nest { min-width: 0; }
.ed-nest .eb-tools { left: -56px; }
.ed-nest > .doc { font-size: inherit; }
.ed-doc .b-callout .tx > .tt { min-height: 1.6em; }
.ed-doc .b-callout .ed-nest > .doc > .eb:only-child .b-p.ed-text:empty:not(:focus) { min-height: 0; height: 0; padding: 0; margin: 0; overflow: hidden; }
.ed-doc .b-callout .tx > .tt + .ed-nest { margin-top: 2px; }
.ed-doc .b-toggle { padding: 2px; }
.ed-doc .b-toggle .tg-head { display: flex; gap: 6px; align-items: flex-start; }
.ed-doc .b-toggle .tg-arrow { flex: none; width: 24px; height: 28px; border: 0; background: none; cursor: pointer; color: var(--foreground); opacity: .55; font-size: 15px; border-radius: 4px; padding: 0; transition: transform .12s; }
.ed-doc .b-toggle .tg-arrow:hover { background: var(--muted); }
.ed-doc .b-toggle.open .tg-arrow { transform: rotate(90deg); }
.ed-doc .b-toggle .tg-t { flex: 1; min-width: 0; padding: 3px 2px; }
.ed-doc .b-toggle[data-n="1"] .tg-t { font-size: 30px; line-height: 1.25; font-weight: 700; letter-spacing: -.5px; }
.ed-doc .b-toggle[data-n="2"] .tg-t { font-size: 24px; line-height: 1.3; font-weight: 650; letter-spacing: -.3px; }
.ed-doc .b-toggle[data-n="3"] .tg-t { font-size: 20px; line-height: 1.35; font-weight: 600; }
.ed-doc .b-toggle > .ed-nest { margin-left: 26px; }
.ed-doc .b-toggle:not(.open) > .ed-nest { display: none; }
.ed-doc .b-columns { padding: 0; }
.ed-doc .b-columns .kol { padding: 2px 0; border-radius: 6px; }
.ed-doc .b-columns .kol:hover, .ed-doc .b-columns .kol:focus-within { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.ed-doc .b-columns .ed-nest > .doc > .eb:only-child .b-p.ed-text:empty:not(:focus)::before { content: "Wpisz tekst"; }
.ed-doc .ed-codeblok { padding: 8px; }
.ed-doc .ed-code { width: 100%; border: 0; background: none; font: inherit; color: inherit; resize: none; outline: none; min-height: 60px; white-space: pre; overflow-x: auto; }
.ed-doc .ed-mini { position: absolute; top: 6px; right: 10px; width: 90px; border: 0; background: none; text-align: right; font: inherit; font-size: 11px; color: var(--muted-foreground); outline: none; }
.ed-doc .ed-pola { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.ed-doc .ed-in { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--input); border-radius: var(--radius-md); background: var(--background); color: var(--foreground); font: inherit; }
.ed-doc .ed-in:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.ed-doc .ed-uwaga { color: var(--destructive); font-size: 13px; margin: 4px 0; }
.ed-doc .b-bookmark.ed-pola { border: 0; padding: 0; }
.ed-doc .b-video iframe { pointer-events: none; }
.ed-doc .b-button { margin: 8px 0 4px; }

/* logo w kwadracie nad tytułem oferty: ten sam układ co na stronie klienta */
.ed-logo { margin: 56px 0 48px; }
.ed-logo-z { margin-top: -75px; position: relative; border-color: transparent; box-shadow: 0 6px 24px rgba(0, 0, 0, .12); }
@media (max-width: 560px) { .ed-logo-z { margin-top: -55px; } }

/* przyciski edytora oferty w górnym pasku */
.ed-bar-top { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ed-bar-top + #themeBtn { margin-left: 0; }
.content:has(> .ed-page) { padding-top: 0; max-width: none; }

/* biblioteka mediów (okno jak ustawienia konta) */
#mediaRoot .sheet-bg { z-index: 60; }
.dlg-media { z-index: 61; width: min(1000px, calc(100vw - 24px)); height: min(680px, calc(100vh - 24px)); }
.dlg-media .dn .c { margin-left: auto; font-size: 12px; color: var(--muted-foreground); }
.media-razem { font-size: 12px; padding: 8px; }
.media-main { display: flex; flex-direction: column; overflow: hidden; }
.media-bar { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); flex: none; }
.media-bar .input { width: 240px; }
.media-bar .spacer { flex: 1; }
.media-grid-wrap { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 16px 20px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.media-hint { position: absolute; inset: 8px; border: 2px dashed var(--ring); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--background) 85%, transparent); display: grid; place-items: center; font-weight: 600; pointer-events: none; }
.media-pusto { grid-column: 1 / -1; padding: 48px 0; text-align: center; color: var(--muted-foreground); }
.mtile { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mt-thumb { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--muted); padding: 0; cursor: pointer; display: grid; place-items: center; }
.mt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mt-ext { font-weight: 700; letter-spacing: .04em; color: var(--muted-foreground); font-size: 14px; }
.mtile.sel .mt-thumb { outline: 3px solid var(--primary); outline-offset: -1px; }
.mt-ok { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: var(--primary-foreground); display: grid; place-items: center; }
.mt-name { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-meta { font-size: 12px; color: var(--muted-foreground); }
.mt-act { position: absolute; top: 6px; left: 6px; display: flex; gap: 2px; opacity: 0; transition: opacity .1s; background: color-mix(in srgb, var(--background) 88%, transparent); border-radius: var(--radius-md); padding: 1px; }
.mtile:hover .mt-act, .mtile:focus-within .mt-act { opacity: 1; }
.media-foot { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); flex: none; }
.media-foot .spacer { flex: 1; }
.ed-doc .b-file { margin: 8px 0; }
@media (max-width: 700px) { .media-bar .input { width: 100%; } .media-bar { flex-wrap: wrap; } }
.mt-fmt { position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--background) 88%, transparent); color: var(--foreground); font-size: 10px; font-weight: 700; letter-spacing: .04em; line-height: 16px; }

/* Umowy: wybór podpisanego dokumentu z biblioteki */
.doc-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-pick .doc-name { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.pdf-frame { display: block; width: 100%; height: min(72vh, 820px); border: 1px solid var(--border); border-radius: 8px; background: var(--card); margin-bottom: 12px; }

/* Biblioteka mediów: powiększony podgląd obrazu */
.mlb { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .82); display: flex; align-items: center; justify-content: center; padding: 56px 72px; }
.mlb figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mlb img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 8px; background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.mlb figcaption { color: #e5e5e5; font-size: 13px; text-align: center; }
.mlb button { position: absolute; width: 40px; height: 40px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.mlb button:hover { background: rgba(255, 255, 255, .28); }
.mlb button svg { width: 20px; height: 20px; }
.mlb .mlb-x { top: 16px; right: 16px; }
.mlb .mlb-p { left: 16px; top: 50%; transform: translateY(-50%); }
.mlb .mlb-nx { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .mlb { padding: 56px 12px; } .mlb .mlb-p { left: 6px; } .mlb .mlb-nx { right: 6px; } }
.mlb iframe { width: min(920px, calc(100vw - 150px)); height: calc(100vh - 150px); border: 0; border-radius: 8px; background: #fff; }
.mlb iframe[hidden], .mlb img[hidden] { display: none; }

/* Generator umów */
.gen { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: start; }
.gen-form { padding: 16px; position: sticky; top: 12px; max-height: calc(100vh - 100px); overflow: auto; }
.gen-form .field { margin-bottom: 12px; }
.gen-form .input.pusty { background-color: rgba(229, 72, 77, .13); border-color: #e5484d; }
.gen-form .input.wyp { background-color: rgba(48, 164, 108, .15); border-color: #30a46c; }
.gen-licznik { font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 8px; margin: 4px 0 10px; }
.gen-licznik.brak { background: rgba(229, 72, 77, .13); color: #c62a2f; }
.gen-licznik.ok { background: rgba(48, 164, 108, .15); color: #218358; }
.gen-doc mark { color: inherit; border-radius: 3px; padding: 0 2px; }
.gen-doc mark.gd-brak { background: #f9c6c8; }
.gen-doc mark.gd-ok { background: #c9ecd8; }
.gen-form textarea.input { min-height: 90px; resize: vertical; }
.gen-akcje { display: flex; gap: 8px; margin: 14px 0 10px; }
.gen-podglad { background: var(--muted); border-radius: var(--radius-lg); padding: 24px; overflow: auto; }
.gen-doc { background: #fff; color: #111; width: 100%; max-width: 794px; margin: 0 auto; padding: 56px 64px; box-shadow: 0 2px 14px rgba(0, 0, 0, .12); font: 13px/1.55 "Times New Roman", Georgia, serif; }
.gen-doc h1 { font-size: 20px; text-align: center; margin: 0 0 18px; }
.gen-doc h2 { font-size: 14px; margin: 18px 0 6px; }
.gen-doc p { margin: 0 0 7px; text-align: left; }
.gen-doc .gd-n { padding-left: 18px; text-indent: -18px; }
.gen-doc .gd-sub { padding-left: 38px; text-indent: -16px; }
.gen-doc .gd-c { text-align: left; }
.gen-doc .gd-zal { margin-top: 26px; font-weight: 700; }
.gen-sign, .gen-doc .gd-sign { display: flex; justify-content: space-between; gap: 40px; margin-top: 34px; page-break-inside: avoid; }
.gen-doc .gd-sign > div { flex: 1; text-align: center; }
.gen-doc .gd-sign span { display: block; margin-bottom: 38px; }
.gen-doc .gd-sign i { display: block; border-top: 1px solid #111; }
@media (max-width: 1000px) { .gen { grid-template-columns: 1fr; } .gen-form { position: static; max-height: none; } .gen-doc { padding: 28px 22px; } }
@media print {
  body:has(.gen-doc) * { visibility: hidden; }
  body:has(.gen-doc) .gen-doc, body:has(.gen-doc) .gen-doc * { visibility: visible; }
  .gen-doc { position: absolute; left: 0; top: 0; width: 100%; max-width: none; margin: 0; padding: 0; box-shadow: none; font-size: 11.5pt; }
  .gen-doc mark { background: none !important; padding: 0; }
  .gen-doc h2 { page-break-after: avoid; }
  .gen-doc p { orphans: 3; widows: 3; }
  @page { margin: 20mm 18mm; }
}

.gen-form .gen-odmiana { display: block; color: #218358; font-weight: 600; margin-top: 4px; }

/* własny kalendarz (kalendarz.js) */
input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
input[type="date"].input { padding-right: 40px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
.dp { position: fixed; z-index: 90; width: 292px; background: var(--background); color: var(--foreground); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 12px; font-size: 14px; }
.dp-gora { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-tytul { font-weight: 600; }
.dp-nav { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--background); color: inherit; border-radius: var(--radius-md); cursor: pointer; }
.dp-nav:hover { background: var(--muted); }
.dp-dni, .dp-siatka { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-dni span { text-align: center; font-size: 12px; color: var(--muted-foreground); padding: 6px 0; }
.dp-d { height: 34px; border: 0; background: none; color: inherit; font: inherit; border-radius: var(--radius-md); cursor: pointer; font-variant-numeric: tabular-nums; }
.dp-d:hover { background: var(--muted); }
.dp-d.inny { color: var(--muted-foreground); opacity: .55; }
.dp-d.dzis { box-shadow: inset 0 0 0 1px var(--ring); }
.dp-d.wyb, .dp-d.wyb:hover { background: var(--primary); color: var(--primary-foreground); opacity: 1; font-weight: 600; }
.dp-d:disabled { opacity: .3; cursor: default; background: none; }
.dp-dol { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.dp-link { border: 0; background: none; font: inherit; font-weight: 500; color: inherit; padding: 4px 8px; border-radius: var(--radius-md); cursor: pointer; }
.dp-link:hover { background: var(--muted); }

.gen-raty .gen-rata { display: grid; grid-template-columns: 24px minmax(138px, 1.5fr) minmax(0, 1fr) 28px; gap: 6px; align-items: center; margin-bottom: 6px; }
.gen-rata-nr { font-size: 12px; font-weight: 600; color: var(--muted-foreground); text-align: center; }
.gen-raty .btn-icon { width: 32px; height: 32px; padding: 0; font-size: 18px; line-height: 1; }
.gen-raty #genRataDodaj { margin-top: 4px; }
.gen-raty small { display: block; margin-top: 6px; font-weight: 600; }
.gen-rata input.input { padding-left: 10px; padding-right: 10px; font-size: 14px; min-width: 0; }
.gen-rata input[type="date"].input { padding-right: 30px; background-position: right 8px center; }
.gen-sekcja { font-weight: 600; margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.gen-akcje .btn.niedostepny { opacity: .5; cursor: not-allowed; }
.gen-doc mark.gd-flash { animation: gd-flash 1.6s ease-out; }
@keyframes gd-flash { 0%, 55% { box-shadow: 0 0 0 3px #171717; } 100% { box-shadow: 0 0 0 3px transparent; } }

/* pasek umów: zakładki w osobnym wierszu, a pod nimi filtr i przyciski razem, żeby „Nowa umowa” nie spadała samotnie niżej */
@media (max-width: 1400px) { .toolbar-umowy > .tabs { flex: none; flex-wrap: nowrap; } .toolbar-umowy > .spacer { flex: 0 0 100%; height: 0; margin-top: -8px; } .toolbar-umowy > .input { flex: 1 1 160px; max-width: none; } .toolbar-umowy > .btn { flex: none; } }

/* lista zadań w projekcie (jak w Notion): jedna lista z polem wyboru, bez kolumn kanban */
.tl { padding-bottom: 12px; }
.tl .card-head { display: flex; align-items: center; justify-content: space-between; }
.tl .card-head .c { font-size: 14px; }
.tl-rows { display: flex; flex-direction: column; margin-top: 4px; }
.tl .task { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 10px 4px; align-items: center; }
.tl .task:hover { background: var(--muted); border-radius: var(--radius-md); }
.tl .task:last-child { border-bottom: 0; }
.tl .task .mv { opacity: .55; }
.tl .add-task { margin: 8px 4px 4px; }
.tl .tl-done-head { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.tl .hidden-note { padding: 8px 4px; color: var(--muted-foreground); font-size: 13px; }

/* wiersz zadania: nazwa | osoba | termin | status (kolumny obok siebie) */
.tl .task { display: grid; grid-template-columns: 22px minmax(0, 1fr) 64px 92px 124px; gap: 12px; align-items: center; }
.tl .task .chk { margin-top: 0; }
.t-who, .t-st { border: 0; background: none; padding: 2px; margin: 0; cursor: pointer; font: inherit; color: inherit; border-radius: var(--radius-md); justify-self: start; display: inline-flex; align-items: center; }
.t-who:hover, .t-st:hover { background: var(--muted); }
.t-nikt { width: 26px; height: 26px; border: 1px dashed var(--ring); border-radius: 50%; display: grid; place-items: center; color: var(--muted-foreground); }
.t-nikt svg { width: 14px; height: 14px; }
.t-date { color: var(--muted-foreground); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm { position: fixed; z-index: 90; min-width: 190px; background: var(--background); color: var(--foreground); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.pm-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; background: none; padding: 7px 10px; border-radius: var(--radius-md); cursor: pointer; font: inherit; color: inherit; text-align: left; }
.pm-opt:hover { background: var(--muted); }
.pm-opt svg { width: 14px; height: 14px; }
@media (max-width: 700px) { .tl .task { grid-template-columns: 22px minmax(0, 1fr) auto; } .tl .task .t-date { display: none; } .tl .task .t-who { display: none; } }
.pm-opt { gap: 10px; }
.pm-av .avatar { width: 24px; height: 24px; }
.pm-et { flex: 1; }
.pm-ch { width: 16px; display: inline-flex; justify-content: flex-end; }
.content:has(> .ed-cover:first-child) { padding-top: 0; }
/* okładka projektu na całą szerokość okna, a treść pod nią zostaje w swojej szerokości (max 1400 px razem z marginesami) */
.content:has(> .ed-cover:first-child) { max-width: none; }
.content:has(> .ed-cover:first-child) > :not(.ed-cover) { max-width: calc(1400px - 2 * var(--pad)); width: 100%; box-sizing: border-box; }

/* zadania: zaznaczanie, zmiana nazwy w miejscu, termin edytowalny */
.tl .task { grid-template-columns: 20px minmax(0, 1fr) 64px 104px 124px 28px; }
.t-sel { width: 16px; height: 16px; border: 1.5px solid var(--ring); border-radius: 4px; background: none; padding: 0; cursor: pointer; opacity: 0; display: grid; place-items: center; color: var(--primary-foreground); }
.t-sel svg { width: 12px; height: 12px; stroke-width: 3; }
.t-sel[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); }
.tl .task:hover .t-sel, .tl.has-sel .t-sel, .t-sel:focus-visible { opacity: 1; }
.tl .task.sel-on { background: var(--muted); border-radius: var(--radius-md); }
.t-edit { border: 0; background: none; padding: 4px; cursor: pointer; color: var(--muted-foreground); border-radius: var(--radius-md); opacity: 0; display: inline-grid; place-items: center; }
.t-edit svg { width: 14px; height: 14px; }
.tl .task:hover .t-edit, .t-edit:focus-visible { opacity: 1; }
.t-edit:hover { background: var(--muted); color: var(--foreground); }
input.t-date { border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted-foreground); padding: 2px 4px; width: 100%; cursor: pointer; border-radius: var(--radius-md); font-variant-numeric: tabular-nums; }
input.t-date:hover { background: var(--muted); }
input.t-date[value=""] { color: transparent; }
.tl .task:hover input.t-date[value=""] { color: var(--muted-foreground); }
.t-rename { height: 32px; width: 100%; }
.tl-head-r { display: inline-flex; align-items: center; gap: 12px; }
.tl-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--muted); border-radius: var(--radius-lg); padding: 8px 12px; margin: 4px 0 8px; position: relative; }
.tl-bulk-n { margin-right: 6px; }
.tl-bulk .tl-del { color: var(--destructive); }
.bulk-date { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; left: 0; bottom: 0; }
@media (max-width: 700px) { .tl .task { grid-template-columns: 20px minmax(0, 1fr) auto; } .tl .task input.t-date, .tl .task .t-edit { display: none; } }
.pm-ctx { min-width: 220px; }
.pm-sep { height: 1px; background: var(--border); margin: 3px 4px; }
.pm-danger { color: var(--destructive); }
.pm-danger:hover { background: var(--red-bg); }
.tl-th { display: grid; grid-template-columns: 20px minmax(0, 1fr) 64px 104px 124px 28px; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--border); color: var(--muted-foreground); font-size: 12px; line-height: 16px; font-weight: 500; }
.tl-th span:nth-child(3), .tl-th span:nth-child(4), .tl-th span:nth-child(5) { padding-left: 2px; }
@media (max-width: 700px) { .tl-th { grid-template-columns: 20px minmax(0, 1fr) auto; } .tl-th span:nth-child(3), .tl-th span:nth-child(4), .tl-th span:nth-child(6) { display: none; } }
/* lista zadań w obramowanej tabeli */
.tl .tl-rows { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-top: 8px; }
.tl .tl-rows .task { padding: 10px 12px; border-radius: 0; }
.tl .tl-rows .task:hover, .tl .tl-rows .task.sel-on { border-radius: 0; }
.tl .tl-rows .tl-th { padding: 10px 12px; background: var(--card); }
.tl .tl-rows .hidden-note { padding: 10px 12px; }
@media (max-width: 700px) { .tl .tl-rows .task, .tl .tl-rows .tl-th { padding-left: 10px; padding-right: 10px; } }
/* lista zadań bez zewnętrznej karty: sama tabela z własną ramką */
.card.tl { border: 0; background: transparent; box-shadow: none; padding: 0; border-radius: 0; }
.card.tl > .card-head { padding: 0 0 4px; }
.card.tl .tl-done-head { padding-top: 14px; margin-top: 14px; border-top: 0; }
.card.tl .add-task { margin: 10px 0 0; }
.card.tl .tl-bulk { margin: 4px 0 8px; }
.tl-th .t-sel-all { opacity: 1; }
.t-sel-all[aria-pressed="false"] { background: none; }
.t-sel-dash { display: block; width: 8px; height: 2px; background: var(--foreground); border-radius: 1px; }
.tl-th span:first-child { display: grid; place-items: center; }
.tl-th .tl-sort { display: flex; }
.tl-th .th-btn { font-size: 12px; line-height: 16px; }
.proj-progress { display: flex; align-items: center; gap: 14px; max-width: 420px; }
.proj-progress .pp-pct { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; min-width: 44px; }
.proj-progress .progress { flex: 1; }
.tl-new { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.tl-new .input { height: 34px; width: 100%; }
.tl-tabs { margin: 4px 0 8px; }

/* menu boczne wewnątrz projektu */
.nav-back { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: var(--radius-md); color: var(--muted-foreground); margin-bottom: 8px; }
.nav-back:hover { background: var(--accent); color: var(--foreground); }
.nav-back svg { width: 16px; height: 16px; }
.nav-proj { font-size: 14px; font-weight: 600; color: var(--foreground); padding: 4px 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 24px; }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv-k { font-size: 12px; line-height: 16px; color: var(--muted-foreground); font-weight: 500; }
.kv-note { border-top: 1px solid var(--border); padding-top: 14px; }
.kv-note p { margin-top: 4px; white-space: pre-wrap; }
.proj-opis { max-width: 840px; margin-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.proj-opis-head { display: flex; justify-content: flex-end; min-height: 16px; }
@media (max-width: 700px) { .proj-opis { margin-left: 0; } }

/* ustawienia: role i uprawnienia */
.set-matrix th.c, .set-matrix td.c { text-align: center; width: 110px; }
.chk-box { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.chk-box:disabled { cursor: default; opacity: .5; }
.set-switches { display: flex; flex-direction: column; gap: 10px; }
.set-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.set-rola { max-width: 220px; }
.log-opis { white-space: normal !important; max-width: 520px; }
#setRoot { display: flex; flex-direction: column; gap: 16px; }
.nav-dol:empty { display: none; }
.sidebar .nav-dol { margin-bottom: 4px; }

/* zdjęcia i screeny przy zadaniu (formularz) */
.img-pick { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.img-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.img-grid:empty { display: none; }
.img-th { position: relative; width: 96px; height: 72px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); background: var(--muted); }
.img-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.img-x svg { width: 12px; height: 12px; }
.t-img { display: inline-flex !important; align-items: center; gap: 4px; color: var(--muted-foreground); }
.t-img svg { width: 12px; height: 12px; }
.set-only { margin-bottom: 14px; }

/* okładka z AI */
.cover-add { display: flex; gap: 4px; flex-wrap: wrap; }
.ai-nota { background: var(--muted); border-radius: var(--radius-md); padding: 10px 12px; font-size: 13px; }
.ai-nota a { text-decoration: underline; }
.ai-prev { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.ai-prev img { display: block; width: 100%; height: auto; }
.ai-wynik { display: flex; flex-direction: column; gap: 10px; }
.ai-wynik .btns { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ai-hint { font-size: 12px; margin-top: 4px; }
.ai-status { display: flex; align-items: center; gap: 10px; color: var(--muted-foreground); min-height: 20px; }
.ai-status:empty { display: none; }
.ai-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--foreground); animation: ai-obrot .8s linear infinite; flex: none; }
@keyframes ai-obrot { to { transform: rotate(360deg); } }
.ed-marquee { position: fixed; z-index: 60; pointer-events: none; background: rgba(35, 131, 226, .14); border: 1px solid rgba(35, 131, 226, .45); border-radius: 2px; }
.ed-doc .eb.eb-sel > .eb-body { background: rgba(35, 131, 226, .16); border-radius: 4px; box-shadow: none; }
body:has(.ed-marquee) { user-select: none; cursor: default; }

/* menu bloku i pasek formatowania w stylu Notion */
.eb-tools { background: none; border: 0; box-shadow: none; padding: 0; gap: 0; }
.eb-tools button { width: 24px; height: 26px; border-radius: 6px; color: var(--muted-foreground); opacity: .55; }
.eb-tools button:hover, .eb-handle:focus-visible { background: var(--accent); opacity: 1; color: var(--foreground); }
.ed-pop.ed-menu { width: 280px; padding: 8px; }
.ed-pop2 { width: 250px; padding: 6px 8px; max-height: min(520px, 80vh); overflow: auto; z-index: 55; }
.ed-pop-szuk { width: 100%; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--background); padding: 0 10px; font: inherit; font-size: 14px; color: var(--foreground); margin-bottom: 4px; }
.ed-pop-szuk:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 30%, transparent); }
.ed-pop-linia { height: 1px; background: var(--border); margin: 6px 0; }
.ed-pop .ed-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; min-height: 32px; }
.ed-row .ico { width: 20px; display: grid; place-items: center; color: var(--muted-foreground); flex: none; }
.ed-row .ico-t { font-weight: 600; font-size: 13px; color: var(--foreground); }
.ed-row .lbl { flex: 1; min-width: 0; }
.ed-row .chev, .ed-row .ptak { color: var(--muted-foreground); display: grid; place-items: center; }
.ed-row .sw-a { width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 5px; display: grid; place-items: center; font-weight: 600; font-size: 13px; min-width: 22px; padding: 0; }
.ed-row .sw-t { width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--border); display: block; }
.ed-pop.ed-menu kbd { margin-left: auto; }
.ed-bar .bar-typ { padding: 0 8px; font-size: 13px; white-space: nowrap; }
.ed-bar .bar-v { font-size: 10px; color: var(--muted-foreground); }
.ed-bar .bar-a { font-weight: 700; }
.ed-bar .bar-v { font-size: inherit; color: var(--muted-foreground); vertical-align: -1px; margin-left: 2px; }
.ed-bar .bar-typ, .ed-bar [data-f="kolor"] { display: inline-flex; align-items: center; gap: 4px; }
.ed-slash .si svg, .ed-row .ico svg { width: 20px; height: 20px; }
.ed-slash .si { color: var(--foreground); }
.ed-row .ico { color: var(--foreground); }

/* galeria jako jeden element + panel boczny */
.ed-doc .b-gallery.g-edit { cursor: pointer; border-radius: 10px; transition: box-shadow .12s; }
.ed-doc .b-gallery.g-edit:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 35%, transparent); }
.ed-doc .b-gallery.g-edit img { pointer-events: none; }
.ed-doc .ed-upload.g-pusta { width: 100%; min-height: 110px; display: grid; place-items: center; align-content: center; gap: 6px; }
.gal-bg { z-index: 40; }
.gal-panel { z-index: 41; width: min(460px, 100vw); }
.gal-panel .sheet-body { flex: 1; }
.gal-kol { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gal-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.gal-seg button { border: 0; background: none; padding: 6px 14px; cursor: pointer; font: inherit; color: var(--foreground); }
.gal-seg button + button { border-left: 1px solid var(--border); }
.gal-seg button.on { background: var(--accent); font-weight: 600; }
.gal-siatka { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gal-it { position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--muted); }
.gal-it img { width: 100%; height: 150px; object-fit: cover; object-position: top; display: block; }
.gal-ctl { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; gap: 4px; justify-content: space-between; opacity: 0; transition: opacity .12s; }
.gal-it:hover .gal-ctl, .gal-it:focus-within .gal-ctl { opacity: 1; }
.gal-ctl button { border: 1px solid var(--border); background: var(--background); border-radius: 6px; width: 30px; height: 28px; display: grid; place-items: center; cursor: pointer; color: var(--foreground); }
.gal-ctl button:disabled { opacity: .35; cursor: default; }
.gal-ctl button[data-g="usun"] { margin-left: auto; }
.gal-it { cursor: grab; }
.gal-it.gal-ciag { opacity: .4; }
.gal-it.gal-przed { box-shadow: -4px 0 0 0 var(--txt-niebieski); }
.gal-it.gal-po { box-shadow: 4px 0 0 0 var(--txt-niebieski); }

/* historia zmian oferty */
.hist-bg { z-index: 45; }
.hist-dlg { position: fixed; z-index: 46; inset: 24px; margin: auto; width: min(1100px, calc(100vw - 24px)); height: min(760px, calc(100vh - 24px)); background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 20px 60px rgba(0,0,0,.25); display: grid; grid-template-columns: 260px 1fr; overflow: hidden; }
.hist-lista { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: var(--muted); }
.hist-tyt { padding: 18px 16px 10px; font-weight: 600; }
.hist-wiersze { overflow: auto; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.hist-w { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--foreground); }
.hist-w small { color: var(--muted-foreground); font-size: 12px; }
.hist-w:hover { background: var(--accent); }
.hist-w.on { background: var(--card); box-shadow: 0 0 0 1px var(--border); }
.hist-pusto { padding: 10px; }
.hist-podglad { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.hist-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.hist-head #histOpis { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hist-akcje { display: flex; align-items: center; gap: 6px; flex: none; }
.hist-tresc { overflow: auto; padding: 24px 32px 48px; flex: 1; }
.hist-tresc .doc { max-width: 720px; margin: 0 auto; }
@media (max-width: 760px) { .hist-dlg { grid-template-columns: 1fr; grid-template-rows: 180px 1fr; inset: 8px; } .hist-lista { border-right: 0; border-bottom: 1px solid var(--border); } }
@media (max-width: 760px) { .ed-nest .eb-tools { left: -34px; } }
/* zaznaczony rozdzielacz jak w Notion: linia w jasnoniebieskim pasku, bez ramki */
.ed-doc .b-divider:focus hr, .ed-doc .eb.eb-sel .b-divider hr { box-shadow: 0 0 0 7px rgba(35, 131, 226, .16); border-radius: 8px; border-top-color: rgba(35, 131, 226, .45); }
.ed-doc .eb.eb-sel > .eb-body:has(.b-divider) { background: none; box-shadow: none; }

/* wybór emoji i podpowiedzi po wpisaniu ":" */
.ed-emoji { position: fixed; z-index: 62; width: 440px; max-width: calc(100vw - 16px); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 12px 36px rgba(0,0,0,.18); color: var(--foreground); display: flex; flex-direction: column; }
.ed-emoji .em-gora { display: flex; gap: 8px; padding: 10px 10px 6px; }
.ed-emoji .em-szuk { flex: 1; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--background); padding: 0 10px; font: inherit; font-size: 14px; color: var(--foreground); }
.ed-emoji .em-szuk:focus { outline: none; border-color: var(--ring); }
.ed-emoji .em-los { width: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--background); cursor: pointer; color: var(--foreground); display: grid; place-items: center; }
.ed-emoji .em-tresc { height: 320px; overflow: auto; padding: 0 10px 8px; position: relative; }
.ed-emoji .em-tyt { font-size: 12px; font-weight: 600; color: var(--muted-foreground); padding: 10px 4px 4px; }
.ed-emoji .em-siatka { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; }
.ed-emoji .em { border: 0; background: none; font-size: 22px; line-height: 1; height: 38px; border-radius: 8px; cursor: pointer; padding: 0; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.ed-emoji .em:hover, .ed-emoji .em.on { background: var(--accent); }
.ed-emoji .em-kat { display: flex; justify-content: space-between; padding: 6px 10px; border-top: 1px solid var(--border); }
.ed-emoji .em-kat button { border: 0; background: none; border-radius: 8px; width: 36px; height: 34px; font-size: 18px; cursor: pointer; opacity: .75; }
.ed-emoji .em-kat button:hover { background: var(--accent); opacity: 1; }
.ed-emoji .em-pusto { padding: 24px 8px; color: var(--muted-foreground); text-align: center; }
.ed-emoji-mini { width: 360px; padding: 6px 8px 4px; z-index: 55; }
.ed-emoji-mini .em-siatka { grid-template-columns: repeat(8, 1fr); }
.ed-emoji-mini .em-nazwa { padding: 6px 4px 4px; font-size: 12px; color: var(--muted-foreground); border-top: 1px solid var(--border); margin-top: 4px; }
.ed-doc .b-callout .ik.num { background: var(--primary); color: var(--primary-foreground); border-radius: 7px; width: 26px; height: 26px; padding: 0; font-size: 13px; line-height: 1; }
.ed-doc .b-callout .ik.num:hover { background: var(--primary); opacity: .85; }
.ed-emoji .em-num { background: var(--primary); color: var(--primary-foreground); font-size: 14px; font-weight: 600; width: 32px; height: 32px; border-radius: 7px; margin: 3px auto; font-family: inherit; }
.ed-emoji .em-num:hover { opacity: .85; background: var(--primary); }
.ed-duch { position: fixed; top: -1000px; left: -1000px; max-width: 220px; padding: 8px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.2); font-size: 13px; color: var(--foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-duch img { display: block; width: 160px; height: 90px; object-fit: cover; object-position: top; border-radius: 4px; }
.ed-doc .eb.ciagniety { opacity: .35; }
.ed-pop .ed-row[data-m="usun"], .ed-pop .ed-row[data-m="usun"] .ico, .ed-pop .ed-row[data-m="usun"] kbd { color: var(--destructive, #dc2626); }
.ed-pop .ed-row[data-m="usun"]:hover { background: color-mix(in srgb, var(--destructive, #dc2626) 10%, transparent); }
.ed-bar button.on { background: var(--accent); }
.ed-bar button.on b, .ed-bar button.on i, .ed-bar button.on u, .ed-bar button.on s { color: var(--foreground); }
.ed-lk-akcje { display: flex; gap: 6px; padding: 6px 2px 2px; }
.ed-pop2 .ed-lk-in { margin-bottom: 0; }
.ed-pop2.ed-pop-lk { width: 380px; padding: 8px 10px 10px; }
.ed-lk-rzad { display: flex; gap: 8px; align-items: center; }
.ed-lk-rzad .ed-pop-szuk { flex: 1; min-width: 0; margin-bottom: 0; }
.ed-pop .lk-ok { width: auto; flex: none; height: 34px; padding: 0 16px; border-radius: 8px; background: var(--primary); color: var(--primary-foreground); font-weight: 500; text-align: center; }
.ed-pop .lk-ok:hover { background: var(--primary); opacity: .88; }
.ed-pop .lk-usun { width: auto; margin-top: 6px; padding: 4px 6px; font-size: 13px; color: var(--destructive, #e7000b); }
.ed-pop .lk-usun:hover { background: color-mix(in srgb, var(--destructive, #e7000b) 10%, transparent); }
.ed-pop2.ed-pop-lk .ed-pop-tyt { padding: 2px 0 6px 2px; }

/* tabela w edytorze jak w Notion: uchwyty wierszy i kolumn, paski dodawania */
.ed-doc .b-table.ed-tbl { overflow: visible; margin: 14px 0 20px; }
.ed-tbl .tbl-rz { display: flex; gap: 8px; align-items: stretch; }
.ed-tbl .tbl-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ed-tbl table { table-layout: fixed; }
.ed-tbl td { position: relative; }
.ed-tbl td:focus-within { box-shadow: inset 0 0 0 2px var(--txt-niebieski); }
.ed-tbl .tg-row, .ed-tbl .tg-col { position: absolute; z-index: 3; border: 0; border-radius: 6px; background: var(--card); color: var(--muted-foreground); box-shadow: 0 0 0 1px var(--border); cursor: pointer; opacity: 0; display: grid; place-items: center; padding: 0; }
.ed-tbl .tg-row { left: -8px; top: 50%; transform: translateY(-50%); width: 16px; height: 26px; }
/* uchwyt wiersza siedzi na lewej krawędzi tabeli, więc uchwyt całego bloku odsuwamy trochę w lewo, żeby się nie nakładały */
@media (min-width: 901px) { .eb-table > .eb-tools { left: -60px; } }
.ed-tbl .tg-col { top: -11px; left: 50%; transform: translateX(-50%); width: 26px; height: 16px; }
.ed-tbl tr:hover .tg-row, .ed-tbl td:hover .tg-col, .ed-tbl td:focus-within .tg-col, .ed-tbl td:focus-within .tg-row, .ed-tbl tr.tg-sel .tg-row, .ed-tbl td.tg-selk .tg-col { opacity: 1; }
.ed-tbl .tg-row:hover, .ed-tbl .tg-col:hover { background: var(--accent); color: var(--foreground); }
.ed-tbl tr.tg-sel .tg-row, .ed-tbl td.tg-selk .tg-col { background: var(--txt-niebieski); color: #fff; box-shadow: none; }
.ed-tbl tr.tg-sel td { background: rgba(35, 131, 226, .12); box-shadow: inset 0 2px 0 var(--txt-niebieski), inset 0 -2px 0 var(--txt-niebieski); }
.ed-tbl tr.tg-sel td:first-child { box-shadow: inset 0 2px 0 var(--txt-niebieski), inset 0 -2px 0 var(--txt-niebieski), inset 2px 0 0 var(--txt-niebieski); }
.ed-tbl tr.tg-sel td:last-child { box-shadow: inset 0 2px 0 var(--txt-niebieski), inset 0 -2px 0 var(--txt-niebieski), inset -2px 0 0 var(--txt-niebieski); }
.ed-tbl td.tg-selk { background: rgba(35, 131, 226, .12); box-shadow: inset 2px 0 0 var(--txt-niebieski), inset -2px 0 0 var(--txt-niebieski); }
.ed-tbl .tg-add-row, .ed-tbl .tg-add-col { border: 0; background: var(--muted); border-radius: 8px; color: var(--muted-foreground); cursor: pointer; display: grid; place-items: center; font: inherit; font-size: 16px; opacity: 0; transition: opacity .12s; position: relative; }
.ed-tbl .tg-add-row { height: 26px; width: 100%; }
.ed-tbl .tg-add-col { width: 26px; }
.ed-tbl:hover .tg-add-row, .ed-tbl:hover .tg-add-col, .ed-tbl:focus-within .tg-add-row, .ed-tbl:focus-within .tg-add-col { opacity: 1; }
.ed-tbl .tg-add-row:hover, .ed-tbl .tg-add-col:hover { background: var(--accent); color: var(--foreground); }
.ed-tbl [data-tip]:hover::after { content: attr(data-tip); position: absolute; z-index: 20; background: #262626; color: #fff; font-size: 12px; line-height: 1.3; padding: 6px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none; top: calc(100% + 6px); right: 0; }
.ed-tbl .tg-add-row[data-tip]:hover::after { left: 50%; right: auto; transform: translateX(-50%); }
.ed-row .sw { width: 34px; height: 20px; border-radius: 10px; background: var(--border); position: relative; flex: none; transition: background .12s; }
.ed-row .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .12s; }
.ed-row .sw.on { background: var(--txt-niebieski); }
.ed-row .sw.on::after { transform: translateX(14px); }
.ed-pop .ed-row[data-m="t-usun"], .ed-pop .ed-row[data-m="t-usun"] .ico, .ed-pop .ed-row[data-m="t-usun"] kbd { color: var(--destructive, #e7000b); }
.ed-pop .ed-row[data-m="t-usun"]:hover { background: color-mix(in srgb, var(--destructive, #e7000b) 10%, transparent); }
.pub-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
#widokBtn[hidden] { display: none; }
.wd-opts { display: grid; gap: 2px; margin-bottom: 6px; }
.wd-opt { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.wd-opt:hover { background: var(--muted); }
.wd-opt input { width: 16px; height: 16px; accent-color: var(--primary); }
.wd-sort { display: grid; grid-template-columns: 1fr 130px auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.wd-akcje { display: flex; gap: 6px; }
/* brief: formularz klienta i widok odpowiedzi w CMS */
.brief-wstep { margin: 0 0 18px; color: var(--muted-foreground); }
.brief-ok { margin-bottom: 18px; }
.brief-sekcja { padding: 20px 22px; margin-bottom: 14px; }
.brief-sekcja h2 { font-size: 16px; margin: 0 0 14px; }
.brief-sekcja textarea.input { min-height: 96px; resize: vertical; }
.brief-odp { padding: 12px 0; border-top: 1px solid var(--border); }
.brief-odp:first-of-type { border-top: 0; }
.brief-odp dt { font-size: 13px; color: var(--muted-foreground); margin-bottom: 4px; }
.brief-odp dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.brief-link { display: flex; gap: 8px; }
.brief-link .input { flex: 1; min-width: 0; }
/* panel galerii: wyższy przycisk, miniatury w całości na białym tle (loga z przezroczystością są widoczne w ciemnym motywie) */
.gal-panel [data-g="dodaj"] { flex-shrink: 0; min-height: 44px; height: 44px; width: 100%; justify-content: center; font-size: 15px; }
.gal-it img { object-fit: contain; object-position: center; background: #fff; height: 130px; }
/* projekt: lista ofert i briefów do dołączenia, z odstępami od krawędzi karty i przyciskiem w jednym rzędzie ze statusem */
.przyp-lista > * { padding: 14px 24px; }
.przyp-lista .li { gap: 16px; }
.przyp-lista .li .end { flex-direction: row; align-items: center; gap: 12px; }
.przyp-lista .li .end .btn { flex-shrink: 0; }
.sheet-h3 { font-size: 14px; font-weight: 600; margin: 18px 0 4px; }
.sheet-h3:first-child { margin-top: 0; }
.sheet .przyp-lista > * { padding: 12px 0; }
/* podgląd oferty lub briefu w okienku */
.podg-dlg { position: fixed; z-index: 46; inset: 24px; margin: auto; width: min(960px, calc(100vw - 24px)); height: min(820px, calc(100vh - 24px)); background: var(--background); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; overflow: hidden; }
.podg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--border); flex: none; }
.podg-head h2 { margin: 0 0 4px; font-size: 18px; }
.podg-head p { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.podg-akcje { display: flex; align-items: center; gap: 8px; flex: none; }
.podg-body { overflow: auto; padding: 24px; flex: 1; min-height: 0; }
.podg-okl { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; margin-bottom: 18px; display: block; }
.podg-body .doc { max-width: 760px; margin: 0 auto; }
.podg-body .brief-sekcja { padding: 0 0 8px; margin: 0 0 18px; border: 0; background: none; }
/* biblioteka mediów wbudowana w Ustawienia */
.media-embed { display: flex; height: min(720px, calc(100vh - 220px)); min-height: 420px; }
.media-embed .dialog-body { border-top: 0; width: 100%; }
.media-embed .dn .c { margin-left: auto; font-size: 12px; color: var(--muted-foreground); }
.podg-img { display: block; max-width: 100%; max-height: 100%; margin: 0 auto; border-radius: 8px; }
.podg-body .pdf-frame { width: 100%; height: 100%; min-height: 60vh; border: 0; }
/* przycisk „Utwórz” z rozwijaną listą */
.dd { position: relative; display: inline-flex; }
.dd > .btn svg:last-child { margin-left: 2px; width: 14px; height: 14px; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; z-index: 30; padding: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.28); display: flex; flex-direction: column; gap: 2px; }
.dd-menu[hidden] { display: none; }
.dd-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; font: inherit; color: var(--foreground); }
.dd-menu button:hover { background: var(--accent, var(--muted)); }
.dd-menu button svg { width: 16px; height: 16px; color: var(--muted-foreground); flex: none; }

/* wygaszacz ekranu: pełnoekranowa blokada z zegarem i polem PIN */
.lock { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--background); overflow: hidden; }
.lock[hidden] { display: none; }
.lock-bg { position: absolute; inset: -20%; background: radial-gradient(40% 40% at 25% 30%, color-mix(in srgb, var(--foreground) 9%, transparent), transparent 70%), radial-gradient(35% 35% at 75% 70%, color-mix(in srgb, var(--foreground) 7%, transparent), transparent 70%); animation: lock-dryf 24s ease-in-out infinite alternate; }
@keyframes lock-dryf { from { transform: translate(-3%, -2%) scale(1); } to { transform: translate(3%, 3%) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .lock-bg { animation: none; } }
.lock-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(640px, calc(100vw - 32px)); text-align: center; }
.lock-logo { margin-bottom: 18px; }
.lock-user { display: flex; align-items: center; gap: 10px; color: var(--muted-foreground); }
.lock-user b { font-weight: 500; color: var(--foreground); }
.lock-user .avatar { width: 28px; height: 28px; font-size: 11px; }
.lock-sub { margin: 10px 0 0; color: var(--muted-foreground); font-size: 15px; }
.lock-tyt { margin: 0; font-size: clamp(26px, 5vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.lock-pola { display: flex; gap: 14px; margin: 18px 0 4px; }
.lock-cyfra { width: 58px; height: 74px; box-sizing: border-box; border: 2px solid color-mix(in srgb, var(--foreground) 28%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--foreground) 4%, var(--background)); color: var(--foreground); font: inherit; font-size: 34px; text-align: center; padding: 0; caret-color: transparent; outline: none; -webkit-text-security: disc; text-security: disc; transition: border-color .12s, background .12s; }
.lock-cyfra:focus { border-color: var(--foreground); background: color-mix(in srgb, var(--foreground) 8%, var(--background)); }
.lock-cyfra:not(:placeholder-shown) { border-color: color-mix(in srgb, var(--foreground) 60%, transparent); }
.lock-pola.zly .lock-cyfra { border-color: var(--destructive); animation: lock-trzes .4s; }
@keyframes lock-trzes { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .lock-pola.zly .lock-cyfra { animation: none; } }
.lock-err { min-height: 20px; width: auto; background: none; padding: 0; }
.lock-stopka { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; color: var(--muted-foreground); }
.lock-time { font-size: 28px; font-weight: 300; font-variant-numeric: tabular-nums; color: var(--foreground); opacity: .8; }
.lock-date { font-size: 13px; margin-top: 2px; }
@media (max-width: 420px) { .lock-cyfra { width: 46px; height: 62px; font-size: 28px; } .lock-pola { gap: 10px; } }
.wyg-sw { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.wyg-pin { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--border); padding-top: 18px; }
/* tapeta ekranu blokady: obraz na całe tło, przyciemniony, a tekst zawsze jasny */
.lock-tapeta { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lock-tapeta[hidden] { display: none; }
.lock.z-tapeta { --foreground: #fafafa; --background: #0a0a0a; --muted-foreground: #d4d4d4; --destructive: #ff6b6b; background: #0a0a0a; color: #fafafa; }
.lock.z-tapeta .lock-bg { background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .62)); animation: none; inset: 0; backdrop-filter: blur(2px); }
.lock.z-tapeta .lock-cyfra { background: rgba(0, 0, 0, .35); }
.lock.z-tapeta .btn-ghost { color: #fafafa; }
.wyg-tapeta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.wyg-podglad { width: 160px; height: 90px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--muted); font-size: 12px; text-align: center; }
.wyg-podglad img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lock.z-tapeta .avatar { background: rgba(255, 255, 255, .2); color: #fff; }

.t-opis { display: flex !important; align-items: center; gap: 4px; color: var(--muted-foreground); font-weight: 400; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.t-opis > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.t-opis svg { width: 12px; height: 12px; flex: none; }
.pub-akcept .pub-btns { justify-content: center; }
.pub-akcept { text-align: center; }

/* spis treści oferty */
.toc { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 30; width: 36px; padding: 10px 0; }
.toc-lines { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toc-k { display: block; height: 2px; width: 18px; border-radius: 2px; background: var(--border); transition: width .15s, background .15s; }
.toc-k.on { width: 32px; background: var(--foreground); }
.toc-panel { display: none; position: absolute; right: -8px; top: 50%; transform: translateY(-50%); width: 280px; max-height: 70vh; overflow-y: auto; padding: 14px 16px; background: var(--background); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.toc:hover .toc-panel, .toc:focus-within .toc-panel { display: block; }
.toc-a { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; font: inherit; font-size: 14px; line-height: 1.35; color: var(--muted-foreground); cursor: pointer; border-radius: 8px; }
.toc-a:hover { color: var(--foreground); background: var(--muted); }
.toc-a.on { color: var(--blue-fg, #2563eb); }
.toc-l2 { padding-left: 20px; } .toc-l3 { padding-left: 32px; }
@media (max-width: 1180px) { .toc { display: none; } }
@media print { .toc { display: none !important; } }

/* dzwoneczek */
.bell { position: relative; }
.bell[hidden] { display: none; }
.bell-dot { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; pointer-events: none; }
.bell-dot[hidden] { display: none; }
.bell-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 360px; max-width: calc(100vw - 24px); max-height: 70vh; overflow-y: auto; z-index: 40; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.2); }
.bell-menu[hidden] { display: none; }
.bell-head { padding: 12px 14px; font-weight: 600; border-bottom: 1px solid var(--border); }
.bell-row { display: grid; gap: 4px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.bell-row:last-child { border-bottom: 0; }
.bell-row.nowe { background: var(--muted); }
.bell-row .badge { justify-self: start; }
.bell-opis { font-size: 14px; word-break: break-word; }
.bell-pusto { padding: 18px 14px; font-size: 14px; }
.pcard .p-termin { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.pcard .p-termin svg { width: 14px; height: 14px; }
.bell-dot { top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border: 2px solid var(--background); font-size: 10px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.bell-dot { padding: 0 3px; }
a.bell-row { color: inherit; text-decoration: none; }
a.bell-row:hover { background: var(--muted); }
.crumbs + .bell { margin-left: auto; }

/* strefa wgrywania plików (panel klienta) */
.kl-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px 16px; margin-top: 12px; text-align: center; border: 1.5px dashed var(--border); border-radius: 14px; background: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.kl-drop:hover, .kl-drop.on, .kl-drop:focus-within { border-color: var(--foreground); background: var(--accent, var(--muted)); }
.kl-drop svg { width: 26px; height: 26px; color: var(--muted-foreground); margin-bottom: 4px; }
.kl-drop b { font-weight: 500; }
.kl-drop span { font-size: 13px; }
.kl-drop small { font-size: 12px; min-height: 1em; }
.kl-drop-in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* kalendarz Google */
.kal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; align-items: start; }
.kal.z-panelem { grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; }
.kal-main { min-width: 0; }
.kal-info { align-items: flex-start; gap: 12px; max-width: 560px; }
.kal-info > svg { width: 28px; height: 28px; color: var(--muted-foreground); }
.kal-info h2 { font-size: 18px; margin: 0; }
.kal-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.kal-tyt { font-size: 26px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.kal-load { font-size: 13px; }
.kal-kals { right: 0; min-width: 240px; padding: 8px; }
.kal-kal { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.kal-kal:hover { background: var(--muted); }
.kal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--kol, #4285f4); flex: none; display: inline-block; }
.kal-dni { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); color: var(--muted-foreground); font-size: 13px; text-align: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.kal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--border); }
.kal-dz { min-height: 124px; padding: 6px 6px 4px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.kal-dz:hover { background: var(--muted); }
.kal-dz.inne { color: var(--muted-foreground); }
.kal-dz.inne .kal-num span { opacity: .6; }
.kal-dz.wyb { background: var(--muted); }
.kal-num { display: flex; justify-content: flex-end; font-size: 13px; padding-bottom: 2px; }
.kal-num span { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.kal-dz.dzis .kal-num span { background: #ef4444; color: #fff; font-weight: 600; }
.kal-ev { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--kol, #4285f4); border-radius: 5px; padding: 2px 6px; font: inherit; font-size: 12px; line-height: 1.5; cursor: pointer; color: var(--foreground); background: color-mix(in srgb, var(--kol, #4285f4) 22%, var(--background)); min-width: 0; }
.kal-ev small { font-size: 11px; opacity: .8; font-variant-numeric: tabular-nums; flex: none; }
.kal-ev span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kal-ev.caly { background: color-mix(in srgb, var(--kol, #4285f4) 55%, var(--background)); }
.kal-ev.on, .kal-ev:hover { outline: 2px solid var(--kol, #4285f4); outline-offset: -1px; }
.kal-wiecej { border: 0; background: none; color: var(--muted-foreground); font: inherit; font-size: 12px; text-align: left; padding: 0 6px; cursor: pointer; }
.kal-wiecej:hover { color: var(--foreground); }
.kal-panel { position: sticky; top: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; max-height: calc(100vh - 100px); overflow-y: auto; }
.kal-panel[hidden] { display: none; }
.kal-p-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.kal-p-head b { flex: 1; text-transform: capitalize; }
.kal-tytul { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 18px; font-weight: 600; color: var(--foreground); padding: 4px 0; outline: none; border-bottom: 1px solid transparent; }
.kal-tytul:focus { border-bottom-color: var(--border); }
.kal-form { display: flex; flex-direction: column; gap: 12px; }
.kal-kalnazwa { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-foreground); }
.kal-chk { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.kal-czas { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; }
.kal-czas .input { min-width: 0; }
.kal-czas .muted { display: none; }
.kal-akcje { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kal-del { color: var(--destructive); }
.kal-lista { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.kal-meet { align-self: flex-start; }
@media (max-width: 1100px) { .kal.z-panelem { grid-template-columns: minmax(0, 1fr); } .kal-panel { position: static; max-height: none; } }
@media (max-width: 700px) { .kal-dz { min-height: 84px; padding: 4px 3px; } .kal-ev small { display: none; } .kal-tyt { font-size: 20px; } }

/* responsywność: zakładki umów przewijane w poziomie zamiast rozpychać stronę, a w pasku edytora oferty ukryty zbędny napis „Zapisano” (błąd zapisu nadal widać) */
@media (max-width: 700px) {
  .toolbar-umowy > .tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .toolbar-umowy > .tabs::-webkit-scrollbar { display: none; }
  .toolbar-umowy > .tabs .tab { flex: none; }
}
@media (max-width: 560px) {
  .topbar .ed-save:not(.blad) { display: none; }
  .topbar { gap: 8px; }
}

/* nagłówki kart z przyciskami (Materiały projektu, dane klienta): na telefonie przyciski schodzą pod tytuł zamiast go zgniatać i wypychać stronę */
@media (max-width: 700px) {
  .card:not(.tl) .card-head:has(> .tl-head-r) { flex-wrap: wrap; }
  .card:not(.tl) .card-head:has(> .tl-head-r) > div:first-child { flex: 1 1 100%; }
  .card:not(.tl) .card-head > .tl-head-r { flex-wrap: wrap; gap: 8px; }
}

/* zakładka Pliki w projekcie: karty w osobnym kontenerze, więc odstęp jak między kartami na reszcie strony */
#plWrap { display: flex; flex-direction: column; gap: 24px; }

/* Integracje → MCP */
.mcp-cmd { display: flex; gap: 8px; align-items: flex-start; }
.mcp-pre { flex: 1; min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--muted); font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.mcp-nowy { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--muted) 60%, transparent); }
.mcp-nowy > .btn { align-self: flex-start; }
.mcp-lista { display: flex; flex-direction: column; }
.mcp-tok { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.mcp-tok small { display: block; }
@media (max-width: 560px) { .mcp-cmd { flex-direction: column; align-items: stretch; } }

/* przyciski pod formularzami (Integracje i inne): odstęp między nimi */
.form .btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }

/* Miniatury plików w zakładce „Pliki” projektu */
.plik-wiersz { display: flex; align-items: center; gap: 12px; }
.plik-mini { position: relative; flex: none; display: block; width: 48px; height: 48px; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: var(--muted); }
.plik-mini img { display: block; width: 100%; height: 100%; object-fit: cover; }
.plik-mini-pdf iframe { position: absolute; top: 0; left: 0; width: 480px; height: 560px; border: 0; background: #fff; transform: scale(0.1); transform-origin: 0 0; pointer-events: none; }
.plik-mini-ext { display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted-foreground); }

/* Pasek postępu projektu na okładce: z lewej strony, na wysokości przycisków okładki, na tle karty */
.ed-cover .proj-progress-cover { position: absolute; left: 24px; bottom: 12px; width: 260px; max-width: calc(100% - 48px); height: 32px; gap: 12px; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px; color: var(--foreground); background: var(--card); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); box-sizing: border-box; align-items: center; }
.ed-cover .proj-progress-cover .pp-pct { font-size: 14px; font-weight: 600; min-width: 36px; }
@media (max-width: 720px) { .ed-cover .proj-progress-cover { left: 12px; width: 180px; } }

.plik-autor { display: flex; align-items: center; gap: 10px; color: var(--muted-foreground); }
.plik-autor .avatar { width: 30px; height: 30px; font-size: 11px; }

.plik-akcje { white-space: nowrap; }
.plik-akcje .btn-icon { width: 32px; height: 32px; }
.plik-akcje .btn-icon svg.i { width: 18px; height: 18px; }
.plik-akcje .plik-usun:hover { color: #dc2626; }

/* Ikona oferty i briefu zamiast zdjęcia w tabeli plików */
.plik-mini-ikona { display: flex; align-items: center; justify-content: center; color: var(--muted-foreground); }
.plik-mini-ikona svg.i { width: 22px; height: 22px; }
/* Brief do wydruku (zapis do PDF): na ekranie ukryty, w druku jedyna widoczna treść */
#drukBrief { display: none; }
@media print {
  body.drukuje-brief > *:not(#drukBrief) { display: none !important; }
  body.drukuje-brief { background: #fff !important; }
  body.drukuje-brief #drukBrief { display: block; max-width: 720px; margin: 0 auto; padding: 0; color: #111; background: #fff; font-size: 12pt; line-height: 1.5; }
  #drukBrief h1 { font-size: 22pt; margin: 0 0 4px; }
  #drukBrief .druk-meta { margin: 0 0 20px; color: #555; }
  #drukBrief .brief-sekcja { margin: 0 0 18px; break-inside: avoid-page; }
  #drukBrief .brief-sekcja h2 { font-size: 14pt; margin: 0 0 8px; padding-bottom: 4px; border-bottom: 1px solid #ddd; }
  #drukBrief dt { font-weight: 600; margin-top: 8px; }
  #drukBrief dd { margin: 2px 0 0; white-space: pre-wrap; }
  #drukBrief .muted { color: #888; }
}

.gen-multi { display: grid; gap: 2px; }
.gen-multi .check { align-items: flex-start; font-size: 13.5px; color: var(--foreground); margin: 3px 0; line-height: 1.35; }
.gen-multi .check input { margin-top: 3px; flex: none; }
.gen-doc h2.gd-zal { margin-top: 34px; font-size: 15px; }
.gen-akcje-rg { flex-wrap: wrap; }
.gen-akcje-rg .btn { flex: 1 1 auto; white-space: nowrap; justify-content: center; }
.gen-akcje-rg #rgPdf { flex-basis: 100%; }
.gen-form #rgWyczysc { width: auto; display: inline-flex; color: var(--muted-foreground); padding-left: 10px; padding-right: 10px; }
.gen-form #rgWyczysc:hover { color: #c62a2f; background: rgba(229, 72, 77, .10); }

/* Ustawienia konta: zalogowane urządzenia */
.sesje-tytul { margin-top: 24px; }
.sesje-lista { margin: 0 0 12px; padding-left: 18px; }

/* Wyślij do akceptacji: blok w panelu zadania i okno z wiadomością i plikami */
.akc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--muted); }
.akc-stan { font-size: 13px; color: var(--muted-foreground); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#akcRoot .akc-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 70; animation: fade .15s; }
.akc { position: fixed; z-index: 71; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); display: flex; flex-direction: column; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: fade .15s; }
.akc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; flex: none; }
.akc-head h2 { margin: 2px 0 0; font-size: 17px; line-height: 1.3; }
.akc-body { display: flex; flex-direction: column; gap: 16px; padding: 4px 20px 16px; overflow: auto; }
.akc-body textarea.input { min-height: 120px; height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.akc-file { display: none; }
.akc-pick { align-self: flex-start; }
.akc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.akc-list:empty { display: none; }
.akc-list li { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 13px; }
.akc-list .akc-nazwa { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.akc-foot { display: flex; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--border); flex: none; }

/* Okno wysyłki do akceptacji: podgląd wybranych plików */
.akc-list li { padding: 6px 6px 6px 6px; }
.akc-mini { flex: none; width: 56px; height: 56px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--muted); overflow: hidden; padding: 0; display: grid; place-items: center; cursor: zoom-in; }
.akc-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.akc-mini-plik { cursor: default; flex-direction: column; gap: 2px; color: var(--muted-foreground); align-content: center; }
.akc-mini-plik svg { width: 18px; height: 18px; }
.akc-mini-plik b { font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.akc-zoom { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--background) 92%, transparent); cursor: zoom-out; border-radius: inherit; }
.akc-zoom img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-md); }

/* Panel klienta: lista plików projektu */
.plik-nazwa { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plik-nazwa small { font-size: 12px; }
.plik-autor { display: inline-flex; align-items: center; gap: 8px; }

/* Brief (zespół i klient): ciaśniejsze odstępy między tytułem sekcji a pytaniami */
.brief-sekcja h2 { margin: 0 0 6px; }
.brief-sekcja dl { margin: 0; }
.brief-odp { padding: 10px 0; }

.notatka-tresc { white-space: pre-wrap; margin: 0; line-height: 1.55; }
.notatka-karta textarea { width: 100%; resize: none; overflow: hidden; min-height: 96px; }
.notatka-btns { margin-top: 10px; display: flex; gap: 8px; }
.kl-notatka, .notatka-karta { margin-top: 16px; }

.kl-fb textarea { width: 100%; resize: vertical; }
.kl-fb .field { margin-bottom: 12px; }
.kl-fb-hist, #fbHist .card { margin-top: 16px; }
.kl-fb-wpis { padding: 12px 0; border-top: 1px solid var(--border, #e5e5e5); }
.kl-fb-wpis:first-of-type { border-top: 0; }
.fb-wpis { margin-bottom: 14px; }
.fb-nowe { border-left: 3px solid #2563eb; }

/* Mockup Studio: wąska kolumna ujęć, duży podgląd, pływające paski */
.mk { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - 150px); min-height: 560px; border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; background: var(--card); }
.mk-panel { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); }
.mk-panel-gora { padding: 14px; display: grid; gap: 10px; border-bottom: 1px solid var(--border); }
.mk-szukaj { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--muted-foreground); background: var(--background); }
.mk-szukaj:focus-within { border-color: var(--ring); }
.mk-szukaj input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; color: var(--foreground); }
.mk-filtry { display: flex; flex-wrap: wrap; gap: 4px; }
.mk-filtr { border: 0; background: transparent; border-radius: 999px; height: 30px; padding: 0 11px; font: inherit; font-size: 13px; font-weight: 500; color: var(--muted-foreground); cursor: pointer; }
.mk-filtr:hover { background: var(--muted); color: var(--foreground); }
.mk-filtr.on { background: var(--primary); color: var(--primary-foreground); }
.mk-lista { flex: 1; min-height: 0; overflow: auto; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: max-content; gap: 8px; align-content: start; }
.mk-pusto { grid-column: 1 / -1; font-size: 13px; }
.mk-karta { position: relative; border: 0; padding: 0; background: var(--muted); border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4 / 3; cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.mk-karta img, .mk-karta canvas.mk-mini { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.mk-karta:hover img, .mk-karta:hover canvas.mk-mini { transform: scale(1.03); }
.mk-karta.on { outline-color: var(--foreground); }
.mk-karta:focus-visible { outline-color: var(--ring); }
.mk-karta canvas[hidden], .mk-karta img[hidden] { display: none; }
.mk-scena { position: relative; min-width: 0; min-height: 0; background: var(--muted); display: flex; align-items: center; justify-content: center; padding: 68px 24px 76px; }
.mk-plotno { position: relative; border-radius: 12px; overflow: hidden; background: #f2f2f2; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .35); }
.mk-plotno canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.mk-plotno.maobraz canvas { cursor: grab; }
.mk-plotno canvas.chwyt { cursor: grabbing; }
.mk-stan { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .8); font-size: 14px; color: #555; padding: 20px; text-align: center; }
.mk-gora { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; z-index: 2; }
.mk-zrzut { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 3px 0 3px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); min-width: 0; max-width: 360px; box-shadow: var(--shadow-xs); }
.mk-zrzut.pusty { padding-right: 12px; }
.mk-zrzut img { width: 46px; height: 30px; object-fit: cover; border-radius: 5px; flex: none; }
.mk-zrzut span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mk-zrzut small { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; flex: none; }
.mk-zrzut.pusty small { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
.mk-akcje { display: flex; gap: 8px; flex: none; }
.mk-akcje .btn, .mk-zrzut .btn { gap: 6px; }
.mk-dol { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; background: color-mix(in srgb, var(--card) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .18); white-space: nowrap; max-width: calc(100% - 32px); z-index: 2; }
.mk-dol:has(.mk-kadr[hidden]) { padding-left: 12px; }
.mk-kadr { display: flex; align-items: center; gap: 10px; }
.mk-kadr[hidden] { display: none; }
.mk-sep { width: 1px; height: 22px; background: var(--border); flex: none; }
.mk-seg { display: inline-flex; padding: 3px; background: var(--muted); border-radius: var(--radius-md); gap: 2px; }
.mk-seg button { border: 0; background: transparent; height: 28px; padding: 0 10px; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 500; color: var(--muted-foreground); cursor: pointer; }
.mk-seg button.on { background: var(--card); color: var(--foreground); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px rgba(0, 0, 0, .04); }
.mk-zoom { display: flex; align-items: center; gap: 8px; width: 170px; color: var(--muted-foreground); }
.mk-zoom input { flex: 1; min-width: 0; }
.mk-info { font-size: 12px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; }
.mk-upusc { position: absolute; inset: 12px; border: 2px dashed var(--ring); border-radius: 14px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--card) 86%, transparent); font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 3; }
.mk-scena.drag .mk-upusc { opacity: 1; }
/* Strefa upuszczania i wiersze suwaków: używa ich Konwerter */
.mk-drop { border: 1.5px dashed var(--border, #cfd3da); border-radius: 12px; padding: 18px 12px; text-align: center; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.mk-drop b { font-size: 14px; } .mk-drop span { font-size: 13px; color: #6b7280; } .mk-drop u { color: inherit; }
.mk-drop:hover, .mk-drop.on, .mk-drop:focus-visible { border-color: #111; background: rgba(0, 0, 0, .03); outline: none; }
.mk-drop img { max-width: 100%; max-height: 110px; border-radius: 6px; margin-top: 8px; object-fit: contain; }
.mk-suwak { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: #6b7280; }
.mk-suwak input { flex: 1; }
.mk-rzad { display: grid; grid-template-columns: 112px 1fr 40px; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: #6b7280; }
.mk-rzad output { text-align: right; font-variant-numeric: tabular-nums; }
.mk-zrzut > svg { flex: none; margin-left: 8px; color: var(--muted-foreground); }
.mk-play { width: 32px; padding: 0; }
.mk-czas { font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.mk-nagrywa .mk-panel, .mk-nagrywa .mk-dol, .mk-nagrywa .mk-zrzut { pointer-events: none; opacity: .5; }
@media (max-width: 900px) {
  .mk { grid-template-columns: 1fr; height: auto; }
  .mk-panel { border-right: 0; border-bottom: 1px solid var(--border); max-height: 340px; }
  .mk-scena { height: 70vh; min-height: 420px; padding: 64px 12px 72px; }
  .mk-dol { left: 12px; right: 12px; transform: none; overflow-x: auto; max-width: none; }
  .mk-zrzut small, .mk-akcje .btn span { display: none; }
}

.chart.daily { gap: 3px; }
.chart.daily .bars { max-width: none; }
.chart.daily .bars i:first-child { border-radius: 3px 3px 0 0; }
.chart.daily .bar-col .lbl { font-size: 11px; overflow: visible; }
@media (max-width: 560px) { .chart.daily { gap: 1px; } .chart.daily .bar-col .lbl { font-size: 10px; } }

.gr-siatka { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.gr-kafel { border: 1px solid var(--border, #e3e5ea); background: #fff; border-radius: 10px; padding: 6px; cursor: zoom-in; text-align: left; font: inherit; display: flex; flex-direction: column; gap: 6px; }
.gr-kafel img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: #f1f1f1; }
.gr-kafel span { font-size: 12px; color: #555; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gr-kafel:hover { border-color: #111; }



.prj-mini { flex: none; width: 56px; height: 42px; border-radius: 8px; overflow: hidden; background: #f1f1f1; display: flex; align-items: center; justify-content: center; color: #9aa0aa; }
.prj-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prj-mini svg { width: 20px; height: 20px; }
.li-col .prog { display: flex; align-items: center; gap: 12px; }
.li-col .prog .progress { flex: 1; }
.li-col .prog .pct { font-size: 13px; font-weight: 600; min-width: 38px; font-variant-numeric: tabular-nums; }

.chart.daily .bar-col .v { min-height: 14px; }
.chart.daily .bar-col .lbl { min-height: 16px; }
.dash-nav { display: inline-flex; align-items: center; gap: 4px; }

.li-col:has(.prog) { gap: 2px; }
.li-col .prog { gap: 10px; }
.li-col .prog .pct { min-width: 34px; text-align: right; }

.chart.daily .bar-col .v { width: 0; display: flex; justify-content: center; overflow: visible; font-size: 10px; }
.chart.daily .bar-col .v b { font-weight: 500; white-space: nowrap; }

.chart.daily.tydzien { gap: 14px; }
.chart.daily.tydzien .bars { max-width: 72px; }
.chart.daily.tydzien .bar-col .v { font-size: 12px; }
.chart.daily.tydzien .bar-col .lbl { font-size: 12px; }
.dash-nav .tabs { margin-right: 6px; }

.dash-pod { display: flex; align-items: center; gap: 6px; margin: 2px 0 6px; }
.chart.daily.tydzien .bars { max-width: 96px; }

.kosz-zapl { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border, #d6d9df); background: transparent; color: #6b7280; border-radius: 999px; padding: 4px 12px 4px 8px; font: inherit; font-size: 13px; cursor: pointer; }
.kosz-zapl svg { width: 15px; height: 15px; opacity: .35; }
.kosz-zapl:hover { border-color: #111; color: #111; }
.kosz-zapl.on { background: rgba(48, 164, 108, .14); border-color: rgba(48, 164, 108, .5); color: #1c7a4d; }
.kosz-zapl.on svg { opacity: 1; }
tr.zaplacone td.num, tr.zaplacone td b { color: #6b7280; }

.prj-row { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.prj-row .prj-mini { width: 60px; height: 60px; border-radius: 12px; }
.prj-row .prj-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.prj-row .prog { display: flex; align-items: center; gap: 10px; }
.prj-row .prog .progress { flex: 1; }
.prj-row .prog .pct { font-size: 13px; font-weight: 600; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

/* Konwerter */
.kw { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.kw-panel { padding: 16px; position: sticky; top: 12px; }
.kw-panel .field { margin-top: 14px; }
.kw-tryby { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.kw-info { font-size: 12px; margin: 14px 0 0; }
.kw-rzad { grid-template-columns: 92px 1fr 34px; margin-top: 4px; }
.kw-lista { display: flex; flex-direction: column; }
.kw-wiersz { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border, #eceef1); }
.kw-mini { flex: none; width: 48px; height: 48px; border-radius: 8px; background: #f1f1f1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.kw-mini img { max-width: 100%; max-height: 100%; object-fit: contain; }
.kw-ext { font-size: 10px; font-weight: 600; color: #6b7280; }
.kw-nr { width: 18px; text-align: right; font-size: 12px; color: #6b7280; font-variant-numeric: tabular-nums; }
.kw-opis { flex: 1; min-width: 0; }
.kw-opis b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kw-opis small { display: block; font-size: 12px; color: #6b7280; }
.kw-blad { color: #c62a2f; }
.kw-stopka-akcje { display: inline-flex; gap: 8px; align-items: center; }
.kw-pusto { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 48px 20px; text-align: center; color: #6b7280; }
.kw-pusto b { color: var(--foreground, #111); }
@media (max-width: 900px) { .kw { grid-template-columns: 1fr; } .kw-panel { position: static; } }
.kw-opis small b { display: inline; font-weight: 600; color: var(--foreground, #111); }
/* Konwerter: kreator */
.kw2 { max-width: 920px; }
.kw-kroki { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; flex-wrap: wrap; }
.kw-kroki li button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; font: inherit; font-size: 14px; color: #8a909c; padding: 6px 10px 6px 6px; border-radius: 999px; cursor: default; }
.kw-kroki li button span { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #eceef1; font-size: 12px; font-weight: 600; }
.kw-kroki li.on button { color: var(--foreground, #111); font-weight: 600; }
.kw-kroki li.on button span { background: #111; color: #fff; }
.kw-kroki li.zrobione button { color: #444; cursor: pointer; }
.kw-kroki li.zrobione button:hover { background: rgba(0,0,0,.05); }
.kw-kroki li.zrobione button span { background: rgba(48,164,108,.16); color: #1c7a4d; }
.kw-kroki li:not(:last-child)::after { content: ""; display: inline-block; width: 18px; height: 1px; background: #d6d9df; vertical-align: middle; margin-left: 2px; }
.kw-karta { padding: 24px; }
.kw-tytul { font-size: 20px; margin: 0 0 4px; }
.kw-pod { margin: 0 0 16px; }
.kw-drop { padding: 36px 16px; }
.kw-lista-ramka { border: 1px solid var(--border, #eceef1); border-radius: 12px; margin-top: 14px; overflow: hidden; }
.kw-lista-ramka .kw-wiersz:last-child { border-bottom: 0; }
.kw-dol { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.kw-dol-glowny { justify-content: flex-end; }
.kw-cele { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.kw-cel { text-align: left; border: 1.5px solid var(--border, #e3e5ea); background: #fff; border-radius: 12px; padding: 14px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.kw-cel b { font-size: 16px; } .kw-cel span { font-size: 13px; color: #6b7280; line-height: 1.35; }
.kw-cel:hover:not(:disabled) { border-color: #111; } .kw-cel.on { border-color: #111; background: rgba(0,0,0,.03); }
.kw-cel:disabled { opacity: .45; cursor: not-allowed; }
.kw-siatka { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.kw-siatka .field { margin-bottom: 14px; }
.kw-szacunek { border: 1px solid var(--border, #eceef1); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.kw-szacunek span { font-size: 13px; color: #6b7280; } .kw-szacunek b { font-size: 22px; font-variant-numeric: tabular-nums; }
.kw-szacunek em { font-style: normal; font-weight: 600; font-size: 14px; } .kw-szacunek em.lepiej { color: #1c7a4d; } .kw-szacunek em.gorzej { color: #c62a2f; }
.kw-etyk { display: block; font-size: 14px; font-weight: 500; }
.kw-etyk + .kw-lista-ramka { margin-top: 6px; }
.kw-waskie { max-width: 420px; }
.kw-gotowy { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border, #eceef1); border-radius: 12px; padding: 14px; margin-top: 14px; }
@media (max-width: 760px) { .kw-siatka { grid-template-columns: 1fr; } }
.kw-notka { font-size: 13px; margin: 0 0 12px; }

.kw-dwa { display: flex; gap: 8px; align-items: center; }
.kw-dwa select { flex: 1; min-width: 0; }
.kw-px { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.kw-px input { width: 140px; }
.kw-px em { font-style: normal; color: #6b7280; font-size: 13px; }
.kw-etyk-odstep { margin-top: 18px; }
.kw-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.kw-modal-okno { background: var(--card, #fff); border-radius: 16px; padding: 18px; width: min(1000px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; gap: 12px; }
.kw-modal-gora { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.kw-kadr-scena { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #f2f2f2; border-radius: 10px; padding: 12px; overflow: hidden; }
.kw-kadr-obraz { position: relative; display: inline-block; touch-action: none; user-select: none; max-width: 100%; }
.kw-kadr-obraz img { display: block; max-width: 100%; max-height: calc(100vh - 220px); }
.kw-kadr-ramka { position: absolute; box-shadow: 0 0 0 9999px rgba(0,0,0,.5); outline: 2px solid #fff; cursor: move; }
.kw-kadr-ramka::before, .kw-kadr-ramka::after { content: ""; position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(255,255,255,.45); }
.kw-kadr-ramka::before { left: 33.33%; right: 33.33%; border-top: 0; border-bottom: 0; }
.kw-kadr-ramka::after { top: 33.33%; bottom: 33.33%; border-left: 0; border-right: 0; }
.kw-kadr-ramka i { position: absolute; width: 16px; height: 16px; background: #fff; border: 2px solid #111; border-radius: 3px; }
.kw-kadr-ramka i[data-r="nw"] { left: -8px; top: -8px; cursor: nwse-resize; } .kw-kadr-ramka i[data-r="se"] { right: -8px; bottom: -8px; cursor: nwse-resize; }
.kw-kadr-ramka i[data-r="ne"] { right: -8px; top: -8px; cursor: nesw-resize; } .kw-kadr-ramka i[data-r="sw"] { left: -8px; bottom: -8px; cursor: nesw-resize; }
.kw-kadr-scena { overflow: hidden; }

/* ---------- Styl strony (Narzędzia) ---------- */
.ss { display: flex; flex-direction: column; gap: 16px; }
.ss-gora { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ss-gora-l { display: grid; grid-template-columns: repeat(3, minmax(160px, 220px)); gap: 12px; }
.ss-akcje { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ss-eksport { display: inline-flex; gap: 8px; padding-left: 8px; border-left: 1px solid var(--border); }
.ss-sekcja { padding: 0; overflow: hidden; }
.ss-sekcja > .ss-pod-gora { padding: 20px 20px 0; }
.ss-panel { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.ss-boczny { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-right: 1px solid var(--border); min-width: 0; }
.ss-boczny-tresc { display: flex; flex-direction: column; gap: 12px; }
.ss-glowna { display: flex; flex-direction: column; gap: 14px; padding: 20px; min-width: 0; }
.ss-tytul { font-size: 16px; font-weight: 600; margin: 0; }
.ss-pod { font-size: 14px; font-weight: 600; margin: 8px 0 -4px; }
.ss-opis { margin: 0; font-size: 13px; color: var(--muted-foreground); }
.ss-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ss-3 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ss-3 > .field:last-child { grid-column: 1 / -1; }
.ss-3 .kw-px { display: flex; }
.ss-3 .kw-px input { width: 100%; min-width: 0; }
.ss-grupa { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.ss-grupa > b { font-size: 13px; font-weight: 600; }
.ss-pelny { width: 100%; }
.ss-pelny kbd { margin-left: auto; font: 500 11px/1 inherit; padding: 3px 6px; border-radius: 4px; background: rgba(255,255,255,.18); }
.btn-outline.ss-pelny kbd { background: var(--muted); }
.ss-zakladki { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius-md); background: var(--muted); }
.ss-zakladki button { flex: 1; height: 30px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--muted-foreground); cursor: pointer; }
.ss-zakladki button.on { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-xs); }
.ss-zakladki-l { align-self: flex-start; }
.ss-zakladki-l button { flex: none; padding: 0 14px; }
/* pole koloru jak w uicolors */
.ss-hex { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 8px; border: 1px solid var(--input); border-radius: var(--radius-md); background: var(--background); box-shadow: var(--shadow-xs); }
.ss-hex:focus-within { border-color: var(--ring, var(--foreground)); }
.ss-hex-kropka { position: relative; width: 24px; height: 24px; border-radius: 50%; flex: none; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.ss-hex-kropka input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.ss-hex-pole { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--foreground); font: 500 14px "Geist Mono", ui-monospace, monospace; text-transform: uppercase; }
.ss-ikona { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--muted-foreground); cursor: pointer; flex: none; }
.ss-ikona:hover { background: var(--accent); color: var(--foreground); }
.ss-ikona.on { color: var(--foreground); background: var(--muted); }
.ss-wybory { display: flex; flex-direction: column; gap: 6px; }
.ss-wybor { display: grid; grid-template-columns: 76px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--background); color: var(--foreground); font: inherit; cursor: pointer; }
.ss-wybor.on { border-color: var(--foreground); box-shadow: 0 0 0 1px var(--foreground); }
.ss-wybor-pas { grid-row: span 2; display: flex; height: 26px; border-radius: 5px; overflow: hidden; }
.ss-wybor-pas i { flex: 1; }
.ss-wybor b { font-size: 13px; font-weight: 600; } .ss-wybor small { font-size: 12px; color: var(--muted-foreground); }
/* palety */
.ss-palety { display: flex; flex-direction: column; gap: 18px; }
.ss-pal { display: flex; flex-direction: column; gap: 8px; }
.ss-pal-g { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ss-pal-g > b { font-size: 15px; font-weight: 600; }
.ss-chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); }
.ss-pal-a { margin-left: auto; display: flex; gap: 14px; }
.ss-link { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--muted-foreground); cursor: pointer; }
.ss-link:hover { color: var(--foreground); text-decoration: underline; }
.ss-kafle { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.ss-sw { position: relative; height: 76px; border: 0; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 1px; text-align: left; cursor: copy; font: inherit; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); transition: transform .12s ease; }
.ss-sw:hover { transform: translateY(-2px); }
.ss-sw b { font-size: 12px; font-weight: 600; line-height: 1.2; }
.ss-sw span { font: 400 11px/1.2 "Geist Mono", ui-monospace, monospace; opacity: .85; text-transform: uppercase; }
.ss-sw.baza::before { content: ""; position: absolute; top: 9px; left: 9px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ss-pal.male .ss-sw { height: 52px; padding: 6px 7px; }
.ss-pal.male .ss-pal-g > b { font-size: 14px; }
/* czytelność */
.ss-k { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; }
.ss-k:first-child { border-top: 0; }
.ss-k-wz { width: 36px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 600; border: 1px solid var(--border); }
.ss-k-n small { display: block; font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.ss-k-o { font-weight: 600; white-space: nowrap; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.ss-k-o.ok { background: #e7f6ec; color: #17663a; } .ss-k-o.srednio { background: #fdf3dc; color: #8a5a00; } .ss-k-o.zle { background: #fde8e8; color: #a12828; }
/* macierz kontrastu */
.ss-mac-okno { width: min(1040px, 100%); }
.ss-mac-wrap { overflow: auto; max-height: 64vh; }
.ss-mac { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: 11px; }
.ss-mac th { font-weight: 600; color: var(--muted-foreground); padding: 4px; white-space: nowrap; }
.ss-mac td { height: 44px; min-width: 52px; border-radius: 6px; text-align: center; cursor: copy; line-height: 1.15; }
.ss-mac td b { display: block; font-size: 12px; } .ss-mac td small { font-size: 10px; font-weight: 600; }
.ss-mac td.pusta { background: var(--muted); opacity: .45; cursor: default; }
/* typografia */
.ss-typ-gora { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ss-szer { display: grid; grid-template-columns: auto minmax(140px, 260px) auto; align-items: center; gap: 10px; font-size: 13px; }
.ss-szer label { white-space: nowrap; } .ss-szer b { font-variant-numeric: tabular-nums; }
.ss-szer-p { display: flex; gap: 2px; }
.ss-typ { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.ss-typ-w { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.ss-typ-l { display: flex; flex-direction: column; gap: 2px; grid-row: span 2; }
.ss-typ-l b { font-size: 14px; } .ss-typ-l span { font-size: 12px; font-variant-numeric: tabular-nums; }
.ss-typ-p { color: var(--foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-bottom: .08em; }
.ss-typ-pola { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.ss-mini { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted-foreground); position: relative; }
.ss-mini .input { height: 30px; width: 84px; padding: 0 8px; font-size: 13px; }
.ss-mini em { position: absolute; right: 8px; bottom: 7px; font-style: normal; font-size: 11px; pointer-events: none; }
.ss-mini input.input { padding-right: 26px; }
.ss-mini .input.zmienione { border-color: var(--foreground); font-weight: 600; }
.ss-clamp { margin-left: auto; max-width: 100%; border: 1px dashed var(--border); border-radius: 6px; background: var(--muted); padding: 5px 8px; cursor: copy; color: var(--muted-foreground); text-align: left; overflow: hidden; }
.ss-clamp code { font: 11px/1.3 "Geist Mono", ui-monospace, monospace; white-space: nowrap; }
.ss-clamp:hover { color: var(--foreground); }
.ss .ss-h { font-family: var(--ss-fn); }
.ss .ss-t { font-family: var(--ss-ft); }
/* podgląd */
.ss-pod-gora { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ss-ramka { margin: 16px 20px 20px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; position: relative; background: var(--muted); }
.ss-strona { position: absolute; top: 0; left: 0; transform-origin: 0 0; container-type: inline-size; box-shadow: 0 0 0 1px var(--border); background: #fff; color: var(--ss-tekst); font-family: var(--ss-ft); font-size: var(--ss-f-tekst); line-height: var(--ss-f-tekst-lh); font-weight: var(--ss-f-tekst-w); }
.ss-strona p { margin: 0; color: var(--ss-tekst2); }
.ss-strona small { font-size: var(--ss-f-maly); line-height: var(--ss-f-maly-lh); font-weight: var(--ss-f-maly-w); color: var(--ss-tekst2); }
.ss-strona h1, .ss-strona h2, .ss-strona h3, .ss-strona h4, .ss-strona h5, .ss-strona h6 { margin: 0; color: var(--ss-tekst); }
.ss-strona h1 { font-size: var(--ss-f-h1); line-height: var(--ss-f-h1-lh); letter-spacing: var(--ss-f-h1-ls); font-weight: var(--ss-f-h1-w); max-width: 16em; }
.ss-strona h2 { font-size: var(--ss-f-h2); line-height: var(--ss-f-h2-lh); letter-spacing: var(--ss-f-h2-ls); font-weight: var(--ss-f-h2-w); max-width: 20em; }
.ss-strona h3 { font-size: var(--ss-f-h3); line-height: var(--ss-f-h3-lh); letter-spacing: var(--ss-f-h3-ls); font-weight: var(--ss-f-h3-w); }
.ss-strona h4 { font-size: var(--ss-f-h4); line-height: var(--ss-f-h4-lh); letter-spacing: var(--ss-f-h4-ls); font-weight: var(--ss-f-h4-w); }
.ss-strona h5 { font-size: var(--ss-f-h5); line-height: var(--ss-f-h5-lh); letter-spacing: var(--ss-f-h5-ls); font-weight: var(--ss-f-h5-w); }
.ss-strona h6 { font-size: var(--ss-f-h6); line-height: var(--ss-f-h6-lh); letter-spacing: var(--ss-f-h6-ls); font-weight: var(--ss-f-h6-w); color: var(--ss-g700); text-transform: uppercase; }
.ss-nav { display: flex; align-items: center; gap: 2em; padding: 1.1em 5%; border-bottom: 1px solid var(--ss-n200); font-size: var(--ss-f-maly); }
.ss-nav b { margin-right: auto; font-size: var(--ss-f-h6); font-weight: var(--ss-f-h6-w); color: var(--ss-tekst); }
.ss-hero { padding: 4em 5% 3.5em; background: var(--ss-g50); display: flex; flex-direction: column; gap: 1em; align-items: flex-start; }
.ss-hero p { max-width: 36em; }
.ss-znaczek { font-size: var(--ss-f-maly); font-weight: 600; padding: .25em .9em; border-radius: 999px; background: var(--ss-g100); color: var(--ss-g900); }
.ss-przyciski { display: flex; gap: .75em; flex-wrap: wrap; margin-top: .5em; }
.ss-btn { display: inline-flex; align-items: center; padding: .75em 1.4em; border-radius: 8px; font-weight: 600; line-height: 1.2; }
.ss-btn-g { background: var(--ss-g); color: var(--ss-on-g); }
.ss-btn-o { background: #fff; color: var(--ss-tekst); box-shadow: inset 0 0 0 1px var(--ss-n300); }
.ss-btn-d { background: var(--ss-d); color: var(--ss-on-d); }
.ss-btn-male { padding: .55em 1.1em; }
.ss-blok { padding: 3.5em 5% 0; display: flex; flex-direction: column; gap: .75em; }
.ss-karty { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1em; margin-top: 1em; }
.ss-karta { border: 1px solid var(--ss-n200); border-radius: 12px; padding: 1.5em; display: flex; flex-direction: column; gap: .6em; }
.ss-karta a { color: var(--ss-g700); font-weight: 600; margin-top: auto; }
.ss-faq-w { display: flex; flex-direction: column; gap: .35em; padding: 1em 0; border-bottom: 1px solid var(--ss-n200); }
.ss-cta { margin: 3.5em 5% 0; padding: 3em; border-radius: 16px; background: var(--ss-n950); display: flex; flex-direction: column; gap: .8em; align-items: flex-start; }
.ss-cta h2 { color: #fff; } .ss-cta p { color: rgba(255,255,255,.72); }
.ss-alerty { display: flex; gap: .6em; flex-wrap: wrap; padding: 2em 5% 0; }
.ss-alert { font-size: var(--ss-f-maly); padding: .5em 1em; border-radius: 8px; font-weight: 500; }
.ss-alert[data-s=sukces] { background: var(--ss-sukces-bg); color: var(--ss-sukces-fg); box-shadow: inset 0 0 0 1px var(--ss-sukces-ram); }
.ss-alert[data-s=ostrzezenie] { background: var(--ss-ostrzezenie-bg); color: var(--ss-ostrzezenie-fg); box-shadow: inset 0 0 0 1px var(--ss-ostrzezenie-ram); }
.ss-alert[data-s=blad] { background: var(--ss-blad-bg); color: var(--ss-blad-fg); box-shadow: inset 0 0 0 1px var(--ss-blad-ram); }
.ss-alert[data-s=info] { background: var(--ss-info-bg); color: var(--ss-info-fg); box-shadow: inset 0 0 0 1px var(--ss-info-ram); }
.ss-stopka { display: flex; justify-content: space-between; align-items: flex-end; gap: 1em; flex-wrap: wrap; margin-top: 3em; padding: 2em 5%; border-top: 1px solid var(--ss-n200); background: var(--ss-n50); }
.ss-stopka > div { display: flex; flex-direction: column; gap: .3em; }
@container (max-width: 640px) { .ss-nav > span:not(.ss-btn) { display: none; } .ss-cta { padding: 2em 1.5em; } .ss-hero { padding-top: 3em; } }
/* okna */
.ss-css-okno { width: min(860px, 100%); }
.ss-css-gora { display: flex; flex-direction: column; gap: 2px; }
.ss-css-kod { height: min(58vh, 520px); padding: 12px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; line-height: 1.5; resize: vertical; white-space: pre; }
.kw-modal-dol { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 1100px) { .ss-panel { grid-template-columns: 1fr; } .ss-boczny { border-right: 0; border-bottom: 1px solid var(--border); } }
@media (max-width: 700px) {
  .ss-gora-l, .ss-2 { grid-template-columns: 1fr; } .ss-eksport { border-left: 0; padding-left: 0; }
  .ss-kafle { grid-template-columns: 1fr; gap: 3px; }
  .ss-sw, .ss-pal.male .ss-sw { height: 38px; flex-direction: row; justify-content: space-between; align-items: center; padding: 0 12px 0 24px; }
  .ss-sw.baza::before { top: 16px; }
  .ss-pal-a { margin-left: 0; width: 100%; }
  .ss-typ-w { grid-template-columns: 1fr; } .ss-typ-l { grid-row: auto; flex-direction: row; gap: 8px; align-items: baseline; }
  .ss-szer { grid-template-columns: 1fr; }
  .ss-clamp { margin-left: 0; }
}

/* Nowy brief: osobna karta z krokami (jak formularz Tally) */
.bf { max-width: 760px; margin: 0 auto; }
.bf-karta { padding: 0; overflow: clip; scroll-margin-top: 16px; }
.bf-gora { border-bottom: 1px solid var(--border); background: var(--sidebar); }
.bf-pasek { height: 3px; background: var(--border); }
.bf-pasek span { display: block; height: 100%; background: #22c55e; transition: width .25s ease; }
.bf-kroki { list-style: none; display: flex; gap: 4px; margin: 0; padding: 10px 14px; overflow-x: auto; }
.bf-kroki button { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 10px; border-radius: var(--radius-md); font: inherit; font-size: 13px; color: var(--muted-foreground); cursor: pointer; white-space: nowrap; }
.bf-kroki button:hover { background: var(--accent); color: var(--foreground); }
.bf-kroki b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border); font-size: 11px; font-weight: 500; background: var(--card); }
.bf-kroki [aria-current] { color: var(--foreground); font-weight: 500; }
.bf-kroki [aria-current] b { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.bf-strona { padding: 28px 32px 8px; }
.bf-nag { margin-bottom: 22px; }
.bf-nag p { margin: 0; font-size: 13px; }
.bf-nag h1 { font-size: 24px; letter-spacing: -.02em; margin: 4px 0 6px; }
.bf-hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0 20px; }
.bf-pole { margin-bottom: 20px; }
.bf-lab { display: block; font-weight: 500; font-size: 14px; margin-bottom: 8px; }
.bf-pole textarea.input { min-height: 84px; resize: vertical; }
.bf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bf-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--input); border-radius: var(--radius-md); background: var(--card); color: var(--foreground); font: inherit; font-size: 14px; cursor: pointer; box-shadow: var(--shadow-xs); }
.bf-chip:hover { background: var(--accent); }
.bf-chip:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.bf-chip[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.bf-box { display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--input); border-radius: 4px; }
.bf-box svg { width: 12px; height: 12px; opacity: 0; }
.bf-chip[aria-pressed="true"] .bf-box { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.bf-chip[aria-pressed="true"] .bf-box svg { opacity: 1; }
.bf-sw { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.bf-inne { margin-top: 8px; }
.bf-karta > .err:not(:empty) { margin: 0 32px 16px; }
.bf-stopka { display: flex; align-items: center; gap: 8px; padding: 16px 32px; border-top: 1px solid var(--border); background: var(--sidebar); position: sticky; bottom: 0; }
.bf-stopka .spacer { flex: 1; }
@media (max-width: 640px) {
  .bf-strona { padding: 22px 16px 4px; }
  .bf-stopka { padding: 12px 16px; flex-wrap: wrap; }
  .bf-karta > .err:not(:empty) { margin: 0 16px 12px; }
  .bf-kroki span { display: none; }
  .bf-kroki [aria-current] span { display: inline; }
}
.bf-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.bf-meta .field { margin-bottom: 16px; }
.bf-meta .field:first-child { grid-column: 1 / -1; }
@media (max-width: 640px) { .bf-meta { grid-template-columns: 1fr; } }
.bf-zgoda { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 20px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 14px; cursor: pointer; }
.bf-zgoda input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary); flex: none; }
.bf-zgoda a { text-decoration: underline; }
.pub-main .bf-karta { margin-bottom: 8px; }
.bf-dzieki { padding: 28px 32px; }
.bf-dzieki h2 { margin: 0 0 6px; font-size: 20px; }
.bf-czysty .pub-head, .bf-czysty .pub-title, .bf-czysty .brief-wstep { display: none; }
.bf-czysty .pub-main { padding-top: 24px; }
/* Brief w osobnej karcie przeglądarki: sam formularz, bez menu bocznego i górnego paska */
.bf-okno .app { grid-template-columns: minmax(0, 1fr); }
.bf-okno .sidebar, .bf-okno .topbar { display: none; }
.bf-okno .content { margin: 0 auto; padding-top: 24px; }

/* ---------- Miniaturki YouTube (Narzędzia → Miniaturki, miniaturki.js) ---------- */
.mn { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.mn h2 { font-size: 16px; font-weight: 600; margin: 0; }
.mn h3 { font-size: 13px; font-weight: 600; margin: 8px 0 0; }
.mn-form { position: sticky; top: 16px; }
.mn-form .muted { margin: 4px 0 0; }
.mn-mala { font-size: 12px; line-height: 17px; margin: 0; }
textarea.input.mn-krotki { min-height: 0; }
.mn-nota { padding: 10px 12px; border-radius: var(--radius-md); background: var(--yellow-bg); color: var(--yellow-fg); font-size: 13px; }
.mn-det summary { cursor: pointer; font-weight: 500; padding: 2px 0; }
.mn-det[open] summary { margin-bottom: 8px; }
.mn-baza { border-top: 1px solid var(--border); padding-top: 14px; display: block; }
.mn-baza > * + * { margin-top: 8px; }
.mn-ref { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mn-ref-szer { grid-template-columns: repeat(2, 1fr); }
.mn-ref-el { position: relative; margin: 0; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); background: var(--muted); aspect-ratio: 1; }
.mn-ref-szer .mn-ref-el { aspect-ratio: 16 / 9; }
.mn-ref-el img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mn-usun { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.mn-usun svg { width: 12px; height: 12px; }
.mn-ref-el:hover .mn-usun, .mn-usun:focus-visible { opacity: 1; }
.mn-prawa { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.mn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mn-head .muted { font-size: 12px; }
.mn-kontekst { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.mn-kontekst:empty { display: none; }
.mn-siatka { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mn-war { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mn-war-obraz { position: relative; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: #000; cursor: pointer; aspect-ratio: 16 / 9; display: block; width: 100%; }
.mn-war-obraz img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.mn-war-obraz:hover img { transform: scale(1.02); }
.mn-war-obraz span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); color: #fff; display: flex; flex-direction: column; align-items: flex-start; text-align: left; opacity: 0; transition: opacity .15s; }
.mn-war-obraz:hover span, .mn-war-obraz:focus-visible span { opacity: 1; }
.mn-war-obraz small { font-size: 12px; opacity: .85; }
.mn-war-nar { display: flex; gap: 6px; }
.mn-war-czeka { justify-content: flex-start; }
.mn-war-pusty { aspect-ratio: 16 / 9; border: 1px dashed var(--border); border-radius: var(--radius-lg); background: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted-foreground); text-align: center; padding: 12px; }
.mn-war-pusty b { color: var(--foreground); font-weight: 500; }
.mn-war-pusty small { font-size: 12px; }
.mn-war-blad { margin: 0; font-size: 12px; line-height: 16px; color: var(--destructive); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mn-pusto { grid-column: 1 / -1; border: 1px dashed var(--border); border-radius: var(--radius-lg); padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--muted-foreground); }
.mn-pusto b { color: var(--foreground); font-weight: 500; }
.mn-pusto p { margin: 0; max-width: 360px; }
.mn-postep { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); }
.mn-postep > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mn-postep small { font-size: 12px; }
.mn-uwaga { margin: 0; font-size: 13px; color: var(--muted-foreground); }
.mn-historia { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.mn-hist { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); cursor: pointer; text-align: left; font: inherit; color: inherit; min-width: 0; }
.mn-hist.on { border-color: var(--foreground); box-shadow: 0 0 0 1px var(--foreground); }
.mn-hist-obraz { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: #000; display: block; }
.mn-hist-obraz img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mn-hist-obraz small { position: absolute; left: 6px; bottom: 6px; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff; }
.mn-hist-t { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-hist small.muted { font-size: 11px; }
.mn-dlg { border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 0; width: min(760px, calc(100vw - 32px)); background: var(--card); color: var(--foreground); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.mn-dlg::backdrop { background: rgba(0, 0, 0, .45); }
.mn-dlg-in { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.mn-dlg-obraz { width: 100%; max-height: 50vh; aspect-ratio: 16 / 9; object-fit: contain; border-radius: var(--radius-lg); background: #000; display: block; }
.mn-dlg .form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 980px) { .mn { grid-template-columns: 1fr; } .mn-form { position: static; } }
@media (max-width: 560px) { .mn-siatka { grid-template-columns: 1fr; } }
/* Miniaturki: biblioteka inspiracji z kanałów YouTube */
.mn-kanal-form { display: flex; gap: 8px; }
.mn-kanal-form .input { flex: 1; min-width: 0; }
.mn-chipy { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mn-chipy:empty { display: none; }
.mn-chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--foreground); font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.mn-chip span { color: var(--muted-foreground); font-size: 12px; }
.mn-chip.on { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.mn-chip.on span { color: inherit; opacity: .75; }
.mn-chipy .mn-del { color: var(--destructive); }
.mn-insp-siatka { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; max-height: 720px; overflow-y: auto; padding: 2px; }
.mn-insp-el { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.mn-insp-obraz { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: #000; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.mn-insp-obraz img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mn-insp-el:hover .mn-insp-obraz { outline-color: var(--border); }
.mn-insp-el.on .mn-insp-obraz { outline-color: var(--foreground); }
.mn-insp-obraz i { position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 6px; background: var(--primary); color: var(--primary-foreground); font-style: normal; font-size: 12px; font-weight: 500; }
.mn-insp-obraz i svg { width: 13px; height: 13px; }
.mn-insp-t { font-size: 13px; line-height: 17px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mn-insp-el small { font-size: 11px; }
.mn-ref > p { grid-column: 1 / -1; }
.mn-opcje { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
#mnKoszt { margin-top: -8px; }

/* Miniaturki: karta wariantu jak w Organic Studio (obraz, podpis, pasek PNG i podgląd w jednej ramce) */
.mn-siatka { gap: 18px; }
.mn-war { gap: 0; border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; background: var(--card); box-shadow: var(--shadow-xs); transition: box-shadow .15s, border-color .15s; }
.mn-war:hover { border-color: color-mix(in oklab, var(--foreground) 25%, var(--border)); box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.mn-war-obraz { aspect-ratio: auto; border: 0; border-radius: 0; background: var(--card); display: flex; flex-direction: column; color: var(--foreground); }
.mn-war-obraz img { aspect-ratio: 16 / 9; height: auto; background: #000; }
.mn-war-obraz:hover img { transform: none; }
.mn-war-obraz .mn-war-opis { position: static; opacity: 1; background: none; color: var(--foreground); padding: 14px 16px 6px; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; }
.mn-war-opis b { font-size: 15px; font-weight: 600; }
.mn-war-opis small { font-size: 12px; color: var(--muted-foreground); opacity: 1; }
.mn-war-nar { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 8px; gap: 6px; }
.mn-war-png, .mn-war-oko { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border: 0; border-radius: var(--radius-md); background: none; color: var(--muted-foreground); font: inherit; font-size: 13px; cursor: pointer; text-decoration: none; }
.mn-war-png:hover, .mn-war-oko:hover { background: var(--accent); color: var(--foreground); }
.mn-war-czeka { border-style: dashed; box-shadow: none; }
.mn-war-czeka .mn-war-pusty { border: 0; border-radius: 0; }
.mn-war-czeka .mn-war-blad { padding: 0 14px 12px; }

/* Miniaturki: okno wyboru wzoru i drobne elementy */
.m-spin { width: 10px; height: 10px; border-width: 1.5px; border-color: currentColor; border-top-color: transparent; }
.m-twarze { display: inline-flex; }
.m-twarze img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 2px solid var(--card); margin-left: -7px; }
.m-twarze img:first-child { margin-left: 0; }
.mv-wz-siatka { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-height: 56vh; overflow-y: auto; padding: 3px; }
.mv-wz-el { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mv-wz-el small { font-size: 11px; line-height: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mv-wz-obraz { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: var(--muted); outline: 2px solid transparent; outline-offset: 2px; }
.mv-wz-obraz img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mv-wz-el:hover .mv-wz-obraz { outline-color: var(--border); }
.mv-wz-el.on .mv-wz-obraz { outline-color: var(--foreground); }
.mv-wz-los .mv-wz-obraz { border: 1px dashed var(--border); align-content: center; gap: 6px; color: var(--muted-foreground); font-size: 12px; text-align: center; padding: 8px; }
.mv-wz-los .mv-wz-obraz b { color: var(--foreground); font-weight: 500; }

/* Miniaturki: formularz po lewej, podgląd na środku, historia i powiększenie w okienkach */
.m2 { display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 16px; align-items: start; max-width: 1240px; }
.m2 h2 { font-size: 15px; font-weight: 600; margin: 0; }
.m2-l { position: sticky; top: 16px; gap: 12px; padding: 16px; }
.m2-l .field { gap: 5px; }
.m2-l .field label, .m2-et { font-size: 13px; font-weight: 500; }
.m2-l .input { height: 34px; font-size: 13px; }
.m2-l textarea.input { height: auto; min-height: 58px; padding-top: 7px; resize: vertical; line-height: 19px; }
.m2-l-gora { display: flex; align-items: center; justify-content: space-between; margin-bottom: -2px; }
.m2-l-gora .btn { height: 26px; font-size: 12px; padding: 0 8px; color: var(--muted-foreground); }
.m2-dop { font-weight: 400; color: var(--muted-foreground); font-size: 12px; margin-left: 4px; }
.m2-portrety { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.m2-twarz { position: relative; margin: 0; aspect-ratio: 1; border-radius: 7px; overflow: hidden; background: var(--muted); }
.m2-twarz img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m2-twarz .mn-usun { width: 18px; height: 18px; top: 2px; right: 2px; }
.m2-twarz .mn-usun svg { width: 10px; height: 10px; }
.m2-twarz:hover .mn-usun, .m2-twarz .mn-usun:focus-visible { opacity: 1; }
.m2-dodaj { border: 1px dashed var(--border); background: none; color: var(--muted-foreground); cursor: pointer; display: grid; place-items: center; padding: 0; }
.m2-dodaj:hover { color: var(--foreground); border-color: var(--ring); }
.m2-wzory { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.m2-wz { position: relative; padding: 0; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--muted); cursor: pointer; display: grid; place-items: center; color: var(--muted-foreground); font: inherit; transition: border-color .15s, box-shadow .15s; }
.m2-wz img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m2-wz:hover { border-color: var(--ring); }
.m2-wz.on { border-color: var(--foreground); box-shadow: 0 0 0 1px var(--foreground); }
.m2-wz-los, .m2-wz-wiecej { display: flex; flex-direction: column; justify-content: center; gap: 1px; font-size: 11px; background: var(--card); }
.m2-wz-wiecej { border-style: dashed; }
.m2-wz-los svg, .m2-wz-wiecej svg { width: 14px; height: 14px; }
.m2-wz-los.on { color: var(--foreground); background: var(--muted); }
.m2-opcje { display: grid; grid-template-columns: 1fr 1.25fr; gap: 6px; }
.m2-start { display: flex; flex-direction: column; gap: 6px; }
.m2-start .btn { width: 100%; }
.m2-start small { text-align: center; font-size: 12px; }
.m2-c { padding: 16px 18px; gap: 12px; }
.m2-glowa { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.m2-glowa-in { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; flex-wrap: wrap; }
.m2-glowa-t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.m2-glowa-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m2-glowa-in .btn { height: 28px; }
.m2-podglad { position: relative; aspect-ratio: 16 / 9; width: min(100%, calc((100vh - 330px) * 16 / 9)); min-width: min(100%, 420px); margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden; background: #000; }
.m2-pokaz { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.m2-pokaz img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m2-nr { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, .65); color: #fff; pointer-events: none; }
.m2-czeka { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--muted); color: var(--muted-foreground); text-align: center; padding: 20px; }
.m2-czeka b { color: var(--foreground); font-weight: 500; }
.m2-czeka svg { width: 28px; height: 28px; }
.m2-pasek { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: min(100%, 520px); margin: 0 auto; }
.m2-pasek:empty { display: none; }
.m2-pas { padding: 0; border: 0; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: #000; cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.m2-pas img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m2-pas:hover { outline-color: var(--border); }
.m2-pas.on { outline-color: var(--foreground); }
.m2-pas-pusty { display: grid; place-items: center; background: var(--muted); border: 1px dashed var(--border); color: var(--muted-foreground); font-size: 12px; cursor: default; }
.m2-popr { display: flex; gap: 8px; }
.m2-popr .input { flex: 1; min-width: 0; }
.m2-akcje { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m2-szybkie { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.m2-szybkie .mn-chip { height: 28px; padding: 0 10px; font-size: 12px; }
.m2-szybkie .mn-chip:disabled { opacity: .5; cursor: default; }
.m2-akcje-pr { display: flex; gap: 6px; margin-left: auto; }
.m2-hist-dlg { width: min(980px, calc(100vw - 32px)); }
.m2-hist { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; max-height: 66vh; overflow-y: auto; padding: 2px; }
.m2-h { display: flex; flex-direction: column; gap: 3px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); text-align: left; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.m2-h:hover { border-color: var(--ring); }
.m2-h.on { border-color: var(--foreground); box-shadow: 0 0 0 1px var(--foreground); }
.m2-h-obraz { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: var(--muted); display: grid; place-items: center; color: var(--muted-foreground); }
.m2-h-obraz img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m2-h-obraz small { position: absolute; left: 6px; bottom: 6px; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff; }
.m2-h b { font-size: 13px; line-height: 17px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m2-h small.muted { font-size: 11px; }
.m2-pokaz-dlg { width: min(1280px, calc(100vw - 48px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: var(--radius-xl); background: #0a0a0a; color: #fafafa; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.m2-pokaz-dlg::backdrop { background: rgba(0, 0, 0, .8); }
.m2-pk-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px 10px 18px; }
.m2-pk-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m2-pk-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m2-pk-t small { font-size: 12px; color: #a1a1a1; }
.m2-pk-btn { height: 34px; min-width: 34px; padding: 0 10px; border-radius: var(--radius-md); border: 0; background: rgba(255, 255, 255, .08); color: #fafafa; font: inherit; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.m2-pk-btn:hover { background: rgba(255, 255, 255, .16); }
.m2-pk-obraz { position: relative; }
.m2-pk-obraz img { display: block; width: 100%; max-height: calc(100vh - 100px); object-fit: contain; background: #000; }
.m2-pk-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); }
.m2-pk-nav:hover { background: rgba(0, 0, 0, .8); }
.m2-pk-l { left: 14px; } .m2-pk-r { right: 14px; }
.mv-wz-in { gap: 12px; }
.mv-wz-narz { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 32px; }
.mv-wz-narz .spacer { flex: 1; }
.mv-wz-kafel { position: relative; min-width: 0; }
.mv-wz-kafel:hover .mn-usun, .mv-wz-kafel .mn-usun:focus-visible { opacity: 1; }
@media (max-width: 900px) { .m2 { grid-template-columns: 1fr; } .m2-l { position: static; } .m2-podglad { width: 100%; min-width: 0; } }
@media (max-width: 560px) { .m2-pasek { grid-template-columns: repeat(2, minmax(0, 1fr)); } .m2-popr { flex-direction: column; } .m2-akcje-pr { margin-left: 0; } }
.m2-h-kafel { position: relative; min-width: 0; display: flex; }
.m2-h-kafel .m2-h { flex: 1; }
.m2-h-usun { position: absolute; top: 12px; right: 12px; height: 28px; min-width: 28px; padding: 0 7px; border-radius: 7px; border: 0; background: rgba(0, 0, 0, .65); color: #fff; font: inherit; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; backdrop-filter: blur(6px); }
.m2-h-usun svg { width: 14px; height: 14px; }
.m2-h-kafel:hover .m2-h-usun, .m2-h-usun:focus-visible, .m2-h-usun.armed { opacity: 1; }
.m2-h-usun:hover { background: rgba(0, 0, 0, .85); }
.m2-h-usun.armed { background: var(--destructive); }
@media (hover: none) { .m2-h-usun { opacity: 1; } }
/* Miniaturki: dopasowanie do ekranów (telefon, tablet, laptop, duży monitor) */
.m2 { max-width: 1480px; }
.m2-portrety { display: flex; flex-wrap: wrap; gap: 5px; }
.m2-twarz { width: 44px; height: 44px; flex: none; }
.m2-szybkie { flex: 1 1 340px; }
.m2-szybkie .mn-chip { white-space: nowrap; flex: none; }
.m2-akcje-pr { flex-wrap: wrap; }
.mv-wz-siatka { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (min-width: 1600px) { .m2 { grid-template-columns: 320px minmax(0, 1fr); } }
@media (max-width: 900px) and (min-width: 721px) { .m2 { grid-template-columns: 250px minmax(0, 1fr); } .m2-opcje { grid-template-columns: 1fr; } .m2-l { position: sticky; } .m2-podglad { width: 100%; min-width: 0; } }
@media (max-width: 720px) {
  .m2 { grid-template-columns: 1fr; }
  .m2-l { position: static; }
  .m2-podglad { width: 100%; min-width: 0; }
  .m2-wzory { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-width: 420px; }
  .m2-glowa { align-items: flex-start; }
  .m2-glowa-t b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
@media (max-width: 560px) {
  .m2-l, .m2-c { padding: 14px; }
  .m2-akcje-pr { width: 100%; }
  .m2-akcje-pr .btn { flex: 1; }
  .m2-szybkie { flex-wrap: nowrap; overflow-x: auto; flex-basis: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .m2-szybkie::-webkit-scrollbar { display: none; }
  .m2-glowa [data-m2-historia] span { display: none; }
  .mv-wz-siatka { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mv-wz-in .mn-kanal-form { flex-direction: column; }
  .m2-pokaz-dlg { width: calc(100vw - 16px); }
  .m2-pk-btn[data-pk="png"] { padding: 0 8px; }
  .m2-pk-nav { width: 34px; height: 34px; }
}
/* Mockupy: wybór proporcji pliku i przełącznik zdjęcie/film w górnym pasku */
.mk-gora { flex-wrap: wrap; row-gap: 8px; }
.mk-format { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.mk-format-sel { height: 34px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--foreground); font: inherit; font-size: 13px; padding: 0 30px 0 10px; -webkit-appearance: none; appearance: none; cursor: pointer; }
.mk-format-wlasne { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.mk-format-wlasne input { width: 72px; height: 34px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); color: var(--foreground); font: inherit; font-size: 13px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.mk-format-dop { display: inline-flex; align-items: center; gap: 6px; }
.mk-format-dop input[type="color"] { width: 34px; height: 34px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); cursor: pointer; }
.mk-format [hidden] { display: none !important; }
.mk-rodzaj { flex: none; }
.mk-format + .mk-akcje { margin-left: 0; }
@media (max-width: 760px) { .mk-format { margin-left: 0; width: 100%; } }
@media (max-width: 900px) {
  .mk-scena { flex-direction: column; justify-content: flex-start; height: auto; min-height: 0; padding: 12px; gap: 12px; }
  .mk-gora { position: static; width: 100%; }
  .mk-dol { position: static; transform: none; width: 100%; max-width: 100%; }
  .mk-plotno { flex: none; }
}
/* Mockupy: wrzucanie zdjęcia lub filmu na górze lewego panelu (rodzaj pliku wykrywa się sam) */
.mk-panel-gora .mk-zrzut { max-width: none; width: 100%; box-shadow: none; }
.mk-panel-gora .mk-zrzut.pusty { display: flex; flex-direction: column; align-items: stretch; height: auto; padding: 10px; gap: 6px; border-style: dashed; background: var(--muted); text-align: center; }
.mk-panel-gora .mk-zrzut.pusty .btn { width: 100%; justify-content: center; }
.mk-panel-gora .mk-zrzut.pusty small { white-space: normal; overflow: visible; }
.mk-panel-gora .mk-zrzut:not(.pusty) .btn { margin-left: auto; }
@media (max-width: 900px) { .mk-panel-gora .mk-zrzut small { display: block; } }

/* Konwerter v3: lista plików, każdy z własnym formatem wyjściowym */
.kw3 { max-width: none; }
.kw-drop-duzy { padding: 56px 16px; gap: 6px; }
.kw-drop-duzy small { font-size: 12px; margin-top: 4px; }
.kw-drop-ik { width: 44px; height: 44px; border-radius: 12px; background: var(--muted); display: grid; place-items: center; color: var(--foreground); margin-bottom: 6px; }
.kw-drop-ik svg { width: 22px; height: 22px; }
.kw3.on .kw-tabela { outline: 2px dashed var(--foreground); outline-offset: 4px; }
.kw-gora { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kw-dodaj { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 1px solid var(--border); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--muted); color: var(--foreground); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.kw-dodaj:hover:not(:disabled) { background: var(--accent); }
.kw-dodaj:disabled { opacity: .5; cursor: not-allowed; }
.kw-tabela { border: 1px solid var(--border); border-radius: 0 12px 12px 12px; background: var(--card); overflow: hidden; }
.kw-rz { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); position: relative; }
.kw-rz[draggable="true"] { cursor: grab; }
.kw-rz.kw-ciag { opacity: .45; }
.kw-rz.kw-nad { box-shadow: inset 0 2px 0 var(--foreground); }
.kw-rz.kw-pod { box-shadow: inset 0 -2px 0 var(--foreground); }
.kw-rz .kw-mini { background: var(--muted); }
.kw-rz .kw-opis small { color: var(--muted-foreground); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.kw-rz .kw-opis small b { color: var(--foreground); }
.kw-rz .kw-opis small .badge { height: 18px; font-size: 11px; padding: 0 6px; }
.kw-rz-razem { background: color-mix(in oklab, var(--muted) 60%, transparent); }
.kw-trwa { display: inline-flex; align-items: center; gap: 6px; }
.kw-trwa::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: kw-krec .8s linear infinite; }
@keyframes kw-krec { to { transform: rotate(360deg); } }
.kw-wyj { display: flex; align-items: center; gap: 10px; flex: none; }
.kw-wyj-et { font-size: 14px; color: var(--muted-foreground); }
.kw-sel { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 112px; height: 38px; padding: 0 10px 0 14px; border: 1.5px solid var(--border); border-radius: 8px; background: var(--card); color: var(--foreground); font: inherit; font-size: 14px; font-weight: 600; letter-spacing: .02em; cursor: pointer; }
.kw-sel svg { width: 16px; height: 16px; color: var(--muted-foreground); flex: none; }
.kw-sel:hover:not(:disabled), .kw-sel[aria-expanded="true"] { border-color: var(--foreground); }
.kw-sel:disabled { opacity: .5; cursor: not-allowed; }
.kw-sel-pusty { color: var(--muted-foreground); font-weight: 500; }
.kw-rz .kw-sel { width: 136px; }
.kw-sel-off { border-style: dashed; color: var(--muted-foreground); cursor: default; font-weight: 500; }
.kw-akcje { display: flex; align-items: center; gap: 4px; flex: none; }
.kw-akcje .btn svg { width: 15px; height: 15px; margin-right: 6px; }
.kw-ik { width: 38px; height: 38px; border: 0; border-radius: 8px; background: none; color: var(--muted-foreground); display: grid; place-items: center; cursor: pointer; padding: 0; }
.kw-ik svg { width: 20px; height: 20px; }
.kw-ik:hover:not(:disabled) { background: var(--accent); color: var(--foreground); }
.kw-ik:disabled { opacity: .3; cursor: not-allowed; }
.kw-pasek { display: flex; align-items: stretch; justify-content: space-between; background: var(--muted); min-height: 64px; }
.kw-wsz { display: flex; align-items: center; gap: 10px; padding: 12px 18px; flex-wrap: wrap; font-size: 14px; }
.kw-wsz > span:first-child { font-weight: 500; }
.kw-suma { color: var(--muted-foreground); font-size: 13px; margin-left: 6px; }
.kw-suma b { color: var(--foreground); }
.kw-pasek-akcje { display: flex; align-items: center; gap: 12px; }
.kw-pasek-akcje .btn svg { width: 15px; height: 15px; margin-right: 6px; }
.kw-go { align-self: stretch; display: inline-flex; align-items: center; gap: 12px; padding: 0 30px; border: 0; background: var(--primary); color: var(--primary-foreground); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; min-width: 200px; justify-content: center; }
.kw-go svg { width: 20px; height: 20px; }
.kw-go:hover:not(:disabled) { opacity: .9; }
.kw-go:disabled { opacity: .6; cursor: progress; }
/* okienko wyboru formatu i ustawień */
.kw-pop { position: fixed; z-index: 1200; background: var(--popover, var(--card)); color: var(--foreground); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.14); padding: 14px; }
.kw-pop-format { width: 460px; max-width: calc(100vw - 24px); }
.kw-pop-szuk { display: flex; align-items: center; gap: 8px; background: var(--muted); border-radius: 10px; padding: 0 12px; height: 42px; color: var(--muted-foreground); }
.kw-pop-szuk input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--foreground); outline: none; }
.kw-pop-cialo { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; margin-top: 12px; }
.kw-pop-kat { display: flex; flex-direction: column; }
.kw-pop-kat button { display: flex; align-items: center; justify-content: space-between; text-align: left; border: 0; border-bottom: 1px solid var(--border); background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted-foreground); padding: 11px 4px; cursor: pointer; }
.kw-pop-kat button:hover { color: var(--foreground); }
.kw-pop-kat button.on { color: var(--foreground); font-weight: 600; }
.kw-pop-siatka { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-content: start; }
.kw-pop-siatka button { height: 42px; border: 0; border-radius: 8px; background: var(--muted); color: var(--foreground); font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .02em; cursor: pointer; }
.kw-pop-siatka button:hover { background: var(--accent); box-shadow: inset 0 0 0 1px var(--border); }
.kw-pop-siatka button.on { background: var(--primary); color: var(--primary-foreground); box-shadow: none; }
.kw-pop-siatka button.kw-sam { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.kw-pop-siatka button small { font-size: 10px; font-weight: 500; letter-spacing: 0; opacity: .7; }
.kw-pop-opis, .kw-pop-brak { grid-column: 1 / -1; font-size: 12px; margin: 4px 0 0; min-height: 16px; }
.kw-pop-ustaw { width: 360px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow: auto; }
.kw-pop-tyt { font-weight: 600; font-size: 14px; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kw-pop-ust .field { margin-bottom: 12px; }
.kw-pop-ust .field label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.kw-pop-ust .field small { display: block; font-size: 12px; color: var(--muted-foreground); margin-top: 4px; }
.kw-pop-ust input[type=range] { width: 100%; }
.kw-pop-ust .kw-px input { width: 120px; }
.kw-pop-ust .kw-px input.kw-male { width: 56px; }
.kw-ust-kadr { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.kw-ust-kadr b { color: var(--foreground); }
.kw-pop-dol { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 8px; }
.kw-poz { display: flex; flex-direction: column; gap: 6px; }
.kw-poz-op { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--border); border-radius: 10px; padding: 10px; cursor: pointer; }
.kw-poz-op.on, .kw-poz-op:has(input:checked) { border-color: var(--foreground); }
.kw-poz-op input { margin-top: 3px; accent-color: var(--primary); }
.kw-poz-op b { display: block; font-size: 13px; } .kw-poz-op small { display: block; font-size: 12px; color: var(--muted-foreground); }
@media (max-width: 760px) {
  .kw-rz { flex-wrap: wrap; padding: 12px 14px; gap: 10px; }
  .kw-rz .kw-opis { flex: 1 1 calc(100% - 62px); }
  .kw-wyj-et { display: none; }
  .kw-rz .kw-sel { width: 124px; }
  .kw-akcje { margin-left: auto; }
  .kw-akcje .btn { padding: 0 10px; }
  .kw-pasek { flex-direction: column; }
  .kw-pasek-akcje { flex-direction: column; align-items: stretch; gap: 0; }
  .kw-pasek-akcje .btn { margin: 0 14px 12px; }
  .kw-go { min-height: 56px; }
  .kw-pop-cialo { grid-template-columns: 1fr; }
  .kw-pop-kat { flex-direction: row; overflow-x: auto; gap: 4px; }
  .kw-pop-kat button { border-bottom: 2px solid transparent; white-space: nowrap; padding: 8px 10px; }
  .kw-pop-kat button.on { border-bottom-color: var(--foreground); }
  .kw-pop-kat button svg { display: none; }
}

/* pasek kroków konwertera w motywie (ciemny tryb) */
.kw3 .kw-kroki li button { color: var(--muted-foreground); }
.kw3 .kw-kroki li button span { background: var(--muted); color: var(--foreground); }
.kw3 .kw-kroki li.on button { color: var(--foreground); }
.kw3 .kw-kroki li.on button span { background: var(--primary); color: var(--primary-foreground); }
.kw3 .kw-kroki li.zrobione button { color: var(--foreground); }
.kw3 .kw-kroki li.zrobione button:hover { background: var(--accent); }
.kw3 .kw-kroki li:not(:last-child)::after { background: var(--border); }

/* Styl strony: podglądy w stylu typescale.com (dwa panele: skala i strona) */
.ss-podglady { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ss-podglady.jeden, .ss-podglady.pod { grid-template-columns: minmax(0, 1fr); }
.ss-podglady:not(.jeden):not(.pod) > .ss-pv + .ss-pv { border-left: 1px solid var(--border); }
.ss-podglady.pod > .ss-pv + .ss-pv { border-top: 1px solid var(--border); }
.ss-pv { display: flex; flex-direction: column; min-width: 0; background: var(--card); }
.ss-pv-pasek { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); min-height: 56px; }
.ss-pv-probka { flex: 1 1 auto; min-width: 0; max-width: 280px; height: 34px; font-size: 13px; }
.ss-pv-szablon { width: auto; height: 34px; font-size: 13px; }
.ss-pv-ik { display: flex; gap: 2px; margin-left: auto; }
.ss-pv-ik .ss-ikona:nth-child(2) { margin-right: 8px; }
.ss-pv-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--muted); }
.ss-pv-seg button { border: 0; background: none; padding: 4px 8px; border-radius: 6px; font: 600 11px/1 "Geist Mono", ui-monospace, monospace; color: var(--muted-foreground); cursor: pointer; }
.ss-pv-seg button.on { background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ss-pv-cialo { flex: 1; display: flex; align-items: center; padding: 28px 0; overflow: hidden; min-height: 420px; }
.ss-skala { width: 100%; display: flex; flex-direction: column; }
.ss-sk-w { display: grid; grid-template-columns: 52px 86px minmax(0, 1fr); align-items: baseline; gap: 10px; padding: 4px 12px; color: var(--ss-tekst, var(--foreground)); }
.ss-sk-w.baza { background: var(--muted); }
.ss-sk-tag, .ss-sk-roz { font: 500 12px/1 "Geist Mono", ui-monospace, monospace; color: var(--muted-foreground); text-align: right; font-variant-numeric: tabular-nums; }
.ss-sk-pr { white-space: nowrap; overflow: hidden; text-overflow: clip; min-width: 0; }
.ss-pv .ss-ramka { margin: 0; border: 0; border-radius: 0; flex: none; }
.ss-pv.pelny { position: fixed; inset: 0; z-index: 1000; border: 0 !important; overflow-y: auto; }
.ss-pv.pelny > .ss-pv-pasek { position: sticky; top: 0; z-index: 2; background: var(--card); }
.ss-pv.pelny .ss-pv-cialo { align-items: flex-start; overflow: auto; }
.ss-pv.pelny .ss-ramka { overflow: auto; }
/* wpis na blogu */
.ss-art h1, .ss-art h2 { max-width: none; }
.ss-art { max-width: 48em; margin: 0 auto; padding: 3.5em 6% 1em; display: flex; flex-direction: column; gap: .9em; }
.ss-art h2 { margin-top: 1em; } .ss-art h3, .ss-art h4, .ss-art h5 { margin-top: .6em; }
.ss-art h6 { color: var(--ss-g700); }
.ss-art-lead { font-size: var(--ss-f-h6); line-height: 1.5; color: var(--ss-tekst) !important; }
.ss-art ul { margin: 0; padding-left: 1.2em; color: var(--ss-tekst2); display: flex; flex-direction: column; gap: .35em; }
.ss-cytat { margin: .6em 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--ss-g); font-family: var(--ss-fn); font-size: var(--ss-f-h5); line-height: 1.4; color: var(--ss-tekst); }
@media (max-width: 1100px) { .ss-podglady { grid-template-columns: minmax(0, 1fr); } .ss-podglady > .ss-pv + .ss-pv { border-left: 0 !important; border-top: 1px solid var(--border); } .ss-pv-uklad { display: none; } }
@media (max-width: 700px) { .ss-pv-pasek { flex-wrap: wrap; } .ss-pv-probka { max-width: none; flex-basis: 100%; } .ss-sk-w { grid-template-columns: 40px 70px minmax(0, 1fr); gap: 6px; } }

/* Styl strony: szablon strony sprzedażowej w układzie jak typescale.com (dużo bieli, przyciski-pigułki, rysunki kreską) */
.ss-strona { --ss-l-akc: var(--ss-g); --ss-l-on: var(--ss-on-g); }
.ss-mono .ss-strona { --ss-l-akc: #111111; --ss-l-on: #FFFFFF; }
.ss-l-wrap { width: 88%; max-width: 1200px; margin-left: auto; margin-right: auto; }
.ss-l-nav { display: flex; align-items: center; gap: 2em; padding: 2em 0; }
.ss-l-logo { display: inline-flex; align-items: center; gap: .35em; font-size: var(--ss-f-h5); font-weight: var(--ss-f-h5-w); letter-spacing: var(--ss-f-h5-ls); color: var(--ss-tekst); white-space: nowrap; }
.ss-l-logo i { width: 1.05em; height: 1.05em; background: var(--ss-g); clip-path: polygon(0 0, 100% 0, 100% 35%, 60% 100%, 0 100%); flex: none; }
.ss-mono .ss-l-logo i { background: #bdbdbd; }
.ss-l-nav nav { flex: 1; display: flex; justify-content: center; gap: 1.6em; font-weight: 500; color: var(--ss-tekst); }
.ss-l-nav-p { display: flex; align-items: center; gap: 1.4em; font-weight: 500; color: var(--ss-tekst); }
.ss-l-btn { display: inline-flex; align-items: center; justify-content: center; padding: .8em 1.6em; border-radius: 999px; background: var(--ss-l-akc); color: var(--ss-l-on); font-weight: 600; line-height: 1.2; white-space: nowrap; }
.ss-l-btn-o { background: transparent; color: var(--ss-tekst); box-shadow: inset 0 0 0 2px var(--ss-tekst); }
.ss-l-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 4em; padding: 7em 0 8em; }
.ss-l-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1em; }
.ss-l-txt p { color: var(--ss-tekst); max-width: 34em; }
.ss-l-lead { font-size: var(--ss-f-h6); line-height: 1.55; }
.ss-l-btny { display: flex; gap: .8em; flex-wrap: wrap; margin-top: .4em; }
.ss-l-il { color: var(--ss-tekst); }
.ss-l-il svg { display: block; width: 100%; height: auto; }
.ss-l-il .tlo { fill: #FFFFFF; } .ss-l-il .ak { fill: var(--ss-l-akc); stroke: var(--ss-l-akc); } .ss-l-il .pelne { fill: currentColor; }
.ss-mono .ss-l-il .ak { fill: #111111; stroke: #111111; }
.ss-il-aa { font-family: var(--ss-fn); }
.ss-l-sr { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .8em; padding: 6em 0; }
.ss-l-sr > p { color: var(--ss-tekst); }
.ss-l-kol3, .ss-l-kol4 { width: 100%; display: grid; gap: 3em; margin-top: 3em; text-align: left; }
.ss-l-kol3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ss-l-kol4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5em; }
.ss-l-kol { display: flex; flex-direction: column; gap: .6em; } .ss-l-kol p { color: var(--ss-tekst); }
.ss-l-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 5em; padding: 5em 0; }
.ss-l-split .ss-l-il { max-width: 460px; justify-self: center; width: 100%; }
.ss-l-stopka { margin-top: 6em; background: var(--ss-n100); padding: 5em 0 6em; }
.ss-mono .ss-l-stopka { background: #EEEEEE; }
.ss-l-stopka-w { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2em; }
.ss-l-stopka-m { display: flex; flex-direction: column; gap: .8em; }
.ss-l-stopka small { color: var(--ss-tekst); }
.ss-l-linki { display: flex; flex-direction: column; gap: .5em; }
.ss-l-linki h6 { text-transform: none; color: var(--ss-tekst); margin-bottom: .4em; }
.ss-l-linki small { text-decoration: underline; text-underline-offset: 2px; }
.ss-strona .ss-alerty.ss-l-wrap { padding: 0; }
@container (max-width: 760px) {
  .ss-l-nav nav, .ss-l-nav-p > span:not(.ss-l-btn) { display: none; } .ss-l-nav-p { margin-left: auto; }
  .ss-l-hero, .ss-l-split { grid-template-columns: minmax(0, 1fr); gap: 2.5em; padding: 3.5em 0; }
  .ss-l-split.ss-l-odwr .ss-l-il { order: 2; }
  .ss-l-sr { padding: 3.5em 0; } .ss-l-kol3, .ss-l-kol4 { grid-template-columns: minmax(0, 1fr); gap: 2em; margin-top: 1.5em; }
  .ss-l-stopka-w { grid-template-columns: 1fr 1fr; } .ss-l-stopka-m { grid-column: 1 / -1; }
}
