:root{color:#0f172a;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:#f8fafc;font-family:Inter,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-weight:400;line-height:1.5}*{box-sizing:border-box}html,body,#root{min-height:100vh;margin:0}body{background:linear-gradient(#eef4ff 0%,#f8fafc 100%);margin:0}button,input,textarea,select{font:inherit}button{font-family:inherit}h1,h2,p{margin:0}img{max-width:100%;display:block}.auth-shell{background:linear-gradient(135deg,#0f172a,#1d4ed8 45%,#7c3aed);justify-content:center;align-items:center;min-height:100vh;padding:24px;display:flex}.auth-card{background:#fffffff2;border:1px solid #fff3;border-radius:24px;width:min(440px,100%);padding:28px;box-shadow:0 20px 45px #0f172a33}.brand-header{align-items:center;gap:14px;margin-bottom:24px;display:flex}.brand-mark.large{width:54px;height:54px;font-size:26px}.auth-title{font-size:2rem}.auth-form{flex-direction:column;gap:18px;display:flex}.auth-form label{color:#334155;flex-direction:column;gap:8px;font-size:.92rem;font-weight:600;display:flex}.auth-form input{font:inherit;background:#fff;border:1px solid #94a3b866;border-radius:12px;outline:none;padding:12px 14px}.auth-toggle{background:#94a3b81f;border-radius:14px;grid-template-columns:repeat(3,1fr);margin-bottom:20px;padding:6px;display:grid}.toggle{cursor:pointer;color:#334155;background:0 0;border:none;border-radius:10px;padding:10px 12px;font-weight:700}.toggle.active{color:#fff;background:#111827}.auth-submit{cursor:pointer;border:none;width:100%;padding:12px 14px}.logout-button{color:inherit;cursor:pointer;background:#94a3b814;border:1px solid #94a3b840;border-radius:12px;margin-top:auto;padding:10px 12px}.app-shell{color:#101828;background:linear-gradient(#f5f7ff 0%,#eef2ff 100%);min-height:100vh;display:flex}.sidebar{color:#e5eefc;background:#0f172af5;flex-direction:column;gap:18px;width:280px;padding:22px 18px;display:flex}.sidebar-header{align-items:center;gap:12px;padding:8px 6px;display:flex}.brand-mark{background:linear-gradient(135deg,#7c3aed,#2563eb);border-radius:14px;justify-content:center;align-items:center;width:42px;height:42px;font-size:20px;font-weight:800;display:flex;box-shadow:0 10px 22px #7c3aed59}.brand-mark.small{border-radius:10px;width:32px;height:32px;font-size:16px}.brand-name{font-size:1.2rem;font-weight:700}.brand-subtitle{color:#a5b4cf;font-size:.72rem}.sidebar-button,.primary-button,.send-button,.code-header button,.chat-item,.action-button,.export-button,.theme-toggle,.rename-box button{transition:all .2s}.sidebar-button,.primary-button,.export-button,.theme-toggle,.rename-box button{cursor:pointer;border:none;border-radius:12px;font-weight:600}.sidebar-button{color:#eff6ff;text-align:center;background:#94a3b82e;padding:12px 14px}.workspace-panel{background:#94a3b814;border:1px solid #94a3b82e;border-radius:14px;flex-direction:column;gap:8px;padding:12px;display:flex}.workspace-panel label{color:#a5b4cf;text-transform:uppercase;letter-spacing:.08em;font-size:.72rem}.workspace-panel select,.workspace-create input{color:#e2e8f0;background:#02061759;border:1px solid #94a3b840;border-radius:9px;outline:none;width:100%;padding:8px}.workspace-create{gap:6px;display:flex}.workspace-create button{color:#fff;cursor:pointer;background:#2563eb;border:0;border-radius:9px;width:34px}.sidebar-button:hover,.primary-button:hover,.export-button:hover,.theme-toggle:hover,.rename-box button:hover,.action-button:hover{transform:translateY(-1px)}.chat-list-label{color:#9aa8c2;letter-spacing:.08em;text-transform:uppercase;padding:0 4px;font-size:.72rem}.chat-list{flex-direction:column;gap:8px;display:flex;overflow-y:auto}.chat-item-wrap{background:0 0;border-radius:12px;align-items:center;gap:8px;padding:4px;display:flex}.chat-item-wrap.active{background:linear-gradient(135deg,#60a5fa33,#a78bfa29);border:1px solid #93c5fd4d}.chat-item{color:#d9e5ff;text-align:left;cursor:pointer;background:0 0;border:none;border-radius:12px;flex:1;align-items:center;gap:10px;padding:12px 10px;font-size:.95rem;display:flex}.chat-item:hover{background:#94a3b81f}.chat-actions{align-items:center;gap:4px;display:flex}.action-button,.theme-toggle{cursor:pointer;width:30px;height:30px;color:inherit;background:#94a3b81f;border:none;border-radius:8px;justify-content:center;align-items:center;display:flex}.action-button.danger{color:#fecaca}.chat-icon{opacity:.8}.main-panel{flex-direction:column;flex:1;min-width:0;display:flex}.topbar{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#fff9;border-bottom:1px solid #94a3b840;justify-content:space-between;align-items:center;padding:18px 28px;display:flex}.topbar-brand{align-items:center;gap:10px;font-size:1.1rem;font-weight:700;display:flex}.topbar-actions{align-items:center;gap:14px;display:flex}.chat-search{color:#0f172a;background:#ffffffbf;border:1px solid #94a3b84d;border-radius:10px;outline:none;width:130px;padding:8px 10px}.capability-bar{background:#ffffff2e;border-bottom:1px solid #94a3b82e;flex-wrap:wrap;gap:10px;padding:18px 28px 0;display:flex}.capability-pill{color:#334155;cursor:pointer;background:#94a3b81a;border:1px solid #94a3b833;border-radius:999px;padding:8px 14px;font-weight:600;transition:all .2s}.capability-pill.active{color:#fff;background:linear-gradient(135deg,#111827,#2563eb);border-color:#0000;box-shadow:0 12px 26px #2563eb38}.document-panel{background:#ffffffe0;border:1px solid #94a3b840;border-radius:18px;flex-direction:column;gap:12px;max-width:980px;margin:0 auto 14px;padding:16px;display:flex}.document-header{justify-content:space-between;align-items:end;gap:12px;display:flex}.document-header label{color:#475569;flex-direction:column;flex:1;gap:6px;font-size:.8rem;font-weight:600;display:flex}.document-header input,.document-panel textarea{font:inherit;color:#0f172a;background:#ffffffe6;border:1px solid #94a3b859;border-radius:12px;outline:none;padding:10px 12px}.document-panel textarea{resize:vertical;min-height:120px}.document-list{flex-wrap:wrap;gap:10px;display:flex}.document-list select{color:#334155;background:#ffffffe6;border:1px solid #94a3b859;border-radius:10px;width:100%;padding:9px}.admin-panel{color:#e2e8f0;background:#0f172a;border-radius:14px;align-items:center;gap:12px;max-width:980px;margin:0 auto 18px;padding:14px;display:flex}.admin-panel div{flex-direction:column;min-width:90px;display:flex}.admin-panel strong{font-size:1.35rem}.admin-panel span{color:#94a3b8;font-size:.75rem}.admin-panel button{color:#e2e8f0;cursor:pointer;background:0 0;border:1px solid #e2e8f04d;border-radius:8px;margin-left:auto;padding:7px 10px}.document-item{color:#334155;background:#94a3b81a;border:1px solid #94a3b82e;border-radius:10px;flex-direction:column;gap:4px;padding:8px 10px;display:flex}.document-item small{color:#64748b}.primary-button.small{padding:10px 12px;font-size:.86rem}.model-picker{color:#334155;background:#ffffffd9;border:1px solid #94a3b859;border-radius:12px;align-items:center;gap:10px;padding:8px 12px;font-size:.85rem;display:flex}.model-picker select{color:#0f172a;font:inherit;background:0 0;border:none;outline:none}.primary-button,.export-button{color:#fff;background:linear-gradient(135deg,#111827,#1d4ed8);padding:10px 16px}.theme-toggle{color:inherit;background:#94a3b81f}.chat-area{flex:1;padding:30px 28px 20px;overflow-y:auto}.rename-box{background:#ffffffb3;border:1px solid #94a3b840;border-radius:14px;gap:10px;max-width:980px;margin:0 auto 18px;padding:10px;display:flex}.rename-box input{font:inherit;background:0 0;border:none;outline:none;flex:1;padding:8px 10px}.rename-box button{color:#fff;background:linear-gradient(135deg,#111827,#2563eb);padding:10px 16px}.welcome-screen{text-align:center;color:#0f172a;flex-direction:column;justify-content:center;align-items:center;min-height:58vh;display:flex}.welcome-mark{color:#fff;background:linear-gradient(135deg,#0f172a,#2563eb);border-radius:20px;justify-content:center;align-items:center;width:72px;height:72px;margin-bottom:18px;font-size:30px;font-weight:700;display:flex;box-shadow:0 12px 28px #2563eb40}.welcome-screen h1{margin:0 0 10px;font-size:clamp(2rem,2.4vw,3rem)}.welcome-screen p{color:#475569;max-width:620px;font-size:1.05rem}.messages{flex-direction:column;gap:22px;max-width:980px;margin:0 auto;display:flex}.message-row{align-items:flex-start;gap:14px;display:flex}.avatar{color:#1e293b;background:#94a3b833;border-radius:12px;justify-content:center;align-items:center;width:36px;min-width:36px;height:36px;font-size:.72rem;font-weight:700;display:flex}.message-row.assistant .avatar{color:#fff;background:linear-gradient(135deg,#111827,#2563eb)}.message-content{color:#1f2937;word-break:break-word;flex:1;max-width:840px;font-size:1rem;line-height:1.75}.message-row.user .message-content{background:#fffc;border:1px solid #94a3b840;border-radius:16px;padding:14px 16px}.message-row.assistant .message-content{background:#ffffff85;border:1px solid #94a3b82e;border-radius:16px;padding:14px 16px}.thinking span{animation:1.4s infinite blink}.thinking span:nth-child(2){animation-delay:.2s}.thinking span:nth-child(3){animation-delay:.4s}@keyframes blink{0%,to{opacity:.2}50%{opacity:1}}.composer-wrap{padding:0 28px 22px}.error-box{color:#991b1b;background:#fee2e2cc;border:1px solid #ef44444d;border-radius:10px;max-width:980px;margin:0 auto 12px;padding:10px 12px;font-size:.9rem}.auth-error{margin:0}.composer{background:#ffffffe6;border:1px solid #94a3b859;border-radius:18px;align-items:flex-end;gap:12px;max-width:980px;margin:0 auto;padding:12px 12px 12px 16px;display:flex;box-shadow:0 18px 40px #0f172a14}.composer textarea{resize:none;font:inherit;color:#0f172a;background:0 0;border:none;outline:none;flex:1;min-height:48px;max-height:180px;padding:10px 0}.send-button{color:#fff;cursor:pointer;background:linear-gradient(135deg,#111827,#2563eb);border:none;border-radius:14px;width:48px;height:48px;font-size:1.5rem;font-weight:700}.send-button:disabled{opacity:.5;cursor:not-allowed}.stop-button{background:#be123c}.retry-button{color:#475569;cursor:pointer;background:0 0;border:1px solid #94a3b84d;border-radius:10px;margin:10px auto 0;padding:7px 11px;display:block}.footer-text{text-align:center;color:#64748b;max-width:980px;margin:12px auto 0;font-size:.72rem}.code-block{background:#0f172af5;border:1px solid #94a3b840;border-radius:14px;margin:14px 0;overflow:hidden}.code-header{color:#cbd5e1;background:#1e293be6;justify-content:space-between;align-items:center;padding:8px 12px;font-size:.76rem;display:flex}.code-header button{color:#fff;cursor:pointer;background:#ffffff0f;border:1px solid #94a3b866;border-radius:8px;padding:6px 10px}.code-header button:hover{background:#ffffff1a}.code-block pre{color:#e2e8f0;margin:0;padding:16px;font-family:Consolas,Monaco,monospace;font-size:.87rem;line-height:1.7;overflow-x:auto}.inline-code{background:#94a3b826;border-radius:6px;padding:2px 6px;font-family:Consolas,Monaco,monospace}body[data-theme=dark] .auth-card{background:#0f172ae6;border-color:#94a3b833}body[data-theme=dark] .auth-form label,body[data-theme=dark] .toggle,body[data-theme=dark] .auth-card{color:#e2e8f0}body[data-theme=dark] .auth-form input{color:#e2e8f0;background:#0f172ae6}body[data-theme=dark] .app-shell{color:#e2e8f0;background:linear-gradient(#020817 0%,#0f172a 100%)}body[data-theme=dark] .sidebar{color:#e2e8f0;background:#020617f5}body[data-theme=dark] .chat-item{color:#dbeafe}body[data-theme=dark] .topbar{background:#0f172ab8;border-color:#94a3b82e}body[data-theme=dark] .model-picker,body[data-theme=dark] .composer,body[data-theme=dark] .chat-search,body[data-theme=dark] .rename-box,body[data-theme=dark] .document-panel,body[data-theme=dark] .message-row.user .message-content,body[data-theme=dark] .message-row.assistant .message-content,body[data-theme=dark] .export-button,body[data-theme=dark] .theme-toggle{color:#e2e8f0;background:#0f172ae6;border-color:#94a3b82e}body[data-theme=dark] .message-row.user .message-content,body[data-theme=dark] .message-row.assistant .message-content{background:#0f172ac7}body[data-theme=dark] .welcome-screen,body[data-theme=dark] .message-content,body[data-theme=dark] .composer textarea,body[data-theme=dark] .chat-search,body[data-theme=dark] .document-panel textarea,body[data-theme=dark] .document-header input,body[data-theme=dark] .rename-box input{color:#e2e8f0}body[data-theme=dark] .capability-pill{color:#e2e8f0;background:#94a3b814;border-color:#94a3b833}body[data-theme=dark] .document-item{background:#94a3b814;border-color:#94a3b82e}body[data-theme=dark] .document-list select{color:#e2e8f0;background:#0f172ae6;border-color:#94a3b833}body[data-theme=dark] .welcome-screen p,body[data-theme=dark] .footer-text{color:#a5b4cf}body[data-theme=dark] .inline-code{background:#94a3b82e}@media (width<=900px){.app-shell{flex-direction:column}.sidebar{width:100%;padding-bottom:10px}.chat-list{max-height:220px}.topbar{padding:14px 18px}.chat-area,.composer-wrap{padding-left:18px;padding-right:18px}}@media (width<=600px){.auth-toggle{grid-template-columns:1fr}.admin-panel{flex-wrap:wrap}.topbar-actions{flex-wrap:wrap;gap:8px}.model-picker{padding:6px 8px}.primary-button,.export-button{padding:8px 10px}.message-row{gap:10px}.message-content{font-size:.96rem}}
