/* Taskly v13 — six focused changes only. Existing palettes, component geometry,
   dark/light glass and workspace data behavior remain unchanged. */

/* Collapsing control is mounted at body level so an overflowable sidebar can never
   clip or cover half of it. The edge is tracked by ResizeObserver in app.js. */
#collapseSidebar,
body.sidebar-collapsed #collapseSidebar {
  position:fixed!important;
  top:23px!important;
  left:calc(var(--collapse-edge-x,1198px) - 18px)!important;
  right:auto!important;
  display:grid!important;
  place-items:center!important;
  width:36px!important;height:36px!important;
  padding:7px!important;margin:0!important;
  border-radius:11px!important;
  transform:none!important;
  z-index:105!important;
  box-sizing:border-box!important;
  transition:background-color .22s ease,color .22s ease,border-color .22s ease,box-shadow .22s ease!important;
}
#collapseSidebar .collapse-direction {
  transform:rotate(-90deg)!important;
  transition:transform .25s ease!important;
  width:18px;height:18px;
}
body.sidebar-collapsed #collapseSidebar .collapse-direction{transform:rotate(90deg)!important;}
#collapseSidebar:hover{transform:none!important;}
@media(max-width:780px){#collapseSidebar,body.sidebar-collapsed #collapseSidebar{display:none!important;}}

/* Vertically center icon and label/number block of the four top stat tiles. */
.stats-grid .stat-card:not(.progress-card) {align-items:center!important;}
.stats-grid .stat-card:not(.progress-card) >div:not(.stat-icon){align-self:center!important;}

/* Running task: highlighted first row; the rest of the table keeps its existing style. */
.tasks-table tbody tr.running-now td{transition:background-color .3s ease,border-color .3s ease;}
html[data-theme="dark"] .tasks-table tbody tr.running-now td{
  background:rgba(13,119,116,.135)!important;
  border-bottom-color:rgba(23,198,171,.32)!important;
}
html[data-theme="light"] .tasks-table tbody tr.running-now td{
  background:rgba(20,181,151,.085)!important;
  border-bottom-color:rgba(27,173,146,.24)!important;
}
.tasks-table tbody tr.running-now td:first-child{box-shadow:inset -4px 0 0 #13c9a2!important;}
.tasks-table tbody tr.running-now .status-doing::after,
.task-cards .task-card.running-now .status-doing::after{
  content:"";display:inline-block;flex:none;width:7px;height:7px;border-radius:50%;
  margin-inline-start:7px;background:#18d9b2;box-shadow:0 0 0 2px rgba(24,217,178,.14),0 0 12px rgba(24,217,178,.55);
  animation:tasklyLivePulse 1.65s ease-in-out infinite;
}
@keyframes tasklyLivePulse{0%,100%{transform:scale(.9);opacity:1;box-shadow:0 0 0 2px rgba(24,217,178,.16),0 0 6px rgba(24,217,178,.3)}50%{transform:scale(1.25);opacity:.86;box-shadow:0 0 0 6px rgba(24,217,178,.08),0 0 17px rgba(24,217,178,.65)}}
.tasks-table tbody tr.leader-arrival td {animation:tasklyLeaderArrival 1.15s ease-out both;}
@keyframes tasklyLeaderArrival{0%{filter:brightness(1.35)}50%{filter:brightness(1.1)}100%{filter:brightness(1)}}
html[data-theme="dark"] .task-card.running-now{border-color:rgba(24,217,178,.52)!important;box-shadow:inset 3px 0 0 #13c9a2,0 0 18px rgba(24,217,178,.08)!important;}
html[data-theme="light"] .task-card.running-now{border-color:rgba(16,173,144,.4)!important;box-shadow:inset 3px 0 0 #13c9a2,0 8px 24px rgba(16,173,144,.08)!important;}

/* Notifications scroll content, never the visible scrollbar; dismissal and the
   panel height change are driven by Web Animations API. */
#notifyList,.topbar-popover-wrap .glass-popover{
  scrollbar-width:none!important;-ms-overflow-style:none!important;
}
#notifyList::-webkit-scrollbar,.topbar-popover-wrap .glass-popover::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;}
#notifyList{overflow-x:hidden!important;}
#clearNotifications:disabled{opacity:.6;cursor:default;}

@media(prefers-reduced-motion:reduce){
  .tasks-table tbody tr.running-now .status-doing::after,
  .task-cards .task-card.running-now .status-doing::after,
  .tasks-table tbody tr.leader-arrival td{animation:none!important;}
}
