/* ============================================
   Sidebars & Collapsible Panels
   ============================================ */

.sidebar-left,
.sidebar-right {
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.sidebar-right {
    border-right: none;
    border-left: 1px solid var(--border);
}

.sidebar-left.collapsed,
.sidebar-right.collapsed {
    width: 0;
    min-width: 0;
    opacity: 0;
    pointer-events: none;
}

.sidebar-content {
    padding: 24px;
    min-width: var(--sidebar-width);
}

/* Panel Toggle Buttons */
.panel-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 60px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    z-index: 10;
}

.panel-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.panel-toggle.left {
    right: -12px;
}

.panel-toggle.right {
    left: -12px;
}

/* Collapsed Panel Tabs */
.panel-tab {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.panel-tab.left {
    left: 10px;
}

.panel-tab.right {
    right: 10px;
}

.tab-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

.tab-button:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: scale(1.05);
}

.tab-button span:first-child {
    font-size: 20px;
}

/* Bob's Analysis Section */
.bob-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.bob-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.bob-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-sm);
}

.bob-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.bob-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
}

.bob-recommendation {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.recommendation-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-dot.warning {
    background: var(--warning);
}

.status-dot.danger {
    background: var(--danger);
}

.bob-insights {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    border-left: 3px solid var(--border);
    transition: all 0.2s ease;
}

.insight-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--border);
    color: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-tertiary);
}

/* Details Panel */
.details-header {
    margin-bottom: 20px;
}

.details-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.details-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-section {
    padding-bottom: 20px;
}

.detail-section:last-child {
    padding-bottom: 0;
}

.detail-section h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
}

.health-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.health-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--primary-light));
    transition: width 0.3s ease;
}

.health-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.focus-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.risk-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.risk-list li {
    padding: 10px 12px;
    background: rgba(255, 107, 107, 0.1);
    border-left: 3px solid var(--danger);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    position: relative;
    padding-left: 28px;
}

.risk-list li::before {
    content: '⚠️';
    position: absolute;
    left: 8px;
}

.recommendation-box {
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    border-left: 3px solid var(--primary);
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-item {
    padding: 8px 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
}

/* Agent Conversation */
.conversation-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.conversation-message {
    padding: 10px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--border);
}

.conversation-message.msg-engineer {
    background: rgba(81, 207, 102, 0.1);
    border-left-color: var(--success);
}

.conversation-message.msg-agent {
    background: rgba(74, 144, 226, 0.1);
    border-left-color: #4A90E2;
}

.conversation-message.msg-bob {
    background: rgba(255, 107, 107, 0.1);
    border-left-color: var(--primary);
}

.conversation-message.msg-decision {
    background: rgba(255, 169, 77, 0.1);
    border-left-color: var(--warning);
}

.conversation-message.msg-test {
    background: rgba(138, 43, 226, 0.1);
    border-left-color: #8A2BE2;
}

.msg-role {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.msg-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.empty-state {
    padding: 20px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12px;
    font-style: italic;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.empty-state.positive {
    color: var(--success);
    background: rgba(81, 207, 102, 0.1);
    font-style: normal;
}

/* Context Memory */
.context-memory {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.memory-section {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.memory-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.memory-item {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 4px;
}

.memory-item.stale {
    color: var(--text-tertiary);
    text-decoration: line-through;
    opacity: 0.7;
}

/* Made with Bob */
