:root { --bg: #0b0d10; --surface: #13161c; --surface-hover: #1b1f27; --border: #2a2f3a; --text: #c5c8d1; --text-secondary: #6f7684; --accent: #58a6ff; --accent-hover: #79b8ff; --success: #3fb950; --warning: #d29922; --danger: #f85149; --purple: #a371f7; --tool-bg: rgba(63, 185, 80, 0.12); --tool-border: rgba(63, 185, 80, 0.4); --shadow: 0 8px 32px rgba(0, 0, 0, 0.45); --radius: 10px; --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; } #app { width: 100%; margin: 0 auto; padding: 0.75rem; display: flex; flex-direction: column; height: 100vh; gap: 0.6rem; } header { display: flex; justify-content: space-between; align-items: center; padding: 0.3rem 0; flex-shrink: 0; } .brand { display: flex; align-items: center; gap: 0.75rem; } .llama { font-size: 1.8rem; filter: drop-shadow(0 0 8px rgba(88, 166, 255, 0.4)); } .brand h1 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; } .subtitle { font-size: 0.7rem; color: var(--text-secondary); display: block; margin-top: -0.15rem; } .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 0.5rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.12s ease; } .btn:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--accent); } .btn:disabled { opacity: 0.5; cursor: not-allowed; } .btn-primary { background: linear-gradient(135deg, rgba(88, 166, 255, 0.18), rgba(88, 166, 255, 0.05)); border-color: rgba(88, 166, 255, 0.45); } .btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, rgba(88, 166, 255, 0.28), rgba(88, 166, 255, 0.1)); } .btn-secondary { background: var(--surface); border-color: var(--border); } .btn-send { background: var(--success); color: #0d1117; border-color: var(--success); font-weight: 600; } .btn-send:hover:not(:disabled) { background: #4ac266; } .btn-sm { padding: 0.35rem 0.6rem; font-size: 0.75rem; } .btn-xs { padding: 0.2rem 0.4rem; font-size: 0.7rem; } .btn-danger { border-color: rgba(248, 81, 73, 0.45); color: var(--danger); } .btn-danger:hover:not(:disabled) { background: rgba(248, 81, 73, 0.12); } .header-actions { display: flex; gap: 0.5rem; } /* Three column layout */ .main-grid { display: grid; grid-template-columns: 300px 1fr 280px; gap: 0.75rem; flex: 1; min-height: 0; overflow: hidden; } @media (max-width: 1200px) { .main-grid { grid-template-columns: 260px 1fr 240px; } } @media (max-width: 1000px) { .main-grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; overflow: visible; } .monitor-panel, .memory-panel { max-height: none; } } .panel-header { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); background: rgba(0,0,0,0.15); border-radius: var(--radius) var(--radius) 0 0; } .panel-title { font-weight: 600; font-size: 0.85rem; } .live-badge { font-size: 0.65rem; color: var(--success); font-weight: 700; letter-spacing: 0.05em; animation: pulse 1.5s infinite; } /* Monitor panel (btop style) */ .monitor-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); } .monitor-content { padding: 0.8rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 0.65rem; font-family: var(--font-mono); font-size: 0.75rem; } .metric-row { display: grid; grid-template-columns: 85px 1fr 55px; align-items: center; gap: 0.5rem; } .metric-label { color: var(--text-secondary); } .metric-value { text-align: right; color: var(--text); } .metric-value.right { text-align: right; } .metric-value.ok { color: var(--success); } .metric-value.warn { color: var(--warning); } .bar-box { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; } .bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--success)); border-radius: 4px; transition: width 0.5s ease; width: 0%; } .bar-fill.ram { background: linear-gradient(90deg, var(--purple), var(--accent)); } .bar-fill.disk { background: linear-gradient(90deg, var(--warning), var(--danger)); } .llama-procs { color: var(--text-secondary); font-size: 0.7rem; line-height: 1.4; } .mini-log { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem; margin-top: 0.3rem; } .mini-log-title { color: var(--text-secondary); font-size: 0.7rem; margin-bottom: 0.3rem; } .mini-log pre { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-secondary); white-space: pre-wrap; max-height: 120px; overflow-y: auto; } .chart-title { color: var(--text-secondary); font-size: 0.65rem; margin-top: 0.4rem; } canvas { width: 100%; background: var(--bg); border-radius: 6px; border: 1px solid var(--border); } /* Chat column */ .chat-column { display: flex; flex-direction: column; gap: 0.6rem; min-height: 0; overflow: hidden; } .status-bar { display: flex; justify-content: space-between; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem 0.8rem; font-size: 0.8rem; flex-shrink: 0; } .status-left { display: flex; align-items: center; gap: 0.5rem; } .status-indicator { width: 9px; height: 9px; border-radius: 50%; background: var(--text-secondary); transition: background 0.3s; position: relative; } .status-indicator.running { background: var(--success); box-shadow: 0 0 8px var(--success); animation: pulse 2s infinite; } .status-indicator.loading { background: var(--warning); box-shadow: 0 0 8px var(--warning); animation: pulse 1s infinite; } .status-indicator.error { background: var(--danger); box-shadow: 0 0 8px var(--danger); } .status-mode { color: var(--text-secondary); font-size: 0.7rem; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } } .loading-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem; display: flex; flex-direction: column; gap: 0.65rem; flex-shrink: 0; } .loading-panel.hidden { display: none; } .loading-header { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; } .spinner { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } .progress-container { width: 100%; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; } .progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--success)); border-radius: 3px; transition: width 0.3s ease; width: 0%; } .loading-detail { font-size: 0.72rem; color: var(--text-secondary); } .controls { display: flex; gap: 0.75rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem 0.8rem; flex-shrink: 0; } .control-group { display: flex; align-items: center; gap: 0.4rem; } .control-group label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; } .control-group select, .control-group input { background: var(--bg); border: 1px solid var(--border); border-radius: 7px; color: var(--text); padding: 0.35rem 0.5rem; font-size: 0.8rem; } .control-group select { min-width: 200px; } .control-group input { width: 70px; } .chat { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-y: auto; padding: 0.9rem; display: flex; flex-direction: column; gap: 0.7rem; min-height: 0; } .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-secondary); text-align: center; gap: 0.6rem; } .empty-icon { font-size: 2.5rem; opacity: 0.5; } .message { display: flex; flex-direction: column; max-width: 88%; animation: popIn 0.22s ease-out; } .message.user { align-self: flex-end; } .message.assistant, .message.tool { align-self: flex-start; } .bubble { padding: 0.7rem 0.95rem; border-radius: 14px; word-break: break-word; line-height: 1.5; } .message.user .bubble { background: linear-gradient(135deg, rgba(88, 166, 255, 0.18), rgba(88, 166, 255, 0.05)); border: 1px solid rgba(88, 166, 255, 0.25); border-bottom-right-radius: 4px; } .message.assistant .bubble { background: var(--bg); border: 1px solid var(--border); border-bottom-left-radius: 4px; } .message.tool .bubble { background: rgba(63, 185, 80, 0.08); border: 1px solid rgba(63, 185, 80, 0.25); } .message .role-label { font-size: 0.65rem; color: var(--text-secondary); margin-bottom: 0.15rem; text-transform: uppercase; letter-spacing: 0.05em; } .tool-call-box, .tool-result-box { background: var(--tool-bg); border: 1px solid var(--tool-border); border-radius: 9px; padding: 0.55rem 0.75rem; margin: 0.3rem 0; font-family: var(--font-mono); font-size: 0.78rem; } .tool-call-box .label, .tool-result-box .label { color: var(--success); font-weight: 600; margin-bottom: 0.25rem; display: flex; align-items: center; gap: 0.25rem; } .tool-call-box pre, .tool-result-box pre { margin: 0; white-space: pre-wrap; color: var(--text); } .processing { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.65rem 0.9rem; flex-shrink: 0; } .processing.hidden { display: none; } .processing-content { display: flex; align-items: center; gap: 0.7rem; font-size: 0.85rem; color: var(--text-secondary); } .processing-dots { display: flex; gap: 4px; } .processing-dots span { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; } .processing-dots span:nth-child(1) { animation-delay: -0.32s; } .processing-dots span:nth-child(2) { animation-delay: -0.16s; } .processing-timer { margin-left: auto; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); } @keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } } @keyframes popIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } .input-area { display: flex; gap: 0.5rem; flex-shrink: 0; } .input-area textarea { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); padding: 0.7rem 0.9rem; font-size: 0.9rem; resize: none; min-height: 48px; max-height: 180px; } .input-area textarea:focus { outline: none; border-color: var(--accent); } /* Memory panel */ .memory-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); } .memory-actions { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.7rem; border-bottom: 1px solid var(--border); } .memory-actions input { background: var(--bg); border: 1px solid var(--border); border-radius: 7px; color: var(--text); padding: 0.35rem 0.5rem; font-size: 0.78rem; } .memory-list { flex: 1; overflow-y: auto; padding: 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; } .memory-empty { color: var(--text-secondary); font-size: 0.8rem; text-align: center; padding: 1rem 0; } .memory-item { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.55rem 0.65rem; font-size: 0.78rem; } .memory-meta { display: flex; gap: 0.4rem; align-items: center; margin-bottom: 0.25rem; } .memory-category { background: rgba(88, 166, 255, 0.15); color: var(--accent); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; } .memory-key { color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.7rem; } .memory-value { color: var(--text); word-break: break-word; line-height: 1.4; } .memory-actions-row { display: flex; gap: 0.3rem; margin-top: 0.35rem; justify-content: flex-end; } .memory-footer { display: flex; justify-content: space-between; padding: 0.6rem; border-top: 1px solid var(--border); background: rgba(0,0,0,0.1); } /* Utility */ .hidden { display: none !important; } /* Scrollbars */ ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #3d4450; }