/* Scoped Workspace composition. Surface/controls remain MixFiscalUI primitives. */
#app .ws-conversations {
  --ws-ink: var(--mix-text, #173e4c);
  --ws-muted: var(--mix-text-muted, #526d78);
  --ws-accent: var(--mix-primary, #087c92);
  display: grid; grid-template-columns: minmax(260px, 31%) minmax(0, 1fr); gap: 18px;
  height: calc(100dvh - 210px); min-height: 420px; width: 100%; color: var(--ws-ink);
}
.ws-conversations *, .ws-dialog * { box-sizing: border-box; }
.ws-conversations :is(h2,p) { margin: 0; }
.ws-conversations h2 { font-size: 17px; line-height: 1.35; }
.ws-conversations button { cursor: pointer; }
.ws-conversations button:disabled { cursor: not-allowed; opacity: .5; }
.ws-conversations :is(button,input,textarea,select):focus-visible, .ws-dialog :is(button,select,a,summary):focus-visible { outline: 2px solid var(--mix-primary, #087c92); outline-offset: 3px; }
.ws-list-pane, .ws-thread-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.ws-thread-pane { position: relative; }
.ws-conversations .mix-floating-section { margin: 0; min-width: 0; flex: 0 0 auto; }
.ws-conversations .mix-floating-section__body { min-height: 0; min-width: 0; }
.ws-conversations .internal-room-avatar { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; background: color-mix(in srgb, var(--ws-accent) 12%, white); display: grid; place-items: center; overflow: hidden; color: var(--ws-accent); }
.ws-conversations .internal-room-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ws-conversations .internal-room-avatar i { display: none; } /* No invented online presence. */
.ws-conversations .ws-room-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; display: flex; flex-direction: column; gap: 8px; padding: 2px 4px 8px 2px; }
#app .ws-conversations .ws-room { flex: 0 0 auto; gap: 10px; width: 100%; min-width: 0; min-height: 56px; padding: 7px 10px; border-radius: 12px; text-align: left; }
#app .ws-conversations .ws-room:not(.is-selected) { border: 1px solid var(--mix-control-border, #c8dade); background: var(--mix-mail-row-background, rgb(248 251 255 / 74%)); box-shadow: var(--mix-mail-row-shadow, 0 3px 9px rgb(29 63 74 / 5%)); }
#app .ws-room .mix-card-list-item__content { min-width: 0; flex: 1; gap: 4px; }
#app .ws-room .mix-card-list-item__content :is(strong,small) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app .ws-room .mix-card-list-item__content strong { font-size: 12px; }
#app .ws-room .mix-card-list-item__content small { font-size: 11px; }
#app .ws-room .mix-card-list-item__trailing { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
#app .ws-room .mix-card-list-item__leading { width: 38px; height: 38px; background: transparent; border: 0; box-shadow: none; }
#app .ws-room .internal-room-avatar { width: 38px; height: 38px; flex-basis: 38px; }
.ws-room time { font-size: 10px; color: var(--ws-muted); white-space: nowrap; }
.ws-unread { background: var(--ws-accent); color: white; border-radius: 14px; padding: 3px 6px; font-size: 10px; }
.ws-page-toolbar { position: relative; }
.ws-search-shell { position: relative; }
html[data-mix-theme] body #app .ws-page-toolbar > [data-ws-back] { display: none !important; }
#app .ws-search-panel { position: absolute; top: calc(100% + 10px); right: 0; width: min(340px, calc(100vw - 32px)); z-index: 80; padding: 18px; }
.ws-search-panel header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ws-search-panel label { display: grid; gap: 5px; margin: 12px 0; font-size: 12px; }
#app .ws-search-panel :is(input,select) { box-sizing: border-box; width: 100%; min-width: 0; padding: 9px; font: inherit; }
.ws-search-panel small { display: block; margin: 8px 0 14px; color: var(--mix-text-muted, #526d78); font-size: 11px; }
.ws-timeline-wrap { position: relative; flex: 1; min-height: 0; }
.ws-conversations .ws-history { height: 100%; padding: 0; overflow: hidden; }
.ws-history > .mix-floating-section__body { height: 100%; }
.ws-timeline { height: 100%; overflow-y: auto; padding: 18px 24px; scrollbar-width: thin; overscroll-behavior: contain; overflow-anchor: none; background-image: radial-gradient(rgb(41 93 108 / 6%) .8px, transparent .8px); background-size: 18px 18px; }
.ws-date { text-align: center; margin: 8px 0 18px; }
.ws-date span { display: inline-block; padding: 5px 12px; border-radius: 20px; background: rgb(255 255 255 / 70%); color: var(--ws-muted); font-size: 10px; }
#app .ws-conversations .ws-message { display: flex; justify-content: flex-start; margin: 0 0 10px; width: 100%; max-width: none; }
#app .ws-conversations .ws-message.mine { justify-content: flex-end; }
#app .ws-conversations .ws-bubble { position: relative; width: fit-content; max-width: 82%; min-width: 130px; padding: 9px 12px 7px; border: 1px solid rgb(44 92 106 / 10%); background: var(--mix-floating-surface, #f8fbff); border-radius: 3px 14px 14px; box-shadow: 0 2px 4px rgb(29 63 74 / 4%); }
html[data-mix-theme] body #app .ws-conversations .internal-message.mine .ws-bubble { border-radius: 14px 3px 14px 14px; background: color-mix(in srgb, var(--ws-accent) 13%, var(--mix-floating-surface, #f8fbff)); border-color: color-mix(in srgb, var(--ws-accent) 20%, transparent); }
.ws-bubble header { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 18px; }
.ws-bubble header strong { color: var(--ws-accent); font-size: 11px; }
html[data-mix-theme] body #app .ws-conversations .ws-bubble p { color: var(--ws-ink); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0; }
.ws-bubble footer { display: flex; justify-content: flex-end; align-items: center; gap: 5px; color: var(--ws-muted); font-size: 9px; }
.ws-bubble blockquote, .ws-reply-preview { margin: 5px 0; border: 0; border-left: 3px solid var(--ws-accent); border-radius: 6px; background: rgb(255 255 255 / 50%); padding: 9px; font-size: 11px; overflow-wrap: anywhere; }
.ws-bubble blockquote small { display: block; font-weight: 600; margin-bottom: 3px; }
.ws-forwarded { font-size: 10px; color: var(--ws-muted); }
.ws-message-menu { position: relative; }
.ws-message-menu summary { display: grid; place-items: center; list-style: none; cursor: pointer; color: var(--ws-muted); }
.ws-message-menu summary::-webkit-details-marker { display: none; }
.ws-message-menu summary svg { width: 16px; height: 16px; }
.ws-message-menu > div { position: absolute; right: 0; top: 21px; z-index: 10; width: 205px; padding: 6px; background: var(--mix-overlay-surface, #f8fbff); border: 1px solid var(--mix-border, #c8dade); border-radius: 10px; box-shadow: 0 8px 26px #173e4c25; }
.ws-message:nth-last-child(-n+2) .ws-message-menu > div { top: auto; bottom: 21px; }
.ws-message-menu button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 0; padding: 9px; border-radius: 6px; background: transparent; font-size: 12px; color: var(--ws-ink); }
.ws-message-menu button:hover { background: #087c9212; }
.ws-message-menu button svg { width: 16px; height: 16px; }
.ws-image-button { display: block; padding: 0; border: 0; background: transparent; }
.ws-bubble img, .ws-bubble video { max-width: 100%; width: 320px; max-height: 300px; object-fit: contain; border-radius: 9px; }
.ws-bubble audio { width: 290px; max-width: 100%; }
.ws-document { display: flex; align-items: center; gap: 10px; color: var(--ws-accent); padding: 12px 0; text-decoration: none; }
.ws-document span { min-width: 0; overflow-wrap: anywhere; }.ws-document small { display: block; }
.ws-latest { position: absolute; bottom: 12px; right: 16px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--mix-border, #c8dade); background: var(--mix-floating-surface, #f8fbff); color: var(--ws-accent); padding: 9px 12px; border-radius: 22px; box-shadow: 0 4px 14px #173e4c20; font-size: 11px; }
.ws-latest[hidden] { display: none; }
.ws-older { display: block; margin: 0 auto 15px; background: transparent; border: 0; color: var(--ws-accent); font-size: 12px; }
#app .ws-conversations .ws-composer { margin: 0; padding: 0; display: block; background: transparent; border: 0; }
.ws-compose-row { display: flex; align-items: flex-end; gap: 9px; }
.ws-conversations .ws-compose-row textarea { flex: 1; min-width: 0; min-height: 38px; max-height: 120px; padding: 10px 12px; background: rgb(255 255 255 / 65%); border: 1px solid var(--mix-border, #c8dade); border-radius: 11px; resize: none; font: inherit; font-size: 13px; color: var(--ws-ink); }
.ws-mic { background: transparent; color: var(--ws-muted); border: 0; width: 34px; height: 38px; display: grid; place-items: center; flex: 0 0 34px; }
.ws-mic svg { width: 19px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ws-conversations .ws-send { background: var(--ws-accent); color: white; width: 38px; height: 38px; border-radius: 12px; }
.ws-composer > footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; color: var(--ws-muted); font-size: 9px; }
.ws-reply-preview { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; }
.ws-reply-preview span { display: block; }
.ws-pending-files { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.ws-pending-files > span { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.ws-pending-files img { width: 44px; height: 36px; object-fit: cover; border-radius: 5px; }
.ws-pending-files b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-pending-files small { color: var(--ws-muted); font-size: 10px; }
.ws-error { font-size: 12px; color: #9c343d; background: #fff1f1; padding: 10px; border-radius: 8px; margin-bottom: 8px; }
.ws-empty, .ws-welcome { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; text-align: center; padding: 30px; color: var(--ws-muted); font-size: 13px; }
.ws-welcome { flex: 1; border: 1px dashed var(--mix-border, #bcd4d8); border-radius: 16px; }
.ws-welcome svg { color: var(--ws-accent); }.ws-welcome small { margin-top: 15px; }
.ws-drop-overlay { display: none; position: absolute; inset: 0; z-index: 20; border: 3px dashed var(--ws-accent); border-radius: 16px; background: #effafbF2; color: var(--ws-accent); align-items: center; justify-content: center; flex-direction: column; gap: 14px; pointer-events: none; }
.ws-dragging .ws-drop-overlay { display: flex; }
.ws-drop-overlay svg { width: 40px; height: 40px; }
.ws-dialog { width: min(600px, 92vw); max-height: 86dvh; padding: 22px; border: 1px solid var(--mix-border, #c8dade); border-radius: 18px; color: var(--mix-text, #173e4c); background: var(--mix-overlay-surface, #f8fbff); box-shadow: 0 16px 80px #123b5140; }
.ws-dialog::backdrop { background: #173e4c80; backdrop-filter: blur(4px); }
.ws-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ws-dialog h2 { margin: 0; font-size: 18px; }.ws-dialog p { font-size: 13px; line-height: 1.6; }
.ws-dialog label { display: block; margin: 15px 0; font-size: 13px; }.ws-dialog select { display: block; width: 100%; padding: 10px; margin-top: 8px; }.ws-dialog select[multiple] { min-height: 130px; }
.ws-dialog label[hidden], .ws-dialog fieldset[hidden] { display: none; }
.ws-dialog fieldset { margin: 16px 0; border: 1px solid var(--mix-border, #c8dade); border-radius: 10px; padding: 4px 14px; }
.ws-dialog label > input:not([type="checkbox"]) { display: block; width: 100%; padding: 10px; margin-top: 6px; border: 1px solid var(--mix-border, #c8dade); border-radius: 8px; background: transparent; color: inherit; }
.ws-expanded-media :is(img,video) { max-width: 100%; max-height: 62dvh; object-fit: contain; }.ws-expanded-media { margin: 16px 0; text-align: center; }
@media (min-width: 1500px) { #app .ws-conversations { grid-template-columns: 340px minmax(0, 1fr); } }
@media (max-width: 900px) { #app .ws-conversations { gap: 12px; grid-template-columns: minmax(225px, 34%) minmax(0, 1fr); }.ws-timeline { padding: 12px; }.ws-compose-row { gap: 4px; }.ws-composer > footer > span:last-child { display: none; } }
@media (max-width: 680px) {
  #app .ws-conversations { display: flex; flex-direction: column; height: calc(100dvh - 280px); min-height: 320px; }
  .ws-list-pane { height: 100%; }.ws-thread-pane { display: none; height: 100%; }
  .ws-mobile-thread .ws-list-pane { display: none; }.ws-mobile-thread .ws-thread-pane { display: flex; }
  html[data-mix-theme] body #app .ws-page-toolbar > [data-ws-back] { display: inline-flex !important; }
  .ws-page-toolbar .ws-search-shell { position: static; }
  #app .ws-page-toolbar .ws-search-panel { right: 0; max-height: calc(100dvh - 220px); overflow-y: auto; }
  .ws-conversations .internal-room-avatar { width: 34px; height: 34px; flex-basis: 34px; }
  #app .ws-conversations .ws-bubble { max-width: 94%; }.ws-thread-pane { gap: 8px; }.ws-compose-row { flex-wrap: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .ws-conversations * { scroll-behavior: auto !important; } }

/* List composition only; shared Design System primitives are unchanged. */
.ws-conversations .ws-selectable-row { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; min-width: 0; }
#app .ws-conversations .ws-selectable-row .ws-room { flex: 1; width: auto; }
.ws-conversations .ws-selectable-row > input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--ws-accent); }
.ws-conversations .ws-list-actions { justify-content: space-between; }
.ws-conversations .ws-room mark { background: var(--mix-highlight, #ffe69b); color: var(--ws-ink); border-radius: 2px; }
.ws-conversations .wch-origin { justify-self: start; width: auto; }
.ws-conversations .wch-origin input { width: auto; }
