:root{--blue:#0948ed;--navy:#101d38;--muted:#69758c;--line:#dfe5ee;--soft:#f4f7fb;--green:#17b26a;font-family:Inter,"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:var(--navy);font-size:14px}*{box-sizing:border-box}body{margin:0;background:#fff}button,input,textarea,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #8baaff;outline-offset:3px}button,.button{border:1px solid var(--line);border-radius:8px;padding:10px 16px;background:white;color:var(--navy);text-decoration:none;display:inline-flex;gap:8px;align-items:center;justify-content:center}button:hover,.button:hover{background:var(--soft)}.primary{background:var(--blue);color:#fff;border-color:var(--blue)}.primary:hover{background:#0036c8}.danger{color:#cc3045}.icon{width:22px;height:22px;flex-shrink:0}aside{width:220px;position:fixed;inset:0 auto 0 0;border-right:1px solid var(--line);padding:24px 12px;display:flex;flex-direction:column;background:white;z-index:5}.brand{display:flex;align-items:center;gap:12px;font-weight:800;font-size:26px;padding:0 16px 38px}.brand .icon{width:33px;height:33px;color:var(--blue)}nav{display:grid;gap:10px}nav button{border:0;justify-content:flex-start;padding:14px 18px;font-size:16px;font-weight:500}nav button.active{color:var(--blue);background:#eaf0ff;font-weight:700}.account{margin-top:auto;border-top:1px solid var(--line);padding:20px 12px 0;display:flex;align-items:center;justify-content:space-between;gap:8px}.account button{padding:5px 8px;font-size:12px}main{margin-left:220px}header{height:70px;border-bottom:1px solid var(--line);padding:0 28px;display:flex;align-items:center;justify-content:space-between}header .button{color:var(--blue);border-color:var(--blue)}.mobile-menu{border:0;padding:4px;color:var(--muted)}.content{max-width:1200px;margin:auto;padding:38px 48px 50px}h1{font-size:30px;line-height:1.4;margin:0 0 10px;letter-spacing:-.8px}h2{font-size:20px;margin:0 0 20px}h3{font-size:16px;margin:0 0 12px}p{line-height:1.7}.subtitle{color:var(--muted);margin:0 0 32px;font-size:16px}.panel{border:1px solid #d1d9e6;border-radius:10px;padding:26px;margin-bottom:28px}.panel-title{padding-bottom:20px;border-bottom:1px solid var(--line)}.step{display:flex;gap:12px;margin:22px 0 12px;align-items:center;font-size:17px;font-weight:650}.step span{display:grid;place-items:center;background:var(--blue);color:white;width:30px;height:30px;border-radius:50%;font-size:16px}.code-row{display:flex;gap:12px;margin-left:42px;align-items:stretch}pre{font:13px/1.6 Consolas,monospace;white-space:pre-wrap;word-break:break-all;background:#eef2f7;padding:16px 18px;border-radius:8px;margin:0;flex:1;min-width:0;color:#15203b}.step-copy{margin-left:42px;color:#4c5870}code{font-family:Consolas,monospace;background:#eef2f7;padding:3px 7px;border-radius:5px}.connection{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f0fbf6;border:1px solid #b8e4cf;border-radius:8px;padding:14px 18px;margin-top:26px}.connection button{border:0;background:none;color:var(--blue);padding:4px}.dot{width:9px;height:9px;background:var(--green);display:inline-block;border-radius:50%;margin-right:10px}.dot.off{background:#a4acba}.preview{width:100%;height:300px;border:1px solid var(--line);border-radius:10px;background:#eef2f7}.field{display:grid;gap:8px;margin-bottom:20px}.field span{font-size:13px;color:var(--muted)}input,textarea,select{border:1px solid #ced7e4;border-radius:7px;padding:11px 12px;background:#fff;color:var(--navy);width:100%;outline:none}input:focus,textarea:focus,select:focus{border-color:var(--blue);box-shadow:0 0 0 3px #0948ed12}textarea{resize:vertical;line-height:1.6}input[type=checkbox]{width:17px;height:17px;accent-color:var(--blue)}input[type=color]{height:44px;width:76px;padding:4px}.row{display:flex;gap:20px}.row>.field{flex:1;min-width:0}.check{display:flex;align-items:flex-start;gap:10px;margin:16px 0;line-height:1.6}.note{font-size:13px;color:var(--muted);line-height:1.8}.auth{max-width:440px;margin:8vh auto;padding:32px}.auth .brand{padding:0 0 30px}.auth h1{font-size:25px}.auth button{width:100%}.error{color:#cb3049;min-height:20px;line-height:1.7}.loading{padding:40px;text-align:center;color:var(--muted)}#toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);padding:13px 22px;background:#14233f;color:white;box-shadow:0 8px 30px #001e4b25;border-radius:9px;z-index:100;display:none;max-width:90vw}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:22px}.toolbar h1{margin:0}.toolbar input{max-width:260px}.inbox{display:grid;grid-template-columns:280px minmax(0,1fr);border:1px solid var(--line);border-radius:10px;height:calc(100dvh - 205px);min-height:460px;overflow:hidden}.chat-list{border-right:1px solid var(--line);overflow:auto}.chat-item{width:100%;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:18px;text-align:left;display:block;position:relative}.chat-item.active{background:#eef3ff;border-left:3px solid var(--blue)}.chat-item strong{font-size:14px}.chat-item p{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:8px 0 3px;color:var(--muted)}.chat-item small{color:var(--muted);font-size:11px}.badge{background:var(--blue);color:white;border-radius:20px;padding:2px 7px;margin-left:8px;font-size:11px}.chat-pane{min-width:0;display:flex;flex-direction:column;background:#fafbfd}.chat-head{padding:16px 20px;background:white;border-bottom:1px solid var(--line)}.chat-head .row{align-items:center;justify-content:space-between;gap:10px}.chat-head button{padding:6px 10px;font-size:12px}.visitor-info{font-size:12px;color:var(--muted);margin-top:8px;line-height:1.7;overflow-wrap:anywhere}.visitor-info a{color:var(--blue)}.messages{flex:1;min-height:0;overflow:auto;padding:20px}.msg{max-width:80%;width:fit-content;margin-bottom:18px}.msg p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;background:white;border:1px solid var(--line);border-radius:0 12px 12px 12px;padding:11px 14px}.msg.agent{margin-left:auto}.msg.agent p{background:var(--blue);border-color:var(--blue);color:white;border-radius:12px 0 12px 12px}.msg small{display:block;color:var(--muted);font-size:11px;margin-top:5px}.msg.agent small{text-align:right}.composer{background:white;padding:14px 18px;border-top:1px solid var(--line)}.composer textarea{min-height:76px;max-height:160px}.composer-foot{display:flex;align-items:center;justify-content:space-between;margin-top:8px;color:var(--muted);font-size:11px}.empty{display:grid;place-content:center;text-align:center;flex:1;color:var(--muted);padding:40px}.empty .icon{margin:auto;width:42px;height:42px;color:#94a8ce}.stats{display:flex;gap:40px;flex-wrap:wrap;margin:28px 0}.stat strong{display:block;font-size:34px;margin-bottom:6px}.stat span{color:var(--muted)}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}th{color:var(--muted);font-weight:500;background:#f8fafd}th,td{padding:14px 12px;border-bottom:1px solid var(--line);vertical-align:top}td .url{display:block;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--blue)}.chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.bars{display:grid;gap:14px}.bar-label{display:flex;justify-content:space-between;font-size:12px;margin-bottom:6px;overflow-wrap:anywhere}.track{height:8px;background:#edf2f9;border-radius:4px}.track div{height:8px;border-radius:4px;background:var(--blue)}.map{width:100%;height:230px;background:#f7f9fc;border-radius:8px}.map text{font:11px sans-serif;fill:#708198}.map circle{fill:#0948ed;stroke:white;stroke-width:1.5}.map line{stroke:#dde6f0;stroke-width:.5}.map ellipse{fill:#e2e9f2}.header-actions{display:flex;gap:10px;align-items:center}.online-label{color:var(--muted);font-size:12px}.small-title{display:flex;justify-content:space-between;align-items:center;gap:10px}.small-title h2{margin:0}.hidden{display:none!important}@media(min-width:900px){.mobile-menu{pointer-events:none}}@media(max-width:1100px){.content{padding:30px 26px}.inbox{grid-template-columns:240px minmax(0,1fr)}}@media(max-width:800px){aside{transform:translateX(-100%);box-shadow:6px 0 28px #182a481a;transition:transform .2s}body.menu aside{transform:translateX(0)}main{margin-left:0}header{padding:0 18px;height:62px}.content{padding:24px 18px}h1{font-size:24px}.subtitle{font-size:14px}.panel{padding:20px}.code-row{display:block;margin-left:0}.code-row button{margin-top:12px;width:100%}.step-copy{margin-left:0}.preview{height:280px}.connection{align-items:flex-start;flex-direction:column}.row{flex-wrap:wrap;gap:12px}.row>.field{min-width:160px}.chart-grid{grid-template-columns:1fr}.stats{gap:28px}.stat strong{font-size:28px}.toolbar{flex-wrap:wrap}.inbox{height:calc(100dvh - 190px);grid-template-columns:150px minmax(0,1fr)}.chat-item{padding:12px 10px}.chat-item strong{font-size:12px}.chat-head{padding:12px}.messages{padding:12px}.msg{max-width:94%}.composer{padding:10px}.chat-head .row{display:block}.chat-head .row>div:last-child{margin-top:8px}.visitor-info{max-height:80px;overflow:auto}.auth{margin:3vh auto;padding:26px}.online-label{display:none}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.alert-controls{display:flex;gap:8px;flex-wrap:wrap}.alert-controls button{font-size:12px;white-space:nowrap}#alertStatus{margin:-8px 0 16px}.toolbar{flex-wrap:wrap}.inbox{height:calc(100dvh - 245px)}@media(max-width:800px){.alert-controls{width:100%}.alert-controls button{flex:1;padding:10px 8px}.inbox{height:65dvh;min-height:440px}.toolbar input{flex:1;min-width:140px}}
.inbox{grid-template-rows:minmax(0,1fr)}.chat-pane,.chat-list{min-height:0}.chat-pane{overflow:hidden}.chat-head,.composer{flex-shrink:0}
