/* Private collaboration inbox. No public data, no chatbot integration. */
.chat-shell{padding-top:29px;padding-bottom:65px}
.chat-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:18px}
.chat-heading h1{margin:0;font-size:clamp(30px,4vw,43px);line-height:1.15}
.chat-heading p{font-size:14px;color:var(--muted);margin:7px 0 0;max-width:660px}
.chat-heading .chat-eyebrow{margin:0 0 5px;font-size:11px;text-transform:uppercase;font-weight:800;letter-spacing:.1em;color:var(--accent)}
.chat-back{font-size:13px;white-space:nowrap}
.chat-status{font-size:13px;padding:8px 0;min-height:24px;color:var(--accent)}
.chat-status:empty{display:none}
.chat-status[data-error=true]{color:#9c3e22}
.chat-button{background:var(--deep);color:#fff;border:0;border-radius:7px;padding:9px 14px;cursor:pointer;font:inherit;font-size:13px;font-weight:720}
.chat-button:hover{background:#255841}
.chat-button:disabled{opacity:.55;cursor:not-allowed}
.chat-link-button{background:transparent;border:1px solid var(--line);padding:5px 10px;border-radius:6px;color:var(--accent);font:inherit;font-size:12px;cursor:pointer}
.chat-login{max-width:550px;border:1px solid var(--line);background:#fff;border-radius:11px;padding:23px 25px}
.chat-login h2{font-size:21px;margin:0 0 8px}
.chat-login p{font-size:13px;color:var(--muted);margin:0 0 15px}
.chat-login label,.chat-compose label,.chat-reply label{display:block;margin:11px 0 5px;font-weight:700;font-size:13px}
.chat-login input,.chat-compose textarea,.chat-compose select,.chat-reply textarea{width:100%;padding:10px 11px;border:1px solid #cbd7cc;border-radius:7px;background:#fff;color:var(--ink);font:inherit;font-size:14px}
.chat-login input{max-width:400px}
.chat-login button{display:block;margin:12px 0}
#chat-turnstile{margin:11px 0}
.chat-user-line{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:9px 0 15px;font-size:13px;color:var(--muted)}
.chat-user-line strong{color:var(--ink)}
.chat-layout{display:grid;grid-template-columns:minmax(235px,305px) minmax(0,1fr);min-height:540px;border:1px solid var(--line);background:#fff;border-radius:12px;overflow:hidden}
.chat-sidebar{background:#f5f8f4;border-right:1px solid var(--line);padding:14px;min-width:0}
.chat-sidebar-top{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding-bottom:11px}
.chat-sidebar-top h2{font-size:17px;margin:0}
#chat-unread-count,.chat-pill{display:inline-block;min-width:21px;border-radius:12px;padding:2px 6px;background:#ad4725;color:white;text-align:center;font-size:11px;font-weight:800}
.chat-sidebar .chat-button{padding:7px 10px;font-size:12px}
.chat-threads{display:flex;flex-direction:column;gap:7px}
.chat-thread{display:flex;flex-direction:column;gap:5px;width:100%;text-align:left;background:#fff;border:1px solid var(--line);border-radius:8px;color:var(--ink);padding:11px;cursor:pointer;font:inherit}
.chat-thread:hover{border-color:#91b49e}
.chat-thread.active{background:#e3eee6;border-color:#76a487}
.chat-thread-top{display:flex;justify-content:space-between;align-items:center;gap:7px}
.chat-thread strong{font-size:13px;font-weight:750;line-height:1.3}
.chat-thread small{font-size:11px;color:var(--muted)}
.chat-none{font-size:13px;color:var(--muted)}
.chat-main{padding:20px;min-width:0}
.chat-main h2{font-size:20px;line-height:1.3;margin:0 0 14px}
.chat-empty{margin:55px auto;max-width:410px;text-align:center;color:var(--muted);font-size:14px}
.chat-compose{max-width:720px}
.chat-compose textarea{resize:vertical;min-height:132px}
.chat-compose .chat-consent{display:flex;align-items:flex-start;gap:9px;font-size:12px;font-weight:500;line-height:1.5;margin:13px 0}
.chat-consent input{flex:none;width:auto;margin-top:3px;accent-color:var(--accent)}
.chat-conversation-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.chat-conversation-heading h2{margin:0;font-size:18px}
.chat-conversation-heading p{font-size:12px;color:var(--muted);margin:5px 0}
#chat-thread-state{font-size:11px;font-weight:800;color:var(--accent);border:1px solid var(--line);border-radius:5px;padding:4px 6px;white-space:nowrap}
.chat-messages{height:min(50vh,530px);min-height:260px;overflow-y:auto;display:flex;flex-direction:column;gap:13px;padding:18px 2px;scrollbar-gutter:stable}
.chat-bubble{max-width:min(85%,620px);padding:12px 14px;border-radius:12px;background:#f0f3ee;border:1px solid var(--line)}
.chat-bubble.mine{align-self:flex-end;background:#e6f0e7}
.chat-bubble.admin{align-self:flex-start;background:#f6f3ee}
.chat-bubble strong{font-size:12px}
.chat-bubble p{margin:5px 0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.5}
.chat-bubble small{font-size:10px;color:var(--muted)}
.chat-reply{border-top:1px solid var(--line);padding-top:12px}
.chat-reply label{margin-top:0}
.chat-reply textarea{resize:vertical;min-height:68px}
.chat-reply .chat-button{margin-top:7px}
#chat-closed-note{font-size:12px;color:var(--muted)}
.chat-privacy-note{font-size:12px;color:var(--muted);margin-top:15px}
[hidden]{display:none!important}
@media(max-width:750px){
 .chat-heading{align-items:flex-start;flex-direction:column;gap:6px}
 .chat-layout{display:block}
 .chat-sidebar{border-right:0;border-bottom:1px solid var(--line);padding:12px}
 .chat-threads{max-height:210px;overflow-y:auto}
 .chat-main{padding:14px}
 .chat-messages{height:42vh;min-height:220px}
 .chat-bubble{max-width:93%}
 .chat-user-line{flex-wrap:wrap}
}

/* Explicit, revocable text-analysis consent for each private thread. */
.chat-analysis-toggle{display:flex;align-items:flex-start;gap:9px;margin:12px 0 3px;padding:10px 12px;background:#f7f9f5;border:1px solid var(--line);border-radius:7px;color:var(--muted);font-size:12px;font-weight:500;line-height:1.48}
.chat-analysis-toggle input{flex:none;width:auto;margin:3px 0 0;accent-color:var(--accent)}
.chat-analysis-note{font-size:11px;color:var(--accent);margin:0 0 9px}
