/* Sfera Task 1.145.4 — one authoritative KPI value, one coherent status tab control.
   Override legacy tab styling only inside the Task workspace. */
#task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar{
 gap:10px!important;
}
/* Legacy direct-child tabs are no longer mounted in the toolbar.
   Native status and authorized assignment scope remain on the left. */
#task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>.task-v5-tabs{
 order:0!important;flex:0 0 auto!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>#task-studio-quick{
 order:1!important;box-sizing:border-box!important;
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 flex:0 0 auto!important;min-height:38px!important;height:38px!important;
 width:auto!important;min-width:0!important;gap:2px!important;
 padding:2px 12px 2px 0!important;margin:0!important;
 border:0!important;border-right:1px solid #e5eaf5!important;
 border-radius:0!important;background:transparent!important;
 box-shadow:none!important;overflow:visible!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>#task-studio-quick>.task-studio-quick__tab{
 box-sizing:border-box!important;position:relative!important;
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 flex:0 0 auto!important;width:auto!important;
 min-height:35px!important;height:35px!important;min-width:0!important;
 padding:7px 13px!important;margin:0!important;
 border:1px solid transparent!important;border-radius:8px!important;
 color:#657791!important;background:transparent!important;
 box-shadow:none!important;
 font:650 12px/1.4 Poppins,"Open Sans",sans-serif!important;
 white-space:nowrap!important;text-align:center!important;
 transition:background .16s ease,color .16s ease,border-color .16s ease!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>#task-studio-quick>.task-studio-quick__tab::after{
 content:none!important;display:none!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>#task-studio-quick>.task-studio-quick__tab[data-active="true"]{
 color:#0e2166!important;background:#eff4ff!important;
 border-color:#dce7ff!important;box-shadow:none!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>#task-studio-quick>.task-studio-quick__tab:not([data-active="true"]):hover{
 color:#3157d7!important;background:#f1f5ff!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>#task-studio-quick>.task-studio-quick__tab:focus-visible{
 outline:2px solid #3157d7!important;outline-offset:2px!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>.task-v6-segments{
 order:2!important;flex:1 1 auto!important;justify-content:flex-start!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>.task-v6-actions{
 order:3!important;
}
/* Bars animate via SVG's real rect fill, never use a decorative pseudo-element.
   Zero has a neutral baseline; populated KPIs take their color from native totals. */
#task-view #task-v2-root.task-v5 .task-v5-kpi .task-v5-mini-spark svg rect.task-v7-spark-bar{
 stroke:none!important;
}
/* No truncation: the three state options remain usable on narrow screens. */
@media(max-width:1120px){
 #task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar{
  flex-wrap:wrap!important;column-gap:10px!important;row-gap:8px!important;
 }
 #task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>.task-v6-segments{
  flex:1 1 auto!important;
 }
}
@media(max-width:760px){
 #task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>.task-v5-tabs{
  flex:0 0 auto!important;
 }
 #task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>#task-studio-quick{
  order:1!important;flex:1 1 auto!important;justify-content:flex-start!important;
  padding-right:0!important;border-right:0!important;
 }
 #task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>.task-v6-segments{
  order:2!important;flex:1 1 auto!important;
 }
 #task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>.task-v6-actions{
  order:3!important;margin-left:auto!important;
 }
}
@media(max-width:520px){
 #task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>.task-v5-tabs{
  flex:1 1 100%!important;border-bottom:1px solid #e9eef8!important;
 }
 #task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>#task-studio-quick{
  flex:1 1 100%!important;justify-content:flex-start!important;
  min-height:39px!important;gap:3px!important;
 }
 #task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>.task-v6-segments{
  flex:1 1 auto!important;
 }
 #task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>#task-studio-quick>.task-studio-quick__tab{
  padding:7px 12px!important;min-height:36px!important;
 }
}
@media(prefers-reduced-motion:reduce){
 #task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>#task-studio-quick>.task-studio-quick__tab{
  transition:none!important;
 }
}

/* Sfera Task: legacy list is superseded; never expose it during first paint. */
#task-view > .task-directory-shell { display:none!important; }
#task-view #task-v2-results[data-task-studio-ready="false"] { visibility:hidden!important; }

/* A parent not in the current filtered page is a contextual group, not a fake Task. */
#task-view .task-v2-parent-reference,
#task-view .task-v3-table tr[data-task-group-ref]{
 background:#f7f9fe;
 border-color:#e2e9f5;
}
#task-view .task-v2-parent-reference .task-v3-task-copy > small,
#task-view .task-v2-parent-reference__actions{color:#60708c;}
#task-view .task-v2-parent-reference > header {padding:14px 16px;}
#task-view .task-v2-parent-reference > header h3 {color:#0e2166;font-weight:650;}
#task-view .task-v2-parent-reference > header p {color:#60708c;font-size:12px;overflow-wrap:anywhere;}

/* Hierarchical Kanban: child rows stay inside their parent card. */
#task-view .task-kanban-card__parent-ref{
 margin:6px 0 0;color:#60708c;font-size:12px;overflow-wrap:anywhere;
}
#task-view .task-kanban-card__microtasks{
 display:grid;gap:6px;margin:0 12px 12px;padding:10px 11px;
 border:1px solid #e2e9f5;border-radius:10px;background:#f9fbff;
}
#task-view .task-kanban-card__microtasks-heading{
 color:#0e2166;font-size:12px;font-weight:650;
}
#task-view .task-kanban-card__microtask{
 display:flex;align-items:center;gap:7px;min-width:0;padding:5px 0;
 border-top:1px solid #edf1f8;
}
#task-view .task-kanban-card__microtask-open{
 flex:1 1 auto;min-width:0;text-align:left;border:0;padding:4px 0;
 background:transparent;color:#0e2166;font:inherit;font-size:12px;
 cursor:pointer;overflow-wrap:anywhere;
}
#task-view .task-kanban-card__microtask-open:hover{text-decoration:underline;}
#task-view .task-kanban-card__microtask-state{
 flex:0 0 auto;color:#657791;font-size:11px;
}
#task-view .task-kanban-card__microtask-toggle{
 flex:0 0 auto;border:1px solid #dce7ff;border-radius:7px;
 background:#eff4ff;color:#0e2166;padding:5px 8px;
 font:600 11px/1.3 Poppins,"Open Sans",sans-serif;cursor:pointer;
}
#task-view .task-kanban-card__microtask-toggle:disabled{opacity:.5;cursor:wait;}
#task-view .task-kanban-card__microtask-toggle:hover:not(:disabled){background:#e5edff;}
#task-view .task-kanban-card__microtask :is(button):focus-visible{
 outline:2px solid #3157d7;outline-offset:2px;
}
@media(max-width:760px){
 #task-view .task-kanban-card__microtask{flex-wrap:wrap;}
 #task-view .task-kanban-card__microtask-open{flex-basis:100%;}
 #task-view .task-v2-parent-reference > header{padding:12px;}
}
@media(prefers-reduced-motion:reduce){
 #task-view .task-kanban-card__microtask-toggle{transition:none!important;}
}

/* Task UX 2.7.3 — preserve the result surface during SQLite list refreshes.
   Sfera dashboard tokens are authoritative; no extra data or API requests. */
#task-view #task-v2-root #task-v2-state {
  position:absolute!important;width:1px!important;height:1px!important;
  padding:0!important;margin:-1px!important;border:0!important;
  overflow:hidden!important;clip:rect(0 0 0 0)!important;
  clip-path:inset(50%)!important;white-space:nowrap!important;
}
#task-view #task-v2-root #task-v2-results[data-task-loading="true"]{
  min-height:218px!important;position:relative!important;
  background:#fff!important;
}
#task-view #task-v2-root #task-v2-results[data-task-loading="true"] > :not(.task-v11-loading){
  display:none!important;
}
#task-view #task-v2-root #task-v2-results .task-v11-loading{
  box-sizing:border-box;display:flex;align-items:center;justify-content:center;
  gap:16px;min-height:218px;padding:30px 24px;
  color:#0e2166;text-align:left;background:#fff;
}
#task-view #task-v2-root .task-v11-loading__spinner{
  box-sizing:border-box;display:block;flex:0 0 34px;width:34px;height:34px;
  border:3px solid #e3ecf8;border-top-color:var(--dashboard-primary,#0b7ff0);
  border-radius:50%;animation:task-v11-spin .72s linear infinite;
}
#task-view #task-v2-root .task-v11-loading__content{
  display:grid;gap:4px;min-width:0;
}
#task-view #task-v2-root .task-v11-loading__content strong{
  font:650 14px/1.3 Poppins,"Open Sans",sans-serif;color:#0e2166;
}
#task-view #task-v2-root .task-v11-loading__content span{
  font:400 12px/1.5 "Open Sans",sans-serif;color:#7385a0;
}
@keyframes task-v11-spin{to{transform:rotate(360deg)}}
#task-view #task-v2-root .task-v11-empty{
  box-sizing:border-box;display:grid;justify-items:center;gap:8px;
  min-height:176px;align-content:center;padding:28px 18px;
  color:#7285a1;text-align:center;background:#fff;
}
#task-view #task-v2-root .task-v11-empty__icon{
  display:grid;width:32px;height:32px;place-items:center;
  border:1px solid #dceaf9;border-radius:11px;
  background:#f2f8ff;color:var(--dashboard-primary,#0b7ff0);
}
#task-view #task-v2-root .task-v11-empty strong{
  font:650 14px/1.35 Poppins,"Open Sans",sans-serif;color:#0e2166;
}
#task-view #task-v2-root .task-v11-empty > span:not(.task-v11-empty__icon){
  font:400 12px/1.45 "Open Sans",sans-serif;color:#7385a0;
}
#task-view #task-v2-root .task-v11-retry{
  min-height:35px;margin-top:5px;padding:7px 17px;
  border:1px solid #b9dcfa;border-radius:9px;
  background:#f2f8ff;color:#0866b9;
  font:650 12px Poppins,"Open Sans",sans-serif;cursor:pointer;
}
#task-view #task-v2-root .task-v11-retry:hover{background:#e6f2ff}
#task-view #task-v2-root.task-v5 #task-v2-filter-apply{
  background:var(--dashboard-primary,#0b7ff0)!important;
  border-color:var(--dashboard-primary,#0b7ff0)!important;
  color:#fff!important;transition:background .15s ease,transform .15s ease!important;
}
#task-view #task-v2-root.task-v5 #task-v2-filter-apply:hover{
  background:#086ccf!important;border-color:#086ccf!important;
}
#task-view #task-v2-root.task-v5 #task-v2-filter-apply:active{transform:translateY(1px)}
#task-view #task-v2-root.task-v5 .task-v6-filter{
  position:relative!important;overflow:visible!important;
}
#task-view #task-v2-root.task-v5 .task-v6-filter.is-active{
  color:var(--dashboard-primary,#0b7ff0)!important;
  border-color:#aed8fa!important;background:#f2f8ff!important;
}
#task-view #task-v2-root.task-v5 .task-v6-filter .task-v11-filter-count{
  position:absolute;top:-8px;right:-8px;z-index:3;
  box-sizing:border-box;display:grid;min-width:19px;height:19px;
  place-items:center;padding:0 4px;border:2px solid #fff;
  border-radius:999px;background:var(--dashboard-primary,#0b7ff0);
  color:#fff;font:700 10px/1 Poppins,"Open Sans",sans-serif;
  box-shadow:0 2px 6px rgba(14,33,102,.13);
  pointer-events:none;
}
#task-view #task-v2-root.task-v5 .task-v6-filter .task-v11-filter-count[hidden]{display:none!important}
#task-view #task-v2-root.task-v5 .task-v6-filter:focus-visible,
#task-view #task-v2-root.task-v5 #task-v2-filter-apply:focus-visible,
#task-view #task-v2-root .task-v11-retry:focus-visible{
  outline:2px solid var(--dashboard-primary,#0b7ff0)!important;
  outline-offset:3px!important;
}
@media(max-width:760px){
  #task-view #task-v2-root .task-v11-loading{min-height:190px;padding:26px 14px}
  #task-view #task-v2-root .task-v11-loading__content strong{font-size:13px}
  #task-view #task-v2-root .task-v11-loading__content span{font-size:11px}
}
@media(prefers-reduced-motion:reduce){
  #task-view #task-v2-root .task-v11-loading__spinner{animation:none;border-color:var(--dashboard-primary,#0b7ff0)}
  #task-view #task-v2-root.task-v5 #task-v2-filter-apply{transition:none!important;transform:none!important}
}

/* Task 2.7.8 — a two-option view switch before the funnel. Status and
   assignment scopes stay in their native permission-aware groups on the left.
   The switch is only a presentation adapter for the existing Task V2 actions. */
#task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>#task-studio-quick{
  order:0!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>.task-v6-segments{
  order:1!important;flex:1 1 auto!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>.task-v6-actions{
  order:2!important;flex:0 0 auto!important;
  display:flex!important;align-items:center!important;gap:7px!important;
  margin-left:auto!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v6-actions>.task-v12-view-switch{
  box-sizing:border-box!important;display:inline-flex!important;
  align-items:center!important;justify-content:center!important;
  flex:0 0 auto!important;gap:3px!important;
  width:auto!important;min-width:0!important;
  height:40px!important;min-height:40px!important;
  margin:0 3px 0 0!important;padding:3px!important;
  border:1px solid var(--dashboard-border,#dfe6f0)!important;
  border-radius:12px!important;background:var(--dashboard-neutral,#f8fafc)!important;
  box-shadow:none!important;transform:none!important;
  overflow:visible!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v6-actions>.task-v12-view-switch:hover{
  background:var(--dashboard-neutral,#f8fafc)!important;
  border-color:var(--dashboard-border,#dfe6f0)!important;
  box-shadow:none!important;transform:none!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v12-view-switch>button.task-v12-view-tab{
  box-sizing:border-box!important;display:inline-grid!important;place-items:center!important;
  flex:0 0 36px!important;width:36px!important;min-width:36px!important;
  height:32px!important;min-height:32px!important;
  margin:0!important;padding:0!important;
  border:1px solid transparent!important;border-radius:9px!important;
  background:transparent!important;color:#71839d!important;
  box-shadow:none!important;transform:none!important;
  transition:background-color .15s ease,color .15s ease,border-color .15s ease!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v12-view-switch>button.task-v12-view-tab:hover{
  color:var(--dashboard-title,#0e2166)!important;
  background:#edf2f8!important;box-shadow:none!important;transform:none!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v12-view-switch>button.task-v12-view-tab[data-active="true"]{
  color:var(--dashboard-title,#0e2166)!important;
  background:var(--dashboard-surface,#fff)!important;
  border-color:var(--dashboard-border,#dfe6f0)!important;
  box-shadow:0 1px 3px rgba(14,33,102,.055)!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v12-view-switch>button.task-v12-view-tab:focus-visible{
  outline:2px solid var(--dashboard-primary,#0b7ff0)!important;
  outline-offset:2px!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v12-view-switch .task-v5-icon{
  display:grid!important;place-items:center!important;
  flex:0 0 auto!important;width:18px!important;height:18px!important;
  border:0!important;border-radius:0!important;background:none!important;
  color:inherit!important;
}
#task-view #task-v2-root.task-v5 .task-v6-management .task-v12-view-switch .task-v5-icon svg{
  display:block!important;width:18px!important;height:18px!important;
  fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;
  transform:none!important;
}
@media(max-width:1120px){
  #task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>.task-v6-actions{
    margin-left:auto!important;
  }
}
@media(max-width:520px){
  #task-view #task-v2-root.task-v5 .task-v6-management .task-v4-toolbar>.task-v6-actions{
    order:2!important;flex:0 0 auto!important;margin-left:auto!important;
    max-width:100%!important;
  }
  #task-view #task-v2-root.task-v5 .task-v6-management .task-v6-actions>.task-v12-view-switch{
    height:38px!important;min-height:38px!important;
  }
  #task-view #task-v2-root.task-v5 .task-v6-management .task-v12-view-switch>button.task-v12-view-tab{
    height:30px!important;min-height:30px!important;width:33px!important;min-width:33px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  #task-view #task-v2-root.task-v5 .task-v6-management .task-v12-view-switch>button.task-v12-view-tab{
    transition:none!important;
  }
}
