:root {
  /* identyfikacja vitdesk.pl: Navy #0B3B6F, Deep #08274E, Blue #0095F2, Cyan #00C2F2, Lime #B6DE4A, Light #F2F8FE */
  --brand-navy: #0b3b6f;
  --brand-deep: #08274e;
  --brand-blue: #0095f2;
  --brand-cyan: #00c2f2;
  --brand-lime: #b6de4a;
  --bg: #f2f8fe;
  --surface: #ffffff;
  --surface-2: #f6faff;
  --line: #dbe6f2;
  --line-strong: #c3d3e6;
  --ink: #0d2341;
  --ink-2: #44597a;
  --ink-3: #66799a;
  --navy: var(--brand-deep);
  --navy-2: #0e3563;
  --accent: #0077cc;
  --accent-ink: #ffffff;
  --accent-soft: #e3f2fd;
  --signal: var(--brand-cyan);
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn: #8a5a00;
  --warn-soft: #fff4d6;
  --ok: #3f7d12;
  --ok-soft: #eef8dc;
  --info: #0b5fa8;
  --info-soft: #e5f1fc;
  --muted-soft: #edf3fa;
  --focus: #0095f2;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(8 39 78 / 5%), 0 2px 8px rgb(8 39 78 / 6%);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-head: "Manrope", "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #061a33;
    --surface: #0b2342;
    --surface-2: #0f2a4d;
    --line: #1c3a60;
    --line-strong: #2a4b75;
    --ink: #e8f1fb;
    --ink-2: #b3c6dd;
    --ink-3: #8aa0bc;
    --navy: #041327;
    --navy-2: #0b2b52;
    --accent: #3db8ff;
    --accent-ink: #04203d;
    --accent-soft: #0f3359;
    --danger: #ff8a80;
    --danger-soft: #3b1c1c;
    --warn: #f3c45a;
    --warn-soft: #3a2f12;
    --ok: #b6de4a;
    --ok-soft: #22341a;
    --info: #7cc8ff;
    --info-soft: #0f3359;
    --muted-soft: #132f54;
    --focus: #3db8ff;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 800; color: var(--ink); }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.nowrap { white-space: nowrap; }

/* --- przyciski i formularze ---------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #0069b5; border-color: #0069b5; filter: none; }
@media (prefers-color-scheme: dark) { .btn-primary:hover { background: #6cc9ff; border-color: #6cc9ff; } }
.btn-danger { color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=time], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); outline: none;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.form-error { color: var(--danger); font-size: 14px; min-height: 0; margin: 0 0 8px; }
.form-error:empty { display: none; }

/* --- logowanie ------------------------------------------------------------------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; background:
  radial-gradient(900px 480px at 0% 0%, color-mix(in srgb, var(--brand-cyan) 16%, transparent), transparent 62%),
  radial-gradient(700px 420px at 100% 100%, color-mix(in srgb, var(--brand-blue) 14%, transparent), transparent 60%), var(--bg); }
.auth::after { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; right: max(6vw, 24px); top: 8vh;
  background: radial-gradient(circle at 35% 35%, #d6ee93, var(--brand-lime) 60%); opacity: .55; filter: blur(2px); pointer-events: none; }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px 28px; box-shadow: 0 20px 50px rgb(8 39 78 / 12%); position: relative; z-index: 1; }
.auth-card .logo { display: flex; justify-content: center; margin-bottom: 6px; font-size: 34px; }
.auth-card .logo svg { width: 58px; height: 58px; }
.auth-card .tagline { text-align: center; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 22px; }
.auth-card h1 { font-size: 20px; margin-bottom: 6px; }
.auth-card .lead { color: var(--ink-2); font-size: 14px; margin-bottom: 16px; }
.auth-card .btn-primary { width: 100%; margin-top: 4px; }
.auth-links { margin-top: 14px; font-size: 14px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 600; }

.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 800; font-size: 22px; letter-spacing: -0.035em; color: var(--brand-navy); text-decoration: none; }
.logo svg { width: 36px; height: 36px; flex: none; }
.logo b { color: var(--brand-cyan); font-weight: 800; }
@media (prefers-color-scheme: dark) { .logo { color: #fff; } }
.side .logo, .topbar .logo { color: #fff; }
.side .logo .orbit, .topbar .logo .orbit { stroke: #2f74b8; }
.side .logo .orbit-dot, .topbar .logo .orbit-dot { fill: #2f74b8; }

/* --- układ aplikacji --------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100%; }
.side { background: linear-gradient(180deg, var(--navy) 0%, color-mix(in srgb, var(--navy) 82%, #000) 100%); color: #d7e0ec; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-head { padding: 18px 18px 12px; }
.side nav { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 10px; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8fa1ba; padding: 14px 10px 4px; font-weight: 700; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: #d7e0ec; text-decoration: none; font-size: 14px; font-weight: 550; }
.nav-link:hover { background: var(--navy-2); color: #fff; }
.nav-link.active { background: linear-gradient(90deg, #0077cc, #0095f2); color: #fff; box-shadow: 0 4px 14px rgb(0 149 242 / 25%); }
.nav-link svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav-link .count { margin-left: auto; font-size: 12px; background: rgb(255 255 255 / 12%); padding: 0 7px; border-radius: 99px; min-width: 22px; text-align: center; }
.nav-link .count.alert { background: #e5484d; color: #fff; }
.nav-link.active .count { background: rgb(255 255 255 / 22%); }
.side-foot { padding: 12px; border-top: 1px solid rgb(255 255 255 / 8%); display: flex; align-items: center; gap: 10px; }
.side-foot .who { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; }
.side-foot .who strong { display: block; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who span { color: #8fa1ba; }
.side-foot a, .side-foot button { color: #d7e0ec; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; color: inherit; }
.icon-btn:hover { background: rgb(127 127 127 / 14%); }
.icon-btn svg { width: 20px; height: 20px; }

.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; align-items: center; gap: 8px; padding: 8px 12px; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.content { padding: 24px 28px 48px; width: 100%; max-width: 2400px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { color: var(--ink-2); margin: 4px 0 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }

/* --- filtry i tabela zgłoszeń ----------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters input[type=search] { width: 260px; max-width: 100%; }
.filters select { width: auto; min-width: 140px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 7px 12px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button[aria-pressed=true] { background: var(--accent-soft); color: var(--accent); }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr { cursor: pointer; }
table.list tbody tr:hover td { background: var(--surface-2); }
.t-title { font-weight: 600; color: var(--ink); text-decoration: none; display: block; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-sub { color: var(--ink-3); font-size: 13px; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }

/* --- etykiety -------------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; background: var(--muted-soft); color: var(--ink-2); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.st-new { background: var(--info-soft); color: var(--info); }
.st-assigned, .st-in_progress { background: var(--accent-soft); color: var(--accent); }
.st-waiting_customer, .st-waiting_vendor { background: var(--warn-soft); color: var(--warn); }
.st-resolved { background: var(--ok-soft); color: var(--ok); }
.st-closed { background: var(--muted-soft); color: var(--ink-3); }
.pr { font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 12px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--ink-2); }
.pr-P1 { background: var(--danger); border-color: var(--danger); color: #fff; }
.pr-P2 { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.sla { font-size: 12px; font-weight: 650; white-space: nowrap; }
.sla-ok { color: var(--ink-3); }
.sla-warning { color: var(--warn); }
.sla-breached { color: var(--danger); }
.sla-paused { color: var(--ink-3); font-style: italic; }

/* --- szczegóły zgłoszenia ---------------------------------------------------------------- */
.ticket { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.ticket-head .num { color: var(--ink-3); font-weight: 600; font-size: 14px; }
.ticket-head h1 { margin: 2px 0 8px; word-break: break-word; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.thread { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.msg.from-staff { border-left: 3px solid var(--accent); }
.msg.internal { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.msg-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; font-size: 14px; }
.msg-head strong { font-weight: 650; }
.msg-head time { color: var(--ink-3); font-size: 13px; }
.msg-body { word-break: break-word; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-body pre { background: var(--surface-2); padding: 8px; border-radius: 6px; overflow-x: auto; }
.msg-body code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.file-chip { display: inline-flex; gap: 6px; align-items: center; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 99px; font-size: 13px; text-decoration: none; color: var(--ink); background: var(--surface); }
.file-chip svg { width: 14px; height: 14px; }
.composer { margin-top: 16px; }
.composer textarea { min-height: 120px; }
.composer .tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.composer.internal textarea { background: var(--warn-soft); }
.side-panel .card-pad { display: flex; flex-direction: column; gap: 2px; }
.prop { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; align-items: center; padding: 5px 0; font-size: 14px; }
.prop > span:first-child { color: var(--ink-3); font-size: 13px; }
.prop select, .prop input { min-height: 32px; padding: 4px 8px; font-size: 14px; }
.history { font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.history time { color: var(--ink-3); }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--info-soft); color: var(--ink); font-size: 14px; margin-bottom: 12px; }
.notice.ok { background: var(--ok-soft); }
.notice.warn { background: var(--warn-soft); }

/* --- administracja ------------------------------------------------------------------------ */
.tabs-bar { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs-bar a { padding: 8px 12px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; }
.tabs-bar a.active { color: var(--accent); border-color: var(--accent); }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { display: inline-flex; gap: 4px; align-items: center; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; }
table.edit { width: 100%; border-collapse: collapse; font-size: 14px; }
table.edit th { text-align: left; font-size: 12px; color: var(--ink-3); padding: 6px; font-weight: 700; }
table.edit td { padding: 4px 6px; }
table.edit input, table.edit select { min-height: 34px; padding: 4px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 2px 9px; border-radius: 99px; background: var(--muted-soft); font-size: 13px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat span { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.stat.alert strong { color: var(--danger); }

/* --- okno dialogowe i powiadomienia ------------------------------------------------------- */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100% - 24px)); background: var(--surface); color: var(--ink); box-shadow: 0 20px 50px rgb(0 0 0 / 30%); }
dialog::backdrop { background: rgb(10 18 30 / 50%); }
dialog form { padding: 20px; }
dialog h2 { margin-bottom: 14px; }
dialog .btn-row { justify-content: flex-end; margin-top: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 100; box-shadow: 0 8px 24px rgb(0 0 0 / 25%); max-width: calc(100% - 32px); }
.toast.error { background: var(--danger); color: #fff; }
.copy-box { display: flex; gap: 6px; }
.copy-box input { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* --- telefon ------------------------------------------------------------------------------ */
@media (max-width: 960px) {
  .ticket { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .shell.menu-open .side { transform: none; box-shadow: 0 0 40px rgb(0 0 0 / 40%); }
  .scrim { position: fixed; inset: 0; background: rgb(0 0 0 / 40%); z-index: 30; }
  .shell.menu-open .scrim { display: block; }
  .topbar { display: flex; }
  .topbar .logo { color: #fff; font-size: 18px; }
  .topbar .logo svg { width: 26px; height: 26px; }
  .content { padding: 16px 16px 40px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  table.list td, table.list th { padding: 9px 8px; }
  .t-title { max-width: 62vw; }
  .filters input[type=search] { width: 100%; }
}
@media (prefers-color-scheme: dark) {
  .pr-P1 { color: #2b0606; }
}

/* --- baza wiedzy ------------------------------------------------------------------------- */
.kb-search { display: flex; gap: 8px; margin-bottom: 16px; max-width: 760px; }
.kb-search input { flex: 1; min-height: 44px; font-size: 16px; }
.kb-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.kb-side { display: flex; flex-direction: column; gap: 12px; }
.kb-side-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.kb-tree, .kb-tree ul { list-style: none; margin: 0; padding: 0; }
.kb-tree ul { padding-left: 14px; border-left: 1px solid var(--line); margin-left: 8px; }
.kb-tree li { position: relative; }
.kb-tree a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 14px; }
.kb-tree a:hover { background: var(--muted-soft); }
.kb-tree a.active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.kb-tree .count, .side-link .count { color: var(--ink-3); font-size: 12px; }
.side-link .count.warn { color: var(--warn); font-weight: 700; }
.kb-cat-tools { position: absolute; right: 26px; top: 0; display: none; }
.kb-tree li:hover > .kb-cat-tools { display: block; }
.kb-cat-tools .icon-btn { width: 28px; height: 28px; font-size: 13px; color: var(--ink-3); }
.side-link { display: block; padding: 5px 0; font-size: 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.side-link:last-child { border-bottom: 0; }
.side-link:hover { color: var(--accent); }
.chip { text-decoration: none; color: var(--ink-2); }
.chip-on { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.kb-list { display: flex; flex-direction: column; gap: 10px; }
.kb-list > .card, .kb-side > .card, .kb-editor > .card { margin: 0; }
.kb-card { display: block; padding: 14px 16px; text-decoration: none; color: var(--ink); transition: border-color .12s; }
.kb-card:hover { border-color: var(--accent); }
.kb-card-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kb-card-head strong { font-size: 16px; font-weight: 650; }
.kb-card p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.kb-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.kb-read { max-width: 860px; }
.prose { line-height: 1.65; word-break: break-word; }
.prose .lead { font-size: 17px; color: var(--ink-2); }
.prose h2 { font-size: 20px; margin: 22px 0 8px; }
.prose h3 { font-size: 17px; margin: 18px 0 6px; }
.prose h4 { font-size: 15px; margin: 14px 0 4px; }
.prose > :first-child { margin-top: 0; }
.prose img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; display: block; margin: 8px 0; }
.prose pre { background: var(--surface-2); border: 1px solid var(--line); padding: 10px 12px; border-radius: 8px; overflow-x: auto; }
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; background: var(--muted-soft); padding: 1px 5px; border-radius: 4px; }
.prose pre code { background: none; padding: 0; }
.prose blockquote, .msg-body blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); color: var(--ink-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.md-table { overflow-x: auto; margin: 10px 0; }
.md-table table { border-collapse: collapse; font-size: 14px; min-width: 50%; }
.md-table th, .md-table td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.md-table th { background: var(--surface-2); font-weight: 650; }
.kb-feedback { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.kb-feedback .btn[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.kb-feedback .fb-more { flex-basis: 100%; }
.kb-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.kb-toolbar { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 8px; }
.kb-toolbar .tools { gap: 2px; }
.kb-toolbar .icon-btn { width: 34px; height: 34px; font-size: 14px; font-weight: 700; border: 1px solid var(--line); }
.kb-toolbar label.icon-btn svg { width: 16px; height: 16px; }
.kb-panes { display: grid; gap: 12px; }
.kb-panes textarea { min-height: 460px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; line-height: 1.55; resize: vertical; }
.kb-panes .kb-preview { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; min-height: 460px; background: var(--surface); }
.kb-panes[data-mode=edit] .kb-preview, .kb-panes[data-mode=preview] textarea { display: none; }
.kb-panes[data-mode=split] { grid-template-columns: 1fr 1fr; }
.kb-panes[data-mode=split] .kb-preview { max-height: 640px; overflow: auto; }
.kb-meta { position: sticky; top: 12px; }
.kb-meta select[multiple] { min-height: 0; }
.btn-col { display: flex; flex-direction: column; gap: 6px; }
.btn-col .btn { justify-content: center; }
.kb-suggest { border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); border-radius: 10px; padding: 8px; margin: -4px 0 12px; }
.kb-suggest-head { display: flex; gap: 6px; align-items: center; font-weight: 650; font-size: 14px; color: var(--accent); padding: 2px 4px 6px; }
.kb-suggest-head svg, h3 svg { width: 16px; height: 16px; vertical-align: -2px; }
.kb-suggest-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--ink); margin-top: 6px; font: inherit; }
.kb-suggest-item:hover { border-color: var(--accent); }
.kb-suggest-item span { font-size: 13px; color: var(--ink-3); }
.kb-pick { max-height: 50vh; overflow: auto; margin: 8px 0 12px; }
.kb-dialog-body { max-height: 60vh; overflow: auto; }
.kb-linked { display: flex; gap: 6px; align-items: center; font-size: 14px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.kb-linked a { flex: 1; }
.kb-linked .icon-btn { width: 26px; height: 26px; font-size: 12px; color: var(--ink-3); }
.kb-versions { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; margin: 8px 0 12px; min-height: 300px; }
.kb-vlist { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow: auto; }
.kb-vlist button { display: flex; flex-direction: column; gap: 1px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 9px; cursor: pointer; color: var(--ink); font: inherit; font-size: 14px; }
.kb-vlist button.active { border-color: var(--accent); background: var(--accent-soft); }
.kb-vview { max-height: 60vh; overflow: auto; }
.diff { font-family: ui-monospace, Consolas, monospace; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.diff div { padding: 1px 8px; white-space: pre-wrap; word-break: break-word; }
.diff div span { display: inline-block; width: 14px; color: var(--ink-3); user-select: none; }
.diff .add { background: var(--ok-soft); }
.diff .del { background: var(--danger-soft); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.diff .gap { color: var(--ink-3); text-align: center; background: var(--surface-2); }
@media (max-width: 960px) {
  .kb-layout, .kb-editor { grid-template-columns: minmax(0, 1fr); }
  .kb-side, .kb-list { min-width: 0; }
  .kb-side { order: 2; }
  .kb-meta { position: static; }
  .kb-panes[data-mode=split] { grid-template-columns: 1fr; }
  .kb-versions { grid-template-columns: 1fr; }
  .kb-vlist { flex-direction: row; overflow-x: auto; }
  .kb-vlist button { min-width: 150px; }
}

/* --- zadania: tablica Kanban ------------------------------------------------------------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { background: var(--muted-soft); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 180px; max-height: calc(100vh - 230px); }
.kcol > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 700; font-size: 14px; border-top: 3px solid var(--col, transparent); border-radius: var(--radius) var(--radius) 0 0; }
.kcol > header .count { font-size: 12px; color: var(--ink-3); background: var(--surface); border-radius: 99px; padding: 0 8px; }
.kcol-hint { margin: -6px 12px 6px; font-size: 12px; color: var(--ink-3); }
.kcol-body { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 8px; overflow-y: auto; min-height: 60px; flex: 1; }
.kcard { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); cursor: grab; }
.kcard:hover { border-color: var(--accent); }
.kcard.dragging { opacity: .4; }
.kcard.is-ticket { border-left: 3px solid var(--info); }
.kcard-top { display: flex; gap: 6px; align-items: center; color: var(--ink-3); }
.kcard-title { font-weight: 600; font-size: 14px; margin: 3px 0; line-height: 1.35; }
.kcard-proj { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard-foot { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.kcard-foot .avatar { margin-left: auto; }
.kchip { font-size: 11px; padding: 0 6px; border-radius: 99px; background: var(--info-soft); color: var(--info); font-weight: 600; }
.drop-mark { height: 4px; border-radius: 4px; background: var(--accent); }
.kadd { border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 13px; padding: 6px 12px 10px; text-align: left; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.kadd svg { width: 14px; height: 14px; }
.kadd:hover { color: var(--accent); }
.avatar { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
.avatar.sm { min-width: 20px; height: 20px; font-size: 10px; }
.late { color: var(--danger) !important; font-weight: 600; }
.saved-views { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; }
.chip.saved { display: inline-flex; gap: 4px; align-items: center; }
.chip.saved a { color: var(--ink); text-decoration: none; }
.meter { height: 6px; border-radius: 99px; background: var(--muted-soft); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.meter.warn > span { background: #d79b16; }
.meter.danger > span { background: var(--danger); }

/* --- planowanie w szczegółach zadania --------------------------------------------------- */
#planning { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
#planning .card + .card { margin-top: 0; }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.plan-card .meter { margin-bottom: 8px; }
.checklist, .sublist, .milestones { list-style: none; margin: 0; padding: 0; }
.checklist li, .sublist li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checklist li:last-child, .sublist li:last-child { border-bottom: 0; }
.checklist .check { flex: 1; }
.checklist .done { text-decoration: line-through; color: var(--ink-3); }
.checklist .icon-btn, .sublist .icon-btn { width: 26px; height: 26px; font-size: 12px; color: var(--ink-3); }
.sublist a { flex: 1; text-decoration: none; color: var(--ink); }
.inline-add input { margin-top: 6px; }

/* --- projekty -------------------------------------------------------------------------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.proj-grid > .card { margin: 0; }
.proj-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; text-decoration: none; color: var(--ink); }
.proj-card:hover { border-color: var(--accent); }
.proj-card h3 { font-size: 17px; margin: 0; }
.proj-top { display: flex; justify-content: space-between; align-items: center; }
.proj-metric { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.proj-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.stage-chip { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.badge.pst-active { background: var(--ok-soft); color: var(--ok); }
.badge.pst-planned { background: var(--info-soft); color: var(--info); }
.badge.pst-on_hold { background: var(--warn-soft); color: var(--warn); }
.badge.pst-done { background: var(--muted-soft); color: var(--ink-2); }
.badge.pst-cancelled { background: var(--muted-soft); color: var(--ink-3); }
.proj-overview { margin-top: 16px; gap: 16px; align-items: start; }
.proj-overview > .card + .card { margin-top: 0; }
.stages { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.stage { display: flex; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; border-top: 4px solid var(--c); background: var(--surface); }
.stage-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--c); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.stage.st-done .stage-dot { background: var(--c); }
.stage.st-active .stage-dot, .stage.st-awaiting_acceptance .stage-dot { background: color-mix(in srgb, var(--c) 30%, transparent); }
.stage.st-active { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 35%, transparent); }
.stage.st-awaiting_acceptance { background: var(--warn-soft); }
.stage-body { min-width: 0; }
.stage-note { margin-top: 4px; color: var(--warn); }
.stage-actions { margin-top: 4px; gap: 10px; }
.milestones li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.milestones li.done .ms-name { text-decoration: line-through; color: var(--ink-3); }
.milestones li.late .ms-name, .milestones li.late .small { color: var(--danger); }
.milestones .icon-btn { width: 26px; height: 26px; font-size: 12px; color: var(--ink-3); }
.person-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.note-card + .note-card { margin-top: 12px; }

/* --- wykres Gantta --------------------------------------------------------------------- */
.gantt { display: grid; grid-template-columns: 260px minmax(0, 1fr); overflow: hidden; }
.g-left { border-right: 1px solid var(--line); background: var(--surface); }
.g-hd { height: 52px; display: flex; align-items: flex-end; padding: 0 10px 6px; font-size: 12px; font-weight: 700; color: var(--ink-3); border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .04em; }
.g-row { height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 10px; font-size: 13px; border-bottom: 1px solid var(--line); }
.g-row a { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-row a:hover { color: var(--accent); }
.g-stage { font-weight: 700; background: var(--surface-2); border-left: 4px solid var(--c); }
.g-right { overflow-x: auto; position: relative; }
.g-canvas { position: relative; }
.g-months { position: relative; height: 28px; border-bottom: 0; padding: 0; }
.g-months span { position: absolute; top: 6px; padding-left: 6px; border-left: 1px solid var(--line-strong); font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; text-transform: none; letter-spacing: 0; }
.g-days { position: relative; height: 24px; border-bottom: 1px solid var(--line); }
.g-days span { position: absolute; top: 0; height: 24px; display: grid; place-items: center; font-size: 11px; color: var(--ink-3); }
.g-days span.we { background: var(--surface-2); }
.g-days span.td { color: var(--accent); font-weight: 800; }
.g-grid { position: relative; background: repeating-linear-gradient(to bottom, transparent 0 31px, var(--line) 31px 32px); }
.g-grid i { position: absolute; top: 0; bottom: 0; }
.g-grid i.we { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.g-grid i.today { width: 2px; background: var(--accent); z-index: 2; }
.g-grid i.pend { width: 0; border-left: 2px dashed var(--danger); z-index: 2; }
.g-ms { position: absolute; top: -9px; width: 14px; height: 14px; background: #d79b16; transform: rotate(45deg); z-index: 3; border-radius: 2px; }
.g-ms.done { background: var(--ok); }
.g-sbar { position: absolute; height: 6px; border-radius: 3px; background: var(--c); opacity: .55; }
.g-bar { position: absolute; height: 20px; border-radius: 6px; background: var(--c); color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; padding: 0 6px; cursor: grab; z-index: 1; white-space: nowrap; overflow: hidden; touch-action: none; }
.g-bar span { overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.g-bar.done { opacity: .5; }
.g-bar.late { box-shadow: 0 0 0 2px var(--danger); }
.g-bar.undated { background: transparent; border: 2px dashed var(--c); color: var(--ink); }
.g-bar em { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.g-deps { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.g-deps path { fill: none; stroke: var(--ink-3); stroke-width: 1.5; }
.g-deps path.bad { stroke: var(--danger); }
.g-deps marker path { fill: var(--ink-3); stroke: none; }

/* --- kalendarz ------------------------------------------------------------------------- */
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-title { font-size: 17px; margin-left: 6px; text-transform: capitalize; }
.cal-people { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip.person { border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font: inherit; font-size: 13px; }
.chip.person.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 650; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.cal-layout.no-side { grid-template-columns: 1fr; }
.cal-layout > .card { margin: 0; }
.cal-main { overflow: auto; }
.cal-side { position: sticky; top: 12px; max-height: calc(100vh - 40px); overflow: auto; }
.unsched { display: flex; flex-direction: column; gap: 8px; }
.uitem { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; cursor: grab; background: var(--surface); font-size: 13px; }
.uitem:hover { border-color: var(--accent); }
.uitem-title { font-weight: 600; margin: 2px 0; }
.tg { min-width: calc(60px + var(--cols) * 96px); }
.tg-head, .tg-allday { display: grid; grid-template-columns: 60px repeat(var(--cols), minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.tg-col-head { padding: 8px 6px; text-align: center; border-left: 1px solid var(--line); font-size: 13px; }
.tg-col-head.today strong { color: var(--accent); }
.tg-col-head .load { margin: 5px auto 2px; max-width: 120px; }
.load { height: 5px; border-radius: 99px; background: var(--muted-soft); overflow: hidden; }
.load > span { display: block; height: 100%; background: var(--signal); }
.load.over > span { background: var(--danger); }
.tg-gutter { font-size: 11px; color: var(--ink-3); position: relative; padding: 4px; }
.tg-ad-cell { border-left: 1px solid var(--line); padding: 3px; display: flex; flex-direction: column; gap: 2px; min-height: 28px; }
.ad { display: block; font: inherit; font-size: 11px; padding: 2px 6px; border-radius: 4px; border: 0; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; color: var(--ink); }
.ad.dl { background: var(--warn-soft); }
.ad.dl.late { background: var(--danger-soft); color: var(--danger); }
.ad.ms { background: color-mix(in srgb, #d79b16 18%, transparent); }
.tg-body { position: relative; display: grid; grid-template-columns: 60px repeat(var(--cols), minmax(0, 1fr)); }
.tg-body > .tg-gutter span { position: absolute; right: 6px; transform: translateY(-6px); }
.tg-col { position: relative; border-left: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0 calc(48px - 1px), var(--line) calc(48px - 1px) 48px); cursor: cell; }
.tg-col.today { background-color: color-mix(in srgb, var(--accent-soft) 35%, transparent); }
.tg-col.drop { background-color: var(--accent-soft); }
.tev { position: absolute; border-radius: 6px; padding: 2px 6px; font-size: 12px; overflow: hidden; cursor: grab; touch-action: none; border-left: 3px solid; z-index: 1; }
.tev-time { font-size: 11px; opacity: .85; }
.tev-title { font-weight: 650; line-height: 1.25; }
.tev-loc { font-size: 11px; opacity: .8; }
.tev-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.tev.ro { cursor: pointer; }
.tev.sync-err { outline: 2px dashed var(--danger); }
.ev-block { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.ev-visit { background: var(--info-soft); border-color: var(--info); color: var(--ink); }
.ev-oncall { background: color-mix(in srgb, #7c4dff 16%, transparent); border-color: #7c4dff; color: var(--ink); }
.ev-absence { background: repeating-linear-gradient(135deg, var(--muted-soft) 0 6px, var(--surface-2) 6px 12px); border-color: var(--ink-3); color: var(--ink-2); }
.ev-other { background: var(--muted-soft); border-color: var(--line-strong); color: var(--ink); }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.mv-head { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 12px; font-weight: 700; color: var(--ink-3); text-align: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mv-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mv-day { min-height: 110px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.mv-day:hover { background: var(--surface-2); }
.mv-day.out { background: var(--surface-2); color: var(--ink-3); }
.mv-day.today .mv-num { background: var(--accent); color: var(--accent-ink); }
.mv-num { align-self: flex-end; font-size: 12px; font-weight: 700; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.mchip { display: block; font: inherit; font-size: 11px; padding: 1px 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 0; border-left: 3px solid transparent; text-align: left; cursor: pointer; text-decoration: none; color: var(--ink); }
.mchip.dl { background: var(--warn-soft); }
.mchip.dl.late { background: var(--danger-soft); color: var(--danger); }
.mchip.ms { background: color-mix(in srgb, #d79b16 18%, transparent); }
.team { min-width: 760px; }
.team-row { display: grid; grid-template-columns: 140px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.team-head { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.team-name { padding: 8px 10px; font-weight: 650; font-size: 14px; }
.team-cell { border-left: 1px solid var(--line); padding: 4px; min-height: 64px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; cursor: cell; }
.team-head .team-cell { min-height: 0; text-align: center; cursor: default; padding: 8px 4px; }
.team-cell.today { background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
.team-cell.absent { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--surface-2) 8px 16px); }
.team-cell.drop { background: var(--accent-soft); }
.avail { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
@media (max-width: 960px) {
  .cal-layout { grid-template-columns: 1fr; }
  .cal-side { position: static; max-height: none; }
  .gantt { grid-template-columns: 150px minmax(0, 1fr); }
  .kcol { max-height: none; }
}

/* --- ewidencja, dokumentacja IT, RMA, protokoły ------------------------------------------ */
.badge.as-in_use { background: var(--ok-soft); color: var(--ok); }
.badge.as-stock { background: var(--info-soft); color: var(--info); }
.badge.as-repair { background: var(--warn-soft); color: var(--warn); }
.badge.as-retired { background: var(--muted-soft); color: var(--ink-3); }
.badge.rma-agent { background: var(--info-soft); color: var(--info); }
.badge.rma-client { background: var(--warn-soft); color: var(--warn); }
.badge.rma-supplier { background: color-mix(in srgb, #7c3aed 14%, transparent); color: #7c3aed; }
.badge.rma-none { background: var(--muted-soft); color: var(--ink-2); }
.asset-props .prop { grid-template-columns: 120px minmax(0, 1fr); }
pre.code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 12.5px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.rma-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 16px; counter-reset: s; }
.rma-steps li { flex: 1 1 100px; position: relative; padding: 6px 8px 6px 28px; background: var(--muted-soft); border-radius: 6px; font-size: 12.5px; color: var(--ink-3); counter-increment: s; }
.rma-steps li::before { content: counter(s); position: absolute; left: 7px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--line-strong); color: #fff; font-size: 10px; display: grid; place-items: center; font-weight: 700; }
.rma-steps li.done { background: var(--ok-soft); color: var(--ok); }
.rma-steps li.done::before { content: "✓"; background: var(--ok); }
.rma-steps li.cur { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.rma-steps li.cur::before { background: var(--accent-ink); color: var(--accent); }
.dev-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.dev-layout > .card { margin: 0; }
.dev-list { max-height: 75vh; overflow: auto; }
.dev-cat { padding: 8px 12px 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.dev-item { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.dev-item:hover { background: var(--surface-2); }
.dev-item.on { background: var(--accent-soft); }
.dev-item > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.dev-item .dot { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.port-grid { display: flex; flex-wrap: wrap; gap: 4px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.port { position: relative; width: 38px; height: 34px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface-2); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; }
.port.up { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.port.trunk { box-shadow: inset 0 -3px 0 var(--accent); }
.port i { position: absolute; right: 2px; bottom: 1px; font-style: normal; font-size: 8px; color: var(--ink-3); }
.trace { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tr-hop { display: flex; flex-direction: column; padding: 6px 10px; border: 2px solid var(--c); border-radius: 8px; text-decoration: none; color: var(--ink); background: var(--surface); font-size: 13px; }
.tr-hop span { font-size: 12px; color: var(--ink-3); font-family: ui-monospace, Consolas, monospace; }
.tr-cable { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--muted-soft); color: var(--ink-2); }
.tr-cable::before, .tr-cable::after { content: "—"; color: var(--ink-3); margin: 0 3px; }
.tr-pass { color: var(--ink-3); }
.topo { overflow: auto; padding: 8px; background: repeating-linear-gradient(0deg, transparent 0 23px, var(--line) 23px 24px), repeating-linear-gradient(90deg, transparent 0 23px, var(--line) 23px 24px); background-color: var(--surface-2); }
.topo-svg { display: block; margin: 0 auto; max-width: none; }
.topo .node rect { filter: drop-shadow(0 1px 2px rgb(16 24 40 / 12%)); }
.vlan-grid td, .vlan-grid th { text-align: center; }
.vlan-grid td:first-child, .vlan-grid th:first-child { text-align: left; }
.vchip { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; margin: 1px; }
.vchip.acc { background: var(--ok-soft); color: var(--ok); }
.vchip.trk { background: var(--accent); color: var(--accent-ink); }
.rack-wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.rack-wrap svg { max-width: 100%; height: auto; }
.ipgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 3px; margin: 10px 0; }
.ipc { display: inline-grid; place-items: center; height: 24px; min-width: 24px; border-radius: 4px; background: var(--muted-soft); font-size: 10.5px; color: var(--ink-3); cursor: pointer; }
.ipc.static { background: var(--info); color: #fff; }
.ipc.dhcp_reservation, .ipc.dhcp { background: #0891b2; color: #fff; }
.ipc.gateway, .ipc.vip { background: var(--accent); color: var(--accent-ink); }
.ipc.net { background: var(--line-strong); color: var(--surface); cursor: default; }
.ipc.conf { background: var(--danger); color: #fff; }
.iplegend { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-bottom: 10px; color: var(--ink-3); }
.iplegend .ipc { height: 14px; min-width: 14px; }
.secret { letter-spacing: .05em; }
.prot-form { max-width: 920px; }
.prot-h { margin: 16px 0 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.prot-check { display: flex; flex-direction: column; gap: 6px; }
.prot-items input { min-width: 90px; }
.prot-photos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prot-photos img { width: 110px; height: 82px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.prot-sigs { margin-top: 16px; gap: 16px; align-items: start; }
.prot-sigs > .card { margin: 0; }
.sigpad { width: 100%; height: 160px; border: 1px dashed var(--line-strong); border-radius: 8px; background: #fff; touch-action: none; display: block; margin-bottom: 6px; }
.sigimg { max-width: 100%; height: 110px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; display: block; }
@media (max-width: 960px) {
  .dev-layout { grid-template-columns: 1fr; }
  .dev-list { max-height: 260px; }
}

/* skanowanie sieci */
.scan-top { gap: 0 16px; }
.scan-top .card { margin: 0 0 16px; }
#fst { width: auto; }
dialog .btn-row.left, .scan-opts { justify-content: flex-start; }
.plain-list { list-style: none; margin: 0; padding: 4px 16px 14px; display: grid; gap: 6px; font-size: 14px; }
.fgroup { border-top: 1px solid var(--line); padding: 10px 16px; }
.fgroup .fhead { margin-bottom: 6px; }
.fgroup .frow { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0 4px 22px; font-size: 14px; }
.fgroup .frow input { margin-top: 3px; }
fieldset.creds { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px 4px; margin: 4px 0 12px; }
fieldset.creds legend { font-size: 13px; font-weight: 650; padding: 0 4px; }
details.card > summary { list-style: none; cursor: pointer; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h2::before { content: "▸ "; color: var(--ink-3, #6b7685); }
details.card[open] > summary h2::before { content: "▾ "; }

/* identyfikacja vitdesk.pl — akcenty */
.stat strong { font-family: var(--font-head); font-weight: 800; color: var(--brand-navy); }
@media (prefers-color-scheme: dark) { .stat strong { color: #fff; } }
.page-head h1 { font-size: 26px; }
.tabs-bar a { font-weight: 600; }
.card-head h2 { font-family: var(--font-head); }

/* planowanie w kalendarzu */
fieldset.sched { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 4px 12px 0; margin: 0 0 14px; }
fieldset.sched legend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; padding: 0 4px; }
fieldset.sched legend svg { width: 15px; height: 15px; }
.sched-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.sched-list li { display: flex; flex-direction: column; font-size: 14px; }
.sched-list .link-btn { text-align: left; font-weight: 500; color: var(--ink); }
.sched-list .link-btn strong { color: var(--accent); }
.sched-add { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sched-add input[type=date], .sched-add select { grid-column: span 2; }
.sched-add button { grid-column: span 2; justify-content: center; }

/* ===== vitdesk.pl — nagłówek aplikacji, hero, kafelki (wg makiety portalu z księgi znaku) ===== */
@media (min-width: 821px) { .shell { grid-template-columns: 264px minmax(0, 1fr); } }
.side-head { padding: 22px 20px 16px; }
.side .logo { font-size: 25px; }
.side .logo svg { width: 42px; height: 42px; }
.nav-link { padding: 9px 12px; border-radius: 10px; font-size: 14.5px; gap: 12px; }
.nav-link svg { width: 19px; height: 19px; }
.btn-lg { min-height: 44px; padding: 0 20px; font-size: 15.5px; border-radius: 10px; }
.btn-outline { background: var(--surface); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }
.btn-primary { box-shadow: 0 4px 12px rgb(0 119 204 / 22%); }

.appbar { display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 15; }
.appsearch { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; color: var(--ink-3); }
.appsearch svg { width: 19px; height: 19px; flex: none; }
.appsearch input { border: 0; background: transparent; min-height: 40px; padding: 0; flex: 1; outline: none; box-shadow: none; }
.appsearch:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.appbar .bellwrap { margin-left: auto; }
.appbar .bell { position: relative; color: var(--ink-2); }
.appbar .bell svg { width: 22px; height: 22px; }
.appbar .bell i { position: absolute; top: 5px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: #e5484d; border: 2px solid var(--surface); }
.usermenu { position: relative; }
.userchip { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 6px; border-radius: 12px; cursor: pointer; text-align: left; }
.userchip:hover { background: var(--muted-soft); }
.userchip > svg { width: 18px; height: 18px; color: var(--ink-3); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #0077cc, #0095f2); color: #fff; font: 700 14px var(--font-head); flex: none; }
.uname { display: flex; flex-direction: column; line-height: 1.25; }
.uname strong { font-size: 14px; }
.uname span { font-size: 12px; color: var(--ink-3); }
.userpop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgb(8 39 78 / 14%); padding: 6px; z-index: 30; }
.userpop a, .userpop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; border: 0; background: none; color: var(--ink); text-decoration: none; font-size: 14px; cursor: pointer; }
.userpop a:hover, .userpop button:hover { background: var(--muted-soft); }
.userpop svg { width: 17px; height: 17px; color: var(--ink-3); }

.hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 36px; margin-bottom: 18px;
  border-radius: 18px; border: 1px solid color-mix(in srgb, var(--brand-blue) 14%, var(--line));
  background: radial-gradient(420px 260px at 82% 10%, color-mix(in srgb, var(--brand-cyan) 16%, transparent), transparent 70%),
    radial-gradient(260px 180px at 98% 100%, color-mix(in srgb, var(--brand-blue) 14%, transparent), transparent 70%),
    linear-gradient(120deg, color-mix(in srgb, var(--brand-blue) 7%, var(--surface)), color-mix(in srgb, var(--brand-cyan) 10%, var(--surface))); }
.hero::before { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; right: 34%; bottom: -30px; background: color-mix(in srgb, var(--brand-blue) 8%, transparent); }
.hero-tx { position: relative; z-index: 1; max-width: 640px; }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; color: var(--brand-deep); margin-bottom: 6px; }
.hero p { color: var(--ink-2); font-size: 16.5px; margin-bottom: 18px; }
.hero .btn-row { gap: 12px; }
.hero-art { width: 170px; height: 170px; flex: none; position: relative; z-index: 1; filter: drop-shadow(0 10px 18px rgb(8 39 78 / 18%)); }
.hero-compact { padding: 22px 30px; }
.hero-compact h1 { font-size: 28px; }
.hero-compact .hero-art { width: 120px; height: 120px; }
@media (prefers-color-scheme: dark) {
  .hero h1 { color: #fff; }
  .hero { background: linear-gradient(120deg, #0b2a50, #0d3560); border-color: var(--line); }
}

.stat2 { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.stat2:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-1px); }
.stat-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.stat-ic svg { width: 26px; height: 26px; }
.stat-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stat-tx strong { font: 800 26px/1.1 var(--font-head); color: var(--brand-deep); }
.stat-tx span { color: var(--ink-2); font-size: 14px; font-weight: 500; }
.stat-go svg { width: 18px; height: 18px; color: var(--ink-3); }
.tone-blue .stat-ic { background: #e4f2fd; color: #0077cc; }
.tone-green .stat-ic { background: #eaf7dc; color: #4f8a10; }
.tone-orange .stat-ic { background: #fff1e0; color: #d9730d; }
.tone-purple .stat-ic { background: #efeafd; color: #6d4bd8; }
.tone-red .stat-ic { background: #fdecea; color: #c4320a; }
.stat2.alert .stat-tx strong { color: var(--danger); }
@media (prefers-color-scheme: dark) {
  .stat-tx strong { color: #fff; }
  .tone-blue .stat-ic { background: #0f3359; color: #6cc9ff; }
  .tone-green .stat-ic { background: #22341a; color: #b6de4a; }
  .tone-orange .stat-ic { background: #3a2a12; color: #ffb366; }
  .tone-purple .stat-ic { background: #2a2350; color: #b9a6ff; }
  .tone-red .stat-ic { background: #3b1c1c; color: #ff8a80; }
}
.stat-row:has(.stat2) { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }

/* starsze kafelki (dokumentacja IT) w tym samym stylu */
.stat { border-radius: 14px; padding: 16px 18px; }

@media (min-width: 821px) { .side-foot { display: none; } }
@media (max-width: 820px) {
  .appbar { display: none; }
  .hero { padding: 22px 20px; }
  .hero h1 { font-size: 26px; }
  .hero-art { display: none; }
}
@media (max-width: 820px) {
  .hero .btn-row .btn { width: 100%; }
  .eyebrow { letter-spacing: .1em; }
  .stat-row:has(.stat2) { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat2 { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .stat2 .stat-go { display: none; }
  .stat-ic { width: 44px; height: 44px; }
}

/* pola dodatkowe profilu */
fieldset.cfields { border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px 2px; margin: 4px 0 12px; }
fieldset.cfields legend { font-size: 13px; font-weight: 650; padding: 0 4px; }
.cf-list { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; margin: 6px 0 0; font-size: 12.5px; }
.cf-list dt { color: var(--ink-3); }
.cf-list dd { margin: 0; color: var(--ink); }
.cf-orgs { gap: 10px; max-height: 180px; overflow: auto; }

/* --- Komunikator ------------------------------------------------------------------------------- */
.nav-link [data-chat-count] { background: var(--brand-lime); color: var(--brand-deep); font-weight: 700; }
.chat { display: grid; grid-template-columns: 320px 1fr; height: calc(100dvh - 120px); min-height: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; background: var(--surface-2); }
.chat-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 6px; }
.chat-list-head h1 { font-size: 20px; margin: 0; }
.chat-live { padding: 0 14px 8px; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.chat-group { padding: 12px 14px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.chat-item { display: flex; gap: 10px; align-items: center; padding: 9px 14px; color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
.chat-item:hover { background: var(--muted-soft); }
.chat-item.on { background: var(--accent-soft); border-left-color: var(--accent); }
.chat-item.unread strong { font-weight: 800; }
.chat-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 700 13px var(--font-head); }
.chat-av svg { width: 17px; height: 17px; }
.chat-av.av-bot { background: linear-gradient(135deg, #00c2f2, #0b3b6f); color: #fff; }
.chat-av.av-team, .chat-av.av-queue { background: var(--ok-soft); color: var(--ok); }
.chat-it { min-width: 0; flex: 1; display: grid; }
.chat-it strong { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.chat-it > span { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-meta { display: grid; justify-items: end; gap: 3px; font-size: 11px; color: var(--ink-3); flex: none; }
.chat-meta b { background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 0 7px; font-size: 11px; }
.pdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; font-style: normal; }
.pdot.on { background: #3fb950; box-shadow: 0 0 0 2px rgb(63 185 80 / 20%); }
.chat-room { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-empty { margin: auto; padding: 24px; text-align: center; color: var(--ink-3); max-width: 380px; }
.chat-empty.small { margin: 24px auto; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-title { display: grid; min-width: 0; }
.chat-title strong { display: flex; align-items: center; gap: 6px; font: 700 16px var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-back { display: none; font-size: 22px; text-decoration: none; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; }
.chat-more { align-self: center; margin-bottom: 8px; }
.chat-day { text-align: center; font-size: 12px; color: var(--ink-3); margin: 14px 0 6px; }
.msg2 { width: fit-content; max-width: min(640px, 80%); margin-top: 10px; align-self: flex-start; }
.msg2.grouped { margin-top: 3px; }
.msg2.mine { align-self: flex-end; }
.msg2-who { font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 0 0 3px 4px; }
.msg2-body { background: var(--muted-soft); padding: 8px 12px; border-radius: 14px 14px 14px 4px; overflow-wrap: anywhere; }
.msg2-body > :first-child { margin-top: 0; }
.msg2-body > :last-child { margin-bottom: 0; }
.msg2.mine .msg2-body { background: var(--accent); color: var(--accent-ink); border-radius: 14px 14px 4px 14px; }
.msg2.mine .msg2-body a { color: inherit; }
.msg2.staff .msg2-body { background: var(--info-soft); }
.msg2.bot .msg2-body { background: var(--ok-soft); border: 1px solid var(--line); white-space: pre-wrap; }
.msg2-time { font-size: 11px; color: var(--ink-3); margin: 2px 6px 0; }
.msg2.mine .msg2-time { text-align: right; }
.chat-typing { font-size: 12px; color: var(--ink-3); min-height: 18px; padding-top: 6px; }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-compose textarea { flex: 1; resize: none; min-height: 40px; max-height: 180px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; }
.chat-closed { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
.dm-pick { display: grid; gap: 4px; max-height: 50vh; overflow-y: auto; }
.dm-person { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.dm-person:hover { background: var(--muted-soft); }
.dm-person strong { display: inline-flex; align-items: center; gap: 5px; }
.live-new { margin: 8px 0; }
@media (max-width: 820px) {
  .chat { grid-template-columns: 1fr; height: calc(100dvh - 96px); border-radius: 0; margin: 0 -16px; border-left: 0; border-right: 0; }
  .chat.has-room .chat-list { display: none; }
  .chat:not(.has-room) .chat-room { display: none; }
  .chat-back { display: inline-grid; }
  .msg2 { max-width: 88%; }
}

/* komunikator — rozbudowa: wyszukiwanie, akcje, reakcje, cytaty, pliki, wzmianki */
.chat-list-head .icon-btn { margin-left: auto; }
.chat-search { padding: 0 14px 8px; }
.chat-search input { width: 100%; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; }
.chat-hit .chat-it > span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chat-hit mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.chat-meta b.men { background: var(--brand-lime); color: var(--brand-deep); }
.chat-av.av-group { background: var(--info-soft); color: var(--info); }
.msg2-wrap { position: relative; display: flex; align-items: flex-start; gap: 4px; }
.msg2.mine .msg2-wrap { flex-direction: row-reverse; }
.msg2-body { min-width: 0; }
.msg2-actions { display: flex; gap: 0; opacity: 0; transition: opacity .12s; flex: none; }
.msg2:hover .msg2-actions, .msg2:focus-within .msg2-actions { opacity: 1; }
.msg2-actions .icon-btn { width: 28px; height: 28px; font-size: 14px; color: var(--ink-3); }
@media (hover: none) { .msg2-actions { opacity: .75; } }
.react-pick { position: absolute; z-index: 5; bottom: 100%; display: flex; gap: 2px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.msg2.mine .react-pick { right: 0; }
.react-pick .icon-btn { width: 32px; height: 32px; font-size: 18px; }
.msg2-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 4px 0; }
.msg2.mine .msg2-reacts { justify-content: flex-end; }
.react { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 1px 8px; font-size: 13px; cursor: pointer; color: var(--ink); }
.react.mine { border-color: var(--accent); background: var(--accent-soft); }
.msg2-quote { display: block; border-left: 3px solid var(--line-strong); padding: 2px 8px; margin-bottom: 6px; font-size: 12.5px; color: inherit; opacity: .85; text-decoration: none; border-radius: 2px; }
.msg2.mine .msg2-quote { border-left-color: rgb(255 255 255 / 55%); }
.msg2-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.msg2-files:first-child { margin-top: 0; }
.msg2-img img { display: block; max-width: min(260px, 100%); max-height: 220px; border-radius: 10px; object-fit: cover; }
.msg2-file { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: rgb(0 0 0 / 5%); color: inherit; text-decoration: none; font-size: 13px; max-width: 260px; }
.msg2-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg2-file svg { width: 16px; height: 16px; flex: none; }
.msg2.mine .msg2-file { background: rgb(255 255 255 / 18%); }
.mention { font-weight: 650; color: var(--accent); }
.mention.me { background: var(--warn-soft); color: var(--warn); border-radius: 4px; padding: 0 2px; }
.msg2.mine .mention { color: inherit; text-decoration: underline; }
.msg2.tagged .msg2-body { box-shadow: inset 3px 0 0 var(--brand-lime); }
.msg2.flash .msg2-body { animation: vdflash 1.6s ease; }
@keyframes vdflash { 0%, 40% { box-shadow: 0 0 0 3px var(--brand-cyan); } 100% { box-shadow: none; } }
.chat-compose { flex-direction: column; align-items: stretch; position: relative; }
.chat-compose-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-attach { cursor: pointer; flex: none; align-self: center; }
.chat-reply { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); background: var(--muted-soft); padding: 4px 4px 4px 10px; border-radius: 8px; }
.chat-reply span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-files { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-file { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; max-width: 240px; background: var(--surface-2); }
.chip-file img { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; }
.chip-file svg { width: 15px; height: 15px; }
.chip-file.busy { opacity: .6; }
.chat-mentions { position: absolute; bottom: 100%; left: 12px; z-index: 6; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; display: grid; }
.chat-mentions button { display: flex; align-items: center; gap: 6px; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 6px; cursor: pointer; color: var(--ink); font: inherit; }
.chat-mentions button.on, .chat-mentions button:hover { background: var(--accent-soft); }
.chat-room.drop { outline: 3px dashed var(--accent); outline-offset: -6px; }

/* aplikacja (PWA): pasek „bez połączenia”, ekran instalacji */
.netbar { position: fixed; left: 50%; transform: translateX(-50%); top: calc(8px + env(safe-area-inset-top)); z-index: 60; max-width: min(640px, calc(100% - 24px));
  padding: 9px 14px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow); }
.netbar.off { background: var(--brand-deep); color: #fff; }
.netbar.sync { background: var(--info-soft); color: var(--info); border: 1px solid var(--line); }
.netbar a { color: inherit; font-weight: 650; }
.app-grid { align-items: start; }
.app-grid .card h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 0 0 10px; }
.app-grid .card h2 svg { width: 20px; height: 20px; }
.app-grid h3 { font-size: 14px; margin: 14px 0 6px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.dev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dev-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
b.danger { color: var(--danger); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

/* etap 10: dzwonek, edytory reguł, kanały */
.bellwrap { position: relative; }
.appbar .bell i { width: auto; min-width: 16px; height: 16px; padding: 0 3px; top: 2px; right: 2px; font: 700 10px/12px var(--font); color: #fff; font-style: normal; text-align: center; }
.appbar .bell i:empty { min-width: 9px; width: 9px; height: 9px; padding: 0; top: 5px; right: 6px; }
.bellpop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: min(380px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgb(8 39 78 / 18%); overflow: hidden; }
.bellpop-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.bellpop-list { max-height: min(60vh, 460px); overflow-y: auto; }
.bell-item { display: grid; gap: 2px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13.5px; }
.bell-item:hover { background: var(--muted-soft); }
.bell-item.new { background: var(--accent-soft); }
.bell-item span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bell-item small { color: var(--ink-3); font-size: 11.5px; }
.rule-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; margin: 14px 0 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.rule-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; padding: 6px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; background: var(--surface-2); }
.rule-row select, .rule-row input, .rule-row textarea { flex: 1 1 140px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; }
.rule-row.action > select { flex: 0 0 170px; }
.rule-fields { flex: 1 1 300px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rule-fields textarea { flex-basis: 100%; }
.rule-test { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0; }
.rule-test input { flex: 1 1 220px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
fieldset.tpl { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 8px 0; display: grid; gap: 6px; }
fieldset.tpl legend { font-size: 13px; font-weight: 650; padding: 0 4px; }
fieldset.tpl input, fieldset.tpl textarea { padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; }
table.scopes td, table.scopes th { padding: 4px 8px; }
.ok-text { color: var(--ok); }

/* etap 11: raporty, pulpit kierownika, CSAT */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filters .field { margin: 0; min-width: 140px; flex: 1 1 140px; }
.filters .btn-row { margin: 0; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.kpi span { font-size: 12.5px; color: var(--ink-3); }
.kpi strong { font: 700 20px var(--font-head); color: var(--ink); }
table.report td.num, table.report th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-wrap { overflow-x: auto; }
svg.chart { width: 100%; min-width: 520px; height: 230px; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .ax { fill: var(--ink-3); font-size: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
ul.risk { list-style: none; margin: 0; padding: 0; }
ul.risk li { display: grid; gap: 2px; padding: 9px 16px; border-top: 1px solid var(--line); }
ul.risk li a { color: var(--ink); text-decoration: none; display: flex; gap: 6px; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.warn-text { color: var(--warn); }
span.danger, .danger { color: var(--danger); }
.stars { display: flex; gap: 4px; margin: 8px 0; }
.star { font-size: 30px; line-height: 1; border: 0; background: none; cursor: pointer; color: var(--line-strong); padding: 2px; }
.star.on { color: #f5b301; }
.star:focus-visible { outline: 2px solid var(--focus); border-radius: 6px; }
.csat-page { min-height: 100dvh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.csat-page .card { max-width: 480px; width: 100%; }
[data-csat] textarea { width: 100%; margin: 6px 0; padding: 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }

/* pulpit definiowany: kafelki na całą szerokość ekranu */
.dash-tools { display: flex; justify-content: flex-end; margin: -4px 0 8px; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 16px; align-items: stretch; }
/* kafelki w jednym rzędzie mają równą wysokość; treść wypełnia kafelek */
.dash-grid .dash-w { display: flex; flex-direction: column; }
.dash-grid .dash-w > .dash-body { flex: 1; }
.dash-grid .dash-w > .dash-body > .empty-state { height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; box-sizing: border-box; }
.reg-notice { display: flex; align-items: center; gap: 10px; }
.reg-notice svg { width: 20px; height: 20px; flex: none; }
.reg-notice span { flex: 1; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.dash-grid .card { margin: 0; }
.dash-w.full { grid-column: 1 / -1; }
.dash-w:not(.full) .hide-sm { display: none; }
.dash-body { max-height: 520px; overflow-y: auto; }
.agenda { list-style: none; margin: 0; padding: 4px 0; }
.agenda li { display: grid; grid-template-columns: 96px 92px 1fr; gap: 4px 10px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.agenda li:last-child { border-bottom: 0; }
.agenda li.past { opacity: .55; }
.agenda li.now { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.agenda a { color: var(--ink); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda small { grid-column: 3; }
.ag-time { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; }
.ag-kind { font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 99px; background: var(--muted-soft); color: var(--ink-2); text-align: center; }
.ag-kind.k-block { background: var(--info-soft); color: var(--info); }
.ag-kind.k-visit { background: var(--ok-soft); color: var(--ok); }
.ag-kind.k-oncall, .ag-kind.k-sla { background: var(--warn-soft); color: var(--warn); }
.ag-kind.k-due { background: var(--danger-soft); color: var(--danger); }
.weekbars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; padding: 14px 16px 6px; height: 170px; }
.wb { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); }
.wb-bar { width: 26px; background: var(--muted-soft); border-radius: 6px; position: relative; overflow: hidden; }
.wb-bar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); border-radius: 6px; }
.wb.today .wb-d { color: var(--accent); font-weight: 700; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.mini-list li.new { background: var(--accent-soft); }
.mini-list a { flex: 1; min-width: 0; display: grid; color: var(--ink); text-decoration: none; font-size: 14px; }
.mini-list a span { color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 0 8px; font-size: 12px; }
.dw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dw-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; }
.dw-row .check { flex: 1; }
.dw-row select { padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
@media (max-width: 820px) { .agenda li { grid-template-columns: 84px 1fr; } .agenda .ag-kind { display: none; } .agenda small { grid-column: 2; } }

/* pulpit — kalendarz tygodniowy */
.dash-acts { display: flex; align-items: center; gap: 12px; }
.dwk-nav { display: flex; align-items: center; gap: 6px; padding: 10px 16px 0; flex-wrap: wrap; }
.dwk-hint { margin-left: auto; }
.dwk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 10px 16px 14px; }
.dwk-day { border: 1px solid var(--line); border-radius: 8px; min-height: 140px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dwk-day:hover { border-color: var(--accent); }
.dwk-day.weekend { background: color-mix(in srgb, var(--line) 25%, transparent); }
.dwk-day.today { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.dwk-head { font-size: 12px; color: var(--ink-2); display: flex; gap: 6px; align-items: baseline; }
.dwk-day.today .dwk-head b { color: var(--accent); }
.dwk-list { display: flex; flex-direction: column; gap: 3px; }
.dwk-list .mchip { font-size: 12px; padding: 3px 6px; }
.dwk-empty { color: var(--ink-3, var(--ink-2)); font-size: 12px; opacity: .5; }
@media (max-width: 820px) { .dwk { grid-template-columns: 1fr; } .dwk-day { min-height: 0; } .dwk-hint { display: none; } }

/* zakładki z licznikiem, wyszukiwarka globalna */
.tabs-bar .count { display: inline-block; margin-left: 4px; font-size: 11px; line-height: 18px; padding: 0 6px; border-radius: 99px; background: var(--line); color: var(--ink-2); }
.tabs-bar .count.alert { background: #e5484d; color: #fff; }
.search-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .search-groups { grid-template-columns: 1fr; } }
.search-groups .card { margin: 0; }
.sr-list { list-style: none; margin: 0; padding: 0; }
.sr-list li a { display: block; padding: 9px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.sr-list li:last-child a { border-bottom: 0; }
.sr-list li a:hover { background: var(--accent-soft); }
.sr-list b { font-weight: 600; }
.sr-list .t-sub { margin-top: 2px; }
.sr-list mark { background: color-mix(in srgb, #ffd43b 45%, transparent); color: inherit; border-radius: 2px; }
.auth-card .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* wersja systemu: lewy dolny róg menu i strona logowania */
.side-ver { flex: none; padding: 8px 14px 10px; border-top: 1px solid rgb(255 255 255 / 6%); font-size: 11px; color: #6f83a0; letter-spacing: .02em; }
.auth-ver { position: fixed; left: 16px; bottom: 12px; font-size: 11px; color: var(--ink-3, #7a8799); }
.dash-grid .dash-w > .card-head { min-height: 58px; box-sizing: border-box; }
.team-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dict-table input[type=text] { width: 100%; min-width: 120px; }
.dict-table td { vertical-align: top; }

/* pasek kontaktu i sprzętu na górze zgłoszenia (zespół) */
.contact-strip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; margin-bottom: 14px; }
.contact-strip .cs-col { padding: 12px 16px; min-width: 0; }
.contact-strip .cs-col + .cs-col { border-left: 1px solid var(--line); }
.contact-strip h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin: 0 0 6px; }
.contact-strip .cs-who { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin-bottom: 4px; }
.contact-strip .cs-lines { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.contact-strip .cs-lines > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.contact-strip .cs-lines svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.contact-strip .cs-fields { margin-top: 6px; font-size: 13px; }
.contact-strip .cs-assets { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.contact-strip .cs-assets .small { color: var(--ink-2); overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .contact-strip { grid-template-columns: 1fr; }
  .contact-strip .cs-col + .cs-col { border-left: 0; border-top: 1px solid var(--line); }
}

/* bloki informacji i listy zadań (Markdown: :::info … :::, - [ ] ) */
.md-notice { margin: 10px 0; padding: 10px 14px 10px 40px; border-radius: 10px; position: relative; background: var(--info-soft); color: var(--ink); }
.md-notice::before { content: "i"; position: absolute; left: 12px; top: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--info); color: #fff; font: 700 12px/18px system-ui, sans-serif; text-align: center; }
.md-notice > :first-child { margin-top: 0; }
.md-notice > :last-child { margin-bottom: 0; }
.md-notice-warning { background: var(--warn-soft); }
.md-notice-warning::before { content: "!"; background: var(--warn); }
.md-notice-tip { background: var(--accent-soft); }
.md-notice-tip::before { content: "★"; background: var(--accent); font-size: 10px; }
.md-notice-success { background: var(--ok-soft); }
.md-notice-success::before { content: "✓"; background: var(--ok); }
.prose ul.task-list, .vd-prose ul[data-type="taskList"] { list-style: none; padding-left: 4px; }
.prose li.task input { margin: 0 6px 0 0; vertical-align: -1px; }
.prose .md-table table, .vd-prose table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.vd-prose th, .vd-prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; min-width: 60px; }
.vd-prose th { background: var(--surface-2); font-weight: 600; }
.vd-prose td p, .vd-prose th p { margin: 0; }

/* edytor artykułu w stylu Outline */
.kb-doc-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap;
  padding: 10px 0; margin-bottom: 8px; background: var(--bg); border-bottom: 1px solid var(--line); }
.kb-doc-crumb { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink-3); font-size: 14px; }
.kb-doc-crumb select { width: auto; max-width: 260px; border: 0; background: transparent; padding: 4px 24px 4px 4px; font-weight: 600; color: var(--ink-2); }
.kb-doc-state { margin-right: auto; display: flex; align-items: center; gap: 8px; }
.kb-doc-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.kb-doc-main.with-props { grid-template-columns: minmax(0, 1fr) 300px; }
.kb-doc-props { display: none; position: sticky; top: 72px; }
.kb-doc-main.with-props .kb-doc-props { display: block; }
.kb-doc-page { max-width: 820px; width: 100%; margin: 0 auto; padding: 24px 8px 120px; }
.kb-doc-title { min-height: 0; width: 100%; border: 0; background: transparent; resize: none; overflow: hidden; padding: 0; margin: 0 0 12px;
  font: 700 34px/1.2 var(--font-head, inherit); color: var(--ink); }
.kb-doc-title:focus { outline: none; box-shadow: none; }
.kb-doc-title::placeholder { color: var(--line-strong); }
.kb-doc-fallback { width: 100%; min-height: 420px; font-family: ui-monospace, Consolas, monospace; }
.vd-editor { position: relative; }
.vd-prose { min-height: 360px; outline: none; font-size: 16px; line-height: 1.7; }
.vd-prose:focus { outline: none; }
.vd-prose p.is-empty::before { content: attr(data-placeholder); color: var(--ink-3); opacity: .7; float: left; height: 0; pointer-events: none; }
.vd-prose li > p { margin: 2px 0; }
.vd-prose ul[data-type="taskList"] li { display: flex; gap: 8px; align-items: flex-start; }
.vd-prose ul[data-type="taskList"] li > label { margin-top: 4px; }
.vd-prose ul[data-type="taskList"] li > div { flex: 1; }
.vd-prose ul[data-type="taskList"] li[data-checked="true"] > div { text-decoration: line-through; color: var(--ink-3); }
.vd-prose img { cursor: default; }
.vd-prose img.ProseMirror-selectednode { outline: 2px solid var(--focus); }
.vd-prose .selectedCell { background: var(--accent-soft); }
.vd-prose a { color: var(--accent); }
.vd-pop { position: absolute; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(8, 39, 78, .16); padding: 4px; }
.vd-slash { width: 260px; max-height: 320px; overflow-y: auto; display: grid; }
.vd-slash button { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 0; background: none; text-align: left;
  padding: 7px 10px; border-radius: 7px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.vd-slash button.active, .vd-slash button:hover { background: var(--accent-soft); }
.vd-slash kbd { font: 12px ui-monospace, Consolas, monospace; color: var(--ink-3); }
.vd-bubble, .vd-tablebar { display: flex; gap: 2px; background: var(--navy); border-color: var(--navy); }
.vd-bubble button, .vd-tablebar button { border: 0; background: none; color: #fff; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 6px;
  font: inherit; font-size: 13px; cursor: pointer; }
.vd-bubble button:hover, .vd-tablebar button:hover, .vd-bubble button.on { background: rgba(255, 255, 255, .16); }
.vd-bubble b, .vd-bubble i, .vd-bubble s, .vd-bubble code { color: inherit; background: none; padding: 0; font-size: 14px; }
@media (max-width: 900px) {
  .kb-doc-main.with-props { grid-template-columns: 1fr; }
  .kb-doc-props { position: static; }
  .kb-doc-title { font-size: 26px; }
}
.vd-pop[hidden] { display: none; }
.vd-prose > :first-child { margin-top: 0; }

/* --- telefon: pulpit, listy zgłoszeń, zakładki ------------------------------------------------- */
@media (max-width: 820px) {
  /* nic nie poszerza strony ponad ekran */
  .main, .dash-grid, .dash-w, .card { min-width: 0; max-width: 100%; }
  .page-head { flex-wrap: wrap; gap: 10px; }
  .page-head .btn-row { flex-wrap: wrap; }
  /* zakładki i przełączniki — przewijane w poziomie zamiast łamania strony */
  .tabs-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs-bar::-webkit-scrollbar { display: none; }
  .tabs-bar a { white-space: nowrap; flex: none; }
  .seg { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg button { white-space: nowrap; flex: none; }
  /* pulpit: niższy nagłówek, kafelki liczb w dwóch kolumnach, poziomo */
  .hero-compact { padding: 16px; }
  .hero-compact h1 { font-size: 22px; margin-bottom: 4px; }
  .hero-compact p { font-size: 14px; margin-bottom: 10px; }
  .hero-tx { min-width: 0; flex: 1; }
  .hero h1 { overflow-wrap: anywhere; }
  .hero .btn-row { flex-wrap: wrap; gap: 8px; }
  .hero .btn-row .btn { width: auto; flex: 1 1 140px; padding-left: 8px; padding-right: 8px; }
  table.list.tickets tbody tr:hover td { background: none; }
  table.list.tickets tbody tr:active { background: var(--surface-2); }
  .stat-row:has(.stat2) { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat2 { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; }
  .stat2 .stat-ic { width: 34px; height: 34px; flex: none; }
  .stat2 .stat-ic svg { width: 18px; height: 18px; }
  .stat2 strong { font-size: 20px; line-height: 1.1; }
  .stat2 .stat-tx span { font-size: 12.5px; line-height: 1.25; }
  .stat-row .stat2:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .dash-tools { margin: 0 0 6px; }
  .dash-grid { gap: 12px; }
  .dash-body { max-height: none; }
  .card-head { flex-wrap: wrap; gap: 6px; }
  /* lista zgłoszeń jako karty: tytuł, a pod nim numer, status, priorytet, czas */
  table.list.tickets thead { display: none; }
  table.list.tickets, table.list.tickets tbody { display: block; }
  table.list.tickets tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  table.list.tickets tr:last-child { border-bottom: 0; }
  table.list.tickets td { display: block; padding: 0; border: 0; }
  table.list.tickets td.hide-sm { display: none; }
  table.list.tickets td.c-title { flex: 1 0 100%; order: -1; }
  table.list.tickets td.c-num { font-size: 12px; color: var(--ink-3); }
  table.list.tickets td.c-time { display: block; margin-left: auto; }
  table.list.tickets .t-title { font-size: 15px; }
  .table-wrap:has(> table.list.tickets) { overflow-x: visible; }
  /* zgłoszenie */
  .ticket-meta { flex-wrap: wrap; gap: 6px; }
  .ticket-meta [data-open-chat] { margin-left: 0 !important; }
  /* edytor artykułu */
  .kb-doc-bar { position: static; }
  .kb-doc-bar .btn-row { width: 100%; }
  .kb-doc-bar .btn-row .btn { flex: 1; padding-left: 8px; padding-right: 8px; }
  .kb-doc-page { padding: 12px 0 80px; }
}

/* sortowanie po kliknięciu w nagłówek i wybór kolumn */
table.list th.sortable { padding: 0; }
table.list .th-sort { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 4px; width: 100%; padding: 10px 12px; cursor: pointer;
  font: inherit; text-transform: inherit; letter-spacing: inherit; color: inherit; white-space: nowrap; }
table.list .th-sort:hover { color: var(--ink); }
table.list .th-sort:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
table.list th.sorted { color: var(--accent); }
table.list .th-arrow { font-size: 10px; min-width: 10px; }
.col-pick { list-style: none; margin: 8px 0 10px; padding: 0; border: 1px solid var(--line); border-radius: 10px; max-height: 360px; overflow-y: auto; }
.col-pick li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.col-pick li:last-child { border-bottom: 0; }
.col-pick .col-move { display: flex; gap: 2px; }
.col-pick .icon-btn { width: 28px; height: 28px; font-size: 13px; }
@media (max-width: 820px) { table.list.tickets td.c-x { display: none; } }

/* Administracja: karty obok siebie — równa wysokość */
.admin-pair { align-items: stretch !important; }
.admin-pair > .card { margin: 0; height: 100%; box-sizing: border-box; }
.admin-pair > div:not(.card) { display: flex; flex-direction: column; gap: 16px; }
.admin-pair > div:not(.card) > .card { margin: 0; }
.admin-pair > div:not(.card) > .card:last-child { flex: 1; }

/* zwijane sekcje menu (stan w przeglądarce); zwinięta sekcja pokazuje najważniejszy licznik przy nagłówku */
.nav-toggle { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 6px; width: 100%; cursor: pointer;
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8fa1ba; padding: 14px 10px 4px; font-weight: 700; border-radius: 6px; }
.nav-toggle:hover { color: #d7e0ec; }
.nav-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.nav-toggle > span:first-child { flex: 1; }
.nav-toggle .count { font-size: 11px; letter-spacing: 0; text-transform: none; background: rgb(255 255 255 / 12%); color: #d7e0ec; padding: 0 7px; border-radius: 99px; min-width: 20px; text-align: center; display: none; }
.nav-toggle .count.alert { background: #e5484d; color: #fff; }
.nav-sec.collapsed .nav-toggle .count { display: inline-block; }
.nav-chev { display: inline-flex; transition: transform .15s; }
.nav-chev svg { width: 14px; height: 14px; }
.nav-sec.collapsed .nav-chev { transform: rotate(-90deg); }
.nav-sec.collapsed .nav-items { display: none; }
.nav-sec.collapsed.has-active .nav-toggle { color: #fff; }
