/* Scope: existing task sidebar, archive page and its navigation-only overlays. */
.task-navigation.sidebar { width: 280px; min-height: 0; padding: 22px 12px 12px; }
.task-navigation .brand { padding: 0 8px 22px; gap: 10px; }
.task-navigation .brand strong { white-space: nowrap; }
.task-navigation .history-search { margin: 12px 0 8px; }
.task-navigation .history { min-height: 0; padding: 2px 2px 12px; scrollbar-width: thin; }
.task-nav-group { margin-bottom: 16px; }
.task-nav-group-title { border: 0; background: transparent; width: 100%; justify-content: flex-start; color: #666; font-size: 13px; min-height: 32px; padding: 4px 8px; gap: 8px; }
.task-nav-group-title>.wi { width: 13px; height: 13px; }
.task-nav-group-title[aria-expanded=false]>.wi { transform: rotate(-90deg); }
.task-nav-group-title>span { margin-left: auto; }
.task-nav-row { display: flex; align-items: center; position: relative; min-width: 0; border-radius: 7px; margin: 2px 0; }
.task-nav-row:hover,.task-nav-row:focus-within { background: #ededed; }
.task-nav-row.active { background: #e8e8e8; }
.task-navigation .history-task { flex: 1; min-width: 0; padding: 8px; gap: 8px; background: transparent; border: 0; border-radius: 7px; min-height: 60px; align-items: flex-start; }
.task-navigation .history-task>span { display: block; min-width: 0; }
.task-navigation .history-task>.wi { width: 16px; height: 16px; margin-top: 3px; flex: 0 0 16px; }
.task-nav-name { display: block; font-size: 14px; line-height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-navigation .history-task small { font-size: 13px; line-height: 21px; margin-top: 1px; white-space: normal; }
.task-nav-actions { display: none; align-items: center; gap: 2px; padding-right: 4px; flex-shrink: 0; }
.task-nav-row:hover .task-nav-actions,.task-nav-row:focus-within .task-nav-actions,.task-nav-row.active .task-nav-actions { display: flex; }
.task-nav-icon { display: inline-flex; width: 30px; height: 30px; min-height: 30px; padding: 6px; border: 1px solid transparent; border-radius: 6px; background: #fff; align-items: center; justify-content: center; flex-shrink: 0; gap: 0; }
.task-nav-icon>.wi { width: 16px; height: 16px; flex-shrink: 0; margin: 0; }
.task-nav-icon:hover { border-color: #aaa; }
.task-nav-icon.is-pinned>.wi { fill: #ddd; }
.task-nav-disabled { display: inline-flex; align-items: center; }
.task-nav-row:has(.task-nav-disabled) .task-nav-actions { display: flex; }
.task-nav-empty,.task-nav-results { padding: 8px 10px; font-size: 13px; color: #666; }
.task-nav-search-scope { display: flex; align-items: center; gap: 6px; font-size: 14px; padding: 0 6px 12px; }
.task-nav-search-scope[hidden],[id^=task-group-][hidden],#task-navigation-tip[hidden] { display: none; }
.task-nav-search-scope input { flex-shrink: 0; }
.task-nav-archived-label { position: absolute; bottom: 4px; right: 4px; font-size: 12px; color: #666; background: #f7f7f7; }
.task-navigation .task-nav-archive-link { padding: 8px 10px; min-height: 40px; }
.task-nav-archive-link.active,.task-nav-archive-link:hover { background: #e9e9e9; }
.task-nav-archive-link .wi { width: 18px; height: 18px; }
.task-nav-number { margin-left: auto; font-size: 13px; color: #666; }
.task-nav-close,.task-nav-account { display: none; }
.task-nav-account-menu { position: fixed; inset: auto auto 60px 12px; margin: 0; padding: 12px; width: 254px; border: 1px solid #ccc; border-radius: 8px; background: #fff; color: #171717; box-shadow: 0 8px 24px #0002; }
.task-nav-account-menu button { display: flex; justify-content: flex-start; width: 100%; margin-top: 8px; }
.task-nav-banner { margin: 16px 24px; padding: 16px; border: 1px solid #ddd; border-left: 3px solid #555; border-radius: 6px; background: #fafafa; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.task-nav-banner p { margin-top: 4px; }
.task-nav-banner button { flex-shrink: 0; }
.task-archives { max-width: 1100px; margin: 0 auto; }
.task-archives .heading { margin-bottom: 16px; }
.task-archives>input { width: min(420px,100%); margin: 20px 0; }
#task-archive-list { border-top: 1px solid #ddd; }
.task-archive-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid #eee; }
.task-archive-row>div { flex: 1; min-width: 0; }
.task-archive-name { text-align: left; border: 0; padding: 0; justify-content: flex-start; overflow-wrap: anywhere; }
.task-archive-row p { margin-top: 4px; }
.task-archive-row>.task-nav-icon { width: 36px; height: 36px; }
#task-navigation-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); width: max-content; z-index: 1001; border: 1px solid #ccc; border-radius: 8px; box-shadow: 0 8px 30px #0002; background: #fff; color: #171717; padding: 10px 12px 10px 16px; display: flex; gap: 12px; align-items: center; font-size: 14px; }
#task-navigation-toast>span { overflow-wrap: anywhere; }
#task-navigation-toast>button { flex-shrink: 0; }
#task-navigation-tip { position: fixed; z-index: 100; width: max-content; max-width: 340px; padding: 14px 16px; background: #fff; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 8px 24px #0001; pointer-events: none; overflow-wrap: anywhere; }
#task-navigation-tip p { margin-top: 6px; color: #666; font-size: 13px; }
@media (max-width:900px) {
  .task-navigation.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(320px,calc(100vw - 40px)); transform: translateX(-100%); visibility: hidden; z-index: 16; }
  .sidebar-open .task-navigation.sidebar { transform: none; visibility: visible; }
  .sidebar-open .mobile-scrim { display: block; position: fixed; inset: 0; z-index: 15; background: #0005; border: 0; border-radius: 0; }
  .workspace-header .mobile-toggle { display: inline-flex; min-width: 44px; min-height: 44px; }
  .task-nav-close { display: inline-flex; margin-left: auto; width: 44px; min-height: 44px; height: 44px; }
  .task-nav-actions { display: flex; }
  .task-nav-actions .task-nav-icon { width: 44px; height: 44px; min-height: 44px; }
  .task-navigation .history-task { padding-top: 12px; padding-bottom: 12px; }
  .task-navigation .task-nav-archive-link { min-height: 44px; }
  .task-nav-banner { margin: 12px 16px; flex-wrap: wrap; }
  #task-navigation-tip { display: none; }
  .task-archive-row>.task-nav-icon { width: 44px; min-height: 44px; height: 44px; }
  .task-navigation .history-search input { font-size: 16px!important; }
}
@media (pointer:coarse) { .task-nav-actions { display: flex; } .task-nav-actions .task-nav-icon { width: 44px; min-height: 44px; height: 44px; } .task-navigation .side-link { min-height: 44px; } }
@media (max-height:650px) { .task-navigation.sidebar { padding-top: 12px; } .task-navigation .brand { padding-bottom: 12px; } .task-navigation .account { padding-top: 6px; margin-top: 4px; } }
@media (max-height:500px) {
  .task-navigation.sidebar { padding-top: 8px; padding-bottom: 8px; }
  .task-navigation .brand { padding-bottom: 4px; }
  .task-navigation .brand small { display: none; }
  .task-navigation .history-search { margin: 4px 0; }
  .task-navigation .side-bottom>.side-link:not(.task-nav-archive-link),.task-navigation .account,.task-navigation .admin-navigation { display: none; }
  .task-nav-account { display: flex; width: 100%; justify-content: space-between; margin-top: 4px; }
  .task-navigation .history { padding-bottom: 4px; }
}
