/* ===== The left sidebar in EG PM's look (Jose 2026-11-24: after the agenda, My page and Notes,
   "update the sidebar too", Direct reports and Non-direct reports included).
   Restyle only, the same approach as the agenda (#882), My page (#883) and Notes (#884): every
   rule is under #sidebar. The top bar, "+ New note" and every page are untouched. Layout,
   sections, order, text, counts, collapse state and behaviour are unchanged; no JS. Paddings,
   font sizes, line heights and borders keep their widths, so no row moves or changes height
   and the main content keeps its left edge. Loaded last so equal-specificity rules win.
   Tokens: the shared EG PM block in oneonone.css ("Agenda in EG PM's look: tokens"), which now
   also covers #sidebar, plus its --ag-nav-* tokens (rail #f6f7f8, hover / active #eef0f2, row
   text #31353c). EG PM's own left nav, matched: grey rail with a hairline, system font, ink
   rows, uppercase tracked section labels, the active row on a grey fill with a 2px teal bar on
   its left edge (an inset box-shadow, so no size change), counts as teal numbers. Light
   neutrals apply only in light; dark keeps EG Hub's dark rail and uses the dark-tuned teal. */

/* Tokens style.css builds from --accent etc. at :root resolve there (indigo), so say them again
   here, where the EG PM values are in scope. Anything else in the sidebar that reads them (the
   touch-screen active row, the drag-over outline) follows. */
#sidebar {
  --section-label: var(--text-muted); --text-faint: var(--text-muted);
  --row-hover: var(--ag-nav-hover); --row-active: var(--ag-nav-active); --nav-active-text: var(--text);
  --badge-bg: transparent;
  --avatar-bg: var(--ag-avatar-bg); --avatar-fg: var(--ag-avatar-fg);
  --btn-secondary-border: var(--ag-line-strong);
  background: var(--ag-nav-bg);
  border-right-color: var(--border);
  color: var(--text);
}

/* ---- Brand + account ---- */
#sidebar .sidebar-header { border-bottom-color: var(--border); }
#sidebar .brand-kicker { color: var(--ag-brand-fg); }
#sidebar .brand-title { font-family: inherit; font-weight: 700; letter-spacing: -.022em; color: var(--text); }
#sidebar .whoami-btn { background: var(--ag-avatar-bg); color: var(--ag-avatar-fg); border-color: var(--ag-brand-line); }
#sidebar .whoami-menu {
  background: var(--ag-card-bg); border-color: var(--ag-card-line); border-radius: 8px;
  box-shadow: 0 6px 16px rgba(15,17,20,.10);
}
#sidebar .whoami-email { color: var(--text-muted); border-bottom-color: var(--ag-card-line); }
#sidebar .whoami-logout { color: var(--text); }
#sidebar .whoami-logout:hover { background: var(--ag-nav-hover); }

/* ---- Search: a bordered white EG PM field with the teal focus ring ---- */
#sidebar .sidebar-search { border-bottom-color: var(--border); }
#sidebar .sidebar-search input { background: var(--ag-card-bg); border-color: var(--ag-line-strong); color: var(--text); }
#sidebar .sidebar-search input::placeholder { color: var(--ag-ink-4); }
#sidebar .sidebar-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ag-ring); }

/* ---- Section labels: EG PM's uppercase tracked label in ink-500 ---- */
#sidebar .nav-title { color: var(--text-muted); letter-spacing: .12em; }
#sidebar .nav-subtitle { color: var(--text-dim); }
#sidebar .nav-gear, #sidebar .nav-add-person { color: var(--ag-ink-4); }
#sidebar .nav-gear:hover, #sidebar .nav-add-person:hover { background: var(--ag-nav-hover); color: var(--text); }

/* ---- Rows: ink text, grey icons; hover = grey fill; active = grey fill + teal bar ---- */
#sidebar .nav-item, #sidebar .nav-list > a { color: var(--ag-nav-fg); }
#sidebar .nav-item::before, #sidebar .nav-list > a::before { background: var(--text-muted); opacity: .8; }
/* Mouse only: on touch screens style.css keeps hover inert so one tap opens a row. */
@media (hover: hover) {
  #sidebar .nav-item:hover, #sidebar .nav-list > a:hover { background: var(--ag-nav-hover); color: var(--text); }
}
#sidebar .nav-item.active, #sidebar .nav-list > a.active {
  background: var(--ag-nav-active); color: var(--text); font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}
#sidebar .nav-item.active::before, #sidebar .nav-list > a.active::before { background: currentColor; opacity: 1; }

/* ---- Counts: teal numbers, as in EG PM's nav (same box, so nothing shifts) ---- */
#sidebar .count:not(.count-alert),
#sidebar .nav-item.active .count:not(.count-alert),
#sidebar .nav-list > a.active .count:not(.count-alert) { background: transparent; color: var(--accent); }

/* ---- Direct / Non-direct Reports rows: remove "x" and the drop target ---- */
#sidebar .nav-person-del { background: var(--ag-card-bg); color: var(--ag-ink-4); box-shadow: inset 0 0 0 1px var(--ag-line-strong); }
#sidebar .nav-person-del:hover { background: var(--danger); color: #fff; box-shadow: none; }
#sidebar .nav-list.person-bucket.bucket-drag-over { background: var(--ag-brand-bg); }

/* ---- Appearance switch: bordered white track, teal "on" chip (the Notes filters' on state) ---- */
#sidebar .theme-switch { background: var(--ag-card-bg); border-color: var(--ag-line-strong); }
#sidebar .theme-switch button { font-family: inherit; color: var(--text-muted); }
@media (hover: hover) {
  #sidebar .theme-switch button:not(.on):hover { color: var(--text); }
}
#sidebar .theme-switch button.on {
  background: var(--ag-brand-bg); color: var(--ag-brand-fg); box-shadow: inset 0 0 0 1px var(--ag-brand-line);
}
