/* COA NEXO 1.7: communications, urgency, clear touch targets. */
.comm-count,.quick-count,.comm-unread{font-size:10px;min-width:19px;height:19px;padding:1px 5px;border-radius:8px;background:var(--primary);color:white;display:inline-flex;align-items:center;justify-content:center;margin-left:auto;font-weight:750}.quick-count{background:#c64543}.top-urgent{color:#b1323f;border-color:#f1cdd2}.top-urgent .quick-count{position:absolute;right:-5px;top:-5px}.chat-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px;align-items:stretch;min-height:590px}.chat-list{display:flex;flex-direction:column;max-height:780px;overflow:auto}.chat-list-title{padding:24px 20px 19px}.chat-list-title h2{font-size:16px}.chat-list-title small{font-size:10px;color:var(--muted)}.chat-list-item{padding:17px 16px;display:flex;gap:12px;border-top:1px solid var(--line);transition:background .15s;min-width:0}.chat-list-item:hover,.chat-list-item.selected{background:var(--primary-soft)}.chat-list-item b{font-size:12px;overflow-wrap:anywhere}.chat-list-item p{font-size:11px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:5px 0}.chat-list-item small{font-size:9px;color:var(--muted)}.chat-list-foot{padding:18px;font-size:10px;color:var(--muted);display:flex;gap:9px;border-top:1px solid var(--line);margin-top:auto}.chat-list-foot .icon{width:15px}.chat-list-pages{display:flex;justify-content:space-between;padding:10px 18px}.chat-pane{display:flex;flex-direction:column;overflow:hidden;min-width:0}.chat-head{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:20px 24px}.chat-head h2{font-size:16px;overflow-wrap:anywhere}.chat-head p{font-size:10px;color:var(--muted);margin-top:4px}.chat-back{display:none;transform:rotate(180deg);flex-shrink:0}.chat-stream{background:var(--surface2);padding:24px;flex:1;min-height:230px;height:420px;overflow-y:auto;overscroll-behavior:contain}.chat-bubble{margin:0 0 17px;max-width:88%;width:fit-content;background:var(--surface);border:1px solid var(--line);border-radius:4px 16px 16px 16px;padding:14px 16px;box-shadow:0 3px 8px #101a3010}.chat-bubble.mine{margin-left:auto;background:var(--primary-soft);border-color:transparent;border-radius:16px 4px 16px 16px}.chat-bubble.urgent{border:1px solid #da9d9d;border-left:3px solid #c34343}.chat-bubble header{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px;font-size:10px}.chat-bubble header b{font-weight:750}.chat-bubble time{font-size:9px;color:var(--muted);margin-left:auto}.chat-text{font-size:13px;line-height:1.7;overflow-wrap:anywhere;white-space:normal}.chat-text a{color:var(--primary);text-decoration:underline;word-break:break-word}.chat-bubble footer{margin-top:10px;padding-top:6px;border-top:1px solid color-mix(in srgb,var(--line) 60%,transparent)}.chat-bubble footer .text-btn{font-size:10px}.chat-urgent-label{color:#b12b39;background:#ffe6e6;padding:2px 6px;border-radius:5px;font-size:8px;font-weight:800;letter-spacing:1px}.chat-composer{padding:18px 22px;background:var(--surface);border-top:1px solid var(--line)}.chat-composer textarea{width:100%;resize:vertical;min-height:72px;max-height:200px;font-size:13px;margin-bottom:10px}.chat-composer .check-label{font-size:11px}.chat-composer small{display:block;font-size:9px;color:var(--muted);margin-top:9px}.chat-composer.readonly{font-size:12px;color:var(--muted)}.chat-composer.readonly p{margin-bottom:12px}.chat-welcome{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:42px;gap:18px;min-height:540px}.chat-welcome h2{font-size:30px;letter-spacing:-1px;line-height:1.25}.chat-welcome p{max-width:380px;font-size:13px;color:var(--muted);line-height:1.8}.chat-welcome small{max-width:300px;font-size:10px;color:var(--muted)}.welcome-symbol{display:grid;place-items:center;width:70px;height:70px;border-radius:23px;background:var(--primary-soft);color:var(--primary);margin-bottom:9px}.welcome-symbol .icon{width:31px;height:31px}.comm-people{max-height:230px;overflow:auto;display:grid;gap:12px;padding:16px;border-radius:12px;border:1px solid var(--line)}.receipt-list{display:grid;margin-top:18px}.receipt-list>div{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:15px 0;border-bottom:1px solid var(--line);font-size:12px}.sr-label{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden}.urgent-list{display:grid;gap:14px}.urgent-item{display:flex;position:relative;align-items:center;padding:22px 24px 22px 29px;gap:20px;overflow:hidden}.urgent-item h3{font-size:17px;margin:10px 0 5px}.urgent-item p{font-size:12px;color:var(--muted);margin:3px 0 7px}.urgent-item small{font-size:10px}.urgent-stripe{position:absolute;left:0;top:20px;bottom:20px;width:4px;border-radius:0 3px 3px 0;background:var(--primary)}.urgent-stripe.overdue{background:#c34343}.comm-filter{margin:0 0 20px;font-size:12px}.urgent-detail{max-width:920px}.urgent-detail>h2{font-size:28px;margin:18px 0 9px}.urgent-description{font-size:14px;line-height:1.8;overflow-wrap:anywhere;margin:24px 0}.urgent-facts{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:20px;border-radius:14px;background:var(--surface2);margin-top:24px}.urgent-facts small{display:block;font-size:9px;letter-spacing:1px;color:var(--muted);margin-bottom:6px}.urgent-facts b{font-size:13px}.urgent-actions{margin-top:24px}.quick-history{margin:18px 0}.quick-history article{display:flex;align-items:flex-start;gap:10px;padding:18px 0;border-top:1px solid var(--line);font-size:12px}.quick-history article time{font-size:10px;color:var(--muted);margin-left:12px}.quick-history p{font-size:13px;line-height:1.7;margin-top:7px;overflow-wrap:anywhere}.sound-card{display:flex;gap:20px;justify-content:space-between;align-items:center;flex-wrap:wrap;margin-top:20px}.sound-card p{color:var(--muted);font-size:12px;line-height:1.7;max-width:680px;margin-top:8px}.sound-controls{display:flex;flex-wrap:wrap;gap:10px}.chat-history{margin-bottom:18px}.native-card{border-top:4px solid var(--primary)}
@media(max-width:1100px){.chat-layout{grid-template-columns:255px minmax(0,1fr);gap:14px}.chat-head{padding:18px}.chat-stream{padding:17px}.chat-bubble{max-width:96%}.chat-welcome{padding:25px}.chat-welcome h2{font-size:25px}}
@media(max-width:760px){.chat-layout{display:block;min-height:0}.chat-layout.has-conversation>.chat-list{display:none}.chat-layout:not(.has-conversation)>.chat-welcome{display:none}.chat-list{max-height:none;min-height:300px}.chat-back{display:grid}.chat-stream{height:calc(100dvh - 400px);min-height:240px;max-height:650px;padding:17px 12px}.chat-composer{padding:14px}.chat-composer textarea{font-size:16px}.chat-pane{min-height:450px}.chat-head h2{font-size:15px}.chat-head{padding:14px;gap:9px}.chat-head>.avatar{display:none}.chat-bubble{padding:12px 14px}.chat-text{font-size:14px}.urgent-item{padding:20px}.urgent-item h3{font-size:16px}.urgent-item>.icon{display:none}.urgent-item .eyebrow{font-size:8px}.urgent-detail>h2{font-size:24px}.urgent-facts{grid-template-columns:1fr;gap:15px}.urgent-actions .btn{min-height:44px}.topbar .topbar-brand{max-width:60px}.topbar-right{gap:6px}.topbar select{max-width:130px}.comm-count{flex-shrink:0}.sound-card{align-items:flex-start}.sound-controls .btn{flex:1}}
@media(max-width:390px){.topbar-left{gap:6px}.topbar .topbar-brand{display:none}.topbar select{max-width:145px}.chat-head>.badge{display:none}}

/* A conversation is a viewport-sized workspace on phones, including keyboard resize. */
@media(max-width:760px){body.in-chat main{padding:12px 12px calc(80px + env(safe-area-inset-bottom))}body.in-chat main>.page-header{display:none}body.in-chat .chat-layout{height:var(--conversation-height,calc(100dvh - 205px))}body.in-chat .chat-pane{height:100%;min-height:0}body.in-chat .chat-head{flex:0 0 auto}body.in-chat .chat-stream{height:auto;min-height:80px;max-height:none;flex:1 1 0}body.in-chat .chat-composer{flex:0 0 auto;padding:12px}body.in-chat .chat-composer textarea{height:58px;min-height:48px;max-height:100px;resize:none;margin-bottom:8px}body.in-chat .chat-composer small{font-size:8px;margin-top:5px}.topbar .topbar-brand{display:block}}
@media(max-width:390px){.topbar select{max-width:85px}.topbar-left{gap:6px}.topbar-right{gap:5px}}
@media(max-width:360px){.topbar-right>a[aria-label="Mi cuenta"]{display:none}.topbar select{max-width:86px}}
