/* Чаты: рабочие карточки (js/chat-cards.js), реакции, пересылка, папки, вкладки «Файлы / Ссылки / Закреплённое», фильтры поиска (js/chat-plus.js) */
.cc-card{border:1px solid var(--border);border-left:4px solid var(--accent);border-radius:12px;padding:8px 10px;margin:2px 0 4px;background:var(--card);min-width:min(260px,100%);}
.cc-card.t-ok,.cc-card.t-done{border-left-color:#16a34a;}
.cc-card.t-warn,.cc-card.t-wait{border-left-color:#d97706;}
.cc-card.t-bad{border-left-color:#dc2626;}
.cc-h{display:flex;align-items:flex-start;gap:6px;flex-wrap:wrap;}
.cc-title{flex:1 1 140px;min-width:0;}
.cc-ico{flex:none;}
.cc-state{flex:none;font-size:12px;font-weight:600;border-radius:999px;padding:2px 8px;background:rgba(21,87,255,.12);color:var(--accent);}
.cc-state.t-ok,.cc-state.t-done{background:rgba(22,163,74,.14);color:#15803d;}
.cc-state.t-warn,.cc-state.t-wait{background:rgba(217,119,6,.15);color:#b45309;}
.cc-state.t-bad{background:rgba(220,38,38,.13);color:#b91c1c;}
.cc-sub{font-size:13px;margin-top:2px;}
.cc-lines{list-style:none;margin:6px 0 0;padding:0;font-size:14px;display:grid;gap:2px;}
.cc-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;}
.cc-acts .btn{min-height:44px;}
.cc-upd,.cc-note{font-size:12px;margin-top:4px;}
[data-theme="dark"] .cc-state.t-ok,[data-theme="dark"] .cc-state.t-done{color:#4ade80;}
[data-theme="dark"] .cc-state.t-warn,[data-theme="dark"] .cc-state.t-wait{color:#fbbf24;}
[data-theme="dark"] .cc-state.t-bad{color:#f87171;}

/* «Переслано из …» */
.cp-fwd{font-size:12.5px;color:var(--muted);border-left:3px solid var(--border);padding-left:6px;margin:2px 0 4px;}
.cp-fwd b{color:var(--text);font-weight:600;}
/* reactions under a message */
.cp-reacts{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0 2px;}
.cp-react{display:inline-flex;align-items:center;gap:4px;min-height:32px;min-width:44px;padding:2px 8px;border-radius:999px;border:1px solid var(--border);background:var(--bg);color:var(--text);font-size:14px;cursor:pointer;}
.cp-react.on{border-color:var(--accent);background:rgba(21,87,255,.12);}
.cp-react .n{font-size:12.5px;font-weight:600;}
.cp-react-pick{display:flex;flex-wrap:wrap;gap:6px;padding:4px 2px;}
.cp-react-pick button{min-width:44px;min-height:44px;font-size:22px;border-radius:12px;border:1px solid var(--border);background:var(--card);cursor:pointer;}
.cp-react-pick button.on{border-color:var(--accent);background:rgba(21,87,255,.12);}
/* forward: choice of the chat */
.cp-fwd-list{display:grid;gap:6px;max-height:50vh;overflow:auto;}
.cp-fwd-item{display:flex;align-items:center;gap:8px;text-align:left;min-height:48px;padding:8px 10px;border:1px solid var(--border);border-radius:12px;background:var(--card);color:var(--text);cursor:pointer;}
.cp-fwd-item.on{border-color:var(--accent);background:rgba(21,87,255,.10);}
.cp-fwd-prev{border-left:3px solid var(--accent);padding:6px 8px;margin:8px 0;background:var(--bg);border-radius:8px;font-size:14px;overflow-wrap:anywhere;}
/* folders of the list */
.cp-folders{display:flex;gap:6px;overflow-x:auto;padding:2px 0 6px;scrollbar-width:none;}
.cp-folders::-webkit-scrollbar{display:none;}
.cp-folder{flex:none;min-height:36px;padding:4px 12px;border-radius:999px;border:1px solid var(--border);background:var(--card);color:var(--text);font-size:14px;cursor:pointer;white-space:nowrap;}
.cp-folder.on{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600;}
.cp-folder .n{display:inline-block;margin-left:6px;font-size:12px;font-weight:700;}
/* tabs of the chat information */
.cp-tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin:8px 0;overflow-x:auto;}
.cp-tab{flex:none;min-height:44px;padding:6px 12px;border:0;border-bottom:3px solid transparent;background:none;color:var(--muted);font-size:14.5px;cursor:pointer;}
.cp-tab.on{color:var(--accent);border-bottom-color:var(--accent);font-weight:600;}
.cp-media-list{display:grid;gap:6px;}
.cp-media-item{display:flex;gap:8px;align-items:flex-start;text-align:left;min-height:48px;padding:8px 10px;border:1px solid var(--border);border-radius:12px;background:var(--card);color:var(--text);cursor:pointer;overflow-wrap:anywhere;width:100%;}
.cp-media-item .muted{font-size:12.5px;}
.cp-media-item a{color:var(--accent);}
/* filters of the search in a chat */
.cp-sfilters{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0;align-items:center;}
.cp-sfilters select,.cp-sfilters input[type=date]{min-height:40px;max-width:100%;}
.ch-search .cp-sfilters select{width:auto;flex:1 1 150px;min-height:44px;}
.ch-search .cp-sfilters .cp-folder{min-height:44px;flex:0 0 auto;}
@media (max-width:480px){ .cp-sfilters select,.cp-sfilters input[type=date]{flex:1 1 140px;} }
/* the own message: «Отправлено» */
.ch-st-sent{font-size:12px;}
/* the folders wrap into rows inside the list (never a sideways scroll, never a hidden folder); ux-comm's 2 × 2 grid is not used for seven of them */
.ch-fs #chFilter.ch-filter,.ch-fs #chFilter.ch-filter.uxc-f2{display:flex;flex-wrap:wrap;max-width:100%;}
.ch-fs .ch-chip-f{white-space:nowrap;max-width:100%;}
/* a very narrow list (320 px at 200 % zoom): a long folder name wraps inside its chip instead of standing out of the list */
@media (max-width:260px){.ch-fs .ch-chip-f{white-space:normal;overflow-wrap:anywhere;}}
/* a phone lying on its side (little height): the folders take ONE row that scrolls sideways inside the list, so the first chats stay in view */
@media (pointer:coarse) and (max-height:500px){
  .ch-fs #chFilter.ch-filter,.ch-fs #chFilter.ch-filter.uxc-f2{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;flex:1 1 260px;width:auto;min-width:0;}
  .ch-fs #chFilter.ch-filter::-webkit-scrollbar{display:none;}
  .ch-fs #chFilter .ch-chip-f{flex:0 0 auto;}
}

/* Уведомления (P09): группы «Нужно действие / Информация / Системные», записи одного объекта вместе, повторы одной неисправности */
.nt-gh{margin:18px 2px 4px;font-size:17px;font-weight:700;display:flex;align-items:center;gap:8px;}
.nt-grp:first-child .nt-gh{margin-top:6px;}
.nt-gh-n{font-size:12px;font-weight:700;border-radius:999px;padding:1px 8px;background:var(--accent);color:#fff;}
.nt-grp-system .nt-gh{color:var(--muted);}
.nt-obj{border-bottom:1px solid var(--border);}
.nt-obj-h{padding:10px 16px 2px;font-size:13px;color:var(--muted);}
.nt-obj-h b{color:var(--text);}
.nt-obj-n{color:var(--accent);font-weight:600;}
.nt-obj .nt-item{padding-left:28px;}
.nt-obj .nt-item:last-child{border-bottom:0;}
.nt-rep{display:block;font-size:12.5px;font-weight:600;color:#b45309;margin-top:2px;}
[data-theme="dark"] .nt-rep{color:#fbbf24;}
