.sidebar { width: 260px; flex-shrink: 0; padding: 16px; display: flex; flex-direction: column; gap: 20px; background: var(--page); }
.top-menu { display: flex; align-items: center; }
.icon-btn { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px; border: 0; border-radius: 5px; background: transparent; color: var(--text); text-decoration: none; font-size: 14px; }
.icon-btn:hover { background: var(--soft); }
.new-chat-btn { display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 48px; border: 1px solid var(--accent); border-radius: 5px; background: var(--accent); color: var(--on-accent); font-size: 14px; text-align: left; }
.new-chat-btn:hover { text-decoration: underline; }
.recent-history { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.history-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; margin: 0 0 12px 10px; }
.recent-history ul { list-style: none; padding: 0; margin: 0; }
.recent-history li { display: flex; align-items: center; gap: 4px; position: relative; padding: 4px; margin-bottom: 4px; border-radius: 5px; }
.recent-history li:hover, .recent-history li.is-active { background: var(--soft); }
.chat-title-wrapper { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; color: var(--text); font-size: 13px; text-align: left; padding: 6px; }
.chat-title-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.options-wrapper { position: relative; }
.kebab-btn { display: grid; place-items: center; width: 36px; min-height: 44px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); }
.kebab-btn:hover { color: var(--text); }
.dropdown-menu { display: none; position: absolute; z-index: 5; right: 0; top: 100%; min-width: 150px; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 4px; }
.dropdown-menu.show { display: block; }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--text); font-size: 13px; text-align: left; padding: 10px; }
.menu-item:hover { background: var(--soft); }
.delete-opt { color: var(--danger); }
.bottom-menu { border-top: 1px solid var(--border); padding-top: 14px; }
.sidebar-note { color: var(--muted); font-size: 11px; padding: 0 10px; margin-bottom: 0; }
@media (min-width: 769px) { .sidebar.collapsed { width: 76px; padding: 16px 10px; } .sidebar.collapsed .new-chat-btn { padding: 12px; justify-content: center; } .sidebar.collapsed .new-chat-btn span:nth-child(2), .sidebar.collapsed .recent-history, .sidebar.collapsed .sidebar-note { display: none; } .sidebar.collapsed .bottom-menu { margin-top: auto; } .sidebar.collapsed .bottom-menu .icon-btn { font-size: 0; justify-content: center; gap: 0; } }
@media (max-width: 768px) { .sidebar { display: none; position: fixed; z-index: 10; left: 8px; top: 74px; bottom: max(8px, env(safe-area-inset-bottom)); width: min(300px, calc(100% - 16px)); border: 1px solid var(--border); border-radius: 6px; box-shadow: 6px 6px 0 var(--border); } .sidebar.mobile-open { display: flex; } }