/* Sidebar IA simplify — tighter rows, left-aligned icons (expanded).
   Collapsed rail chrome: logo + expand affordance share one centered slot;
   expand control visible only on logo hover (and keyboard focus). */

/* Expanded (+ shared base): left-aligned labels, tight rows */
html body aside.sidebar#sidebar .sidebar-quick-nav.sidebar-quick-nav--v1929 {
  gap: 0 !important;
  padding: 0 !important;
}
html body aside.sidebar#sidebar .sidebar-quick-nav.sidebar-quick-nav--v1929 .sidebar-quick-item {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 8px 0 10px !important;
  margin: 0 !important;
  gap: 10px !important;
  justify-content: flex-start !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
html body aside.sidebar#sidebar .sidebar-quick-nav.sidebar-quick-nav--v1929 .sidebar-quick-item .sqi-icon,
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-quick-nav.sidebar-quick-nav--v1929 .sidebar-quick-item .sqi-icon {
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Collapsed rail: keep --sidebar-w (62px), drop asymmetric side pad */
html body.sidebar-collapsed aside.sidebar#sidebar {
  width: 62px !important;
  min-width: 62px !important;
  max-width: 62px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
html body.sidebar-collapsed {
  --sidebar-w: 62px;
}

/* Collapsed nav: center icons under the logo slot.
   Dual class on nav beats style.css (1,5,2) lock at ~7303. */
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-quick-nav.sidebar-quick-nav--v1929 {
  align-items: center !important;
  padding: 0 !important;
}
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-quick-nav.sidebar-quick-nav--v1929 .sidebar-quick-item {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  width: 40px !important;
  max-width: 40px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  gap: 0 !important;
  justify-content: center !important;
  display: inline-flex !important;
}
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-quick-nav.sidebar-quick-nav--v1929 .sidebar-quick-item--history #sqi-history-icon {
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  margin: 0 !important;
}

/* ── Collapsed header: logo occupies the only chrome slot ── */
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header.sidebar-header--v1944,
html body.sidebar-collapsed aside.sidebar#sidebar div.sidebar-header.sidebar-header--v1944 {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  margin: 0 0 6px 0 !important;
}

html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 .brand.brand--logo-only,
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 .brand--logo-only {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 1 !important;
  box-sizing: border-box !important;
  gap: 0 !important;
}
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 .brand--logo-only .brand-logo-svg {
  margin: 0 !important;
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
}
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 .brand-logo-wordmark {
  display: none !important;
}

/* Kill Bug 4 side-by-side panel toggle when collapsed — expand is logo hover */
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 #sidebar-collapse-btn.sidebar-collapse-btn--v1944,
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944:hover #sidebar-collapse-btn.sidebar-collapse-btn--v1944,
html body.sidebar-collapsed aside.sidebar#sidebar #sidebar-collapse-btn.sidebar-collapse-btn--v1944 {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Expand affordance overlays the logo — only on logo hover / keyboard focus */
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 .brand--logo-only .brand-expand-arrow {
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  color: var(--brand-blue-pure, #2196F3) !important;
  transition: opacity 140ms ease !important;
  z-index: 2 !important;
}
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 .brand--logo-only .brand-logo-svg {
  transition: opacity 140ms ease !important;
}
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 .brand--logo-only:hover .brand-logo-svg,
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 .brand--logo-only:focus-visible .brand-logo-svg,
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 .brand--logo-only:focus-within .brand-logo-svg {
  opacity: 0 !important;
}
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 .brand--logo-only:hover .brand-expand-arrow,
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 .brand--logo-only:focus-visible .brand-expand-arrow,
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 .brand--logo-only:focus-within .brand-expand-arrow {
  opacity: 1 !important;
}
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-header--v1944 .brand--logo-only:focus-visible {
  outline: 2px solid rgba(33, 150, 243, 0.45) !important;
  outline-offset: 2px !important;
}

/* Expanded: panel toggle stays on the right; never show expand arrow */
html body:not(.sidebar-collapsed) aside.sidebar#sidebar .sidebar-header--v1944 #sidebar-collapse-btn.sidebar-collapse-btn--v1944 {
  display: inline-flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  position: static !important;
  transform: none !important;
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
}
html body:not(.sidebar-collapsed) aside.sidebar#sidebar .sidebar-header--v1944 .brand--logo-only .brand-expand-arrow {
  display: none !important;
  opacity: 0 !important;
}

/* ── Chat history row: match Messages…Predictions icon/label column ──
   style.css forces button#sqi-history { padding: inherit } (nav pad is 0)
   and a 44px #sqi-history-icon column with absolutely positioned clock —
   so the row sits ~10px left of the <a> siblings. Beat both here. */
html body aside.sidebar#sidebar .sidebar-quick-nav.sidebar-quick-nav--v1929 button.sidebar-quick-item--history#sqi-history {
  padding: 0 8px 0 10px !important;
  margin: 0 !important;
  gap: 10px !important;
  justify-content: flex-start !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
}
html body aside.sidebar#sidebar .sidebar-quick-nav.sidebar-quick-nav--v1929 button.sidebar-quick-item--history#sqi-history #sqi-history-icon {
  position: relative !important;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
html body aside.sidebar#sidebar .sidebar-quick-nav.sidebar-quick-nav--v1929 button.sidebar-quick-item--history#sqi-history #sqi-history-icon::before {
  content: none !important;
  display: none !important;
}
html body aside.sidebar#sidebar .sidebar-quick-nav.sidebar-quick-nav--v1929 button.sidebar-quick-item--history#sqi-history #sqi-history-icon .sqi-icon-clock {
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  width: 16px !important;
  height: 16px !important;
  opacity: 1 !important;
  color: inherit !important;
}
html body.sidebar-collapsed aside.sidebar#sidebar .sidebar-quick-nav.sidebar-quick-nav--v1929 button.sidebar-quick-item--history#sqi-history {
  width: 40px !important;
  max-width: 40px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  gap: 0 !important;
  justify-content: center !important;
}
