:root{--bg:#0b0b0d;--surface:#161618;--surface-2:#1e1e21;--surface-3:#27272b;--border:#2a2a2f;--text:#ededf0;--muted:#8d8d96;--accent:#a99bff;--accent-strong:#8b7bff;--bubble-user:#6d5dfc;--danger:#ff6b6b;--ok:#3ecf8e;--radius:14px;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;font-size:15px}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}a{color:var(--accent);text-decoration:none}h1{margin:0;font-size:1.4rem}h2{margin:0 0 10px;font-size:1.1rem}strong{font-weight:600}input,textarea,select{background:var(--surface-2);border:1px solid var(--border);width:100%;color:var(--text);font:inherit;border-radius:10px;padding:10px 12px}input:focus,textarea:focus,select:focus{border-color:var(--accent);outline:none}textarea{resize:vertical}button{font:inherit;cursor:pointer;color:var(--text);background:var(--surface-2);border:0;border-radius:10px;padding:8px 14px}button:disabled{opacity:.45;cursor:default}button.primary{background:var(--accent-strong);color:#fff;font-weight:600}button.primary:hover:not(:disabled){background:var(--accent)}.btn-light{color:#111;background:#f2f2f4;padding:11px;font-weight:600}.btn-light:hover:not(:disabled){background:#fff}button.link{color:var(--accent);background:0 0;padding:0}.ghost-btn{color:var(--muted);background:0 0;align-items:center;gap:6px;display:inline-flex}.ghost-btn:hover{color:var(--text);background:var(--surface-2)}.round-btn{color:#111;background:#f2f2f4;border-radius:50%;flex-shrink:0;place-items:center;width:38px;height:38px;padding:0;display:grid}.danger{color:var(--danger)!important}.error{color:var(--danger);margin:0;font-size:.9rem}.muted{color:var(--muted)}.small{font-size:.85rem}.center{text-align:center}.pad{padding:20px}.row{align-items:center;gap:10px;display:flex}.between{justify-content:space-between}pre{white-space:pre-wrap;color:var(--muted);max-height:300px;font-size:.85rem;overflow:auto}code{color:var(--muted);word-break:break-all;font-size:.78rem}.app{gap:8px;height:100vh;padding:8px 8px 8px 0;display:flex}.rail{flex-direction:column;flex-shrink:0;align-items:center;gap:6px;width:64px;padding:8px 0;display:flex}.rail-logo{margin-bottom:10px}.rail a,.rail button{width:42px;height:42px;color:var(--muted);background:0 0;border-radius:12px;place-items:center;padding:0;display:grid}.rail a:hover,.rail button:hover{color:var(--text);background:var(--surface-2)}.rail a.active{color:var(--text);background:var(--surface-3)}.rail-spacer{flex:1}.rail-user{background:linear-gradient(135deg, var(--accent), #e3b5ff);color:#111;border-radius:50%;place-items:center;width:34px;height:34px;font-size:.9rem;font-weight:700;display:grid}.list{background:var(--surface);border-radius:var(--radius);flex-direction:column;flex-shrink:0;width:340px;min-height:0;display:flex}.list-top{gap:8px;padding:12px 12px 6px;display:flex}.search{background:var(--surface-2);color:var(--muted);border-radius:12px;flex:1;align-items:center;gap:8px;padding:0 12px;display:flex}.search input{background:0 0;border:0;padding:9px 0}.list-tabs{border-bottom:1px solid var(--border);gap:4px;padding:6px 12px 0;display:flex}.list-tabs button{color:var(--muted);background:0 0;border-bottom:2px solid #0000;border-radius:0;padding:8px 6px}.list-tabs button.on{color:var(--text);border-bottom-color:var(--text)}.list-items{flex-direction:column;gap:2px;padding:6px;display:flex;overflow-y:auto}.agent-item{text-align:left;background:0 0;border-radius:12px;align-items:center;gap:12px;width:100%;padding:10px;display:flex}.agent-item:hover{background:var(--surface-2)}.agent-item.active{background:var(--surface-3)}.agent-item-body{flex:1;min-width:0}.agent-item-top{align-items:center;gap:6px;display:flex}.agent-item-top strong{white-space:nowrap}.chip{color:var(--muted);background:var(--surface-3);white-space:nowrap;text-overflow:ellipsis;border-radius:6px;padding:1px 7px;font-size:.72rem;overflow:hidden}.time{color:var(--muted);flex-shrink:0;margin-left:auto;font-size:.75rem}.agent-item-preview{color:var(--muted);white-space:nowrap;text-overflow:ellipsis;margin-top:2px;font-size:.88rem;overflow:hidden}.agent-item-preview.working{color:var(--accent)}.avatar{color:#000000b3;border-radius:30%;flex-shrink:0;place-items:center;font-weight:800;display:grid;position:relative}.avatar-dot{background:var(--ok);border:2px solid var(--surface);border-radius:50%;width:12px;height:12px;animation:1.2s infinite pulse;position:absolute;bottom:-2px;right:-2px}.main{background:var(--surface);border-radius:var(--radius);flex-direction:column;flex:1;min-width:0;display:flex;overflow:hidden}.scroll-area{flex:1;padding:24px 28px;overflow-y:auto}.splash{place-items:center;height:100vh;display:grid}.empty-state{text-align:center;flex-direction:column;align-items:center;gap:10px;max-width:520px;margin:auto;padding:40px;line-height:1.6;display:flex}.empty-state h2{margin:6px 0 0}.agent-page{flex-direction:column;height:100%;min-height:0;display:flex}.agent-header{border-bottom:1px solid var(--border);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding:10px 16px;display:flex}.tabs{background:var(--surface-2);border-radius:10px;gap:2px;padding:3px;display:flex}.tabs a{color:var(--muted);border-radius:8px;padding:5px 14px;font-size:.9rem}.tabs a.active{background:var(--surface-3);color:var(--text)}.model-badge{color:var(--muted);background:var(--surface-2);border-radius:8px;padding:4px 10px;font-size:.8rem}.chat{flex-direction:column;flex:1;min-height:0;display:flex}.chat-bar{gap:8px;padding:10px 16px 0;display:flex}.conv-select{width:auto;max-width:320px;color:var(--muted);background:0 0;border-color:#0000;padding:6px 8px}.conv-select:hover{background:var(--surface-2)}.messages{flex-direction:column;flex:1;gap:6px;padding:16px 24px;display:flex;overflow-y:auto}.msg-block{flex-direction:column;display:flex}.time-sep{color:var(--muted);align-self:center;margin:14px 0 8px;font-size:.8rem}.msg{flex-direction:column;gap:8px;max-width:min(760px,85%);margin-bottom:6px;display:flex}.msg.user{align-self:flex-end}.bubble{background:var(--surface-2);border-radius:20px;padding:11px 16px;line-height:1.55;overflow-x:auto}.msg.user .bubble{background:var(--bubble-user);color:#fff}.bubble p{margin:0 0 8px}.bubble p:last-child{margin:0}.bubble ol,.bubble ul{margin:6px 0;padding-left:20px}.bubble.error{border:1px solid var(--danger)}.bubble table{border-collapse:collapse;font-size:.9rem}.bubble td,.bubble th{border:1px solid var(--border);padding:4px 8px}.bubble a{text-decoration:underline}.steps{font-size:.9rem}.steps summary{cursor:pointer;align-items:center;gap:4px;font-weight:600;list-style:none;display:inline-flex}.steps summary::-webkit-details-marker{display:none}.steps[open] summary svg{transform:rotate(90deg)}.step{background:var(--surface-2);border-radius:10px;flex-direction:column;gap:2px;margin-top:6px;padding:8px 12px;display:flex}.step-tool{font-size:.85rem;font-weight:600}.working{color:var(--muted);align-items:center;gap:10px;display:flex}.shimmer{animation:1.4s infinite pulse}@keyframes pulse{50%{opacity:.4}}.composer{background:var(--surface-2);border:1px solid var(--border);border-radius:24px;align-items:flex-end;gap:8px;margin:8px 16px 16px;padding:6px 6px 6px 18px;display:flex}.composer:focus-within{border-color:var(--surface-3)}.composer textarea{resize:none;background:0 0;border:0;max-height:200px;padding:9px 0}.send-btn{color:#111;background:#f2f2f4;border-radius:50%;flex-shrink:0;place-items:center;width:38px;height:38px;padding:0;display:grid}.page-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px;display:flex}.card{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);text-align:left;padding:16px}.list{gap:0}.scroll-area .list{background:0 0;flex-direction:column;gap:10px;width:auto;display:flex}.playbook:hover{border-color:var(--accent)}.tag{background:var(--surface-3);color:var(--muted);border-radius:99px;padding:2px 8px;font-size:.75rem;display:inline-block}.kind-regra{color:#ffb547;background:#3a2a10}.kind-licao{color:var(--ok);background:#12301f}.kind-material{color:#9aa6ff;background:#1f2340}.form{flex-direction:column;gap:12px;display:flex}.form label{color:var(--muted);flex-direction:column;gap:6px;font-size:.9rem;display:flex}.form label.check,label.check{color:var(--text);flex-direction:row;align-items:center;gap:8px}.check input{width:auto}.wide{max-width:820px}fieldset{border:1px solid var(--border);border-radius:10px;flex-direction:column;gap:6px;display:flex}fieldset.bare{border:0;gap:12px;margin:0;padding:0}legend{color:var(--muted);font-size:.9rem}.two-cols{grid-template-columns:minmax(300px,1fr) 1.2fr;align-items:start;gap:20px;display:grid}.form .two-cols{grid-template-columns:1fr 1fr;gap:12px}.segmented{background:var(--surface-3);border-radius:10px;padding:3px;display:flex}.segmented button{color:var(--muted);background:0 0;flex:1}.segmented button.on{background:var(--accent-strong);color:#fff}.knowledge summary{cursor:pointer;flex-wrap:wrap;align-items:center;gap:8px;display:flex}.modal{z-index:10;background:#000b;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.modal .card{background:var(--surface);width:100%;max-height:90vh;overflow:auto}.routine.off{opacity:.55}.routine-prompt{white-space:pre-wrap;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:8px 0 0;display:-webkit-box;overflow:hidden}.row.wrap{flex-wrap:wrap;align-items:flex-end}.row.wrap label{flex:1;min-width:150px}.flash{color:var(--ok);background:#12301f;border-radius:10px;padding:8px 12px}.switch{width:38px;height:22px;display:inline-block;position:relative}.switch input{opacity:0;width:0;height:0}.switch span{background:var(--surface-3);cursor:pointer;border-radius:99px;transition:all .2s;position:absolute;inset:0}.switch span:before{content:"";background:#fff;border-radius:50%;width:16px;height:16px;transition:all .2s;position:absolute;top:3px;left:3px}.switch input:checked+span{background:var(--ok)}.switch input:checked+span:before{transform:translate(16px)}.login{background:var(--surface);place-items:center;min-height:100vh;padding:20px;display:grid}.login-box{flex-direction:column;align-items:center;gap:28px;width:100%;max-width:380px;display:flex}.login-brand{align-items:center;gap:14px;font-size:1.8rem;font-weight:700;display:flex}.login-form{text-align:center;flex-direction:column;gap:14px;width:100%;display:flex}.login-form h1{font-size:1.3rem}.login-form p{margin:0}.otp{justify-content:center;gap:8px;display:flex}.otp input{text-align:center;background:var(--surface-2);width:46px;height:54px;padding:0;font-size:1.4rem;font-weight:600}@media (width<=860px){.app{flex-direction:column;gap:0;height:auto;min-height:100vh;padding:0}.rail{flex-direction:row;width:auto;padding:8px 12px}.rail-logo{margin:0 8px 0 0}.rail-spacer{flex:1}.list{border-radius:0;width:auto;max-height:40vh}.main{border-radius:0;min-height:60vh}.two-cols,.form .two-cols{grid-template-columns:1fr}.msg{max-width:92%}}
