/* ── Sidebar ────────────────────────────────────────────── */
.sidebar { width: 200px; min-width: 200px; background: #161b22; border-right: 1px solid #30363d; display: flex; flex-direction: column; transition: width 0.22s ease, min-width 0.22s ease; overflow: hidden; position: relative; flex-shrink: 0; }
.sidebar.collapsed { width: 36px; min-width: 36px; }
#sidebar-toggle { position: absolute; top: 12px; right: 8px; background: none; border: none; color: #8b949e; font-size: 13px; cursor: pointer; padding: 2px 4px; border-radius: 4px; line-height: 1; z-index: 1; transition: transform 0.22s; }
#sidebar-toggle:hover { color: #e0e0e0; background: #21262d; }
.sidebar.collapsed #sidebar-toggle { transform: rotate(180deg); right: 6px; }
.sidebar-inner { padding: 12px 0 16px; display: flex; flex-direction: column; gap: 0; opacity: 1; transition: opacity 0.15s; min-width: 200px; overflow-y: auto; }
.sidebar.collapsed .sidebar-inner { opacity: 0; pointer-events: none; }

/* ── Collapsible sections ──────────────────────────────── */
.sidebar-section { border-bottom: 1px solid #21262d; }
.sidebar-section:last-child { border-bottom: none; }
.sidebar-section-toggle { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: none; color: #8b949e; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.7px; padding: 8px 14px; cursor: pointer; transition: color 0.12s; white-space: nowrap; }
.sidebar-section-toggle:hover { color: #c9d1d9; }
.sidebar-section-arrow { font-size: 8px; transition: transform 0.2s ease; display: inline-block; }
.sidebar-section.open .sidebar-section-arrow { transform: rotate(90deg); }
.sidebar-section-body { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.sidebar-section.open .sidebar-section-body { max-height: 800px; }

/* ── Recent items ──────────────────────────────────────── */
.recent-item { display: flex; align-items: center; gap: 8px; padding: 7px 14px; cursor: pointer; border-radius: 0; transition: background 0.12s; }
.recent-item:hover { background: #21262d; }
.recent-item:hover .recent-remove { opacity: 1; }
.recent-sym { font-size: 13px; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-time { font-size: 10px; color: #484f58; white-space: nowrap; }
.recent-remove { background: none; border: none; color: #8b949e; font-size: 14px; cursor: pointer; padding: 0 0 0 2px; opacity: 0; line-height: 1; flex-shrink: 0; transition: opacity 0.1s; }
.recent-remove:hover { color: #f85149; }
.sidebar-clear { margin: 4px 14px 8px; background: none; border: 1px solid #30363d; border-radius: 5px; color: #8b949e; font-size: 11px; padding: 4px 0; cursor: pointer; text-align: center; white-space: nowrap; transition: border-color 0.15s, color 0.15s; }
.sidebar-clear:hover { border-color: #f85149; color: #f85149; }
#recent-list:empty ~ .sidebar-clear { display: none; }
