:root{--navy:#071426;--navy-2:#0d1b2d;--navy-3:#14263d;--ink:#14233b;--muted:#6d7c91;--line:#e1e7ef;--wash:#f4f7fb;--paper:#fff;--blue:#176fd1;--blue-soft:#eaf3ff;--teal:#1baa98;--teal-soft:#e7f7f3;--amber:#e4a33c;--danger:#c7445d;--shadow:0 18px 50px rgba(21,39,66,.09)}
*{box-sizing:border-box}html,body,form{margin:0;width:100%;height:100%;font-family:Inter,Sora,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--wash)}button,input,textarea,select{font:inherit}a{text-decoration:none;color:inherit}button,input[type=submit]{cursor:pointer}:focus-visible{outline:3px solid rgba(23,111,209,.22);outline-offset:2px}.eyebrow{color:#6d8fb4;font-size:10px;font-weight:850;letter-spacing:.14em}.form-error{color:var(--danger);font-size:11px;min-height:15px}.server-notice{color:#247467;font-size:11px}.server-notice:empty,.form-error:empty{display:none}
.primary-button,.secondary-button,.danger-button,.send-button{border:0;border-radius:11px;min-height:42px;padding:0 16px;font-weight:800;display:inline-flex;align-items:center;justify-content:center}.primary-button{background:var(--blue);color:#fff;box-shadow:0 7px 20px rgba(23,111,209,.18)}.primary-button:hover,.send-button:hover{background:#0f61bd}.primary-button.compact,.secondary-button.compact{min-height:36px;padding:0 13px;font-size:11px;box-shadow:none}.secondary-button{background:#edf2f8;color:#31445e}.secondary-button:hover{background:#e2eaf3}.danger-button{background:#fff0f2;color:#b6354e;font-size:11px}.danger-button:hover{background:#ffe2e7}.send-button{background:var(--blue);color:#fff;min-height:36px;font-size:11px}.icon-button{width:35px;height:35px;border:0;border-radius:10px;background:transparent;color:inherit;display:inline-grid;place-items:center}.icon-button:hover{background:rgba(116,139,167,.13)}
/* Login */
.login-view{min-height:100%;display:grid;grid-template-columns:minmax(430px,47%) 1fr;background:#fff}.login-card{align-self:center;width:min(520px,calc(100% - 64px));margin:auto;padding:42px}.brand img{display:block;width:138px}.login-product{display:flex;align-items:center;gap:14px;margin-top:26px;padding:12px 14px;border:1px solid var(--line);border-radius:17px;background:linear-gradient(135deg,#fafcff,#eef8f6)}.login-product img{width:66px;height:66px;object-fit:contain}.login-product div{display:grid}.login-product strong{font-size:25px;letter-spacing:-.045em}.login-product span{font-size:9px;color:var(--muted);text-transform:uppercase;letter-spacing:.12em;font-weight:800}.login-kicker{display:flex;align-items:center;gap:8px;margin-top:28px;color:#3f739f;font-size:10px;font-weight:850;letter-spacing:.12em}.login-kicker span{width:7px;height:7px;border-radius:50%;background:var(--teal);box-shadow:0 0 0 5px rgba(27,170,152,.12)}.login-card h1{font-size:clamp(38px,4vw,57px);line-height:1.02;letter-spacing:-.055em;margin:17px 0}.login-card h1 em{font-style:normal;color:var(--blue)}.login-card>p{color:var(--muted);font-size:15px}.login-form{display:grid;gap:13px;margin-top:28px}.login-form label,.site-form label,.identity-fields label,.admin-card label,.space-form label{display:grid;gap:6px;color:#40516a;font-size:11px;font-weight:780}.login-form input,.site-form input,.site-form textarea,.site-form select,.identity-fields input,.identity-fields select,.admin-card input,.admin-card textarea,.space-form input{width:100%;border:1px solid #d6dfea;border-radius:11px;background:#fff;color:var(--ink);padding:11px 12px}.login-form input:focus,.site-form input:focus,.site-form textarea:focus,.site-form select:focus,.identity-fields input:focus,.identity-fields select:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(23,111,209,.08);outline:0}.login-card small{display:block;color:#8b98aa;font-size:10px;margin-top:15px}.login-visual{position:relative;overflow:hidden;background:radial-gradient(circle at 65% 25%,rgba(27,170,152,.25),transparent 30%),linear-gradient(145deg,#071426,#0c2c4a 66%,#0c5263)}.visual-product{position:absolute;left:50%;top:28%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:18px;color:#fff}.visual-product img{width:190px;height:190px;object-fit:contain;filter:drop-shadow(0 22px 35px rgba(0,0,0,.22))}.visual-product div{display:grid}.visual-product strong{font-size:40px;letter-spacing:-.055em}.visual-product span{font-size:11px;color:#b1c8da;letter-spacing:.05em}.demo-chat{position:absolute;width:min(475px,72%);left:50%;top:68%;transform:translate(-50%,-50%) rotate(-1deg);border:1px solid rgba(255,255,255,.15);border-radius:21px;padding:22px;background:rgba(6,22,40,.72);box-shadow:0 35px 80px rgba(0,0,0,.3);color:#fff}.demo-chat header,.demo-chat footer{display:flex;gap:9px;align-items:center;font-size:9px;letter-spacing:.13em;color:#a9bbce}.demo-chat header i{width:7px;height:7px;border-radius:50%;background:#63e8b6}.demo-chat header b{margin-left:auto;color:#6ae5b9}.demo-message{max-width:84%;padding:11px 13px;border-radius:14px;margin:19px 0;font-size:12px;line-height:1.45}.demo-message.visitor{background:#fff;color:var(--ink);border-radius:14px 14px 14px 4px}.demo-message.operator{margin-left:auto;background:var(--blue);border-radius:14px 14px 4px 14px}.demo-chat footer{border-top:1px solid rgba(255,255,255,.11);padding-top:14px}
/* App shell */
.app-view{height:100%;display:grid;grid-template-columns:218px minmax(0,1fr);overflow:hidden}.sidebar{background:var(--navy);color:#fff;padding:20px 14px 15px;display:flex;flex-direction:column}.sidebar-brand{padding:2px 10px 11px}.sidebar-brand img{width:112px;filter:brightness(0) invert(1)}.sidebar-product{display:flex;align-items:center;gap:9px;margin:0 4px 18px;padding:8px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:linear-gradient(135deg,rgba(255,255,255,.07),rgba(27,170,152,.1))}.sidebar-product img{width:48px;height:48px;object-fit:contain}.sidebar-product div{display:grid}.sidebar-product strong{font-size:16px}.sidebar-product small{font-size:8px;color:#91a6bc;text-transform:uppercase;letter-spacing:.08em}.sidebar nav{display:grid;gap:4px}.nav-item{border-radius:10px;padding:10px 11px;color:#91a5ba;display:flex;align-items:center;gap:9px;font-size:11px;font-weight:780}.nav-item:hover,.nav-item.active{background:#122a46;color:#fff}.nav-glyph{width:19px;text-align:center}.nav-count{margin-left:auto;min-width:20px;height:19px;border-radius:10px;background:#d94360;color:#fff;display:grid;place-items:center;font-size:9px}.nav-count:empty{display:none}.sidebar-bottom{margin-top:auto;border-top:1px solid rgba(255,255,255,.09);padding-top:14px;display:flex;gap:7px;align-items:center}.operator-chip{min-width:0;display:flex;align-items:center;gap:8px;flex:1}.operator-chip>span{width:32px;height:32px;border-radius:10px;background:linear-gradient(135deg,var(--blue),var(--teal));display:grid;place-items:center;font-size:11px;font-weight:850}.operator-chip div{min-width:0}.operator-chip strong,.operator-chip small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.operator-chip strong{font-size:11px}.operator-chip small{color:#7e94aa;font-size:8px;margin-top:2px}.sidebar .icon-button{color:#9cb0c4;font-size:10px}
.workspace{height:100%;min-width:0}.chat-workspace{display:grid;grid-template-columns:235px minmax(320px,390px) minmax(430px,1fr);background:#fff}.chat-categories{background:var(--navy-2);color:#d9e5f1;padding:25px 14px 18px;display:flex;flex-direction:column;overflow:auto}.chat-categories header{padding:0 8px 16px}.chat-categories h1{font-size:26px;letter-spacing:-.04em;margin:5px 0}.chat-search{display:grid;grid-template-columns:1fr auto auto;gap:5px;margin-bottom:18px}.chat-search input{min-width:0;border:1px solid rgba(255,255,255,.08);border-radius:9px;background:rgba(255,255,255,.075);color:#fff;padding:9px 10px;font-size:10px}.chat-search input::placeholder{color:#7f96ad}.chat-search input[type=submit]{border:0;background:#1b6dc2;color:#fff;font-size:9px;font-weight:800}.chat-search a{width:29px;display:grid;place-items:center;border-radius:9px;color:#8da2b8}.chat-categories nav{display:grid;gap:3px}.category-heading{padding:13px 9px 6px;color:#6f869d;font-size:8px;font-weight:850;text-transform:uppercase;letter-spacing:.13em}.category-button{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;border-radius:9px;color:#9eb1c5;font-size:10px;font-weight:760}.category-button:hover{background:rgba(255,255,255,.06);color:#fff}.category-button.active{background:#173657;color:#fff}.category-button>span{display:flex;align-items:center;gap:8px}.category-button>span+span{min-width:21px;height:19px;padding:0 5px;border-radius:10px;background:rgba(255,255,255,.08);display:grid;place-items:center;font-size:8px}.category-dot{width:8px;height:8px;border-radius:50%;background:#8194a8}.category-dot.direct{background:#59a8ff}.category-dot.spaces{background:#b885ff}.category-dot.unanswered{background:#f2a93d}.category-dot.live{background:#36c79b}.category-dot.concluded{background:#7d8fa2}.category-help{margin-top:auto;border:1px solid rgba(255,255,255,.07);border-radius:11px;background:rgba(255,255,255,.035);padding:10px}.category-help strong{font-size:9px;color:#9ecaf2}.category-help p{font-size:8px;line-height:1.5;color:#748ca3;margin:4px 0 0}
.conversation-rail{min-width:0;border-right:1px solid var(--line);display:grid;grid-template-rows:auto auto 1fr;background:#fff;position:relative}.rail-header{min-height:98px;padding:19px 17px 14px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}.rail-header h2{font-size:21px;letter-spacing:-.035em;margin:4px 0 0}.rail-header p{font-size:9px;color:var(--muted);margin:4px 0 0}.rail-tools{display:flex;align-items:center;gap:5px}.toggle-row{display:flex;align-items:center;gap:5px;font-size:8px;color:#78879a;cursor:pointer}.toggle-row input{display:none}.toggle-row span{width:31px;height:18px;border-radius:10px;background:#c6d0dc;position:relative}.toggle-row span:after{content:"";position:absolute;width:12px;height:12px;border-radius:50%;background:#fff;left:3px;top:3px;transition:.15s}.toggle-row input:checked+span{background:var(--blue)}.toggle-row input:checked+span:after{left:16px}.conversation-list,.internal-directory{overflow:auto;min-height:0}.conversation-item{width:100%;border:0;border-bottom:1px solid #edf1f5;background:#fff;padding:13px 15px;text-align:left;display:grid;grid-template-columns:39px minmax(0,1fr) auto;gap:10px}.conversation-item:hover,.conversation-item.active{background:#f5f8fc}.conversation-item.active{box-shadow:inset 3px 0 var(--blue)}.conversation-avatar,.visitor-avatar{width:39px;height:39px;border-radius:13px;background:linear-gradient(135deg,#dcecff,#d9f4ed);color:#17647e;display:grid;place-items:center;font-size:12px;font-weight:850}.conversation-copy{min-width:0}.conversation-copy>span{display:flex;align-items:center;gap:6px}.conversation-copy strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-dot{width:7px;height:7px;border-radius:50%;background:#8898aa}.status-dot.open{background:#20ad7d}.status-dot.pending{background:#eca43a}.conversation-copy p,.thread-choice small{margin:5px 0 0;color:#66758a;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conversation-copy small{display:block;color:#9aa6b5;font-size:8px;margin-top:4px}.conversation-meta{text-align:right}.conversation-meta time{display:block;color:#8c99a9;font-size:8px}.unread-pill{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--blue);color:#fff;font-size:8px;font-weight:850;margin-top:7px}.unread-pill:empty{display:none}.rail-empty{padding:60px 25px;display:grid;place-items:center;text-align:center;color:#7f8c9e}.rail-empty span{width:40px;height:40px;border-radius:13px;background:var(--teal-soft);color:#178c78;display:grid;place-items:center}.rail-empty strong{font-size:12px;margin-top:10px}.rail-empty p{font-size:9px;margin:4px 0;line-height:1.5}.directory-heading{padding:14px 15px 7px;display:grid}.directory-heading>span,.directory-heading div>span{font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.08em;color:#53647a}.directory-heading small{font-size:8px;color:#99a4b1;margin-top:3px}.directory-heading.compact{padding-top:20px}.directory-heading.space-heading{display:flex;align-items:center;justify-content:space-between}.team-row,.thread-choice{width:100%;border:0;border-bottom:1px solid #eef2f6;background:#fff;padding:11px 15px;display:flex;align-items:center;gap:9px;text-align:left}.team-row:hover,.thread-choice:hover{background:#f6f8fb}.presence{width:8px;height:8px;border-radius:50%;background:#97a5b5}.presence.online{background:#23b98a}.presence.away{background:#ecaa3e}.presence.busy{background:#dc5970}.team-row div,.thread-choice div{min-width:0;display:grid}.team-row strong,.thread-choice strong{font-size:10px}.team-row small{font-size:8px;color:#8492a4}.space-mark{width:30px;height:30px;border-radius:9px;background:#f0eaff;color:#7550bd;display:grid;place-items:center;font-weight:850}.space-form{margin:8px 12px 12px;padding:12px;border:1px solid #dae3ee;border-radius:12px;background:#f8fafc;display:grid;gap:9px}.inline-actions{display:flex;gap:7px;justify-content:flex-end}
.thread-panel{min-width:0;background:#f5f7fa}.thread-host{height:100%}.thread-placeholder{height:100%;display:grid;place-content:center;text-align:center;padding:30px}.thread-placeholder img{width:90px;height:90px;object-fit:contain;margin:auto}.thread-placeholder h2{font-size:18px;margin:15px 0 5px}.thread-placeholder p{font-size:10px;color:#8390a1;max-width:350px;line-height:1.55}.thread-content{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto}.thread-header{min-height:76px;padding:11px 17px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:9px}.visitor-heading{min-width:0;flex:1}.visitor-heading strong,.visitor-heading span,.visitor-heading small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.visitor-heading strong{font-size:12px}.visitor-heading span{font-size:9px;color:#8290a2;margin-top:3px}.visitor-heading small{font-size:8px;color:#9aa5b3;margin-top:3px}.thread-header select,.page-header select{border:1px solid #d8e0e9;border-radius:9px;background:#fff;color:#40516a;padding:8px 24px 8px 9px;font-size:10px}.thread-header.simple h2{font-size:17px;margin:4px 0}.message-list{overflow:auto;padding:23px max(20px,5vw)}.message-row{max-width:74%;margin-bottom:12px}.message-row.mine{margin-left:auto;text-align:right}.message-row.system{max-width:88%;margin-left:auto;margin-right:auto;text-align:center}.message-bubble{display:inline-block;text-align:left;background:#fff;border:1px solid #e0e6ee;border-radius:14px 14px 14px 4px;padding:10px 12px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;line-height:1.5;box-shadow:0 2px 6px rgba(23,39,63,.035)}.message-row.mine .message-bubble{background:var(--blue);border-color:var(--blue);color:#fff;border-radius:14px 14px 4px 14px}.message-row.system .message-bubble{background:#eaf6f3;border-color:#d2ebe5;color:#376b63;border-radius:11px}.message-row time{display:block;font-size:8px;color:#8c99a9;margin-top:3px}.sender-name{display:block;color:#7c8a9c;font-size:8px;margin-bottom:3px}.message-attachment{margin-top:6px}.attachment-image,.attachment-file{display:inline-block;overflow:hidden;border-radius:13px;border:1px solid #dce3eb;background:#fff;box-shadow:0 4px 14px rgba(24,41,66,.08)}.attachment-image img{display:block;max-width:min(330px,55vw);max-height:320px;object-fit:contain}.attachment-file{padding:10px 12px;color:var(--blue);font-size:10px;font-weight:800}.reply-box{background:#fff;border-top:1px solid var(--line);padding:11px 15px}.reply-box>textarea{width:100%;min-height:45px;max-height:135px;resize:vertical;border:0;outline:0;color:var(--ink);font-size:11px;line-height:1.5}.compose-actions{display:flex;align-items:center;gap:8px}.attach-button{position:relative;border-radius:9px;background:#eef3f8;color:#50647b;padding:8px 10px;font-size:9px;font-weight:800;cursor:pointer}.attach-button input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.compose-actions .form-error{flex:1}
/* Admin pages */
.page-workspace{overflow:auto;padding:28px}.page-header{max-width:1160px;margin:auto;display:flex;align-items:flex-end;justify-content:space-between;gap:16px}.page-header h1{font-size:29px;letter-spacing:-.045em;margin:5px 0 0}.page-header p{font-size:11px;color:var(--muted);margin:6px 0 0}.sites-layout,.tickets-grid{max-width:1160px;margin:22px auto;display:grid;grid-template-columns:270px minmax(0,1fr);gap:18px;align-items:start}.site-list,.site-editor,.admin-card,.identity-card{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 5px 22px rgba(25,43,68,.035)}.site-list{overflow:hidden}.site-choice{width:100%;border:0;border-bottom:1px solid #edf1f5;background:#fff;padding:13px 14px;display:flex;align-items:center;gap:10px;text-align:left}.site-choice:hover,.site-choice.active{background:#f5f8fc}.site-choice i{width:34px;height:34px;border-radius:10px;background:#e9f2fc;color:var(--blue);font-style:normal;font-weight:850;display:grid;place-items:center}.site-choice div{min-width:0;flex:1}.site-choice strong,.site-choice small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.site-choice strong{font-size:11px}.site-choice small{font-size:8px;color:#8491a2;margin-top:3px}.site-choice>span{width:8px;height:8px;border-radius:50%;background:#9aa6b4}.site-choice>span.live{background:#1aae81}.site-editor{padding:22px}.site-blank{min-height:390px;display:grid;place-content:center;text-align:center}.site-blank img{width:82px;height:82px;object-fit:contain;margin:auto}.site-blank h2{font-size:17px;margin:13px 0 4px}.site-blank p{font-size:10px;color:var(--muted)}.site-form{display:grid;gap:13px}.editor-heading{display:flex;align-items:center;justify-content:space-between;padding-bottom:13px;border-bottom:1px solid var(--line)}.editor-heading h2{font-size:19px;margin:4px 0}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}.site-form textarea{resize:vertical}.site-form fieldset{border:1px solid var(--line);border-radius:12px;padding:12px}.site-form legend{font-size:9px;font-weight:850;color:#5a6c83;padding:0 6px}.color-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.color-grid label{display:flex;align-items:center;gap:6px}.color-grid input{width:35px;height:31px;padding:2px}.checkbox-row{display:flex!important;align-items:center;gap:7px}.checkbox-row input{width:16px!important}.compact-checklist,.agent-access-grid{width:100%;border-collapse:separate;border-spacing:6px}.compact-checklist td,.agent-access-grid td{padding:0}.compact-checklist label,.agent-access-grid label{display:inline!important;font-size:9px;font-weight:700;color:#40516a}.compact-checklist input,.agent-access-grid input{width:15px!important;height:15px;margin:0 6px 0 0;vertical-align:middle}.embed-panel{padding:12px;border:1px solid #d8e3ef;border-radius:12px;background:#f6f9fd}.embed-panel textarea{margin-top:7px;background:transparent;font:9px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace}.form-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}.form-actions .form-error,.form-actions .server-notice{flex:1}.admin-card{max-width:1160px;margin:22px auto;padding:20px}.card-heading h2{font-size:17px;margin:0}.card-heading p{font-size:10px;color:var(--muted);margin:5px 0 12px}.agent-access-grid{border-spacing:8px}.agent-access-grid td{background:#f7f9fc;border:1px solid #e5eaf1;border-radius:11px;padding:10px 11px}.agent-access-grid label{font-size:10px}.tickets-grid{grid-template-columns:minmax(260px,.72fr) minmax(420px,1.28fr)}.ticket-row{width:100%;display:grid;gap:4px;border:0;border-bottom:1px solid #edf1f5;background:#fff;padding:12px 2px;text-align:left}.ticket-row strong{font-size:11px}.ticket-row span{font-size:9px;color:#7f8da0}.ticket-notes article{border-left:3px solid var(--teal);padding:7px 10px;margin:8px 0;background:#f7fafc}.ticket-notes p{font-size:10px}.ticket-notes small{font-size:8px;color:#8794a5}.identity-card{max-width:760px;margin:22px auto;padding:20px;display:grid;grid-template-columns:210px 1fr;gap:20px}.identity-preview{border-radius:14px;background:linear-gradient(145deg,var(--navy),#0e3d5a);padding:20px;color:#fff;display:grid;place-content:center;text-align:center}.profile-avatar{width:96px;height:96px;border-radius:26px;object-fit:cover;background:#eef2f7;margin:auto}.identity-preview strong{display:block;font-size:18px;margin-top:10px}.identity-preview small{font-size:9px;color:#98aec4}.identity-fields{display:grid;gap:12px;align-content:start}.file-field small{color:#8996a7;font-weight:500}.identity-card .form-actions{grid-column:1/-1;border-top:1px solid var(--line);padding-top:14px}
@media(max-width:1180px){.app-view{grid-template-columns:76px minmax(0,1fr)}.sidebar{padding:18px 10px}.sidebar-brand img{width:50px;object-fit:cover;object-position:left}.sidebar-product{justify-content:center;margin:0 0 18px}.sidebar-product img{width:44px;height:44px}.sidebar-product div,.nav-item>span:not(.nav-glyph):not(.nav-count),.operator-chip div{display:none}.nav-item{justify-content:center}.nav-count{position:absolute;margin:0 0 26px 27px}.operator-chip>span{margin:auto}.chat-workspace{grid-template-columns:215px minmax(300px,355px) minmax(390px,1fr)}}
@media(max-width:900px){.chat-workspace{grid-template-columns:210px 1fr}.thread-panel{display:none}.sites-layout,.tickets-grid{grid-template-columns:1fr}.site-list{max-height:260px;overflow:auto}.identity-card{grid-template-columns:1fr}.identity-preview{display:flex;align-items:center;gap:13px;text-align:left}.identity-preview strong{margin:0}.identity-card .form-actions{grid-column:1}.field-grid{grid-template-columns:1fr}.color-grid{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.login-view{display:block}.login-card{width:100%;padding:27px 22px}.login-visual{display:none}.app-view{display:block}.sidebar{display:none}.chat-workspace{display:grid;grid-template-columns:1fr}.chat-categories{max-height:310px}.conversation-rail{border:0}.page-workspace{padding:19px 12px}.page-header{align-items:center}.page-header p{display:none}.agent-access-grid,.agent-access-grid tbody,.agent-access-grid tr{display:block}.agent-access-grid td{display:block;margin-bottom:7px}}

/* Keep long conversations inside the viewport; only the message region scrolls. */
.app-view{grid-template-rows:minmax(0,1fr)}
.workspace{min-height:0}
.chat-workspace{min-height:0;overflow:hidden}
.conversation-rail{min-height:0;overflow:hidden;grid-template-rows:auto auto minmax(0,1fr)}
.thread-panel{height:100%;min-height:0;overflow:hidden}
.thread-host,.thread-content{min-height:0;overflow:hidden}
.message-list{min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
@media(min-width:651px){.chat-workspace{grid-template-rows:minmax(0,1fr)}}

/* Live visitor draft and agent-only whisper affordances. */
.visitor-typing {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 9px;
    padding: 9px 11px;
    border: 1px solid #cfe3f6;
    border-radius: 12px;
    color: #31516f;
    background: #f1f8ff;
    box-shadow: 0 4px 15px rgba(35, 91, 139, .06);
}
.visitor-typing[hidden] { display: none; }
.visitor-typing-mark { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.visitor-typing-mark i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2585d9;
    animation: console-typing-dot 1.05s infinite ease-in-out;
}
.visitor-typing-mark i:nth-child(2) { animation-delay: .14s; }
.visitor-typing-mark i:nth-child(3) { animation-delay: .28s; }
@keyframes console-typing-dot {
    0%, 60%, 100% { opacity: .35; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-2px); }
}
.visitor-typing-copy { min-width: 0; display: grid; gap: 2px; }
.visitor-typing-copy strong { font-size: 10px; }
.visitor-typing-copy > span { max-width: min(560px, 62vw); overflow: hidden; color: #637d95; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }

.message-row:not(.whisper) > .whisper-meta { display: none; }
.message-row.whisper { max-width: 86%; margin-left: auto; margin-right: auto; }
.whisper-meta { display: flex; align-items: center; gap: 7px; margin: 0 2px 5px; color: #8a6226; font-size: 9px; font-weight: 750; }
.whisper-badge {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 2px 7px;
    border: 1px solid #e0af5b;
    border-radius: 999px;
    color: #76501b;
    background: #fff1cf;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.message-row.whisper .message-bubble {
    display: block;
    border: 1px dashed #d29a3d;
    border-radius: 12px;
    color: #644414;
    background: #fff8e9;
    box-shadow: 0 4px 16px rgba(139, 91, 21, .07);
}
.message-row.whisper time { margin-left: 3px; color: #9b7947; }

.whisper-compose { margin-top: 10px; border-top: 1px solid #e5eaf0; padding-top: 9px; }
.whisper-compose summary { display: flex; align-items: center; gap: 8px; min-height: 30px; color: #5d6d80; cursor: pointer; list-style: none; font-size: 10px; font-weight: 800; }
.whisper-compose summary::-webkit-details-marker { display: none; }
.whisper-compose summary::after { content: "+"; margin-left: 2px; color: #9c7b49; font-size: 15px; line-height: 1; }
.whisper-compose[open] summary::after { content: "\2212"; }
.whisper-compose summary small { margin-left: auto; color: #9a7c4d; font-size: 8px; font-weight: 650; }
.whisper-compose-body { margin-top: 8px; border: 1px dashed #d6aa61; border-radius: 12px; padding: 10px; background: #fffaf0; }
.whisper-compose textarea { width: 100%; min-height: 58px; max-height: 120px; resize: vertical; border: 0; outline: 0; color: #57401b; background: transparent; font: inherit; font-size: 11px; line-height: 1.5; }
.whisper-compose textarea::placeholder { color: #aa9068; }
.whisper-compose-actions { display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(190, 143, 70, .2); padding-top: 8px; }
.whisper-compose-actions small { flex: 1; color: #8b714c; font-size: 8px; line-height: 1.45; }
.whisper-button { border: 1px solid #d29a3d; border-radius: 9px; padding: 8px 11px; color: #5b3d10; background: linear-gradient(180deg, #ffd987, #f4bb54); box-shadow: 0 5px 14px rgba(158, 101, 24, .13); cursor: pointer; font-size: 10px; font-weight: 900; }
.whisper-button:hover { border-color: #bd7f21; background: linear-gradient(180deg, #ffe3a4, #f4bf5d); }
.whisper-button:focus-visible { outline: 3px solid rgba(219, 159, 64, .3); outline-offset: 2px; }
.whisper-button:disabled, .whisper-compose textarea:disabled { opacity: .52; cursor: not-allowed; }

@media(max-width:650px) {
    .visitor-typing-copy > span { max-width: 68vw; }
    .message-row.whisper { max-width: 96%; }
    .whisper-compose summary small { display: none; }
    .whisper-compose-actions { align-items: stretch; flex-direction: column; }
    .whisper-compose-actions small { display: none; }
    .whisper-button { width: 100%; min-height: 40px; }
}

/* Visitor navigation is operator-only context, not a chat bubble or whisper. */
.message-row.page-visit {
    width: min(620px, 92%);
    max-width: none;
    margin: 15px auto;
    text-align: center;
}
.page-visit-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #cfdfea;
    border-radius: 13px;
    padding: 9px 11px;
    color: #34546f;
    background: linear-gradient(135deg, #f5fbff, #eef8f5);
    box-shadow: 0 5px 18px rgba(27, 68, 101, .06);
    text-align: left;
}
.page-visit-mark {
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 10px;
    color: #176fd1;
    background: #deefff;
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 900;
}
.page-visit-copy,
.page-visit-link {
    min-width: 0;
    display: grid;
}
.page-visit-copy > small {
    margin-bottom: 3px;
    color: #668199;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.page-visit-link {
    border-radius: 7px;
    color: #245e92;
}
.page-visit-link:hover strong,
.page-visit-link:focus-visible strong { text-decoration: underline; }
.page-visit-link strong,
.page-visit-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.page-visit-link strong { font-size: 10px; }
.page-visit-link span {
    margin-top: 2px;
    color: #6f8396;
    font-size: 8px;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.page-visit-link.unavailable { color: #65798b; }
.message-row.page-visit > time {
    margin-top: 4px;
    text-align: center;
}

@media(max-width:650px) {
    .message-row.page-visit { width: 98%; }
    .page-visit-card { padding: 8px 9px; }
}

/* Current website context for one-to-one internal conversations. */
.team-agent-entry,
.team-thread-entry {
    border-bottom: 1px solid #eef2f6;
    background: #fff;
}
.team-agent-entry .team-row,
.team-thread-entry .thread-choice { border-bottom: 0; }
.team-current-page {
    margin: -5px 12px 9px 34px;
    padding: 6px 8px;
    border: 1px solid #dce6ef;
    border-radius: 9px;
    color: #48647e;
    background: #f5f9fd;
    display: flex;
    align-items: center;
    gap: 7px;
}
.team-current-page:hover {
    border-color: #a9cbea;
    color: #176fd1;
    background: #edf6ff;
}
.team-current-page > span:last-child {
    min-width: 0;
    display: grid;
}
.team-current-page strong,
.team-current-page small {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.team-current-page strong { font-size: 8px; }
.team-current-page small { margin-top: 2px; color: #788a9c; font-size: 7px; }
.team-current-page.is-unavailable,
.internal-current-page.is-unavailable { display: none; }
.thread-header.simple > div:first-of-type { min-width: 0; }
.internal-current-page {
    min-width: 180px;
    max-width: min(460px, 48%);
    margin-left: auto;
    padding: 7px 9px;
    border: 1px solid #d6e3ed;
    border-radius: 11px;
    color: #3f5e78;
    background: linear-gradient(135deg, #f5fbff, #eef8f5);
    display: flex;
    align-items: center;
    gap: 8px;
}
.internal-current-page-mark {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 8px;
    color: #176fd1;
    background: #deefff;
    display: grid;
    place-items: center;
    font-weight: 900;
}
.internal-current-page a {
    min-width: 0;
    display: grid;
}
.internal-current-page a:hover strong,
.internal-current-page a:focus-visible strong { text-decoration: underline; }
.internal-current-page small { color: #71879a; font-size: 7px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.internal-current-page strong,
.internal-current-page a > span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.internal-current-page strong { margin-top: 1px; font-size: 9px; }
.internal-current-page a > span { margin-top: 1px; color: #71859a; font-size: 7px; }

@media(max-width:650px) {
    .internal-current-page { max-width: 55%; }
    .internal-current-page a > span { display: none; }
}
