:root{--bg:#f5f7fa;--ink:#172d35;--muted:#7c8b92;--line:#e5ebef;--teal:#087f76;--dark:#102d34;--light:#e5f4ee;--orange:#a16b25;--red:#ba4f48;font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);font-size:14px}
*{box-sizing:border-box}body{margin:0;background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer;transition:background .15s,transform .15s}button:disabled{opacity:.5;cursor:wait}button:hover{filter:brightness(.97)}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #74c7bc;outline-offset:2px}[hidden]{display:none!important}h1,h2,h3,p{margin:0}h1{font-size:29px;letter-spacing:-1px;font-weight:650}h2{font-size:17px;font-weight:650}h3{font-size:14px;font-weight:600}p{line-height:1.8}small,.muted{color:var(--muted)}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--teal);font-weight:700;margin-bottom:10px}.sidebar{width:228px;position:fixed;inset:0 auto 0 0;background:#fff;border-right:1px solid var(--line);padding:32px 20px;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;font-size:23px;font-weight:750;letter-spacing:1px;padding:0 10px 44px}.brand span{display:block;font-size:10px;letter-spacing:2px;font-weight:400;color:var(--muted);margin-top:5px}.brand-icon{width:40px;height:42px;border-radius:11px;background:var(--dark);color:#b0ead0;font-size:21px;display:grid;place-items:center}.workspace-label{font-size:10px;color:#a2adb3;margin:0 15px 15px;letter-spacing:2px}nav{display:flex;flex-direction:column;gap:7px}nav button{border:0;background:transparent;text-align:left;padding:13px 15px;border-radius:9px;color:#71848a;display:flex;align-items:center;gap:13px;font-size:13px}nav button>span{font-size:19px;width:22px;font-weight:400}nav button.active{background:#eaf5ef;color:#186454;font-weight:650}nav i{margin-left:auto;font-style:normal;font-size:10px;background:#cce7d8;border-radius:5px;padding:2px 6px}.sidebar-bottom{margin-top:auto;border-top:1px solid var(--line);padding:20px 12px 0;font-size:11px;color:#48665e;line-height:2}.sidebar-bottom>div{font-size:10px;color:#9aa7a8}.dot{display:inline-block;width:6px;height:6px;background:#439d7b;border-radius:100%;margin-right:6px}.text-button{border:0;background:transparent;color:var(--teal);padding:7px 0;font-size:12px}main{margin-left:228px;min-height:100vh;padding:0 38px 22px}header{height:80px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);font-size:11px}.breadcrumb{color:#8e9ca4}.breadcrumb span{padding:0 13px;color:#bcc7cc}.breadcrumb b{color:#455b63;font-weight:500}.header-right{display:flex;gap:15px;align-items:center}.avatar{background:#e5ebe8;border:3px solid white;box-shadow:0 0 0 1px #e3e9e5;border-radius:50%;width:31px;height:31px;display:grid;place-items:center;font-size:11px;color:#5a7564}.icon-button{background:transparent;border:1px solid #dce5e9;border-radius:7px;width:29px;height:29px;color:#73868a;font-size:17px}.badge{display:inline-block;white-space:nowrap;border-radius:5px;padding:5px 8px;font-size:10px;font-weight:500;background:#ebf0f3;color:#66808b;line-height:1.2}.badge.green{background:#e8f4eb;color:#3a8060}.badge.orange{background:#fff3df;color:#a27229}.badge.red{background:#fbeceb;color:#b3625c}.badge.blue{background:#e8f0fc;color:#507bb2}.mode-banner{border:1px solid #e7dcc2;background:#fffaf0;color:#8c774b;padding:10px 15px;border-radius:7px;font-size:11px;margin-top:19px;line-height:1.6}.page-heading{display:flex;justify-content:space-between;align-items:center;margin:32px 0 25px}.page-heading p{color:var(--muted);font-size:12px;margin-top:9px}.primary,.secondary{border:0;padding:11px 17px;border-radius:7px;font-size:12px;font-weight:550;display:inline-flex;gap:14px;justify-content:center;align-items:center}.primary{background:var(--teal);color:#fff}.secondary{background:white;color:#52666e;border:1px solid #dce5e9}.button-row{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:17px}.metric{background:white;border:1px solid var(--line);border-radius:10px;padding:22px}.metric-title{color:#87979f;font-size:11px;display:flex;justify-content:space-between}.metric-title span{color:#9db6b1}.metric-value{font-size:32px;font-weight:600;letter-spacing:-1px;margin:13px 0 10px;font-variant-numeric:tabular-nums}.metric-note{font-size:10px;color:#91a097}.metric-note b{color:#4a8f73;font-weight:500}.grid-main{display:grid;grid-template-columns:1.6fr 1fr;gap:20px;margin-top:22px}.panel{background:#fff;border:1px solid var(--line);border-radius:10px;padding:23px;margin-bottom:20px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.panel-head p{font-size:10px;color:var(--muted);margin-top:6px}.panel-head .text-button{font-size:10px}.setup{background:var(--dark);color:#fff;padding:25px;border-radius:10px;margin-bottom:20px;position:relative;overflow:hidden}.setup .eyebrow{color:#9dcdb7;font-size:9px}.setup h2{font-size:21px;margin-bottom:13px;line-height:1.5}.setup p{color:#a8bec0;font-size:11px;max-width:290px}.setup .primary{margin-top:21px;background:#d5e9b9;color:#26432b;font-size:11px}.setup-stamp{position:absolute;right:22px;top:25px;font-size:50px;color:#3e6865;transform:rotate(-15deg)}.checklist{margin-top:20px;border-top:1px solid #325157;padding-top:15px;display:flex;gap:12px;flex-wrap:wrap;font-size:10px;color:#adc6c6}.checklist b{color:#cde3aa}.task-row{display:flex;gap:13px;align-items:flex-start;padding:15px 0;border-bottom:1px solid #eef2f4}.task-row:last-child{border:0;padding-bottom:0}.task-icon{width:31px;height:31px;border-radius:8px;background:#fcf1e4;color:#ac854d;display:grid;place-items:center;flex-shrink:0}.task-text{flex:1;min-width:0}.task-text h3{font-size:12px}.task-text p{font-size:10px;color:var(--muted);margin-top:5px}.task-row .text-button{font-size:11px}.mini-members{display:flex;align-items:center;justify-content:space-between;padding:15px 0;border-bottom:1px solid #eef2f4}.mini-members:last-child{border:0}.person{display:flex;align-items:center;gap:10px}.person-avatar{width:32px;height:32px;border-radius:9px;background:#eef4ef;color:#6b8b72;display:grid;place-items:center;font-size:12px}.person-name{font-size:12px;font-weight:550}.person-sub{font-size:10px;color:#98a5ab;margin-top:5px}.quota{font-size:10px;color:#7d939b;text-align:right}.quota strong{color:#375d54}.funnel-step{display:flex;align-items:center;padding:11px 0;gap:12px}.step-num{width:24px;height:24px;border-radius:50%;border:1px solid #dce6df;color:#7d9d89;display:grid;place-items:center;font-size:10px}.funnel-step>div{flex:1;font-size:11px}.funnel-step strong{font-size:16px;font-weight:500}.funnel-step small{display:block;font-size:9px;margin-top:5px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}th{font-size:10px;color:#8d9ba3;font-weight:500;padding:13px 13px;background:#f8fafb;border-bottom:1px solid var(--line);white-space:nowrap}td{padding:17px 13px;border-bottom:1px solid #eef2f4;vertical-align:middle}tr:last-child td{border-bottom:0}td .text-button{font-size:11px}.mono{font-family:ui-monospace,SFMono-Regular,monospace;font-size:10px}.filters{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px}.search{width:270px;background:#f8fafb}.empty{text-align:center;padding:42px 20px;color:#899ba3}.empty .empty-icon{font-size:30px;color:#b5cbc1;margin-bottom:13px}.empty h3{font-size:13px;font-weight:500;margin-bottom:8px}.empty p{font-size:11px}.empty .primary{margin-top:19px}.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:20px}.details{display:grid;grid-template-columns:1fr 1fr;gap:13px;padding:20px;background:#f6f9f8;border-radius:8px;margin:18px 0}.details div{font-size:12px}.details small{display:block;font-size:10px;margin-bottom:7px}.status-row{display:flex;justify-content:space-between;align-items:center;padding:15px 0;border-bottom:1px solid #eef2f4;font-size:12px}.status-row small{display:block;margin-top:5px;font-size:10px}.settings-note{font-size:11px;color:#8c9c99;line-height:1.9;margin-top:15px}.tabs-pills{display:flex;gap:7px;flex-wrap:wrap}.tabs-pills button{font-size:11px;color:#819097;background:transparent;border:1px solid #e3e9eb;border-radius:5px;padding:7px 12px}.tabs-pills button.active{color:#20715e;border-color:#b8d9c9;background:#edf7f1}.ticket-card{border:1px solid #e3eaed;border-radius:9px;padding:19px;margin-bottom:13px;background:white}.ticket-card h3{font-size:13px;line-height:1.6}.ticket-card p{font-size:11px;color:#8b9aa1;margin-top:8px}.ticket-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.ticket-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:16px}.bubble{padding:13px 15px;border-radius:7px;background:#f0f5f3;line-height:1.8;font-size:12px;white-space:pre-wrap;margin:10px 0}.bubble.admin{background:#edf2fa}.bubble small{font-size:10px;display:block;margin-bottom:6px}.audit-detail{max-width:400px;word-break:break-word;color:#91a0a4;line-height:1.7}footer{display:flex;justify-content:space-between;color:#a0acb2;font-size:9px;padding-top:20px;margin-top:10px;border-top:1px solid var(--line);letter-spacing:.3px}dialog{border:1px solid var(--line);border-radius:14px;width:min(580px,92vw);padding:32px;color:var(--ink);box-shadow:0 25px 100px #102d342b;max-height:88vh;overflow:auto}dialog::backdrop{background:#12313966;backdrop-filter:blur(3px)}.dialog-close{position:absolute;top:18px;right:20px;background:transparent;border:0;font-size:23px;color:#85969c}dialog h2{font-size:22px;padding-right:25px}dialog .intro{font-size:12px;color:var(--muted);margin:12px 0 24px}label{display:block;color:#6d828b;font-size:11px;margin:16px 0}input,select,textarea{display:block;width:100%;border:1px solid #dce5e9;border-radius:6px;padding:11px 12px;background:white;color:var(--ink);margin-top:8px;font-size:12px}textarea{min-height:92px;resize:vertical}input[type=checkbox]{display:inline;width:auto;margin-right:7px}label.checkbox{display:flex;align-items:center;gap:5px}label.checkbox input{margin:0}form .button-row{margin-top:25px;justify-content:flex-end}.help{font-size:10px;line-height:1.8;color:#99a6a7}#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:#183e37;color:white;padding:13px 25px;border-radius:8px;box-shadow:0 6px 30px #183e372b;font-size:12px;max-width:90vw;z-index:99}.error{font-size:12px;color:var(--red);line-height:1.8;margin-top:13px}.login-screen{width:min(410px,86vw);margin:13vh auto}.login-mark{width:58px;height:58px;background:#173c37;border-radius:14px;color:#d9efc8;font-size:34px;padding:10px;margin-bottom:28px;line-height:1}.login-mark span{font-size:20px}.login-screen h1{font-size:30px;line-height:1.6;margin:15px 0}.login-screen p{color:#879a9b;font-size:12px}.login-screen form{margin-top:30px}.login-screen .primary{width:100%;margin:10px 0 17px;justify-content:space-between;font-size:13px;padding:15px 18px}.login-screen #login-note{font-size:10px;line-height:1.9}
@media(min-width:1550px){main{padding-left:60px;padding-right:60px}#content,.page-heading{max-width:1500px;margin-left:auto;margin-right:auto}}
@media(max-width:1100px){.sidebar{width:185px;padding-left:12px;padding-right:12px}main{margin-left:185px;padding:0 23px 20px}.brand{font-size:20px}.grid-main{grid-template-columns:1.25fr 1fr}.metric{padding:17px}.metric-value{font-size:27px}.panel{padding:18px}.metrics{gap:10px}}
@media(max-width:760px){.sidebar{position:static;width:100%;padding:14px 17px;border-right:0;border-bottom:1px solid var(--line)}.brand{padding:0;font-size:18px}.brand-icon{width:31px;height:33px;font-size:17px}.brand span{font-size:8px}.workspace-label,.sidebar-bottom{display:none}nav{flex-direction:row;overflow:auto;margin-top:14px;gap:4px}nav button{padding:9px 11px;white-space:nowrap;font-size:10px}nav button>span{display:none}nav i{font-size:8px}main{margin:0;padding:0 17px 20px}header{height:55px}.metrics{grid-template-columns:repeat(2,1fr)}.grid-main,.two-columns{grid-template-columns:1fr}.page-heading{margin-top:24px;align-items:flex-start;gap:15px}h1{font-size:24px}.eyebrow{font-size:8px}.page-heading p{font-size:10px}.page-heading .primary{font-size:10px;padding:10px 12px;white-space:nowrap}.filters{flex-wrap:wrap}.search{width:100%}.panel-head h2{font-size:15px}.mode-banner{font-size:10px}.grid-main{gap:0}.metrics .metric-note{font-size:9px}footer span{display:none}.login-screen{margin-top:10vh}}

/* Customer chat */
.chat-page{height:100dvh;min-height:560px;display:flex;flex-direction:column;padding-bottom:18px}
.chat-page>header{height:56px;flex-shrink:0}
.chat-page .page-heading{margin:14px 0 12px;flex-shrink:0}.chat-page .page-heading .eyebrow{display:none}.chat-page .page-heading h1{font-size:22px}.chat-page .page-heading p{margin-top:4px}.chat-page #page-actions{display:none}.chat-page footer{display:none}.chat-page #content{max-width:none;margin:0;display:flex;flex:1;min-height:0}.chat-page .mode-banner{margin:12px 0 0;padding:7px 12px;flex-shrink:0}.chat-workspace{display:grid;grid-template-columns:280px minmax(0,1fr);width:100%;flex:1;min-height:0;background:#f4f4f4;border:1px solid #dfe4e3;border-radius:12px;overflow:hidden;box-shadow:0 10px 36px #24413607}.chat-sidebar{background:#eceeed;border-right:1px solid #dadfdd;display:flex;flex-direction:column;min-height:0}.chat-list-heading{padding:23px 20px 14px;display:flex;align-items:center;justify-content:space-between}.chat-list-heading h2{font-size:18px;color:#243d36}.chat-list-heading>span{color:#8b9690;font-size:11px}.chat-search-label{display:flex;align-items:center;margin:0 15px 12px;background:#e0e4e1;border:1px solid transparent;border-radius:6px;padding:0 10px;gap:7px}.chat-search-label:focus-within{background:#fff;border-color:#a3bdae}.chat-search-label>span{font-size:21px;color:#8b9690}.chat-search-label input{background:transparent;border:0;outline:none;margin:0;padding:9px 0;font-size:12px;min-width:0}.chat-filters{padding:0 15px 12px;display:flex;gap:8px}.chat-filters button{border:0;background:transparent;padding:5px 13px;border-radius:5px;font-size:11px;color:#7c8c83}.chat-filters button.active{background:#d6e9dc;color:#31784e}.chat-list{flex:1;overflow:auto;overscroll-behavior:contain}.chat-contact{border:0;border-radius:0;background:transparent;display:flex;gap:11px;width:100%;text-align:left;padding:17px 15px;color:#2c3831;align-items:center}.chat-contact:hover{background:#e2e6e3}.chat-contact.selected{background:#d4ded7}.chat-contact-body{flex:1;min-width:0}.chat-contact-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.chat-contact-top strong{font-size:13px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:550}.chat-contact-top time{font-size:9px;color:#8b9690;white-space:nowrap}.chat-contact-preview{display:flex;align-items:center;gap:8px;margin-top:7px;font-size:11px;color:#87928b}.chat-contact-preview>span{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-unread{background:#e36b65;color:white;border-radius:12px;font-size:9px;min-width:17px;padding:1px 5px;line-height:15px;text-align:center}.chat-avatar{width:40px;height:40px;flex:0 0 40px;position:relative;display:grid;place-items:center;border-radius:7px;overflow:hidden;font-size:17px;font-weight:550;letter-spacing:0}.chat-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.chat-avatar img[hidden]{display:none}.avatar-color-0{background:#d9dfed;color:#596c9d}.avatar-color-1{background:#d9e8d3;color:#668b51}.avatar-color-2{background:#e9ddcf;color:#ad8350}.avatar-color-3{background:#e5dce7;color:#93769d}.avatar-color-4{background:#cee2e4;color:#518a8f}.avatar-color-5{background:#183e36;color:#e0f2c9}.avatar-color-6{background:#d8e1dc;color:#526f60}.chat-pane{display:flex;flex-direction:column;min-width:0;min-height:0;background:#f5f5f5;position:relative}.chat-pane>.empty{margin:auto}.chat-header{height:78px;min-height:78px;display:flex;align-items:center;gap:12px;padding:15px 25px;border-bottom:1px solid #e4e6e4;background:#f8f9f8;margin:0}.chat-header .chat-avatar{width:35px;height:35px;flex-basis:35px;font-size:14px}.chat-title{flex:1;min-width:0}.chat-title h2{font-size:16px;font-weight:550;color:#25372f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-title p{font-size:10px;color:#97a19a;margin-top:5px}.chat-member-summary{display:flex;align-items:center;gap:12px}.chat-member-summary .text-button{font-size:11px}.chat-back{display:none;border:0;background:transparent;font-size:29px;color:#587762;padding:0 10px 0 0}.chat-history-wrap{flex:1;min-height:0;position:relative}.chat-messages{height:100%;overflow:auto;overscroll-behavior:contain;padding:20px 27px 28px;outline:none;scrollbar-color:#c9cfcb transparent;scrollbar-width:thin}.chat-history-note{text-align:center;color:#a2aaa4;font-size:10px;margin:2px 0 20px}.chat-history-note button{font-size:11px}.chat-time{text-align:center;margin:19px 0 23px;font-size:10px;color:#a0a6a2}.chat-message{display:flex;align-items:flex-start;gap:10px;margin-bottom:22px}.chat-message-main{max-width:78%;min-width:0}.chat-message-name{font-size:10px;color:#969e98;margin-bottom:7px}.chat-balloon{position:relative;background:#fff;border:1px solid #e8eae8;border-radius:7px;padding:11px 14px;font-size:13px;line-height:1.85;color:#303a34;white-space:pre-wrap;overflow-wrap:anywhere;text-align:left;user-select:text}.chat-balloon::before{content:'';position:absolute;left:-5px;top:13px;width:8px;height:8px;background:inherit;border-bottom:1px solid #e8eae8;border-left:1px solid #e8eae8;transform:rotate(45deg)}.chat-message.outgoing{flex-direction:row-reverse}.chat-message.outgoing .chat-message-main{text-align:right}.chat-message.outgoing .chat-balloon{background:#b4e78e;border-color:#a5d67f}.chat-message.outgoing .chat-balloon::before{left:auto;right:-5px;border:0;border-top:1px solid #a5d67f;border-right:1px solid #a5d67f}.chat-message.automated .chat-balloon{background:#e8eee9;border-color:#dfe6e0}.chat-message.automated .chat-balloon::before{border-color:#dfe6e0}.chat-delivery{font-size:9px;color:#a0aaa2;margin-top:5px}.chat-delivery.attention{color:#c57d49}.chat-delivery .text-button{font-size:10px;padding:2px 5px}.chat-new{position:absolute;bottom:15px;left:50%;transform:translateX(-50%);border:1px solid #d9e5db;border-radius:22px;background:white;box-shadow:0 2px 15px #314c3510;color:#4d8560;font-size:11px;padding:8px 17px;white-space:nowrap}.chat-new[hidden]{display:none}.chat-composer{background:#fff;border-top:1px solid #e1e5e1;padding:12px 23px 15px;flex:0 0 auto}.chat-compose-tools{display:flex;justify-content:space-between;font-size:10px;color:#a1aaa3;padding:2px 0 5px}.chat-compose-tools>span:first-child{color:#83988b}.chat-composer textarea{resize:none;min-height:83px;height:83px;max-height:140px;border:0;outline:0;margin:0;padding:9px 0;font-size:13px;line-height:1.8;box-shadow:none;border-radius:0;background:transparent}.chat-compose-bottom{display:flex;align-items:center;justify-content:space-between;gap:15px}.chat-inline-error{font-size:11px;color:#b97e52;line-height:1.5}.chat-send{background:#e8eee9;color:#4f9462;border:1px solid #dfe7e0;padding:7px 26px;border-radius:5px;font-size:12px;flex:0 0 auto}.chat-send:hover{background:#d7e8dc}.chat-send:disabled{opacity:.55;cursor:wait}.chat-list-empty{padding:35px 20px;text-align:center;color:#99a29c;font-size:12px}
@media(min-width:1550px){.chat-page .page-heading{max-width:none}.chat-workspace{grid-template-columns:320px minmax(0,1fr)}}
@media(max-width:1100px){.chat-workspace{grid-template-columns:240px minmax(0,1fr)}.chat-header{padding:15px 18px}.chat-messages{padding:18px}.chat-message-main{max-width:82%}.chat-compose-tools>span:last-child{font-size:9px}}
@media(max-width:760px){#shell:has(>.chat-page){height:100dvh;min-height:660px;display:flex;flex-direction:column}#shell:has(>.chat-page)>.sidebar{flex-shrink:0}.chat-page{height:auto;min-height:0;flex:1;padding-bottom:12px}.chat-page>header{height:44px}.chat-page .mode-banner{margin-top:8px;padding:6px 10px;font-size:10px}.chat-page .page-heading{margin:10px 0}.chat-page .page-heading p{display:none}.chat-workspace{display:flex}.chat-sidebar{width:100%;border:0}.chat-pane{display:none;width:100%}.chat-workspace.has-chat .chat-sidebar{display:none}.chat-workspace.has-chat .chat-pane{display:flex}.chat-back{display:block}.chat-header{height:70px;min-height:70px;gap:8px;padding:12px}.chat-member-summary .badge{display:none}.chat-message-main{max-width:79%}.chat-title p{font-size:9px}.chat-composer{padding:10px 15px}.chat-compose-tools>span:last-child{display:none}.chat-messages{padding:15px 12px}.chat-contact{padding:17px 20px}}

/* 客服未读：只在真正查看后清除，头像右上角保留条数。 */
#ticket-count{background:#ed5055;color:#fff;border-radius:12px;min-width:20px;padding:2px 6px;text-align:center;font-size:11px;line-height:16px}
.chat-avatar-wrap{position:relative;display:block;flex:0 0 40px;width:40px;height:40px}
.chat-avatar-wrap>.chat-unread{position:absolute;z-index:2;top:-7px;right:-8px;border:2px solid #eceeed;min-width:20px;line-height:15px;padding:0 4px;font-size:10px;background:#ed5055;white-space:nowrap}
.chat-contact.selected .chat-unread{border-color:#d4ded7}

/* Direct customer conversation stands apart from automated updates. */
.chat-message.personal .chat-balloon{background:#e6f1ff;border-color:#b6d3f5;color:#203e60}.chat-message.personal .chat-balloon::before{border-color:#b6d3f5}.chat-message.personal .chat-message-name{color:#426b9b}.chat-personal-label{display:inline-block;margin-left:8px;padding:1px 6px;border-radius:4px;background:#d6e8ff;color:#24558f;font-size:10px;font-weight:600;line-height:1.6}

/* 会员备注：只给后台看，跟着会员档案走。 */
.member-note-form{margin:16px 0 4px;padding:15px 16px 13px;background:#fbfcf7;border:1px solid #e6ece2;border-radius:8px}
.member-note-form label{margin:0 0 13px;color:#5f7568}
.member-note-form textarea{min-height:72px;margin-top:8px;background:#fff}
.member-note-form input{background:#fff}
.member-note-form label:last-of-type{margin-bottom:0}
.member-note-bar{display:flex;align-items:center;gap:10px;margin-top:9px;font-size:10px;color:#9aa7a0}
.member-note-bar .help{margin:0;flex:1}
.member-note-bar .secondary{padding:7px 14px;font-size:11px}
#note-error:empty{display:none}
.member-note-preview{max-width:250px;margin-top:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:#7d8f84}
.chat-note-chip{display:inline-block;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:4px 8px;border-radius:5px;background:#f7f1df;color:#8a7136;font-size:10px;line-height:1.3}
@media(max-width:760px){.chat-note-chip{display:none}}

/* 微信式未读红标：只统计客户主动私聊，点击跳到第一条未读。 */
.chat-heading-main{display:flex;align-items:center;gap:9px;min-width:0}
.chat-unread-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border:0;border-radius:10px;background:#ed5055;color:#fff;font:600 11px/20px -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;letter-spacing:0;cursor:pointer;box-shadow:0 2px 8px #ed505540;transition:transform .15s ease,background .15s ease}
.chat-unread-badge[hidden]{display:none}
.chat-unread-badge:hover{background:#df464b;transform:translateY(-1px)}
.chat-unread-badge:focus-visible{outline:2px solid #243d36;outline-offset:2px}
.chat-new-divider{display:flex;align-items:center;gap:10px;margin:12px 0 8px;color:#8b9690;font-size:10px;line-height:1}
.chat-new-divider::before,.chat-new-divider::after{content:'';flex:1;height:1px;background:#d9dfdc}
.chat-message-focus .chat-balloon{animation:chat-focus-flash 1.8s ease}
@keyframes chat-focus-flash{0%,55%{box-shadow:0 0 0 3px #ed505540}100%{box-shadow:none}}

/* 通道总控：一个后台多个通道，卡片式分区。 */
.channel-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:16px;margin-bottom:18px}
.channel-card{position:relative;display:flex;flex-direction:column;gap:12px;padding:20px;border:1px solid #e3e8e4;border-radius:14px;background:#fff;box-shadow:0 8px 24px #243d3608}
.channel-card.current{border-color:#243d36;box-shadow:0 10px 28px #243d3614}
.channel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.channel-head h3{margin:4px 0 0;font-size:17px;color:#1f332c}
.channel-metrics{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;padding:12px 0;border-top:1px solid #eef1ef;border-bottom:1px solid #eef1ef}
.channel-metric{display:flex;flex-direction:column;gap:3px;min-width:0}
.channel-metric small{font-size:9px;color:#93a29a;letter-spacing:.02em}
.channel-metric strong{font-size:13px;color:#1f332c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.channel-metric span{font-size:9px;color:#a8b3ad;min-height:11px}
.channel-note{margin:0;font-size:11px;line-height:1.65;color:#77857d}
.channel-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto}
.channel-foot .help{margin:0}
@media(max-width:760px){.channel-metrics{grid-template-columns:repeat(2,1fr)}}
.section-head{display:flex;align-items:baseline;gap:10px;margin:4px 0 14px}
.section-head h2{font-size:15px;color:#1f332c}
.section-head span{font-size:10px;color:#93a29a}
.section-head+.channel-grid{margin-bottom:26px}
.dist-card{background:linear-gradient(180deg,#fbfdfb,#fff 46%)}
.dist-head-badges{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.dist-money{display:flex;flex-direction:column;gap:10px;padding:13px 14px;border:1px solid #e7efe9;border-radius:11px;background:#f7fbf8}
.dist-money-head{display:flex;align-items:baseline;gap:8px;font-size:10px;color:#86948c}
.dist-money-head strong{font-size:19px;color:#1f332c;font-variant-numeric:tabular-nums}
.dist-usd{font-size:10px;color:#a3ae9f}
.dist-split{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.dist-split.four{grid-template-columns:repeat(4,1fr)}
.dist-split>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.dist-split small{font-size:9px;color:#93a29a}
.dist-split strong{font-size:13.5px;line-height:1.35;color:#23382f;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.dist-split em{font-style:normal;font-size:9px;line-height:1.45;color:#a8b3ad}
.dist-gap.owe{color:#b3625c}.dist-gap.over{color:#a27229}.dist-gap.ok{color:#3a8060}
.dist-paid-line{font-size:9px;color:#93a29a;margin-top:-2px}
.dist-total-line{font-size:9px;color:#93a29a;border-top:1px dashed #e3ece5;padding-top:9px}
.dist-total-line b{font-weight:600}
.dist-total-line b.owe{color:#b3625c}.dist-total-line b.over{color:#a27229}.dist-total-line b.ok{color:#3a8060}
.dist-warn{margin:0;font-size:10px;line-height:1.7;color:#a27229;background:#fff8ea;border:1px solid #f2e3c4;border-radius:8px;padding:8px 10px}
.dist-actions{display:flex;gap:2px;align-items:center}
.dist-actions .text-button{font-size:10px;padding:6px 4px}
.dist-empty{text-align:center;background:#fff;border:1px dashed #d9e4db;border-radius:14px;padding:26px 22px;color:#87978e}
.dist-empty h3{font-size:14px;color:#2a3f35;margin-bottom:8px}
.dist-empty p{font-size:11px;line-height:1.8;max-width:620px;margin:0 auto}
.dist-config{display:block;text-align:left;white-space:pre-wrap;word-break:break-all;font-size:10px;line-height:1.7;background:#f6faf7;border:1px solid #e6efe8;border-radius:8px;padding:10px 12px;margin-top:14px;color:#4c6559;font-family:ui-monospace,SFMono-Regular,monospace}
.dist-detail-grid{margin:2px 0 12px}
.dist-detail-note{font-size:10px;line-height:1.8;color:#8c9c99;margin-bottom:14px}
.dist-table-title{font-size:12px;margin:18px 0 8px;color:#2a3f35}
.dist-table table{font-size:11px}
.dist-table th,.dist-table td{padding:9px 8px}
.dist-tag{display:inline-block;font-size:9px;border-radius:4px;padding:3px 6px;background:#eef2f4;color:#7a8b93}
.dist-tag.ok{background:#e8f4eb;color:#3a8060}
.dist-tag.owe{background:#fbeceb;color:#b3625c}
.dist-dialog-foot{margin-top:18px}
@media(max-width:760px){.dist-split,.dist-split.four{grid-template-columns:repeat(2,1fr)}.section-head{margin-top:14px}}
.label-hint{float:right;font-size:9px;color:#a8b3ad;font-weight:400}
@media(max-width:760px){.label-hint{display:none}}
