:root{--ink:#17251c;--muted:#748078;--line:#e2e7e3;--soft:#f4f7f4;--green:#216e42;--green-2:#2f8b55;--mint:#e4f4e9;--amber:#ad741c;--red:#aa3d3d;--shadow:0 18px 50px rgba(30,54,38,.1)}*{box-sizing:border-box}body,html{margin:0;min-height:100%;background:#eef2ef;color:var(--ink);font-family:Inter,PingFang SC,Microsoft YaHei,system-ui,sans-serif}button,input,textarea{font:inherit}button{cursor:pointer}.app-shell{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:100vh}.sidebar{display:flex;flex-direction:column;padding:26px 18px;color:#eef8f1;background:#173724}.brand-mark{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;color:#173724;background:#8ee3a9;font-size:19px;font-weight:900}.brand-copy{margin:12px 0 34px}.brand-copy span,.brand-copy strong{display:block}.brand-copy strong{font-size:17px}.brand-copy span{margin-top:4px;color:#abc4b3;font-size:11px}.sidebar nav{flex:1 1}.sidebar nav button{width:100%;display:grid;grid-template-columns:20px 1fr auto;align-items:center;gap:9px;padding:12px;border:0;border-radius:10px;color:#d3e6d9;background:transparent;text-align:left}.sidebar nav button.active{background:#27533a}.sidebar nav em{font-style:normal}.sidebar nav b{min-width:22px;padding:3px 7px;border-radius:9px;background:#0e2b1a;font-size:11px;text-align:center}.agent-card{display:flex;align-items:center;gap:10px;padding:14px 0;border-top:1px solid rgba(255,255,255,.12)}.avatar{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;color:#173724;background:#8ee3a9;font-weight:800}.agent-card span,.agent-card strong{display:block}.agent-card strong{font-size:12px}.agent-card span{max-width:130px;margin-top:3px;overflow:hidden;color:#a9c2b1;font-size:9px;text-overflow:ellipsis}.logout{padding:9px;border:1px solid rgba(255,255,255,.14);border-radius:9px;color:#c5d9cb;background:transparent}.workspace{min-width:0;padding:26px}.topbar{height:64px;display:flex;align-items:flex-start;justify-content:space-between}.topbar h1,.topbar p{margin:0}.topbar h1{font-size:24px}.topbar p{margin-top:4px;color:var(--muted);font-size:12px}.mode-badge{display:flex;align-items:center;gap:7px;padding:8px 11px;border-radius:999px;font-size:11px;font-weight:700}.mode-badge i{width:7px;height:7px;border-radius:50%;background:currentColor}.mode-badge.mock{color:#825817;background:#fff0d2}.mode-badge.live{color:#23693f;background:#dff3e5}.desk{height:calc(100vh - 116px);min-height:620px;display:grid;grid-template-columns:330px minmax(500px,1fr);overflow:hidden;border:1px solid #dce3de;border-radius:18px;background:white;box-shadow:var(--shadow)}.conversation-list{min-width:0;border-right:1px solid var(--line)}.conversation-list>header{min-height:82px;display:flex;align-items:center;justify-content:space-between;padding:18px;border-bottom:1px solid var(--line)}.conversation-list h2,.conversation-list header span{margin:0}.conversation-list h2{font-size:16px}.conversation-list header span{display:block;margin-top:5px;color:var(--muted);font-size:10px}.simulate{padding:8px 9px;border:1px solid #b8d8c2;border-radius:8px;color:var(--green);background:#f3fbf5;font-size:10px;font-weight:700}.conversation-scroll,.message-scroll{overflow-y:auto}.conversation-scroll{height:calc(100% - 82px)}.conversation-row{position:relative;width:100%;display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;padding:16px 18px;border:0;border-bottom:1px solid #edf0ee;background:#fff;text-align:left}.conversation-row:hover{background:#f8faf8}.conversation-row.selected{background:#edf7f0}.conversation-row.selected:before{position:absolute;inset:0 auto 0 0;width:3px;background:var(--green);content:""}.contact-avatar{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;color:#27633c;background:#dff0e4;font-size:11px;font-weight:900}.contact-avatar.large{width:46px;height:46px}.row-content{min-width:0}.row-content>span{display:flex;align-items:center;justify-content:space-between;gap:8px}.row-content strong{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.row-content small,.row-content time{color:#8b958e;font-size:9px}.row-content small{display:block;margin:4px 0 7px}.row-content p{margin:0;overflow:hidden;color:#58645c;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.unread{position:absolute;right:17px;bottom:12px;min-width:18px;height:18px;display:grid;place-items:center;border-radius:9px;color:white;background:var(--green);font-size:9px}.chat-panel{min-width:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;background:#f8faf8}.chat-header{display:flex;align-items:center;gap:12px;padding:16px 22px;border-bottom:1px solid var(--line);background:#fff}.chat-header div{min-width:0}.chat-header h2,.chat-header p{margin:0}.chat-header h2{font-size:16px}.chat-header p{margin-top:4px;color:var(--muted);font-size:10px}.window-state{margin-left:auto;padding:7px 10px;border-radius:999px;font-size:9px;font-weight:700}.window-state.open{color:#24653d;background:#e1f3e6}.window-state.closed{color:#8a5d1c;background:#faebce}.privacy-note{padding:9px 22px;color:#67746b;background:#f2f6f3;font-size:10px;text-align:center}.message-scroll{padding:22px 7%;scrollbar-width:thin}.message{max-width:72%;margin-bottom:18px}.message.outbound{margin-left:auto}.message-meta{display:flex;align-items:center;gap:8px;margin:0 4px 5px;color:#7c8780;font-size:9px}.message.outbound .message-meta{justify-content:flex-end}.message-meta strong{color:#566259}.bubble{position:relative;padding:13px 14px;border:1px solid #dfe5e0;border-radius:5px 16px 16px 16px;background:#fff;box-shadow:0 5px 14px rgba(42,62,48,.05)}.outbound .bubble{border-color:#b8dfc3;border-radius:16px 5px 16px 16px;background:#e5f5e9}.bubble>p,.translation-failed p{margin:0;font-size:13px;line-height:1.6}.bubble .pending{color:var(--muted)}.bubble details{margin-top:10px;padding-top:9px;border-top:1px dashed #cfd7d1}.bubble summary{color:#5f7165;font-size:9px;cursor:pointer}.bubble details p{margin:7px 0 0;color:#6e7972;font-size:10px;line-height:1.55}.translation-failed span{display:block;margin:8px 0;color:var(--red);font-size:9px}.translation-failed button{padding:5px 8px;border:1px solid #dfb4b4;border-radius:7px;color:var(--red);background:#fff}.delivery{display:block;margin-top:8px;color:#718078;font-size:8px;text-align:right}.delivery.failed{color:var(--red)}.composer{padding:14px 18px 16px;border-top:1px solid var(--line);background:#fff}.composer textarea{width:100%;min-height:78px;resize:none;padding:13px;border:1px solid #ced8d1;border-radius:11px;outline:none;font-size:13px;line-height:1.55}.composer textarea:focus{border-color:#66a77b;box-shadow:0 0 0 3px rgba(47,139,85,.1)}.composer textarea:disabled{background:#f4f4f4}.composer footer{display:flex;align-items:center;justify-content:space-between;margin-top:9px}.composer footer span{color:var(--muted);font-size:9px}.composer footer button,.login-card form button{padding:9px 15px;border:0;border-radius:9px;color:white;background:#243a2b;font-size:11px;font-weight:800}.composer footer button.send{background:var(--green-2)}button:disabled{cursor:not-allowed;opacity:.5}.translation-preview{position:relative;margin-bottom:10px;padding:11px 42px 11px 12px;border:1px solid #b7d6c0;border-radius:10px;background:#f1faf3}.translation-preview span{display:flex;align-items:center;gap:7px}.translation-preview b{padding:2px 5px;border-radius:5px;color:#fff;background:var(--green);font-size:8px}.translation-preview strong{font-size:10px}.translation-preview p{margin:7px 0 0;font-size:11px;line-height:1.5}.translation-preview>button{position:absolute;right:10px;top:10px;border:0;color:var(--green);background:transparent;font-size:9px}.closed-note,.error-banner{margin-bottom:9px;padding:9px 11px;border-radius:8px;font-size:10px}.error-banner{display:flex;justify-content:space-between;color:#8f3434;background:#fae7e7}.error-banner button{border:0;color:inherit;background:transparent}.closed-note{color:#7e581d;background:#fbefd8}.empty{padding:48px 20px;color:var(--muted);text-align:center}.empty b{color:#4b5b50}.empty p{font-size:11px}.chat-empty{align-self:center}.center-screen,.login-screen{min-height:100vh;display:grid;place-items:center}.center-screen p{color:var(--muted);font-size:12px}.loader{width:26px;height:26px;border:3px solid #d8e1da;border-top:3px solid var(--green);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(1turn)}}.login-screen{padding:24px;background:radial-gradient(circle at 20% 10%,#def2e4 0,transparent 34%),linear-gradient(135deg,#edf3ef,#f8faf8)}.login-card{width:min(430px,100%);padding:34px;border:1px solid #dbe4dd;border-radius:22px;background:rgba(255,255,255,.94);box-shadow:var(--shadow)}.login-brand{display:flex;align-items:center;gap:11px}.login-brand span,.login-brand strong{display:block}.login-brand span{margin-top:3px;color:var(--muted);font-size:10px}.login-copy{margin:36px 0 22px}.eyebrow{color:var(--green);font-size:10px;font-weight:900;letter-spacing:.12em}.login-copy h1{margin:8px 0;font-size:28px}.login-copy p{margin:0;color:var(--muted);font-size:12px;line-height:1.6}.mock-tip{display:flex;gap:8px;margin-bottom:18px;padding:10px;border-radius:9px;color:#74511a;background:#fff2d9;font-size:10px}.mock-tip span{color:#806b49}.login-card form{display:grid;gap:14px}.login-card label{display:grid;gap:6px;color:#46544a;font-size:10px;font-weight:700}.login-card input{height:42px;padding:0 11px;border:1px solid #ccd7cf;border-radius:9px;outline:none}.login-card input:focus{border-color:#62a377}.login-card form button{height:43px;margin-top:4px;background:var(--green)}.form-error{margin:0;color:var(--red);font-size:10px}@media(max-width:900px){.app-shell{grid-template-columns:72px minmax(0,1fr)}.sidebar{align-items:center;padding:20px 10px}.agent-card div,.brand-copy,.logout,.sidebar nav b,.sidebar nav em{display:none}.sidebar nav button{display:grid;place-items:center}.workspace{padding:14px}.desk{height:calc(100vh - 92px);grid-template-columns:280px minmax(420px,1fr)}.topbar{height:64px}}@media(max-width:680px){.app-shell{display:block}.sidebar{height:62px;display:flex;flex-direction:row;padding:10px 14px}.agent-card,.sidebar nav{display:none}.workspace{padding:0}.topbar{padding:12px 14px}.topbar p{display:none}.desk{height:calc(100vh - 64px);min-height:0;display:block;border-radius:0}.conversation-list{height:100%;border:0}.chat-panel{position:fixed;inset:64px 0 0;z-index:5}.conversation-list:has(.conversation-row.selected){display:none}.message{max-width:88%}}