*{box-sizing:border-box}:root{color:#0f172a;background:#e8eef6;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}body{background:#e8eef6;min-height:100vh;margin:0}button,textarea,input{font-family:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.65}.loading-page,.login-page{background:radial-gradient(circle at 0 0,#fff,#e8eef6);place-items:center;min-height:100vh;padding:24px;display:grid}.loading-page{color:#64748b;gap:14px;font-weight:800}.login-card{background:#fff;border:1px solid #e2e8f0;border-radius:30px;gap:20px;width:min(460px,100%);padding:34px;display:grid;box-shadow:0 28px 90px #0f172a29}.login-card h1{letter-spacing:-.04em;color:#0f172a;margin:0 0 8px;font-size:32px}.login-card p{color:#64748b;margin:0;line-height:1.55}.auth-tabs{background:#f1f5f9;border-radius:18px;grid-template-columns:1fr 1fr;gap:10px;padding:6px;display:grid}.auth-tabs button{color:#64748b;background:0 0;border:none;border-radius:14px;padding:12px;font-weight:900}.auth-tabs .auth-tab-active{color:#0f172a;background:#fff;box-shadow:0 8px 24px #0f172a14}.login-card label,.settings-section label{color:#1e293b;gap:8px;font-weight:800;display:grid}.login-card input,.settings-section input{color:#0f172a;background:#f8fafc;border:1px solid #dbe4f0;border-radius:16px;outline:none;padding:15px 16px;font-size:15px}.login-card input:focus,.settings-section input:focus{background:#fff;border-color:#ff7a1a;box-shadow:0 0 0 4px #ff7a1a21}.login-card button[type=submit],.settings-section button{color:#fff;background:#ff7a1a;border:none;border-radius:18px;padding:15px 18px;font-size:15px;font-weight:900;box-shadow:0 16px 35px #ff7a1a42}.text-link-button{color:#2563eb;text-align:left;background:0 0;border:none;width:fit-content;padding:0;font-weight:900}.text-link-button:hover{text-decoration:underline}.auth-status,.settings-status{background:#f8fafc;border:1px solid #dbe4f0;border-radius:16px;padding:12px;font-size:14px;line-height:1.45;color:#475569!important}.app-shell{grid-template-columns:300px minmax(0,1fr) 330px;gap:18px;min-height:100vh;padding:18px;display:grid}.sidebar{color:#fff;background:#111827;border-radius:30px;flex-direction:column;justify-content:space-between;min-height:calc(100vh - 36px);padding:24px;display:flex;box-shadow:0 22px 70px #0f172a47}.brand{align-items:center;gap:16px;display:flex}.brand-icon{color:#fff;background:linear-gradient(135deg,#ff9f43,#ff6b00);border-radius:16px;place-items:center;width:52px;height:52px;font-weight:900;display:grid;box-shadow:0 14px 35px #ff6b0052}.brand-icon.large{width:60px;height:60px;font-size:24px}.brand h1{letter-spacing:-.03em;margin:0;font-size:22px}.brand p{color:#94a3b8;margin:4px 0 0;font-size:13px}.nav{gap:12px;margin-top:34px;display:grid}.nav button{text-align:left;color:#cbd5e1;background:0 0;border:none;border-radius:18px;width:100%;padding:16px 18px;font-size:15px;font-weight:800}.nav button:hover:not(:disabled),.nav-active{color:#fff!important;background:#1f2937!important}.sidebar-history{margin-top:26px}.sidebar-history-header{color:#cbd5e1;justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}.sidebar-history-header h2{margin:0;font-size:15px}.sidebar-history-header span{color:#94a3b8;font-size:13px;font-weight:900}.sidebar-history-list{gap:10px;max-height:360px;padding-right:4px;display:grid;overflow-y:auto}.sidebar-history-list p{color:#94a3b8;margin:0;font-size:14px}.sidebar-history-item{text-align:left;color:#e5e7eb;background:0 0;border:1px solid #0000;border-radius:16px;gap:5px;padding:12px;display:grid}.sidebar-history-item:hover,.sidebar-history-item.active-session{background:#1f2937;border-color:#334155}.sidebar-history-item span{text-overflow:ellipsis;white-space:nowrap;font-weight:900;overflow:hidden}.sidebar-history-item small{color:#94a3b8}.sidebar-footer{gap:14px;display:grid}.user-card{background:#1f2937;border-radius:22px;align-items:center;gap:14px;padding:16px;display:flex}.avatar{color:#fff;background:#ff6b00;border-radius:15px;flex:none;place-items:center;width:42px;height:42px;font-weight:900;display:grid}.user-name{text-overflow:ellipsis;white-space:nowrap;max-width:170px;margin:0;font-weight:900;overflow:hidden}.user-role{color:#94a3b8;text-overflow:ellipsis;white-space:nowrap;max-width:170px;margin:4px 0 0;font-size:12px;overflow:hidden}.logout-btn{color:#fca5a5;text-align:left;background:0 0;border:none;padding:6px 4px;font-weight:800}.chat-panel{background:#fff;border-radius:30px;grid-template-rows:auto auto 1fr auto;min-height:calc(100vh - 36px);padding:26px;display:grid;overflow:hidden;box-shadow:0 22px 70px #0f172a14}.chat-header{border-bottom:1px solid #e2e8f0;justify-content:space-between;gap:20px;padding-bottom:22px;display:flex}.chat-header h2{letter-spacing:-.05em;margin:0;font-size:32px}.chat-header p{color:#64748b;margin:8px 0 0;font-size:16px}.top-actions{white-space:nowrap;align-items:flex-start;gap:10px;display:flex}.kg-pill{color:#1e293b;background:#f1f5f9;border-radius:999px;padding:12px 16px;font-size:13px;font-weight:900}.ui-error{color:#991b1b;background:#fee2e2;border-radius:16px;margin-top:14px;padding:12px 14px;font-weight:800}.messages{flex-direction:column;gap:22px;padding:26px 4px;display:flex;overflow-y:auto}.message-row{align-items:flex-start;gap:16px;display:flex}.message-row.message-user{justify-content:flex-end}.message-row.message-user .message-avatar{background:#ff6b00;order:2}.message-row.message-user .message-bubble{color:#fff;background:#0f172a;border-color:#0f172a;order:1;max-width:78%}.message-avatar{color:#fff;background:#0f172a;border-radius:999px;flex:none;place-items:center;width:42px;height:42px;font-weight:900;display:grid}.message-bubble{background:#f8fafc;border:1px solid #e2e8f0;border-radius:22px;max-width:86%;padding:18px 22px;font-size:15px;line-height:1.55;box-shadow:0 18px 50px #0f172a0f}.message-files{flex-wrap:wrap;gap:8px;margin-bottom:12px;display:flex}.file-pill{color:#3730a3;background:#eef2ff;border-radius:999px;align-items:center;padding:8px 12px;font-size:13px;font-weight:900;display:inline-flex}.rendered-message{gap:10px;display:grid}.text-block{white-space:pre-wrap}.line-spacer{height:10px}.markdown-heading{color:inherit;margin-top:8px;font-weight:900}.code-block{color:#e5e7eb;white-space:pre;background:#0f172a;border-radius:18px;margin:12px 0;padding:16px;font-size:13px;line-height:1.45;overflow-x:auto}.settings-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:26px;align-self:start;gap:20px;margin-top:24px;padding:24px;display:grid}.settings-header{justify-content:space-between;align-items:flex-start;gap:16px;display:flex}.settings-header h3{margin:0;font-size:24px}.settings-header p{color:#64748b;margin:6px 0 0}.close-settings-btn{color:#0f172a;background:#e2e8f0;border:none;border-radius:999px;padding:10px 14px;font-weight:900}.settings-section{background:#fff;border:1px solid #e2e8f0;border-radius:20px;gap:14px;padding:18px;display:grid}.composer-wrap{border:1px solid #e2e8f0;border-radius:26px;padding:14px;box-shadow:0 18px 50px #0f172a14}.file-strip{align-items:center;gap:12px;padding-bottom:12px;display:flex}.attach-chip{color:#1e293b;cursor:pointer;white-space:nowrap;background:#fff;border:1px solid #dbe4f0;border-radius:999px;align-items:center;padding:12px 16px;font-weight:900;display:inline-flex}.attach-chip input{display:none}.selected-files{color:#94a3b8;flex-wrap:wrap;flex:1;gap:8px;font-weight:800;display:flex}.clear-files-btn,.delete-session-btn{color:#991b1b;background:#fee2e2;border:none;border-radius:999px;padding:10px 14px;font-weight:900}.composer{grid-template-columns:1fr auto;align-items:end;gap:14px;display:grid}.composer textarea{resize:none;color:#0f172a;background:#f8fafc;border:none;border-radius:20px;outline:none;min-height:72px;max-height:160px;padding:18px;font-size:15px;line-height:1.45}.composer-actions{align-items:stretch;gap:10px;display:grid}.send-btn{color:#fff;background:#ff6b00;border:none;border-radius:18px;min-width:92px;padding:18px 24px;font-weight:900;box-shadow:0 16px 35px #ff6b003d}.cancel-btn{color:#991b1b;background:#fee2e2;border:none;border-radius:18px;min-width:92px;padding:14px 20px;font-weight:900}.cancel-btn:hover{background:#fecaca}.disclaimer{color:#94a3b8;text-align:center;margin:12px 4px 0;font-size:12px;line-height:1.4}.history-panel{background:#fff;border-radius:30px;min-height:calc(100vh - 36px);padding:24px;overflow-y:auto;box-shadow:0 22px 70px #0f172a14}.history-header{justify-content:space-between;align-items:center;gap:12px;display:flex}.history-header h3{letter-spacing:-.04em;margin:0;font-size:24px}.small-header{margin-top:24px}.small-header h3{font-size:20px}.mini-status{border-radius:999px;align-items:center;padding:8px 12px;font-size:12px;font-weight:900;display:inline-flex}.status-gray{color:#475569;background:#f1f5f9}.status-blue{color:#1d4ed8;background:#dbeafe}.status-green{color:#166534;background:#dcfce7}.status-orange{color:#9a3412;background:#ffedd5}.trace-panel-button{color:#0f172a;background:#fff;border:2px solid #0f172a;border-radius:20px;width:100%;margin-top:22px;padding:16px;font-weight:900}.trace-panel{background:#f8fafc;border:1px solid #e2e8f0;border-radius:24px;gap:12px;margin-top:16px;padding:14px;display:grid}.trace-row{background:#fff;border:1px solid #e2e8f0;border-radius:18px;gap:8px;padding:14px;display:grid}.trace-row strong{color:#0f172a;font-size:15px}.trace-row span{color:#64748b;overflow-wrap:anywhere;font-size:14px}.trace-status{align-items:center;gap:8px;display:inline-flex}.agent-spinner{border:2px solid #bfdbfe;border-top-color:#2563eb;border-radius:999px;width:14px;height:14px;animation:.8s linear infinite spin;display:inline-block}.large-spinner{border-width:3px;width:28px;height:28px}@keyframes spin{to{transform:rotate(360deg)}}.history-list{gap:12px;margin-top:14px;display:grid}.history-item{text-align:left;background:#fff;border:1px solid #e2e8f0;border-radius:20px;gap:10px;width:100%;padding:16px;display:grid}.history-item.static-item{cursor:default}.history-item strong{color:#0f172a}.empty-history{color:#94a3b8;background:#f8fafc;border:1px dashed #dbe4f0;border-radius:18px;margin:14px 0 0;padding:18px;font-size:14px}@media (width<=1180px){.app-shell{grid-template-columns:260px minmax(0,1fr)}.history-panel{display:none}}@media (width<=820px){.app-shell{grid-template-columns:1fr;padding:10px}.sidebar,.chat-panel{min-height:auto}.chat-header{flex-direction:column}.message-bubble,.message-row.message-user .message-bubble{max-width:100%}.composer{grid-template-columns:1fr}.send-btn,.cancel-btn{width:100%}}html,body,#root{width:100%;height:100%;min-height:100%;overflow:hidden}body{margin:0}.app-shell{grid-template-columns:300px minmax(0,1fr) 330px;gap:18px;width:100%;height:100vh;min-height:0;padding:18px;display:grid;overflow:hidden}.sidebar,.chat-panel,.history-panel{height:calc(100vh - 36px);min-height:0;overflow:hidden}.sidebar{flex-direction:column;display:flex}.sidebar>div:first-child,.sidebar-history{flex-direction:column;min-height:0;display:flex}.sidebar-history-list{min-height:0;max-height:none;overflow-y:auto}.sidebar-footer{flex:none}.chat-panel{flex-direction:column;display:flex}.chat-header,.ui-error,.composer-wrap{flex:none}.messages{flex:auto;min-height:0;padding:26px 4px;overflow-y:auto}.settings-card{flex:auto;min-height:0;overflow-y:auto}.history-panel{overflow-y:auto}.composer-wrap{margin-top:0}@media (width<=1180px){html,body,#root{overflow:auto}.app-shell{grid-template-columns:260px minmax(0,1fr);height:auto;min-height:100vh;overflow:visible}.sidebar,.chat-panel{height:calc(100vh - 36px)}.history-panel{display:none}}@media (width<=820px){html,body,#root{overflow:auto}.app-shell{grid-template-columns:1fr;height:auto;min-height:100vh;padding:10px;overflow:visible}.sidebar,.chat-panel{height:auto;min-height:auto;overflow:visible}.messages{overflow:visible}}
