/* ДТМ, доработки 30.09.2026: задача и проект, чаты, уведомления, команда, реестры. Токены из dtm-design.css. */

/* Окно задачи: проект и переход */
.task-crumb-label{color:var(--muted);font-weight:600;text-transform:none}
.task-project-link{font-weight:650;color:var(--blue);max-width:48ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.task-project-name{font-weight:650;color:var(--text)}
.task-open-project-btn{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.task-open-project-btn svg{flex:0 0 auto}
.task-info-project{display:flex;flex-direction:column;gap:4px;padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid var(--line)}
.task-info-project>span{color:var(--muted);font-size:12px;font-weight:550}
.task-info-project .task-project-link{max-width:100%;white-space:normal;text-align:left}
.task-info-project small{color:var(--muted);font-size:12px}

/* Проект: кнопка чата */
.pb-chat-btn{display:inline-flex;align-items:center;gap:6px;position:relative}
.pb-chat-unread{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--blue);color:#fff;font-size:11px;font-weight:700;display:inline-grid;place-items:center;line-height:1}

/* Чат: панель «Информация» с участниками и файлами */
.bravo-chat .chat-main{position:relative}
.bravo-chat .chat-head-actions .icon-btn.active{background:var(--blue-soft);color:var(--blue);border-color:var(--blue)}
.bravo-chat .chat-info-panel{position:absolute;top:0;right:0;bottom:0;z-index:6;width:min(360px,100%);display:flex;flex-direction:column;background:var(--surface);border-left:1px solid var(--line);box-shadow:-8px 0 24px rgba(15,23,42,.08);animation:dtmInfoIn var(--motion-panel) var(--ease-out)}
@keyframes dtmInfoIn{from{transform:translateX(16px);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.bravo-chat .chat-info-panel{animation:none}}
.bravo-chat .chat-info-head{display:flex;align-items:flex-start;gap:10px;padding:14px 14px 10px;border-bottom:1px solid var(--line)}
.bravo-chat .chat-info-head>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.bravo-chat .chat-info-head b{font-size:15px;line-height:20px;color:var(--text);overflow-wrap:anywhere}
.bravo-chat .chat-info-head small{font-size:12px;color:var(--muted)}
.bravo-chat .chat-info-actions{display:flex;flex-wrap:wrap;gap:8px;padding:10px 14px 0}
.bravo-chat .chat-info-created{margin:8px 14px 0;font-size:12px;color:var(--muted)}
.bravo-chat .chat-info-tabs{display:flex;gap:4px;margin:12px 14px 0;padding:3px;border-radius:var(--r);background:var(--surface-2);border:1px solid var(--line)}
.bravo-chat .chat-info-tabs button{flex:1;min-height:32px;border:0;border-radius:6px;background:transparent;color:var(--muted);font:inherit;font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.bravo-chat .chat-info-tabs button span{min-width:20px;padding:0 6px;border-radius:10px;background:var(--surface-3);color:var(--text);font-size:11px;line-height:18px}
.bravo-chat .chat-info-tabs button.active{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}
.bravo-chat .chat-info-body{flex:1;min-height:0;overflow:auto;padding:10px 8px 14px}
.bravo-chat .chat-info-empty{margin:12px 6px;font-size:13px;color:var(--muted);line-height:1.45}
.bravo-chat .chat-member-list,.bravo-chat .chat-file-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.bravo-chat .chat-member-list li{display:flex;align-items:center;gap:10px;padding:7px 6px;border-radius:6px}
.bravo-chat .chat-member-list li:hover{background:var(--surface-2)}
.bravo-chat .chat-member-main{flex:1;min-width:0;display:flex;flex-direction:column}
.bravo-chat .chat-member-main b,.bravo-chat .chat-file-main b{font-size:13px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bravo-chat .chat-member-main small,.bravo-chat .chat-file-main small{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bravo-chat .chat-member-tag{font-style:normal;font-size:11px;font-weight:650;color:var(--blue);background:var(--blue-soft);border-radius:10px;padding:1px 8px}
.bravo-chat .chat-file-list li{display:flex;align-items:center;gap:4px;border-radius:6px}
.bravo-chat .chat-file-list li:hover{background:var(--surface-2)}
.bravo-chat .chat-file-open{flex:1;min-width:0;display:flex;align-items:center;gap:10px;padding:7px 6px;border:0;background:transparent;font:inherit;text-align:left;cursor:pointer;border-radius:6px}
.bravo-chat .chat-file-open .file-card-icon{flex:0 0 auto;width:34px;height:34px;border-radius:6px;display:grid;place-items:center;color:#fff;font-size:10px;font-weight:750}
.bravo-chat .chat-file-main{flex:1;min-width:0;display:flex;flex-direction:column}
.bravo-chat .msg.is-highlighted .bubble{box-shadow:0 0 0 3px var(--accent-ring)}
@media (max-width:900px){.bravo-chat .chat-info-panel{width:100%;border-left:0}}

/* Команда: архив «Уволен» */
.emp-state{display:inline-flex;align-items:center;gap:6px;font-weight:650}
.emp-state::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.emp-state--active{color:var(--green);background:var(--green-soft)}
.emp-state--fired{color:var(--red);background:var(--red-soft)}
.emp-row--archived td{color:var(--muted)}
.emp-row--archived td strong{color:var(--muted);text-decoration:line-through;text-decoration-thickness:1px}
.emp-actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:nowrap}
.emp-fire-btn{color:var(--red)}
.emp-fire-btn:hover{color:var(--red);border-color:var(--red);background:var(--red-soft)}
.cell-sub{display:block;margin-top:3px;font-size:11px;color:var(--muted);line-height:1.3}
.assignee-fired{margin-left:6px;font-size:11px;font-weight:650;color:var(--red)}

/* Реестры: сортировка по заголовку, активный фильтр, сброс */
table.t thead th[data-sort-field]{cursor:pointer;user-select:none;white-space:nowrap}
table.t thead th[data-sort-field]:hover{color:var(--text)}
table.t thead th[data-sort-field]::after{content:"";display:inline-block;width:0;height:0;margin-left:6px;vertical-align:middle;border:4px solid transparent;opacity:0}
table.t thead th[data-sort-field]:hover::after{opacity:.35;border-top-color:currentColor;border-bottom:0}
table.t thead th[aria-sort=ascending]::after{opacity:1;border-bottom:5px solid var(--blue);border-top:0}
table.t thead th[aria-sort=descending]::after{opacity:1;border-top:5px solid var(--blue);border-bottom:0}
table.t thead th.is-sorted{color:var(--blue)}
.registry-select.is-set{border-color:var(--blue);background-color:var(--blue-soft);color:var(--blue);font-weight:600}
.registry-reset{white-space:nowrap}
.registry-reset[hidden]{display:none!important}
#dtmDialogText{white-space:pre-line}

/* Уведомления: правая панель */
.notif-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:460px;max-width:100vw;height:100dvh;max-height:none;padding:0;border:0;border-left:1px solid var(--line);background:var(--surface);color:var(--text);box-shadow:var(--shadow-md)}
.notif-drawer::backdrop{background:rgba(15,23,42,.28)}
.notif-drawer[open]{animation:dtmNotifIn var(--motion-panel) var(--ease-out)}
@keyframes dtmNotifIn{from{transform:translateX(24px);opacity:.4}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.notif-drawer[open]{animation:none}}
.notif-shell{display:flex;flex-direction:column;height:100%;min-height:0}
.notif-head{display:flex;align-items:flex-start;gap:12px;padding:16px 16px 12px;border-bottom:1px solid var(--line)}
.notif-head>div:first-child{flex:1;min-width:0}
.notif-head h2{margin:0;font-size:17px;line-height:22px}
.notif-head p{margin:2px 0 0;font-size:12px;color:var(--muted)}
.notif-head-actions{display:flex;gap:8px;align-items:center;margin-left:auto}
.notif-toolbar{display:flex;flex-direction:column;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line);background:var(--surface-2)}
.notif-tabs{display:flex;gap:4px;padding:3px;border-radius:var(--r);background:var(--surface-3)}
.notif-tabs button{flex:1;min-height:32px;border:0;border-radius:6px;background:transparent;color:var(--muted);font:inherit;font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;gap:6px;align-items:center;justify-content:center}
.notif-tabs button span{min-width:20px;padding:0 6px;border-radius:10px;background:var(--surface);font-size:11px;line-height:18px;color:var(--text)}
.notif-tabs button.active{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}
.notif-tabs button.active span{background:var(--blue-soft);color:var(--blue)}
.notif-search{display:flex;align-items:center;gap:8px;height:36px;padding:0 10px;border:1px solid var(--line);border-radius:var(--control-r);background:var(--surface)}
.notif-search:focus-within{border-color:var(--blue);box-shadow:0 0 0 3px var(--accent-ring)}
.notif-search svg{width:16px;height:16px;color:var(--muted);flex:0 0 auto}
.notif-search input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:13px;color:var(--text);padding:0;height:100%}
.notif-chips{display:flex;flex-wrap:wrap;gap:6px}
.notif-chip{min-height:28px;padding:0 10px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text);font:inherit;font-size:12px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.notif-chip span{color:var(--muted);font-weight:600}
.notif-chip:hover{border-color:var(--line-strong)}
.notif-chip.active{background:var(--blue);border-color:var(--blue);color:#fff}
.notif-chip.active span{color:rgba(255,255,255,.85)}
.notif-list{flex:1;min-height:0;overflow:auto;padding:4px 8px 16px;overscroll-behavior:contain}
.notif-day{position:sticky;top:0;z-index:1;margin:0;padding:10px 8px 6px;background:var(--surface);font-size:11px;font-weight:700;letter-spacing:.02em;text-transform:uppercase;color:var(--muted)}
.notif-item{position:relative;display:flex;gap:10px;align-items:flex-start;padding:10px 8px;border-radius:var(--r);content-visibility:auto;contain-intrinsic-size:auto 72px}
.notif-item+.notif-item{border-top:1px solid var(--line)}
.notif-item:hover{background:var(--surface-2)}
.notif-item.is-unread{background:var(--blue-soft)}
.notif-item.is-unread:hover{background:#e3ebff}
.notif-item.is-unread::before{content:"";position:absolute;left:-2px;top:14px;width:6px;height:6px;border-radius:50%;background:var(--blue)}
.notif-icon{flex:0 0 auto;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--surface-3);color:var(--muted)}
.notif-icon svg{width:17px;height:17px}
.notif-item--task .notif-icon{background:var(--blue-soft);color:var(--blue)}
.notif-item--mention .notif-icon{background:var(--violet-soft);color:var(--violet)}
.notif-item--chat .notif-icon{background:var(--green-soft);color:var(--green)}
.notif-item--rental .notif-icon{background:var(--amber-soft);color:var(--amber)}
.notif-item--system .notif-icon{background:var(--surface-3);color:var(--muted)}
.notif-item.is-unread .notif-icon{box-shadow:0 0 0 2px var(--surface)}
.notif-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;color:inherit;text-decoration:none;cursor:pointer}
.notif-main:hover .notif-title{color:var(--blue)}
div.notif-main{cursor:default}
div.notif-main:hover .notif-title{color:inherit}
.notif-title{font-size:13px;line-height:18px;font-weight:650;color:var(--text);overflow-wrap:anywhere}
.notif-item:not(.is-unread) .notif-title{font-weight:550}
.notif-context{font-size:12px;line-height:16px;color:var(--text);opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.notif-message{font-size:12px;line-height:17px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.notif-meta{font-size:11px;color:var(--muted);display:flex;gap:8px;flex-wrap:wrap}
.notif-nolink{color:var(--amber)}
.notif-read-btn{flex:0 0 auto;width:30px;height:30px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted);cursor:pointer;display:grid;place-items:center;opacity:.55}
.notif-read-btn svg{width:16px;height:16px}
.notif-item:hover .notif-read-btn,.notif-read-btn:focus-visible{opacity:1}
.notif-read-btn:hover{border-color:var(--line);background:var(--surface);color:var(--green)}
.notif-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:48px 16px;text-align:center;color:var(--muted);font-size:13px}
.notif-empty svg{width:32px;height:32px;opacity:.5}
@media (max-width:600px){.notif-drawer{width:100vw;border-left:0}.notif-head{padding:14px 12px 10px}.notif-toolbar{padding:10px 12px}.notif-read-btn{opacity:1;width:36px;height:36px}}
.notif-search input{border:0!important;box-shadow:none!important;min-height:0!important;height:34px!important;padding:0!important;background:transparent!important}
@media (min-width:901px){
  .list-toolbar .list-search{flex:1 1 280px;max-width:520px;min-width:200px}
  .list-toolbar .registry-controls{order:10;flex:1 1 100%;flex-wrap:wrap}
  .list-toolbar .registry-controls .registry-select{flex:0 1 180px;min-width:140px;max-width:220px}
  .list-toolbar>#tasksListFilterSel{flex:0 1 200px}
  .list-toolbar .meta[data-list-count],.list-toolbar .list-count{margin-left:auto}
  .list-toolbar [data-list-count]+.toolbar-actions{margin-left:0}
}
#modalNotif.service-mode .notifications-toolbar,#modalNotif.service-mode #notifList{display:none}
#modalNotif.service-mode #notifAdminBar{margin-bottom:0}
@media (max-width:700px){.emp-row td:first-child{padding-right:170px!important}.emp-row td:first-child strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
.dtm-people-picker .people-list button.is-active{background:var(--blue-soft);color:var(--blue);outline:1px solid var(--blue);outline-offset:-1px}
.bravo-chat .chat-file-open .file-card-icon{background:var(--blue)}
.bravo-chat .chat-file-open .file-card-icon.chat-file-tone-pdf{background:#c62828}
.bravo-chat .chat-file-open .file-card-icon.chat-file-tone-cad{background:#2f3540}
.bravo-chat .chat-file-open .file-card-icon.chat-file-tone-xls{background:#1e7d45}
.bravo-chat .chat-file-open .file-card-icon.chat-file-tone-doc{background:#2b5fb4}
.bravo-chat .chat-file-open .file-card-icon.chat-file-tone-img{background:#7a4fd0}
.bravo-chat .chat-file-open .file-card-icon.chat-file-tone-other{background:#667085}
.bravo-chat .chat-file-open .file-card-icon i{font-style:normal}
@media (min-width:901px){
  .bravo-chat .chat-main.has-info{padding-right:360px}
  .bravo-chat .chat-main.has-info .chat-info-panel{width:360px}
}
table.t tbody tr[data-archived="1"] td{color:var(--muted)}table.t tbody tr[data-archived="1"] td .link{color:var(--muted)}
