:root {
    --bg-main: #FAFAF8;
    --bg-card: #FFFFFF;
    --accent-orange: #E8863A;
    --accent-green: #4CAF50;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --text-muted: #999999;
    --border-light: #eee;
    --border-subtle: #f0f0f0;
    --tag-bg: #F0F0F0;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
    --bg-main: #111111;
    --bg-card: #1E1E1E;
    --text-primary: #FFFFFF;
    --text-secondary: #AAAAAA;
    --text-muted: #666666;
    --border-light: #333333;
    --border-subtle: #222222;
    --tag-bg: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    min-width: 1400px;
    overflow-x: auto;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-main);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.5px;
    transition: opacity 0.15s ease;
}

.logo:hover {
    opacity: 0.7;
}

.logo:hover .logo-icon {
    animation: logo-spin 0.4s ease;
}

@keyframes logo-spin {
    0%   { transform: rotate(0deg) scale(1); }
    50%  { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.logo-icon {
    font-size: 18px;
    color: var(--accent-orange);
}

.badge-site {
    border: 1px solid var(--border-light);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-family: monospace;
    background: var(--bg-card);
}

.header-center {
    display: flex;
    align-items: center;
    gap: 48px;
}

.stat-block {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-top: 4px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-docs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-card);
    font-family: inherit;
}

.btn-docs:hover {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
}

.btn-manual {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-card);
    font-family: inherit;
}

.btn-manual:hover {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
}

.btn-office {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-card);
    font-family: inherit;
    transition: all 0.15s ease;
}

.btn-office:hover {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    background: var(--bg-card);
    margin-right: 8px;
}

.theme-toggle:hover {
    background: var(--tag-bg);
}

.time-block {
    text-align: right;
}

.time-display {
    font-size: 20px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.date-display {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

#connectionStatus {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #e8f5e9;
    color: var(--accent-green);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
}

/* Main Layout */
.main-container {
    display: flex;
    height: calc(100vh - 81px);
}

/* Left Panel - Agents */
.panel-agents {
    width: 240px;
    min-width: 240px;
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
}

.panel-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-light);
}

.panel-header .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-green {
    background: var(--accent-green);
}

.dot-orange {
    background: var(--accent-orange);
}

.count-badge {
    background: var(--tag-bg);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    margin-left: auto;
}

.agents-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.agent-item {
    display: flex;
    align-items: center;
    padding: 10px 17px 10px 17px;
    gap: 12px;
    transition: background 0.15s, border-color 0.15s;
    border-left: 3px solid transparent;
}

.agent-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.agent-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.agent-info {
    flex: 1;
    min-width: 0;
}

.agent-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.agent-name {
    font-size: 13px;
    font-weight: 600;
}

.role-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

.role-lead {
    background: var(--accent-orange);
    color: white;
}

.role-int {
    background: #2196F3;
    color: white;
}

.role-spc {
    background: var(--accent-green);
    color: white;
}

.agent-role {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.agent-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 1px;
}

.agent-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
}

.agent-status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
/* Agent Status - Enhanced indicators (Forge - Task b7fecf27) */
.agent-status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid var(--panel-bg, #fff);
    flex-shrink: 0;
}

.agent-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    flex-wrap: wrap;
}

.agent-last-seen {
    font-size: 10px;
    color: var(--text-muted);
}

.agent-avail-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.agent-available {
    background: rgba(72, 199, 116, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(72, 199, 116, 0.3);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.agent-workload {
    background: rgba(90, 150, 230, 0.12);
    color: #5a96e6;
    border: 1px solid rgba(90, 150, 230, 0.25);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.agent-avatar-wrap {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.agent-offline-warn {
    background: rgba(224, 82, 82, 0.12);
    color: var(--accent-red, #e05252);
    border: 1px solid rgba(224, 82, 82, 0.25);
}

.agent-status-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

.agent-status-label .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-online .agent-status-label {
    color: var(--accent-green);
}

.agent-item.status-online {
    border-left-color: var(--accent-green);
}

.status-idle .agent-status-label {
    color: #f0a500;
}

.agent-item.status-idle {
    border-left-color: #f0a500;
}

.status-offline .agent-status-label {
    color: #999;
}

.status-offline-long .agent-status-label {
    color: var(--accent-red, #e05252);
}

.agent-item.status-offline-long {
    border-left-color: var(--accent-red, #e05252);
}

/* Dark mode adjustments */
[data-theme="dark"] .agent-status-dot {
    border-color: var(--panel-bg, #1a1a2e);
}

[data-theme="dark"] .agent-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .agent-available {
    background: rgba(72, 199, 116, 0.1);
}

[data-theme="dark"] .agent-offline-warn {
    background: rgba(224, 82, 82, 0.1);
}

[data-theme="dark"] .agent-workload {
    background: rgba(90, 150, 230, 0.08);
}
/* End Agent Status enhanced */



/* Right Panel - Live Feed */
.panel-feed {
    width: 360px;
    min-width: 360px;
    border-left: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
}

.feed-filters {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-btn {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn:hover {
    background: var(--tag-bg);
}

.filter-btn.active {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
}

.agent-filters {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
}

.agent-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.agent-filter-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 11px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.agent-filter-btn:hover {
    background: var(--tag-bg);
}

.agent-filter-btn.active {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
}

.agent-filter-btn .mini-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.feed-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px;
}

.feed-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.feed-item:last-child {
    border-bottom: none;
}

.feed-body {
    flex: 1;
    min-width: 0;
}

.feed-text {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    word-break: break-word;
    margin-bottom: 2px;
}

.feed-action {
    color: var(--text-muted);
    font-size: 11.5px;
}

.feed-text a {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
}

.feed-text a:hover {
    text-decoration: underline;
}

.feed-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.feed-details {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-top: 4px;
    word-break: break-word;
}

.feed-details strong {
    color: var(--text-primary);
    font-weight: 600;
}

.feed-details em {
    font-style: italic;
}

.feed-details code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 3px;
    padding: 1px 5px;
    color: var(--accent-orange);
}

/* Rich Feed Styles */
.feed-mention {
    color: var(--accent-orange);
    font-weight: 600;
    background: rgba(232, 134, 58, 0.1);
    padding: 0 4px;
    border-radius: 4px;
}

.feed-tag {
    color: #2196F3;
    font-weight: 500;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--tag-bg);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-light);
}
/* ========================================
   RIGHT PANEL TABS (Feed + Squad Chat)
   ======================================== */

.panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
}

.panel-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.panel-tab:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.02);
}

.panel-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-orange);
}

[data-theme="dark"] .panel-tab:hover {
    background: rgba(255, 255, 255, 0.03);
}

.right-tab-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.chat-unread {
    background: #f44336;
    color: white;
    font-size: 9px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ========================================
   SQUAD CHAT MESSAGES
   ======================================== */

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px;
}

.chat-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 40px 20px;
}

.chat-message {
    display: flex;
    gap: 10px;
    padding: 10px 0;
}

.chat-message + .chat-message {
    border-top: 1px solid var(--border-subtle);
}

.chat-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    margin-top: 1px;
}

.chat-body {
    flex: 1;
    min-width: 0;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.chat-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.chat-badge {
    font-size: 8px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.chat-badge.role-lead { background: var(--accent-orange); color: white; }
.chat-badge.role-spc { background: var(--accent-green); color: white; }
.chat-badge.role-int { background: #2196F3; color: white; }

.chat-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
}

.chat-text {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    word-break: break-word;
}

.chat-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.chat-text em {
    color: var(--text-secondary);
    font-style: italic;
}

.chat-text code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 3px;
    padding: 1px 5px;
    color: var(--accent-orange);
}

.chat-uuid {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 10.5px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    border-radius: 3px;
    padding: 0 3px;
    cursor: help;
    border-bottom: 1px dashed rgba(255,255,255,0.15);
}

.chat-sep {
    color: var(--text-muted);
    font-weight: 400;
    opacity: 0.6;
}
/* ========================================
   DM STYLES
   ======================================== */

.dot-purple {
    background: #9C27B0;
}

.dm-filters {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
}

.dm-message {
    display: flex;
    gap: 10px;
    padding: 8px 0;
}

.dm-message + .dm-message {
    border-top: 1px solid var(--border-subtle);
}

.dm-body {
    flex: 1;
    min-width: 0;
}

.dm-arrow {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 2px;
}

.dm-recipient {
    font-size: 12px;
    font-weight: 600;
}

.dm-unread-badge {
    background: #9C27B0;
    color: white;
    font-size: 9px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
/* ===================================
   Manual Component Styles
   =================================== */

.manual-panel {
    max-width: 900px;
    margin: 0 auto;
}

.manual-header {
    margin-bottom: 20px;
}

.manual-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.manual-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

.manual-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.manual-nav-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.manual-nav-btn:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.manual-nav-btn.active {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
}

.manual-content {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.manual-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    margin-top: 20px;
}

.manual-section h3:first-child {
    margin-top: 0;
}

.manual-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 16px;
    margin-bottom: 8px;
}

.manual-section p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.manual-architecture {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.manual-arch-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.manual-arch-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.manual-arch-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.manual-arch-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

.manual-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 16px;
}

.manual-tag {
    background: var(--tag-bg);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
}

.manual-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 8px 0 16px;
}

.manual-table th {
    text-align: left;
    padding: 8px 12px;
    background: var(--tag-bg);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.manual-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.manual-table code {
    background: var(--tag-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.manual-agents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 12px 0;
}

.manual-agent-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 14px;
}

.manual-agent-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.manual-agent-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.manual-agent-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.manual-agent-role {
    font-size: 11px;
    color: var(--text-secondary);
}

.manual-agent-desc {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.manual-agent-tasks {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.manual-task-pill {
    background: var(--tag-bg);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 10px;
}

.manual-columns {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 12px 0;
}

.manual-col {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 10px;
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.manual-col-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-bottom: 6px;
}

.manual-list {
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-secondary);
    padding-left: 20px;
    margin: 8px 0;
}

.manual-list li {
    margin-bottom: 4px;
}

.manual-tip {
    background: rgba(232, 134, 58, 0.08);
    border-left: 3px solid var(--accent-orange);
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    color: var(--text-secondary);
    margin: 12px 0;
}

.manual-flow {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.manual-flow-step {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
}

.manual-flow-arrow {
    color: var(--accent-orange);
    font-weight: 700;
    font-size: 14px;
}

.manual-code {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
    line-height: 1.6;
    padding: 12px 16px;
    border-radius: 6px;
    overflow-x: auto;
    white-space: pre;
    margin: 8px 0;
}
/* ========================================
   CHAT / DM INPUT AREA
   ======================================== */
.chat-input-area {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-card);
    flex-shrink: 0;
}

.chat-input-select {
    padding: 6px 8px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    min-width: 80px;
    max-width: 100px;
}

.chat-input-field {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input-field:focus {
    border-color: var(--accent-orange);
}

.chat-input-btn {
    padding: 7px 14px;
    border: none;
    border-radius: 6px;
    background: var(--accent-orange);
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.chat-input-btn:hover { opacity: 0.85; }
.chat-input-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.dm-input-area .chat-input-select {
    min-width: 70px;
    max-width: 90px;
}
/* Feed task name when not linked */
.feed-task-name {
    font-weight: 500;
    color: var(--text-primary);
}
