:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: #0b0d12; color: #ecedf1; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 70% -10%, #273152 0, #0b0d12 35%); }
button, textarea, select, input { font: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr) 340px; }
.sidebar { padding: 22px 16px; border-right: 1px solid #242832; background: rgba(12, 14, 20, .88); display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; gap: 11px; align-items: center; padding: 0 6px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, #7c6cff, #3ac6d3); font-weight: 800; }
.brand div { display: grid; gap: 2px; }.brand small { color: #8f96a8; }
.primary, .send, .stop { border: 0; color: white; cursor: pointer; background: #6757e8; border-radius: 11px; }
.primary { padding: 11px 14px; font-weight: 650; }.primary:hover, .send:hover { background: #796cf0; }
.agent-picker { display: grid; gap: 6px; color: #8f96a8; font-size: 12px; }
.agent-picker select { padding: 9px; color: white; border: 1px solid #343946; border-radius: 8px; background: #20232c; }
.conversation-list { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 5px; }
.conversation { border: 0; color: #aeb4c3; background: transparent; text-align: left; padding: 11px; border-radius: 9px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation:hover, .conversation.active { color: white; background: #20232d; }
.connection { color: #8f96a8; font-size: 13px; display: flex; align-items: center; gap: 8px; padding: 6px; }
#connection-dot { width: 8px; height: 8px; border-radius: 50%; background: #e99c42; }
#connection-dot.online { background: #43c889; box-shadow: 0 0 10px #43c889; }
.chat-panel { min-width: 0; height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.chat-panel > header { padding: 18px 28px; border-bottom: 1px solid #242832; display: flex; align-items: center; justify-content: space-between; }
.chat-panel > header h1 { margin: 0; font-size: 17px; }.chat-panel > header p { color: #8f96a8; margin: 4px 0 0; font-size: 12px; }
#mode-badge { color: #aaa3ff; background: #282443; border: 1px solid #413a6c; padding: 5px 10px; border-radius: 99px; font-size: 12px; }
.messages { overflow-y: auto; padding: 32px max(24px, calc((100% - 820px) / 2)); }
.empty-state { text-align: center; color: #8f96a8; margin-top: 23vh; }.empty-state h2 { color: #e9eaf0; font-size: 25px; }
.message { max-width: 78%; margin: 0 0 22px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.message.user { margin-left: auto; background: #2a2d38; padding: 12px 16px; border-radius: 16px 16px 4px 16px; }
.message.assistant { margin-right: auto; }.message.assistant::before { content: "Flezi"; display: block; color: #8c82ff; font-size: 12px; font-weight: 700; margin-bottom: 5px; }
.message.error { color: #ff9b9b; }.cursor::after { content: "▌"; animation: blink .8s infinite; color: #8c82ff; }
@keyframes blink { 50% { opacity: 0; } }
.composer { margin: 16px auto 24px; width: min(820px, calc(100% - 40px)); padding: 9px; display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: end; border: 1px solid #303541; border-radius: 16px; background: #171a21; box-shadow: 0 16px 45px #0007; }
.composer textarea { resize: none; min-height: 42px; max-height: 180px; padding: 10px 5px; border: 0; outline: 0; color: white; background: transparent; }
.composer select { margin: 6px 0; padding: 6px; border-radius: 8px; color: #b7bdca; border: 1px solid #343946; background: #20232c; }
.send, .stop { width: 42px; height: 42px; font-size: 20px; }.send:disabled, .stop:disabled { opacity: .45; cursor: default; }
.stop { background: #d94d5c; font-size: 14px; }.stop:hover { background: #e45d6b; }
.activity-panel { min-width: 0; height: 100vh; border-left: 1px solid #242832; background: #101219; display: grid; grid-template-rows: auto 1fr; }
.activity-header { padding: 18px 16px; border-bottom: 1px solid #242832; display: flex; align-items: center; justify-content: space-between; }
.activity-header h2 { margin: 0; font-size: 14px; }.activity-header p { margin: 4px 0 0; color: #8f96a8; font-size: 11px; }
#event-count { min-width: 26px; padding: 4px 7px; border: 1px solid #3b4050; border-radius: 6px; color: #d4d7df; background: #20232c; text-align: center; font-size: 11px; }
.event-log { overflow-y: auto; padding: 12px; }
.event-empty { padding: 28px 8px; color: #737b8e; text-align: center; font-size: 12px; }
.event-row { border-bottom: 1px solid #242832; color: #aeb4c3; }
.event-row > summary { list-style: none; display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 10px; padding: 12px 4px; cursor: pointer; }
.event-row > summary::-webkit-details-marker { display: none; }
.event-marker { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #8991a3; }
.event-copy { min-width: 0; display: grid; gap: 4px; }.event-copy strong { color: #e4e6ec; font-size: 12px; font-weight: 650; }
.event-summary { overflow: hidden; color: #949bad; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.event-meta { min-width: 0; display: flex; align-items: center; gap: 7px; color: #6f7789; font-size: 10px; }
.event-meta code { overflow: hidden; color: #9ea5b6; text-overflow: ellipsis; white-space: nowrap; }.event-meta time { margin-left: auto; white-space: nowrap; }
.event-repeats { color: #d6bb67; }
.event-row pre { max-height: 230px; overflow: auto; margin: 0 4px 12px 27px; padding: 10px; border: 1px solid #303541; border-radius: 6px; color: #b9c0ce; background: #0a0c11; font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
.event-lifecycle .event-marker, .event-message .event-marker { background: #5a9fe8; }.event-reasoning .event-marker, .event-planning .event-marker { background: #d6bb67; }
.event-tool .event-marker, .event-agent .event-marker { background: #b07be8; }.event-approval .event-marker, .event-steering .event-marker { background: #e28b4e; }
.event-artifact .event-marker { background: #4ab8bd; }.event-success .event-marker { background: #43c889; }.event-error .event-marker { background: #df6671; }
dialog { border: 1px solid #353a48; border-radius: 16px; color: white; background: #171a21; width: min(420px, calc(100% - 32px)); } dialog::backdrop { background: #05060aaf; }
dialog form { display: grid; gap: 14px; } dialog h2, dialog p { margin: 0; } dialog p { color: #9aa1b2; }
dialog label { display: grid; gap: 6px; color: #c7cad4; font-size: 13px; } dialog input { padding: 10px; color: white; border: 1px solid #363b48; border-radius: 8px; background: #101218; }
.error { color: #ff9292 !important; }
@media (max-width: 1050px) { .app-shell { grid-template-columns: minmax(0, 1fr) 300px; }.sidebar { display: none; } }
@media (max-width: 700px) { .app-shell { height: 100vh; grid-template-columns: 1fr; grid-template-rows: minmax(0, 2fr) minmax(220px, 1fr); }.chat-panel { height: auto; min-height: 0; }.activity-panel { height: auto; min-height: 0; border-top: 1px solid #242832; border-left: 0; }.activity-header { padding: 10px 16px; }.event-log { padding: 4px 12px; }.message { max-width: 92%; }.chat-panel > header { padding: 12px 18px; }.messages { padding-top: 20px; }.composer { margin-bottom: 12px; } }
