:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#172033;background:#eef3fb;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px;background:radial-gradient(circle at top left,#dbeafe 0,transparent 30%),#eef3fb}button,input,textarea,select{font:inherit}button{transition:transform .15s ease,box-shadow .15s ease,background .15s ease,opacity .15s ease}button:not(:disabled):hover{transform:translateY(-1px)}button:disabled{cursor:default;opacity:.55}code,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.app-layout{display:flex;min-height:100vh;color:#172033}.sidebar{width:300px;padding:18px;background:linear-gradient(180deg,#111827,#0f172a);color:#fff;display:flex;flex-direction:column;gap:18px;box-shadow:14px 0 40px #0f172a22;z-index:3}.main-content{flex:1;min-width:0;background:#f4f7fb}.brand{display:flex;align-items:center;gap:12px;padding:4px 2px 8px}.brand-mark,.agent-card-icon,.agent-avatar{display:grid;place-items:center;width:38px;height:38px;border-radius:14px;background:linear-gradient(135deg,#60a5fa,#8b5cf6);color:#fff;font-weight:800;box-shadow:0 12px 30px #2563eb33}.brand strong{display:block;font-size:15px}.brand span,.muted{color:#94a3b8;font-size:12px}.new-thread,.thread,.agent-card,.draft button,.composer button,.center-page button{border:0;border-radius:14px;padding:11px 14px;cursor:pointer}.new-thread{background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;font-weight:700;box-shadow:0 14px 30px #2563eb33}.sidebar-section{display:grid;gap:8px;min-height:0}.threads-section{flex:1;overflow:hidden}.section-title{display:flex;align-items:center;justify-content:space-between;padding:0 2px}.section-title h3{margin:0;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#cbd5e1}.section-title span{color:#64748b;font-size:12px}.device-row{display:flex;align-items:center;gap:10px;color:#d1d5db;padding:9px 10px;border:1px solid #334155;border-radius:14px;background:#1e293b99}.device-row strong{display:block;font-size:13px;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.device-row small{display:block;color:#94a3b8}.dot{width:9px;height:9px;border-radius:999px;background:#64748b;box-shadow:0 0 0 4px #64748b22;flex:0 0 auto}.dot.online{background:#22c55e;box-shadow:0 0 0 4px #22c55e22}.project-group{display:grid;gap:5px;margin-top:6px}.project-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 8px;color:#e2e8f0;background:#1e293bcc;border:1px solid #334155;border-radius:12px}.project-heading span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:800;font-size:13px}.project-heading small{color:#94a3b8;white-space:nowrap}.thread{width:100%;text-align:left;background:transparent;color:#d1d5db;display:flex;flex-direction:column;gap:4px;border:1px solid transparent}.thread span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.thread.active{background:#f8fafc;color:#0f172a;box-shadow:0 12px 26px #0002}.thread:not(.active):hover{background:#1e293b;border-color:#334155;transform:none}.thread small{color:#94a3b8}.thread.active small{color:#64748b}.center-page{min-height:100vh;display:grid;place-content:center;text-align:center;gap:12px;padding:32px}.loading-state .spinner{width:34px;height:34px;margin:0 auto;border-radius:999px;border:3px solid #dbeafe;border-top-color:#2563eb;animation:spin 1s linear infinite}.empty-state{color:#334155}.empty-state .empty-icon{width:64px;height:64px;margin:0 auto;display:grid;place-items:center;border-radius:24px;background:#fff;box-shadow:0 18px 50px #0f172a14;font-size:28px;color:#2563eb}.empty-state code{display:inline-block;padding:8px 10px;border-radius:10px;background:#0f172a;color:#e2e8f0}@keyframes spin{to{transform:rotate(360deg)}}.agent-select-shell{padding:44px;max-width:1180px;margin:0 auto}.page-heading{margin-bottom:24px}.page-heading p,.draft-hero p{margin:0 0 6px;color:#2563eb;font-weight:800;letter-spacing:.08em;text-transform:uppercase;font-size:12px}.page-heading h1,.draft-hero h2{margin:0;font-size:clamp(28px,4vw,46px);color:#0f172a}.page-heading span,.draft-hero span{color:#64748b}.agent-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:16px}.agent-card{min-height:190px;background:#ffffffdb;color:#172033;box-shadow:0 18px 50px #0f172a14;border:1px solid #e2e8f0;display:flex;flex-direction:column;gap:8px;align-items:flex-start;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.agent-card:hover{box-shadow:0 22px 60px #2563eb22}.agent-card strong{font-size:18px}.agent-card span:not(.agent-card-icon){color:#64748b}.agent-card em{margin-top:auto;font-style:normal;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:700}.agent-card em.available{color:#166534;background:#dcfce7}.agent-card em.warning{color:#92400e;background:#fef3c7}.agent-card small{color:#b45309;text-align:left}.draft-shell{min-height:100vh;display:grid;place-items:center;padding:32px}.draft-card{width:min(840px,100%);display:flex;flex-direction:column;gap:16px;padding:28px;border-radius:28px;background:#ffffffe6;box-shadow:0 24px 80px #0f172a18;border:1px solid #e2e8f0}.draft-hero{display:flex;align-items:center;gap:16px;margin-bottom:6px}.draft-hero h2{font-size:32px}.draft label{display:grid;gap:8px;color:#334155;font-weight:700}.draft input,.draft textarea,.draft select,.draft-card input,.draft-card textarea,.draft-card select{width:100%;border:1px solid #d6dbe7;border-radius:14px;padding:12px 14px;background:#f8fafc;color:#172033;outline:none}.draft input:focus,.draft textarea:focus,.draft select:focus,.draft-card input:focus,.draft-card textarea:focus,.draft-card select:focus{border-color:#60a5fa;box-shadow:0 0 0 4px #60a5fa22;background:#fff}.draft textarea,.draft-card textarea{min-height:180px;resize:vertical}.draft-actions{display:flex;align-items:center;gap:14px}.draft-actions button{background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;font-weight:800;box-shadow:0 14px 30px #2563eb33}.draft-actions small{color:#64748b}.workspace-path{margin:-6px 0 0;color:#64748b;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;word-break:break-all}.workspace-error{margin:-6px 0 0;color:#b91c1c;font-size:13px}.chat-view{height:100vh;display:flex;flex-direction:column;background:linear-gradient(180deg,#f8fbff,#eef3fb)}.chat-header{position:sticky;top:0;z-index:2;padding:16px 22px;border-bottom:1px solid #e5e7eb;background:#ffffffdb;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);display:flex;justify-content:space-between;gap:12px;align-items:center}.chat-title{display:flex;flex-direction:column;gap:3px;min-width:0}.chat-title strong{color:#0f172a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-title span{color:#64748b;font-size:13px}.chat-status{display:flex;align-items:center;gap:10px;flex:0 0 auto}.status-pill,.readonly,.writable{border-radius:999px;padding:6px 10px;font-size:12px;font-weight:800}.status-pill.idle{background:#e2e8f0;color:#475569}.status-pill.running{background:#dbeafe;color:#1d4ed8}.writable{background:#dcfce7;color:#166534}.readonly{background:#fef3c7;color:#92400e;display:inline-flex;align-items:center;gap:6px}.readonly button{border:0;border-radius:999px;padding:4px 8px;color:#92400e;background:#fff;cursor:pointer}.messages{flex:1;overflow:auto;padding:28px max(24px,calc((100vw - 1120px)/2));display:flex;flex-direction:column;gap:14px;scroll-behavior:smooth}.message{max-width:min(860px,86%);padding:13px 15px;border-radius:18px;white-space:pre-wrap;line-height:1.65;word-break:break-word}.message.user{align-self:flex-end;background:linear-gradient(135deg,#2563eb,#3b82f6);color:#fff;border-bottom-right-radius:6px;box-shadow:0 14px 34px #2563eb22}.message.assistant{align-self:flex-start;background:#fff;border:1px solid #e2e8f0;box-shadow:0 10px 28px #0f172a0d;border-bottom-left-radius:6px}.message.thinking{color:#64748b;background:#f8fafc;border-left:4px solid #94a3b8;font-size:14px}.message.error{color:#991b1b;background:#fef2f2;border-color:#fecaca}.message-label{margin-bottom:6px;color:#64748b;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.message-attachments{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.attachment-preview{display:inline-flex;align-items:center;gap:8px;padding:7px 9px;border-radius:10px;background:#eef2ff;color:#1e3a8a;text-decoration:none;font-size:13px}.attachment-preview.image{flex-direction:column;align-items:flex-start;max-width:180px}.attachment-preview img{max-width:180px;max-height:120px;border-radius:8px;object-fit:cover;background:#fff}.message.user .attachment-preview{background:#dbeafe;color:#1e3a8a}.technical-message,.tool-row{align-self:flex-start;max-width:min(760px,86%);color:#64748b;background:transparent;border:0;padding:2px 4px}.tool-row summary{display:grid;grid-template-columns:8px auto minmax(0,1fr) auto;align-items:center;gap:8px;cursor:pointer;list-style:none;font-size:12px;color:#64748b}.tool-row summary::-webkit-details-marker{display:none}.tool-dot{width:7px;height:7px;border-radius:999px;background:#94a3b8}.tool-row.running .tool-dot,.tool-row.waiting .tool-dot{background:#2563eb;animation:pulse 1s ease-in-out infinite}.tool-row.done .tool-dot{background:#22c55e}.tool-row.failed .tool-dot{background:#ef4444}.tool-name{font-weight:700;color:#475569}.tool-summary{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-status{color:#94a3b8}.tool-row pre,.technical-message pre{overflow:auto;margin:8px 0 0 22px;white-space:pre-wrap;font-size:12px;color:#475569;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:10px}.streaming-indicator{align-self:flex-start;display:inline-flex;align-items:center;gap:9px;color:#64748b;background:#ffffffd1;border:1px solid #e2e8f0;border-radius:999px;padding:8px 12px;font-size:13px;box-shadow:0 10px 24px #0f172a0d}.streaming-indicator span{width:8px;height:8px;border-radius:999px;background:#2563eb;animation:pulse 1s ease-in-out infinite}@keyframes pulse{0%,to{opacity:.35;transform:scale(.8)}50%{opacity:1;transform:scale(1.1)}}.composer{position:relative;display:flex;gap:10px;padding:16px max(18px,calc((100vw - 1120px)/2));background:#ffffffe6;border-top:1px solid #e5e7eb;align-items:flex-end;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.slash-menu{position:absolute;left:max(18px,calc((100vw - 1120px)/2));bottom:calc(100% - 6px);width:min(520px,calc(100vw - 36px));padding:8px;border:1px solid #dbe3ef;border-radius:16px;background:#fffffff5;box-shadow:0 18px 60px #0f172a22;display:grid;gap:4px;z-index:5}.slash-menu button{display:grid;grid-template-columns:120px minmax(0,1fr);gap:10px;align-items:center;text-align:left;border:0;border-radius:10px;padding:9px 10px;background:transparent;color:#334155;cursor:pointer}.slash-menu button.active,.slash-menu button:hover{background:#eff6ff;transform:none}.slash-menu strong{color:#1d4ed8}.slash-menu span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#64748b;font-size:13px}.composer textarea{flex:1;min-height:50px;max-height:160px;border:1px solid #d6dbe7;border-radius:16px;padding:12px 14px;resize:vertical;outline:none;background:#f8fafc}.composer textarea:focus{border-color:#60a5fa;background:#fff;box-shadow:0 0 0 4px #60a5fa22}.composer button,.attach-button{border:0;border-radius:14px;padding:12px 15px;background:#2563eb;color:#fff;cursor:pointer;font-weight:800;min-height:48px}.attach-button{display:inline-flex;align-items:center}.composer button.secondary{background:#fee2e2;color:#991b1b}.attach-button input{display:none}.chat-view.drag-active{outline:3px dashed #2563eb;outline-offset:-10px}.attachment-tray{display:flex;flex-wrap:wrap;gap:8px;padding:10px max(18px,calc((100vw - 1120px)/2));background:#f8fafceb;border-top:1px solid #e5e7eb}.attachment-chip{display:grid;grid-template-columns:minmax(120px,240px) 100px auto auto;gap:8px;align-items:center;border:1px solid #d6dbe7;border-radius:999px;padding:7px 9px 7px 12px;background:#fff;box-shadow:0 8px 20px #0f172a0a}.attachment-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-chip progress{width:100%;accent-color:#2563eb}.attachment-chip.completed{border-color:#86efac}.attachment-chip.failed,.attachment-chip.cancelled{border-color:#fca5a5}.attachment-chip button{border:0;background:transparent;color:#991b1b;cursor:pointer}.interaction-card,.panel-card{background:#fff7ed;border:1px solid #fed7aa;border-radius:16px;padding:14px;max-width:min(860px,86%);box-shadow:0 10px 28px #0f172a0d}.interaction-card{display:grid;gap:10px}.interaction-header{display:flex;gap:8px;align-items:center;justify-content:space-between}.lane-badge{border-radius:999px;background:#ede9fe;color:#5b21b6;padding:2px 8px;font-size:12px}.interaction-actions{display:flex;flex-wrap:wrap;gap:8px}.interaction-actions button{border:0;border-radius:10px;padding:8px 10px;cursor:pointer}.interaction-edit{width:100%;min-height:120px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.interaction-error{color:#b91c1c}.question-form{display:grid;gap:10px}.question-field,.question-options{display:grid;gap:4px}.panel-card-frame{width:100%;min-height:360px;border:0;background:#fff;border-radius:12px}.error{color:#dc2626}.login-card{width:min(420px,calc(100vw - 32px));padding:28px;background:#fff;border-radius:20px;box-shadow:0 18px 48px #0002;display:flex;flex-direction:column;gap:14px;text-align:left}.login-card h1{margin:0}.login-card p{margin:0;color:#6b7280}.login-card label{display:flex;flex-direction:column;gap:6px;font-weight:600}.login-card input{border:1px solid #d6dbe7;border-radius:10px;padding:10px 12px}.login-card button,.github-login{border:0;border-radius:10px;padding:10px 12px;background:#2563eb;color:#fff;cursor:pointer;text-align:center;text-decoration:none}.login-card button:disabled{opacity:.6;cursor:default}.github-login{background:#111827}.error-banner{border-radius:10px;padding:10px 12px;color:#991b1b;background:#fee2e2}@media(max-width:820px){.app-layout{flex-direction:column}.sidebar{width:100%;max-height:42vh}.main-content,.chat-view{min-height:58vh}.chat-header,.composer{padding-left:14px;padding-right:14px}.messages{padding:18px 14px}.message,.interaction-card,.panel-card,.technical-message{max-width:94%}.composer{flex-wrap:wrap}.composer textarea{flex-basis:100%;order:-1}.agent-select-shell{padding:24px}.draft-shell{padding:18px}.draft-actions{align-items:flex-start;flex-direction:column}}
