/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0f1117;
    --bg-card: #1a1d27;
    --bg-input: #252830;
    --border: #2e3140;
    --text: #e4e6ed;
    --text-muted: #8b8fa3;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* --- Nav --- */
.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-brand { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.search-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    width: 280px;
    font-size: 0.85rem;
}

/* --- Container --- */
.container { max-width: 1400px; margin: 0 auto; padding: 1.5rem; }

/* --- Workspace layout --- */
.workspace-layout {
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    gap: 1.5rem;
    min-height: calc(100vh - 60px);
}

/* --- Sidebar --- */
.sidebar, .notes-panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid var(--border);
    height: fit-content;
    position: sticky;
    top: 70px;
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.sidebar-header h2, .sidebar-header h3 { font-size: 1rem; }

/* --- Project cards --- */
.project-card {
    display: block;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius);
    margin-bottom: 0.4rem;
    color: var(--text);
    transition: background 0.15s;
}
.project-card:hover { background: var(--bg-input); }
.project-name { font-weight: 500; font-size: 0.9rem; }
.project-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; display: flex; gap: 0.5rem; align-items: center; }

/* --- Buttons --- */
.btn {
    padding: 0.4rem 0.9rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg-input); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.8rem; }

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-private { background: #374151; color: #9ca3af; }
.badge-shared { background: #1e3a5f; color: #60a5fa; }
.badge-team { background: #164e3b; color: #34d399; }

/* --- Capture bar --- */
.capture-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.capture-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.capture-input:focus { border-color: var(--primary); outline: none; }
.capture-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
}

/* --- Sections --- */
.section { margin-bottom: 1.5rem; }
.section h3 { font-size: 0.95rem; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }

/* --- Task rows --- */
.task-list { display: flex; flex-direction: column; gap: 2px; }
.task-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.9rem;
}
.task-row:hover { background: var(--bg-input); }
.task-title { flex: 1; }

/* --- Status tags --- */
.task-status {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
}
.status-inbox { background: #374151; color: #9ca3af; }
.status-clarifying { background: #4c1d95; color: #c4b5fd; }
.status-next_action { background: #1e3a5f; color: #60a5fa; }
.status-in_progress { background: #164e3b; color: #34d399; }
.status-waiting_for { background: #78350f; color: #fbbf24; }
.status-someday_maybe { background: #1f2937; color: #6b7280; }
.status-needs_approval { background: #7c2d12; color: #fb923c; }
.status-needs_review { background: #7c2d12; color: #fb923c; }
.status-completed { background: #064e3b; color: #6ee7b7; }
.status-cancelled { background: #374151; color: #6b7280; text-decoration: line-through; }

/* --- Priority dots --- */
.priority-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.priority-high { background: var(--danger); }
.priority-medium { background: var(--warning); }
.priority-low { background: #6b7280; }

/* --- Context tags --- */
.ctx-tag {
    font-size: 0.7rem;
    padding: 0.1rem 0.35rem;
    background: #1e293b;
    color: #94a3b8;
    border-radius: 4px;
}
.due-date { font-size: 0.75rem; color: var(--text-muted); }

/* --- View tabs --- */
.view-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}
.tab {
    padding: 0.4rem 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: var(--radius) var(--radius) 0 0;
    font-weight: 500;
}
.tab.active { color: var(--primary); border-bottom: 2px solid var(--primary); }
.tab:hover { color: var(--text); }

/* --- Kanban --- */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}
.kanban-column {
    min-width: 200px;
    flex: 1;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 0.75rem;
    border: 1px solid var(--border);
}
.kanban-column h4 { font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.75rem; }
.kanban-cards { display: flex; flex-direction: column; gap: 0.4rem; }
.kanban-card {
    background: var(--bg-input);
    border-radius: var(--radius);
    padding: 0.6rem;
    cursor: pointer;
    transition: background 0.15s;
}
.kanban-card:hover { background: var(--border); }
.card-title { font-size: 0.85rem; margin-bottom: 0.3rem; }
.card-meta { display: flex; gap: 0.3rem; align-items: center; flex-wrap: wrap; }

/* --- Focus filters --- */
.focus-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.focus-filters label { font-size: 0.8rem; display: flex; flex-direction: column; gap: 0.3rem; }
.focus-filters select, .focus-filters input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
}

/* --- Notes --- */
.notes-list { display: flex; flex-direction: column; gap: 0.4rem; }
.note-row {
    padding: 0.5rem 0.6rem;
    background: var(--bg-input);
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
}
.note-row:hover { background: var(--border); }
.note-type {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

/* --- Modals --- */
dialog.modal {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 500px;
    width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
dialog.modal-lg { max-width: 700px; }
dialog::backdrop { background: rgba(0,0,0,0.6); }
dialog.modal label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}
dialog.modal input, dialog.modal textarea, dialog.modal select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
}
dialog.modal input:focus, dialog.modal textarea:focus { border-color: var(--primary); outline: none; }
.form-row { display: flex; gap: 0.75rem; }
.form-row label { flex: 1; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }
.checkbox-group { display: flex; gap: 0.75rem; flex-wrap: wrap; flex-direction: row; }
.checkbox-group label { flex-direction: row; align-items: center; gap: 0.3rem; margin-bottom: 0; }

/* --- Task detail --- */
.task-detail { max-width: 800px; }
.task-meta-detail { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }
.content-block { background: var(--bg-card); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border); white-space: pre-wrap; }
.back-link { font-size: 0.85rem; color: var(--text-muted); display: inline-block; margin-bottom: 0.5rem; }

/* --- Project layout --- */
.project-layout { max-width: 1100px; }
.project-header { margin-bottom: 1.5rem; }

/* --- Toast --- */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.85rem;
    z-index: 200;
    transition: opacity 0.3s;
}
.toast.hidden { opacity: 0; pointer-events: none; }
.toast.warn { border-color: var(--warning); }
.toast.error { border-color: var(--danger); }

/* --- Capture mode toggle --- */
.capture-mode-toggle {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    align-items: center;
}
.mode-btn {
    padding: 0.3rem 0.8rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius);
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 500;
}
.mode-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.mode-btn:hover:not(.active) { background: var(--border); }

/* --- Clarify buttons --- */
.clarify-buttons {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

/* --- Clarification task row --- */
.clarify-task-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}
.clarify-task-row:last-child { border-bottom: none; }
.clarify-actions {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}

/* --- Right panel tabs --- */
.right-panel-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.4rem;
}

/* --- Chat panel --- */
.chat-panel {
    display: flex;
    flex-direction: column;
    height: 400px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.chat-message {
    max-width: 85%;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.chat-message.human {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}
.chat-message.ai {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom-left-radius: 2px;
}
.chat-message.streaming::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 14px;
    background: var(--primary);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.8s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.chat-input-bar {
    display: flex;
    gap: 0.4rem;
    padding: 0.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.chat-input-bar .capture-input { font-size: 0.85rem; }

/* --- Utility --- */
.hidden { display: none !important; }
.muted { color: var(--text-muted); font-size: 0.85rem; }

/* --- Nav links --- */
.nav-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
    margin-right: 1rem;
}
.nav-link:hover { color: var(--text); }

/* --- Notification badge --- */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* --- Task header row --- */
.task-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* --- Execution panel --- */
.execution-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.execution-log {
    max-height: 500px;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.exec-entry {
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    line-height: 1.5;
}
.exec-status { background: var(--bg-input); color: var(--text-muted); }
.exec-text { background: var(--bg-card); border: 1px solid var(--border); white-space: pre-wrap; }
.exec-tool-call { background: #1e293b; border-left: 3px solid var(--primary); }
.exec-tool-result { background: #0f2318; border-left: 3px solid var(--success); }
.exec-trust-check { font-size: 0.8rem; color: var(--text-muted); }
.trust-auto { color: var(--success); }
.trust-approval { color: var(--warning); }
.trust-blocked { color: var(--danger); }
.exec-error { background: #2d1215; color: #fca5a5; border-left: 3px solid var(--danger); }
.exec-warning { background: #2d2305; color: #fde68a; border-left: 3px solid var(--warning); }
.exec-success { background: #0f2318; color: #6ee7b7; border-left: 3px solid var(--success); }
.exec-approval { background: var(--bg-card); border: 1px solid var(--warning); }
.exec-detail {
    background: var(--bg);
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    overflow-x: auto;
    margin-top: 0.4rem;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* --- Approval banner --- */
.approval-banner {
    padding: 0.5rem;
}
.approval-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.approval-inline-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--warning);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

/* --- Approval thread --- */
.approval-thread {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 300px;
    overflow-y: auto;
}
.approval-msg {
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
}
.approval-msg.agent { background: var(--bg-input); }
.approval-msg.human { background: #1e3a5f; }
.msg-sender {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 0.5rem;
}

/* --- Approvals page --- */
.approvals-page { max-width: 800px; }
.approvals-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.approval-card {
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
}
.approval-card:hover { background: var(--bg-input); }
.approval-card-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.approval-card-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 1rem; }

/* --- Modify/Ask dialogs --- */
.modify-dialog, .ask-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 0.5rem;
}
.modify-dialog h4, .ask-dialog h4 { margin-bottom: 0.5rem; font-size: 0.9rem; }

/* --- Execution history --- */
.exec-history-entry {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.exec-history-entry:last-child { border-bottom: none; }

/* --- Phase progress bar --- */
.phase-progress {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.phase-step {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    position: relative;
}
.phase-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -0.4rem;
    top: 50%;
    width: 0.5rem;
    height: 2px;
    background: var(--border);
}
.phase-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
}
.phase-label { font-size: 0.8rem; color: var(--text-muted); }
.phase-step.active .phase-dot { background: var(--primary); box-shadow: 0 0 6px var(--primary); }
.phase-step.active .phase-label { color: var(--text); font-weight: 600; }
.phase-step.completed .phase-dot { background: var(--success); }
.phase-step.completed .phase-label { color: var(--success); }
.phase-step.pending .phase-dot { background: var(--border); }

/* --- Stalled project --- */
.stalled-project { border-left: 3px solid var(--danger); padding-left: 0.5rem; }

/* --- Days waiting badge --- */
.days-waiting-badge {
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: var(--bg-input);
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}
.days-waiting-badge.overdue { background: #7c2d12; color: #fb923c; }

/* --- Recurring table --- */
.recurring-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.recurring-table th, .recurring-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.recurring-table th {
    background: var(--bg-input);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}
.recurring-table code {
    background: var(--bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* --- Toggle switch --- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border);
    border-radius: 20px;
    transition: background 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
    background: var(--text);
    border-radius: 50%;
    transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

/* --- Captures page --- */
.captures-page { max-width: 900px; }
.captures-stats {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0;
}
.stat-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.stat-num { font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.stat-email .stat-num { color: #60a5fa; }
.stat-sms .stat-num { color: #34d399; }
.stat-document .stat-num { color: #fbbf24; }
.stat-web .stat-num { color: #c4b5fd; }

/* --- Upload zone --- */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: border-color 0.2s, background 0.2s;
}
.upload-zone.dragover { border-color: var(--primary); background: rgba(99, 102, 241, 0.05); }
.upload-link { color: var(--primary); cursor: pointer; text-decoration: underline; }

/* --- Channel badges --- */
.channel-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-email { background: #1e3a5f; color: #60a5fa; }
.badge-sms { background: #164e3b; color: #34d399; }
.badge-document { background: #78350f; color: #fbbf24; }
.badge-web { background: #4c1d95; color: #c4b5fd; }

/* --- Channel filters --- */
.channel-filters {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.channel-btn {
    padding: 0.3rem 0.8rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius);
    font-size: 0.8rem;
    cursor: pointer;
}
.channel-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.channel-btn:hover:not(.active) { background: var(--border); }

/* --- Capture rows --- */
.captures-list { display: flex; flex-direction: column; gap: 2px; }
.capture-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.capture-row:hover { background: var(--bg-input); }
.capture-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Gantt chart --- */
.gantt-wrapper { border: 1px solid var(--border); border-radius: var(--radius); }
.gantt-row:hover { background: var(--bg-input); }
.gantt-label:hover { color: var(--primary); }

/* --- Agent cards --- */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}
.agent-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}
.agent-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.agent-name { font-weight: 600; font-size: 1rem; }
.agent-card-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.agent-stat { font-weight: 600; }
.agent-stat-warn { color: var(--warning); }
.agent-status-badges {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.agent-status-badge {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}
.agent-tasks-detail {
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
}
.agent-tasks-detail summary {
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .workspace-layout { grid-template-columns: 1fr; }
    .sidebar, .notes-panel { position: static; }
    .kanban-board { flex-direction: column; }
}
