/* Workspace layout: agent only. Call and customer styles are independent. */
body.agent .workspace-head,body.agent .ll-push-settings,body.agent .ll38-settings,body.agent .thread-head,body.agent .mobile-summary,body.agent .composer {flex-shrink:0}
body.agent .account,body.agent .account #account-name,body.agent .thread-head>div,body.agent .ticket-top strong {min-width:0;overflow-wrap:anywhere}
body.agent .queue-list {flex:1;min-height:0;overscroll-behavior:contain}
body.agent .ticket {flex:none}
body.agent .thread-actions {min-width:0}
body.agent .composer textarea {min-width:0}
body.agent .ll38-settings .ll38-panel {max-height:35dvh;overflow:auto;overscroll-behavior:contain}
body.agent .ll-voice-panel {max-height:38dvh;overflow:auto;overscroll-behavior:contain}
body.agent .ll-voice-panel audio,body.agent .ll-voice-message audio {max-width:100%}
@media(max-width:850px){
 body.agent .workspace {height:100dvh;min-height:0;overflow:hidden}
 body.agent .desk {display:flex;flex-direction:column;min-height:0;overflow:hidden}
 body.agent .queue {flex:1;min-height:0;border:0}
 body.agent .chat-area {display:none;flex:1;min-height:0;overflow:hidden}
 body.agent .desk.open .queue {display:none}
 body.agent .desk.open .chat-area {display:flex}
 body.agent .details {display:none}
 body.agent .workspace-head {padding:10px max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left));gap:8px}
 body.agent .workspace-head .brand {font-size:18px;white-space:nowrap}
 body.agent .account {justify-content:flex-end;gap:6px}
 body.agent .account #account-name {font-size:12px;max-width:28vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body.agent .account button {min-height:44px;padding:8px 10px;font-size:12px;flex:none}
 body.agent .ll-push-settings {padding:8px 12px;gap:6px}
 body.agent .ll-push-settings #ll-push-register {min-height:44px}
 body.agent .ll38-settings summary {min-height:36px;display:flex;align-items:center;gap:8px}
 body.agent .ll38-settings summary::before {content:'+';font-size:17px;color:var(--accent)}
 body.agent .ll38-settings[open] summary::before {content:'−'}
 body.agent .workspace:has(>.desk.open)>.workspace-head,
 body.agent .workspace:has(>.desk.open)>.ll-push-settings,
 body.agent .workspace:has(>.desk.open)>.ll38-settings {display:none}
 body.agent .section-title {padding:12px 14px 8px}
 body.agent .queue-filters {padding:6px 12px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 body.agent .queue-filters select {min-height:44px;font-size:16px;padding:7px}
 body.agent .queue-count {padding:8px 14px}
 body.agent .queue-list {padding:2px 12px max(12px,env(safe-area-inset-bottom))}
 body.agent .ticket {padding:13px;min-height:72px;gap:4px;border-radius:12px}
 body.agent .ticket-top strong {font-size:15px}
 body.agent .ticket .small {font-size:12px}
 body.agent .thread-head {display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 10px;min-height:0;padding:8px 12px}
 body.agent .thread-head #back {display:block;min-height:44px;padding:8px 12px;font-size:13px}
 body.agent .thread-head strong {font-size:14px;line-height:1.4}
 body.agent .thread-actions {grid-column:1/-1;margin:0;gap:6px;justify-content:flex-start}
 body.agent .thread-actions:not(:has(>button:not([hidden]))) {display:none}
 body.agent .thread-actions button {min-height:44px;padding:8px 11px;flex:0 1 auto;max-width:100%;white-space:normal}
 body.agent .thread-actions .ll-call-launch {margin-left:auto;flex:none}
 body.agent .mobile-summary {padding:6px 12px;max-height:24dvh}
 body.agent .mobile-summary summary {min-height:32px;line-height:32px}
 body.agent .conversation {padding:12px;gap:9px}
 body.agent .bubble {max-width:92%;padding:10px 12px}
 body.agent .bubble.system {max-width:100%;padding:4px}
 body.agent .composer {padding:8px 12px max(8px,env(safe-area-inset-bottom));gap:6px;align-items:end}
 body.agent .composer button {min-height:44px;padding:8px 10px;flex:none}
 body.agent .composer textarea {font-size:16px;min-height:44px;padding:9px;max-height:90px}
 body.agent .ll-voice-panel {padding:8px 12px}
 body.agent #ll-waiting-alert:not([hidden]) {margin:4px 12px;min-height:38px;padding:6px 10px}
 body.agent .toast {bottom:max(12px,env(safe-area-inset-bottom));right:10px;max-width:calc(100% - 20px)}
}
@media(max-width:420px) and (min-height:480px){
 body.agent .composer {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 body.agent .composer textarea {grid-row:1;grid-column:1/-1;width:100%}
 body.agent .composer .attach:not(.ll-voice-toggle) {grid-row:2;grid-column:1}
 body.agent .composer .ll-voice-toggle {grid-row:2;grid-column:2}
 body.agent .composer .send {grid-row:2;grid-column:3}
}
@media(max-width:850px) and (max-height:479px){
 body.agent .thread-head {padding:4px 8px;gap:4px 8px}
 body.agent .thread-head .thread-actions button {min-height:38px;padding:5px 9px}
 body.agent .mobile-summary {padding:2px 10px;max-height:20dvh}
 body.agent .conversation {padding:8px}
 body.agent .composer {padding:4px 8px max(4px,env(safe-area-inset-bottom));gap:4px}
 body.agent .composer button {padding:6px;min-width:38px;font-size:12px}
}
