/* V1.6.15: visual and interaction polish. Loaded after layout-stability.css.
   Only theme presentation changes here; no density or connector geometry changes. */
:root{--task-blue-from:#dbe9f9;--task-blue-to:#eef5fc}
/* Profile image is derived from the exact user-provided transparent artwork.
   Separate dark/light PNGs preserve the original silhouette and alpha. */
.avatar-default,
html:not([data-theme="dark"]) .avatar-default{
  background-image:url('/static/avatar-default-light.png')!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:88% 88%!important;
  background-color:#e2e8ef!important;
  color:transparent!important;
  overflow:hidden;
}
html[data-theme="dark"] .avatar-default{
  background-image:url('/static/avatar-default-dark.png')!important;
  background-color:#26384a!important;
  color:transparent!important;
  border-color:#607488!important;
}
.profile-avatar.avatar-default{border-color:#d0dae5!important;box-shadow:0 6px 24px rgba(35,55,78,.12)}
html[data-theme="dark"] .profile-avatar.avatar-default{border-color:#56687b!important}
.department-org-avatar.avatar-default{background-color:var(--org-surface)!important}
html[data-theme="dark"] .department-org-avatar.avatar-default{background-color:#253d33!important}
/* Keep the 30/32px navigation row height; increase text by 1px only. */
.sidebar nav a{font-size:13px!important;line-height:1.14!important;min-height:32px!important;padding:4px 7px!important;display:flex;align-items:center;gap:7px;white-space:nowrap}
.sidebar nav a .nav-icon{flex:none;width:20px;height:20px}
.sidebar nav a .ui-icon{width:17px;height:17px}
.sidebar nav a[data-nav-context]{cursor:context-menu}
.sidebar nav a[data-nav-context]:focus-visible{outline:2px solid #458ee2;outline-offset:-2px}
@media(max-width:900px){.sidebar nav a{min-width:max-content}}
/* Softer light theme: gray-blue material with stronger ink, accent and border contrast. */
html:not([data-theme="dark"]){--bg:#e9edf2;--panel:#f2f4f7;--ink:#24364d;--muted:#52637a;--line:#c7d0dc;--blue:#1c58a9;color-scheme:light;background-color:#e9edf2!important}
html:not([data-theme="dark"]) body{background:linear-gradient(145deg,#e7ebf1 0%,#edf0f4 56%,#e5ebf0 100%)!important;color:var(--ink)!important}
html:not([data-theme="dark"]) .signed-in header{background:linear-gradient(130deg,#f0f3f7,#e8edf3)!important;border:1px solid #c9d3df!important}
html:not([data-theme="dark"]) :is(.workspace-grid-page,.task-canvas){background-color:#e9eef4!important;background-image:linear-gradient(rgba(42,78,132,.085) 1px,transparent 1px),linear-gradient(90deg,rgba(42,78,132,.085) 1px,transparent 1px)!important}
html:not([data-theme="dark"]) :is(.signed-in main .panel,.workspace-task-panel,.task-branches,.task-meta-strip,.task-description-card,.task-people-card,.task-files-card,.dashboard-hero,.modern-toolbar,.workspace-toolbar){background-color:#f2f4f7!important;border-color:#cbd4df!important;color:#25374d!important}
html:not([data-theme="dark"]) :is(.signed-in main .panel,.dashboard-hero,.workspace-toolbar){box-shadow:0 5px 20px rgba(45,65,85,.065)!important}
html:not([data-theme="dark"]) :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select,.picker-toggle){background-color:#fafbfd!important;color:#25374c!important;border-color:#b9c6d5!important}
html:not([data-theme="dark"]) :is(.muted,small,.hint){color:#4e6075}
html:not([data-theme="dark"]) :is(.button.soft,.soft){background:#e4e9f0!important;border-color:#bfcbd9!important;color:#234b75!important}
html:not([data-theme="dark"]) :is(.sidebar,.company-label){filter:none}
html:not([data-theme="dark"]) .sidebar{background:linear-gradient(180deg,#e7edf5,#dce6f0)!important}
/* Six task tones are semantic and deterministic. Status -> tone lives in app.py. */
[data-task-tone="blue"],[data-update-tone="blue"]{--tone-1:#dae9fa;--tone-2:#eef5fd;--tone-stroke:#779bc7;--tone-ink:#203f66}
[data-task-tone="burgundy"],[data-update-tone="burgundy"]{--tone-1:#eddae5;--tone-2:#f7eef2;--tone-stroke:#ae7798;--tone-ink:#542b44}
[data-task-tone="red"],[data-update-tone="red"]{--tone-1:#f4dbdd;--tone-2:#fcf0ee;--tone-stroke:#b97278;--tone-ink:#672b32}
[data-task-tone="green"],[data-update-tone="green"]{--tone-1:#d8ebe0;--tone-2:#eff7f0;--tone-stroke:#6f9e83;--tone-ink:#214d38}
[data-task-tone="gray"],[data-update-tone="gray"]{--tone-1:#e0e5eb;--tone-2:#f1f3f6;--tone-stroke:#939fad;--tone-ink:#38475a}
[data-task-tone="orange"],[data-update-tone="orange"]{--tone-1:#f7e4d0;--tone-2:#fcf1e5;--tone-stroke:#c99a63;--tone-ink:#65451f}
/* Stronger selector than original activity-recent/closed rules, preserving row grid. */
html:not([data-theme="dark"]) :is(.workspace-task-item[data-task-tone]>.workspace-task-row,.task-board article[data-task-tone]>.task-row,.project-task-table article[data-task-tone]>.task-table-row,.task-table-row[data-task-tone]){
 background:linear-gradient(115deg,var(--tone-1),var(--tone-2))!important;
 border:1px solid var(--tone-stroke)!important;border-left:4px solid var(--tone-stroke)!important;color:var(--tone-ink)!important;
}
html:not([data-theme="dark"]) :is(.workspace-task-item[data-task-tone]>.workspace-task-row,.task-board article[data-task-tone]>.task-row,.project-task-table article[data-task-tone]>.task-table-row,.task-table-row[data-task-tone]) :is(.task-name strong,.task-name small,.last-actor){color:var(--tone-ink)!important}
html:not([data-theme="dark"]) .task-branches .branch-event[data-update-tone]>.branch-card{
 background:linear-gradient(112deg,var(--tone-1),var(--tone-2))!important;border-color:var(--tone-stroke)!important;color:var(--tone-ink)!important;
}
html:not([data-theme="dark"]) .task-branches .branch-event[data-update-tone]>.branch-card :is(h3,time,.event-kind,p,small,strong){color:var(--tone-ink)!important}
/* Match task summary and its status while keeping the original meta strip grid. */
html:not([data-theme="dark"]) .task-canvas[data-task-tone] .task-meta-strip{background:linear-gradient(115deg,var(--tone-1),var(--tone-2))!important;border-color:var(--tone-stroke)!important}
html[data-theme="dark"] [data-task-tone="blue"],html[data-theme="dark"] [data-update-tone="blue"]{--tone-1:#254465;--tone-2:#1a2b42;--tone-stroke:#5d8fbf;--tone-ink:#e5f0ff}
html[data-theme="dark"] [data-task-tone="burgundy"],html[data-theme="dark"] [data-update-tone="burgundy"]{--tone-1:#55324b;--tone-2:#332336;--tone-stroke:#b080a2;--tone-ink:#ffebf5}
html[data-theme="dark"] [data-task-tone="red"],html[data-theme="dark"] [data-update-tone="red"]{--tone-1:#5b3037;--tone-2:#382329;--tone-stroke:#b9767c;--tone-ink:#ffe9eb}
html[data-theme="dark"] [data-task-tone="green"],html[data-theme="dark"] [data-update-tone="green"]{--tone-1:#29513e;--tone-2:#1b362d;--tone-stroke:#75b292;--tone-ink:#e2fbed}
html[data-theme="dark"] [data-task-tone="gray"],html[data-theme="dark"] [data-update-tone="gray"]{--tone-1:#384350;--tone-2:#27323e;--tone-stroke:#8192a4;--tone-ink:#ecf1f6}
html[data-theme="dark"] [data-task-tone="orange"],html[data-theme="dark"] [data-update-tone="orange"]{--tone-1:#60452f;--tone-2:#3d322b;--tone-stroke:#bc9669;--tone-ink:#fff0db}
html[data-theme="dark"] :is(.workspace-task-item[data-task-tone]>.workspace-task-row,.task-board article[data-task-tone]>.task-row,.project-task-table article[data-task-tone]>.task-table-row,.task-table-row[data-task-tone]){
 background:linear-gradient(115deg,var(--tone-1),var(--tone-2))!important;border:1px solid var(--tone-stroke)!important;border-left:4px solid var(--tone-stroke)!important;color:var(--tone-ink)!important;
}
html[data-theme="dark"] :is(.workspace-task-item[data-task-tone]>.workspace-task-row,.task-board article[data-task-tone]>.task-row,.project-task-table article[data-task-tone]>.task-table-row,.task-table-row[data-task-tone]) :is(.task-name strong,.task-name small,.last-actor){color:var(--tone-ink)!important}
html[data-theme="dark"] .task-branches .branch-event[data-update-tone]>.branch-card{
 background:linear-gradient(112deg,var(--tone-1),var(--tone-2))!important;border-color:var(--tone-stroke)!important;color:var(--tone-ink)!important;
}
html[data-theme="dark"] .task-branches .branch-event[data-update-tone]>.branch-card :is(h3,time,.event-kind,p,small,strong){color:var(--tone-ink)!important}
html[data-theme="dark"] .task-canvas[data-task-tone] .task-meta-strip{background:linear-gradient(115deg,var(--tone-1),var(--tone-2))!important;border-color:var(--tone-stroke)!important}
/* Icon hit boxes and overlays must not be clipped on small screens. */
.context-menu{z-index:10000!important;min-width:205px;max-width:min(300px,calc(100vw - 16px))}
.context-menu button{text-align:left;white-space:normal;overflow-wrap:anywhere}
.avatar-remove-form{margin-top:8px}
@media(prefers-reduced-motion:reduce){.workspace-task-item,.task-board article{transition:none!important}}
/* V1.6.14 organization-chart gain is a locked regression contract:
   geometric grid remains visible directly beneath the hierarchy. */
html:not([data-theme="dark"]) .signed-in main .department-tree-panel,
html[data-theme="dark"] .signed-in main .department-tree-panel{
  background:transparent!important;background-color:transparent!important;
  background-image:none!important;border:0!important;box-shadow:none!important;
}
html .signed-in main .department-org-viewport{background:transparent!important}
/* Outrank the high-specificity legacy dark rule using :is(.permission-pills span,.avatar).
   Without this, its `background: ... !important` suppresses the default image. */
html[data-theme="dark"] .avatar-default.avatar-default{
 background-image:url('/static/avatar-default-dark.png')!important;
 background-position:center!important;background-repeat:no-repeat!important;background-size:88% 88%!important;
 background-color:#26384a!important;color:transparent!important;
}
html:not([data-theme="dark"]) .avatar-default.avatar-default{
 background-image:url('/static/avatar-default-light.png')!important;
 background-position:center!important;background-repeat:no-repeat!important;background-size:88% 88%!important;
 background-color:#e2e8ef!important;color:transparent!important;
}

/* V1.6.15.1 HOTFIX: task-update STATUS searchable dropdown.
   visual-system.css dark button gradient previously painted EVERY option blue.
   Keep the selected (but not hovered) item neutral. Highlight only the
   hovered or keyboard-focused option. This changes styling, not choice logic. */
html:not([data-theme="dark"]) .task-branches .search-select-options button.search-select-option,
html:not([data-theme="dark"]) .task-branches .search-select-options button.search-select-option.selected{
  background:transparent!important;
  background-image:none!important;
  color:#24364d!important;
  border-color:transparent!important;
}
html[data-theme="dark"] .task-branches .search-select-options button.search-select-option,
html[data-theme="dark"] .task-branches .search-select-options button.search-select-option.selected{
  background:transparent!important;
  background-image:none!important;
  color:#f1f5fb!important;
  border-color:transparent!important;
}
html:not([data-theme="dark"]) .task-branches .search-select-options button.search-select-option:is(:hover,:focus-visible),
html:not([data-theme="dark"]) .task-branches .search-select-options button.search-select-option.selected:is(:hover,:focus-visible){
  background:#1b58ad!important;
  background-image:none!important;
  color:#fff!important;
}
html[data-theme="dark"] .task-branches .search-select-options button.search-select-option:is(:hover,:focus-visible),
html[data-theme="dark"] .task-branches .search-select-options button.search-select-option.selected:is(:hover,:focus-visible){
  background:#2264bb!important;
  background-image:none!important;
  color:#fff!important;
}
html .task-branches .search-select-options button.search-select-option:focus-visible{
  outline:2px solid #8cbcff!important;
  outline-offset:-2px;
}
