/* Стили разделов (ждут ответа, решения, люди, темы, сводки, неделя, команда). Только токены палитры из app.css;
   цвет — лишь у аватаров (M.face). Классы с префиксом x, чтобы не пересекаться с app.css. */

/* ---------- общее ---------- */
.xnote { margin: 0 0 14px; padding: 0 4px; font-size: 12.5px; line-height: 17px; color: var(--muted); }
.xnote.c { margin: 14px 0 0; text-align: center; }
.xlist { display: flex; flex-direction: column; gap: 10px; }
.xmuted { margin-top: 8px; font-size: 14px; line-height: 18px; color: var(--muted); }
.xsum { margin: 0 0 14px; text-align: center; font-size: 13px; line-height: 17px; color: var(--muted); }
.xchev { flex: none; display: grid; place-items: center; color: var(--muted-2); transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
.xchev svg { width: 16px; height: 16px; }
.xgo { display: inline-grid; place-items: center; flex: none; }
.xgo svg { width: 10px; height: 10px; }
.xface {
  position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; color: var(--white); font-size: 16px; font-weight: 500;
  box-shadow: inset 0 0 0 .5px var(--shadow-08);
}
.xface img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.92); }
.xface.me { background: var(--line); color: var(--muted); box-shadow: none; }
.xgroupcard { background: var(--card); border-radius: 17px; overflow: hidden; }

/* строки списка: люди, сотрудники, история сводок */
.xperson, .xhist {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px;
  padding: 10px 14px; text-align: left;
}
.xgroupcard .xperson + .xperson::before, .xhist + .xhist::before {
  content: ""; position: absolute; top: 0; left: 62px; right: 0; border-top: 1px solid var(--line);
}
.xhist + .xhist::before { left: 14px; }
.xp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.xp-t b { font-size: 15px; line-height: 19px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: lowercase; }
.xp-t small { font-size: 12.5px; line-height: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xover { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink); }
.xover::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.xst { flex: none; font-size: 12.5px; color: var(--muted); }
.xhist.on b { color: var(--ink); font-weight: 600; }

/* ---------- меню разделов (светлая шторка) ---------- */
.xmenu { margin: 12px 0 6px; background: var(--card); border-radius: 18px; overflow: hidden; }
.xmi { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 11px 14px; text-align: left; }
.xmi + .xmi::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; border-top: 1px solid var(--line); }
.xmi-i {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--white); color: var(--ink); box-shadow: 0 1px 2px var(--shadow-05);
}
.xmi-i svg { width: 20px; height: 20px; }
.xmi.cur .xmi-i { background: var(--ink); color: var(--white); box-shadow: none; }
.xmi-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.xmi-t b { font-size: 15px; line-height: 19px; font-weight: 500; color: var(--ink); }
.xmi-t small { font-size: 12.5px; line-height: 16px; color: var(--muted); }
.xmi-n { flex: none; font-size: 13px; color: var(--muted); }
.xmi-n.on {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--ink); color: var(--white);
  font-size: 12px; font-weight: 600; line-height: 22px; text-align: center;
}
/* связка ключей — выделенная строка: тёмная, первая в списке */
.xmi.hi { background: var(--ink); }
.xmi.hi .xmi-i { background: var(--white); color: var(--ink); box-shadow: none; }
.xmi.hi .xmi-t b { color: var(--white); font-weight: 600; }
.xmi.hi .xmi-t small { color: var(--muted-2); }
.xmi.hi .xmi-n, .xmi.hi .xchev { color: var(--muted-2); }
.xmi.hi + .xmi::before { display: none; }
.xmenu .xmi.hi:active { background: var(--ink); opacity: .86; }

/* ---------- связка ключей ---------- */
.xkscan { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: var(--card); font-size: 13px; color: var(--text-2); }
.xkey .chd b.unk { color: var(--muted); font-weight: 500; }

/* ---------- ждут ответа ---------- */
.xcard { padding: 14px 16px; background: var(--card); border-radius: 17px; transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
.xcard.gone { opacity: 0; transform: translateX(28px); }
.xc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.xc-top .xface { width: 34px; height: 34px; font-size: 15px; }
.xc-h { flex: 1; min-width: 0; }
.xc-name { font-size: 14px; line-height: 18px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: lowercase; }
.xc-meta { margin-top: 1px; font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: lowercase; }
.xc-time { flex: none; align-self: flex-start; margin-top: 1px; font-size: 12px; line-height: 16px; color: var(--muted); }
.xquote {
  margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: var(--card-2); box-shadow: inset 2px 0 0 var(--muted-2);
  font-size: 13.5px; line-height: 18px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.xc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.xpill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 16px;
  background: var(--white); color: var(--text); font-size: 13.5px; font-weight: 500; box-shadow: 0 1px 2px var(--shadow-05);
}
.xpill svg { width: 12px; height: 12px; }
.xpill.dark { background: var(--ink); color: var(--white); box-shadow: none; }
.xpill.dark svg { width: 11px; height: 11px; }

/* ---------- журнал решений ---------- */
.xsearch { display: flex; align-items: center; gap: 10px; height: 44px; margin-bottom: 18px; padding: 0 14px; border-radius: 14px; background: var(--card); cursor: text; }
.xsearch svg { flex: none; width: 17px; height: 17px; color: var(--muted); }
.xsearch input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.xsearch input::placeholder { color: var(--muted-2); }
.xsearch input::-webkit-search-cancel-button { -webkit-appearance: none; }
#xd-list { transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
#xd-list.busy { opacity: .45; }
.xgroup + .xgroup { margin-top: 22px; }
.xday { margin: 0 4px 8px; font-size: 13px; line-height: 17px; font-weight: 500; color: var(--muted); }
.xgroup .bcard + .bcard { margin-top: 10px; }
.xtopic {
  display: inline-block; max-width: 100%; margin-bottom: 7px; padding: 2px 8px; border-radius: 7px; background: var(--white);
  font-size: 11.5px; line-height: 16px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.xfoot .spill { gap: 5px; margin-top: 11px; min-width: 0; }
.xfoot .spill[disabled] { cursor: default; }
.xtime { flex: none; margin-top: 11px; font-size: 12px; color: var(--muted); }

/* ---------- слежение за темами ---------- */
.xadd { display: flex; gap: 8px; margin-bottom: 10px; }
.xinput {
  display: block; flex: 1; min-width: 0; width: 100%; height: 46px; padding: 0 15px; border: 0; outline: none;
  border-radius: 14px; background: var(--card); font-size: 16px; color: var(--ink);
}
.xinput::placeholder { color: var(--muted-2); }
.xinput[disabled] { opacity: .5; }
.xbtn { flex: none; height: 46px; padding: 0 18px; border-radius: 23px; background: var(--ink); color: var(--white); font-size: 15px; font-weight: 500; }
.xbtn[disabled] { opacity: .45; }
.xwatch .xw-h { display: flex; align-items: flex-start; gap: 10px; }
.xw-t { flex: 1; min-width: 0; font-size: 15px; line-height: 19px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.xdel { flex: none; width: 30px; height: 30px; margin: -6px -8px -4px 0; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.xdel svg { width: 14px; height: 14px; }
.xwatch .btext { margin-top: 8px; }
.xwatch .xmuted { margin-top: 6px; }
.xwatch .xc-meta { margin-top: 9px; white-space: normal; }
.xsrcs { margin-top: 10px; }
.xsrcs .src { background: var(--card-2); }
.xsrcs .src .sh { flex-wrap: wrap; row-gap: 0; }
.xsrcs .src .sh b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ---------- бриф по запросу ---------- */
.xlabel { margin: 18px 4px 8px; font-size: 13px; line-height: 17px; font-weight: 500; color: var(--muted); }
.xform > .xlabel:first-child { margin-top: 0; }
.xchips { display: flex; flex-wrap: wrap; gap: 8px; }
.xchips .chip { height: 32px; border-radius: 16px; padding: 0 12px 0 0; max-width: 100%; }
.xchips .chip .cav { position: relative; width: 32px; height: 32px; }
.xchips .chip .cav img { position: absolute; inset: 0; }
.xchips .chip.txt { padding: 0 14px; }
.xchips .chip .cn { font-size: 14px; }
.xchips .chip.on { background: var(--ink); }
.xchips .chip.on .cn { color: var(--white); }
.xchips .chip.more .cn { color: var(--muted); }
.xperiod { margin-top: 0; }
.xmake { text-align: center; }
.xmake .dark-btn { margin-top: 22px; }
.xres:not(:empty) { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.xr-head { margin: 0 4px 18px; text-align: center; }
.xr-head b { display: block; font-size: 16px; line-height: 21px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.xr-head span { display: block; margin-top: 3px; font-size: 12.5px; line-height: 17px; color: var(--muted); }
.xres .empty { padding-top: 6px; }
/* важность: «срочно» — чёрный заголовок и тонкая линия слева (тень, геометрия карточки не меняется); «не срочно» — приглушённо */
.xres .xcat-attention .sec-h { color: var(--ink); }
.xres .xcat-attention .bcard { position: relative; }
.xres .xcat-attention .bcard::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 2px 2px 0; background: var(--ink); }
.xres .xcat-minor .sec-h { color: var(--muted-2); }
.xres .xcat-minor .bcard { background: var(--card-2); }
.xres .xcat-minor .btext { color: var(--text-2); }
.xres .xcat-minor .spill { background: var(--card); }
.xlabel.xh { margin-top: 30px; }

/* ---------- итоги недели ---------- */
.xweek { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.xnav { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--text-2); }
.xnav svg { width: 18px; height: 18px; }
.xnav[disabled] { opacity: .35; }
.xweek-t { flex: 1; min-width: 0; text-align: center; }
.xweek-t b { display: block; font-size: 16px; line-height: 21px; font-weight: 600; color: var(--ink); }
.xweek-t small { display: block; margin-top: 1px; font-size: 12.5px; line-height: 17px; color: var(--muted); }
.xstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.xstat { padding: 14px 8px 12px; border-radius: 17px; background: var(--card); text-align: center; }
.xstat b { display: block; font-size: 26px; line-height: 30px; font-weight: 600; color: var(--ink); letter-spacing: -.5px; }
.xstat > span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 16px; color: var(--muted); }
.xstat.hot { background: var(--ink); }
.xstat.hot b { color: var(--white); }
.xstat.hot > span { color: var(--muted-2); }
.xwait {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 12px; padding: 0 14px 0 16px;
  border-radius: 17px; background: var(--card); text-align: left; font-size: 15px; color: var(--text);
}
.xwait span:first-child { flex: 1; }
.xwait b { font-weight: 600; color: var(--ink); }
.xblock { margin-top: 12px; padding: 2px 16px 4px; border-radius: 17px; background: var(--card); }
.xblock h4 { margin: 12px 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: -.2px; }
.xli { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 0; text-align: left; font-size: 14.5px; line-height: 19px; color: var(--text); }
.xli + .xli, .xli + .xmore { border-top: 1px solid var(--line); }
.xli-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.xli small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 16px; color: var(--muted); text-transform: lowercase; }
.xli small.over { color: var(--ink); font-weight: 600; }
.xli .xgo { margin-top: 4px; color: var(--muted); }
.xmk { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--white); }
.xmk svg { width: 10px; height: 10px; }
.xmk.o { background: none; box-shadow: inset 0 0 0 1.5px var(--ink); }
.xmore { display: block; width: 100%; padding: 10px 0 8px; text-align: left; font-size: 13.5px; color: var(--text-2); }

/* ---------- команда ---------- */
.xmember { background: var(--card); border-radius: 17px; }
.xmember + .xmember { margin-top: 10px; }
.xmember.open .xchev { transform: rotate(90deg); }
.xm-tasks { padding: 0 16px 8px 62px; }
.xm-task { padding: 9px 0; }
.xm-task + .xm-task, .xm-tasks .xm-task:first-child { border-top: 1px solid var(--line); }
.xm-task .tt { font-size: 14.5px; line-height: 18px; }
.xm-task .td { margin-top: 3px; }
.xm-tasks .xmuted { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }

.xgroupcard button:active, .xmember > button:active, .xmenu button:active { transform: none; background: var(--shadow-04); }

/* ---------- администрирование ---------- */
.xadm-budget { padding: 16px 16px 14px; border-radius: 17px; background: var(--card); }
.xab-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.xab-top b { display: block; font-size: 26px; line-height: 30px; font-weight: 600; color: var(--ink); letter-spacing: -.5px; }
.xab-top span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 16px; color: var(--muted); }
.xab-days { flex: none; display: flex; align-items: flex-end; gap: 3px; height: 30px; }
.xab-days i { display: block; width: 5px; border-radius: 2px; background: var(--muted-2); }
.xab-days i:last-child { background: var(--ink); }
.xbar { position: relative; height: 6px; margin-top: 14px; border-radius: 3px; background: var(--line); }
.xbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ink); transition: width var(--dur-slow) var(--ease); }
.xbar s { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--muted); }
.xab-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin-top: 9px; font-size: 12px; line-height: 16px; color: var(--muted); }
.xadm-budget.hot .xab-top b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.xhealth { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; padding: 12px 16px; border-radius: 17px; background: var(--card); }
.xhealth b { display: block; font-size: 14px; line-height: 18px; font-weight: 500; color: var(--ink); }
.xhealth small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 16px; color: var(--muted); }
.xh-dot { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--line); }
.xhealth.bad { background: var(--ink); }
.xhealth.bad b { color: var(--white); }
.xhealth.bad .xh-dot { background: var(--white); box-shadow: 0 0 0 3px var(--muted); animation: xpulse 1.6s var(--ease) infinite; }
@keyframes xpulse { 50% { box-shadow: 0 0 0 6px transparent; } }

.xadm-budget + .xhealth + .xlabel, .xhealth + .xlabel { margin-top: 22px; }
.xwide {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 10px 14px;
  border-radius: 17px; background: var(--card); text-align: left;
}
.xwide .xmi-i { background: var(--ink); color: var(--white); box-shadow: none; }
.xwide[disabled] { opacity: .5; }
.xinvs { margin-top: 8px; }
.xinv { position: relative; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 8px 8px 14px; }
.xinv + .xinv::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; border-top: 1px solid var(--line); }
.xinv-i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--ink); }
.xinv-i svg { width: 15px; height: 15px; }
.xinv:not(.active) .xinv-i { background: none; color: var(--muted-2); }
.xinv:not(.active) .xp-t b { color: var(--muted); }
.xib { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.xib svg { width: 17px; height: 17px; }
.xib:active { background: var(--shadow-04); }
.xlinkbox {
  margin: 14px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--card); font-size: 13.5px; line-height: 18px;
  color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; user-select: all; -webkit-user-select: all;
}

.xadm-p.off .xface { filter: grayscale(1); opacity: .55; }
.xadm-p.off .xp-t b { color: var(--muted); }
.xtag { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--ink); color: var(--white); font-size: 10.5px; font-style: normal; font-weight: 600; vertical-align: 1px; text-transform: none; }
.xadm-det { padding: 0 16px 12px 62px; }
.xkv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 18px; }
.xkv span { flex: none; color: var(--muted); }
.xkv b { min-width: 0; font-weight: 500; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.xerr { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--card-2); font-size: 12.5px; line-height: 16px; color: var(--ink); box-shadow: inset 2px 0 0 var(--ink); overflow-wrap: anywhere; }
.xadm-det .xc-acts { margin-top: 10px; }
.xadm-det .xmuted { margin-top: 10px; font-size: 12.5px; }
.xmore.xa-grant { margin-top: 6px; text-align: center; color: var(--muted); }
.lsheet .xinput { background: var(--card); }
.xwide .xp-t small { white-space: normal; }

/* папки и отчёты */
.xfold, .xrep { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--card); border-radius: 17px; }
.xfold .xp-t, .xrep .xp-t { flex: 1; min-width: 0; }
.xrep.silent { box-shadow: inset 0 0 0 1.5px var(--ink); }
.xrep.silent small { color: var(--ink); font-weight: 600; }
.xprev { display: block; margin-top: 4px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xbtn { flex: none; height: 32px; padding: 0 14px; border-radius: 16px; background: var(--ink); color: var(--white); font-size: 13px; font-weight: 600; }
.xbtn.on { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.xproj { margin: 14px 2px 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: lowercase; }
