/* Parla Professional workspace — simplified queue and conversation */
.desk-dashboard .desk-workspace { padding: clamp(.85rem,2vw,1.75rem); }
.desk-dashboard .desk-sidebar { padding: 1.25rem .9rem; }
.desk-heading { margin-bottom: 1rem; }
.desk-heading h1 { font-size:clamp(1.6rem,2.5vw,2rem); }
.flow-caption { margin:0; font-size:.85rem; color:var(--parla-muted,#4c515a); overflow-wrap:anywhere; }
.flow-stats { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); background:#fff; border:1px solid var(--parla-line,#d4d0cb); border-radius:.7rem; overflow:hidden; margin-bottom:.85rem; }
.flow-stat { display:flex; justify-content:space-between; align-items:center; gap:.45rem; min-width:0; min-height:56px; padding:.65rem .8rem; border:0; border-inline-end:1px solid #e1e5e8; border-bottom:3px solid transparent; border-radius:0; background:#fff; color:var(--parla-ink,#111113); cursor:pointer; text-align:start; }
.flow-stat:last-child { border-inline-end:0; }
.flow-stat span { font-size:.85rem; font-weight:600; }
.flow-stat strong { font-size:1.15rem; font-variant-numeric:tabular-nums; }
.flow-stat:hover { background:#f7f9fb; }
.flow-stat[aria-pressed=true] { border-bottom-color:var(--parla-blue,#213edf); background:var(--parla-blue-soft,#eef1ff); }
.flow-stat-attention.has-critical strong { color:#a52e28; }
.flow-stat-attention.has-warning:not(.has-critical) strong { color:#885500; }
.flow-stat-active strong { color:#006d67; }
.flow-toolbar { display:grid; grid-template-columns:minmax(12rem,1fr) minmax(9rem,14rem) auto; align-items:center; gap:.6rem; margin-bottom:.7rem; }
.flow-toolbar input,.flow-toolbar select { min-height:44px; min-width:0; }
.flow-filter-toggle { justify-content:center; white-space:nowrap; }
.flow-extra-filters { background:#fff; border:1px solid var(--parla-line,#d4d0cb); padding:.7rem; border-radius:.7rem; display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; margin-bottom:.8rem; }
.flow-extra-filters[hidden] { display:none!important; }
.flow-extra-filters select,.flow-extra-filters input { width:auto; min-height:40px; max-width:100%; }
.flow-extra-filters label { display:flex; align-items:center; gap:.45rem; margin:0; font-size:.85rem; }
.flow-grid { display:grid; grid-template-columns:minmax(16rem,.86fr) minmax(0,1.4fr); gap:.8rem; align-items:start; }
.flow-panel { border:1px solid var(--parla-line,#d4d0cb); border-radius:.7rem; background:#fff; min-width:0; overflow:hidden; }
.flow-panel-title,.flow-detail-head { display:flex; justify-content:space-between; align-items:center; gap:.65rem; padding:.8rem 1rem; border-bottom:1px solid #e4e7ed; }
.flow-panel h2 { font-size:1.05rem; margin:0; overflow-wrap:anywhere; }
.flow-panel-title .flow-caption { white-space:nowrap; }
.flow-rows { max-height:65vh; min-height:13.5rem; overflow:auto; }
.flow-request { display:grid; width:100%; text-align:start; gap:.38rem; padding:.75rem .9rem; border:0; border-bottom:1px solid #e8ebef; border-left:3px solid transparent; border-radius:0; background:#fff; color:inherit; cursor:pointer; }
.flow-request:last-child { border-bottom:0; }
.flow-request:hover { background:#f7f8fc; }
.flow-request[aria-pressed=true] { border-left-color:var(--parla-blue,#213edf); background:#f0f4ff; }
.flow-request-top,.flow-request-meta { display:flex; justify-content:space-between; align-items:center; gap:.55rem; min-width:0; }
.flow-request-top strong { font-size:.97rem; overflow-wrap:anywhere; }
.flow-row-time { color:var(--parla-muted,#4c515a); font-size:.8rem; white-space:nowrap; }
.flow-request-meta { color:var(--parla-muted,#4c515a); font-size:.8rem; }
.flow-row-location { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.flow-row-states { display:flex; gap:.4rem; align-items:center; flex-shrink:0; }
.flow-badge { display:inline-flex; gap:.35rem; align-items:center; font-size:.77rem; font-weight:600; white-space:nowrap; line-height:1.35; }
.flow-badge::before { content:""; width:.45rem;height:.45rem; border-radius:50%; background:currentColor; flex:none; }
.flow-new { color:#2944b9; }
.flow-active { color:#006d67; }
.flow-waiting { color:#865500; }
.flow-closed { color:#596373; }
.flow-cancelled { color:#72403e; }
.flow-row-alert { border-radius:50%; font-weight:750; display:inline-grid; place-items:center; width:1.08rem;height:1.08rem; font-size:.78rem; }
.flow-row-alert.warning { background:#fff1ce;color:#885500; }
.flow-row-alert.critical { background:#f9e8e7;color:#a52e28; }
.flow-empty { padding:1.3rem; color:var(--parla-muted,#4c515a); text-align:center; margin:0; }
.flow-paging { display:flex; justify-content:flex-end; gap:.5rem; flex-wrap:wrap; padding:.5rem .7rem; border-top:1px solid #e4e7ed; }
.flow-paging:empty { display:none; }
.flow-paging button { min-height:40px;font-size:.85rem; }
.flow-detail { position:sticky; top:.6rem; }
.flow-detail-head > div { min-width:0; }
.flow-detail-head .flow-caption { margin-top:.2rem; }
.flow-contact { display:flex; flex-wrap:wrap; align-items:start; justify-content:space-between; gap:.35rem .85rem; padding:.5rem 1rem .2rem; font-size:.84rem; }
.flow-contact-details { margin:0; min-width:0; }
.flow-contact-details summary { font-weight:550; cursor:pointer; color:var(--parla-muted,#4c515a); min-height:36px; align-content:center; }
.flow-contact-fields { display:grid; gap:.25rem; padding:.2rem 0 .6rem; overflow-wrap:anywhere; color:var(--parla-muted,#4c515a); }
.flow-alert { font-weight:650; font-size:.8rem; align-self:center; overflow-wrap:anywhere; padding:.35rem .5rem; border-radius:.35rem; }
.flow-alert-warning { color:#885500;background:#fff1ce; }
.flow-alert-critical { color:#a52e28;background:#f9e8e7; }
.flow-detail-tabs { display:flex; align-items:center; gap:1.2rem; padding:0 1rem; border-bottom:1px solid #e4e7ed; }
.flow-detail-tabs button { border:0; background:transparent; color:var(--parla-muted,#4c515a); border-bottom:2px solid transparent; border-radius:0; padding:.55rem .1rem; min-height:44px; }
.flow-detail-tabs button[aria-pressed=true] { border-bottom-color:var(--parla-blue,#213edf); color:var(--parla-blue,#213edf); }
.flow-detail-body { display:flex; flex-direction:column; align-items:flex-start; gap:.65rem; min-height:14rem; max-height:45vh; overflow:auto; background:#f7f9fa; padding:1rem; }
.flow-message { width:fit-content; min-width:0; max-width:94%; padding:.75rem .85rem; background:#fff; border:1px solid #dce2e9; border-radius:.65rem; overflow-wrap:anywhere; }
.flow-message.staff { align-self:flex-end; background:#e9f6f4; border-color:#c7e8e1; }
.flow-message-meta { font-size:.75rem;color:var(--parla-muted,#4c515a);margin-bottom:.35rem; }
.flow-original { white-space:pre-wrap; margin:0; font-size:1rem; line-height:1.5; color:var(--parla-ink,#111113); }
.flow-source { margin:.3rem 0 0; }
.flow-source summary { cursor:pointer;color:var(--parla-muted,#4c515a);font-size:.8rem;font-weight:500;min-height:28px;align-content:center; }
.flow-translation { white-space:pre-wrap;margin:.4rem 0 0;padding-top:.4rem;border-top:1px solid #d8e0e6;font-size:.9rem;color:var(--parla-muted,#4c515a); }
.flow-detail-body audio { max-width:100%; }
.flow-detail-footer { padding:.75rem 1rem; }
.flow-reply { display:grid; gap:.45rem; }
.flow-reply label { margin:0;font-size:.85rem; }
.flow-reply textarea { min-height:4rem; }
.flow-reply button { justify-self:end; }
.flow-actions { display:flex; flex-wrap:wrap; gap:.55rem; align-items:center; margin-top:.45rem; }
.flow-actions button { font-size:.87rem; }
.flow-actions > .secondary { background:#fff; color:var(--parla-ink,#111113); }
.flow-action-menu { margin:0; flex:0 1 auto; min-width:0; }
.flow-action-menu summary { color:var(--parla-muted,#4c515a); cursor:pointer; min-height:44px; align-content:center; padding:0 .5rem; }
.flow-action-menu[open] { flex-basis:100%; border-top:1px solid #e4e7ed; margin-top:.3rem; }
.flow-action-options { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; padding:.15rem 0 .35rem; }
.flow-option-row { display:flex; flex-wrap:wrap; align-items:center; gap:.45rem; width:100%; }
.flow-option-row select { width:auto; flex:1 1 10rem; min-height:44px; min-width:0; font-size:.86rem; }
.flow-timeline { margin:0; padding:0 0 0 1.2rem; width:100%; }
.flow-timeline li { border-inline-start:2px solid #b6c8d5; margin:.1rem 0; padding:.3rem .75rem .7rem; display:grid; gap:.14rem; overflow-wrap:anywhere; }
.flow-timeline li time,.flow-timeline li span { font-size:.8rem;color:var(--parla-muted,#4c515a); }
.flow-attention-policy { margin:.75rem 0; }
.flow-attention-settings { display:flex; flex-wrap:wrap; align-items:end; gap:.6rem; }
.flow-attention-settings label { font-size:.8rem; max-width:16rem; }
@media(max-width:1150px){.flow-stat{padding:.65rem .55rem;flex-wrap:wrap;min-height:60px}.flow-stat span{font-size:.8rem}.flow-stats{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:980px){.flow-grid{grid-template-columns:minmax(0,1fr)}.flow-detail{position:static}.flow-rows{max-height:40vh}.flow-toolbar{grid-template-columns:minmax(0,1fr) auto}.flow-toolbar input{grid-column:1/-1}.flow-stat{min-height:60px}}
@media(max-width:540px){.flow-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.flow-stat{border-bottom:1px solid #e1e5e8;min-height:48px}.flow-stat:last-child{grid-column:1/-1}.flow-stat[aria-pressed=true]{border-bottom:2px solid var(--parla-blue,#213edf)}.flow-request-top{align-items:start}.flow-request-meta{flex-wrap:wrap}.flow-row-location{white-space:normal;overflow-wrap:anywhere;flex:1 1 100%}.flow-detail-body{max-height:none;padding:.8rem}.flow-contact{display:grid}.flow-alert{font-size:.8rem}.flow-extra-filters select,.flow-extra-filters label{width:100%}.flow-extra-filters input{flex:1;min-width:0}}

@media(max-width:720px){ .desk-dashboard .desk-sidebar { gap:.7rem; padding:.9rem; } .desk-dashboard .desk-nav { display:flex; flex-wrap:nowrap; gap:.35rem; overflow-x:auto; padding-bottom:.3rem; min-width:0; } .desk-dashboard .desk-nav-link { white-space:nowrap; flex:0 0 auto; font-size:.85rem; } .desk-dashboard .desk-identity { padding-bottom:.55rem; } }

.flow-detail[data-state=new] .flow-detail-body { min-height:9rem; }

/* Compact request list and working area. */
.flow-toolbar { grid-template-columns:minmax(12rem,1fr) minmax(9rem,12rem) auto; }
.flow-request { gap:.2rem; padding:.55rem .9rem; min-height:58px; }
.flow-request-top strong { font-size:1rem; }
.flow-row-location, .flow-row-time, .flow-message-meta { font-size:.8125rem; }
.flow-badge { font-size:.875rem; }
.flow-row-alert.critical { width:auto; height:auto; padding:.12rem .35rem; border-radius:.35rem; font-size:.8125rem; font-weight:650; }
.flow-row-alert.critical { display:inline-block; }
.flow-row-states { flex-shrink:1; flex-wrap:wrap; justify-content:end; min-width:0; }
.flow-request-meta { flex-wrap:wrap; }
.flow-panel-title { padding:.55rem .9rem; }
@media(max-width:980px) {
  .flow-toolbar { grid-template-columns:minmax(0,1fr) auto; }
  .flow-toolbar input { grid-column:1/-1; }
}
@media(max-width:540px) {
  .top { padding-block:.55rem; }
  .desk-dashboard .desk-sidebar { gap:.35rem; padding:.55rem .85rem .35rem; }
  .desk-dashboard .desk-identity { padding:.15rem 0 .35rem; }
  .desk-account { display:none; }
  .desk-dashboard .desk-point select { min-height:36px; }
  .desk-dashboard .desk-workspace { padding-block:.6rem; }
  .desk-heading { gap:.45rem; margin-bottom:.6rem; }
  .flow-row-location { flex:0 1 auto; }
  .flow-detail-tabs { gap:.9rem; }
}

.flow-toolbar:has(>select[hidden]) { grid-template-columns:minmax(0,1fr) auto; }
.flow-toolbar:has(>select[hidden]) > input { grid-column:auto; }
.flow-extra-filters .flow-attention-filter[hidden] { display:none; }
.flow-extra-filters .flow-attention-filter input { width:auto; min-height:auto; }
.flow-row-alert.warning { display:inline-block; width:auto; height:auto; padding:.12rem .35rem; border-radius:.35rem; font-size:.8125rem; font-weight:650; }
