*{box-sizing:border-box}body{margin:0;font:14px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif;color:#17233b;background:#f3f6fb}button,input,select,textarea{font:inherit}button{cursor:pointer;background:#145bd7;color:#fff;border:0;border-radius:7px;padding:8px 13px}button:disabled{opacity:.5;cursor:wait}input,select,textarea{border:1px solid #ced7e5;border-radius:6px;padding:8px;max-width:100%}textarea{width:100%;resize:vertical}a{color:#145bd7}header{background:#fff;padding:12px 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dde4ef;gap:10px}.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.card{background:#fff;border:1px solid #dce3ee;border-radius:10px;padding:18px;margin:14px 0}.container{max-width:1250px;margin:auto;padding:18px}nav{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}h2,h3{margin-top:0}table{border-collapse:collapse;width:100%;font-size:13px}td,th{text-align:left;border-bottom:1px solid #e4e9f2;padding:9px;vertical-align:top;word-break:break-word}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#eef3fa;padding:12px;border-radius:7px;max-height:450px;overflow:auto}.split{display:grid;grid-template-columns:320px 1fr;gap:16px}.list{max-height:650px;overflow:auto}.item{display:block;width:100%;text-align:left;border:1px solid #e0e6ef;background:white;color:#17233b;margin:6px 0;padding:12px}.item.selected{border-color:#145bd7;background:#eef4ff}.messages{height:350px;overflow:auto;background:#f7f9fc;padding:12px}article{white-space:pre-wrap;overflow-wrap:anywhere;background:#fff;border:1px solid #dce3ee;border-radius:9px;padding:10px;margin:8px 0}.visitor{background:#e7f0ff}.system{font-size:12px;color:#64748b}.human{background:#e7f8ee}.error{color:#b91c1c;white-space:pre-wrap}.muted{color:#64748b}.chat{height:100dvh;display:flex;flex-direction:column;background:white}.chat header{flex-shrink:0}.chat main{flex:1;min-height:0;overflow:auto;padding:12px}.chat footer{padding:10px;border-top:1px solid #ddd}.chat #status{font-size:12px;padding:0 12px;color:#64748b}.chat input[type=file]{width:150px;font-size:11px}.chat #downloads{max-height:60px;overflow:auto}.chat #downloads button{font-size:11px;margin:3px}label{display:block;margin:10px 0}label input{margin-left:8px}@media(max-width:760px){.split{grid-template-columns:1fr}.container{padding:10px}.list{max-height:240px}table{display:block;overflow:auto}}
/* Interface refresh, phase 1. No API or database changes. */
:root{--brand:#155eef;--ink:#172b4d;--muted:#66758c;--line:#e1e7f0;--surface:#fff;--bg:#f4f7fb}
body{color:var(--ink);background:var(--bg);font-size:14px;line-height:1.65}
[hidden]{display:none!important}button{transition:background .15s,box-shadow .15s;border-radius:9px;padding:9px 15px;background:var(--brand);font-weight:550}button:hover:not(:disabled){background:#104bc1;box-shadow:0 3px 10px #155eef20}button:focus-visible,a:focus-visible{outline:3px solid #8fb6ff;outline-offset:3px}
input,select,textarea{background:#fff;border-color:#d6deea;border-radius:9px;padding:10px 12px;color:var(--ink)}input:focus,select:focus,textarea:focus{outline:2px solid #b6ceff;border-color:var(--brand)}
body>header{min-height:68px;box-shadow:0 2px 12px #20386006;flex-wrap:wrap}body>header>strong{font-size:18px}#identity{margin-inline-start:auto;color:var(--muted);font-size:12px}.container{max-width:1520px;padding:24px}.card{padding:22px;border:1px solid var(--line);border-radius:16px;box-shadow:0 4px 18px #263b5806}h2,h3{letter-spacing:.01em}h3{font-size:16px;margin-bottom:16px}nav{background:#e9eef6;border-radius:12px;padding:6px;gap:4px}nav button{color:#55657d;background:transparent;box-shadow:none}nav button.active,nav button:hover:not(:disabled){color:#155eef;background:#fff;box-shadow:0 2px 6px #263b580c}
#login{max-width:440px;margin:8vh auto}#login h2{font-size:25px}#login label{margin:20px 0}#login input{display:block;width:100%;margin:7px 0 0}#login button{width:100%}
.split{grid-template-columns:300px minmax(0,1fr);align-items:start}.split>.card{min-width:0;margin-top:12px}.item{border-radius:11px;padding:14px;white-space:pre-line;font-weight:400;line-height:1.6;box-shadow:none}.item:hover:not(:disabled){background:#f3f7ff;color:var(--ink);box-shadow:none}.item.selected{border-color:#b1cbff;background:#edf4ff;box-shadow:inset 3px 0 #155eef}.messages{height:440px;border:1px solid #e5ebf3;border-radius:12px;margin:16px 0;padding:18px;overscroll-behavior:contain}.messages article,.chat main article{max-width:86%;width:fit-content;line-height:1.7;border:0;box-shadow:0 2px 5px #21334b08;padding:12px 16px;border-radius:13px 13px 13px 3px}.messages article>div:first-child{font-size:11px;color:#687b95;margin-bottom:4px}.messages article.visitor{background:#e4eeff;margin-inline-end:auto}.messages article.human,.messages article.assistant{background:#fff;margin-inline-start:auto;border-radius:13px 13px 3px 13px}.messages article.system,.chat article.system{max-width:100%;width:100%;text-align:center;background:transparent;box-shadow:none;color:#748197}
.info-grid{display:grid;grid-template-columns:135px minmax(0,1fr);margin:0;font-size:13px}.info-grid dt,.info-grid dd{margin:0;padding:9px 10px;border-bottom:1px solid #edf1f6;overflow-wrap:anywhere;white-space:pre-wrap}.info-grid dt{color:var(--muted);background:#f8fafc}.contact-editor{padding:16px;background:#f7faff;border:1px solid #dce8ff;border-radius:12px;margin:12px 0}.contact-editor input{display:block;width:100%;margin:5px 0}.contact-editor button{margin:4px}.visit-list{max-height:180px;overflow:auto;background:#fafcff;border:1px solid #e3ebf5;border-radius:10px;margin:10px 0;padding:10px 14px}.visit-event{border-inline-start:2px solid #a6c4ff;padding:3px 12px 12px;margin:5px 0}.visit-event small{color:var(--muted)}.visit-event a{display:block;font-size:12px;overflow-wrap:anywhere}.internal-note{background:#fff8e8;border-color:#f5e7c5}.internal-note small{color:#8b7650}.metric-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin-bottom:20px}.metric{border:1px solid #e4ebf5;background:linear-gradient(135deg,#f9fbff,#f0f5ff);border-radius:12px;padding:18px}.metric span{display:block;color:var(--muted);font-size:12px}.metric strong{display:block;font-size:30px;line-height:1.5;color:#154da5}table th{background:#f6f8fc;color:#60708a;font-weight:600}table td{padding:12px 9px}td .info-grid{grid-template-columns:85px minmax(100px,1fr)}
.chat{background:#f5f8fc}.chat header{background:#fff;min-height:64px;padding:14px 18px}.chat header strong{font-size:16px}.chat header button{background:#eff4ff;color:#1859cf;font-size:12px}.chat main{padding:18px;scroll-behavior:smooth}.chat main article.visitor{background:#155eef;color:#fff;margin-inline-start:auto;margin-inline-end:0;border-radius:13px 13px 3px 13px}.chat main article.assistant,.chat main article.human{background:#fff;margin-inline-end:auto;margin-inline-start:0}.chat footer{background:#fff;border-top:1px solid var(--line);padding:12px 14px;padding-bottom:max(12px,env(safe-area-inset-bottom))}.chat textarea{border:1px solid #dfe6ef;background:#f9fbfd;min-height:74px}.chat footer .row{margin-top:8px}.chat #status{padding:5px 18px;min-height:24px}.chat input[type=file]{flex:1;min-width:100px;border:0;padding:4px}.chat #downloads{max-height:100px}.chat #downloads button{background:#edf3ff;color:#285fae}
@media(max-width:900px){.split{grid-template-columns:250px minmax(0,1fr)}.container{padding:14px}.card{padding:16px}}
@media(max-width:760px){.split{grid-template-columns:1fr}.list{max-height:230px}.container{padding:10px}.messages{height:380px;padding:12px}.card{border-radius:12px}nav{gap:4px}nav button{font-size:12px;padding:8px 10px}.info-grid{grid-template-columns:105px minmax(0,1fr)}body>header{padding:12px}#identity{margin-inline-start:0;overflow-wrap:anywhere}.chat header{min-height:58px}.chat main article{max-width:92%}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.visit-list{max-height:155px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* v3 unified desktop workspace and mobile views */
.desk-columns{display:grid;grid-template-columns:270px minmax(350px,1fr) 325px;gap:14px;align-items:start}.desk-columns>.card{min-width:0;padding:16px}.desk-columns label{font-size:12px;color:#52657f}.desk-columns label input:not([type=checkbox]),.desk-columns label select{display:block;width:100%;margin:5px 0}.desk-columns .messages{height:52vh;min-height:300px;max-height:700px}.desk-columns>.card:last-child{max-height:calc(100vh - 170px);overflow:auto;position:sticky;top:12px}.desk-columns .list{max-height:60vh}.desk-columns details{padding:10px 0;border-bottom:1px solid #e4ebf4}.desk-columns summary{cursor:pointer;color:#255da9;font-size:13px;font-weight:600}.desk-columns>.card:nth-child(2)>button{margin:4px}.overdue{box-shadow:inset 3px 0 #e79022!important}.save-notice{background:#edf5ff;color:#235ba4;padding:10px;border-radius:8px}.welcome-row{display:grid;grid-template-columns:100px minmax(180px,1fr) auto;gap:10px;align-items:center}.model-row{display:flex;gap:8px;padding:10px;border-bottom:1px solid #e5ebf5;flex-wrap:wrap}.model-row span{flex:1;min-width:180px}.image-dialog{border:0;border-radius:12px;max-width:94vw;max-height:94vh;padding:20px}.image-dialog::backdrop{background:#000b}.image-dialog img{display:block;max-width:85vw;max-height:80vh;object-fit:contain}.image-dialog button{position:absolute;right:5px;top:5px}#conversation-state{padding:0 16px;font-size:11px;color:#748197}.chat #choose-files{font-size:12px;background:#edf3ff;color:#285fae}.chat footer small{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat #send,.chat main article.visitor{background:var(--brand,#155eef)}.brand-logo{width:28px;height:28px;object-fit:contain;vertical-align:middle;margin-inline-end:8px}.mobile-desk-tabs{display:none}
@media(max-width:1250px){.desk-columns{grid-template-columns:240px minmax(330px,1fr)}.desk-columns>.card:last-child{grid-column:2;position:static;max-height:none}.desk-columns>.card:first-child{grid-row:1/3}}
@media(max-width:760px){.desk-columns{display:flex;flex-direction:column}.desk-columns>.card{width:100%;margin:6px 0}.desk-columns .list{max-height:230px}.desk-columns .messages{height:52dvh;min-height:280px}.welcome-row{display:block}.desk-columns>.card:last-child{max-height:none}.mobile-desk-tabs{display:flex;gap:8px;margin-top:12px}.desk-columns[data-mobile=list]>.card:not(:first-child),.desk-columns[data-mobile=chat]>.card:not(:nth-child(2)),.desk-columns[data-mobile=profile]>.card:not(:last-child){display:none}}

/* v3.2A: only reception issues 1 / 5 / 6. */
body.reception-active{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}body.reception-active>header{flex:0 0 auto;min-height:52px;padding:8px 14px}body.reception-active>.container{flex:1;min-height:0;width:100%;max-width:none;padding:10px;display:flex;flex-direction:column}body.reception-active #app{flex:1;min-height:0;display:flex;flex-direction:column}body.reception-active #app>nav{flex:0 0 auto;margin:8px 0;padding:4px}body.reception-active #view{flex:1;min-height:0;display:flex;flex-direction:column;gap:6px}body.reception-active #view>button{align-self:flex-start;font-size:12px;padding:5px 9px}body.reception-active .desk-columns{flex:1;min-height:0;align-items:stretch;grid-template-columns:255px minmax(380px,1fr) 300px;gap:10px}body.reception-active .desk-columns>.card{margin:0;padding:12px;min-height:0;max-height:none;position:static;overflow:auto;height:100%;box-sizing:border-box}body.reception-active .desk-columns>.card:first-child{grid-row:auto}body.reception-active .desk-columns>.card:last-child{grid-column:auto}body.reception-active .desk-columns .desk-chat-card{display:flex;flex-direction:column;overflow:hidden;gap:6px}body.reception-active .desk-columns .messages{flex:1 1 auto;min-height:120px;height:auto;max-height:none;margin:0;padding:12px;overscroll-behavior:contain}body.reception-active #error{flex:0 0 auto;max-height:48px;overflow:auto;margin:2px 0}
.desk-chat-header{flex:0 0 auto;display:flex;gap:5px 12px;align-items:center;flex-wrap:wrap}.desk-chat-header h3{font-size:15px;margin:0}.desk-chat-header>p{font-size:11px;color:#6a7c95;margin:0;overflow-wrap:anywhere}.desk-chat-header .row{margin-inline-start:auto;gap:4px}.desk-chat-header button{font-size:12px;padding:5px 8px}.reply-composer{flex:0 0 auto;min-width:0}.reply-toolbar{display:flex;align-items:end;gap:7px;flex-wrap:nowrap}.reply-toolbar>label{flex:1;min-width:0;max-width:none;margin:0!important;font-size:11px}.reply-toolbar select{width:100%;min-width:0;margin:2px 0 0!important;height:33px;padding:5px 8px}.reply-toolbar>button{flex:0 0 auto;height:33px;padding:5px 9px;font-size:12px}.reply-composer>label{margin:4px 0!important;font-size:11px}.reply-composer textarea{min-height:48px;max-height:100px;resize:vertical;padding:7px 10px;line-height:1.45}.reply-actions{display:flex;align-items:center;gap:5px;min-width:0;flex-wrap:wrap}.reply-actions button{padding:6px 9px;font-size:12px}.reply-actions small{flex:1;min-width:0;max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;color:#6c7f97}.reply-translation{padding:3px 0!important;border:0!important;max-height:160px;overflow:auto}.reply-translation summary{font-size:11px}.reply-translation label{margin:3px 0!important}.reply-translation textarea{min-height:45px;max-height:90px}
.desk-metadata{flex:0 0 auto;margin:0;border:1px solid #e0e7f1!important;border-radius:8px;padding:5px 9px!important;min-height:24px;max-height:185px;overflow:auto}.desk-metadata>summary{font-size:12px}.metadata-tabs{display:flex;gap:5px;margin:5px 0}.metadata-tabs button{font-size:11px;padding:4px 9px;background:#edf2f9;color:#506783}.metadata-tabs button[aria-pressed=true]{background:#155eef;color:#fff}.desk-metadata .visit-list{max-height:115px;margin:4px 0;overflow:auto}.client-info-panel{max-height:115px;overflow:auto;font-size:12px;line-height:1.65;overflow-wrap:anywhere}.client-info-panel>div{padding:2px 0}.desk-metadata [hidden]{display:none!important}
body.reception-active .presence-panel{flex:0 0 auto;padding:5px 9px;margin:0;max-height:100px;overflow:auto;font-size:11px;display:flex;gap:4px 9px;flex-wrap:wrap;align-items:center}body.reception-active .presence-panel>.draft-preview{flex-basis:100%;margin:0;padding:5px 8px;max-height:70px;font-size:12px}body.reception-active .presence-panel>small{font-size:10px;color:#71829a}.desk-tools-panel{flex:0 0 auto!important;padding:5px 9px!important;margin:0!important;font-size:11px}.desk-tools-panel summary{cursor:pointer;font-size:11px!important}.desk-tools-panel details{padding:0!important;border:0!important}.desk-tools-panel .row{margin-top:4px}.desk-tools-status{margin:2px 0 0!important;font-size:10px!important;max-height:30px;overflow:auto}.desk-tools-panel button{font-size:11px!important;padding:5px 8px!important}.chat #draft-notice{display:block;font-size:10px;line-height:1.4;color:#66758c;margin-top:5px;white-space:normal;max-width:none;overflow:visible}
@media(max-width:1150px) and (min-width:761px){body.reception-active .desk-columns{grid-template-columns:215px minmax(340px,1fr) 250px}.desk-chat-header .row{margin-inline-start:0}.reply-actions small{max-width:90px}}
@media(max-width:760px){body.reception-active>header{min-height:44px;font-size:12px}body.reception-active>.container{padding:6px}body.reception-active #app>nav{flex-wrap:nowrap;overflow:auto;min-height:38px;margin:5px 0}body.reception-active #app>nav button{white-space:nowrap;flex:0 0 auto}body.reception-active .mobile-desk-tabs{margin:0;flex:0 0 auto}.mobile-desk-tabs button{font-size:12px;padding:5px 12px}body.reception-active .desk-columns{display:flex;flex-direction:column;gap:0}body.reception-active .desk-columns>.card{flex:1;width:100%;margin:0;max-height:none;min-height:0}body.reception-active .desk-columns[data-mobile=chat]>.desk-chat-card{display:flex}body.reception-active .desk-columns .messages{height:auto;min-height:100px}.reply-toolbar{gap:4px}.reply-toolbar select{font-size:11px;padding:4px}.reply-toolbar button{font-size:11px;padding:4px 6px}.desk-metadata{max-height:150px}.desk-metadata .visit-list,.client-info-panel{max-height:85px}.desk-chat-header>p{font-size:10px}.reply-actions small{max-width:80px}}
@media(max-height:650px) and (min-width:761px){body.reception-active{height:auto;min-height:100dvh;overflow:auto}body.reception-active>.container{min-height:550px}.desk-chat-card{min-height:500px!important}.desk-metadata{max-height:125px}}

body.reception-active .desk-chat-card>.save-notice,.reply-composer>.save-notice{flex:0 0 auto;margin:0;padding:3px 7px;font-size:11px;line-height:1.4;max-height:28px;overflow:auto}


/* LAYOUT_V32E1_BEGIN */
body.reception-active .desk-columns{
 grid-template-rows:minmax(0,1fr);
}
body.reception-active .desk-columns>.card{
 min-width:0;min-height:0;overscroll-behavior:contain;
}
body.reception-active .desk-columns .desk-chat-card{
 overflow:auto;
}
body.reception-active .desk-columns .messages{
 flex:1 0 100px;min-height:100px;overflow:auto;
}
.desk-chat-card>.v32d2-opening-panel{
 flex:0 0 auto;display:flex;align-items:center;
 justify-content:space-between;gap:8px;
 padding:5px 9px;margin:0;border:1px solid #dbe4ef;
 border-radius:8px;background:#f6f9fd;
 font-size:11px;line-height:1.5;white-space:normal;
}
.v32d2-opening-panel>.opening-layout-label{
 min-width:0;overflow-wrap:anywhere;
}
.v32d2-opening-panel>button{
 flex:0 0 auto;padding:4px 9px;font-size:11px;
}
.opening-layout-dialog{
 width:min(720px,94vw);max-height:85dvh;
 overflow:auto;padding:20px;border:1px solid #dbe4ef;
 border-radius:12px;color:#172b4d;white-space:normal;
}
.opening-layout-dialog::backdrop{background:#0006}
.opening-layout-dialog h3{font-size:16px;margin:0 0 10px}
.opening-layout-dialog h4{margin:12px 0 6px}
.opening-layout-dialog section{
 padding:10px 12px;margin:10px 0;
 border:1px solid #e1e7f0;border-radius:8px;
}
.opening-layout-dialog section>div{
 white-space:pre-wrap;overflow-wrap:anywhere;
}
.desk-columns>.card:last-child .desk-metadata{
 max-height:none;overflow:visible;margin:8px 0 14px;
}
.desk-columns>.card:last-child .desk-metadata .visit-list{
 max-height:260px;
}
.desk-columns>.card:last-child .client-info-panel{
 max-height:260px;
}
@media(min-width:761px) and (max-width:1050px){
 body.reception-active .desk-columns{
  grid-template-columns:190px minmax(0,1fr) 240px;
 }
 body.reception-active .reply-toolbar{flex-wrap:wrap}
}
@media(max-width:760px){
 body.reception-active .desk-columns .messages{
  flex:1 0 100px;min-height:100px;
 }
 .opening-layout-dialog{padding:14px}
}
/* LAYOUT_V32E1_END */


/* WORKSPACE_HEIGHT_V32E1A_BEGIN */
/* The page scrolls normally; only the three-column workspace uses a viewport. */
body.reception-active{
 display:block;
 height:auto;
 min-height:100dvh;
 overflow:visible;
}
body.reception-active>.container{
 display:block;
 width:100%;
 max-width:none;
 min-height:0;
}
body.reception-active #app{
 display:block;
 min-height:0;
}
body.reception-active #view{
 display:block;
 min-height:0;
}
body.reception-active #view>button{
 margin-bottom:8px;
}
body.reception-active .mobile-desk-tabs{
 margin-bottom:8px;
}
body.reception-active .desk-columns{
 flex:none;
 height:calc(100dvh - 20px);
 min-height:480px;
 align-items:stretch;
 grid-template-rows:minmax(0,1fr);
}
body.reception-active .desk-columns>.card{
 height:100%;
 min-height:0;
 max-height:none;
}
body.reception-active .desk-columns .desk-chat-card{
 min-height:0!important;
}
@media(max-width:760px){
 body.reception-active .desk-columns{
  height:calc(100dvh - 12px);
  min-height:420px;
 }
}
/* WORKSPACE_HEIGHT_V32E1A_END */


/* ONLINE_V32E2_CSS_BEGIN */
.online-modes-v32e2{
 display:flex;gap:5px;margin:6px 0 12px;
}
.online-modes-v32e2 button{
 flex:1;padding:7px 5px;font-size:12px;
 background:#edf2f9;color:#506783;
}
.online-modes-v32e2 button[aria-pressed=true]{
 background:#155eef;color:white;
}
.online-list-v32e2>.muted{
 font-size:11px;line-height:1.5;
}
.online-list-v32e2 .item{
 overflow-wrap:anywhere;font-size:12px;
}
/* ONLINE_V32E2_CSS_END */


/* COMPACT_UI_V32F1_BEGIN */
.chat{
 height:100dvh;min-height:0;overflow:hidden;
}
.chat>header{
 flex:0 0 auto;display:flex;flex-wrap:nowrap;
 gap:8px;padding:8px 10px;min-height:52px;
}
.chat-heading32f{flex:1;min-width:0}
.chat #brand{
 display:block;overflow:hidden;text-overflow:ellipsis;
 white-space:nowrap;font-size:14px;line-height:1.35;
}
.chat .brand-logo{width:22px;height:22px}
.chat .chat-meta32f{
 display:flex;align-items:center;gap:7px;
 min-width:0;font-size:11px;line-height:1.5;color:#687b95;
}
.chat .chat-meta32f #conversation-state,
.chat .chat-meta32f #typing-status{
 padding:0;margin:0;min-height:0;font-size:11px;
 overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.chat .chat-meta32f #conversation-state{flex:0 1 auto}
.chat .chat-meta32f #typing-status{flex:1;min-width:0;color:#4773ac}
.chat .chat-meta32f #typing-status:not(:empty)::before{content:"· "}
.chat-header-actions32f{
 display:flex;align-items:center;gap:4px;flex:0 0 auto;
}
.chat .chat-header-actions32f button{
 padding:5px 7px;min-width:30px;min-height:32px;
}
.chat #human{
 max-width:90px;overflow:hidden;text-overflow:ellipsis;
 white-space:nowrap;font-size:11px;
}
.chat #chat-close32f{font-size:20px}
.chat #messages{
 flex:1 1 auto;min-height:0;overflow:auto;padding:10px;
}
.chat #messages article{
 max-width:90%;padding:9px 11px;margin:7px 0;
 font-size:13px;line-height:1.55;
}
.chat #status{
 flex:0 0 auto;max-height:52px;overflow:auto;
 padding:4px 10px;font-size:11px;
}
.chat #status:empty{display:none}
.chat>footer{
 flex:0 0 auto;padding:8px 10px;
 padding-bottom:max(8px,env(safe-area-inset-bottom));
}
.chat-compose32f{
 display:grid;grid-template-columns:minmax(0,1fr) 76px;
 gap:7px;align-items:stretch;
}
.chat .chat-compose32f #text{
 margin:0;width:100%;height:76px;min-height:76px;
 max-height:130px;resize:vertical;overflow:auto;
 padding:8px 10px;font-size:16px;line-height:1.4;
}
.chat-send-actions32f{
 display:flex;flex-direction:column;gap:5px;min-width:0;
}
.chat .chat-send-actions32f button{
 flex:1;min-height:34px;padding:5px 6px;width:100%;
 overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 font-size:12px;
}
.chat .chat-send-actions32f #choose-files{
 font-size:18px;background:#edf3ff;color:#285fae;
}
.chat #chat-file-strip32f{
 display:flex;align-items:center;gap:6px;
 margin-bottom:6px;padding:4px 7px;
 background:#eff4fb;border-radius:7px;
 font-size:11px;max-height:54px;
}
.chat #chat-file-strip32f>span{
 flex:1;min-width:0;overflow:auto;
 overflow-wrap:anywhere;max-height:44px;
}
.chat #chat-file-strip32f>button{
 flex:0 0 auto;padding:3px 8px;font-size:16px;
}
.chat #resume{margin-top:5px;padding:5px 9px;font-size:11px}
.chat #draft-notice{
 margin-top:5px;max-height:54px;overflow:auto;
 font-size:10px;line-height:1.4;
}
.desk-status-strip32f{
 flex:0 0 auto;display:flex;align-items:center;
 justify-content:space-between;gap:5px 10px;
 flex-wrap:wrap;min-width:0;padding:4px 8px;
 background:#f6f9fd;border:1px solid #dbe4ef;border-radius:8px;
}
body.reception-active .desk-status-strip32f .presence-panel{
 flex:1 1 160px;min-width:0;border:0;
 background:transparent;padding:0;margin:0;
 font-size:11px;max-height:100px;overflow:auto;
}
.desk-status-strip32f .presence-panel>strong{display:none}
.desk-status-strip32f .presence-panel>small{display:none}
.desk-status-strip32f .v32d2-opening-panel{
 display:flex;flex:0 0 auto;align-items:center;gap:5px;
 border:0;background:transparent;margin:0;padding:0;
 font-size:11px;line-height:1.5;
}
.desk-status-strip32f .v32d2-opening-panel>button{
 padding:3px 7px;font-size:11px;
}
@media(max-width:400px){
 .chat #human{max-width:66px}
 .chat #brand{font-size:13px}
 .chat>header{gap:5px;padding:7px 8px}
}
@media(max-height:360px){
 .chat .chat-compose32f #text{
  height:58px;min-height:58px;max-height:80px;
 }
 .chat .chat-send-actions32f button{
  min-height:26px;padding:3px 5px;
 }
 .chat #messages{padding:6px}
 .chat>header{min-height:44px;padding:5px 8px}
}
/* COMPACT_UI_V32F1_END */


/* COMPACT_FIX_V32F1A_BEGIN */
/* 公司名称、接待方式、输入状态在同一行。 */
.chat .chat-heading32f{
 display:flex;
 align-items:center;
 gap:6px;
 min-width:0;
}
.chat .chat-heading32f #brand{
 flex:0 1 auto;
 max-width:42%;
 min-width:0;
 margin:0;
 white-space:nowrap;
 overflow:hidden;
 text-overflow:ellipsis;
}
.chat .chat-heading32f .chat-meta32f{
 flex:1 1 0;
 min-width:0;
 gap:5px;
}
.chat .chat-heading32f .chat-meta32f #conversation-state{
 flex:0 1 auto;
 max-width:60%;
 min-width:0;
}
.chat .chat-heading32f .chat-meta32f #typing-status{
 flex:1 1 0;
 min-width:0;
}

/* 客户消息靠右，AI及人工消息靠左；正文按语言自然排版。 */
.chat #messages article.visitor{
 margin:7px 0 7px auto;
 text-align:start;
 background:var(--brand,#155eef);
 color:#fff;
 border-radius:12px 12px 3px 12px;
}
.chat #messages article.assistant,
.chat #messages article.human{
 margin:7px auto 7px 0;
 text-align:start;
 background:#fff;
 color:var(--ink,#172b4d);
 border-radius:12px 12px 12px 3px;
}
.chat #messages article.system{
 width:100%;
 max-width:100%;
 margin:7px 0;
 text-align:center;
}
/* COMPACT_FIX_V32F1A_END */


/* COMPACT_FILTER_V32F2_BEGIN */
body.reception-active .desk-columns>.card:first-child{
 display:flex;flex-direction:column;gap:6px;overflow:hidden;
}
body.reception-active .desk-columns>.card:first-child>h3{
 flex:0 0 auto;margin:0;font-size:14px;
}
.online-modes-v32e2{flex:0 0 auto;margin:0}
.desk-search32f{
 flex:0 0 auto;margin:0!important;font-size:0!important;
}
.desk-search32f input{
 display:block;width:100%;margin:0!important;
 padding:7px 9px;font-size:12px;
}
.desk-quick32f{
 display:flex;flex:0 0 auto;gap:4px;
}
.desk-quick32f button{
 flex:1;padding:5px 3px;font-size:11px;
 background:#edf2f9;color:#506783;
}
.desk-quick32f button.selected{
 background:#155eef;color:#fff;
}
.desk-chips32f{
 display:flex;flex:0 0 auto;gap:4px;flex-wrap:wrap;
 max-height:62px;overflow:auto;
}
.desk-chips32f button{
 padding:3px 5px;font-size:10px;background:#edf3ff;color:#285fae;
 max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.desk-list-body32f{
 flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;
}
body.reception-active .desk-list-body32f .list{
 max-height:none;overflow:visible;
}
.desk-list-body32f .item{
 margin:4px 0;padding:8px;
 font-size:12px;line-height:1.6;
 white-space:pre;overflow:hidden;text-overflow:ellipsis;
}
.online-list-v32e2>p.muted{font-size:10px;margin:3px 0 6px}
.online-list-v32e2>div{
 display:grid;grid-template-columns:minmax(0,1fr) 66px;
 gap:3px;align-items:start;
}
.online-list-v32e2>div>.item{min-width:0}
.online-list-v32e2>div>button:not(.item){
 margin-top:5px;padding:6px 3px;font-size:10px;min-width:0;
}
.online-list-v32e2>div>small{
 grid-column:1/-1;font-size:10px;
}
.online-list-v32e2>div>small:empty{display:none}
.desk-list-footer32f{
 flex:0 0 auto;border-top:1px solid #e1e7f0;padding-top:6px;
}
.desk-list-footer32f>small{
 display:block;font-size:11px;color:#66758c;margin-bottom:4px;
}
.desk-page-controls32f{display:flex;gap:4px;align-items:center}
.desk-page-controls32f select{
 flex:1;min-width:0;margin:0!important;padding:5px 3px;font-size:11px;
}
.desk-page-controls32f button{padding:6px 5px;font-size:10px}
.desk-columns .desk-sound32f{
 margin:4px 0 0;font-size:10px;display:flex;align-items:center;gap:4px;
}
.desk-sound32f input{margin:0}
.desk-filter-dialog32f{
 width:min(620px,94vw);max-height:85dvh;overflow:auto;
 border:1px solid #dbe4ef;border-radius:12px;padding:18px;
 color:#172b4d;
}
.desk-filter-dialog32f::backdrop{background:#0006}
.desk-filter-dialog32f h3{margin:0 0 12px}
.desk-filter-grid32f{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px;
}
.desk-filter-grid32f label{margin:0;font-size:12px}
.desk-filter-grid32f input,.desk-filter-grid32f select{
 display:block;width:100%;margin:4px 0 0;padding:8px;font-size:13px;
}
.desk-filter-dialog32f>.row{margin-top:15px}
@media(max-width:480px){
 .desk-filter-grid32f{grid-template-columns:1fr}
}
/* COMPACT_FILTER_V32F2_END */


/* CONTACT_CHECKS_V32G1_CSS */
.contact-check-panel32g{
 margin:10px 0;padding:10px;
 border:1px solid #dce7f5;border-radius:9px;background:#f7faff;
}
.contact-check-panel32g h3{font-size:13px;margin:0 0 8px}
.contact-check-body32g>div{
 padding:7px 0;border-bottom:1px solid #e4ebf4;
 overflow-wrap:anywhere;font-size:12px;
}
.contact-check-body32g strong,.contact-check-body32g small{display:block}
.contact-check-body32g small{font-size:10px;color:#66758c;margin-top:3px}
.contact-check-panel32g>button{margin-top:7px;font-size:11px;padding:6px 9px}
.contact-check-dialog32g{
 width:min(660px,94vw);max-height:86dvh;overflow:auto;
 border:1px solid #dce7f5;border-radius:12px;padding:20px;color:#172b4d;
}
.contact-check-dialog32g::backdrop{background:#0006}
.contact-check-dialog32g section{
 padding:12px;margin:12px 0;border:1px solid #dce7f5;border-radius:9px;
}
.contact-check-dialog32g section>div{white-space:pre-wrap;overflow-wrap:anywhere}
.contact-check-dialog32g p{font-size:12px;color:#66758c}
.contact-check-dialog32g label{font-size:12px}
.contact-check-dialog32g select,.contact-check-dialog32g textarea{
 display:block;width:100%;margin-top:4px;
}
.contact-check-dialog32g .contact-check-attest32g{
 display:flex;gap:7px;align-items:flex-start;
}
.contact-check-attest32g input{flex:0 0 auto;margin:4px 0 0}


/* PENDING_TASKS_V32G2_CSS */
.pending-card32g{max-width:1100px;margin-inline:auto}
.pending-card32g>.muted{font-size:12px}
.pending-filters32g{
 display:flex;gap:6px;flex-wrap:wrap;margin:14px 0;
}
.pending-filters32g button{background:#edf2f9;color:#506783}
.pending-filters32g button.selected{background:#155eef;color:white}
.pending-items32g{margin-top:14px}
.pending-item32g{padding:14px;white-space:normal;background:#fff}
.pending-head32g{
 display:flex;justify-content:space-between;align-items:center;
 gap:8px;flex-wrap:wrap;
}
.pending-head32g small{color:#66758c;font-size:11px}
.pending-reasons32g{
 display:flex;gap:5px;flex-wrap:wrap;margin:8px 0;
}
.pending-reasons32g span{
 padding:3px 7px;border-radius:6px;
 background:#fff4dd;color:#805611;font-size:11px;
}
.pending-item32g>p{font-size:12px;overflow-wrap:anywhere}
.pending-item32g .row button{padding:6px 10px;font-size:12px}
@media(max-width:600px){
 .pending-card32g{padding:12px}
 .pending-filters32g button{font-size:11px;padding:7px}
}


/* SALES_HANDOFF_V32G3 */
.sales-handoff-entry32g{
 display:flex;align-items:center;gap:8px;margin:8px 0 12px;
}
.sales-handoff-entry32g button{padding:6px 9px;font-size:11px}
.sales-handoff-entry32g small{font-size:10px;color:#66758c}
.sales-handoff-dialog32g{
 width:min(820px,95vw);max-height:88dvh;overflow:auto;
 border:1px solid #dce7f5;border-radius:12px;padding:20px;color:#172b4d;
}
.sales-handoff-dialog32g::backdrop{background:#0006}
.sales-handoff-dialog32g>.muted{font-size:12px}
.sales-handoff-dialog32g>.row{gap:6px}
.sales-handoff-dialog32g>.row button{font-size:12px;padding:7px 10px}
.sales-handoff-dialog32g section{
 margin:12px 0;padding:12px;border:1px solid #e1e7f0;border-radius:9px;
}
.sales-handoff-dialog32g h4{margin:0 0 8px}
.sales-handoff-dialog32g dl{
 display:grid;grid-template-columns:135px minmax(0,1fr);margin:0;font-size:12px;
}
.sales-handoff-dialog32g dt,.sales-handoff-dialog32g dd{
 margin:0;padding:7px 8px;border-bottom:1px solid #edf1f6;
 white-space:pre-wrap;overflow-wrap:anywhere;
}
.sales-handoff-dialog32g dt{background:#f7f9fc;color:#66758c}
@media(max-width:520px){
 .sales-handoff-dialog32g{padding:12px}
 .sales-handoff-dialog32g dl{grid-template-columns:95px minmax(0,1fr)}
}


/* AUTO_CONFIG_V32G4_CSS */
.auto-open-config32g4{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:8px 14px;margin:12px 0 20px;padding:14px;
 border:1px solid #dce7f5;border-radius:10px;background:#f7faff;
}
.auto-open-config32g4 legend{font-size:14px;font-weight:600;color:#255da9}
.auto-open-config32g4>label{margin:0;font-size:12px}
.auto-open-config32g4>label:nth-of-type(1),
.auto-open-config32g4>label:nth-of-type(4),
.auto-open-config32g4>p{grid-column:1/-1}
.auto-open-config32g4 input:not([type=checkbox]),
.auto-open-config32g4 textarea{
 display:block;width:100%;margin:4px 0 0;
}
.auto-open-config32g4>p{font-size:11px;margin:4px 0 0}
@media(max-width:600px){
 .auto-open-config32g4{grid-template-columns:1fr}
}
