:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#20302b;background:#f3f6f4;font-size:15px;--green:#087b55}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{background:var(--green);color:#fff;border:0;border-radius:9px;padding:10px 18px;cursor:pointer;font-weight:600}button:hover{filter:brightness(.95)}button:disabled{opacity:.45;cursor:default}input,textarea{width:100%;border:1px solid #d5ddd8;border-radius:9px;padding:12px;background:#fff;color:inherit}input:focus,textarea:focus{outline:2px solid #92ccb3;outline-offset:1px}label{display:block;margin:16px 0 12px;font-weight:600}label input{margin-top:8px}textarea{resize:none;border:0;outline:none!important;min-height:85px}h1{font-size:25px;margin-top:32px}h2{font-size:21px;margin:0}.muted{color:#66766e;line-height:1.6}.fine{font-size:12px;color:#6b7c72;line-height:1.6}.brand{font-size:18px;font-weight:700;white-space:nowrap}.brand span{font-size:11px;border:1px solid #d1ddd5;border-radius:5px;padding:3px 6px;margin-left:5px;vertical-align:middle;color:#648073;font-weight:500}.login-card{max-width:420px;margin:10vh auto;background:#fff;border:1px solid #e0e8e2;padding:32px;border-radius:16px;box-shadow:0 12px 40px #163e1d0a}.login-card form button{width:100%;margin-top:8px}.login-card .fine{margin-top:22px;text-align:center}.error{color:#a02c25;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.banner{margin:0;padding:10px 20px;background:#fff0ed}.secondary{background:#e4f1e9;color:#13603f}.ghost{background:transparent;color:#64776b;padding:8px 10px}.manual{font-size:12px;color:#0b714b;margin-right:12px}header{height:66px;padding:0 24px;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #e2e9e4}header>div:last-child{display:flex;align-items:center;gap:8px}.notice{padding:10px 24px;font-size:12px;background:#ebf1eb;color:#58715e;line-height:1.6}.workspace{display:grid;grid-template-columns:280px 1fr;height:calc(100dvh - 106px);min-height:420px}aside{background:#fff;border-right:1px solid #e1e8e2;display:flex;flex-direction:column;overflow:auto}.section-head{padding:22px 18px 12px;font-weight:700;display:flex;justify-content:space-between;gap:6px;font-size:14px}.section-head span{font-size:11px;font-weight:400;color:#6a7e70}#account-status{padding:0 14px}.account-note{font-size:11px;padding:8px;margin-bottom:5px;border-radius:6px;background:#f5f7f4;overflow-wrap:anywhere}.account-note button{font-size:11px;padding:5px 8px;margin-top:6px}.conversation{width:100%;border-radius:0;background:#fff;color:inherit;text-align:left;padding:17px 20px;border-bottom:1px solid #f0f3ef;font-weight:400;display:block}.conversation.selected{background:#e6f3ea;border-left:3px solid var(--green);padding-left:17px}.conversation strong{font-size:14px}.conversation .preview{font-size:12px;color:#7a877e;margin-top:7px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.badge{background:#d84837;color:white;padding:2px 5px;font-size:10px;border-radius:10px;float:right;min-width:18px;text-align:center}.aside-foot{padding:18px;color:#79897e;font-size:11px;margin-top:auto;line-height:1.8}.chat{display:flex;flex-direction:column;min-width:0;min-height:0;background:#f0f3ef}.chat-head{height:70px;flex-shrink:0;background:#f8faf7;display:flex;align-items:center;padding:12px 24px;border-bottom:1px solid #e1e7de;gap:5px}.chat-head strong{font-size:16px}#messages{flex:1;overflow:auto;padding:24px;scroll-behavior:smooth;min-height:100px}.empty{font-size:13px;color:#859185;padding:30px 22px;line-height:1.9;text-align:center}.hero{padding-top:14vh}.message{display:flex;flex-direction:column;align-items:flex-start;margin:0 0 18px}.message.out{align-items:flex-end}.bubble{padding:11px 14px;max-width:min(78%,650px);border-radius:3px 13px 13px 13px;background:#fff;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;box-shadow:0 1px 2px #13261808}.out .bubble{background:#a3e67c;border-radius:13px 3px 13px 13px}.message-meta{font-size:11px;color:#7b8a7e;margin-top:5px;display:flex;gap:8px;align-items:center}.message-meta .failed,.message-meta .unknown{color:#b3432d}.message details{max-width:80%;font-size:11px;color:#a34234;overflow-wrap:anywhere;margin-top:5px}.message details pre{white-space:pre-wrap;font:inherit}#send-form{background:#fff;padding:12px 20px 14px;border-top:1px solid #e2e9df}.composer-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:4px}.composer-foot span{color:#7c8b7f;font-size:11px}.mobile{display:none}dialog{border:1px solid #d9e3dc;border-radius:16px;padding:25px;width:440px;max-width:calc(100vw - 24px);max-height:90dvh;box-shadow:0 20px 80px #05241633}dialog::backdrop{background:#0c241e66}.dialog-head{display:flex;align-items:center;justify-content:space-between}dialog form button{width:100%}#qr-box{text-align:center;margin-top:18px}#qr-image{max-width:100%;width:280px;height:auto;image-rendering:pixelated;display:block;margin:0 auto}#qr-status{font-size:14px;font-weight:600}#qr-countdown{margin-top:-7px}[hidden]{display:none!important}@media(max-width:700px){header{height:59px;padding:0 12px}.brand{font-size:15px}.brand span{font-size:10px}.manual{display:none}header button{font-size:12px;padding:9px 11px}.notice{padding:9px 14px;font-size:11px}.workspace{height:calc(100dvh - 116px);min-height:320px;display:block}.workspace aside{width:100%;height:100%;border:0}.chat{display:none;height:100%}body.chat-open aside{display:none}body.chat-open .chat{display:flex}.mobile{display:block}.chat-head{padding:10px 9px;height:68px}.chat-head strong{font-size:14px}.chat-head .fine{font-size:10px}#messages{padding:18px 13px}.bubble{max-width:87%}#send-form{padding:8px 12px 12px;padding-bottom:max(12px,env(safe-area-inset-bottom))}.login-card{margin:8vh 14px;padding:25px}textarea{font-size:16px}dialog{padding:18px}#qr-image{width:260px}.section-head{padding:18px 18px 12px}}
.media-tools{display:flex;flex-wrap:wrap;gap:3px;border-bottom:1px solid #eef2ed;padding-bottom:4px}.media-tools button{font-size:12px;padding:7px 9px}.media-limit{font-size:10px;margin-top:8px}.media-view{display:flex;flex-direction:column;gap:4px;max-width:100%;min-width:0}.media-view img,.media-view video{max-width:100%;width:280px;max-height:260px;object-fit:contain;border-radius:7px}.media-view audio{max-width:100%;width:280px;height:40px}.attachment-link{color:#14623f;text-decoration:none;font-size:13px;overflow-wrap:anywhere}.attachment-link:hover{text-decoration:underline}#attachment-draft{border:1px solid #dbe6dd;background:#f6faf6;border-radius:8px;padding:8px;position:relative;max-height:190px;overflow:auto}#attachment-draft .media-view{padding-right:40px}#attachment-draft img,#attachment-draft video{max-height:100px;width:180px}#attachment-draft>button{position:absolute;right:5px;top:5px;font-size:12px}#attachment-draft p{margin:5px 0 0}.account-note button{margin-right:6px}#upload-status{margin:5px 0}@media(max-width:700px){.media-tools button{padding:6px 7px;font-size:11px}.media-limit{font-size:9px}.media-view audio{width:240px}.bubble{max-width:90%}#attachment-draft{max-height:140px}textarea{min-height:65px}}

.connection-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;background:#fff5df;color:#795c20;font-size:13px;line-height:1.6;flex-shrink:0;border-bottom:1px solid #f0dfb7}.connection-notice span{min-width:0;overflow-wrap:anywhere}.connection-notice button{flex-shrink:0;padding:9px 12px;font-size:12px}@media(max-width:700px){.connection-notice{padding:10px 12px;font-size:12px;gap:8px}}

.chat-heading{flex:1;min-width:0}.chat-heading strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-head #customer-profile{flex-shrink:0;padding:8px 10px;font-size:12px}#profile-dialog textarea{border:1px solid #d5ddd8;resize:vertical;min-height:120px;margin-top:8px}#profile-dialog input,#profile-dialog textarea{font-weight:400}.conversation strong{display:inline-block;max-width:calc(100% - 24px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}@media(max-width:700px){.chat-head #customer-profile{padding:7px 8px;font-size:11px}.chat-heading .fine{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#profile-dialog{max-height:85dvh}}
select{font:inherit;width:100%;border:1px solid #d5ddd8;border-radius:9px;padding:10px;background:#fff;color:inherit;margin-top:6px}#desk{height:100dvh;display:flex;flex-direction:column}header{height:auto;min-height:66px;flex-shrink:0;padding-top:8px;padding-bottom:8px;gap:12px}.header-actions{flex-wrap:wrap;justify-content:flex-end}.workspace{flex:1;height:auto;min-height:0}.notice{flex-shrink:0}.banner{max-height:100px;overflow:auto;flex-shrink:0}.download-button{display:inline-block;padding:9px 14px;border-radius:8px;background:#087b55;color:#fff;text-decoration:none;font-size:13px}.qr-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.qr-actions button{font-size:12px}.admin-dialog{width:920px}.admin-grid{display:grid;grid-template-columns:280px 1fr;gap:28px}.admin-grid h3{font-size:16px}.admin-grid form+form{margin-top:25px;padding-top:18px;border-top:1px solid #e2e9df}.management-card{padding:13px;background:#f4f8f4;border:1px solid #e2e9df;border-radius:9px;margin:9px 0}.management-card strong{overflow-wrap:anywhere}.management-card button{font-size:12px;padding:8px 11px;margin-top:7px;margin-right:5px}.management-card p{margin:6px 0}.credential-result{padding:16px;background:#edf7ee;border:1px solid #b8d9c0;border-radius:9px}.credential-result input{font-family:monospace}.section-head{flex-wrap:wrap}.manual{overflow:hidden;text-overflow:ellipsis;max-width:180px;white-space:nowrap}@media(max-width:700px){header{flex-wrap:wrap;gap:6px;min-height:59px;padding:8px 12px}header>.brand{font-size:14px}header .header-actions{gap:5px}header button{padding:7px 9px;font-size:11px}.workspace{height:auto;min-height:0}.admin-grid{grid-template-columns:1fr;gap:15px}.admin-dialog{width:calc(100vw - 20px)}.admin-grid input,.admin-grid select{font-size:16px}.login-card{max-height:none}#messages{min-height:70px}.chat-head{height:62px}.notice{font-size:10px;padding-top:6px;padding-bottom:6px}.qr-actions button{font-size:11px}}
.list-tools{padding:0 14px 12px}.list-tools input{font-size:12px;padding:9px}.filter-row{display:flex;gap:8px;align-items:center;margin-top:6px}.filter-row select{font-size:12px;min-width:0;margin:0}.filter-row button{font-size:12px;padding:9px;white-space:nowrap}.history-tools{display:flex;justify-content:center;gap:10px;background:#f8faf7;border-bottom:1px solid #e1e7de;flex-shrink:0}.history-tools button{font-size:11px;padding:6px 10px}.live-alert{background:#fff0d1;color:#805d19;padding:8px 18px;font-size:12px;flex-shrink:0}.incoming-part{margin-top:8px}.incoming-part button,.retry-send{font-size:11px;padding:6px 10px;margin-top:5px}.matched-message .bubble{outline:3px solid #e7b348}.reception-avatar{width:96px;height:96px;object-fit:cover;border-radius:20px;display:block;margin:16px auto}#qr-card-preview{display:block;width:100%;height:auto;max-width:360px;margin:10px auto}#qr-card-download{margin-top:8px}#card-preview-box{margin-top:14px;font-size:13px}#quick-body{border:1px solid #d5ddd8}.quick-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}.search-result{display:block;width:100%;text-align:left;background:#f4f8f4;color:#20302b;margin-top:9px;font-weight:400}.search-result strong{font-size:12px}.search-result p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}.audit-row{border-bottom:1px solid #e2e9df;padding:10px 0}.audit-row strong{font-size:12px}.audit-row p{margin:4px 0}.audit-row pre{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;margin:4px 0}#operations-dialog section+section{margin-top:22px}#operations-dialog>section>button{margin-bottom:8px;font-size:12px}#history-search-form,#audit-filter-form{display:flex;gap:8px;margin:15px 0}#history-search-form button,#audit-filter-form button{width:auto;flex-shrink:0}#quick-list{max-height:38dvh;overflow:auto}#audit-list{max-height:42dvh;overflow:auto}.message-meta{flex-wrap:wrap}@media(max-width:700px){.list-tools input{font-size:16px}.header-actions{row-gap:5px}#quick-dialog textarea{font-size:16px}#send-form{padding-top:6px}#messages{min-height:60px}.history-tools button{padding:5px 8px;font-size:10px}#qr-card-preview{max-width:300px}.live-alert{font-size:11px;padding:7px 12px}}
