:root{--bg:#0f1220;--panel:#171a2b;--text:#e8ebff;--muted:#a8b0d3;--accent:#7c8cff;--ok:#1fbf75;--warn:#ff7b7b}
*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:linear-gradient(140deg,#0b0e1a,#11152a);color:var(--text)}
.container{max-width:1100px;margin:32px auto;padding:0 16px}
.card{background:var(--panel);border:1px solid #2b3259;border-radius:16px;padding:20px;box-shadow:0 20px 40px rgba(0,0,0,.25)}
h1,h2,h3{margin:.2rem 0 1rem}a{color:#cdd4ff;text-decoration:none}.muted{color:var(--muted)}
.grid{display:grid;gap:16px}.grid-2{grid-template-columns:1.2fr .8fr}
@media (max-width:900px){.grid-2{grid-template-columns:1fr}}
input,button{width:100%;padding:12px;border-radius:10px;border:1px solid #36407a;background:#11152a;color:var(--text)}
button{background:var(--accent);border:none;font-weight:600;cursor:pointer}
button.secondary{background:#2d345d}
.assistant-list{display:grid;gap:10px}.assistant-item{padding:14px;border:1px solid #313a6d;border-radius:12px;background:#11152a}
.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#262d54;color:#cdd4ff;font-size:12px}
.msg{padding:10px;border-radius:8px;margin-bottom:10px}.msg.ok{background:rgba(31,191,117,.15);border:1px solid rgba(31,191,117,.4)}.msg.err{background:rgba(255,123,123,.15);border:1px solid rgba(255,123,123,.4)}
.file-list li{margin:.3rem 0;color:#d6dcff}
.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.thread-panel{margin-top:16px}
.thread-messages{display:grid;gap:12px;max-height:520px;overflow:auto;padding-right:4px}
.thread-message{border:1px solid #313a6d;border-radius:12px;padding:12px;background:#11152a}
.thread-message.assistant{border-color:#3f4aa1}
.thread-message.user{border-color:#2e7a56}
.thread-author{text-transform:capitalize;font-weight:700;margin-bottom:8px;color:#cdd4ff}
.thread-content p{margin:.35rem 0}
.thread-content pre{white-space:pre-wrap;word-break:break-word;background:#0d1020;border:1px solid #2b3259;border-radius:10px;padding:10px;color:#dfe4ff}
.question-item{padding:10px;border:1px dashed #2d3568;border-radius:10px;margin:10px 0}
.thread-form{margin-top:14px;display:grid;gap:10px}
.thread-form textarea{width:100%;padding:12px;border-radius:10px;border:1px solid #36407a;background:#11152a;color:var(--text);resize:vertical}
