:root{font-family:Inter,"Microsoft YaHei",system-ui,sans-serif;color:#182230;background:#f3f6fb}*{box-sizing:border-box}body{margin:0;min-height:100vh}.loading{padding:50px;text-align:center;color:#6b7788}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 20% 15%,#dcecff 0,transparent 34%),#f4f7fb}.login-card{width:min(420px,100%);background:white;border:1px solid #e6ebf2;border-radius:20px;padding:34px;box-shadow:0 18px 60px #16345b14}.brand{font-weight:750;font-size:20px}.muted{color:#748094}.eyebrow{font-size:12px;letter-spacing:1.4px;color:#6880a2;margin:8px 0}.login-card h1{font-size:25px;margin:10px 0 8px}.field{display:grid;gap:7px;margin:15px 0}.field label{font-size:13px;color:#475467;font-weight:600}.field input,.field select{width:100%;border:1px solid #d9e0e9;border-radius:10px;padding:11px 12px;font:inherit;outline:none;background:white}.field input:focus,.field select:focus{border-color:#4b81ef;box-shadow:0 0 0 3px #4b81ef1c}button{border:0;border-radius:10px;background:#2765d9;color:white;font:inherit;font-weight:650;padding:10px 15px;cursor:pointer}button:hover{background:#1c54bd}button.secondary{background:#eaf0f8;color:#344054}button.secondary:hover{background:#dce6f2}button.danger{background:#b93838}button:disabled{opacity:.55;cursor:default}.full{width:100%;margin-top:12px}.error{color:#b42318;background:#fef3f2;padding:10px 12px;border-radius:9px;font-size:13px;margin:10px 0}.success{color:#126344;background:#ecfdf3;padding:12px;border-radius:10px;font-size:13px;margin:14px 0;overflow-wrap:anywhere}.app-shell{min-height:100vh}.topbar{height:66px;background:white;border-bottom:1px solid #e7ebf1;display:flex;align-items:center;justify-content:space-between;padding:0 26px;position:sticky;top:0;z-index:3}.topbar-right{display:flex;align-items:center;gap:14px}.badge{display:inline-flex;padding:4px 9px;border-radius:999px;background:#edf4ff;color:#2455a5;font-size:12px;font-weight:650}.layout{max-width:1400px;margin:auto;padding:26px}.page-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px}.page-head h1{font-size:23px;margin:0 0 6px}.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:17px}.card{background:white;border:1px solid #e6ebf2;border-radius:14px;padding:19px;box-shadow:0 2px 5px #18223005}.span-12{grid-column:span 12}.card h2{font-size:16px;margin:0 0 15px}.inline-form{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.inline-form .field{flex:1;min-width:170px;margin:0}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px}th,td{text-align:left;padding:12px 10px;border-bottom:1px solid #edf0f4;white-space:nowrap}th{color:#667085;font-weight:600}.empty{padding:28px;text-align:center;color:#8490a1}.creds{white-space:pre-wrap;font:inherit}.two-col{display:grid;grid-template-columns:minmax(270px,360px) 1fr;gap:16px;min-height:500px}.conversation-list{max-height:64vh;overflow:auto}.conversation-item{padding:13px;border-bottom:1px solid #edf0f4;cursor:pointer}.conversation-item:hover,.conversation-item.selected{background:#f0f6ff}.conversation-title{display:flex;justify-content:space-between;gap:10px;font-size:14px;font-weight:650}.conversation-preview{font-size:12px;color:#7c8798;margin-top:7px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-open{color:#a15c00}.status-active{color:#2365cc}.status-closed{color:#818a98}.chat-panel{display:flex;flex-direction:column;min-height:500px}.chat-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #edf0f4;padding-bottom:13px;gap:10px}.messages{flex:1;overflow:auto;display:flex;flex-direction:column;gap:10px;padding:16px 3px}.bubble{max-width:78%;padding:10px 12px;border-radius:12px;background:#f0f3f8;align-self:flex-start;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.agent{background:#e5efff;align-self:flex-end}.bubble small{display:block;color:#7e8794;font-size:10px;margin-top:5px}.reply-form{display:flex;gap:9px;border-top:1px solid #edf0f4;padding-top:13px}.reply-form input{flex:1;min-width:0;border:1px solid #d9e0e9;border-radius:10px;padding:11px;font:inherit}.settings-note{font-size:12px;color:#788498;line-height:1.6}.mini-url{color:#1e5fc7;word-break:break-all}.section-gap{margin-top:18px}.chat-page{height:100dvh;max-width:850px;margin:auto;background:white;display:flex;flex-direction:column;padding:0 18px}.chat-page header{padding:17px 2px;border-bottom:1px solid #edf0f4;display:flex;justify-content:space-between;align-items:center}.chat-page .messages{padding:18px 2px}.chat-page #customerForm{display:flex;gap:10px;padding:12px 0 max(14px,env(safe-area-inset-bottom));border-top:1px solid #edf0f4}.chat-page #customerInput{flex:1;min-width:0;border:1px solid #d9e0e9;border-radius:10px;padding:12px;font:inherit}.chat-page .bubble.agent{align-self:flex-start;background:#f0f3f8}.chat-page .bubble:not(.agent){align-self:flex-end;background:#e5efff}@media(max-width:800px){.layout{padding:15px}.topbar{padding:0 15px}.two-col{grid-template-columns:1fr}.conversation-list{max-height:280px}.chat-panel{min-height:440px}.page-head{gap:15px;flex-direction:column}}