CheddahBot/cheddahbot/static/app.css

620 lines
16 KiB
CSS

/* CheddahBot Dark Theme */
:root {
--bg-primary: #0d1117;
--bg-surface: #161b22;
--bg-surface-hover: #1c2129;
--bg-input: #0d1117;
--text-primary: #e6edf3;
--text-secondary: #8b949e;
--text-muted: #484f58;
--accent: #2dd4bf;
--accent-dim: #134e4a;
--border: #30363d;
--success: #3fb950;
--error: #f85149;
--warning: #d29922;
--font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
--font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
--radius: 8px;
--sidebar-width: 280px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
height: 100%;
font-family: var(--font-sans);
font-size: 15px;
line-height: 1.5;
color: var(--text-primary);
background: var(--bg-primary);
overflow: hidden;
}
/* Top Navigation */
.top-nav {
display: flex;
align-items: center;
gap: 24px;
padding: 0 20px;
height: 48px;
background: var(--bg-surface);
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.nav-brand {
font-weight: 700;
font-size: 1.1em;
color: var(--accent);
}
.nav-links { display: flex; gap: 4px; }
.nav-link {
color: var(--text-secondary);
text-decoration: none;
padding: 6px 14px;
border-radius: var(--radius);
font-size: 0.9em;
transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.nav-link.active { color: var(--accent); background: var(--accent-dim); }
/* Main content area */
.main-content {
height: calc(100vh - 48px);
overflow: hidden;
}
/* ─── Chat Layout ─── */
.chat-layout {
display: flex;
height: 100%;
}
/* Sidebar */
.chat-sidebar {
width: var(--sidebar-width);
min-width: var(--sidebar-width);
background: var(--bg-surface);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
padding: 12px;
gap: 8px;
overflow-y: auto;
flex-shrink: 0;
}
.sidebar-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.sidebar-header h3 { font-size: 0.85em; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.sidebar-toggle {
display: none;
background: none;
border: none;
color: var(--text-secondary);
font-size: 1.2em;
cursor: pointer;
}
.sidebar-open-btn {
display: none;
position: fixed;
top: 56px;
left: 8px;
z-index: 20;
background: var(--bg-surface);
border: 1px solid var(--border);
color: var(--text-primary);
padding: 6px 10px;
border-radius: var(--radius);
cursor: pointer;
font-size: 1.2em;
}
.sidebar-divider {
height: 1px;
background: var(--border);
margin: 4px 0;
}
.agent-selector { display: flex; flex-direction: column; gap: 4px; }
.agent-btn {
padding: 8px 12px;
background: transparent;
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text-primary);
cursor: pointer;
text-align: left;
font-size: 0.9em;
transition: border-color 0.15s, background 0.15s;
}
.agent-btn:hover { background: var(--bg-surface-hover); }
.agent-btn.active { border-color: var(--accent); background: var(--accent-dim); }
.btn-new-chat {
width: 100%;
padding: 8px;
background: var(--accent-dim);
border: 1px solid var(--accent);
border-radius: var(--radius);
color: var(--accent);
cursor: pointer;
font-size: 0.9em;
transition: background 0.15s;
}
.btn-new-chat:hover { background: var(--accent); color: var(--bg-primary); }
.chat-sidebar h3 {
font-size: 0.8em;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-top: 8px;
}
.conv-btn {
display: block;
width: 100%;
padding: 8px 10px;
background: transparent;
border: 1px solid transparent;
border-radius: var(--radius);
color: var(--text-primary);
cursor: pointer;
text-align: left;
font-size: 0.85em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: background 0.15s;
}
.conv-btn:hover { background: var(--bg-surface-hover); }
.conv-btn.active { border-color: var(--accent); background: var(--accent-dim); }
/* Chat main area */
.chat-main {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
}
/* Status bar */
.status-bar {
display: flex;
gap: 16px;
padding: 8px 20px;
font-size: 0.8em;
color: var(--text-secondary);
border-bottom: 1px solid var(--border);
background: var(--bg-surface);
flex-shrink: 0;
}
.status-item strong { color: var(--text-primary); }
.text-ok { color: var(--success) !important; }
.text-err { color: var(--error) !important; }
/* Notification banner */
.notification-banner {
margin: 8px 20px 0;
padding: 10px 16px;
background: var(--bg-surface);
border: 1px solid var(--accent-dim);
border-radius: var(--radius);
font-size: 0.9em;
color: var(--accent);
}
/* Messages area */
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 16px 20px;
display: flex;
flex-direction: column;
gap: 12px;
}
.message {
display: flex;
gap: 10px;
max-width: 85%;
animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(4px); }
to { opacity: 1; transform: translateY(0); }
}
.message.user { align-self: flex-end; flex-direction: row-reverse; }
.message.assistant { align-self: flex-start; }
.message-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.7em;
font-weight: 700;
flex-shrink: 0;
}
.message.user .message-avatar { background: var(--accent-dim); color: var(--accent); }
.message.assistant .message-avatar { background: #1c2129; color: var(--text-secondary); }
.message-body {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 10px 14px;
min-width: 0;
}
.message.user .message-body { background: var(--accent-dim); border-color: var(--accent); }
.message-content {
word-wrap: break-word;
overflow-wrap: break-word;
}
/* Markdown rendering in messages */
.message-content p { margin: 0.4em 0; }
.message-content p:first-child { margin-top: 0; }
.message-content p:last-child { margin-bottom: 0; }
.message-content pre {
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 4px;
padding: 10px;
overflow-x: auto;
font-family: var(--font-mono);
font-size: 0.9em;
margin: 0.5em 0;
}
.message-content code {
font-family: var(--font-mono);
font-size: 0.9em;
background: var(--bg-primary);
padding: 2px 5px;
border-radius: 3px;
}
.message-content pre code { background: none; padding: 0; }
.message-content ul, .message-content ol { margin: 0.4em 0; padding-left: 1.5em; }
.message-content a { color: var(--accent); }
.message-content blockquote {
border-left: 3px solid var(--accent);
padding-left: 12px;
color: var(--text-secondary);
margin: 0.5em 0;
}
.message-content table { border-collapse: collapse; margin: 0.5em 0; }
.message-content th, .message-content td {
border: 1px solid var(--border);
padding: 6px 10px;
text-align: left;
}
.message-content th { background: var(--bg-surface-hover); }
/* Chat input area */
.chat-input-area {
padding: 12px 20px;
border-top: 1px solid var(--border);
background: var(--bg-surface);
flex-shrink: 0;
}
.input-row {
display: flex;
align-items: flex-end;
gap: 8px;
}
#chat-input {
flex: 1;
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 10px 14px;
color: var(--text-primary);
font-family: var(--font-sans);
font-size: 15px;
resize: none;
max-height: 200px;
line-height: 1.4;
}
#chat-input:focus { outline: none; border-color: var(--accent); }
#chat-input::placeholder { color: var(--text-muted); }
.file-upload-btn {
padding: 8px 10px;
cursor: pointer;
font-size: 1.2em;
color: var(--text-secondary);
transition: color 0.15s;
flex-shrink: 0;
}
.file-upload-btn:hover { color: var(--accent); }
.send-btn {
padding: 8px 14px;
background: var(--accent);
border: none;
border-radius: var(--radius);
color: var(--bg-primary);
font-size: 1.1em;
cursor: pointer;
flex-shrink: 0;
transition: opacity 0.15s;
}
.send-btn:hover { opacity: 0.85; }
.file-preview {
margin-top: 6px;
font-size: 0.85em;
color: var(--text-secondary);
}
.file-preview .file-tag {
display: inline-block;
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 4px;
padding: 2px 8px;
margin-right: 6px;
}
/* ─── Dashboard Layout ─── */
.dashboard-layout {
display: flex;
flex-direction: column;
gap: 16px;
padding: 16px 20px;
height: 100%;
overflow-y: auto;
}
.panel {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 16px;
}
.panel-title {
font-size: 1.1em;
font-weight: 600;
margin-bottom: 12px;
color: var(--accent);
}
.panel-section {
margin-bottom: 16px;
}
.panel-section h3 {
font-size: 0.85em;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 8px;
}
/* Loop health grid */
.loop-grid {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.loop-badge {
display: flex;
flex-direction: column;
align-items: center;
padding: 8px 12px;
border-radius: var(--radius);
font-size: 0.8em;
min-width: 90px;
border: 1px solid var(--border);
}
.loop-name { font-weight: 600; }
.loop-ago { color: var(--text-secondary); font-size: 0.85em; }
.badge-ok { border-color: var(--success); background: rgba(63, 185, 80, 0.1); }
.badge-ok .loop-name { color: var(--success); }
.badge-warn { border-color: var(--warning); background: rgba(210, 153, 34, 0.1); }
.badge-warn .loop-name { color: var(--warning); }
.badge-err { border-color: var(--error); background: rgba(248, 81, 73, 0.1); }
.badge-err .loop-name { color: var(--error); }
.badge-muted { border-color: var(--text-muted); }
.badge-muted .loop-name { color: var(--text-muted); }
/* Active executions */
.exec-list { display: flex; flex-direction: column; gap: 6px; }
.exec-item {
display: flex;
gap: 12px;
padding: 6px 10px;
background: var(--bg-primary);
border-radius: 4px;
font-size: 0.85em;
}
.exec-name { flex: 1; font-weight: 500; }
.exec-tool { color: var(--text-secondary); }
.exec-dur { color: var(--accent); font-family: var(--font-mono); }
/* Action buttons */
.action-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
padding: 8px 16px;
background: var(--bg-surface-hover);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text-primary);
cursor: pointer;
font-size: 0.9em;
transition: border-color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--accent); }
.btn-sm { padding: 6px 12px; font-size: 0.8em; }
/* Notification feed */
.notif-feed { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.notif-item {
padding: 6px 10px;
font-size: 0.85em;
border-left: 3px solid var(--border);
background: var(--bg-primary);
border-radius: 0 4px 4px 0;
}
.notif-clickup { border-left-color: var(--accent); }
.notif-info { border-left-color: var(--text-secondary); }
.notif-error { border-left-color: var(--error); }
.notif-cat {
font-weight: 600;
font-size: 0.8em;
text-transform: uppercase;
color: var(--text-secondary);
}
/* Task table */
.task-table { width: 100%; border-collapse: collapse; font-size: 0.85em; }
.task-table th, .task-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.task-table th { color: var(--text-secondary); font-weight: 600; text-transform: uppercase; font-size: 0.85em; }
.task-table a { color: var(--accent); text-decoration: none; }
.task-table a:hover { text-decoration: underline; }
.status-badge {
display: inline-block;
padding: 2px 8px;
border-radius: 4px;
font-size: 0.85em;
font-weight: 500;
}
.status-to-do { background: rgba(139, 148, 158, 0.2); color: var(--text-secondary); }
.status-in-progress, .status-automation-underway { background: rgba(45, 212, 191, 0.15); color: var(--accent); }
.status-error { background: rgba(248, 81, 73, 0.15); color: var(--error); }
.status-complete, .status-closed { background: rgba(63, 185, 80, 0.15); color: var(--success); }
.status-internal-review, .status-outline-review { background: rgba(210, 153, 34, 0.15); color: var(--warning); }
/* Pipeline groups */
.pipeline-group { margin-bottom: 16px; }
.pipeline-group h4 {
font-size: 0.9em;
margin-bottom: 8px;
padding-bottom: 4px;
border-bottom: 1px solid var(--border);
}
.pipeline-stats {
display: flex;
gap: 12px;
margin-bottom: 12px;
flex-wrap: wrap;
}
.pipeline-stat {
padding: 8px 14px;
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: var(--radius);
text-align: center;
}
.pipeline-stat .stat-count { font-size: 1.5em; font-weight: 700; color: var(--accent); }
.pipeline-stat .stat-label { font-size: 0.75em; color: var(--text-secondary); }
/* Flash messages */
.flash-msg {
position: fixed;
bottom: 20px;
right: 20px;
background: var(--accent);
color: var(--bg-primary);
padding: 10px 20px;
border-radius: var(--radius);
font-weight: 600;
font-size: 0.9em;
z-index: 100;
animation: fadeIn 0.2s ease-out, fadeOut 0.5s 2.5s ease-out forwards;
}
@keyframes fadeOut { to { opacity: 0; transform: translateY(10px); } }
/* Utility */
.text-muted { color: var(--text-muted); }
/* Typing indicator */
.typing-indicator span {
display: inline-block;
width: 6px;
height: 6px;
background: var(--text-secondary);
border-radius: 50%;
margin: 0 2px;
animation: bounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
0%, 60%, 100% { transform: translateY(0); }
30% { transform: translateY(-6px); }
}
/* ─── Mobile ─── */
@media (max-width: 768px) {
.chat-sidebar {
position: fixed;
top: 48px;
left: 0;
bottom: 0;
z-index: 30;
transform: translateX(-100%);
transition: transform 0.2s ease;
width: 280px;
}
.chat-sidebar.open { transform: translateX(0); }
.sidebar-toggle { display: block; }
.sidebar-open-btn { display: block; }
.status-bar { flex-wrap: wrap; gap: 8px; padding: 6px 12px; font-size: 0.75em; }
.chat-messages { padding: 12px; }
.message { max-width: 95%; }
.chat-input-area { padding: 8px 12px; }
#chat-input { font-size: 16px; } /* Prevent iOS zoom */
.dashboard-layout { padding: 12px; }
.loop-grid { gap: 6px; }
.loop-badge { min-width: 70px; padding: 6px 8px; font-size: 0.75em; }
}
/* Overlay for mobile sidebar */
.sidebar-overlay {
display: none;
position: fixed;
top: 48px;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 25;
}
.sidebar-overlay.visible { display: block; }
/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }