.chat-list-tools { display:flex; align-items:center; gap:.5rem; margin-top:.65rem; }
.chat-list-views { display:flex; flex:1; min-width:0; gap:.25rem; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; }
.chat-list-tools button, .chat-list-secondary button, .chat-list-bulk button { min-height:44px; color:#f9f3f8; background:#382a42; border:1px solid #65536e; border-radius:9px; font:inherit; font-size:.8rem; padding:.35rem .42rem; }
.chat-list-views button { flex:none; }
.chat-list-views button[aria-pressed=true] { border-color:#f4bc98; background:#4b334c; }
#chat-list-status, #chat-bulk-status { color:#e9c8d8; font-size:.8rem; margin:.4rem 0 0; }
#chat-list-status:empty, #chat-bulk-status:empty { display:none; }
.chat-list-secondary, .chat-list-bulk { display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; margin-block-start:.35rem; }
#chat-bulk-count { flex:1 0 auto; color:var(--muted); font-size:.8rem; }
#chat-bulk-apply { background:#f4bc98; border-color:#f4bc98; color:#302139; }
.workspace .rooms .chat-list-row.chat-bulk-row { grid-template-columns:minmax(0,1fr); }
.rooms .chat-bulk-row .chat-list-open[aria-pressed=true] { background:#4b334c; border-color:#79576a; }
.chat-bulk-mark {
  display:grid; place-items:center; flex:none; width:1.1rem; height:1.1rem;
  border:1px solid #e0c6da; border-radius:5px; color:#302139; font-size:.78rem;
}
[aria-pressed=true] > .chat-bulk-mark { border-color:#f4bc98; background:#f4bc98; }
[aria-pressed=true] > .chat-bulk-mark::before { content:'✓'; }
.rooms .chat-list-row { display:grid; grid-template-columns:minmax(0,1fr) 40px; align-items:center; }
.rooms .chat-list-open { width:100%; min-width:0; }
.rooms .chat-list-open .room-text { flex:1; min-width:0; }
.rooms .chat-list-open .room-text strong { display:block; }
.rooms .chat-list-preview { unicode-bidi:plaintext; }
.rooms .chat-list-open .chat-list-draft { color:var(--accent); }
.rooms .chat-list-open .chat-list-flags { font-size:.68rem; }
.chat-list-meta { flex:none; display:grid; justify-items:end; gap:4px; color:var(--muted); font-size:.69rem; font-variant-numeric:tabular-nums; }
.rooms .chat-unread-count {
  flex:none; margin-inline-start:auto; padding:.12rem .45rem; min-width:1.5rem;
  border-radius:1rem; color:#302139; background:#f4bc98; text-align:center;
  font-size:.78rem; font-weight:700; font-variant-numeric:tabular-nums;
}
.rooms .chat-list-open strong, .rooms .chat-list-open small { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.rooms .chat-list-options { width:38px; min-height:44px; height:44px; padding:0; display:grid; place-items:center; color:#e0c6da; font-size:1.25rem; }
.chat-list-dialog { width:min(400px, calc(100vw - 32px)); background:#fffaf5; color:#302139; }
.chat-list-dialog h2 { margin-bottom:.65rem; font-size:1.15rem; overflow-wrap:anywhere; }
.chat-list-dialog .dialog-content label { color:#594b5e; }
.chat-list-dialog .chat-folder-check { display:flex; gap:.6rem; align-items:center; margin:.4rem 0 1rem; }
.chat-list-dialog .chat-folder-check input { width:1.1rem; height:1.1rem; flex:none; margin:0; }
.chat-list-actions { display:flex; justify-content:flex-end; gap:.5rem; }
.chat-item-actions { display:grid; gap:.45rem; }
.chat-item-actions button { text-align:left; min-height:42px; }
.chat-list-dialog .feedback { color:#823c55; }
.chat-list-dialog .feedback:empty { display:none; }
.chat-folder-rules-trigger {
  min-height:44px;
  padding:.35rem .55rem;
  color:#f9f3f8;
  background:#382a42;
  border:1px solid #65536e;
  border-radius:9px;
  font-size:.8rem;
}
.chat-list-dialog .chat-folder-rules-items {
  max-block-size:min(45dvh,24rem);
  margin:.55rem 0;
  padding:0 3px;
  overflow:auto;
  overscroll-behavior:contain;
  list-style:none;
}
.chat-folder-rule-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) max-content;
  align-items:center;
  gap:.55rem;
  padding:.3rem 0;
  border-block-end:1px solid #e4d8d3;
}
.chat-folder-rule-row span { overflow-wrap:anywhere; }
.chat-folder-rule-row select {
  min-block-size:44px;
  max-inline-size:100%;
  padding:.25rem .5rem;
  border:1px solid #65536e;
  border-radius:9px;
  background:#fffaf5;
  color:#302139;
  font:inherit;
}
#chat-folder-rules-dialog { max-block-size:90dvh; }
#chat-folder-rules-dialog .chat-list-actions button { min-block-size:44px; }
