/* ── Modern sidebar (Handcrafted ShibaClaw Design System) ─────── */
/* Clean, tactile, high-contrast human-made aesthetics using Shiba Gold */

:root {
    --sidebar-width: 264px;
}

.sidebar {
    background: #111113;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
}

/* Header: brand & status row */
.sidebar-header {
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    gap: 10px;
}

.logo {
    gap: 8px;
    min-width: 0;
    align-items: center;
}

.logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.logo-text h1 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    line-height: 1.2;
}

.header-sub-row {
    margin-top: 2px;
    gap: 6px;
    align-items: center;
}

.version {
    font-size: 10px;
    font-weight: 500;
    padding: 1px 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.version:hover {
    color: var(--shiba-gold);
    background: var(--shiba-gold-dim);
    border-color: rgba(232, 163, 23, 0.25);
}

.status-micro {
    font-size: 10px;
    padding: 1px 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--text-muted);
}

.status-micro .status-text {
    font-size: 10px;
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-restart {
    padding: 2px;
    opacity: 0.6;
    border-radius: 4px;
    transition: opacity var(--transition-fast), color var(--transition-fast);
}

.btn-restart:hover {
    opacity: 1;
    color: var(--shiba-gold);
}

.btn-restart .material-icons-round {
    font-size: 14px;
}

/* Action: + New Session */
.sidebar-actions {
    padding: 8px 12px 6px;
}

.btn-action.btn-new-chat {
    padding: 8px 12px;
    border: 1px solid rgba(232, 163, 23, 0.22);
    border-radius: 7px;
    background: rgba(232, 163, 23, 0.08);
    color: var(--shiba-gold);
    font-size: 13px;
    font-weight: 500;
    justify-content: flex-start;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-action.btn-new-chat:hover {
    background: rgba(232, 163, 23, 0.16);
    border-color: rgba(232, 163, 23, 0.4);
    color: var(--shiba-gold-light);
}

.btn-action.btn-new-chat:active {
    background: rgba(232, 163, 23, 0.24);
}

.btn-action.btn-new-chat .material-icons-round {
    font-size: 16px;
    color: var(--shiba-gold);
}

/* Tools: compact icon rail */
.sidebar-section.tools-section {
    padding: 4px 12px 8px;
}

.sidebar-section.tools-section .section-title {
    display: none;
}

.sidebar-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-tools .btn-command {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 7px 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    justify-content: center;
    gap: 0;
    font-size: 0;
    line-height: 0;
    position: relative;
    transition: all 120ms ease;
}

.sidebar-tools .btn-command .material-icons-round {
    font-size: 17px;
    margin: 0;
}

.sidebar-tools .btn-command:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.sidebar-tools .btn-command.active,
.sidebar-tools .btn-command:active {
    background: rgba(232, 163, 23, 0.12);
    color: var(--shiba-gold);
}

.sidebar-tools .automation-badge-mini {
    position: absolute;
    top: 4px;
    right: calc(50% - 14px);
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 9px;
    line-height: 14px;
    border-radius: 999px;
}

/* History & Sessions focus */
.sidebar-section.history-section {
    padding: 0 10px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.history-section-head {
    background: #111113;
    padding: 10px 2px 8px;
}

.history-section .section-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 4px;
}

.session-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.session-search {
    padding: 6px 10px 6px 28px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-primary);
    font-size: 12px;
    transition: all 120ms ease;
}

.session-search::placeholder {
    color: var(--text-muted);
}

.session-search:focus {
    border-color: rgba(232, 163, 23, 0.4);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 0 0 2px rgba(232, 163, 23, 0.1);
    outline: none;
}

.session-search-icon {
    left: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.history-list {
    gap: 2px;
    padding-bottom: 6px;
}

/* Channel group headers */
.channel-group-header {
    padding: 6px 8px;
    margin: 8px 0 2px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-radius: 5px;
    transition: all 120ms ease;
}

.channel-group-header:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
}

.channel-group-header .group-count {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.5px 5px;
    margin-left: 6px;
    font-size: 10px;
    border-radius: 10px;
    color: var(--text-muted);
}

.channel-group-items {
    gap: 2px;
    overflow: visible;
}

.channel-group-items.collapsed {
    overflow: hidden;
}

/* Session rows */
.history-item {
    padding: 7px 10px;
    margin-bottom: 1px;
    border-radius: 6px;
    border: 1px solid transparent;
    gap: 8px;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.history-item.has-active-dropdown {
    position: relative;
    z-index: 100 !important;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.02);
}

.history-item.active {
    background: rgba(232, 163, 23, 0.09);
    border-color: rgba(232, 163, 23, 0.22);
    box-shadow: inset 3px 0 0 0 var(--shiba-gold);
    color: var(--text-primary);
}

.history-item.active .session-name {
    color: var(--text-primary);
    font-weight: 600;
}

.session-name {
    font-size: 12.5px;
    font-weight: 450;
    color: #d8d8d8;
}

.session-subline {
    margin-top: 2px;
    gap: 4px;
}

.session-subline .ob-badge,
.session-channel-tag {
    display: none;
}

.session-meta {
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.85;
}

.btn-session-menu {
    opacity: 0;
    width: 24px;
    height: 24px;
    transition: opacity 120ms ease;
}

.history-item:hover .btn-session-menu,
.history-item.active .btn-session-menu {
    opacity: 0.7;
}

/* Workspace summary */
.workspace-summary-section {
    padding: 8px 12px 6px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    gap: 3px;
    display: flex;
    flex-direction: column;
}

.workspace-summary-section .summary-row {
    padding: 2px 0;
    font-size: 11px;
    color: var(--text-muted);
    gap: 6px;
}

.workspace-summary-section .summary-row strong {
    color: var(--text-secondary);
    font-weight: 500;
}

.workspace-summary-section .status-dot {
    width: 6px;
    height: 6px;
}

/* Footer */
.sidebar-footer {
    padding: 8px 12px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    gap: 6px;
}

.footer-actions {
    gap: 4px;
}

.footer-actions .btn-command {
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 120ms ease;
}

.footer-actions .btn-command:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.08);
}

.footer-info {
    font-size: 10px;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    opacity: 0.8;
}

.sidebar > .sidebar-section:not(.history-section):not(.workspace-summary-section) .btn-command {
    padding: 7px 8px;
    border-radius: 6px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.sidebar > .sidebar-section:not(.history-section):not(.workspace-summary-section) .btn-command:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

