* { box-sizing: border-box; }
body { margin: 0; height: 100vh; display: grid; grid-template-columns: 300px 1fr; font: 14px/1.45 system-ui, sans-serif; background: #0f1115; color: #e6e6e6; }
aside { border-right: 1px solid #262a33; padding: 16px; overflow: auto; }
h1 { font-size: 18px; margin: 0; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #8a90a0; margin: 20px 0 6px; }
.muted { color: #8a90a0; }
.error { color: #ff7b7b; min-height: 1em; }
ul { list-style: none; padding: 0; margin: 12px 0; }
li a { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 6px; color: inherit; text-decoration: none; }
li a.active, li a:hover { background: #1c2029; }
input, select, textarea, button { font: inherit; color: inherit; background: #171a21; border: 1px solid #2c313c; border-radius: 6px; padding: 7px 9px; }
button { background: #6c5ce7; border-color: #6c5ce7; cursor: pointer; }
button.ghost { background: transparent; border-color: #2c313c; }
form#new-room, form#send { display: flex; gap: 6px; }
form#new-room input { flex: 1; min-width: 0; }
pre { white-space: pre-wrap; word-break: break-all; background: #171a21; padding: 10px; border-radius: 6px; font-size: 12px; }
main { display: grid; grid-template-rows: auto 1fr auto auto; min-height: 0; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #262a33; }
#bots { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { background: #1c2029; border: 1px solid #2c313c; border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.chip button { background: none; border: 0; padding: 0 0 0 6px; color: #8a90a0; }
#log { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 760px; }
.msg .who { font-weight: 600; margin-right: 8px; }
.msg .when { color: #6b7080; font-size: 11px; }
.msg .body { white-space: pre-wrap; margin-top: 2px; }
.msg.agent .who { color: #a29bfe; }
.msg.user .who { color: #55efc4; }
.msg.system { color: #8a90a0; font-size: 12px; font-style: italic; }
#typing { padding: 0 16px; height: 20px; font-size: 12px; }
form#send { padding: 12px 16px; border-top: 1px solid #262a33; }
#author { width: 110px; }
#content { flex: 1; }
dialog { background: #171a21; color: inherit; border: 1px solid #2c313c; border-radius: 10px; width: 420px; }
dialog::backdrop { background: #0008; }
dialog label { display: grid; gap: 4px; margin: 10px 0; }
menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; }
#files li { display: flex; justify-content: space-between; gap: 6px; padding: 4px 8px; font-size: 13px; }
#files li a { padding: 0; display: inline; color: #a29bfe; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#files li button { background: none; border: 0; padding: 0; color: #8a90a0; }
#usage { text-transform: none; letter-spacing: 0; }
label.upload { display: inline-block; border: 1px solid #2c313c; border-radius: 6px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
@media (max-width: 760px) { body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } aside { max-height: 35vh; border-right: 0; border-bottom: 1px solid #262a33; } }
