/* Design Gang CRM v4 — a single calm green workspace layer.
   Scope: authenticated CRM only. The welcome/auth presentation is untouched. */

:root {
  --crm4-bg: #050806;
  --crm4-sidebar: #09100b;
  --crm4-surface: #0f1712;
  --crm4-surface-2: #131d17;
  --crm4-card: #162019;
  --crm4-card-hover: #1a2820;
  --crm4-line: rgba(222,244,228,.085);
  --crm4-line-strong: rgba(112,229,150,.22);
  --crm4-text: #eef5f0;
  --crm4-muted: rgba(219,231,223,.62);
  --crm4-faint: rgba(205,220,210,.4);
  --crm4-green: #68dd8d;
  --crm4-green-bright: #92efad;
  --crm4-green-soft: rgba(104,221,141,.1);
  --crm4-shadow: 0 18px 48px rgba(0,0,0,.26);
  --crm4-ease: cubic-bezier(.16,1,.3,1);
}

#app { background: var(--crm4-bg); color: var(--crm4-text); }
.main { background: var(--crm4-bg) !important; }
.sidebar {
  width: 252px !important;
  background: var(--crm4-sidebar) !important;
  border-right: 1px solid var(--crm4-line) !important;
}
.sidebar-scroll { padding-block: 5px; }
.snav-group { color: var(--crm4-faint) !important; letter-spacing: .12em !important; }
.snav-item {
  display: flex !important;
  align-items: center !important;
  min-height: 40px !important;
  margin: 2px 10px !important;
  padding-inline: 11px !important;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  color: var(--crm4-muted) !important;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease, transform 140ms ease !important;
}
.snav-item[style*="display:none"],
.snav-item[style*="display: none"] { display: none !important; }
.snav-item .snav-glyph { flex: 0 0 20px; width: 20px; text-align: center; line-height: 1; }
.snav-item > span:not(.snav-glyph):not(.snav-badge) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snav-item:hover { color: var(--crm4-text) !important; background: rgba(255,255,255,.025) !important; transform: translateX(1px); }
.snav-item.active {
  color: var(--crm4-text) !important;
  background: linear-gradient(90deg,rgba(104,221,141,.13),rgba(104,221,141,.055)) !important;
  border-color: rgba(104,221,141,.18) !important;
  box-shadow: none !important;
}
.snav-badge { background: rgba(255,255,255,.055) !important; color: var(--crm4-muted) !important; }
.sidebar-command, .sidebar-hub, .sidebar-user, .space-item {
  border-color: var(--crm4-line) !important;
  background: rgba(255,255,255,.018) !important;
  box-shadow: none !important;
}
.sidebar-hub { min-height: 48px; }
.sidebar-hub > span:nth-child(2) { display: grid; min-width: 0; align-content: center; gap: 2px; }
.sidebar-hub b,
.sidebar-hub small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
.space-item.active { background: var(--crm4-green-soft) !important; border-color: rgba(104,221,141,.18) !important; }

/* Shared page rhythm. */
.page { color: var(--crm4-text); }
.page.active:not([data-page="crm"]) { animation: crm4PageIn 180ms var(--crm4-ease) both; }
.page-header { gap: 18px !important; }
.page-title { color: var(--crm4-text) !important; letter-spacing: -.035em !important; }
.page-sub { max-width: 680px; color: var(--crm4-muted) !important; line-height: 1.5 !important; }
.page-actions > button,
.page-actions > .hbtn,
.page-actions > .видКнопка {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.15 !important;
  white-space: nowrap;
}
.hbtn, .hselect, .minput, .mselect, .search-inp {
  border-color: var(--crm4-line) !important;
  background-color: rgba(255,255,255,.018) !important;
  color: var(--crm4-text) !important;
  box-shadow: none !important;
}
.hbtn:hover { border-color: rgba(104,221,141,.2) !important; background-color: rgba(104,221,141,.065) !important; }
.hbtn.primary {
  color: #07110a !important;
  background: linear-gradient(180deg,#91edac,#61d985) !important;
  border-color: rgba(170,255,195,.4) !important;
  box-shadow: 0 8px 24px rgba(64,196,105,.14) !important;
}
.hbtn.primary:hover { background: linear-gradient(180deg,#a0f2b7,#70e08f) !important; transform: translateY(-1px); }
.ds-panel, .pv-panel, .stat-card, .portfolio-card, .team-card, .user-card, .settings-card {
  border-color: var(--crm4-line) !important;
  background: var(--crm4-surface) !important;
  box-shadow: none !important;
}

/* Board: three readable columns instead of four compressed columns. */
.page[data-page="crm"] { padding-inline: clamp(18px,2.1vw,30px) !important; }
.page[data-page="crm"] > .page-header {
  min-height: 68px !important;
  margin-bottom: 12px !important;
}
.page[data-page="crm"] .page-title { font-size: clamp(25px,2.2vw,31px) !important; }
.page[data-page="crm"] .page-actions {
  gap: 8px !important;
  padding: 5px !important;
  border: 1px solid var(--crm4-line) !important;
  background: rgba(255,255,255,.012) !important;
  border-radius: 14px !important;
}
.видКнопка { min-height: 34px !important; padding-inline: 12px !important; font-size: 11px !important; }
#btnNewTask { min-height: 38px !important; padding-inline: 16px !important; font-size: 11.5px !important; }
#btnAn, #btnSpaceSettings, #crmFocusMode, #crm3Density { width: 38px !important; min-width: 38px !important; height: 38px !important; }

.crm-filter-panel,
.crm-filter-panel.expanded {
  grid-template-columns: minmax(240px,1fr) minmax(0,1.75fr) !important;
  gap: 10px !important;
  margin-bottom: 11px !important;
  padding: 8px !important;
  border: 1px solid var(--crm4-line) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.014) !important;
}
.crm-filter-panel .search-inp { height: 38px !important; border-radius: 10px !important; font-size: 12px !important; }
.crm-filter-scroll { gap: 7px !important; }
.crm-filter-panel select, .crm-filter-panel .hselect, .crm-filter-panel .hbtn {
  min-height: 38px !important;
  max-width: 180px;
  font-size: 11px !important;
  border-radius: 10px !important;
}
.crm-filter-panel .crm-filter-advanced { transition: opacity 150ms ease, transform 180ms var(--crm4-ease), max-width 180ms var(--crm4-ease) !important; }
.crm-active-filters { margin-bottom: 11px !important; }
.crm-filter-chip { min-height: 28px !important; padding-inline: 10px !important; font-size: 10.5px !important; }

#темпПолоса > div { min-height: 42px !important; padding: 8px 12px !important; border-color: var(--crm4-line) !important; }
.board-cols { gap: 12px !important; padding: 1px 2px 9px !important; }
.board-col {
  flex: 0 0 clamp(288px,29.5vw,338px) !important;
  min-width: 288px !important;
  min-height: calc(100vh - 226px) !important;
  border-color: var(--crm4-line) !important;
  border-radius: 15px !important;
  background: var(--crm4-surface) !important;
  contain: layout paint;
}
.board-col .col-head {
  min-height: 49px !important;
  padding: 11px 13px !important;
  background: var(--crm4-surface-2) !important;
  border-bottom-color: var(--crm4-line) !important;
  font-size: 11px !important;
}
.col-body { padding: 9px !important; gap: 9px !important; scrollbar-gutter: auto !important; }
.task-card, .kcard {
  min-height: 78px !important;
  padding: 12px 13px 11px !important;
  border-color: var(--crm4-line) !important;
  border-radius: 12px !important;
  background: var(--crm4-card) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.018), 0 5px 15px rgba(0,0,0,.1) !important;
  will-change: auto !important;
}
.task-card:hover, .kcard:hover {
  border-color: var(--crm4-line-strong) !important;
  background: var(--crm4-card-hover) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.24) !important;
  transform: translate3d(0,-2px,0) !important;
}
.task-card .tc-top { margin-bottom: 7px !important; }
.task-card .tc-date-top { font-size: 10px !important; }
.task-card .tc-title { margin-bottom: 9px !important; font-size: 13.5px !important; line-height: 1.4 !important; }
.task-card .tc-footer { margin-top: 9px !important; padding-top: 9px !important; }
.task-card .tc-who { font-size: 11px !important; }
.task-card .tc-ava { width: 21px !important; height: 21px !important; }
.task-card .tc-zastoj { font-size: 9px !important; }
body.crm3-compact .board-col { flex-basis: clamp(270px,27vw,312px) !important; min-width:270px !important; }

/* Task details: clearer reading width, no focus-colour flash, stable scrolling. */
.modal-overlay .task-refactor-modal {
  width: min(1120px,calc(100vw - 44px)) !important;
  height: min(86dvh,860px) !important;
  max-height: min(86dvh,860px) !important;
  border: 1px solid rgba(104,221,141,.16) !important;
  border-radius: 21px !important;
  background: #0c110e !important;
  outline: none !important;
  box-shadow: 0 40px 120px rgba(0,0,0,.7) !important;
}
.task-refactor-modal:focus { outline: none !important; }
.task-refactor-modal .modal-head { min-height: 78px !important; padding: 18px 22px !important; background: #101612 !important; }
.task-refactor-modal .modal-head-title { font-size: 21px !important; }
.task-shell { grid-template-columns: minmax(0,1fr) 286px !important; gap: 0 !important; min-height: 0; }
.task-shell-main { padding: 0 22px 28px !important; scroll-behavior: smooth; overscroll-behavior: contain; }
.task-shell-side { width: auto !important; padding: 18px !important; background: rgba(255,255,255,.012) !important; }
.task-jumpbar { top: 0 !important; margin-inline: -4px !important; padding-block: 11px !important; background: rgba(12,17,14,.96) !important; backdrop-filter: blur(12px); }
.task-description, .task-module, .task-chat { border-color: var(--crm4-line) !important; background: var(--crm4-surface) !important; }
.task-chat-list { min-height: 160px; max-height: 320px; }
.task-chat-compose textarea { min-height: 72px; }

/* Keep dense reports readable without rainbow surfaces. */
.ds-kpi-grid, .pv-kpis { gap: 12px !important; }
.ds-kpi, .pv-kpi { border-color: var(--crm4-line) !important; background: var(--crm4-surface) !important; }
.ds-chart-bar { background: linear-gradient(180deg,var(--crm4-green-bright),#319759) !important; }
.portfolio-grid { gap: 13px !important; }
.portfolio-card { transition: border-color 150ms ease, transform 180ms var(--crm4-ease), background 150ms ease !important; }
.portfolio-card:hover { border-color: var(--crm4-line-strong) !important; transform: translateY(-2px); }

/* Mobile: one clear action row, full-width columns, usable bottom sheet. */
@media (max-width: 760px) {
  .page[data-page="crm"] { padding: 12px 10px 82px !important; }
  .page[data-page="crm"] > .page-header { gap: 9px !important; margin-bottom: 10px !important; }
  .page[data-page="crm"] .page-actions {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start !important;
    padding: 4px !important;
    scrollbar-width: none;
  }
  .page[data-page="crm"] .page-actions::-webkit-scrollbar { display:none; }
  #переключательВидов { flex: 0 0 auto; }
  #btnAn, #crmFocusMode { flex: 0 0 38px; }
  #btnNewTask { position: sticky; right: 0; flex: 0 0 auto; z-index: 2; }
  .crm-filter-panel, .crm-filter-panel.expanded { display: block !important; padding: 7px !important; }
  .crm-filter-panel .search-inp { height: 42px !important; font-size: 13px !important; }
  .crm-filter-scroll { margin-top: 7px !important; padding-bottom: 1px; }
  .crm-filter-panel select, .crm-filter-panel .hselect, .crm-filter-panel .hbtn { min-height: 38px !important; flex: 0 0 auto; }
  .board-cols { gap: 10px !important; scroll-snap-type: x mandatory !important; }
  .board-col {
    flex-basis: calc(100vw - 30px) !important;
    min-width: calc(100vw - 30px) !important;
    min-height: calc(100dvh - 260px) !important;
    scroll-snap-align: center !important;
  }
  .task-card { min-height: 82px !important; }
  #sheet .task-refactor-modal {
    width: 100% !important;
    height: min(94dvh,920px) !important;
    max-height: 94dvh !important;
    border-radius: 22px 22px 0 0 !important;
  }
  .task-refactor-modal .modal-head { min-height: 70px !important; padding: 14px 15px !important; }
  .task-shell { display: block !important; }
  .task-shell-main { padding: 0 14px 22px !important; }
  .task-shell-side { padding: 16px 14px 26px !important; border-top: 1px solid var(--crm4-line) !important; }
  .task-jumpbar { margin-inline: -2px !important; overflow-x: auto; scrollbar-width:none; }
  .task-jumpbar button { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .page.active, .task-card, .portfolio-card { animation: none !important; transition: none !important; }
}

/* CRM v5 — calm hierarchy.
   Remove nested containers from the everyday board. Content is the focal
   point; borders appear only where they explain an actual boundary. */
.sidebar { width: 236px !important; }
.ui-symbol,
.snav-glyph,
.space-icon.ui-symbol {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI Symbol", sans-serif !important;
  font-variant-emoji: text;
  font-style: normal;
  line-height: 1;
}
.snav-glyph { color: rgba(222,234,225,.54) !important; font-size: 17px !important; }
.snav-item.active .snav-glyph { color: var(--crm4-green-bright) !important; }
.crm-project-symbol { display:inline-grid; place-items:center; width:24px; height:24px; margin-right:2px; color:var(--crm4-green); font-size:18px; }
.crm-empty-icon.ui-symbol { font-size:42px; color:rgba(210,230,216,.32); }
.sidebar-command,
.sidebar-hub,
.sidebar-user,
.space-item { border-color: transparent !important; background: transparent !important; }
.sidebar-command:hover,
.sidebar-hub:hover,
.sidebar-user:hover,
.space-item:hover { background: rgba(255,255,255,.025) !important; }
.snav-item { min-height: 37px !important; margin-block: 1px !important; }
.snav-item.active {
  border-color: rgba(205,231,213,.065) !important;
  background: rgba(104,221,141,.09) !important;
}
.snav-group { margin-top: 12px !important; opacity: .72; }

.page[data-page="crm"] { padding-inline: clamp(20px,2.4vw,34px) !important; }
.page[data-page="crm"] > .page-header {
  min-height: 58px !important;
  margin-bottom: 8px !important;
}
.page[data-page="crm"] .page-title { font-size: clamp(23px,2vw,28px) !important; }
.crm-header-hint { display: none !important; }
.page[data-page="crm"] .page-actions {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.page[data-page="crm"] .page-actions > * { flex: 0 0 auto; min-width: 0; }
#переключательВидов { background: rgba(255,255,255,.022) !important; }
.видКнопка { min-height: 32px !important; }
#btnAn,
#btnSpaceSettings,
#crmFocusMode,
#crm3Density { width: 34px !important; min-width: 34px !important; height: 34px !important; }
#btnAn, #btnSpaceSettings { padding:0 !important; justify-content:center !important; overflow:hidden; font-size:17px !important; }
#btnNewTask { min-height: 35px !important; box-shadow: none !important; }

.crm-filter-panel,
.crm-filter-panel.expanded {
  grid-template-columns: minmax(250px,1fr) auto !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.crm-filter-panel .search-wrap {
  border-color: rgba(222,244,228,.06) !important;
  background: rgba(255,255,255,.018) !important;
}
.crm-filter-panel .search-inp { height: 36px !important; }
.crm-filter-scroll { justify-content: flex-end !important; }
.crm-filter-panel:not(.expanded) .crm-filter-scroll select { display: none !important; }
.crm-filter-panel:not(.expanded) .crm-filter-scroll { min-width: auto !important; }
.crm-filter-panel select,
.crm-filter-panel .hselect,
.crm-filter-panel .hbtn { min-height: 36px !important; }
.crm-filter-more { color: var(--crm4-muted) !important; background: rgba(255,255,255,.018) !important; }
.crm-active-filters { margin: 0 0 8px !important; }

#темпПолоса { margin-bottom: 7px !important; opacity: .68; }
#темпПолоса:hover { opacity: 1; }
#темпПолоса > div {
  min-height: 34px !important;
  padding: 5px 8px !important;
  border-color: transparent !important;
  background: transparent !important;
}
#темпПолоса.pv-tempo-collapsed > div > div:first-child {
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-width:0;
}
#темпПолоса .tempo-title { flex:0 0 auto; white-space:nowrap; }
#темпПолоса.pv-tempo-collapsed > div > div:first-child > div:nth-child(2) {
  flex:0 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#темпПолоса .pv-tempo-summary {
  min-width:0;
  max-width:min(40vw,420px);
  overflow:hidden;
  text-overflow:ellipsis;
}

.board-cols { gap: 14px !important; padding: 2px 0 9px !important; }
.board-col {
  flex-basis: clamp(282px,29vw,334px) !important;
  min-width: 282px !important;
  border-color: transparent !important;
  border-radius: 13px !important;
  background: #101813 !important;
}
.board-col .col-head {
  min-height: 44px !important;
  padding: 8px 10px !important;
  border-bottom-color: transparent !important;
  background: transparent !important;
}
.col-body { padding: 5px !important; gap: 8px !important; }
.task-card,
.kcard {
  min-height: 72px !important;
  padding: 11px 12px 10px !important;
  border-color: rgba(205,231,213,.095) !important;
  background: #1a261f !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.018) !important;
}
.task-card:hover,
.kcard:hover {
  border-color: rgba(104,221,141,.16) !important;
  background: #22342a !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.2) !important;
  transform: translate3d(0,-1px,0) !important;
}
.task-card .tc-footer { border-top-color: transparent !important; }
.task-card .tc-title { color:#f2f7f3 !important; }
.task-card .tc-date-top,
.task-card .tc-who,
.task-card .tc-metka { color:rgba(224,234,227,.58) !important; }

/* CRM v6 — uniform kanban cards.
   Every task keeps the same silhouette. Variable metadata is clipped into a
   dedicated rail, while the title and assignee always occupy predictable rows. */
html body .board-col .task-card {
  --priority-edge: rgba(91,190,123,.46);
  box-sizing: border-box !important;
  position: relative !important;
  display: flex !important;
  flex: 0 0 176px !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 176px !important;
  min-height: 176px !important;
  max-height: 176px !important;
  overflow: hidden !important;
  padding: 12px 13px 11px !important;
  border: 1px solid rgba(183,219,194,.16) !important;
  border-left-color: rgba(183,219,194,.16) !important;
  border-radius: 13px !important;
  background: linear-gradient(180deg,#1b2820 0%,#151e19 100%) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.025) !important;
}
html body .board-col .task-card::before {
  top: 20px !important;
  left: 12px !important;
  width: 6px !important;
  height: 6px !important;
  box-shadow: 0 0 0 4px rgba(88,214,128,.07), 0 0 12px rgba(88,214,128,.2);
}
html body .board-col .task-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--priority-edge);
  opacity: .9;
  pointer-events: none;
  transform: translateZ(0);
  transition: background-color .22s ease, opacity .22s ease;
}
.board-col .task-card .tc-status-edge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 0;
  bottom: 10px;
  width: 2px;
  border-radius: 4px 0 0 4px;
  background: var(--status-edge, transparent);
  opacity: .74;
  pointer-events: none;
  transform: translateZ(0);
}
.task-drag-layer {
  position: fixed !important;
  z-index: 9998 !important;
  inset: 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none !important;
  animation: none !important;
  transform: none !important;
  /* Обычные колонки используют contain:layout paint для производительности.
     Полётный слой рисует карточку за своими границами, поэтому containment
     здесь обрезал её до размеров самого слоя и делал визуально невидимой. */
  contain: none !important;
}
html body .board-col .task-card:hover {
  border-color: rgba(112,229,150,.34) !important;
  border-left-color: rgba(112,229,150,.34) !important;
  background: linear-gradient(180deg,#213228 0%,#18241d 100%) !important;
  box-shadow: 0 14px 32px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.035) !important;
}
.board-col .task-card .tc-top {
  display: flex !important;
  flex: 0 0 20px;
  align-items: center !important;
  min-height: 20px !important;
  height: 20px !important;
  margin: 0 0 4px !important;
  padding-left: 16px !important;
}
.board-col .task-card .tc-date-top {
  position: static !important;
  inset: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  width: auto !important;
  max-width: none !important;
  min-height: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  font-size: 10px !important;
  line-height: 20px !important;
  white-space: nowrap !important;
}
.board-col .task-card .tc-zastoj {
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 18px !important;
  height: 18px !important;
  margin: 0 0 0 6px !important;
  padding: 0 6px !important;
  font-size: 9px !important;
  line-height: 16px !important;
}
.board-col .task-card .tc-title {
  display: -webkit-box !important;
  flex: 0 0 38px;
  min-height: 38px;
  max-height: 38px;
  margin: 0 0 7px !important;
  overflow: hidden;
  font-size: 13.5px !important;
  font-weight: 680 !important;
  line-height: 1.4 !important;
  text-wrap: pretty;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.board-col .task-card .tc-card-details {
  display: flex;
  flex: 1 1 45px;
  align-content: flex-start;
  align-items: flex-start;
  min-height: 45px;
  max-height: 45px;
  overflow: hidden;
  gap: 5px;
  flex-wrap: wrap;
}
.board-col .task-card .tc-card-details > * { flex: 0 0 auto; max-width: 100%; margin: 0 !important; }
.board-col .task-card .tc-metki {
  display: flex !important;
  max-width: 100%;
  max-height: 21px;
  margin: 0 !important;
  overflow: hidden;
  flex-wrap: nowrap !important;
}
.board-col .task-card .tc-custom-fields,
.board-col .task-card .tc-media { display: none !important; }
.board-col .task-card .tc-timers { max-height: 21px; margin: 0 !important; overflow: hidden; flex-wrap: nowrap !important; }
.board-col .task-card .tc-deadline-row { min-height: 17px; line-height: 17px; }
.board-col .task-card .tc-proekt {
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-col .task-card .tc-footer {
  display: flex !important;
  flex: 0 0 27px;
  align-items: center !important;
  min-height: 27px;
  margin: 7px 0 0 !important;
  padding: 7px 0 0 !important;
  border-top: 1px solid rgba(210,235,218,.07) !important;
}
.board-col .task-card .tc-who {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.board-col .task-card .tc-who > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
body.crm3-compact .board-col .task-card {
  flex-basis: 164px !important;
  height: 164px !important;
  min-height: 164px !important;
  max-height: 164px !important;
}
body.crm3-compact .board-col .task-card .tc-title {
  display: block !important;
  flex-basis: 20px;
  min-height: 20px;
  max-height: 20px;
  overflow: hidden !important;
  font-size: 13.5px !important;
  line-height: 20px !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  -webkit-box-orient: initial !important;
  -webkit-line-clamp: unset !important;
}
body.crm3-compact .board-col .task-card .tc-card-details { min-height:45px; max-height:45px; }

/* Priority and deadline hierarchy. One compact marker, no rainbow cards. */
html body .board-col .task-card[data-priority] {
  border-left-width: 1px !important;
  border-left-style: solid !important;
}
html body .board-col .task-card[data-priority="HIGH"] {
  --priority-edge: #e0525d;
  box-shadow: 0 8px 24px rgba(0,0,0,.24), inset 4px 0 16px rgba(205,55,68,.09) !important;
}
html body .board-col .task-card[data-priority="MEDIUM"] { --priority-edge: #b9924f; }
html body .board-col .task-card[data-priority="LOW"] { --priority-edge: rgba(91,190,123,.62); }
.board-col .task-card .tc-priority,
.board-col .task-card .tc-overdue-label {
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:2px 7px;
  border:1px solid transparent;
  border-radius:6px;
  font-size:8.5px;
  font-weight:760;
  line-height:1;
  letter-spacing:.035em;
  text-transform:uppercase;
  white-space:nowrap;
}
.board-col .task-card .tc-priority-high { color:#f18a92; border-color:rgba(224,82,93,.25); background:rgba(175,43,55,.14); }
.board-col .task-card .tc-priority-medium { color:#ceb077; border-color:rgba(185,146,79,.2); background:rgba(136,98,43,.12); }
.board-col .task-card .tc-priority-low { color:rgba(158,207,173,.68); border-color:rgba(91,190,123,.13); background:rgba(91,190,123,.06); }
.board-col .task-card .tc-overdue-label {
  color:#ff9aa1;
  border-color:rgba(240,84,96,.32);
  background:rgba(128,25,34,.28);
  box-shadow:0 0 16px rgba(172,35,46,.1);
}
html body .board-col .task-card.task-overdue {
  --priority-edge: #ee5d68;
  border-color:rgba(220,69,80,.44) !important;
  background:
    linear-gradient(135deg,rgba(112,18,27,var(--overdue-alpha)),rgba(42,12,17,var(--overdue-alpha))),
    #151817 !important;
  box-shadow:0 9px 26px rgba(0,0,0,.28), inset 5px 0 24px rgba(151,26,37,var(--overdue-alpha)) !important;
  transition:background-color 1.2s ease,border-color .7s ease,box-shadow .7s ease,transform .18s var(--crm4-ease) !important;
}
html body .board-col .task-card.task-overdue:hover {
  border-color:rgba(243,92,102,.58) !important;
  background:
    linear-gradient(135deg,rgba(130,24,34,var(--overdue-alpha)),rgba(49,14,20,var(--overdue-alpha))),
    #191a18 !important;
}
html body .board-col .task-card.task-overdue::before {
  background:#ee5d68 !important;
  box-shadow:0 0 0 4px rgba(224,63,75,.1),0 0 14px rgba(224,63,75,.42) !important;
}
.board-col .task-card.drag-clone::after,
.board-col .task-card.drag-clone .tc-status-edge,
.board-col .task-card.drop-landed::after,
.board-col .task-card.drop-landed .tc-status-edge {
  transition: none !important;
}
.space-name,
.sidebar-user-name,
.page-title {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media (max-width: 1120px) {
  #темпПолоса.pv-tempo-collapsed > div > div:first-child > div:nth-child(2) { display:none; }
  #темпПолоса .pv-tempo-summary { max-width:46vw; }
}

@media (max-width: 760px) {
  .page[data-page="crm"] { padding: 10px 10px 80px !important; }
  .page[data-page="crm"] .page-actions { gap: 4px !important; }
  .page[data-page="crm"] .page-actions .видКнопка { padding-inline: 8px !important; }
  .page[data-page="crm"] .page-actions #btnNewTask { padding-inline: 12px !important; }
  .page[data-page="crm"] .page-actions #btnAn,
  .page[data-page="crm"] .page-actions #btnSpaceSettings,
  .page[data-page="crm"] .page-actions #crmFocusMode,
  .page[data-page="crm"] .page-actions #crm3Density { display: none !important; }
  .crm-filter-panel,
  .crm-filter-panel.expanded { display: grid !important; grid-template-columns: minmax(0,1fr) !important; padding: 0 !important; }
  .crm-filter-panel:not(.expanded) .crm-filter-scroll { width: 100% !important; min-width: 0 !important; margin-top: 0 !important; justify-content: flex-end !important; }
  .crm-filter-panel:not(.expanded) .crm-filter-more { flex: 0 1 auto !important; width: auto !important; max-width: 120px !important; }
  .crm-filter-panel.expanded .crm-filter-scroll { margin-top: 0 !important; padding-top: 2px; }
  .board-col {
    flex-basis: calc(100vw - 24px) !important;
    min-width: calc(100vw - 24px) !important;
    min-height: calc(100dvh - 220px) !important;
  }
}

@keyframes crm4PageIn {
  from { opacity: 0; transform: translate3d(0,5px,0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}

/* CRM v7 — clearer hierarchy with less chrome.
   This is the final application layer; welcome/auth remains untouched. */
:root {
  --crm4-bg:#070b08;
  --crm4-sidebar:#0a110c;
  --crm4-surface:#111914;
  --crm4-surface-2:#151f19;
  --crm4-card:#18251d;
  --crm4-card-hover:#1d2d23;
  --crm4-line:rgba(218,240,224,.105);
  --crm4-line-strong:rgba(116,231,152,.3);
  --crm4-muted:rgba(224,235,227,.7);
  --crm4-faint:rgba(210,226,215,.5);
}

/* Navigation groups stay obviously interactive and never become dead labels. */
.snav-group.pv-group-toggle {
  position:relative;
  display:flex;
  min-height:30px;
  align-items:center;
  margin:10px 10px 3px !important;
  padding:0 22px 0 8px !important;
  border-radius:8px;
  cursor:pointer;
  user-select:none;
  transition:color 140ms ease,background 140ms ease;
}
.snav-group.pv-group-toggle::after {
  content:'›';
  position:absolute;
  right:8px;
  top:50%;
  color:rgba(220,235,225,.38);
  font-size:15px;
  transform:translateY(-50%);
  transition:transform 180ms var(--crm4-ease),color 140ms ease;
}
.snav-group.pv-group-toggle:hover,
.snav-group.pv-group-toggle:focus-visible { color:rgba(237,246,240,.72) !important; background:rgba(255,255,255,.025); outline:none; }
.snav-group.pv-group-toggle[aria-expanded="true"]::after { color:var(--crm4-green); transform:translateY(-50%) rotate(90deg); }
.snav-item.pv-group-hidden { display:none !important; }

/* Board: more information per screen, while every card keeps one silhouette. */
.board-col {
  background:linear-gradient(180deg,#111914 0%,#0d140f 100%) !important;
  border:1px solid rgba(218,240,224,.055) !important;
}
.board-col .col-head { color:rgba(241,247,243,.88) !important; }
.board-col .col-cnt { color:rgba(225,237,229,.55) !important; }
html body .board-col .task-card {
  flex-basis:164px !important;
  height:164px !important;
  min-height:164px !important;
  max-height:164px !important;
  background:linear-gradient(180deg,#19261e 0%,#151f19 100%) !important;
  border-color:rgba(202,230,210,.135) !important;
  box-shadow:0 4px 14px rgba(0,0,0,.16),inset 0 1px rgba(255,255,255,.022) !important;
}
html body .board-col .task-card:not(.drag-clone):not(.dragging) {
  content-visibility:auto;
  contain-intrinsic-size:164px;
}
html body .board-col .task-card:hover {
  background:linear-gradient(180deg,#1f3025 0%,#18251d 100%) !important;
  box-shadow:0 10px 26px rgba(0,0,0,.25),inset 0 1px rgba(255,255,255,.03) !important;
}
.board-col .task-card .tc-card-details { min-height:33px; max-height:33px; }
.board-col .task-card .tc-footer { margin-top:5px !important; }
body.crm3-compact .board-col .task-card {
  flex-basis:148px !important;
  height:148px !important;
  min-height:148px !important;
  max-height:148px !important;
  contain-intrinsic-size:148px;
}
.crm-filter-panel .search-wrap { border-radius:11px; }
.crm-filter-panel .search-inp::placeholder { color:rgba(216,229,220,.42); }
#темпПолоса { opacity:.82; }
#темпПолоса:hover { opacity:1; }

/* One task surface instead of a panel nested in another panel. */
.modal-overlay .task-refactor-modal {
  background:#0d130f !important;
  border-color:rgba(154,233,179,.18) !important;
}
.task-refactor-modal .modal-head { background:#111914 !important; }
.task-refactor-modal .modal-head-title { color:#f3f8f5 !important; }
.task-head-meta { color:rgba(219,231,223,.58) !important; }
.task-shell { grid-template-columns:minmax(0,1fr) 300px !important; }
.task-shell-side {
  overflow-y:auto !important;
  background:#0f1712 !important;
  border-left-color:rgba(218,240,224,.09) !important;
}
.task-jumpbar { border-bottom:1px solid rgba(218,240,224,.065); }
.task-jumpbar button { color:rgba(220,233,224,.58) !important; }
.task-jumpbar button.active { color:#eaf6ed !important; background:rgba(104,221,141,.1) !important; }
.task-description {
  min-height:48px;
  padding:15px 16px !important;
  color:rgba(230,239,233,.78) !important;
  background:#111a14 !important;
  border-color:rgba(218,240,224,.09) !important;
}
.task-actions { display:flex !important; gap:8px !important; flex-wrap:wrap !important; }
.task-actions .hbtn {
  flex:0 0 auto !important;
  width:auto !important;
  max-width:100% !important;
  min-height:34px !important;
  overflow:visible !important;
  padding-inline:12px !important;
  text-overflow:clip !important;
  white-space:nowrap !important;
}
.task-module:not(#блокКомментариев) {
  margin-top:10px !important;
  padding:14px !important;
  border:1px solid rgba(218,240,224,.085) !important;
  border-radius:13px !important;
  background:#101813 !important;
}
.task-module:not(#блокКомментариев) > div {
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
}
#блокКомментариев { margin-top:10px !important; }
.task-chat { margin:0 !important; border-radius:14px !important; background:#101813 !important; }
.task-chat-list { scrollbar-gutter:auto !important; }
.task-side-field > span { color:rgba(208,224,213,.58) !important; }
.task-side-field .mselect,
.task-side-field .minput { background:#0a100c !important; border-color:rgba(218,240,224,.1) !important; }
.task-facts {
  gap:0 !important;
  margin:16px 0 !important;
  background:transparent !important;
  border-color:rgba(218,240,224,.09) !important;
}
.task-fact { background:transparent !important; border-bottom:1px solid rgba(218,240,224,.065); }
.task-fact:last-child { border-bottom:0; }
.task-fact span { color:rgba(207,222,212,.5) !important; }
.task-fact b { color:rgba(239,246,241,.86) !important; }
.task-dependency-picker {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:7px;
  margin-top:12px;
}
.task-dependency-search { grid-column:1 / -1; margin:0 !important; }
.task-dependency-picker .mselect { min-width:0; margin:0 !important; font-size:12px !important; }

/* Reports and management pages share the same geometry. */
.pv-panel,.ds-panel,.settings-card,.people-card,.portfolio-card,.user-card {
  border-color:rgba(218,240,224,.095) !important;
  border-radius:15px !important;
  background:#111914 !important;
  box-shadow:0 5px 18px rgba(0,0,0,.12) !important;
}
.pv-kpi,.ds-kpi { min-height:112px; border-radius:14px !important; }
.pv-panel-title,.ds-panel-title { color:rgba(243,248,245,.92) !important; }
.pv-panel-note,.ds-panel-note,.pv-sub,.ds-subtitle { color:rgba(216,229,220,.58) !important; }

@media (max-width:760px) {
  html body .board-col .task-card {
    flex-basis:154px !important;
    height:154px !important;
    min-height:154px !important;
    max-height:154px !important;
    contain-intrinsic-size:154px;
  }
  .board-col .task-card .tc-title { flex-basis:34px; min-height:34px; max-height:34px; }
  .board-col .task-card .tc-card-details { min-height:29px; max-height:29px; }
  .task-shell { display:block !important; }
  .task-shell-side { border-left:0 !important; }
  .task-actions .hbtn { min-height:36px !important; font-size:10.5px !important; }
  .task-dependency-picker { grid-template-columns:1fr; }
  .task-dependency-search { grid-column:auto; }
  .task-dependency-picker .hbtn { width:100%; justify-content:center; }
}

/* Card edge rails: priority on the left, workflow status on the right.
   Keep both rails inside the card instead of merging them with the rounded
   border. The same geometry is inherited by the drag clone. */
html body .board-col .task-card::after {
  top: 12px !important;
  bottom: 12px !important;
  left: 3px !important;
  width: 3px !important;
  border-radius: 999px !important;
  opacity: .88 !important;
}

html body .board-col .task-card .tc-status-edge {
  top: 12px !important;
  right: 3px !important;
  bottom: 12px !important;
  width: 3px !important;
  border-radius: 999px !important;
  opacity: .72 !important;
}

/* A card can legitimately contain two rows of compact metadata (for example
   overdue + buyer + deadline). Do not crop the second row under the footer. */
html body .board-col .task-card {
  flex-basis: 176px !important;
  height: 176px !important;
  min-height: 176px !important;
  max-height: 176px !important;
  contain-intrinsic-size: 176px;
}

.board-col .task-card .tc-card-details {
  flex: 0 0 45px;
  min-height: 45px;
  max-height: 45px;
  row-gap: 4px;
}

body.crm3-compact .board-col .task-card {
  flex-basis: 164px !important;
  height: 164px !important;
  min-height: 164px !important;
  max-height: 164px !important;
  contain-intrinsic-size: 164px;
}

@media (max-width:760px) {
  html body .board-col .task-card {
    flex-basis: 172px !important;
    height: 172px !important;
    min-height: 172px !important;
    max-height: 172px !important;
    contain-intrinsic-size: 172px;
  }
  .board-col .task-card .tc-card-details {
    flex-basis: 43px;
    min-height: 43px;
    max-height: 43px;
  }
}

/* Task workspace v2 — one readable workflow instead of a stack of equally
   loud cards. The brief is primary; tools and history stay available but
   visually subordinate. */
.modal-overlay .task-refactor-modal {
  width: min(1180px,calc(100vw - 44px)) !important;
  height: min(88dvh,900px) !important;
  max-height: min(88dvh,900px) !important;
}

.task-refactor-modal .task-shell {
  grid-template-columns:minmax(0,1fr) 316px !important;
}

.task-refactor-modal .task-shell-main {
  padding:0 26px 38px !important;
}

.task-refactor-modal .task-jumpbar {
  margin:0 -6px 18px !important;
  padding:11px 6px 10px !important;
}

.task-brief {
  padding:18px;
  border:1px solid rgba(218,240,224,.095);
  border-radius:15px;
  background:#111a14;
}

.task-section-kicker,
.task-side-group-title {
  margin-bottom:10px;
  color:rgba(167,190,175,.56);
  font-size:10px;
  font-weight:750;
  letter-spacing:.09em;
  text-transform:uppercase;
}

.task-brief .task-description {
  min-height:0;
  padding:0 !important;
  color:rgba(239,246,241,.86) !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  font-size:14px;
  line-height:1.65 !important;
}

.task-brief .task-description-empty { color:rgba(201,218,207,.46) !important; }
.task-brief .task-ugc-actor { margin-top:15px; }
.task-brief .task-actions {
  margin:17px 0 0 !important;
  padding-top:14px;
  border-top:1px solid rgba(218,240,224,.07);
}
.task-brief .task-actions .hbtn { min-height:36px !important; }
.task-brief .task-actions .hbtn.primary {
  color:#07110a !important;
  background:linear-gradient(180deg,#91edac,#61d985) !important;
  border-color:rgba(170,255,195,.38) !important;
}

.task-work-tools,
.task-discussion,
.task-subtasks-section,
.task-files-section { margin-top:26px; }

.task-section-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  margin:0 1px 11px;
}
.task-section-heading > div { display:flex; flex-direction:column; gap:3px; }
.task-section-heading b { color:rgba(241,247,243,.9); font-size:14px; font-weight:720; }
.task-section-heading span { color:rgba(193,211,199,.46); font-size:11px; }

.task-work-tools .task-time-module {
  margin:0 !important;
  padding:14px !important;
  border:1px solid rgba(218,240,224,.085) !important;
  border-radius:13px !important;
  background:#101813 !important;
}
.task-work-tools .task-time-module > div { padding:0 !important; border:0 !important; background:transparent !important; }
.task-work-tools .task-time-module .hbtn { width:auto !important; min-width:150px; padding-inline:15px !important; }

.task-tool-disclosure {
  margin-top:8px;
  overflow:hidden;
  border:1px solid rgba(218,240,224,.075);
  border-radius:12px;
  background:rgba(218,240,224,.018);
}
.task-tool-disclosure > summary {
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:4px 12px;
  padding:12px 38px 12px 14px;
  color:rgba(231,240,234,.78);
  cursor:pointer;
  list-style:none;
}
.task-tool-disclosure > summary::-webkit-details-marker { display:none; }
.task-tool-disclosure > summary::after {
  content:'›';
  position:absolute;
  top:50%;
  right:15px;
  color:rgba(199,216,205,.48);
  font-size:18px;
  transform:translateY(-50%);
  transition:transform 180ms ease;
}
.task-tool-disclosure[open] > summary::after { transform:translateY(-50%) rotate(90deg); }
.task-tool-disclosure > summary span { font-size:12px; font-weight:680; }
.task-tool-disclosure > summary small { color:rgba(193,211,199,.43); font-size:10px; }
.task-tool-disclosure[open] > summary { border-bottom:1px solid rgba(218,240,224,.065); }
.task-tool-disclosure > .task-module { margin:0 !important; padding:14px !important; border:0 !important; background:transparent !important; }

.task-discussion > #блокКомментариев,
.task-discussion > #блокЖурнала { margin-top:8px !important; }
.task-subtasks-section .modal-add-subtask { margin-top:8px; }
.task-subtasks-section .modal-add-subtask .minput { margin:0 !important; }

.task-refactor-modal .task-shell-side { padding:20px 18px 30px !important; }
.task-side-group {
  margin-bottom:18px;
  padding-bottom:7px;
  border-bottom:1px solid rgba(218,240,224,.07);
}
.task-side-group .task-side-field { display:block; margin-bottom:11px !important; }
.task-side-group .task-side-field .mselect,
.task-side-group .task-side-field .minput { min-height:40px !important; margin:5px 0 0 !important; }
.task-refactor-modal .task-facts { margin:4px 0 16px !important; }

@media (max-width:760px) {
  #sheet .task-refactor-modal { height:min(94dvh,920px) !important; max-height:94dvh !important; }
  .task-refactor-modal .task-shell-main { padding:0 14px 30px !important; }
  .task-refactor-modal .task-jumpbar { margin:0 -2px 14px !important; padding:9px 2px !important; }
  .task-brief { padding:15px; }
  .task-section-heading span { display:none; }
  .task-work-tools,.task-discussion,.task-subtasks-section,.task-files-section { margin-top:22px; }
  .task-tool-disclosure > summary { grid-template-columns:1fr; }
  .task-refactor-modal .task-shell-side { padding:20px 14px 32px !important; }
}

/* Files belong to the brief: a designer should see the text and every source
   without navigating away from the first task view. */
.task-brief-materials {
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid rgba(218,240,224,.07);
}
.task-brief-materials-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
  color:rgba(224,236,228,.72);
  font-size:11px;
  font-weight:680;
}
.task-brief-materials-head b {
  display:grid;
  place-items:center;
  min-width:22px;
  height:20px;
  padding:0 6px;
  color:rgba(214,244,223,.76);
  background:rgba(104,221,141,.08);
  border:1px solid rgba(104,221,141,.1);
  border-radius:999px;
  font-size:10px;
}
.task-brief-materials .modal-media-section { margin:0 !important; }
.task-brief-materials .media-grid {
  display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(132px,1fr)) !important;
  gap:8px !important;
  margin:0 0 10px !important;
}
.task-brief-materials .media-item {
  width:100% !important;
  max-width:none !important;
  height:96px !important;
  max-height:96px !important;
  aspect-ratio:auto !important;
  border:1px solid rgba(218,240,224,.08) !important;
  border-radius:10px !important;
  background:#080d0a !important;
}
.task-brief-materials .media-item img,
.task-brief-materials .media-item video {
  width:100% !important;
  height:100% !important;
  max-height:none !important;
  object-fit:cover !important;
  border-radius:9px !important;
}
.task-brief-materials .media-doc { margin-bottom:7px !important; background:rgba(4,8,5,.3) !important; }
.task-files-empty {
  margin-bottom:9px;
  padding:10px 12px;
  color:rgba(193,211,199,.43);
  background:rgba(218,240,224,.018);
  border:1px solid rgba(218,240,224,.06);
  border-radius:10px;
  font-size:11px;
}
.task-brief-materials .upload-zone {
  position:relative;
  display:flex !important;
  align-items:center;
  gap:10px;
  min-height:48px;
  margin:0 !important;
  padding:9px 12px 11px !important;
  text-align:left !important;
  border:1px dashed rgba(104,221,141,.18) !important;
  border-radius:10px !important;
  background:rgba(104,221,141,.025) !important;
}
.task-brief-materials .upload-zone-icon {
  display:grid;
  place-items:center;
  flex:0 0 28px;
  width:28px;
  height:28px;
  margin:0 !important;
  color:#85e7a2;
  background:rgba(104,221,141,.09);
  border-radius:8px;
  font-size:18px !important;
}
.task-brief-materials .upload-zone-text { margin:0 !important; font-size:11.5px !important; font-weight:680; }
.task-upload-hint { margin-top:2px; color:rgba(193,211,199,.4); font-size:9.5px; }
.task-brief-materials .upload-progress {
  position:absolute;
  right:12px;
  bottom:5px;
  left:50px;
  height:2px;
  margin:0 !important;
  background:transparent;
}

@media (max-width:760px) {
  .task-brief-materials .media-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .task-brief-materials .media-item { height:92px !important; max-height:92px !important; }
}

/* ══ ЛИЧНЫЙ ГРАФИК В КАБИНЕТЕ ═══════════════════════════════════════════ */
.cabinet-layout {
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
  gap:20px;
  height:100%;
  min-height:0;
  overflow:hidden;
}
.cab-schedule-card {
  padding:19px 20px 16px;
  color:var(--text);
  background:linear-gradient(145deg,rgba(23,35,27,.94),rgba(13,22,16,.96));
  border:1px solid rgba(130,224,156,.12);
  border-radius:16px;
  box-shadow:0 14px 38px rgba(0,0,0,.12);
}
.cab-schedule-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:17px; }
.cab-schedule-head h3 { margin:0; font-size:14px; font-weight:750; letter-spacing:-.01em; }
.cab-schedule-head p { margin:4px 0 0; color:var(--text3); font-size:11.5px; line-height:1.45; }
.cab-save-state { flex:0 0 auto; padding:5px 9px; color:rgba(173,222,187,.68); background:rgba(91,196,122,.06); border:1px solid rgba(91,196,122,.09); border-radius:999px; font-size:9.5px; }
.cab-schedule-grid { display:grid; grid-template-columns:minmax(300px,1.15fr) minmax(270px,.85fr); gap:22px; align-items:start; }
.cab-block-label { margin-bottom:9px; color:rgba(209,228,215,.62); font-size:10px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; }
.cab-hybrid-week { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; }
.cab-hybrid-day {
  appearance:none;
  min-width:0;
  padding:10px 5px 9px;
  color:var(--text2);
  background:rgba(255,255,255,.025);
  border:1px solid rgba(226,242,231,.07);
  border-radius:10px;
  cursor:pointer;
  transition:transform .16s ease,border-color .16s ease,background .16s ease;
}
.cab-hybrid-day:hover { transform:translateY(-1px); border-color:rgba(117,224,148,.2); }
.cab-hybrid-day span { display:block; margin-bottom:5px; color:var(--text3); font-size:9px; font-weight:700; text-transform:uppercase; }
.cab-hybrid-day strong { display:block; overflow:hidden; font-size:10.5px; font-weight:680; text-overflow:ellipsis; }
.cab-hybrid-day.is-office { color:#96e9ad; background:rgba(71,188,105,.08); border-color:rgba(91,213,125,.16); }
.cab-hybrid-day.is-remote { color:#9fc6ef; background:rgba(82,143,204,.08); border-color:rgba(102,164,226,.15); }
.cab-help { margin:8px 1px 0; color:rgba(190,211,197,.42); font-size:9.5px; line-height:1.4; }
.cab-calendar-block { padding-left:21px; border-left:1px solid rgba(226,242,231,.07); }
.cab-calendar-head { display:grid; grid-template-columns:28px 1fr auto 28px; align-items:center; gap:7px; margin-bottom:8px; }
.cab-calendar-head button { width:28px; height:28px; padding:0; color:var(--text2); background:rgba(255,255,255,.025); border:1px solid rgba(226,242,231,.07); border-radius:8px; cursor:pointer; font-size:17px; }
.cab-calendar-head strong { font-size:11.5px; font-weight:700; }
.cab-calendar-head > span { color:rgba(173,222,187,.62); font-size:9.5px; white-space:nowrap; }
.cab-cal-weekdays,.cab-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
.cab-cal-weekdays span { padding:2px 0 5px; color:rgba(190,211,197,.36); text-align:center; font-size:8px; }
.cab-cal-day { position:relative; display:grid; place-items:center; min-height:31px; padding:2px; color:var(--text2); background:rgba(255,255,255,.02); border:1px solid transparent; border-radius:7px; cursor:pointer; font-size:10.5px; transition:background .15s ease,border-color .15s ease,transform .15s ease; }
.cab-cal-day:hover:not(:disabled) { transform:translateY(-1px); background:rgba(91,213,125,.07); border-color:rgba(91,213,125,.13); }
.cab-cal-day:disabled { color:rgba(190,211,197,.2); background:transparent; cursor:default; }
.cab-cal-day.is-today { border-color:rgba(122,219,149,.24); }
.cab-cal-day.is-off { color:#a8f0bc; background:rgba(65,190,101,.14); border-color:rgba(91,213,125,.28); }
.cab-cal-day.is-vacation,.cab-cal-day.is-vacation:disabled { color:#d8b7f2; background:rgba(151,91,196,.14); border-color:rgba(182,123,225,.28); opacity:1; }
.cab-cal-day.is-vacation small { color:rgba(224,190,247,.72); }
.cab-cal-day small { position:absolute; right:2px; bottom:1px; left:2px; overflow:hidden; color:rgba(168,240,188,.6); font-size:5.5px; line-height:1; text-overflow:clip; text-transform:uppercase; }
.cab-vacation-block { grid-column:1/-1; display:grid; grid-template-columns:minmax(300px,1.15fr) minmax(270px,.85fr); gap:22px; padding-top:16px; border-top:1px solid rgba(226,242,231,.07); }
.cab-vacation-form { display:flex; align-items:flex-end; gap:7px; }
.cab-vacation-form label { flex:1; min-width:0; }
.cab-vacation-form label span { display:block; margin-bottom:5px; color:var(--text3); font-size:9px; }
.cab-vacation-form input { width:100%; min-height:34px; padding:7px 8px; color:var(--text2); color-scheme:dark; background:rgba(255,255,255,.025); border:1px solid rgba(226,242,231,.08); border-radius:8px; font-size:10.5px; }
.cab-vacation-form button { min-height:34px; padding:7px 12px; color:#a8f0bc; background:rgba(65,190,101,.1); border:1px solid rgba(91,213,125,.2); border-radius:8px; cursor:pointer; font-size:10.5px; font-weight:700; }
.cab-vacation-list { display:flex; flex-direction:column; gap:5px; }
.cab-vacation-row { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:34px; padding:7px 9px; color:#d8b7f2; background:rgba(151,91,196,.075); border:1px solid rgba(182,123,225,.13); border-radius:8px; font-size:10.5px; }
.cab-vacation-row button { width:22px; height:22px; color:#d8b7f2; background:transparent; border:0; border-radius:6px; cursor:pointer; font-size:15px; }
.cab-vacation-row button:hover { background:rgba(182,123,225,.12); }
.cab-vacation-empty { padding:8px 9px; color:var(--text3); border:1px dashed rgba(226,242,231,.07); border-radius:8px; font-size:10.5px; }
.cab-schedule-note { display:flex; align-items:center; gap:7px; margin-top:13px; padding-top:12px; color:rgba(190,211,197,.48); border-top:1px solid rgba(226,242,231,.055); font-size:10px; }
.cab-schedule-note span { width:6px; height:6px; background:#5bd57e; border-radius:50%; box-shadow:0 0 0 4px rgba(91,213,126,.08); }

/* Месячный планировщик: один экран вместо разрозненных недели, дей-оффов и
   формы отпуска. Высота ячейки намеренно стабильна — режимы не двигают сетку. */
.cab-month-toolbar { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:14px; padding:11px; background:rgba(255,255,255,.018); border:1px solid rgba(226,242,231,.06); border-radius:12px; }
.cab-mode-picker,.cab-bulk-actions { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.cab-mode-picker button,.cab-bulk-actions button { appearance:none; min-height:31px; padding:7px 10px; color:rgba(203,220,208,.6); background:rgba(255,255,255,.022); border:1px solid rgba(226,242,231,.07); border-radius:8px; cursor:pointer; font-size:9.5px; font-weight:650; transition:color .15s ease,background .15s ease,border-color .15s ease,transform .15s ease; }
.cab-mode-picker button { display:flex; align-items:center; gap:6px; }
.cab-mode-picker button i { width:7px; height:7px; flex:0 0 auto; background:#647068; border-radius:50%; }
.cab-mode-picker button:hover,.cab-bulk-actions button:hover { color:var(--text2); border-color:rgba(118,219,146,.18); transform:translateY(-1px); }
.cab-mode-picker button.active { color:#eaf6ed; background:rgba(83,189,113,.1); border-color:rgba(102,213,133,.27); box-shadow:0 0 0 2px rgba(91,213,126,.045); }
.cab-mode-picker .is-office i { background:#63d184; }.cab-mode-picker .is-remote i { background:#73ade3; }.cab-mode-picker .is-dayoff i { background:#e0ad50; }.cab-mode-picker .is-vacation i { background:#b77cdf; }
.cab-calendar-block { padding:0; border:0; }
.cab-calendar-head { grid-template-columns:34px minmax(140px,1fr) auto 34px; margin-bottom:10px; }
.cab-calendar-head button { width:34px; height:34px; }
.cab-calendar-head strong { font-size:15px; letter-spacing:-.02em; }
.cab-calendar-head > span { padding:5px 8px; background:rgba(255,255,255,.025); border:1px solid rgba(226,242,231,.06); border-radius:999px; }
.cab-cal-weekdays,.cab-calendar { gap:5px; }
.cab-cal-weekdays span { padding:4px 0 6px; font-size:9px; }
.cab-cal-empty { min-height:58px; }
.cab-cal-day { display:flex; flex-direction:column; align-items:flex-start; justify-content:space-between; min-height:58px; padding:8px 9px 7px; overflow:hidden; border-color:rgba(226,242,231,.055); border-radius:10px; text-align:left; }
.cab-cal-day > span { font-size:12px; font-weight:720; }
.cab-cal-day small { position:static; width:100%; color:rgba(205,222,210,.5); font-size:7px; line-height:1.1; letter-spacing:.055em; text-overflow:ellipsis; white-space:nowrap; }
.cab-cal-day.is-office { color:#a9edbc; background:rgba(63,158,90,.07); border-color:rgba(91,205,123,.12); }
.cab-cal-day.is-remote { color:#acd2f5; background:rgba(75,130,184,.105); border-color:rgba(103,163,222,.2); }
.cab-cal-day.is-dayoff,.cab-cal-day.is-off { color:#f0c878; background:rgba(196,133,31,.11); border-color:rgba(224,170,72,.23); }
.cab-cal-day.is-dayoff small { color:rgba(240,200,120,.65); }
.cab-cal-day.is-vacation { color:#dfc0f5; background:rgba(151,91,196,.13); border-color:rgba(182,123,225,.25); }
.cab-cal-day.is-weekend { color:rgba(190,211,197,.28); background:rgba(255,255,255,.012); border-color:rgba(226,242,231,.035); }
.cab-cal-day.is-weekend small { color:rgba(190,211,197,.18); }
.cab-cal-day.is-today::after { content:"сегодня"; position:absolute; top:7px; right:7px; color:#79dc96; font-size:6.5px; letter-spacing:.07em; text-transform:uppercase; }
.cab-schedule-footer { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:13px; padding-top:12px; border-top:1px solid rgba(226,242,231,.055); }
.cab-schedule-footer .cab-schedule-note { margin:0; padding:0; border:0; }
.cab-schedule-footer > div:last-child { display:flex; gap:7px; flex:0 0 auto; }
.cab-cancel-schedule,.cab-save-schedule { min-height:34px; padding:7px 12px; border-radius:9px; cursor:pointer; font-size:10px; font-weight:720; }
.cab-cancel-schedule { color:var(--text2); background:transparent; border:1px solid rgba(226,242,231,.08); }
.cab-save-schedule { color:#071009; background:linear-gradient(135deg,#88e9a2,#54c976); border:1px solid rgba(143,242,171,.4); }
.cab-cancel-schedule:disabled,.cab-save-schedule:disabled { opacity:.34; cursor:default; }
.cab-save-state.is-dirty { color:#efd28f; background:rgba(210,158,57,.08); border-color:rgba(224,174,74,.15); }

@media (max-width:1050px) {
  .cab-schedule-grid { grid-template-columns:1fr; gap:17px; }
  .cab-calendar-block { padding:16px 0 0; border-top:1px solid rgba(226,242,231,.07); border-left:0; }
  .cab-vacation-block { grid-template-columns:1fr; gap:10px; }
}

/* Общий календарь: рабочие исключения не смешиваются с дедлайнами задач. */
.cal-schedule-legend { display:flex; align-items:center; gap:12px; margin:-7px 0 10px; color:var(--text3); font-size:10px; }
.cal-schedule-legend span { display:inline-flex; align-items:center; gap:5px; }
.cal-schedule-legend span::before,.cal-schedule-chip span,.cal-schedule-dots i { content:""; width:6px; height:6px; flex:0 0 auto; border-radius:50%; }
.cal-schedule-legend .is-remote::before,.cal-schedule-chip.is-remote span,.cal-schedule-dots .is-remote { background:#6fa8dc; }
.cal-schedule-legend .is-dayoff::before,.cal-schedule-chip.is-dayoff span,.cal-schedule-dots .is-dayoff { background:#61d184; }
.cal-schedule-legend .is-vacation::before,.cal-schedule-chip.is-vacation span,.cal-schedule-dots .is-vacation { background:#b47ade; }
.cal-schedule-events { display:flex; flex-direction:column; gap:2px; margin:-1px 0 4px; }
.cal-schedule-chip { display:flex; align-items:center; gap:4px; min-width:0; overflow:hidden; color:rgba(213,226,217,.72); font-size:8.5px; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.cal-schedule-events small { color:var(--text3); font-size:8px; }
.cal-schedule-dots { display:flex; align-items:center; gap:2px; min-height:8px; margin:-1px 0 3px; }
.cal-schedule-dots i { display:block; width:5px; height:5px; }
.cal-schedule-dots b { color:var(--text3); font-size:7px; }
@media(max-width:700px){ .cal-schedule-legend{overflow-x:auto;white-space:nowrap}.cab-vacation-form{flex-wrap:wrap}.cab-vacation-form label{min-width:110px}.cab-vacation-form button{width:100%} }
@media (max-width:760px) {
  .cabinet-layout { display:block; height:auto; overflow:visible; }
  .cabinet-layout > div { overflow:visible !important; }
  .cabinet-layout > div:first-child { margin-bottom:12px; }
  .cab-schedule-card { padding:16px 14px 14px; }
  .cab-schedule-head { margin-bottom:14px; }
  .cab-schedule-head p { max-width:230px; }
  .cab-hybrid-week { grid-template-columns:repeat(5,minmax(52px,1fr)); overflow-x:auto; padding-bottom:3px; }
  .cab-hybrid-day { min-width:52px; }
  .cab-month-toolbar { flex-direction:column; }
  .cab-mode-picker,.cab-bulk-actions { width:100%; }
  .cab-mode-picker button { flex:1 1 calc(33.333% - 6px); justify-content:center; }
  .cab-bulk-actions button { flex:1 1 calc(33.333% - 6px); }
  .cab-cal-empty,.cab-cal-day { min-height:49px; }
  .cab-cal-day { padding:6px; }
  .cab-cal-day small { font-size:6px; }
  .cab-cal-day.is-today::after { display:none; }
  .cab-schedule-footer { align-items:stretch; flex-direction:column; }
  .cab-schedule-footer > div:last-child { justify-content:flex-end; }
}

/* Тимлид: общий график команды без открытия кабинетов по одному. */
.team-schedule-board {
  margin-bottom:16px;
  padding:20px;
  background:linear-gradient(145deg,rgba(21,33,25,.95),rgba(12,20,15,.97));
  border:1px solid rgba(130,224,156,.12);
  border-radius:16px;
  box-shadow:0 16px 40px rgba(0,0,0,.13);
}
.team-schedule-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:15px; }
.team-schedule-head h2 { margin:0; font-size:15px; letter-spacing:-.01em; }
.team-schedule-head p { margin:4px 0 0; color:var(--text3); font-size:11px; }
.team-schedule-head > span { padding:5px 9px; color:rgba(181,221,192,.55); background:rgba(255,255,255,.025); border:1px solid rgba(226,242,231,.065); border-radius:999px; font-size:9.5px; }
.team-presence-kpis { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin-bottom:14px; }
.team-presence-kpis article { display:flex; align-items:center; gap:9px; min-width:0; padding:10px 12px; background:rgba(255,255,255,.022); border:1px solid rgba(226,242,231,.06); border-radius:10px; }
.team-presence-kpis strong { font-size:18px; line-height:1; }
.team-presence-kpis span { overflow:hidden; color:var(--text3); font-size:9.5px; text-overflow:ellipsis; white-space:nowrap; }
.team-presence-kpis .office strong { color:#8de5a6; }
.team-presence-kpis .remote strong { color:#8dbce8; }
.team-presence-kpis .dayoff strong { color:#e7bf72; }
.team-presence-kpis .vacation strong { color:#c99bea; }
.team-presence-kpis .unfilled strong { color:#a6afa8; }
.team-schedule-table { min-width:720px; overflow:hidden; border:1px solid rgba(226,242,231,.065); border-radius:11px; }
.team-schedule-row { display:grid; grid-template-columns:minmax(180px,1.45fr) repeat(5,34px) minmax(92px,.65fr) minmax(120px,.8fr); align-items:center; gap:7px; min-height:49px; padding:0 12px; border-top:1px solid rgba(226,242,231,.052); }
.team-schedule-row:first-child { border-top:0; }
.team-schedule-row > span { display:flex; align-items:center; gap:9px; min-width:0; }
.team-schedule-row > span > span { display:flex; flex-direction:column; min-width:0; }
.team-schedule-row > span strong { overflow:hidden; font-size:11.5px; text-overflow:ellipsis; white-space:nowrap; }
.team-schedule-row > span small,.team-schedule-row > em small { margin-top:2px; color:rgba(190,211,197,.4); font-size:8.5px; font-style:normal; font-weight:400; }
.team-schedule-avatar { display:grid; place-items:center; flex:0 0 27px; width:27px; height:27px; color:#081009; background:linear-gradient(145deg,#92eaaa,#48b968); border-radius:8px; font-size:8.5px; font-style:normal; font-weight:800; }
.team-schedule-row > i { display:grid; place-items:center; width:28px; height:26px; border-radius:7px; font-size:8.5px; font-style:normal; font-weight:750; }
.team-schedule-row > b { justify-self:start; padding:5px 8px; border-radius:999px; font-size:9px; font-weight:650; }
.team-schedule-row > em { display:flex; flex-direction:column; color:var(--text2); font-size:10px; font-style:normal; }
.team-schedule-row.is-head { min-height:34px; color:rgba(190,211,197,.4); background:rgba(255,255,255,.018); font-size:8px; letter-spacing:.07em; text-transform:uppercase; }
.team-schedule-row.is-head > i { height:auto; color:inherit; background:none; }
.team-schedule-row.is-head > b { padding:0; color:inherit; background:none; font-size:8px; }
.mode-office { color:#91e8aa !important; background:rgba(74,187,106,.09); border:1px solid rgba(91,213,125,.12); }
.mode-remote { color:#94c3ec !important; background:rgba(78,138,198,.09); border:1px solid rgba(103,163,222,.12); }
.mode-dayoff { color:#e8c57f !important; background:rgba(194,146,57,.09); border:1px solid rgba(218,171,82,.13); }
.mode-vacation { color:#d2a8ed !important; background:rgba(151,91,196,.10); border:1px solid rgba(182,123,225,.15); }
.mode-weekend { color:rgba(190,211,197,.42) !important; background:rgba(255,255,255,.025); border:1px solid rgba(226,242,231,.06); }
.mode-unconfigured { color:rgba(190,211,197,.38) !important; background:rgba(255,255,255,.018); border:1px dashed rgba(226,242,231,.08); }
.team-schedule-legend { display:flex; align-items:center; gap:14px; margin-top:10px; color:var(--text3); font-size:9px; }
.team-schedule-legend span { display:flex; align-items:center; gap:5px; }
.team-schedule-legend i { width:6px; height:6px; border-radius:50%; }
.team-schedule-legend i.office { background:#67d486; }.team-schedule-legend i.remote { background:#72aee4; }.team-schedule-legend i.dayoff { background:#d9a94e; }.team-schedule-legend i.vacation { background:#b47ade; }

/* ══ ОПЕРАЦИОННЫЙ КОНТУР ═══════════════════════════════════════════════ */
.ops-control { margin:0 0 18px; padding:20px; color:var(--text); background:linear-gradient(145deg,rgba(20,33,24,.96),rgba(11,19,14,.98)); border:1px solid rgba(125,221,151,.13); border-radius:16px; box-shadow:0 16px 40px rgba(0,0,0,.14); }
.ops-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:15px; }
.ops-kicker { display:block; margin-bottom:5px; color:#66d487; font-size:8.5px; font-weight:800; letter-spacing:.13em; text-transform:uppercase; }
.ops-head h2 { margin:0; font-size:16px; letter-spacing:-.02em; }.ops-head p { margin:5px 0 0; color:var(--text3); font-size:11px; line-height:1.45; }
.ops-head-actions { display:flex; align-items:center; gap:9px; flex:0 0 auto; }.ops-head-actions > span { color:rgba(190,211,197,.4); font-size:9px; white-space:nowrap; }
.ops-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin-bottom:12px; }
.ops-summary article { display:flex; align-items:baseline; gap:7px; padding:10px 12px; background:rgba(255,255,255,.018); border:1px solid rgba(226,242,231,.055); border-radius:10px; }
.ops-summary strong { color:#e2bd73; font-size:17px; }.ops-summary span { color:var(--text3); font-size:9.5px; }.ops-summary .critical strong { color:#ef7d82; }.ops-summary .healthy strong { color:#66d487; }
.ops-list { display:flex; flex-direction:column; gap:6px; }
.ops-item { display:grid; grid-template-columns:7px minmax(0,1fr) auto; align-items:center; gap:11px; min-height:64px; padding:10px 11px; background:rgba(255,255,255,.014); border:1px solid rgba(226,242,231,.055); border-radius:11px; }
.ops-item > i { width:7px; height:7px; background:#d5a44e; border-radius:50%; box-shadow:0 0 0 4px rgba(213,164,78,.07); }.ops-item.is-critical > i { background:#e6656d; box-shadow:0 0 0 4px rgba(230,101,109,.08); }
.ops-copy { min-width:0; }.ops-copy > div { display:flex; align-items:center; gap:8px; }.ops-copy strong { overflow:hidden; font-size:11.5px; text-overflow:ellipsis; white-space:nowrap; }.ops-copy > div span { color:rgba(190,211,197,.34); font-size:8.5px; white-space:nowrap; }
.ops-copy p { margin:4px 0; overflow:hidden; color:rgba(202,218,207,.58); font-size:9.5px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }.ops-copy small { color:rgba(113,211,140,.55); font-size:8px; letter-spacing:.05em; text-transform:uppercase; }
.ops-actions { display:flex; align-items:center; gap:5px; }.ops-actions button { min-height:29px; padding:6px 9px; color:rgba(211,230,216,.7); background:rgba(255,255,255,.025); border:1px solid rgba(226,242,231,.07); border-radius:8px; cursor:pointer; font-size:8.5px; font-weight:650; }.ops-actions button:hover { color:#c4f0d0; border-color:rgba(98,210,129,.2); }
.ops-empty { display:flex; flex-direction:column; align-items:center; padding:28px 16px; color:#69d589; border:1px dashed rgba(105,213,137,.14); border-radius:11px; }.ops-empty strong { font-size:12px; }.ops-empty span { margin-top:4px; color:var(--text3); font-size:9.5px; }.ops-loading { padding:22px; color:var(--text3); font-size:11px; }
.ops-more { padding:12px 14px; text-align:center; color:var(--text3); font-size:9.5px; border:1px dashed rgba(105,213,137,.12); border-radius:11px; background:rgba(255,255,255,.012); }
@media(max-width:760px){.ops-control{padding:15px}.ops-head{flex-direction:column}.ops-head-actions{width:100%;justify-content:space-between}.ops-summary{grid-template-columns:1fr}.ops-item{grid-template-columns:7px minmax(0,1fr)}.ops-actions{grid-column:2;flex-wrap:wrap}.ops-copy p{white-space:normal}.ops-actions button{flex:1}}
.team-schedule-legend small { margin-left:auto; color:rgba(190,211,197,.35); font-size:8.5px; }
.workload-presence { flex:0 0 auto; padding:5px 8px; border-radius:999px; font-size:9px; }

/* Загрузка команды: компактные карточки одной высоты без служебных аккаунтов. */
#workloadContent { padding-bottom:28px; }
.workload-section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; max-width:1180px; margin:20px 0 11px; }
.workload-section-head h2 { margin:0; font-size:15px; letter-spacing:-.015em; }
.workload-section-head p { margin:4px 0 0; color:var(--text3); font-size:10px; }
.workload-section-head > span { padding:5px 9px; color:rgba(191,218,198,.58); background:rgba(255,255,255,.025); border:1px solid rgba(226,242,231,.065); border-radius:999px; font-size:9.5px; white-space:nowrap; }
.workload-data-note { display:flex; align-items:center; gap:10px; max-width:1180px; margin:14px 0 0; padding:10px 12px; color:#d8be85; background:rgba(190,137,48,.055); border:1px solid rgba(218,171,82,.12); border-radius:11px; }
.workload-data-note > span { display:grid; flex:0 0 25px; width:25px; height:25px; place-items:center; background:rgba(218,171,82,.11); border-radius:8px; font-size:11px; font-weight:800; }
.workload-data-note div { display:flex; flex-direction:column; min-width:0; }
.workload-data-note b { font-size:10.5px; }
.workload-data-note small { margin-top:2px; color:rgba(207,192,160,.54); font-size:9px; line-height:1.4; }
#workloadContent .workload-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:11px; max-width:1180px; }
#workloadContent .workload-card { display:flex; flex-direction:column; height:178px; min-height:0; padding:14px; overflow:hidden; border-radius:14px; }
#workloadContent .workload-card.is-overload { border-color:rgba(226,92,92,.24) !important; box-shadow:inset 3px 0 rgba(226,92,92,.65) !important; }
#workloadContent .workload-card-head { gap:9px; min-height:36px; margin-bottom:11px; }
#workloadContent .workload-ava { width:34px; height:34px; border-radius:10px; font-size:10px; }
.workload-person { flex:1; min-width:0; }
#workloadContent .workload-name { overflow:hidden; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
#workloadContent .workload-role { margin-top:2px; font-size:9px; }
#workloadContent .workload-presence { padding:4px 7px; font-size:8.5px; }
.workload-count { display:flex; flex-direction:column; align-items:flex-end; flex:0 0 45px; }
.workload-count strong { font-size:19px; line-height:1; }
.workload-count small { margin-top:3px; color:var(--text3); font-size:7.5px; letter-spacing:.04em; text-transform:uppercase; }
#workloadContent .workload-bar-wrap { height:5px; margin:0 0 8px; }
#workloadContent .workload-bar { height:5px; background:rgba(226,242,231,.075); }
.workload-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; color:var(--text3); font-size:8.5px; }
.workload-meta b { color:#eb8e8e; }
#workloadContent .workload-tasks { display:grid; gap:4px; min-height:52px; margin:0; }
#workloadContent .workload-task { width:100%; min-width:0; min-height:24px; padding:4px 7px; color:rgba(221,230,224,.68); background:rgba(0,0,0,.18); border:1px solid rgba(226,242,231,.035); border-radius:7px; text-align:left; }
#workloadContent .workload-task > span:last-child { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workload-more { align-self:start; color:rgba(160,205,171,.5); font-size:8.5px; }
.workload-empty { display:flex; align-items:center; min-height:50px; color:rgba(190,211,197,.32); font-size:9.5px; }
.workload-empty-state { max-width:1180px; padding:28px; color:var(--text3); border:1px dashed var(--border); border-radius:14px; text-align:center; font-size:11px; }
@media (max-width:900px) {
  #workloadContent .workload-grid { grid-template-columns:1fr; }
  .workload-section-head { align-items:flex-start; flex-direction:column; gap:8px; }
}

/* Результаты и быстрые инструменты Design Gang внутри ТЗ. */
.task-dg-tools { position:relative; }
.task-dg-tools > summary { list-style:none; cursor:pointer; user-select:none; }
.task-dg-tools > summary::-webkit-details-marker { display:none; }
.task-dg-tools > summary span { margin-left:4px; color:var(--text3); transition:transform .15s ease; }
.task-dg-tools[open] > summary span { display:inline-block; transform:rotate(180deg); }
.task-dg-tools-menu { position:absolute; z-index:20; top:calc(100% + 7px); left:0; display:grid; grid-template-columns:1fr 1fr; gap:4px; width:270px; padding:7px; background:#111a14; border:1px solid rgba(142,222,164,.15); border-radius:12px; box-shadow:0 18px 44px rgba(0,0,0,.38); }
.task-dg-tools-menu button { padding:9px 10px; color:var(--text2); background:rgba(255,255,255,.025); border:1px solid transparent; border-radius:8px; cursor:pointer; text-align:left; font-size:10.5px; transition:background .14s ease,border-color .14s ease; }
.task-dg-tools-menu button:hover { color:#a4edb9; background:rgba(91,213,125,.075); border-color:rgba(91,213,125,.13); }
.task-dg-results { margin:0 0 13px; padding:11px; background:rgba(64,174,95,.035); border:1px solid rgba(91,213,125,.09); border-radius:12px; }
.task-dg-results-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:7px; }
.task-dg-results-head span { color:#9be9b1; font-size:10px; font-weight:750; letter-spacing:.07em; text-transform:uppercase; }
.task-dg-results-head small { color:var(--text3); font-size:8.5px; }
.task-dg-result { display:flex; align-items:center; gap:9px; min-height:42px; padding:7px 8px; border-top:1px solid rgba(226,242,231,.05); }
.task-dg-result:first-of-type { border-top:0; }
.task-dg-result > i { display:grid; place-items:center; flex:0 0 26px; width:26px; height:26px; color:#081009; background:linear-gradient(145deg,#92eaaa,#47ba68); border-radius:8px; font-size:8px; font-style:normal; font-weight:850; }
.task-dg-result > div { display:flex; flex:1; flex-direction:column; min-width:0; }
.task-dg-result strong { font-size:10.5px; }.task-dg-result small { margin-top:2px; color:var(--text3); font-size:8.5px; }
.task-dg-result > a { padding:6px 8px; color:#9eeab3; background:rgba(91,213,125,.06); border:1px solid rgba(91,213,125,.11); border-radius:8px; font-size:9px; text-decoration:none; }
.task-dg-result.is-partial > i { color:#171006; background:#d9a94e; }.task-dg-result.is-failed > i { color:#170808; background:#df7777; }
@media (max-width:600px) { .task-dg-tools-menu { right:0; left:auto; width:min(270px,calc(100vw - 40px)); } }

@media (max-width:900px) {
  .team-presence-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .team-schedule-board { overflow-x:auto; }
  .team-schedule-head,.team-presence-kpis,.team-schedule-legend { min-width:720px; }
}
@media (max-width:600px) {
  .team-schedule-board { padding:14px; }
  .team-schedule-head,.team-presence-kpis,.team-schedule-legend,.team-schedule-table { min-width:650px; }
}
