/* czat pomocy */
.chatw { position: fixed; right: 20px; bottom: 20px; z-index: 60; font: 14px/1.5 var(--sans); }
.cw-launch { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center;
  cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.18); position: relative; margin-left: auto; transition: transform .15s; }
.cw-launch:hover { transform: scale(1.05); }
.cw-launch .ic-close, .chatw.open .cw-launch .ic-open { display: none; }
.chatw.open .cw-launch .ic-close { display: block; }
.cw-dot { position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg); }
.cw-panel { position: absolute; right: 0; bottom: 68px; width: 380px; height: min(600px, calc(100vh - 110px)); background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 50px rgba(0,0,0,.16); display: flex; flex-direction: column; overflow: hidden; }
.cw-head { padding: 18px 20px 14px; position: relative; border-bottom: 1px solid var(--line); }
.cw-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.cw-brand .logo { width: 22px; height: 22px; }
.cw-head h3 { margin: 8px 0 0; font-size: 19px; letter-spacing: -.02em; }
.cw-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--soft); font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); }
.cw-body { flex: 1; overflow-y: auto; padding: 16px 16px 12px; display: grid; gap: 12px; align-content: start; }
.cw-card { display: flex; justify-content: space-between; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: var(--bg);
  padding: 14px 16px; cursor: pointer; font: inherit; color: inherit; }
.cw-card:hover { border-color: var(--ink); }
.cw-card b { display: block; }
.cw-card span span { color: var(--muted); font-size: 13px; }
.cw-card i, .cw-art i { font-style: normal; color: var(--muted); font-size: 18px; }
.cw-search input { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; background: var(--soft); color: var(--ink); }
.cw-search input:focus { outline: 2px solid var(--ink); outline-offset: 1px; background: var(--bg); }
.cw-arts { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cw-art { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: var(--bg);
  padding: 12px 16px; text-align: left; font: inherit; font-size: 13.5px; color: inherit; cursor: pointer; }
.cw-art:last-child { border-bottom: 0; }
.cw-art:hover { background: var(--soft); }
.cw-empty { padding: 14px 16px; margin: 0; color: var(--muted); }
.cw-back { justify-self: start; border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.cw-at { margin: 0; font-size: 17px; }
.cw-ax { margin: 0; color: var(--ink); }
.cw-more { font-weight: 600; }
.cw-ask { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--soft); border-radius: 14px; padding: 12px 14px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.cw-btn { border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: inherit; font-weight: 600; padding: 8px 14px; cursor: pointer; }
.cw-chat { gap: 8px; }
.cw-m { display: grid; justify-items: start; max-width: 85%; }
.cw-m span { background: var(--soft); border-radius: 16px 16px 16px 4px; padding: 9px 13px; }
.cw-m em { font-style: normal; font-size: 11px; color: var(--faint); margin: 3px 4px 0; }
.cw-m.user { justify-self: end; justify-items: end; }
.cw-m.user span { background: var(--ink); color: var(--bg); border-radius: 16px 16px 4px 16px; }
.cw-form { border-top: 1px solid var(--line); padding: 10px 12px; display: grid; gap: 8px; }
.cw-form input { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--bg); color: var(--ink); }
.cw-row { display: flex; gap: 8px; align-items: flex-end; }
.cw-row textarea { flex: 1; resize: none; font: inherit; border: 1px solid var(--line); border-radius: 16px; padding: 9px 14px; background: var(--bg); color: var(--ink); max-height: 120px; }
.cw-row textarea:focus, .cw-form input:focus { outline: 2px solid var(--ink); outline-offset: 0; }
.cw-send { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; cursor: pointer; }
.cw-err { margin: 0; color: var(--bad); font-size: 12px; }
.cw-err:empty { display: none; }
.cw-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.cw-tabs button { border: 0; background: none; padding: 12px 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; position: relative; }
.cw-tabs button.on { color: var(--ink); box-shadow: inset 0 2px 0 var(--ink); }
.cw-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; margin-left: 6px; padding: 0 5px; }
#guidePanel.open ~ .chatw, body:has(#guidePanel.open) .chatw { display: none; }
@media (max-width: 560px) {
  .chatw { right: 14px; bottom: 14px; }
  .chatw.open { inset: 0; }
  .chatw.open .cw-panel { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; bottom: 0; }
  .chatw.open .cw-launch { display: none; }
}
/* panel odpowiedzi (/admin/wsparcie) */
.adm.wait { box-shadow: inset 0 0 0 1.5px var(--ink); }
.admh { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.admmsgs { display: grid; gap: 6px; margin-bottom: 12px; }
.am { display: grid; justify-items: start; }
.am span { background: var(--bg); border-radius: 12px; padding: 7px 12px; max-width: 80%; }
.am.team { justify-items: end; }
.am.team span { background: var(--ink); color: var(--bg); }
.am em { font-style: normal; font-size: 11px; color: var(--faint); }
.cw-panel[hidden] { display: none; }
