/* ==========================================================================
   Radar Przetargów — system interfejsu
   Jasny, spokojny panel: ciepła biel i szarości, białe karty z miękkim cieniem, zaokrąglenia, przyciski
   i etykiety w kształcie pigułek. Tytuły szeryfowe (Sitka / Iowan Old Style), interfejs w systemowym
   grotesku (Segoe UI Variable / SF). Czerń jako kolor działania, czerwień tylko dla sygnałów (pilne terminy,
   zmiany ogłoszeń, nowości). Motyw ciemny: data-theme="dark" albo "system" na <html> (Ustawienia → Wygląd).
   ========================================================================== */

:root {
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Sitka Banner", "Sitka Display", ui-serif, "New York", "Iowan Old Style", Charter, Constantia, Georgia, serif;
  --font-serif: "Sitka Heading", "Sitka Subheading", ui-serif, "New York", "Iowan Old Style", Charter, Constantia, Georgia, serif;
  --font-serif-display: var(--font-display);
  --mono: "Cascadia Mono", "SF Mono", "SFMono-Regular", Consolas, Menlo, monospace;
  color-scheme: light;

  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --surface-3: #f1f0ec;
  --line: #ebe9e4;
  --line-strong: #dcd9d2;
  --text: #1b1a18;
  --text-2: #5d5b56;
  --text-3: #8d8b85;

  --brand: #1b1a18;
  --brand-600: #36352f;
  --brand-700: #000000;
  --brand-50: #f1f0ec;
  --brand-100: #e4e2dc;
  --focus: rgba(27, 26, 24, .12);

  --accent: #c43d2f;
  --accent-bg: #fcefec;
  --signal: var(--accent);
  --signal-600: #a8321f;
  --signal-bg: var(--accent-bg);
  --link: #1b1a18;
  --star: #d1951c;

  --primary: #1b1a18;
  --primary-hover: #36352f;
  --primary-text: #ffffff;

  --ok: #2c7a45;
  --ok-bg: #edf7f0;
  --warn: #a8611a;
  --warn-bg: #fdf4e8;
  --bad: #b42318;
  --bad-bg: #fcecea;
  --violet: #6a4fbd;
  --violet-bg: #f2effb;
  --blue: #2f5e9e;
  --blue-bg: #edf2fa;

  --type-delivery: #2f5e9e;
  --type-services: #6a4fbd;
  --type-works: #a8611a;
  --src-ted: #2f5e9e;
  --src-bk: #2c7a45;

  --nav-bg: #fbfbf9;
  --nav-bg-2: #f1f0ec;
  --nav-active: #ffffff;
  --nav-line: #ebe9e4;
  --nav-text: #3f3e3a;
  --nav-text-2: #8d8b85;
  --nav-strong: #1b1a18;
  --nav-accent: #c43d2f;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;
  --shadow-card: 0 1px 2px rgba(24, 22, 18, .04);
  --shadow-lift: 0 8px 24px rgba(24, 22, 18, .08);
  --shadow-pop: 0 18px 50px rgba(24, 22, 18, .14), 0 2px 8px rgba(24, 22, 18, .05);
  --shadow-drawer: -30px 0 80px rgba(24, 22, 18, .14);
  --shadow-btn: none;
  --topbar-h: 72px;
  --nav-w: 264px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211;
  --surface: #1b1b19;
  --surface-2: #20201d;
  --surface-3: #292825;
  --line: #2d2c29;
  --line-strong: #3b3a36;
  --text: #f2f0eb;
  --text-2: #b4b1aa;
  --text-3: #85827b;
  --brand: #f2f0eb;
  --brand-600: #ffffff;
  --brand-700: #ffffff;
  --brand-50: #262522;
  --brand-100: #34322e;
  --focus: rgba(242, 240, 235, .18);
  --accent: #f0695b;
  --accent-bg: #3a1c18;
  --signal-600: #ff8375;
  --link: #f2f0eb;
  --star: #e8b04a;
  --primary: #f2f0eb;
  --primary-hover: #ffffff;
  --primary-text: #121211;
  --ok: #5fc186;
  --ok-bg: #15291c;
  --warn: #e1a45c;
  --warn-bg: #2d2214;
  --bad: #f07d70;
  --bad-bg: #331816;
  --violet: #ae9bed;
  --violet-bg: #241e39;
  --blue: #92b5ea;
  --blue-bg: #17233a;
  --nav-bg: #161615;
  --nav-bg-2: #22211f;
  --nav-active: #2a2926;
  --nav-line: #292826;
  --nav-text: #d6d3cc;
  --nav-text-2: #8d8a83;
  --nav-strong: #f7f5f0;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lift: 0 10px 28px rgba(0, 0, 0, .45);
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, .6), 0 4px 12px rgba(0, 0, 0, .35);
  --shadow-drawer: -24px 0 70px rgba(0, 0, 0, .6);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #121211;
    --surface: #1b1b19;
    --surface-2: #20201d;
    --surface-3: #292825;
    --line: #2d2c29;
    --line-strong: #3b3a36;
    --text: #f2f0eb;
    --text-2: #b4b1aa;
    --text-3: #85827b;
    --brand: #f2f0eb;
    --brand-600: #ffffff;
    --brand-700: #ffffff;
    --brand-50: #262522;
    --brand-100: #34322e;
    --focus: rgba(242, 240, 235, .18);
    --accent: #f0695b;
    --accent-bg: #3a1c18;
    --signal-600: #ff8375;
    --link: #f2f0eb;
    --star: #e8b04a;
    --primary: #f2f0eb;
    --primary-hover: #ffffff;
    --primary-text: #121211;
    --ok: #5fc186;
    --ok-bg: #15291c;
    --warn: #e1a45c;
    --warn-bg: #2d2214;
    --bad: #f07d70;
    --bad-bg: #331816;
    --violet: #ae9bed;
    --violet-bg: #241e39;
    --blue: #92b5ea;
    --blue-bg: #17233a;
    --nav-bg: #161615;
    --nav-bg-2: #22211f;
    --nav-active: #2a2926;
    --nav-line: #292826;
    --nav-text: #d6d3cc;
    --nav-text-2: #8d8a83;
    --nav-strong: #f7f5f0;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lift: 0 10px 28px rgba(0, 0, 0, .45);
    --shadow-pop: 0 18px 50px rgba(0, 0, 0, .6), 0 4px 12px rgba(0, 0, 0, .35);
    --shadow-drawer: -24px 0 70px rgba(0, 0, 0, .6);
  }
}

/* ---------- podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--link); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
a.btn, a.icon-btn { text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: #1b1a18; color: #fff; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: var(--r-sm); }

.icon { display: inline-flex; flex: none; width: 16px; height: 16px; }
.icon svg { width: 100%; height: 100%; display: block; }
.icon--sm { width: 14px; height: 14px; }
.icon--lg { width: 20px; height: 20px; }

.kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); font: 500 11px var(--font); color: var(--text-3); background: var(--surface);
}

/* ---------- przyciski i pola ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--text);
  font-weight: 500; font-size: 13.5px; line-height: 1; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-3); border-color: var(--line-strong); text-decoration: none; }
.btn:active { background: var(--brand-100); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .icon { width: 15px; height: 15px; color: var(--text-2); }
.btn:hover .icon { color: var(--text); }
.btn--primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn--primary .icon, .btn--primary:hover .icon { color: var(--primary-text); }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn--primary:active { background: var(--primary); }
.btn--accent { background: var(--text); border-color: var(--text); color: var(--surface); }
.btn--accent .icon, .btn--accent:hover .icon { color: var(--surface); }
.btn--accent:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-3); border-color: transparent; color: var(--text); }
.btn--danger { color: var(--bad); }
.btn--danger:hover { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--bad); }
.btn--sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn--block { width: 100%; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none;
  border: 1px solid transparent; border-radius: var(--r-pill); background: transparent; color: var(--text-2); cursor: pointer;
  transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .icon { width: 16px; height: 16px; }
.icon-btn--sm { width: 28px; height: 28px; }

.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface); color: var(--text); font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { padding-right: 32px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--text-2); box-shadow: 0 0 0 4px var(--focus); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input--sm, .select--sm { height: 30px; font-size: 12.5px; border-radius: var(--r-sm); }
.select--sm { background-position: calc(100% - 16px) 13px, calc(100% - 11px) 13px; }
.input.is-invalid { border-color: var(--bad); }
.input--num { text-align: right; font-variant-numeric: tabular-nums; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.field__hint { font-size: 12px; color: var(--text-3); line-height: 1.45; }
.field__error { font-size: 12px; color: var(--bad); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }

.check { display: flex; align-items: flex-start; gap: 8px; padding: 5px 2px; cursor: pointer; font-size: 13px; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--text); flex: none; }

.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); user-select: none; white-space: nowrap; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__track { position: relative; width: 36px; height: 20px; border-radius: var(--r-pill); background: var(--line-strong); transition: background .15s; flex: none; }
.toggle__track::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, .15); transition: transform .15s; }
.toggle input:checked + .toggle__track { background: var(--text); }
.toggle input:checked + .toggle__track::after { transform: translateX(16px); }
.toggle input:focus-visible + .toggle__track { box-shadow: 0 0 0 4px var(--focus); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface-3); }
.segmented__btn { height: 28px; padding: 0 13px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.segmented__btn:hover { color: var(--text); }
.segmented__btn.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(24, 22, 18, .1); }

.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- etykiety, statusy, wskaźniki ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 500; line-height: 1; white-space: nowrap; background: var(--surface-3); border: 1px solid var(--line); color: var(--text-2);
}
.tag--outline { background: var(--surface); border-color: var(--line); }
.tag--brand { background: var(--text); border-color: var(--text); color: var(--surface); }
.tag--ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.tag--warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.tag--bad { background: var(--accent-bg); border-color: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.tag--violet { background: var(--violet-bg); border-color: color-mix(in srgb, var(--violet) 18%, transparent); color: var(--violet); }
.tag--ted { background: var(--blue-bg); border-color: color-mix(in srgb, var(--blue) 18%, transparent); color: var(--blue); }
.tag--bk { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.tag--ted, .tag--bk, .tag--outline.tag--sm { font-size: 10.5px; font-weight: 600; letter-spacing: .03em; }
.tag--sm { height: 20px; font-size: 11px; padding: 0 8px; }

.type { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.type::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); flex: none; }
.type--Delivery::before { background: var(--type-delivery); }
.type--Services::before { background: var(--type-services); }
.type--Works::before { background: var(--type-works); }

.status {
  --st-bg: var(--surface-3); --st-fg: var(--text-2); --st-dot: var(--text-3);
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--st-bg); color: var(--st-fg); font-size: 12.5px; font-weight: 500; white-space: nowrap; max-width: 100%;
}
.status__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--st-dot); flex: none; }
.status--review { --st-bg: var(--violet-bg); --st-fg: var(--violet); --st-dot: var(--violet); }
.status--preparing { --st-bg: var(--warn-bg); --st-fg: var(--warn); --st-dot: var(--warn); }
.status--submitted { --st-bg: var(--blue-bg); --st-fg: var(--blue); --st-dot: var(--blue); }
.status--won { --st-bg: var(--ok-bg); --st-fg: var(--ok); --st-dot: var(--ok); }
.status--lost { --st-bg: var(--bad-bg); --st-fg: var(--bad); --st-dot: var(--bad); }
.status--skipped { --st-fg: var(--text-3); --st-dot: var(--line-strong); }
.status:has(.status-select) { padding-right: 2px; }

.status-select {
  height: 26px; max-width: 100%; padding: 0 22px 0 0; border: 0; border-radius: var(--r-pill); background-color: transparent; color: inherit;
  font-size: 12.5px; font-weight: 500; cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 12px) 11px, calc(100% - 8px) 11px; background-size: 4px 4px; background-repeat: no-repeat;
}
.status-select:focus { outline: none; }
.status:focus-within { box-shadow: 0 0 0 3px var(--focus); }
.status-select option { color: var(--text); background: var(--surface); }

.countdown { font-size: 12px; font-weight: 500; white-space: nowrap; }
.countdown--bad { color: var(--accent); font-weight: 600; }
.countdown--warn { color: var(--warn); }
.countdown--ok { color: var(--text-3); }
.countdown--muted { color: var(--text-3); }

.deadline { display: flex; flex-direction: column; gap: 1px; }
.deadline__date { white-space: nowrap; font-variant-numeric: tabular-nums; }

.progress { display: flex; align-items: center; gap: 8px; min-width: 0; }
.progress__track { flex: 1; height: 5px; min-width: 40px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.progress__fill { height: 100%; border-radius: var(--r-pill); background: var(--text); }
.progress__fill.is-done { background: var(--ok); }
.progress__label { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

mark { background: #fbeec2; color: inherit; padding: 0 2px; border-radius: 3px; }
:root[data-theme="dark"] mark { background: #5c4a14; }

/* ---------- układ: nawigacja ---------- */
.app { display: flex; min-height: 100vh; }
.nav {
  position: sticky; top: 0; height: 100vh; width: var(--nav-w); flex: none; display: flex; flex-direction: column;
  background: var(--nav-bg); color: var(--nav-text); border-right: 1px solid var(--nav-line); z-index: 50;
}
.nav__brand { display: flex; align-items: center; gap: 12px; height: var(--topbar-h); padding: 0 20px; flex: none; }
.nav__brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.nav__lockup { display: flex; align-items: center; gap: 10px; color: var(--nav-strong); }
.nav__mark { display: block; width: 28px; height: 28px; flex: none; }
.nav__name { font: 400 20px/1 var(--font-serif); letter-spacing: -.015em; white-space: nowrap; }
.nav__brand-text #brandCompany { margin-top: 6px; padding-left: 38px; }
.nav__brand-text span#brandCompany { color: var(--nav-text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__scroll { flex: 1; overflow-y: auto; padding: 6px 12px 14px; display: flex; flex-direction: column; gap: 18px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.nav__group { display: flex; flex-direction: column; gap: 2px; }
.nav__label { display: flex; align-items: center; justify-content: space-between; height: 28px; padding: 0 6px 0 10px; font-size: 12px; font-weight: 500; color: var(--nav-text-2); }
.nav__add { width: 24px; height: 24px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--nav-text-2); font-size: 17px; line-height: 1; cursor: pointer; }
.nav__add:hover { background: var(--nav-bg-2); color: var(--nav-strong); }
.nav__item {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%; height: 38px; padding: 0 10px;
  border: 1px solid transparent; border-radius: var(--r); background: transparent; color: var(--nav-text); font-size: 14px; font-weight: 450; text-align: left; cursor: pointer;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.nav__item .icon { width: 17px; height: 17px; color: var(--nav-text-2); }
.nav__item:hover { background: var(--nav-bg-2); color: var(--nav-strong); }
.nav__item:hover .icon { color: var(--nav-text); }
.nav__item.is-active { background: var(--nav-active); border-color: var(--nav-line); color: var(--nav-strong); font-weight: 550; box-shadow: 0 1px 2px rgba(24, 22, 18, .05); }
.nav__item.is-active .icon { color: var(--nav-strong); }
.nav__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__count { margin-left: auto; padding: 1px 7px; border-radius: var(--r-pill); background: var(--surface-3); font-size: 11.5px; font-weight: 500; color: var(--nav-text-2); font-variant-numeric: tabular-nums; }
.nav__item.is-active .nav__count { background: var(--nav-bg-2); color: var(--nav-text); }
.nav__searches { display: flex; flex-direction: column; gap: 2px; }
.nav__search { position: relative; display: flex; align-items: center; border: 1px solid transparent; border-radius: var(--r); }
.nav__search:hover { background: var(--nav-bg-2); }
.nav__search.is-active { background: var(--nav-active); border-color: var(--nav-line); box-shadow: 0 1px 2px rgba(24, 22, 18, .05); }
.nav__search-btn { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; height: 36px; padding: 0 4px 0 12px; border: 0; background: transparent; color: var(--nav-text); font-size: 13.5px; text-align: left; cursor: pointer; }
.nav__search.is-active .nav__search-btn { color: var(--nav-strong); font-weight: 550; }
.nav__search-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__new { padding: 1px 7px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 600; }
.nav__search-actions { display: none; gap: 0; padding-right: 4px; }
.nav__search:hover .nav__search-actions, .nav__search:focus-within .nav__search-actions { display: flex; }
.nav__search-actions .icon-btn { width: 26px; height: 26px; color: var(--nav-text-2); }
.nav__search-actions .icon-btn:hover { background: var(--surface-3); color: var(--nav-strong); }
.nav__search-actions .icon { width: 14px; height: 14px; }
.nav__empty { padding: 4px 10px 6px; color: var(--nav-text-2); font-size: 12.5px; line-height: 1.5; }
.nav__footer { border-top: 1px solid var(--nav-line); padding: 10px 12px; flex: none; }
.nav__sync { display: flex; align-items: center; gap: 8px; padding: 8px 10px 4px; color: var(--nav-text-2); font-size: 11.5px; line-height: 1.35; }
.nav__sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.nav__sync-dot.is-running { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.nav__sync-dot.is-error { background: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }
.nav-overlay { position: fixed; inset: 0; background: rgba(24, 22, 18, .32); z-index: 45; }

/* ---------- układ: pasek górny i treść ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; height: var(--topbar-h); padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
}
.topbar__menu { display: none; }
.topbar__title { display: flex; flex-direction: column; min-width: 0; flex: 0 1 auto; line-height: 1.1; }
.topbar__title h1 { font: 400 30px/1.05 var(--font-display); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__sub { margin-top: 5px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__search { position: relative; display: flex; align-items: center; flex: 1 1 420px; max-width: 560px; margin-left: auto; }
.topbar__search input {
  width: 100%; height: 40px; padding: 0 42px 0 40px; border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--surface); color: var(--text); font-size: 14px; box-shadow: var(--shadow-card); transition: border-color .15s, box-shadow .15s;
}
.topbar__search input:hover { border-color: var(--text-3); }
.topbar__search input:focus { outline: none; border-color: var(--text-2); box-shadow: 0 0 0 4px var(--focus); }
.topbar__search input::placeholder { color: var(--text-3); }
.topbar__search input::-webkit-search-cancel-button { cursor: pointer; }
.topbar__search-icon { position: absolute; left: 14px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.topbar__search-icon svg { width: 100%; height: 100%; display: block; }
.topbar__search .kbd { position: absolute; right: 10px; pointer-events: none; border-radius: var(--r-pill); }
.topbar__search input:focus ~ .kbd, .topbar__search input:not(:placeholder-shown) ~ .kbd { display: none; }
.topbar__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.content { flex: 1; padding: 28px 32px 64px; min-width: 0; }
.view { display: flex; flex-direction: column; gap: 20px; max-width: 1640px; margin: 0 auto; }

/* ---------- panele ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-card); min-width: 0; }
.panel__head { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.panel__head--plain { border-bottom: 0; padding-bottom: 4px; }
.panel__title { font: 400 21px/1.2 var(--font-serif); letter-spacing: -.01em; }
.panel__sub { font-size: 12.5px; color: var(--text-3); }
.panel__titles { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.panel__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel__body { padding: 20px 22px; }
.panel__body--flush { padding: 0; }
.panel__foot { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid-2--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; min-width: 0; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-card); color: inherit; font: inherit;
}
button.kpi { cursor: pointer; transition: box-shadow .2s, border-color .2s, transform .2s; }
button.kpi:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.kpi__label { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi__value { font: 400 38px/1 var(--font-display); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.02em; }
.kpi__sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi__value--ok { color: var(--ok); }

/* ---------- tabele ---------- */
.table-wrap { overflow-x: auto; }
.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.grid th {
  position: sticky; top: 0; z-index: 1; height: 42px; padding: 0 16px; text-align: left; white-space: nowrap;
  font-size: 12px; font-weight: 500; color: var(--text-3); background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.grid th:first-child { border-top-left-radius: var(--r-xl); }
.grid th:last-child { border-top-right-radius: var(--r-xl); }
.grid td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tbody tr { transition: background-color .1s; }
.grid--click tbody tr { cursor: pointer; }
.grid--click tbody tr:hover { background: var(--surface-2); }
.grid tbody tr.is-current { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--text); }
.grid .num, .grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.grid .center { text-align: center; }
.grid--compact td { padding: 10px 16px; }
.grid tbody tr.is-unseen .title-cell__title { font-weight: 600; }
/* Lista ogłoszeń: stałe szerokości kolumn — długa nazwa zamawiającego nie rozpycha tabeli poza ekran. */
.grid--list { table-layout: fixed; }
@media (max-width: 1500px) { .grid--list .col-cpv { display: none; } }
@media (max-width: 1300px) { .grid--list .col-type { display: none; } }
.col-fav { width: 40px; padding-left: 16px !important; padding-right: 0 !important; }

.title-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.title-cell__title { color: var(--text); font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.title-cell__meta { color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-cell__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.title-cell__snippet { color: var(--text-2); font-size: 12.5px; line-height: 1.45; border-left: 2px solid var(--line-strong); padding-left: 9px; margin-top: 3px; }
.unseen-dot { display: none; }
.cpv-cell { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cpv-cell__code { font-size: 12px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cpv-cell__name { color: var(--text-3); font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.row-actions { display: flex; justify-content: flex-end; gap: 0; opacity: .55; transition: opacity .15s; }
tr:hover .row-actions, .row-actions:focus-within { opacity: 1; }
.fav { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--line-strong); cursor: pointer; }
.fav:hover { color: var(--text-2); background: var(--surface-3); }
.fav.is-on { color: var(--star); }
.fav .icon { width: 16px; height: 16px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.pager__nav { display: flex; align-items: center; gap: 4px; }
.pager__size { display: flex; align-items: center; gap: 8px; }

/* ---------- pasek narzędzi listy ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.toolbar__spacer { flex: 1 1 auto; }
.toolbar__sep { width: 1px; align-self: stretch; margin: 4px 2px; background: var(--line); }
.toolbar__count { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.toolbar__count strong { color: var(--text); font-variant-numeric: tabular-nums; }
.toolbar--sub { background: var(--surface-2); padding-top: 10px; padding-bottom: 10px; }

.dropdown { position: relative; }
.dropdown__btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s;
}
.dropdown__btn:hover { background: var(--surface-3); }
.dropdown__btn .icon { width: 13px; height: 13px; color: var(--text-3); }
.dropdown__btn.has-value { border-color: var(--text); background: var(--text); color: var(--surface); }
.dropdown__btn.has-value .icon { color: var(--surface); }
.dropdown__panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 240px; max-width: 340px; max-height: 360px; overflow-y: auto;
  padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
}
.dropdown__panel--right { left: auto; right: 0; }
.dropdown__panel--wide { width: 320px; }
.dropdown__search { margin-bottom: 6px; }
.dropdown__option { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: var(--r-sm); font-size: 13px; cursor: pointer; }
.dropdown__option:hover { background: var(--surface-3); }
.dropdown__option input { accent-color: var(--text); width: 15px; height: 15px; flex: none; margin: 0; }
.dropdown__option small { margin-left: auto; color: var(--text-3); font-variant-numeric: tabular-nums; }
.dropdown__actions { display: flex; justify-content: space-between; gap: 8px; padding: 8px 4px 2px; margin-top: 4px; border-top: 1px solid var(--line); }
.dropdown__form { display: flex; flex-direction: column; gap: 10px; padding: 8px; }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 5px 0 12px; border-radius: var(--r-pill);
  background: var(--text); color: var(--surface); font-size: 12.5px; font-weight: 500; white-space: nowrap; max-width: 320px;
}
.chip > span { overflow: hidden; text-overflow: ellipsis; }
.chip button { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 0; border-radius: var(--r-pill); background: transparent; color: inherit; cursor: pointer; }
.chip button:hover { background: rgba(255, 255, 255, .18); }
.chip .icon { width: 12px; height: 12px; }
.chip--add { padding: 0 12px; background: var(--surface); color: var(--text-2); border: 1px solid var(--line-strong); cursor: pointer; font: inherit; font-size: 12.5px; }
.chip--add:hover { color: var(--text); background: var(--surface-3); }
.chip--add strong { margin-left: 4px; color: var(--text-3); font-variant-numeric: tabular-nums; font-weight: 600; }
.suggest__label { font-size: 12px; color: var(--text-3); margin-right: 2px; white-space: nowrap; }

/* ---------- karty (wąskie ekrany) ---------- */
.cards { display: none; flex-direction: column; }
.lcard { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.lcard:last-child { border-bottom: 0; }
.lcard:hover { background: var(--surface-2); }
.lcard__top { display: flex; gap: 8px; align-items: flex-start; }
.lcard__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }

/* ---------- puste stany, szkielety ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 56px 24px; text-align: center; color: var(--text-2); }
.empty__icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-3); color: var(--text-2); margin-bottom: 6px; }
.empty__icon .icon { width: 20px; height: 20px; }
.empty__title { font: 400 23px/1.2 var(--font-serif); letter-spacing: -.01em; color: var(--text); }
.empty__text { max-width: 440px; font-size: 13.5px; line-height: 1.6; }
.empty .btn { margin-top: 8px; }
.empty--sm { padding: 32px 16px; }

.skeleton { display: flex; flex-direction: column; }
.skeleton__row { height: 64px; border-bottom: 1px solid var(--line); padding: 14px 22px; display: flex; flex-direction: column; gap: 9px; }
.skeleton__bar { height: 10px; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 45%, var(--surface-3) 65%); background-size: 300% 100%; animation: shimmer 1.3s ease infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- objaśnienia ---------- */
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; line-height: 1.55; color: var(--text-2); }
.callout .icon { margin-top: 2px; color: var(--text-3); }
.callout strong { color: var(--text); }
.callout--info { background: var(--surface-2); }
.callout--info .icon { color: var(--text); }
.callout--warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 20%, transparent); }
.callout--warn .icon { color: var(--warn); }
.callout--ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 20%, transparent); }
.callout--ok .icon { color: var(--ok); }
.callout__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.callout__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- sync ---------- */
.sync-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); color: var(--text-2); font-size: 13px; }
.sync-banner__bar { flex: 1; max-width: 240px; height: 4px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.sync-banner__bar::after { content: ""; display: block; width: 35%; height: 100%; border-radius: var(--r-pill); background: var(--text); animation: indeterminate 1.1s ease-in-out infinite; }
@keyframes indeterminate { from { margin-left: -35%; } to { margin-left: 100%; } }

/* ---------- toasty ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-radius: var(--r-lg); background: #1b1a18; color: #f4f2ed;
  box-shadow: var(--shadow-pop); font-size: 13px; line-height: 1.45; animation: toast-in .2s ease-out;
}
.toast .icon { margin-top: 1px; color: #c9c6bf; }
.toast--success .icon { color: #6fd195; }
.toast--error .icon { color: #ff8a7d; }
.toast__text { flex: 1; min-width: 0; }
.toast__action { border: 0; background: transparent; color: #fff; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- warstwy: szuflada i okna ---------- */
.overlay { position: fixed; inset: 0; background: rgba(24, 22, 18, .28); z-index: 80; animation: fade-in .15s ease-out; }
@keyframes fade-in { from { opacity: 0; } }

.drawer {
  position: fixed; top: 8px; right: 8px; bottom: 8px; z-index: 90; width: min(1040px, calc(96vw - 8px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-drawer); outline: none; overflow: hidden;
  animation: drawer-in .22s ease-out;
}
@keyframes drawer-in { from { transform: translateX(28px); opacity: .6; } }
.drawer__head { padding: 18px 30px 0; border-bottom: 1px solid var(--line); flex: none; }
.drawer__topline { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.drawer__overline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); min-width: 0; }
.drawer__overline .mono { font-family: var(--font); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.drawer__nav { margin-left: auto; display: flex; gap: 2px; flex: none; }
.drawer__title { margin-top: 10px; font: 400 32px/1.14 var(--font-display); letter-spacing: -.015em; }
.drawer__meta { margin-top: 6px; font-size: 13px; color: var(--text-2); }
.facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.facts__item { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.facts__label { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.facts__value { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facts__value small { display: block; font-size: 12px; font-weight: 500; }
.facts__item .status { margin-top: 1px; }
.drawer__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.drawer__tabs { margin-top: 12px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 24px 30px 56px; }
.drawer__loading { padding: 40px 24px; color: var(--text-3); display: flex; align-items: center; gap: 10px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px; border: 0; background: transparent;
  color: var(--text-2); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); }
.tab.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--text); }
.tab__badge { padding: 1px 7px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tab.is-active .tab__badge { background: var(--text); color: var(--surface); }

.modal-layer { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; background: rgba(24, 22, 18, .34); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); overflow-y: auto; animation: fade-in .15s ease-out; }
.modal {
  display: flex; flex-direction: column; width: 100%; max-width: 640px; max-height: 88vh; background: var(--surface);
  border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow-pop); animation: modal-in .2s ease-out; overflow: hidden;
}
@keyframes modal-in { from { transform: translateY(10px); opacity: .5; } }
.modal--sm { max-width: 460px; }
.modal--lg { max-width: 860px; }
.modal--xl { max-width: 1100px; }
.modal__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); flex: none; }
.modal__titles { flex: 1; min-width: 0; }
.modal__title { font: 400 26px/1.2 var(--font-display); letter-spacing: -.015em; }
.modal__sub { margin-top: 3px; font-size: 12.5px; color: var(--text-3); }
.modal__body { padding: 20px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal__body--flush { padding: 0; gap: 0; }
.modal__foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); flex: none; background: var(--surface-2); }
.modal__foot-left { margin-right: auto; font-size: 12.5px; color: var(--text-3); }

/* ---------- sekcje szczegółów ---------- */
.section { display: flex; flex-direction: column; gap: 12px; }
.section + .section { margin-top: 28px; }
.section__head { display: flex; align-items: baseline; gap: 10px; }
.section__title { font: 400 20px/1.25 var(--font-serif); letter-spacing: -.01em; color: var(--text); }
.section__hint { font-size: 12px; color: var(--text-3); }
.section__actions { margin-left: auto; display: flex; gap: 6px; }

.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 24px; }
.dl__item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dl__label { font-size: 12px; color: var(--text-3); }
.dl__value { font-size: 13.5px; overflow-wrap: anywhere; }
.prose { font-size: 14px; line-height: 1.65; white-space: pre-line; color: var(--text); overflow-wrap: anywhere; }
.prose--clamp { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }

.criteria { display: flex; flex-direction: column; gap: 10px; }
.criteria__row { display: grid; grid-template-columns: minmax(0, 1fr) 160px 44px; align-items: center; gap: 12px; font-size: 13px; }
.bar { height: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.bar__fill { height: 100%; background: var(--text); border-radius: var(--r-pill); }
.criteria__weight { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

.accordion { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.accordion + .accordion { margin-top: 8px; }
.accordion__head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border: 0; background: var(--surface-2); color: var(--text); font-size: 13.5px; font-weight: 550; text-align: left; cursor: pointer; }
.accordion__head .icon { margin-left: auto; transition: transform .2s; color: var(--text-3); }
.accordion.is-open .accordion__head .icon { transform: rotate(180deg); }
.accordion__body { display: none; padding: 14px 16px; font-size: 13px; border-top: 1px solid var(--line); }
.accordion.is-open .accordion__body { display: block; }

.iframe-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.iframe-wrap iframe { display: block; width: 100%; height: 72vh; border: 0; background: #fff; }

/* ---------- warsztat oferty ---------- */
.offer-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.card { border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-card); }
.card__head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card__title { font: 400 18px/1.25 var(--font-serif); }
.card__sub { font-size: 12px; color: var(--text-3); }
.card__actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card__body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.card + .card { margin-top: 16px; }
.save-state { font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 5px; }
.save-state.is-saved { color: var(--ok); }

.calc { width: 100%; border-collapse: collapse; font-size: 13px; }
.calc th { font-size: 12px; font-weight: 500; color: var(--text-3); text-align: left; padding: 0 6px 6px; }
.calc td { padding: 4px 6px; vertical-align: middle; }
.calc td.num, .calc th.num { text-align: right; font-variant-numeric: tabular-nums; }
.calc .input { height: 32px; }
.calc__part { color: var(--text-2); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc__total td { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 650; }
.calc-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.calc-summary > div { padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.calc-summary__label { font-size: 11.5px; color: var(--text-3); }
.calc-summary__value { font: 400 24px/1.15 var(--font-display); font-variant-numeric: tabular-nums; }
.calc-summary__value--main { color: var(--text); }
.calc-words { font-size: 12.5px; color: var(--text-2); font-style: italic; }
.calc-hint { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-2); }
.calc-hint strong { color: var(--text); font-variant-numeric: tabular-nums; }

.price-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.price-option {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); text-align: left; cursor: pointer; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.price-option:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.price-option__label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.price-option__value { font: 400 22px/1.15 var(--font-display); font-variant-numeric: tabular-nums; }
.price-option__chance { font-size: 12px; font-weight: 600; }
.price-option--ambitious .price-option__chance { color: var(--warn); }
.price-option--balanced .price-option__chance { color: var(--blue); }
.price-option--safe .price-option__chance { color: var(--ok); }

.checklist { display: flex; flex-direction: column; }
.checklist__item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.checklist__item:last-child { border-bottom: 0; }
.checklist__item input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--ok); flex: none; cursor: pointer; }
.checklist__item label { flex: 1; cursor: pointer; line-height: 1.4; }
.checklist__item.is-done label { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.checklist__item .icon-btn { opacity: 0; }
.checklist__item:hover .icon-btn { opacity: 1; }
.checklist__add { display: flex; gap: 8px; margin-top: 8px; }

.repeater { display: flex; flex-direction: column; gap: 8px; }
.repeater__row { display: flex; gap: 8px; align-items: flex-start; }
.repeater__row > .input, .repeater__row > .textarea, .repeater__row > .field { flex: 1; }

.keydates { display: flex; flex-direction: column; }
.keydate { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.keydate:last-child { border-bottom: 0; }
.keydate__label { color: var(--text-2); }
.keydate__value { font-weight: 600; font-variant-numeric: tabular-nums; }
.keydate__value small { display: block; font-weight: 400; color: var(--text-3); font-size: 12px; line-height: 1.4; margin-top: 2px; }

/* ---------- dokumenty ---------- */
.doc-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.doc-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-row input { width: 16px; height: 16px; accent-color: var(--text); cursor: pointer; }
.doc-row__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 13.5px; }
.doc-row__desc { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.doc-row__missing { font-size: 12px; color: var(--warn); margin-top: 3px; }
.doc-row__actions { display: flex; gap: 6px; }
.doc-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.copy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.copy-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.copy-list__head { padding: 10px 14px; font-size: 12px; font-weight: 550; color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.copy-item { display: grid; grid-template-columns: 130px minmax(0, 1fr) 28px; gap: 8px; align-items: center; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.copy-item:last-child { border-bottom: 0; }
.copy-item__label { color: var(--text-3); font-size: 12px; }
.copy-item__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-item__value.is-empty { color: var(--text-3); font-style: italic; }

/* ---------- analiza rynku ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat { padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.stat__label { font-size: 12px; color: var(--text-2); }
.stat__value { font: 400 30px/1.05 var(--font-display); font-variant-numeric: tabular-nums; }
.stat__sub { font-size: 12px; color: var(--text-3); }
.chart { width: 100%; height: auto; display: block; }
.chart text { font: 11px var(--font); fill: var(--text-3); }
.chart .chart__grid { stroke: var(--line); stroke-width: 1; }
.chart .chart__line { fill: none; stroke: var(--text); stroke-width: 2; }
.chart .chart__area { fill: var(--text); opacity: .06; }
.chart .chart__own { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 3; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }

/* ---------- pulpit ---------- */
.funnel { display: flex; flex-direction: column; gap: 12px; }
.funnel__row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 42px; gap: 10px; align-items: center; font-size: 13px; }
.funnel__label { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.funnel__track { height: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.funnel__fill { height: 100%; border-radius: var(--r-pill); min-width: 2px; }
.funnel__count { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.funnel__foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.funnel__foot strong { color: var(--text); font-variant-numeric: tabular-nums; }

.date-cell { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.date-cell strong { font: 400 18px/1.1 var(--font-serif); font-variant-numeric: tabular-nums; }
.date-cell span { margin-top: 2px; font-size: 11.5px; color: var(--text-3); }

.setup { display: flex; flex-direction: column; }
.setup__item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.setup__item:last-child { border-bottom: 0; }
.setup__check { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; border: 1.5px solid var(--line-strong); color: transparent; }
.setup__check.is-done { background: var(--ok); border-color: var(--ok); color: #fff; }
.setup__check .icon { width: 12px; height: 12px; }
.setup__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.setup__text span { font-size: 12px; color: var(--text-3); }

.list-plain { display: flex; flex-direction: column; }
.list-plain__item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color .1s; }
.list-plain__item:last-child { border-bottom: 0; }
.list-plain__item:hover { background: var(--surface-2); }
.list-plain__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-plain__title { font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-plain__meta { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-plain__side { text-align: right; font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- tablica ofert ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.board__col { display: flex; flex-direction: column; min-height: 220px; max-height: calc(100vh - var(--topbar-h) - 150px); background: var(--surface-3); border: 1px solid var(--line); border-radius: 22px; padding: 4px; }
.board__head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; }
.board__name { font-size: 14px; font-weight: 600; }
.board__count { padding: 1px 7px; border-radius: var(--r-pill); background: var(--surface); font-size: 11.5px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.board__sum { margin-left: auto; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.board__body { flex: 1; overflow-y: auto; padding: 0 6px 6px; display: flex; flex-direction: column; gap: 8px; border-radius: 18px; transition: background .15s; }
.board__body.is-over { background: var(--brand-100); box-shadow: inset 0 0 0 2px var(--line-strong); }
.board__empty { padding: 22px 8px; text-align: center; font-size: 12.5px; color: var(--text-3); }
.kcard { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 3px rgba(24, 22, 18, .05); cursor: grab; transition: border-color .15s, box-shadow .15s, transform .15s; }
.kcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.kcard.is-dragging { opacity: .45; }
.kcard__title { font-size: 13px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kcard__org { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.kcard__price { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- ustawienia i profil firmy ---------- */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 480px; }
.settings__nav { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--surface-2); }
.settings__tab { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--r); background: transparent; color: var(--text-2); font-size: 13px; text-align: left; cursor: pointer; }
.settings__tab .icon { width: 15px; height: 15px; color: var(--text-3); }
.settings__tab:hover { background: var(--surface-3); color: var(--text); }
.settings__tab.is-active { background: var(--surface); border-color: var(--line); color: var(--text); font-weight: 550; box-shadow: 0 1px 2px rgba(24, 22, 18, .05); }
.settings__tab.is-active .icon { color: var(--text); }
.settings__panel { padding: 24px 28px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.settings__section { display: flex; flex-direction: column; gap: 12px; }
.settings__section + .settings__section { padding-top: 20px; border-top: 1px solid var(--line); }
.settings__title { font: 400 23px/1.2 var(--font-serif); letter-spacing: -.01em; }
.settings__desc { font-size: 12.5px; color: var(--text-2); line-height: 1.55; margin-top: -6px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.setting-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.setting-row__text span { font-size: 12px; color: var(--text-3); }
.setting-row .input, .setting-row .select { width: 120px; flex: none; }
.pill-set { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { height: 30px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--text-2); font-size: 12.5px; cursor: pointer; transition: background-color .15s, color .15s; }
.pill:hover { background: var(--surface-3); color: var(--text); }
.pill.is-on { border-color: var(--text); background: var(--text); color: var(--surface); font-weight: 500; }

.completeness { display: flex; align-items: center; gap: 10px; }
.completeness__track { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.completeness__fill { height: 100%; border-radius: var(--r-pill); background: var(--text); }
.completeness__fill.is-done { background: var(--ok); }

.log-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.log-table th, .log-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.log-table th { font-size: 12px; font-weight: 500; color: var(--text-3); }
.log-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.theme-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-option { display: flex; flex-direction: column; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.theme-option:hover { border-color: var(--line-strong); }
.theme-option.is-active { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.theme-option__preview { height: 64px; border-radius: 10px; border: 1px solid rgba(0, 0, 0, .08); background: linear-gradient(90deg, #fbfbf9 0 28%, #f6f5f2 28%); position: relative; overflow: hidden; }
.theme-option__preview::after { content: ""; position: absolute; left: 34%; right: 8%; top: 14px; height: 36px; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.theme-option__preview--dark { background: linear-gradient(90deg, #161615 0 28%, #121211 28%); border-color: rgba(255, 255, 255, .08); }
.theme-option__preview--dark::after { background: #1b1b19; }
.theme-option__preview--system { background: linear-gradient(90deg, #fbfbf9 0 28%, #f6f5f2 28% 64%, #121211 64%); }

/* ---------- responsywność ---------- */
@media (max-width: 1360px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .grid-2, .offer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .nav { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s ease-out; box-shadow: var(--shadow-pop); }
  .nav.is-open { transform: translateX(0); }
  .topbar__menu { display: inline-flex; }
  .table-wrap--list { display: none; }
  .cards { display: flex; }
}
@media (min-width: 1101px) {
  .nav-overlay { display: none !important; }
}
@media (max-width: 760px) {
  .content { padding: 14px 12px 40px; }
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 12px; gap: 8px 10px; }
  .topbar__title h1 { font-size: 26px; }
  .topbar__search { order: 3; flex: 1 1 100%; max-width: none; margin-left: 0; }
  .topbar__actions { margin-left: auto; }
  #syncBtnLabel { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 14px 16px 16px; }
  .kpi__value { font-size: 30px; }
  .drawer { top: 0; right: 0; bottom: 0; left: 0; width: auto; border-radius: 0; border: 0; display: block; overflow-y: auto; }
  .drawer__body { overflow: visible; }
  .drawer__head, .drawer__body { padding-left: 16px; padding-right: 16px; }
  .drawer__title { font-size: 26px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .form-grid, .form-grid--3, .form-grid--4, .copy-grid, .grid-2--even { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .settings__nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .price-options, .stat-row, .calc-summary, .theme-choice { grid-template-columns: minmax(0, 1fr); }
  .criteria__row { grid-template-columns: minmax(0, 1fr) 80px 40px; }
  .modal-layer { padding: 0; }
  .modal { max-height: 100vh; min-height: 100vh; border-radius: 0; border: 0; }
  .toolbar { padding: 10px 12px; }
}

/* ---------- konto, pakiety, panel administratora ---------- */
.banners { display: flex; flex-direction: column; gap: 8px; max-width: 1640px; margin: 0 auto 16px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); font-size: 13px; color: var(--text-2); }
.banner > .icon { color: var(--text-3); }
.banner__text { flex: 1; min-width: 0; }
.banner__text strong { color: var(--text); }
.banner--info { background: var(--surface); }
.banner--info > .icon { color: var(--text); }
.banner--warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.banner--warn > .icon { color: var(--warn); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.plan { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-card); }
.plan.is-match { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.plan.is-current { background: var(--surface-2); }
.plan__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan__name { font: 400 26px/1.15 var(--font-display); }
.plan__price { display: flex; align-items: baseline; gap: 4px; }
.plan__price strong { font: 400 40px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.plan__price span { font-size: 12.5px; color: var(--text-3); }
.plan__desc { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.plan__features { display: flex; flex-direction: column; gap: 6px; flex: 1; font-size: 12.5px; }
.plan__features li { display: flex; align-items: flex-start; gap: 7px; line-height: 1.4; }
.plan__features .icon { margin-top: 1px; color: var(--ok); }
.plan__features li.is-off, .plan__features li.is-off .icon { color: var(--text-3); }
.plan .btn { width: 100%; }
.plan-note { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12px; color: var(--text-3); }

.locked { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-xl); background: var(--surface-2); }
.locked__icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); }
.locked__title { font: 400 23px/1.2 var(--font-serif); }
.locked__text { max-width: 460px; font-size: 13px; line-height: 1.55; color: var(--text-2); }

.paywall { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 980px; margin: 8px auto 0; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-card); }
.paywall__title { font: 400 44px/1.08 var(--font-display); letter-spacing: -.015em; }

.plan-edit { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.plan-edit__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.input-row { display: flex; align-items: center; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }
.dl--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis--admin { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.nav__user { display: flex; align-items: center; gap: 4px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--nav-line); }
.nav__user-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: var(--r); background: transparent; color: var(--nav-text); text-align: left; cursor: pointer; }
.nav__user-btn:hover { background: var(--nav-bg-2); }
.nav__avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--text); color: var(--surface); font-size: 13px; font-weight: 600; }
.nav__user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.nav__user-text strong { overflow: hidden; color: var(--nav-strong); font-size: 12.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.nav__user-text span { overflow: hidden; color: var(--nav-text-2); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.nav__logout { color: var(--nav-text-2); }
.nav__logout:hover { background: var(--nav-bg-2); color: var(--nav-strong); }

@media (max-width: 760px) {
  .banner { flex-wrap: wrap; }
  .check-grid, .dl--2 { grid-template-columns: minmax(0, 1fr); }
  .kpis--admin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paywall { padding: 18px; }
  .paywall__title { font-size: 34px; }
  .settings__tab { flex: none; white-space: nowrap; }
}

/* ---------- udostępnianie ogłoszenia (okno „Udostępnij”) ---------- */
.btn__count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 2px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.share-link { display: flex; align-items: center; gap: 8px; }
.share-link .input { flex: 1; min-width: 0; height: 40px; font-size: 13px; border-radius: var(--r-pill); padding: 0 16px; }
.share-link .btn { height: 40px; }
.share-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: -4px; font-size: 12.5px; color: var(--text-3); }
.share-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.share-meta .icon { width: 14px; height: 14px; }
.share-meta__actions { margin-left: auto; gap: 6px; }
.share-meta__actions .btn .icon { width: 14px; height: 14px; }
.share-msg-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share-scope { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); font-size: 13px; line-height: 1.5; color: var(--text-2); }
.share-scope li { display: flex; align-items: flex-start; gap: 10px; }
.share-scope .icon { margin-top: 2px; color: var(--text-3); }
.share-scope strong { color: var(--text); font-weight: 600; }
.share-replies { display: flex; flex-direction: column; gap: 8px; }
.share-reply { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.share-reply__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; }
.share-reply__head strong { font-weight: 600; }
.share-reply__comment { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
.share-answer { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: var(--surface-3); font-size: 12px; font-weight: 600; color: var(--text-2); }
.share-answer::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.share-answer.is-yes { background: var(--ok-bg); color: var(--ok); }
.share-answer.is-maybe { background: var(--warn-bg); color: var(--warn); }
.share-answer.is-no { background: var(--surface-3); color: var(--text-3); }

@media (max-width: 760px) {
  .share-link { flex-wrap: wrap; }
  .share-link .input { flex-basis: 100%; }
  .share-meta__actions { margin-left: 0; }
}

/* ---------- zmiany ogłoszeń ---------- */
.tag--change { background: var(--accent-bg); border-color: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.facts__note { display: block; font-size: 11.5px; font-weight: 500; color: var(--accent); }
.change-kind { font-weight: 600; color: var(--text); }
.change-kind.is-date { color: var(--accent); }
.changes { display: flex; flex-direction: column; gap: 8px; }
.changes__list { display: flex; flex-direction: column; gap: 8px; }
.changes__item { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.changes__item.is-date { background: var(--surface); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.changes__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; }
.changes__head strong { font-weight: 600; }
.changes__when { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.changes__dates { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.changes__dates s { color: var(--text-3); }
.changes__dates .icon { width: 14px; height: 14px; color: var(--text-3); }
.changes__item.is-date .changes__dates strong { color: var(--accent); }
.changes__details summary { font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.changes__block { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.changes__label { font-size: 12px; color: var(--text-3); }
