:root {
  /* jasny motyw (domyślny): chłodne tło, granatowy pasek boczny, pomarańcz tylko dla akcji */
  --bg: #edf1f4;
  --bg-2: #ffffff;
  --bg-3: #e3e9ee;
  --line: #d3dce3;
  --text: #0b2233;
  --muted: #5b6e7b;
  --navy: #062e47;
  --navy-2: #0b3d5c;
  --teal: #1b87a3;
  --teal-soft: #e2f1f5;
  --orange: #f26d00;
  --orange-2: #b85200;
  --orange-soft: #fdeede;
  --ok: #1f8a4c;
  --bad: #c43b3b;
  --head: #062e47;
  --user-bg: #062e47;
  --user-text: #ffffff;
  --shadow: 0 1px 0 rgba(6, 46, 71, .06), 0 6px 18px rgba(6, 46, 71, .05);
  --font: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Barlow Semi Condensed", "Barlow", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", Consolas, "Courier New", monospace;
}
:root[data-theme="dark"] {
  /* ciemny motyw: głęboki granat zamiast czerni */
  --bg: #071a26;
  --bg-2: #0c2636;
  --bg-3: #123245;
  --line: #1d4258;
  --text: #e4edf2;
  --muted: #8ea6b4;
  --navy: #041019;
  --navy-2: #0c2636;
  --teal: #56c3dc;
  --teal-soft: #0f3646;
  --orange: #ff8a1f;
  --orange-2: #ffb061;
  --orange-soft: #3a2410;
  --ok: #5fc98a;
  --bad: #ef6b6b;
  --head: #e4edf2;
  --user-bg: #154a66;
  --user-text: #ffffff;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: grid;
  grid-template-columns: 260px 1fr;
  font-size: 15px;
  line-height: 1.5;
}

button {
  font-family: inherit;
  font-size: 14px;
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
button:hover { background: var(--orange-2); color: #fff; }
button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 400;
}
button.ghost:hover { border-color: var(--orange); color: var(--orange-2); }
button.ghost.danger:hover { border-color: var(--bad); color: var(--bad); }
.hidden { display: none !important; }

/* sidebar */
#sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 16px var(--orange); }
.brand-name { font-weight: 900; letter-spacing: .3px; }
.dot { box-shadow: 0 0 12px rgba(242,109,0,.45); }
.brand-sub { font-size: 12px; color: var(--muted); }
.brand-logo { height: 34px; width: auto; max-width: 120px; object-fit: contain; flex: none; }
#login .brand.with-logo { flex-direction: column; text-align: center; gap: 12px; }
#login .brand-logo { height: auto; width: min(280px, 100%); max-width: none; }
#login .brand.with-logo .brand-name { display: none; }
:root[data-theme="dark"] #login .brand-logo-full { background: #fff; padding: 12px 16px; border-radius: 12px; }
#login .brand.with-mark { flex-direction: column; text-align: center; gap: 14px; }
#login .brand.with-mark .brand-logo { width: auto; height: 84px; }
#login .brand.with-mark .brand-name { font-size: 28px; line-height: 1.2; }
#login .brand.with-mark .brand-sub { font-size: 13px; }
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-top: 8px; }
.servers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.servers li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.servers .ico { position: relative; width: 36px; height: 36px; border-radius: 9px; background: var(--bg-3); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); flex: none; }
.servers .ok .ico { color: var(--orange); border-color: var(--orange-soft); background: var(--orange-soft); }
.servers .bad .ico { opacity: .7; }
.servers .st { position: absolute; right: -3px; bottom: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); border: 2px solid var(--bg-2); }
.servers .ok .st { background: var(--ok); }
.servers .bad .st { background: var(--bad); }
.servers small { color: var(--muted); display: block; font-size: 11px; }
.profil { font-size: 14px; }
.profil b { color: var(--orange-2); }
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

/* main */
#main { display: flex; flex-direction: column; min-width: 0; }
.messages { flex: 1; overflow-y: auto; padding: 28px 8vw 16px; display: flex; flex-direction: column; gap: 18px; }
.welcome { margin: auto; max-width: 860px; text-align: center; }
.welcome h1 { font-weight: 900; font-size: 30px; margin: 0 0 8px; }
.welcome p { color: var(--muted); margin: 0 0 20px; }
.suggestions { display: flex; flex-direction: column; gap: 8px; }
.chip {
  background: var(--bg-3); color: var(--text); font-weight: 400; text-align: left;
  border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px;
}
.chip:hover { border-color: var(--orange); background: var(--bg-3); }

.msg { max-width: 820px; }
.msg.user { align-self: flex-end; background: var(--orange-soft); border-radius: 14px 14px 2px 14px; padding: 10px 14px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; }
.msg.assistant .body { }
.msg .body h1, .msg .body h2, .msg .body h3 { margin: 14px 0 6px; font-size: 16px; color: var(--orange-2); }
.msg .body p { margin: 6px 0; }
.msg .body ul, .msg .body ol { margin: 6px 0; padding-left: 22px; }
.msg .body code { font-family: var(--mono); background: var(--bg-3); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.msg .body pre { background: var(--bg-3); padding: 10px 12px; border-radius: 8px; overflow-x: auto; }
.msg .body pre code { background: none; padding: 0; }
.msg .body table { border-collapse: collapse; margin: 8px 0; font-size: 14px; }
.msg .body th, .msg .body td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; }
.msg .body th { color: var(--orange-2); background: var(--bg-3); }

.tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tool {
  font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
  font-family: var(--mono);
}
.tool.running { border-color: var(--orange); color: var(--orange-2); }
.tool.ok { border-color: var(--ok); color: var(--ok); }
.tool.bad { border-color: var(--bad); color: var(--bad); }
.cursor::after { content: "▍"; color: var(--orange); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.error { color: var(--bad); }

/* composer */
.composer {
  display: flex; gap: 10px; padding: 14px 8vw 20px; border-top: 1px solid var(--line); background: var(--bg);
}
.composer textarea {
  flex: 1; resize: none; font-family: inherit; font-size: 15px; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text); max-height: 180px; box-shadow: var(--shadow);
}
.composer textarea:focus { outline: none; border-color: var(--orange); }

/* settings */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; }
.modal-card {
  width: min(760px, 92vw); max-height: 88vh; overflow-y: auto; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; font-weight: 900; }
.note { color: var(--muted); font-size: 13px; }
.note.bad { color: var(--bad); }
.group { margin: 16px 0 6px; font-weight: 900; color: var(--orange-2); }
.field { display: grid; grid-template-columns: 240px 1fr; gap: 10px; align-items: center; margin: 6px 0; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: 14px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 100%;
}
.field textarea { font-family: var(--mono); font-size: 12px; min-height: 90px; }
.field .row { display: flex; gap: 8px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); }
.set { color: var(--ok); font-size: 12px; margin-left: 6px; }
.modal-foot { display: flex; justify-content: space-between; margin-top: 18px; }

/* raporty startowe */
.raporty { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; text-align: left; }
.raporty .grupa-t { grid-column: 1 / -1; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-top: 6px; }
.raport {
  background: var(--bg-2); color: var(--text); text-align: left; box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 12px 14px; border-radius: 12px; display: flex; flex-direction: column; gap: 4px;
}
.warianty { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wariant {
  font-size: 13px; font-weight: 700; padding: 6px 11px; border-radius: 999px; min-height: 32px;
  background: var(--orange-soft); color: var(--orange-2); border: 1px solid transparent;
}
.wariant:hover { background: var(--orange); color: #fff; }
.raport b { font-weight: 700; }
.raport small { color: var(--muted); font-size: 12px; }
.raporty.w-rozmowie { padding: 12px 0 4px; }

/* logowanie */
#login { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.login-card { width: min(380px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.login-card p { margin: 0; color: var(--muted); font-size: 14px; }
.user { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* pasek górny (tylko telefon) */
.topbar { display: none; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg-2); padding-top: calc(10px + env(safe-area-inset-top)); }
.topbar-title { flex: 1; font-weight: 900; }

@media (max-width: 820px) {
  body { grid-template-columns: 1fr; }
  .topbar { display: flex; }
  #sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 40; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.6); padding-top: calc(18px + env(safe-area-inset-top)); }
  #sidebar.open { transform: translateX(0); }
  .messages { padding: 18px 16px 12px; }
  .composer { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
  .welcome h1 { font-size: 24px; }
  .raporty { grid-template-columns: 1fr; }
  .msg { max-width: 100%; }
  .msg .body table { font-size: 13px; }
}

/* lista rozmów */
.chats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 32vh; overflow-y: auto; }
.chats li { display: flex; align-items: center; border-radius: 8px; }
.chats li.active { background: var(--orange-soft); }
.chats li.empty { color: var(--muted); font-size: 12px; padding: 4px 8px; }
.chats .chat-open { flex: 1; min-width: 0; text-align: left; background: transparent; color: var(--text); font-weight: 400; padding: 6px 8px; border: 0; display: flex; flex-direction: column; gap: 0; }
.chats .chat-open:hover { background: var(--bg-3); color: var(--text); }
.chats .chat-open small { color: var(--muted); font-size: 11px; }
.chats .chat-open, .chats .chat-open * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.chats .chat-del { background: transparent; color: var(--muted); padding: 4px 8px; border: 0; font-weight: 400; }
.chats .chat-del:hover { color: var(--bad); background: transparent; }

.podglad { background: var(--orange-soft); color: var(--text); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
#admin-chats { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 6px; }

/* akcje pod odpowiedzią */
.msg .actions { margin-top: 8px; }
.msg .actions .btn-pdf { font-size: 12px; padding: 5px 10px; }

/* raport PDF (druk) */
#print-area { display: none; }
@media print {
  body { display: block !important; background: #fff !important; color: #111 !important; }
  body.printing > *:not(#print-area) { display: none !important; }
  #print-area { display: block; font-family: "Lato", "Segoe UI", system-ui, sans-serif; font-size: 12pt; line-height: 1.5; color: #111; }
  .print-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #f26d00; padding-bottom: 6pt; margin-bottom: 14pt; }
  .print-brand { font-weight: 900; font-size: 16pt; color: #f26d00; }
  .print-meta { font-size: 10pt; color: #555; }
  .print-q { font-weight: 700; font-size: 13pt; margin-bottom: 10pt; }
  .print-body h1, .print-body h2, .print-body h3 { color: #c75800; font-size: 13pt; margin: 12pt 0 4pt; }
  .print-body table { border-collapse: collapse; width: 100%; font-size: 10.5pt; margin: 6pt 0; page-break-inside: avoid; }
  .print-body th, .print-body td { border: 1px solid #ccc; padding: 4pt 6pt; text-align: left; }
  .print-body th { background: #f3f0ea; }
  .print-body code { font-family: Consolas, monospace; font-size: 10pt; }
  .print-foot { margin-top: 18pt; border-top: 1px solid #ddd; padding-top: 6pt; font-size: 9pt; color: #666; }
  @page { margin: 18mm 16mm; }
}

/* wykresy */
.chart { margin: 10px 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 8px; box-shadow: var(--shadow); }
.chart svg { width: 100%; height: auto; display: block; font-family: var(--font); }
.chart-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.msg .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.msg .actions .btn-cmp { font-size: 12px; padding: 5px 10px; }
@media print { .chart { box-shadow: none; } .chart svg text { fill: #555 !important; } .chart svg line { stroke: #ddd !important; } }

/* przegląd 30 dni */
.overview { text-align: left; margin-bottom: 26px; }
.overview-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.overview-head h1 { margin: 0 0 10px; font-size: 22px; }
.overview-meta { font-size: 12px; color: var(--muted); }
.kafelki { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kafelek { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; text-align: left; box-shadow: var(--shadow); font-weight: 400; }
.kafelek:hover { border-color: var(--orange); background: var(--bg-2); color: var(--text); }
.k-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.k-value { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.k-delta { font-size: 12px; color: var(--muted); }
.k-delta.up { color: var(--ok); }
.k-delta.down { color: var(--bad); }
.k-delta small { color: var(--muted); font-size: 11px; }
.welcome { max-width: 980px; }


/* ===== wygląd panelu eMeblast ===== */
body { font-size: 15.5px; }
h1, h2, h3, .brand-name, .topbar-title, .chart-title, .raport b, .k-value, .modal-head h2, .group { font-family: var(--font-head); letter-spacing: .1px; }
button { border-radius: 4px; font-weight: 600; letter-spacing: .2px; }
button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
button.ghost { border-radius: 4px; }
button.ghost:hover { border-color: var(--teal); color: var(--teal); }

/* pasek boczny: granat w obu motywach, własne kolory dla elementów w środku */
#sidebar {
  --bg-2: var(--navy); --bg-3: rgba(255, 255, 255, .07); --text: #e9f1f6; --muted: #98b0bf; --line: rgba(255, 255, 255, .14);
  --orange-soft: rgba(242, 109, 0, .2); --orange-2: #ffb061; --teal: #7fd3e6;
  background: var(--navy); color: var(--text); border-right: 0; padding: 20px 16px;
}
#sidebar .brand { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
#sidebar .brand-name { font-size: 20px; font-weight: 700; color: #fff; }
#sidebar .brand-logo { height: 38px; }
.section-title, .raporty .grupa-t, .k-label { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; }
.servers .ico { border-radius: 4px; }
.servers .ok .ico { color: #ffb061; background: rgba(242, 109, 0, .16); border-color: transparent; }
.servers .st { border-color: var(--navy); }
.chats li, .chats .chat-open { border-radius: 4px; }
.chats li.active { background: rgba(255, 255, 255, .1); box-shadow: inset 3px 0 0 var(--orange); }
#sidebar button.ghost { color: var(--text); }
#sidebar button.ghost:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .3); color: #fff; }

/* ekran startowy: wyrównanie do lewej, nagłówek z pomarańczową belką */
.messages { padding: 30px 5vw 16px; }
.welcome { margin: 0 auto; width: 100%; max-width: 1080px; text-align: left; }
.welcome h1, .overview-head h1 { color: var(--head); font-weight: 700; }
.welcome > h1 { font-size: 28px; padding-left: 14px; border-left: 5px solid var(--orange); line-height: 1.15; margin-bottom: 10px; }
.welcome > p { max-width: 62ch; }
.raporty { gap: 12px; }
.raporty .grupa-t { color: var(--head); font-family: var(--font-head); font-size: 17px; font-weight: 600; margin-top: 14px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.raport { border-radius: 6px; border: 1px solid var(--line); border-top: 3px solid var(--navy-2); padding: 14px 16px; }
:root[data-theme="dark"] .raport { border-top-color: var(--teal); }
.raport b { font-size: 17px; font-weight: 600; color: var(--head); }
.raport small { font-size: 13px; }
.wariant { border-radius: 4px; background: transparent; color: var(--teal); border: 1px solid var(--teal); font-weight: 600; }
.wariant:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
:root[data-theme="dark"] .wariant:hover { color: #041019; }
.kafelek { border-radius: 6px; border-left: 4px solid var(--orange); }
.kafelek:hover { border-color: var(--line); border-left-color: var(--teal); }
.k-value { font-size: 26px; font-weight: 700; color: var(--head); }
.chip { border-radius: 4px; }
.chart { border-radius: 6px; }

/* rozmowa: pytanie w granatowym polu, odpowiedź jako biały arkusz */
.msg { max-width: 900px; }
.msg.user { background: var(--user-bg); color: var(--user-text); border-radius: 6px 6px 0 6px; padding: 11px 16px; }
.msg.assistant { background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 6px; padding: 14px 18px; box-shadow: var(--shadow); width: 100%; }
.msg .body h1, .msg .body h2, .msg .body h3 { color: var(--head); font-size: 18px; font-weight: 600; }
.msg .body table { border: 1px solid var(--line); }
.msg .body th { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }
:root[data-theme="dark"] .msg .body th { background: var(--bg-3); border-color: var(--line); color: var(--text); }
.msg .body tr:nth-child(even) td { background: color-mix(in srgb, var(--bg-3) 45%, transparent); }
.msg .body td { font-variant-numeric: tabular-nums; }
.tool { border-radius: 3px; font-family: var(--font); font-size: 12px; background: var(--teal-soft); border-color: transparent; color: var(--teal); }
.tool.running { background: var(--orange-soft); border-color: transparent; color: var(--orange-2); }
.tool.ok { background: var(--teal-soft); border-color: transparent; color: var(--teal); }
.cursor::after { content: ""; display: inline-block; width: 8px; height: 15px; margin-left: 3px; vertical-align: -2px; background: var(--teal); }
.msg .actions { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; }

/* pole pytania: jedna rama z przyciskiem w środku */
.composer { padding: 14px 5vw 22px; border-top: 0; background: transparent; }
.composer textarea { border-radius: 6px; border: 2px solid var(--line); padding: 12px 14px; box-shadow: none; }
.composer textarea:focus { border-color: var(--teal); }
#btn-send { background: var(--navy-2); padding: 0 22px; }
#btn-send:hover { background: var(--orange); }
:root[data-theme="dark"] #btn-send { background: var(--orange); color: #041019; }
:root[data-theme="dark"] #btn-send:hover { background: var(--orange-2); }

/* logowanie: granatowe tło, jasna karta */
#login { background: var(--navy); }
.login-card { border-radius: 8px; border: 0; border-top: 5px solid var(--orange); padding: 34px 28px 30px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.modal-card { border-radius: 8px; }
.group { color: var(--head); }
.profil b { color: var(--orange-2); }
.topbar { background: var(--navy); color: #fff; border-bottom: 0; }
.topbar .ghost { color: #fff; border-color: rgba(255, 255, 255, .25); }
.topbar-title { font-weight: 700; }
@media (max-width: 820px) {
  .messages { padding: 18px 14px 12px; }
  .composer { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
  .welcome > h1 { font-size: 23px; }
  .msg.assistant { padding: 12px 13px; }
}
@media print {
  #print-area { font-family: "Barlow", "Segoe UI", system-ui, sans-serif; }
  .print-head { border-bottom-color: #062e47; }
  .print-brand { color: #062e47; }
  .print-body h1, .print-body h2, .print-body h3 { color: #062e47; }
  .print-body th { background: #e3e9ee; }
}

/* wysokość ekranu: przewija się tylko treść i pasek boczny, a nie cała strona */
body { height: 100vh; height: 100dvh; overflow: hidden; grid-template-rows: minmax(0, 1fr); }
#main, #sidebar { min-height: 0; }
#sidebar { overflow-y: auto; }
.sidebar-bottom { padding-top: 12px; }

/* ekran startowy: wykresy obok siebie i najczęstsze pytania */
#overview-chart.dwa { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; }
#overview-chart .chart { margin: 0; height: 100%; }
.pytania-t { font-size: 17px; font-weight: 600; color: var(--head); margin: 6px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.pytania { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.pytanie { background: var(--bg-2); color: var(--head); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 4px; padding: 10px 14px; font-weight: 500; font-size: 15px; text-align: left; }
.pytanie:hover { background: var(--navy-2); border-color: var(--navy-2); border-left-color: var(--orange); color: #fff; }
:root[data-theme="dark"] .pytanie:hover { background: var(--bg-3); border-color: var(--teal); border-left-color: var(--orange); }
@media (max-width: 820px) {
  #overview-chart.dwa { grid-template-columns: 1fr; }
  .pytanie { flex: 1 1 100%; }
}

.kafelki { grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); }
.k-value { font-size: 23px; white-space: nowrap; }
#overview-chart.dwa { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.servers .ok small { color: #7fd9a4; }
.servers .bad small { color: #f3a3a3; }

/* wiadomości nie mogą się ściskać, gdy rozmowa jest dłuższa niż ekran */
.messages > * { flex-shrink: 0; }
.msg.user { line-height: 1.45; min-height: 44px; }

/* nowa rozmowa zawsze pod ręką */
#sidebar button.nowa { background: var(--orange); color: #fff; border: 0; font-weight: 600; padding: 11px 14px; margin: 2px 0 6px; }
#sidebar button.nowa:hover { background: #ff8a1f; color: #fff; }
#btn-new-c { white-space: nowrap; background: var(--bg-2); border: 2px solid var(--line); }
#btn-new-c:hover { border-color: var(--orange); color: var(--orange-2); }
@media (max-width: 820px) { #btn-new-c { display: none; } }
