.sidebar nav .nav-with-count{display:inline-flex;align-items:center;gap:10px;min-width:0}.sidebar nav .nav-count{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:23px;max-width:65px;height:20px;padding:2px 7px;border-radius:14px;background:#00658c;color:#fff;font-size:11px;font-weight:700;line-height:1;overflow:hidden}.nav-count[hidden]{display:none!important}
.attention-presence{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #bdced8;border-radius:20px;background:#fff;padding:9px 13px;color:#174358;font:inherit;font-size:12px;flex:none;min-height:40px;cursor:pointer}.attention-presence[hidden]{display:none}.presence-dot{width:8px;height:8px;background:#90a4ae;border-radius:50%;flex:none}.attention-presence[data-state=connected] .presence-dot{background:#16835b}.attention-presence[data-state=busy] .presence-dot{background:#bc7f17}
.attention-presence-dialog{max-width:390px;width:calc(100% - 32px);border:0;border-radius:18px;padding:24px;color:#16384c}.attention-presence-dialog header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.attention-presence-dialog h2{margin:0}.attention-presence-dialog form{display:grid;gap:16px}.attention-presence-dialog p{margin:16px 0;overflow-wrap:anywhere}.attention-presence-dialog> .secondary{display:block;text-align:center;margin:16px 0}.attention-presence-dialog .quiet{white-space:normal;line-height:1.5}
/* Attention workspace: scoped native-like list, thread and contact panes. */
body[data-view="attention"]:not(.auth-locked){height:100dvh;overflow:hidden;background:#f8fafc}
body[data-view="attention"]:not(.auth-locked) .workspace{height:100%;min-height:0}
body[data-view="attention"]:not(.auth-locked) #main{display:flex;flex-direction:column;height:100%;min-height:0;padding:12px 16px 16px;box-sizing:border-box}
body[data-view="attention"]:not(.auth-locked) .intro{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;flex:none;gap:12px;min-height:42px;margin:0 0 10px}
body[data-view="attention"]:not(.auth-locked) .intro #page-title{font:600 16px/1.3 system-ui,sans-serif;margin:0}
body[data-view="attention"]:not(.auth-locked) .intro .lead,body[data-view="attention"] #sources{display:none}
body[data-view="attention"]:not(.auth-locked) #app{display:flex;flex:1;min-height:0;flex-direction:column}
#attention-page:not([hidden]){display:flex;flex:1;min-height:0;flex-direction:column;font:14px/1.45 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#263445}
#attention-page *,#attention-page *:before,#attention-page *:after{box-sizing:border-box}
#attention-page [hidden]{display:none!important}
#attention-page .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;padding:0;border:0}
#attention-page button,#attention-page input,#attention-page textarea,#attention-page select{font:inherit;color:inherit;min-width:0}
#attention-page button{cursor:pointer;max-width:100%;margin:0;white-space:normal}
#attention-page button:disabled{cursor:default;opacity:.45}
#attention-page button:focus-visible,#attention-page a:focus-visible,#attention-page input:focus-visible,#attention-page select:focus-visible,#attention-page textarea:focus-visible{outline:2px solid #2781f6;outline-offset:2px}
#attention-state:empty{display:none}
#attention-state{flex:none;padding:6px 10px;font-size:12px;color:#52606f;background:#f1f5f9;border-radius:6px;margin:0 0 8px;overflow-wrap:anywhere}
.attention-workspace{display:flex;flex:1;min-height:0;min-width:0;border:1px solid #e2e8ef;border-radius:10px;overflow:hidden;background:#fff}
.attention-inbox{display:flex;flex:none;flex-direction:column;min-height:0;width:290px;border-right:1px solid #e2e8ef;background:#fff}
.attention-inbox-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:56px;padding:14px 16px}
#attention-page .attention-inbox-heading h2{font:600 15px/1.4 system-ui,sans-serif;margin:0}
.attention-inbox-subtitle{font-size:11px;color:#697786}
.attention-filters{padding:0 12px;display:flex;flex-direction:column;gap:10px;flex:none;margin:0}
#attention-page .attention-search{display:flex;position:relative;align-items:center;gap:0;border:1px solid #e1e7ed;border-radius:7px;background:#f8fafc}
#attention-page .attention-search input{display:block;background:transparent;border:0;outline:0;padding:8px 0 8px 10px;width:100%;font-size:12px;height:36px}
#attention-page .attention-list-filter select{width:100%;border:1px solid #e1e7ed;border-radius:6px;background:#fff;padding:6px 8px;font-size:12px;height:32px}
.attention-list-tabs{display:flex;gap:4px;border-bottom:1px solid #e2e8ef}
#attention-page .attention-list-tabs button{flex:1;border:0;border-radius:0;background:transparent;padding:8px 2px;border-bottom:2px solid transparent;font-size:12px;color:#64748b}
#attention-page .attention-list-tabs button[aria-pressed=true]{border-color:#2781f6;color:#1d63ba;font-weight:600}
.attention-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column}
#attention-page .attention-case{display:flex;align-items:flex-start;gap:10px;flex:none;width:100%;padding:14px 12px;border:0;border-bottom:1px solid #edf1f5;border-radius:0;text-align:left;background:#fff;box-shadow:none}
#attention-page .attention-case:hover{background:#f7f9fc}
#attention-page .attention-case.selected{background:#eaf3ff;box-shadow:inset 3px 0 #2781f6}
.attention-avatar{display:flex;flex:none;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:#e7edf4;color:#486176;font-size:12px;font-weight:600;line-height:1}
.attention-case-content{display:flex;flex-direction:column;gap:5px;min-width:0;width:100%;overflow:hidden}
.attention-case-heading{display:flex;align-items:center;gap:8px;min-width:0}
.attention-case-heading strong{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.attention-case-heading time{margin-left:auto;flex:none;font-size:10px;color:#8693a0}
.attention-case-preview{font-size:12px;color:#697786;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.attention-case-meta{display:flex;justify-content:space-between;align-items:center;gap:5px;font-size:10px;color:#7c8996}
.attention-unread{width:7px;height:7px;border-radius:50%;background:#2781f6;flex:none}
.attention-list-empty{padding:28px 16px;text-align:center;font-size:12px;color:#697786}
.attention-pagination{display:flex;justify-content:center;align-items:center;gap:14px;flex:none;padding:6px;border-top:1px solid #e2e8ef;color:#64748b;font-size:11px}
#attention-page .attention-icon{display:inline-flex;flex:none;align-items:center;justify-content:center;width:34px;height:34px;border:0;border-radius:6px;background:transparent;color:#637484;line-height:1;padding:6px}
#attention-page .attention-icon:hover{background:#edf2f7}
#attention-page .attention-icon svg{flex:none}
.attention-chat{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0;background:#f9fafb}
.attention-empty{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;flex:1;color:#94a0ad}
.attention-empty p{font-size:13px;margin:0;padding:12px;text-align:center}
.attention-empty-icon{font-size:36px;color:#c1ccd8}
#attention-detail{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0}
.attention-thread-heading{display:flex;align-items:center;flex:none;gap:10px;min-height:62px;padding:10px 14px;border-bottom:1px solid #e2e8ef;background:#fff}
.attention-thread-title{display:flex;flex:1;flex-direction:column;gap:3px;min-width:0;overflow:hidden}
#attention-page .attention-thread-title h2{font:600 14px/1.3 system-ui,sans-serif;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.attention-thread-title>span{font-size:11px;color:#718096}
#attention-page .attention-resolve{flex:none;border:1px solid #dbe3ec;border-radius:6px;background:#fff;padding:6px 9px;font-size:12px;min-height:32px}
#attention-page .attention-resolve:hover{background:#f1f5f9}
#attention-page .attention-mobile-back{display:none}
.attention-messages{display:flex;flex:1;flex-direction:column;align-items:flex-start;min-height:0;overflow:auto;overscroll-behavior:contain;gap:14px;padding:22px 18px;scrollbar-gutter:stable}
#attention-page .attention-earlier{align-self:center;flex:none;border:0;border-radius:6px;background:#edf2f7;color:#64748b;padding:6px 10px;font-size:11px}
.attention-message{flex:none;max-width:87%;min-width:0;padding:11px 13px;border:1px solid #e4e9ef;border-radius:10px;background:#f0f3f7;align-self:flex-start;color:#334155}
.attention-message.outgoing{align-self:flex-end;background:#e9f2ff;border-color:#dceaff}
.attention-message.private{align-self:stretch;max-width:100%;background:#fff5d7;border-color:#f4e4b7}
.attention-message.activity{align-self:center;max-width:100%;background:transparent;border:0;color:#8693a0;text-align:center;font-size:12px}
.attention-message header{font-size:10px;color:#64748b;margin:0 0 5px}
.attention-message header strong{font-weight:500}
.attention-message p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;line-height:1.5;font-size:13px}
.attention-message time{display:block;text-align:right;color:#8492a3;font-size:10px;margin-top:6px}
.attention-attachments{display:flex;flex-direction:column;gap:7px;margin-top:8px;min-width:0}
.attention-attachments a{display:flex;align-items:center;gap:5px;font-size:12px;color:#1d63ba;overflow-wrap:anywhere;max-width:100%;min-width:0}
.attention-attachments svg{width:14px;height:14px;flex:none}
#attention-reply{display:flex;flex:none;flex-direction:column;gap:0;margin:0;border-top:1px solid #e2e8ef;background:#fff;padding:10px 12px 8px;min-width:0}
#attention-reply.is-note{background:#fffae8;border-color:#f2e2b7}
.attention-compose-tabs{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-bottom:6px}
#attention-page .attention-compose-tabs>button{border:0;background:transparent;border-radius:6px;padding:5px 9px;color:#697786;font-size:12px}
#attention-page .attention-compose-tabs>button[aria-pressed=true]{background:#e8eef5;color:#334155;font-weight:600}
#attention-reply.is-note .attention-compose-tabs>button[aria-pressed=true]{background:#f2e5b7}
#attention-page .attention-template-label{margin-left:auto;max-width:100%}
#attention-page .attention-template-label select{background:transparent;border:1px solid #dbe3ec;border-radius:6px;padding:4px;font-size:11px;width:100%}
.attention-editor{display:block;min-width:0}
#attention-page #attention-reply-text{display:block;min-width:0;width:100%;height:90px;min-height:70px;max-height:150px;resize:none;border:0;border-radius:0;outline-offset:-2px;background:transparent;box-shadow:none;padding:7px 2px;color:#334155;line-height:1.5;font-size:13px}
.attention-compose-actions{display:flex;align-items:center;gap:6px;min-width:0;margin-top:4px}
#attention-page .attention-attach{position:relative;cursor:pointer;overflow:hidden}
#attention-page .attention-attach input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%;margin:0;padding:0}
#attention-file-name{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:40%}
#attention-page #attention-submit{display:flex;align-items:center;justify-content:center;gap:7px;flex:none;margin-left:auto;background:#2781f6;color:#fff;border:0;border-radius:6px;padding:7px 10px;min-height:34px;font-size:12px}
#attention-page #attention-submit svg{width:15px;height:15px}
#attention-reply.is-note #attention-submit{background:#a57316}
#attention-reply-state:empty{display:none}
#attention-reply-state{font-size:11px;color:#9b651c;line-height:1.4;overflow-wrap:anywhere;padding:6px 2px 0;margin:0}
.attention-contact-panel{display:flex;flex-direction:column;flex:none;min-height:0;min-width:0;width:270px;background:#fff;border-left:1px solid #e2e8ef}
#attention-page[data-contact=closed] .attention-contact-panel{display:none}
.attention-contact-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;min-height:62px;padding:10px 16px;border-bottom:1px solid #e2e8ef}
#attention-page .attention-contact-heading h2{font:600 14px/1.4 system-ui,sans-serif;margin:0}
.attention-contact-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 16px}
.attention-contact-summary{display:flex;align-items:center;flex-direction:column;gap:10px;padding:22px 0;text-align:center;border-bottom:1px solid #e2e8ef}
.attention-contact-summary .attention-avatar{width:48px;height:48px;font-size:16px}
#attention-page .attention-contact-summary h3{font:600 14px/1.4 system-ui,sans-serif;margin:0;overflow-wrap:anywhere}
.attention-contact-summary a{font-size:12px;color:#64748b;overflow-wrap:anywhere;max-width:100%;line-height:1.4}
.attention-options{border-bottom:1px solid #e2e8ef;margin:0;padding:14px 0}
#attention-page .attention-options summary{font-size:12px;font-weight:600;cursor:pointer;line-height:1.4;color:#475569}
.attention-option-controls{display:flex;flex-direction:column;gap:9px;margin-top:14px}
#attention-page .attention-option-controls label,#attention-recovery label{display:flex;flex-direction:column;gap:6px;font-size:11px;color:#64748b}
#attention-page .attention-option-controls select,#attention-recovery input:not([type=checkbox]){width:100%;border:1px solid #dce3eb;border-radius:6px;background:#fff;padding:6px 8px;min-height:32px;font-size:12px;color:#334155}
#attention-page .attention-option-controls>button,#attention-recovery button{align-self:flex-start;border:1px solid #dce3eb;border-radius:6px;padding:6px 8px;font-size:11px;background:#f8fafc}
#attention-page .attention-option-controls fieldset{border:1px solid #e2e8ef;border-radius:6px;padding:10px}
#attention-page .attention-option-controls fieldset label,#attention-recovery label:has(input[type=checkbox]){flex-direction:row;align-items:center;gap:6px;line-height:1.4}
#attention-page input[type=checkbox]{width:16px;height:16px;flex:none}
#attention-page .attention-options dl{display:grid;grid-template-columns:auto 1fr;gap:6px;font-size:11px;margin:12px 0 0}
#attention-page .attention-options dd{margin:0;text-align:right;overflow-wrap:anywhere}
#attention-recovery{display:flex;flex-direction:column;gap:10px;margin:16px 0;padding:12px;background:#fff5d7;border-radius:8px}
#attention-recovery h3{font:600 12px/1.4 system-ui,sans-serif;margin:0}
#attention-recovery p{font-size:11px;margin:0}
@media(min-width:1600px){.attention-inbox{width:340px}.attention-contact-panel{width:310px}}
@media(min-width:851px) and (max-width:1200px){.attention-inbox{width:250px}.attention-contact-panel{width:240px}.attention-thread-heading{gap:7px;padding:10px}.attention-thread-heading .attention-avatar{display:none}}
@media(max-width:850px){
 .sidebar nav .nav-count{display:none!important}.intro{flex-wrap:wrap}.attention-presence{margin:0}
 body[data-view="attention"]:not(.auth-locked){display:flex;flex-direction:column;height:100dvh;min-height:0;padding-bottom:env(safe-area-inset-bottom)}
 body[data-view="attention"]:not(.auth-locked) .sidebar{position:relative;width:100%;flex:none;margin:0}
 body[data-view="attention"]:not(.auth-locked) .workspace{flex:1;min-height:0;width:100%;height:auto;margin:0}
 body[data-view="attention"]:not(.auth-locked) #main{padding:6px 6px 0;height:100%;overflow:hidden}
 body[data-view="attention"]:not(.auth-locked) .intro{min-height:38px;margin:0 0 6px;gap:8px}
 body[data-view="attention"]:not(.auth-locked) .intro #page-title{font-size:14px}
 body[data-view="attention"]:not(.auth-locked) .attention-presence{font-size:10px;padding:6px 9px;min-height:32px}
 .attention-workspace{border-radius:8px 8px 0 0}
 .attention-inbox,.attention-chat,.attention-contact-panel{width:100%;flex:1;min-width:0;border:0}
 #attention-page[data-pane=list] .attention-chat,#attention-page[data-pane=list] .attention-contact-panel,#attention-page[data-pane=chat] .attention-inbox,#attention-page[data-pane=chat] .attention-contact-panel,#attention-page[data-pane=contact] .attention-inbox,#attention-page[data-pane=contact] .attention-chat{display:none}
 #attention-page[data-pane=contact] .attention-contact-panel{display:flex}
 #attention-page .attention-mobile-back{display:inline-flex}
 .attention-inbox-heading{padding:10px 14px;min-height:44px}
 .attention-thread-heading{gap:6px;padding:8px;min-height:60px;flex-wrap:nowrap}
 .attention-thread-heading .attention-avatar{display:none}
 #attention-page .attention-thread-title h2{font-size:13px}
 #attention-page .attention-thread-title>span{font-size:10px}
 #attention-page .attention-resolve{font-size:11px;padding:5px 7px}
 .attention-messages{gap:12px;padding:16px 12px}
 .attention-message{max-width:91%;padding:10px 11px}
 .attention-message p{font-size:13px}
 #attention-reply{padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left))}
 #attention-page #attention-reply-text{height:78px;min-height:54px;font-size:14px}
 #attention-page #attention-submit{min-height:36px}
 .attention-compose-tabs{margin-bottom:3px}
 .attention-contact-heading{min-height:52px}
 .attention-contact-scroll{padding:0 18px}
}
@media(max-height:600px){#attention-page #attention-reply-text{height:54px;min-height:36px}.attention-messages{padding:8px 12px}body[data-view="attention"]:not(.auth-locked) .intro{min-height:32px;margin-bottom:2px}.attention-thread-heading{min-height:48px;padding-top:4px;padding-bottom:4px}}

/* Lucas's current reference is Consultas; native Chatwoot geometry is superseded. */
body[data-view="attention"]:not(.auth-locked) #main{padding:24px 28px}
body[data-view="attention"]:not(.auth-locked) .intro{margin-bottom:12px}
#attention-page{font-family:DM,system-ui,sans-serif}
.attention-workspace{border-color:#7599b2;border-radius:14px}
.attention-inbox{width:230px;background:#edf4f9;border-color:#d8e4ed}
#attention-page .attention-inbox-heading h2{font-family:DM,system-ui,sans-serif;color:#365e76}
#attention-page .attention-case{background:transparent;border-color:#d8e4ed;color:#365e76}
#attention-page .attention-case:hover,#attention-page .attention-case.selected{background:#e5f3fc;color:#00658c;box-shadow:none}
.attention-list-tabs{border-color:#c3d7e4}
#attention-page .attention-list-tabs button[aria-pressed=true]{border-color:#007caa;color:#00658c}
.attention-chat{background-color:#b9cfdf;background-image:radial-gradient(#376b8d1a 1px,transparent 1px);background-size:20px 20px}
.attention-thread-heading{background:#edf4f9;border-color:#c3d7e4;min-height:54px}
#attention-page .attention-thread-title h2{font-family:DM,system-ui,sans-serif;color:#123248}
.attention-message{background:#fff;border:0;max-width:min(91%,800px);color:#123248;padding:15px 18px;border-radius:16px;box-shadow:0 1px 1px #35566e12}
.attention-message.outgoing{background:#ccecfb;color:#123248}
.attention-message.private{background:#fff5d7}
.attention-message header{color:#00749f;font-size:11px}
.attention-message p{font-family:DM,system-ui,sans-serif;font-size:14px;line-height:1.6}
.attention-message time{color:#567489;font-family:DM,system-ui,sans-serif}
.attention-message.activity{background:transparent;box-shadow:none;color:#4e7086}
.attention-empty{color:#365e76}
#attention-reply{background:#eaf2f8;border:0;padding:8px 10px max(8px,env(safe-area-inset-bottom));gap:6px}
#attention-reply.is-note{background:#fff5d7}
.attention-compose-tabs{margin:0;gap:6px}
#attention-page .attention-compose-tabs>button{font:12px DM,system-ui,sans-serif;color:#526b79;border-radius:16px;padding:6px 10px}
#attention-page .attention-compose-tabs>button[aria-pressed=true]{background:#fff;color:#00658c;box-shadow:0 1px 2px #0001}
#attention-reply.is-note .attention-compose-tabs>button[aria-pressed=true]{background:#f2e5b7;color:#825810}
.attention-compose-actions{align-items:flex-end;gap:6px;margin:0;width:100%;min-width:0}
.attention-input-shell{display:flex;align-items:flex-end;flex:1;min-width:0;min-height:48px;background:#fff;border-radius:26px;box-shadow:0 1px 2px #0002;padding-right:4px}
.attention-input-shell:focus-within{box-shadow:0 0 0 2px #007caa30,0 1px 2px #0002}
#attention-page .attention-editor{flex:1;min-width:0;display:block}
#attention-page #attention-reply-text{width:100%;height:48px;min-height:48px;max-height:110px;margin:0;padding:12px 4px 12px 16px;background:transparent;color:#1f2c34;border:0;border-radius:26px;font:16px/24px DM,system-ui,sans-serif;overflow-y:auto;box-shadow:none}
#attention-page #attention-reply-text:focus-visible{outline:0}
#attention-page #attention-reply-text::placeholder{color:#667781;opacity:1}
.attention-input-tools{display:flex;align-items:center;flex:none;padding:2px 0}
#attention-page .attention-input-tools .attention-attach{display:flex;width:44px;height:44px;min-height:44px;border-radius:50%;padding:0;align-items:center;justify-content:center;color:#667781}
#attention-page .attention-input-tools svg{width:24px;height:24px}
#attention-page #attention-submit{display:flex;align-items:center;justify-content:center;flex:none;width:48px;height:48px;min-height:48px;padding:0;border:0;border-radius:50%;background:var(--cyan);color:#fff;box-shadow:none;margin:0}
#attention-page #attention-submit svg{width:24px;height:24px}
#attention-reply.is-note #attention-submit{background:#a5731b}
.attention-file-preview{display:flex;align-items:center;gap:8px;min-width:0}
.attention-file-preview:has(#attention-file-name:empty){display:none}
#attention-file-name{max-width:calc(100% - 44px);font-size:12px}
.attention-contact-panel{display:none;width:auto;background:#edf4f9;border:0;flex:1}
#attention-page[data-pane=contact] .attention-chat{display:none}
#attention-page[data-pane=contact] .attention-contact-panel{display:flex}
.attention-contact-heading{background:#edf4f9;min-height:54px;border-color:#c3d7e4}
.attention-contact-scroll{padding:0 24px;max-width:650px;width:100%;margin:0 auto}
.attention-option-controls{max-width:440px}
#attention-page .attention-option-controls>button,#attention-recovery button{color:#00658c;border-radius:18px;padding:8px 12px}
@media(max-width:850px){
 body[data-view="attention"]:not(.auth-locked) #main{padding:0}
 body[data-view="attention"]:not(.auth-locked) .intro{padding:4px 12px;margin:0;min-height:40px}
 .attention-workspace{border:0;border-radius:0}
 .attention-inbox,.attention-chat,.attention-contact-panel{width:100%}
 .attention-thread-heading{padding:7px 10px;min-height:54px}
 .attention-message{max-width:94%;padding:11px 13px}
 #attention-reply{padding-left:max(30px,env(safe-area-inset-left));padding-right:max(30px,env(safe-area-inset-right))}
 .attention-messages{padding:14px 10px}
 #attention-page #attention-reply-text{height:48px;min-height:48px}
 #attention-page .attention-input-tools .attention-attach{width:36px;height:44px}
 #attention-page .attention-input-tools svg{width:22px;height:22px}
 #attention-page .attention-compose-tabs>button{font-size:11px}
}

/* Same left-edge drawer motion and accessible native-dialog focus in both chats. */
.attention-toolbar{display:flex;align-items:center;flex:none;min-height:40px;padding:0 4px 8px}
.attention-toolbar .chat-tool svg{width:20px;height:20px}
@media(max-width:850px){#chat-history-toggle{display:flex!important}}
#chat-history-dialog,#attention-menu-dialog{position:fixed;inset:0 auto 0 0;margin:0;width:min(300px,88vw);height:100dvh;max-height:100dvh;max-width:88vw;padding:0;border:0;border-radius:0 18px 18px 0;background:#edf4f9;overflow:hidden;box-sizing:border-box;clip-path:inset(0 round 0 18px 18px 0);box-shadow:10px 0 30px #001d2e25}
#chat-history-dialog[open],#attention-menu-dialog[open]{display:flex;flex-direction:column;animation:portal-drawer-in .22s ease-out both}
#chat-history-dialog.drawer-closing,#attention-menu-dialog.drawer-closing{animation:portal-drawer-out .18s ease-in both}
#chat-history-dialog::backdrop,#attention-menu-dialog::backdrop{background:#001d2e70}
#attention-menu-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:max(10px,env(safe-area-inset-top)) 12px 8px;border-bottom:1px solid #bfd0da;flex:none}
#attention-menu-dialog>header h2{margin:0;font:18px DM,system-ui,sans-serif}
#attention-menu-dialog .attention-inbox{width:100%;min-height:0;flex:1;border:0;padding-bottom:env(safe-area-inset-bottom)}
#attention-menu-dialog .attention-inbox-heading{min-height:44px}
#attention-menu-dialog .attention-filters{display:flex;gap:10px;padding:0 12px}
#attention-menu-dialog .attention-search{display:flex;align-items:center;border:1px solid #c3d7e4;border-radius:10px;background:#fff}
#attention-menu-dialog input,#attention-menu-dialog select{min-width:0;width:100%;font:12px DM,system-ui,sans-serif;color:#365e76;padding:8px;border:1px solid #c3d7e4;border-radius:8px;background:#fff}
#attention-menu-dialog .attention-search input{border:0;background:transparent}
#attention-menu-dialog .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;padding:0;border:0}
#attention-menu-dialog .attention-list-tabs button{flex:1;font:12px DM,system-ui,sans-serif;background:transparent;color:#526b79;border:0;border-bottom:2px solid transparent;border-radius:0;padding:8px 2px}
#attention-menu-dialog .attention-list-tabs button[aria-pressed=true]{border-color:#007caa;color:#00658c}
#attention-menu-dialog .attention-case{display:flex;align-items:flex-start;gap:10px;flex:none;width:100%;padding:14px 12px;border:0;border-bottom:1px solid #d8e4ed;border-radius:0;text-align:left;background:transparent;color:#365e76;font:14px DM,system-ui,sans-serif;box-shadow:none}
#attention-menu-dialog .attention-case.selected,#attention-menu-dialog .attention-case:hover{background:#e5f3fc;color:#00658c}
#attention-menu-dialog .attention-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:34px;height:34px;border:0;border-radius:6px;background:transparent;color:#637484;font:inherit}
@keyframes portal-drawer-in{from{transform:translateX(-102%)}to{transform:translateX(0)}}
@keyframes portal-drawer-out{from{transform:translateX(0)}to{transform:translateX(-102%)}}
@media(prefers-reduced-motion:reduce){#chat-history-dialog[open],#attention-menu-dialog[open]{animation:none!important}}
@media(max-width:850px){.attention-toolbar{padding:4px 10px;min-height:38px}}

.attention-toolbar{display:none}
body[data-view=attention]:not(.auth-locked) .intro .attention-toolbar{display:flex;min-height:34px;flex:none;padding:0}
body[data-view=attention] .intro>div:not(.attention-toolbar){flex:1;min-width:0}
@media(max-width:850px){#attention-reply{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}#attention-page #attention-reply-text:placeholder-shown{white-space:nowrap}}

#attention-page #attention-filters .attention-search{display:flex;align-items:center;gap:0}
#attention-menu-dialog .attention-inbox-heading h2{font:600 15px/1.4 DM,system-ui,sans-serif;margin:0;color:#365e76}
@media(max-width:400px){#attention-page .attention-input-tools .attention-attach:has(#attention-camera){display:none}}

#attention-page #attention-filters .attention-search,#attention-menu-dialog .attention-search{flex-direction:row}
#attention-page #attention-filters .attention-search input{flex:1;min-width:0}

/* #app form:not(#ask-form) carries two ID selectors; scope above that global rule. */
#app #attention-page #attention-filters label.attention-search{display:flex;flex-direction:row;align-items:center;gap:0}

/* Desktop keeps its integrated conversation list; the extra drawer is mobile-only. */
@media(min-width:851px){
 #chat-history-toggle{display:none!important}
 body[data-view=attention]:not(.auth-locked) .intro .attention-toolbar{display:none}
}
body:is([data-view=assistant],[data-view=attention]):not(.auth-locked) #main{width:100%;max-width:none;min-width:0;margin:0}
body:is([data-view=assistant],[data-view=attention]):not(.auth-locked) .workspace{min-width:0}
.attention-workspace{width:100%;max-width:100%}

/* The full presence control belongs only to Attention; navigation uses a dot. */
body:not([data-view="attention"]) #attention-presence-toggle,body.auth-locked #attention-presence-toggle{display:none!important}
#attention-nav .attention-nav-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none}
#attention-nav .attention-nav-presence{position:absolute;right:-3px;top:-2px;width:8px;height:8px;box-shadow:0 0 0 2px #001a26}
#attention-nav .attention-nav-presence[hidden],body.auth-locked #attention-presence-indicator{display:none!important}
.attention-nav-presence[data-state=connected]{background:#16835b}
.attention-nav-presence[data-state=busy]{background:#bc7f17}

/* Desktop names the same availability; mobile keeps the compact dot. */
#attention-nav .attention-nav-label{display:flex;flex-direction:column;gap:4px;min-width:0;margin:0;text-align:left}
#attention-nav .attention-nav-status{font-size:13px;line-height:1.25;color:#b8dbe8;overflow-wrap:anywhere}
#attention-nav .attention-nav-status[hidden],body.auth-locked #attention-nav-status{display:none!important}
@media(max-width:850px){#attention-nav .attention-nav-status{display:none!important}#attention-nav .attention-nav-label{gap:0}}
@media(min-width:851px){#attention-nav{height:auto}}

/* Desktop only: compact existing availability control; green requires connected. */
@media(min-width:851px){
 body[data-view="attention"]:not(.auth-locked) #attention-presence-toggle{font-size:11px;line-height:1.3;min-height:30px;padding:5px 10px;gap:6px;border-radius:16px}
 body[data-view="attention"]:not(.auth-locked) #attention-presence-toggle[data-state="connected"]{background:#16835b;border-color:#16835b;color:#fff}
 body[data-view="attention"]:not(.auth-locked) #attention-presence-toggle[data-state="connected"] .presence-dot{background:#fff}
}
