:root{--bg: #f6f7f9;--panel: #ffffff;--text: #1c1f24;--muted: #6b7280;--border: #e3e6ea;--accent: #2f5bea;--accent-text: #ffffff;--user-bg: #2f5bea;--agent-bg: #eef0f3;--error: #c62828;--ok: #2e9d57;--off: #c62828;color-scheme:light dark}@media(prefers-color-scheme:dark){:root{--bg: #121417;--panel: #1a1d21;--text: #e6e8eb;--muted: #9aa1ab;--border: #2a2e34;--accent: #5b7cfa;--agent-bg: #24282e;--user-bg: #3d5fd9;--error: #ef6b6b}}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font:15px/1.5 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text)}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer;border:0;border-radius:8px;padding:.55rem 1rem;background:var(--accent);color:var(--accent-text)}button:disabled{opacity:.5;cursor:default}button.ghost{background:transparent;color:var(--muted);padding:.35rem .6rem}button.ghost:hover{color:var(--text)}input,textarea{width:100%;border:1px solid var(--border);border-radius:8px;background:var(--panel);padding:.6rem .75rem}input:focus,textarea:focus,button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.login{min-height:100%;display:grid;place-items:center;padding:16px}.login-card{width:100%;max-width:360px;display:flex;flex-direction:column;gap:.75rem;background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:1.75rem}.login-card h1{margin:0 0 .5rem;font-size:1.35rem}.login-card label{font-weight:600;font-size:.9rem}.hint{margin:0;color:var(--muted);font-size:.8rem}.error{margin:0;color:var(--error);font-size:.9rem}.layout{height:100%;display:flex}.sidebar{width:260px;flex-shrink:0;background:var(--panel);border-right:1px solid var(--border);padding:1rem;display:flex;flex-direction:column;gap:.5rem}.sidebar-head{display:flex;align-items:center;justify-content:space-between}.brand{font-weight:700}.sidebar h2{margin:1rem 0 .25rem;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}.agents{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.agent{width:100%;display:grid;grid-template-columns:auto 1fr;column-gap:.6rem;align-items:center;text-align:left;background:transparent;color:var(--text);padding:.55rem .65rem}.agent:hover{background:var(--agent-bg)}.agent.active{background:var(--agent-bg);font-weight:600}.agent .dot{grid-row:span 2}.agent-status{grid-column:2;font-size:.8rem;color:var(--muted);font-weight:400}.muted{color:var(--muted);font-size:.9rem}.dot{width:9px;height:9px;border-radius:50%;background:var(--muted);flex-shrink:0}.dot.online{background:var(--ok)}.dot.offline{background:var(--off)}.chat{flex:1;min-width:0;display:flex;flex-direction:column}.chat-head{display:flex;align-items:center;gap:.6rem;padding:.8rem 1rem;border-bottom:1px solid var(--border);background:var(--panel)}.chat-title{font-weight:600}.menu{display:none;font-size:1.1rem}.messages{flex:1;overflow-y:auto;padding:1.25rem 1rem;display:flex;flex-direction:column;gap:.6rem}.empty{margin:auto;color:var(--muted);text-align:center}.msg{max-width:min(720px,85%);padding:.6rem .85rem;border-radius:12px;white-space:pre-wrap;overflow-wrap:anywhere}.msg.user{align-self:flex-end;background:var(--user-bg);color:#fff;border-bottom-right-radius:4px}.msg.agent{align-self:flex-start;background:var(--agent-bg);border-bottom-left-radius:4px}.msg.error{align-self:flex-start;color:var(--error);border:1px solid var(--error);background:transparent}.typing{color:var(--muted)}.composer{display:flex;gap:.5rem;align-items:flex-end;padding:.75rem 1rem calc(.75rem + env(safe-area-inset-bottom));border-top:1px solid var(--border);background:var(--panel)}.composer textarea{resize:none;max-height:40vh;field-sizing:content;min-height:2.6rem}.backdrop{display:none}@media(max-width:720px){.menu{display:inline-block}.sidebar{position:fixed;inset:0 auto 0 0;z-index:20;width:min(280px,85vw);transform:translate(-100%);transition:transform .2s ease}.sidebar.open{transform:none}.backdrop{display:block;position:fixed;top:0;right:0;bottom:0;left:0;z-index:10;background:#00000059}.messages{padding:1rem 16px}.composer{padding-left:16px;padding-right:16px}.msg{max-width:92%}}
