* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 15px/1.45 system-ui, sans-serif; color: #1c1c1c; background: #f6f6f4; }
button { font: inherit; padding: .35rem .8rem; border: 1px solid #b9b9b3; border-radius: 6px; background: #fff; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
#signin { max-width: 26rem; margin: 18vh auto; padding: 0 1rem; }
#signin a { display: inline-block; padding: .5rem 1.2rem; border-radius: 6px; background: #1c1c1c; color: #fff; text-decoration: none; }
#app { display: flex; height: 100%; }
aside { width: 17rem; flex: none; display: flex; flex-direction: column; gap: .6rem; padding: .8rem; border-right: 1px solid #deded8; background: #efefeb; overflow-y: auto; }
aside header { display: flex; align-items: center; gap: .5rem; }
#who { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #666; font-size: .85rem; }
#chats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
#chats button { width: 100%; text-align: left; border-color: transparent; background: transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#chats button.current { background: #fff; border-color: #b9b9b3; }
#chats button.running::after { content: " …"; }
main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#problem { margin: .8rem 1rem 0; padding: .5rem .8rem; border: 1px solid #d99; border-radius: 6px; background: #fdeeee; white-space: pre-wrap; }
#log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.message { max-width: 52rem; padding: .55rem .8rem; border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.user { align-self: flex-end; background: #dfe9f7; }
.agent { align-self: flex-start; background: #fff; border: 1px solid #deded8; }
.note { align-self: center; color: #777; font-size: .85rem; }
.note.bad { color: #a22; }
details { max-width: 52rem; align-self: flex-start; font-size: .85rem; color: #555; }
details pre, pre.stderr { margin: .3rem 0 0; padding: .5rem .7rem; border-radius: 6px; background: #ecece8; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 22rem; overflow-y: auto; }
pre.stderr { align-self: flex-start; max-width: 52rem; color: #a22; font-size: .85rem; }
#composer { padding: .8rem 1rem; border-top: 1px solid #deded8; display: flex; flex-direction: column; gap: .5rem; }
#composer textarea { width: 100%; font: inherit; padding: .5rem .7rem; border: 1px solid #b9b9b3; border-radius: 6px; resize: vertical; }
@media (max-width: 720px) { aside { width: 9rem; } }
