/* Clawd Dashboard - Dark Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0d0d0d;
    --bg-card: #1a1a1a;
    --bg-column: #141414;
    --bg-hover: #252525;
    --border-color: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent-green: #4ade80;
    --accent-yellow: #fbbf24;
    --accent-blue: #60a5fa;
    --accent-red: #f87171;
    --accent-purple: #a78bfa;
    --todo-color: #ef4444;
    --progress-color: #f59e0b;
    --done-color: #22c55e;
    --archived-color: #6b7280;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 200px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.agent-profile {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 12px auto;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
}

.agent-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.status-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
}

/* Current Task Display */
.current-task-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    width: 100%;
    text-align: left;
}

.current-task-label {
    font-size: 0.65rem;
    color: #666;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.current-task-title {
    font-size: 0.85rem;
    color: #7aa2f7;
    line-height: 1.4;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.current-subtask {
    font-size: 0.75rem;
    color: #ccc;
    background: rgba(74, 222, 128, 0.08);
    padding: 8px 10px;
    border-radius: 4px;
    border-left: 3px solid #4ade80;
    line-height: 1.4;
}

.current-subtask-progress {
    font-size: 0.7rem;
    color: #4ade80;
    margin-bottom: 4px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-yellow);
    animation: pulse 2s infinite;
}

.status-dot.online { background: var(--accent-green); }
.status-dot.thinking { background: var(--accent-yellow); animation: pulse 1s infinite; }
.status-dot.offline { background: var(--accent-red); animation: none; }
.status-dot.unknown { background: var(--accent-orange); animation: pulse 1.5s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: var(--text-secondary);
}

.status-detail {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-x: auto;
}

/* Right Sidebar (Wes Queue) */
.rightbar {
    width: 420px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    padding: 16px;
    overflow-y: auto;
}

.rightbar-panel {
    background: var(--bg-column);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
}

.rightbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.rightbar-sub {
    color: var(--text-secondary);
    font-size: 0.78rem;
    margin-bottom: 10px;
}

/* On small screens, hide right sidebar */
@media (max-width: 1200px) {
  .rightbar { display: none; }
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

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

.header-left h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.online-badge {
    background: rgba(74, 222, 128, 0.15);
    color: var(--accent-green);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.online-badge.offline {
    background: rgba(248, 113, 113, 0.15);
    color: var(--accent-red);
}

.online-badge.unknown {
    background: rgba(251, 146, 60, 0.15);
    color: var(--accent-orange);
}

.last-sync {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Tab Bar */
.tab-bar {
    display: flex;
    gap: 4px;
    padding: 8px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Coming Soon Panels */
.coming-soon-panel {
    background: var(--bg-column);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    max-width: 600px;
}

.coming-soon-panel h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.coming-soon-text {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 24px;
}

.coming-soon-checklist {
    list-style: none;
    padding: 0;
}

.coming-soon-checklist li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.coming-soon-checklist li:last-child {
    border-bottom: none;
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.kanban-column {
    min-width: 280px;
    max-width: 320px;
    background: var(--bg-column);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.column-icon {
    font-size: 1.1rem;
}

.column-header h3 {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
}

.task-count {
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.task-list {
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
}

/* Task Cards */
.task-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: grab;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.task-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.priority-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

.priority-badge.p5 { background: rgba(248,113,113,0.20); border-color: rgba(248,113,113,0.35); }
.priority-badge.p4 { background: rgba(251,191,36,0.20); border-color: rgba(251,191,36,0.35); }
.priority-badge.p3 { background: rgba(96,165,250,0.18); border-color: rgba(96,165,250,0.30); }
.priority-badge.p2 { background: rgba(167,139,250,0.18); border-color: rgba(167,139,250,0.30); }
.priority-badge.p1 { background: rgba(107,114,128,0.22); border-color: rgba(107,114,128,0.35); }

.prio-btn {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0 6px;
    height: 22px;
    cursor: pointer;
}
.prio-btn:hover { color: var(--text-primary); }

.task-card:hover {
    background: var(--bg-hover);
    border-color: #3a3a3a;
}

.task-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.task-card .task-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.task-card .task-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.task-sched { color: #a0a0a0; }

.task-progress { margin-top: 8px; }
.task-progress-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}
.task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(74,222,128,0.6), rgba(96,165,250,0.6));
}
.task-progress-text {
    margin-top: 4px;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.task-card .task-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Column-specific task borders */
[data-column="todo"] .task-card { border-left: 3px solid var(--todo-color); }
[data-column="in_progress"] .task-card { border-left: 3px solid var(--progress-color); }
[data-column="done"] .task-card { border-left: 3px solid var(--done-color); }
[data-column="archived"] .task-card { border-left: 3px solid var(--archived-color); }

.add-task-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.add-task-btn:hover {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.task-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.complete-btn, .uncomplete-btn {
    background: #2d5a3d;
    color: #7deb9a;
    border: 1px solid #3d7a4d;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
}

.complete-btn:hover, .uncomplete-btn:hover {
    background: #3d7a4d;
    color: #fff;
}

.uncomplete-btn {
    background: #4a4a5a;
    color: #aaa;
    border-color: #5a5a6a;
}

.task-done .task-title {
    text-decoration: line-through;
    opacity: 0.7;
}

.rightbar-tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    padding: 0 4px;
}

.rightbar-tab {
    flex: 1;
    background: #2a2a3a;
    border: 2px solid #3a3a4a;
    border-radius: 6px;
    padding: 10px 12px;
    color: #888;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
}

.rightbar-tab:hover {
    background: #3a3a4a;
    color: #aaa;
}

.rightbar-tab.active {
    background: #4a7c59;
    color: #fff;
    border-color: #5a9c69;
}

.queue-tab-content {
    display: none;
}

.queue-tab-content.active {
    display: block;
}

/* Tiles (movable + collapsible) */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 16px;
}

/* Cockpit */
.cockpit-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 16px;
}

@media (max-width: 1200px) {
  .cockpit-grid { grid-template-columns: 1fr; }
}

.cockpit-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.kpi {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
}

.kpi-label { color: var(--text-secondary); font-size: 0.75rem; }
.kpi-value { font-size: 1rem; font-weight: 600; margin-top: 4px; }

.cockpit-actions { display: flex; gap: 8px; }

.cockpit-toolbar {
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.lane-chips { display: flex; gap: 6px; }

.lane-chip {
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-dark);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}
.lane-chip:hover { border-color: var(--accent-primary); }
.lane-chip.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.autoscroll-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    margin-left: auto;
}
.autoscroll-toggle input { cursor: pointer; }

#cockpitFilter {
    flex: 1;
    min-width: 150px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    color: var(--text-primary);
}

.cockpit-log {
    background: #0b0b0b;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    height: 65vh;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.25rem;
}

.cockpit-row {
    display: grid;
    grid-template-columns: 160px 80px 80px 60px 1fr;
    gap: 10px;
    padding: 4px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cockpit-row:last-child { border-bottom: none; }

.cockpit-ts { color: #93c5fd; }
.cockpit-source { }
.cockpit-lane { color: #c4b5fd; }
.cockpit-level { color: #a1a1aa; }
.cockpit-msg { color: #e5e7eb; white-space: pre-wrap; word-break: break-word; }

.cockpit-level.error { color: #f87171; }
.cockpit-level.warn { color: #fbbf24; }
.cockpit-level.info { color: #60a5fa; }

/* Directory Section */
.directory-section {
    padding: 16px;
    max-width: 900px;
}

.directory-section .panel {
    min-height: 300px;
}

.directory-section .panel-header {
    cursor: default;
}

.directory-section .panel-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.directory-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Company Group */
.company-group {
    background: var(--bg-hover);
    border-radius: 8px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.company-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    cursor: pointer;
}

.company-header:hover {
    opacity: 0.9;
}

.company-name {
    font-size: 1rem;
    font-weight: 600;
    color: #7aa2f7;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.company-name:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.company-chevron {
    color: #888;
    font-size: 12px;
    width: 16px;
}

.company-chevron:hover {
    color: #ccc;
}

.company-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-column);
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: auto;
}

.company-chevron {
    color: #666;
    font-size: 10px;
    width: 12px;
    transition: transform 0.2s;
}

/* Contact Card in Directory */
.directory-contact {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-column);
    border-radius: 6px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.directory-contact:last-child {
    margin-bottom: 0;
}

.directory-contact:hover {
    background: #2a2a3a;
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 1rem;
    flex-shrink: 0;
}

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

.contact-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.contact-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.contact-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
}

.contact-email {
    color: #4ade80;
    cursor: pointer;
    text-decoration: underline;
}

.contact-email:hover {
    color: #86efac;
}

.contact-phone {
    color: var(--text-secondary);
}

.contact-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.directory-contact:hover .contact-actions {
    opacity: 1;
}

.contact-action-btn {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.contact-action-btn:hover {
    color: var(--text-primary);
    background: #3a3a4a;
}

/* Company Detail Slide-in Panel */
.company-detail-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.company-detail-overlay.active {
    display: block;
}

.company-detail-panel {
    position: fixed;
    top: 0;
    right: -600px;
    width: 580px;
    max-width: 90vw;
    height: 100%;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.company-detail-panel.active {
    right: 0;
}

.company-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-column);
}

.company-detail-header h2 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.company-detail-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
}

.company-detail-close:hover {
    color: var(--text-primary);
}

.company-tier-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.company-tier-badge.tier-a { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.company-tier-badge.tier-b { background: rgba(96, 165, 250, 0.2); color: #60a5fa; }
.company-tier-badge.tier-c { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.company-tier-badge.tier-partner { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }

/* Company Detail Tabs */
.company-detail-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-column);
}

.company-detail-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.company-detail-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.company-detail-tab.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

.company-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.company-tab-content {
    display: none;
}

.company-tab-content.active {
    display: block;
}

/* Overview Tab */
.company-overview-grid {
    display: grid;
    gap: 16px;
}

.company-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.company-field label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.company-field input,
.company-field select,
.company-field textarea {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.company-field textarea {
    min-height: 80px;
    resize: vertical;
}

.company-field input:focus,
.company-field select:focus,
.company-field textarea:focus {
    outline: none;
    border-color: #60a5fa;
}

.company-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.company-value-display {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4ade80;
}

.company-save-btn {
    margin-top: 20px;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.company-save-btn:hover {
    background: #2563eb;
}

.company-save-btn:disabled {
    background: #4b5563;
    cursor: not-allowed;
}

/* Contacts Tab */
.company-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Tasks Tab */
.company-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.company-task-item {
    background: var(--bg-hover);
    border-radius: 6px;
    padding: 12px;
    border: 1px solid var(--border-color);
}

.company-task-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.company-task-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Sponsors/CRM Page */
.sponsors-section {
    padding: 20px;
    height: calc(100vh - 140px);
}

.sponsors-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    height: 100%;
}

.sponsors-list-panel {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sponsors-list-panel .panel-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sponsors-list-panel .panel-header h3 {
    margin: 0;
}

.sponsors-list-panel .panel-actions {
    display: flex;
    gap: 8px;
}

.sponsors-list-panel .search-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
}

.sponsors-list-panel .tier-filter {
    padding: 8px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
}

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

.sponsor-card {
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    margin-bottom: 6px;
    transition: all 0.2s;
}

.sponsor-card:hover {
    background: var(--bg-hover);
}

.sponsor-card.selected {
    background: rgba(96, 165, 250, 0.1);
    border-color: #60a5fa;
}

.sponsor-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.sponsor-card-name {
    font-weight: 600;
    color: var(--text-primary);
}

.sponsor-card-tier {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.sponsor-card-tier.tier-a { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.sponsor-card-tier.tier-b { background: rgba(96, 165, 250, 0.2); color: #60a5fa; }
.sponsor-card-tier.tier-c { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.sponsor-card-tier.tier-partner { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }

.sponsor-card-contact {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.sponsor-card-value {
    font-size: 0.8rem;
    color: #4ade80;
}

.sponsor-card-status {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

.sponsor-card-status.status-active { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.sponsor-card-status.status-prospect { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.sponsor-card-status.status-inactive { background: rgba(156, 163, 175, 0.2); color: #9ca3af; }
.sponsor-card-status.status-partner { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }

/* Sponsor Detail Panel */
.sponsor-detail-panel {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sponsor-detail-panel .empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.sponsor-detail-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
}

.sponsor-detail-header h2 {
    margin: 0;
    flex: 1;
}

.sponsor-detail-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-column);
}

.sponsor-detail-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
}

.sponsor-detail-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.sponsor-detail-tab.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

.sponsor-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.sponsor-tab-content {
    display: none;
}

.sponsor-tab-content.active {
    display: block;
}

/* Sponsor Overview Stats */
.sponsor-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.sponsor-stat {
    background: var(--bg-hover);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.sponsor-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sponsor-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Email List */
.sponsor-email-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sponsor-email-item {
    background: var(--bg-hover);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.sponsor-email-subject {
    font-weight: 500;
    margin-bottom: 4px;
}

.sponsor-email-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Sponsors Page Sidebar */
.sponsors-sidebar {
    width: 200px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sponsors-sidebar .sidebar-header {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.sponsors-sidebar .back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.sponsors-sidebar .back-link:hover {
    color: var(--text-primary);
}

.sponsors-sidebar .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sponsors-sidebar .nav-item {
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.sponsors-sidebar .nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sponsors-sidebar .nav-item.active {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.sponsors-sidebar .sidebar-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.sponsors-sidebar .stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sponsors-sidebar .stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sponsors-sidebar .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sponsors Main Content */
.sponsors-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sponsors-main .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.add-sponsor-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.add-sponsor-btn:hover {
    background: #2563eb;
}

/* Source Badges */
.source-badge {
    display: inline-block;
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.source-badge.src-dashboard { background: rgba(96, 165, 250, 0.2); color: #93c5fd; }
.source-badge.src-watcher { background: rgba(167, 139, 250, 0.2); color: #c4b5fd; }
.source-badge.src-ui { background: rgba(74, 222, 128, 0.2); color: #86efac; }
.source-badge.src-system { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.source-badge.src-claude { background: rgba(251, 191, 36, 0.2); color: #fcd34d; }
.source-badge.src-hook { background: rgba(248, 113, 113, 0.2); color: #fca5a5; }
.source-badge.src-agent { background: rgba(34, 211, 238, 0.2); color: #67e8f9; }
.source-badge.src-ai { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.source-badge.src-email { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.source-badge.src-workflow { background: rgba(234, 179, 8, 0.2); color: #fde047; }
.source-badge.src-config { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }
.source-badge.src-intake { background: rgba(20, 184, 166, 0.2); color: #5eead4; }
.source-badge.src-email-detect { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }

.panel {
    background: var(--bg-column);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    cursor: grab;
    user-select: none;
}

.panel-header h3 {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-actions {
    display: flex;
    gap: 8px;
}

.panel-btn {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    height: 26px;
    padding: 0 10px;
    cursor: pointer;
}

.panel-btn:hover { color: var(--text-primary); }

.panel-body { padding: 14px; }

.panel.collapsed .panel-body { display: none; }

.panel.dragging { opacity: 0.6; }

.panel.drop-target { outline: 2px dashed rgba(96,165,250,0.6); outline-offset: -4px; }

.deliverables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.deliverable-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.deliverable-card:hover {
    background: var(--bg-hover);
    border-color: #3a3a3a;
}

.deliverable-card .icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.deliverable-card .name {
    font-size: 0.85rem;
    font-weight: 500;
}

.deliverable-card .type {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Notes panel textarea */
/* (notes-log-section removed in favor of tile-grid panels) */

.notes-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

#notesContent {
    width: 100%;
    height: 120px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    color: var(--text-primary);
    font-size: 0.85rem;
    resize: vertical;
}

#notesContent:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.save-btn {
    margin-top: 8px;
    padding: 8px 16px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

.save-btn:hover {
    background: #4a90e2;
}

.action-log-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

#actionLogSourceFilter {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--text-primary);
    font-size: 0.8rem;
    min-width: 120px;
    cursor: pointer;
}

#actionLogFilter {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--text-primary);
    font-size: 0.8rem;
}

#actionLogFilter:focus, #actionLogSourceFilter:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.action-log-list {
    max-height: 180px;
    overflow-y: auto;
}

.action-log-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

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

.action-log-item .source-badge {
    flex-shrink: 0;
}

.action-log-item .timestamp {
    color: var(--accent-blue);
    flex-shrink: 0;
}

.action-log-item .action {
    color: var(--text-primary);
}

.action-log-item .details {
    width: 100%;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 2px;
    padding-left: 4px;
}

.repeat-count {
    background: var(--accent-orange);
    color: #fff;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    width: 92%;
    max-width: 760px;
    border: 1px solid var(--border-color);
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 16px;
}

.modal-content input[type="text"],
.modal-content textarea,
.modal-content select {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.field-label {
    display: block;
    margin: 10px 0 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.modal-content textarea {
    height: 160px;
    resize: vertical;
}

.modal-toprow {
    display: grid;
    grid-template-columns: 180px 180px 1fr;
    gap: 12px;
    align-items: end;
    margin-bottom: 8px;
}

.dates-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 10px;
}

@media (max-width: 900px) {
  .modal-toprow { grid-template-columns: 1fr; }
  .dates-row { grid-template-columns: 1fr; }
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.modal-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

.cancel-btn {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.restart-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s;
}
.restart-btn:hover {
    opacity: 0.9;
}

.confirm-btn {
    background: var(--accent-green);
    color: black;
}

.delete-btn {
    background: var(--accent-red);
    color: white;
    margin-right: auto;
}

/* Context menu (right-click) */
.context-menu {
    position: fixed;
    z-index: 2000;
    min-width: 240px;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px;
    display: none;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.context-menu.show { display: block; }

.context-item {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
}
.context-item:hover { background: var(--bg-hover); }
.context-item.danger { color: var(--accent-red); }

.context-sep {
    height: 1px;
    background: var(--border-color);
    margin: 6px 4px;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

/* Responsive */
@media (max-width: 1200px) {
    .tile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
        padding: 12px;
    }

    .agent-name, .status-text, .status-detail {
        display: none;
    }

    .notes-log-section {
        grid-template-columns: 1fr;
    }
}

/* Weekly Deadlines View */
.weekly-deadlines-view {
    padding: 20px;
}

.weekly-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.weekly-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.week-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.week-nav-btn {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.week-nav-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-blue);
}

.week-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    min-width: 140px;
    text-align: center;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.week-day {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.week-day.is-today {
    border-color: var(--accent-blue);
}

.week-day.is-past {
    opacity: 0.6;
}

.week-day-header {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.week-day-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.week-day-date {
    font-size: 1.1rem;
    font-weight: 600;
}

.week-day.is-today .week-day-date {
    color: var(--accent-blue);
}

.week-day-tasks {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
}

.week-task {
    background: var(--bg-hover);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 8px;
    cursor: pointer;
    border-left: 3px solid var(--accent-yellow);
}

.week-task:hover {
    background: var(--bg-column);
}

.week-task.is-overdue {
    border-left-color: var(--accent-red);
}

.week-task.is-ops {
    border-left-color: var(--accent-purple);
}

.week-task.is-wes {
    border-left-color: var(--accent-green);
}

.week-task-title {
    font-size: 0.85rem;
    margin-bottom: 4px;
    line-height: 1.3;
}

.week-task-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    gap: 6px;
    align-items: center;
}

.week-task-source {
    background: var(--bg-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
}

.week-empty {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: center;
    padding: 20px 8px;
}

@media (max-width: 1200px) {
    .week-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .week-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Unified Queue Items */
.unified-item {
    border-left: 3px solid var(--accent-blue);
}
.unified-item[data-kind="followup"] {
    border-left-color: var(--accent-purple);
}
.unified-item[data-kind="deliverable"] {
    border-left-color: var(--accent-yellow);
}
.source-icon {
    margin-right: 4px;
    font-size: 0.9em;
}
.task-extra {
    font-size: 0.8em;
    color: #888;
    margin-top: 4px;
    font-style: italic;
}

/* Queue View (My Queue, Waiting On, Money tabs) */
.queue-view {
    padding: 16px;
    max-width: 900px;
}
.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.queue-header h2 {
    margin: 0;
    font-size: 1.5em;
}
.queue-count {
    color: #888;
    font-size: 0.9em;
}
.queue-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 8px 16px;
    background: #2a2a3a;
    border: 1px solid #3a3a4a;
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}
.filter-btn:hover {
    background: #3a3a4a;
    color: #fff;
}
.filter-btn.active {
    background: #4a7c59;
    border-color: #5a9c69;
    color: #fff;
}
.queue-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #1e1e2e;
    border-radius: 8px;
    border-left: 3px solid #4a7c59;
    cursor: pointer;
    transition: all 0.2s;
}
.queue-item:hover {
    background: #2a2a3a;
    transform: translateX(4px);
}
.queue-item.followup {
    border-left-color: #a78bfa;
}
.queue-item.finance {
    border-left-color: #fbbf24;
}
.queue-item-icon {
    font-size: 1.2em;
    width: 28px;
    text-align: center;
}
.queue-item-main {
    flex: 1;
    min-width: 0;
}
.queue-item-title {
    font-weight: 500;
    color: #fff;
    margin-bottom: 4px;
}
.queue-item-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.85em;
    color: #888;
}
.queue-item-status {
    text-align: right;
    font-size: 0.85em;
}
.queue-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.contact-badge, .company-badge, .waiting-badge, .due-badge, .ask-badge, .amount-badge {
    padding: 2px 6px;
    border-radius: 4px;
    background: #2a2a3a;
}
.ask-badge {
    background: #3b3a5a;
    color: #a78bfa;
}
.amount-badge {
    background: #2a3a2a;
    color: #4ade80;
}
.due-badge.overdue {
    background: #f87171;
    color: #fff;
}
.status-badge.waiting {
    background: #fbbf24;
    color: #1a1a1a;
    font-weight: 600;
}
.queue-item.waiting {
    border-left: 3px solid #fbbf24;
}
.responded-btn {
    background: #4ade80;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
}
.responded-btn:hover {
    background: #22c55e;
}
.touch-btn {
    background: #4a5568;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
}
.touch-btn:hover {
    background: #5a9c69;
}
/* Contact autocomplete suggestions */
.contact-suggestions {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.contact-suggestion:hover {
    background: #2a2a3a !important;
}
.contact-suggestion:last-child {
    border-bottom: none !important;
}
.waiting-for {
    color: #a78bfa;
    font-style: italic;
}
.due-date {
    color: #888;
}
.due-date.overdue {
    color: #f87171;
    font-weight: 600;
}
.empty-state {
    padding: 40px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.loading-state {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
}

.error-state {
    padding: 40px;
    text-align: center;
    color: #f87171;
}

/* Follow-up Pipeline Cards */
.followup-pipeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.followup-card {
    background: #1e1e2e;
    border-radius: 10px;
    padding: 16px;
    border-left: 4px solid #4a7c59;
    cursor: pointer;
    transition: all 0.2s;
}
.followup-card:hover {
    background: #2a2a3a;
    transform: translateX(4px);
}
.followup-card.overdue {
    border-left-color: #f87171;
    background: #2a1a1a;
}
.followup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 12px;
}
.followup-action-title {
    font-weight: 600;
    color: #fff;
    font-size: 1em;
    flex: 1;
}
.followup-contact {
    display: flex;
    flex-direction: column;
}
.contact-name {
    font-weight: 600;
    color: #fff;
    font-size: 1.1em;
}
.contact-company {
    color: #888;
    font-size: 0.9em;
}
.followup-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    background: #3a3a4a;
    color: #888;
}
.followup-status.status-won {
    background: #22c55e33;
    color: #4ade80;
}
.followup-status.status-proposal {
    background: #3b82f633;
    color: #60a5fa;
}
.followup-status.status-negotiating {
    background: #f59e0b33;
    color: #fbbf24;
}
.followup-status.status-active {
    background: #a78bfa33;
    color: #a78bfa;
}
.followup-status.status-warm {
    background: #f59e0b33;
    color: #fbbf24;
}
.followup-status.status-cold {
    background: #64748b33;
    color: #94a3b8;
}
.followup-ask {
    color: #ccc;
    margin: 8px 0;
    font-size: 0.95em;
}
.followup-amount {
    color: #4ade80;
    font-weight: 600;
    margin-left: 8px;
}
.followup-company {
    color: #888;
    font-weight: 400;
    margin-left: 4px;
}
.followup-notes {
    color: #888;
    font-size: 0.85em;
    margin-top: 8px;
    padding: 8px;
    background: #2a2a3a;
    border-radius: 4px;
    font-style: italic;
}
.followup-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.followup-actions .touch-btn {
    background: #4a7c59;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
}
.followup-actions .touch-btn:hover {
    background: #5a8c69;
}
.followup-actions .edit-btn {
    background: #3a3a4a;
    color: #aaa;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
}
.followup-actions .edit-btn:hover {
    background: #4a4a5a;
}
.followup-opportunity {
    color: #ccc;
    margin-bottom: 12px;
    font-size: 0.95em;
}
.followup-cadence {
    display: flex;
    gap: 24px;
    font-size: 0.85em;
}
.cadence-item {
    display: flex;
    gap: 6px;
}
.cadence-label {
    color: #666;
}
.cadence-value {
    color: #aaa;
}
.cadence-item.overdue .cadence-value {
    color: #f87171;
    font-weight: 600;
}
.followup-action {
    margin-top: 10px;
    padding: 8px 12px;
    background: #4a7c5922;
    border-radius: 6px;
    color: #4ade80;
    font-size: 0.85em;
}

/* Draft Section */
.draft-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.draft-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.draft-btn-group {
    display: flex;
    gap: 6px;
}
.generate-draft-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
}
.generate-draft-btn.secondary {
    background: #3a3a4a;
    color: #aaa;
}
.generate-draft-btn:hover {
    opacity: 0.9;
}
.batch-draft-btn {
    background: linear-gradient(135deg, #4a7c59 0%, #5a9c69 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8em;
    margin-left: auto;
}
.batch-draft-btn:hover {
    opacity: 0.9;
}
.batch-draft-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}
#wesTaskDraft {
    min-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}
.draft-chat {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.draft-chat input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-primary);
}
.draft-chat button {
    background: #4a7c59;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}
.draft-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.draft-actions button {
    background: var(--bg-column);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}
.draft-actions button:hover {
    background: var(--bg-hover);
}

/* My Queue Layout with Panels */
.myqueue-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
}
.queue-main {
    flex: 1;
    overflow-y: auto;
}
.queue-panels {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    min-height: 500px;
}
.queue-panels .panel {
    background: var(--bg-column);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}
.queue-panels .panel-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.queue-panels .panel-header h3 {
    margin: 0;
    font-size: 1em;
    font-weight: 600;
}
.queue-panels .panel-body {
    padding: 14px 18px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.queue-panels textarea {
    width: 100%;
    flex: 1;
    min-height: 80px;
    margin-bottom: 10px;
    resize: vertical;
}
.queue-panels .action-log-list {
    flex: 1;
    overflow-y: auto;
    font-size: 0.9em;
    line-height: 1.6;
}
.queue-panels .action-log-list .log-entry {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}
.queue-panels .action-log-list .log-entry:last-child {
    border-bottom: none;
}
@media (max-width: 1000px) {
    .queue-panels {
        grid-template-columns: 1fr;
    }
}

/* Queue Action Log Entries */
.queue-panels .log-entry {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.queue-panels .log-entry:last-child {
    border-bottom: none;
}
.queue-panels .log-time {
    color: #666;
    font-size: 0.85em;
    min-width: 65px;
}
.queue-panels .log-icon {
    font-size: 0.9em;
}
.queue-panels .log-action {
    color: #ccc;
    font-weight: 500;
}
.queue-panels .log-details {
    color: #888;
    font-size: 0.9em;
}

/* Parsed Info Section in Modals */
.parsed-info {
    margin-top: 12px;
    padding: 12px;
    background: #2a2a3a;
    border-radius: 8px;
    border-left: 3px solid #7aa2f7;
}
.parsed-info .field-label {
    margin-bottom: 8px;
    color: #7aa2f7;
}
.parsed-details {
    font-size: 0.9em;
    color: #ccc;
    line-height: 1.6;
}
.parsed-details div {
    margin-bottom: 4px;
}
.parsed-details ul {
    margin: 4px 0 0 16px;
    padding: 0;
}
.parsed-details li {
    margin-bottom: 2px;
}

/* Dashboard layout - fixed sidebars, scrolling main content */
.dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    flex-shrink: 0;
    height: 100vh;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    height: 100vh;
}

.rightbar {
    flex-shrink: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rightbar-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rightbar-panel #queueTabActive,
.rightbar-panel #queueTabDone {
    flex: 1;
    overflow-y: auto;
}

/* Extend right panel to fill available space */
.rightbar-panel {
    height: calc(100vh - 52px);
}

.rightbar-panel .task-list {
    max-height: none;
}
