:root {
--bg: #1a1a1a;
--bg-secondary: #242424;
--fg: #e0e0e0;
--fg-muted: #888;
--accent: #6366f1;
--accent-hover: #5558e3;
--user-bg: #2d2d2d;
--assistant-bg: #1e1e1e;
--tool-bg: #1a2a1a;
--border: #333;
--error: #ef4444;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg);
color: var(--fg);
height: 100vh;
line-height: 1.5;
}
#app {
display: flex;
flex-direction: column;
height: 100%;
max-width: 900px;
margin: 0 auto;
}
header {
padding: 1rem;
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
background: var(--bg-secondary);
}
header h1 {
font-size: 1.25rem;
font-weight: 600;
}
.header-controls {
display: flex;
gap: 0.5rem;
align-items: center;
}
#session-select {
padding: 0.5rem 0.75rem;
background: var(--user-bg);
color: var(--fg);
border: 1px solid var(--border);
border-radius: 6px;
font-size: 0.875rem;
cursor: pointer;
min-width: 180px;
}
#session-select:focus {
outline: none;
border-color: var(--accent);
}
#chat-container {
flex: 1;
overflow-y: auto;
padding: 1rem;
display: flex;
flex-direction: column;
}
#messages {
display: flex;
flex-direction: column;
gap: 1rem;
}
.message {
padding: 0.875rem 1rem;
border-radius: 8px;
white-space: pre-wrap;
word-break: break-word;
max-width: 85%;
}
.message.user {
background: var(--user-bg);
align-self: flex-end;
border-bottom-right-radius: 4px;
}
.message.assistant {
background: var(--assistant-bg);
align-self: flex-start;
border-bottom-left-radius: 4px;
border: 1px solid var(--border);
}
.message.tool {
background: var(--tool-bg);
font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
font-size: 0.85em;
align-self: flex-start;
border: 1px solid #2a3a2a;
max-width: 100%;
}
.message.error {
background: #2a1a1a;
border: 1px solid var(--error);
color: #fca5a5;
}
.message .tool-name {
color: #4ade80;
font-weight: 500;
}
.message .tool-output {
color: #a3a3a3;
margin-top: 0.25rem;
}
footer {
padding: 1rem;
border-top: 1px solid var(--border);
display: flex;
gap: 0.5rem;
background: var(--bg-secondary);
}
#input {
flex: 1;
padding: 0.75rem 1rem;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--user-bg);
color: var(--fg);
resize: none;
font-family: inherit;
font-size: 1rem;
line-height: 1.5;
min-height: 44px;
max-height: 200px;
}
#input:focus {
outline: none;
border-color: var(--accent);
}
#input::placeholder {
color: var(--fg-muted);
}
button {
padding: 0.75rem 1.25rem;
background: var(--accent);
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 0.9rem;
font-weight: 500;
transition: background 0.15s;
}
button:hover {
background: var(--accent-hover);
}
button:disabled {
background: #444;
cursor: not-allowed;
}
#chat-container::-webkit-scrollbar {
width: 8px;
}
#chat-container::-webkit-scrollbar-track {
background: var(--bg);
}
#chat-container::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 4px;
}
#chat-container::-webkit-scrollbar-thumb:hover {
background: #444;
}
.loading::after {
content: '';
display: inline-block;
width: 0.75em;
height: 0.75em;
border: 2px solid var(--fg-muted);
border-right-color: transparent;
border-radius: 50%;
animation: spin 0.8s linear infinite;
margin-left: 0.5em;
vertical-align: middle;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 1;
color: var(--fg-muted);
text-align: center;
padding: 2rem;
}
.empty-state h2 {
font-size: 1.5rem;
margin-bottom: 0.5rem;
color: var(--fg);
}
.empty-state p {
font-size: 0.9rem;
}
.status-panel {
background: var(--bg-secondary);
border-bottom: 1px solid var(--border);
padding: 0;
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out, padding 0.2s ease-out;
}
.status-panel:not(.hidden) {
max-height: 400px;
padding: 0.75rem 1rem;
}
.status-panel.hidden {
display: block;
}
.status-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.75rem;
font-weight: 500;
color: var(--fg);
}
.status-content {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.status-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.25rem 0;
font-size: 0.85rem;
}
.status-label {
color: var(--fg-muted);
}
.status-value {
color: var(--fg);
font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
font-size: 0.8rem;
}
.status-section {
margin-top: 0.75rem;
padding-top: 0.75rem;
border-top: 1px solid var(--border);
}
.status-section-title {
font-size: 0.75rem;
text-transform: uppercase;
color: var(--fg-muted);
margin-bottom: 0.5rem;
letter-spacing: 0.05em;
}
.icon-btn {
background: transparent;
border: none;
color: var(--fg-muted);
cursor: pointer;
padding: 0.25rem 0.5rem;
font-size: 1.2rem;
line-height: 1;
transition: color 0.15s;
}
.icon-btn:hover {
background: transparent;
color: var(--fg);
}
.status-dot {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--fg-muted);
transition: background 0.3s;
}
.status-dot.ok {
background: #4ade80;
}
.status-dot.sent {
background: #60a5fa;
}
.status-dot.skipped {
background: #fbbf24;
}
.status-dot.failed {
background: var(--error);
}
.status-dot.disabled {
background: var(--fg-muted);
}
.heartbeat-badge {
display: inline-block;
padding: 0.125rem 0.375rem;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
}
.heartbeat-badge.ok {
background: rgba(74, 222, 128, 0.2);
color: #4ade80;
}
.heartbeat-badge.sent {
background: rgba(96, 165, 250, 0.2);
color: #60a5fa;
}
.heartbeat-badge.skipped {
background: rgba(251, 191, 36, 0.2);
color: #fbbf24;
}
.heartbeat-badge.failed {
background: rgba(239, 68, 68, 0.2);
color: #ef4444;
}
.heartbeat-badge.disabled {
background: rgba(136, 136, 136, 0.2);
color: var(--fg-muted);
}
.logs-panel {
background: var(--bg-secondary);
border-bottom: 1px solid var(--border);
padding: 0;
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out, padding 0.2s ease-out;
}
.logs-panel:not(.hidden) {
max-height: 400px;
padding: 0.75rem 1rem;
}
.logs-panel.hidden {
display: block;
}
.logs-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
font-weight: 500;
color: var(--fg);
}
.logs-controls {
display: flex;
gap: 0.5rem;
align-items: center;
}
.logs-controls label {
font-size: 0.8rem;
color: var(--fg-muted);
display: flex;
align-items: center;
gap: 0.25rem;
}
.logs-controls input[type="checkbox"] {
width: 14px;
height: 14px;
}
#logs-output {
background: var(--bg);
border: 1px solid var(--border);
border-radius: 4px;
padding: 0.5rem;
font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
font-size: 0.75rem;
line-height: 1.4;
max-height: 300px;
overflow-y: auto;
color: var(--fg-muted);
white-space: pre;
margin: 0;
}
.sessions-panel {
position: fixed;
left: 0;
top: 0;
bottom: 0;
width: 350px;
background: var(--bg-secondary);
border-right: 1px solid var(--border);
transform: translateX(-100%);
transition: transform 0.2s ease-out;
z-index: 100;
display: flex;
flex-direction: column;
}
.sessions-panel:not(.hidden) {
transform: translateX(0);
}
.sessions-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
border-bottom: 1px solid var(--border);
font-weight: 500;
color: var(--fg);
}
#sessions-list {
flex: 1;
overflow-y: auto;
padding: 0.5rem;
}
.session-item {
padding: 0.75rem;
border-radius: 6px;
cursor: pointer;
margin-bottom: 0.5rem;
background: var(--bg);
border: 1px solid var(--border);
transition: background 0.15s;
}
.session-item:hover {
background: var(--user-bg);
}
.session-item-id {
font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
font-size: 0.8rem;
color: var(--fg);
margin-bottom: 0.25rem;
}
.session-item-meta {
font-size: 0.75rem;
color: var(--fg-muted);
}
#session-viewer {
flex: 1;
overflow-y: auto;
padding: 0.5rem;
}
#session-viewer.hidden {
display: none;
}
#session-back {
margin-bottom: 0.5rem;
padding: 0.5rem 0.75rem;
font-size: 0.85rem;
}
#session-messages {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
#session-messages .message {
max-width: 100%;
font-size: 0.85rem;
padding: 0.5rem 0.75rem;
}
.tool-call-block {
background: var(--tool-bg);
border: 1px solid #2a3a2a;
border-radius: 6px;
margin-top: 0.5rem;
overflow: hidden;
}
.tool-call-header {
background: #1a2a1a;
padding: 0.5rem 0.75rem;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.8rem;
color: #4ade80;
}
.tool-call-header:hover {
background: #223322;
}
.tool-call-body {
padding: 0.5rem 0.75rem;
font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
font-size: 0.75rem;
color: var(--fg-muted);
white-space: pre-wrap;
word-break: break-word;
display: none;
}
.tool-call-block.expanded .tool-call-body {
display: block;
}
@media (max-width: 600px) {
#app {
max-width: 100%;
}
.message {
max-width: 95%;
}
header h1 {
font-size: 1rem;
}
#session-select {
min-width: 120px;
}
}