:root{color:#111827;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:#fff;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer}#app{min-height:100vh}.app-shell{background:#fff;grid-template-columns:280px minmax(0,1fr);min-height:100vh;display:grid}.sidebar{background:#f9f9fb;border-right:1px solid #ececf1;flex-direction:column;gap:18px;min-height:100vh;padding:16px;display:flex}.brand{align-items:center;gap:10px;padding:8px;display:flex}.brand-mark{color:#fff;background:#111827;border-radius:10px;place-items:center;width:34px;height:34px;font-size:13px;font-weight:700;display:grid}.brand strong,.brand span{display:block}.brand span,.recent p,.empty-recent,.topbar span,.topbar small,.auth-card p,.admin-card p,.auth-error{color:#6b7280;font-size:13px}.new-chat,.recent button{color:#111827;text-align:left;background:0 0;border:0;border-radius:10px}.new-chat{background:#fff;border:1px solid #e5e7eb;padding:12px;font-weight:600}.recent{flex-direction:column;gap:6px;display:flex}.recent p{text-transform:uppercase;letter-spacing:.08em;margin:8px 8px 4px}.recent button{text-overflow:ellipsis;white-space:nowrap;padding:10px;overflow:hidden}.recent button:hover,.recent button.active,.new-chat:hover{background:#ececf1}.recent button.active{font-weight:700}.empty-recent{padding:8px}.auth-card,.admin-card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;gap:10px;padding:12px;display:grid}.auth-card form{gap:8px;display:grid}.auth-card p,.admin-card p{text-transform:uppercase;letter-spacing:.08em;margin:0}.auth-card strong,.admin-card strong{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.auth-card input{border:1px solid #e5e7eb;border-radius:10px;outline:0;width:100%;padding:10px}.auth-card button,.admin-card button{color:#fff;background:#111827;border:0;border-radius:10px;padding:10px;font-weight:700}.auth-card button:disabled,.admin-card button:disabled{cursor:not-allowed;opacity:.55}.auth-card .auth-switch,.admin-card .admin-secondary{color:#111827;background:0 0;font-weight:600}.admin-card span{color:#6b7280;font-size:13px;line-height:1.35}.admin-log-list{gap:6px;max-height:260px;padding-top:4px;display:grid;overflow:auto}.admin-job-pill{color:#111827;background:#fff;border:1px solid #e5e7eb}.admin-job-pill.active{border-color:#111827}.admin-log-row{color:#374151;background:#f9fafb;border-radius:10px;grid-template-columns:42px minmax(0,1fr);gap:6px;padding:8px;font-size:12px;line-height:1.35;display:grid}.admin-log-row.error{color:#991b1b;background:#fef2f2}.auth-error{color:#991b1b;line-height:1.35}.chat-main{grid-template-rows:56px minmax(0,1fr) auto;min-width:0;min-height:100vh;display:grid}.topbar{border-bottom:1px solid #f0f0f0;justify-content:space-between;align-items:center;gap:16px;padding:0 24px;display:flex}.topbar strong,.topbar small{display:block}.topbar-meta{flex-wrap:wrap;justify-content:flex-end;gap:12px;display:flex}.chat-scroll{padding:36px 24px 140px;overflow-y:auto}.empty-state{text-align:center;place-content:center;min-height:calc(100vh - 260px);display:grid}.empty-state h1{color:#111827;letter-spacing:-.04em;margin:0 0 12px;font-size:clamp(30px,5vw,48px);font-weight:600}.empty-state p{color:#6b7280;max-width:560px;margin:0 auto;line-height:1.6}.message-row{grid-template-columns:42px minmax(0,760px);justify-content:center;gap:14px;margin:0 auto 22px;display:grid}.message-row.user{grid-template-columns:minmax(0,760px) 42px}.message-row.user .avatar{grid-area:1/2}.message-row.user .bubble{background:#f4f4f5;grid-area:1/1;justify-self:end}.avatar{color:#fff;background:#111827;border-radius:999px;place-items:center;width:36px;height:36px;font-size:12px;font-weight:700;display:grid}.bubble{background:#fff;border-radius:18px;width:fit-content;max-width:100%;padding:14px 16px;box-shadow:0 1px 2px #0f172a14}.role{color:#6b7280;letter-spacing:.08em;text-transform:uppercase;margin:0 0 6px;font-size:12px;font-weight:700}.content{white-space:pre-wrap;line-height:1.65}.cursor{vertical-align:text-bottom;background:#111827;width:8px;height:1.1em;margin-left:2px;animation:1s steps(2,start) infinite blink;display:inline-block}.error-card,.citations{border-radius:16px;max-width:820px;margin:16px auto 0;padding:16px}.error-card{color:#991b1b;background:#fef2f2;border:1px solid #fecaca}.citations{background:#fafafa;border:1px solid #e5e7eb}.citations h2{margin:0 0 12px;font-size:16px}.citations details{border-top:1px solid #e5e7eb;padding:10px 0}.citations details:first-of-type{border-top:0}.citations summary{cursor:pointer;font-weight:700}.citations p{color:#374151;margin:8px 0;line-height:1.5}.citations small{color:#6b7280}.composer{background:#fff;border:1px solid #e5e7eb;border-radius:999px;grid-template-columns:minmax(0,1fr) 44px;gap:10px;max-width:860px;margin:0 auto;padding:10px;display:grid;position:fixed;bottom:24px;left:312px;right:32px;box-shadow:0 18px 50px #0f172a1f}.composer textarea{resize:none;background:0 0;border:0;outline:0;min-height:42px;max-height:180px;padding:10px 12px}.composer button{color:#fff;background:#111827;border:0;border-radius:999px;place-items:center;width:44px;height:44px;display:grid}.composer button:disabled{cursor:not-allowed;opacity:.45}.send-icon{width:22px;height:22px}.send-spinner{border:2px solid #ffffff59;border-top-color:#fff;border-radius:999px;width:18px;height:18px;animation:.8s linear infinite spin}@keyframes blink{50%{opacity:0}}@keyframes spin{to{transform:rotate(360deg)}}@media (width<=860px){.app-shell{grid-template-columns:1fr}.sidebar{display:none}.composer{left:16px;right:16px}.message-row,.message-row.user{grid-template-columns:36px minmax(0,1fr)}.message-row.user .avatar,.message-row.user .bubble{grid-area:auto}}
