*{box-sizing:border-box}
body{margin:0;font-family:system-ui,apple-system}
header{position:sticky;top:0;padding:12px;background:#111;color:#fff}
#chat{padding:12px 12px 96px;display:flex;flex-direction:column;gap:8px}
.msg{max-width:80%;padding:10px 12px;border-radius:12px;white-space:pre-wrap}
.msg.me{align-self:flex-end;background:#DCF8C6}
.msg.bot{align-self:flex-start;background:#f1f1f1}
#composer{position:fixed;left:0;right:0;bottom:0;display:flex;gap:6px;padding:8px;background:#fff;border-top:1px solid #eee}
#composer select{flex:0 0 40%}
#composer input{flex:1}
#composer button{flex:0 0 96px}

#search{padding:12px;border-top:8px solid #f5f5f5}
.filters{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin-bottom:8px}
#result-table{width:100%;border-collapse:collapse;font-size:14px}
#result-table th,#result-table td{border:1px solid #eee;padding:6px}
.pager{display:flex;gap:8px;align-items:center;margin-top:8px}

.modal{position:fixed;inset:0;background:rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center}
.panel{background:#fff;padding:12px;border-radius:8px;min-width:320px;max-width:560px}
#edit-fields{display:grid;grid-template-columns:1fr 2fr;gap:6px;max-height:50vh;overflow:auto}
#edit-fields label{opacity:.8}
