:root{color-scheme:light;--ink:#20362f;--muted:#83918c;--green:#28775c;--green-dark:#1e6049;--line:#e7ece9;--pale:#eef5f0;--bg:#f5f7f5;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:14px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}button,input,textarea,select{font:inherit}button{cursor:pointer;transition:background .15s,color .15s}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #549b7c;outline-offset:2px}[hidden]{display:none!important}h1,h2,h3,p{margin:0}input,textarea,select{color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:8px}textarea{resize:vertical;line-height:1.7}input::placeholder,textarea::placeholder{color:#a2aca8}.primary{border:0;border-radius:8px;background:var(--green);color:white;padding:11px 24px;font-weight:600}.primary:hover:not(:disabled){background:var(--green-dark)}.secondary{border:1px solid #cfded5;border-radius:8px;background:#fff;color:var(--green);padding:10px 16px;font-weight:600}.secondary:hover{background:var(--pale)}.quiet,.icon-button{background:transparent;border:0;color:var(--muted);padding:8px}.icon-button{font-size:24px;line-height:1;border-radius:7px}.icon-button:hover,.quiet:hover{background:var(--pale);color:var(--green)}.badge,.subtle-chip{display:inline-block;background:var(--pale);color:#638b74;font-size:11px;padding:4px 8px;border-radius:5px;font-weight:500}.muted{color:var(--muted);line-height:1.7}.eyebrow{font-size:10px;letter-spacing:2px;color:#789083;font-weight:600}.brand-symbol{width:48px;height:48px;background:var(--green);color:#fff;border-radius:14px;display:grid;place-items:center;font-size:25px;font-weight:600}.brand-symbol.small{width:32px;height:32px;font-size:18px;border-radius:9px}.login-screen{min-height:100dvh;display:grid;place-items:center;background:radial-gradient(ellipse at 60% 35%,#e8f1e9,transparent 60%)}.login-card{width:min(440px,calc(100% - 40px));padding:42px;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 16px 60px #253d3010}.login-card .eyebrow{margin:25px 0 10px}.login-card h1{font-size:26px;letter-spacing:-.5px;margin-bottom:12px}.login-card label{display:block;margin-top:30px;font-size:12px;font-weight:600}.login-card input{padding:13px;width:100%;margin:9px 0 15px}.login-card .primary{width:100%;display:flex;justify-content:space-between}.login-foot{color:#9aa69f;font-size:11px;line-height:1.9;margin-top:24px}#login-error{color:#b85845;font-size:12px;margin-top:12px}#app{height:100dvh;display:flex;flex-direction:column}.topbar{height:64px;flex:none;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 25px;gap:15px}.brand{display:flex;gap:12px;align-items:center}.brand strong{font-size:19px;letter-spacing:.5px}.top-actions{display:flex;gap:20px;align-items:center;font-size:12px}.mode-pill{display:flex;align-items:center;gap:6px;color:#608373}.mode-pill i{width:6px;height:6px;border-radius:50%;background:#70a68b}.connection-button{display:flex;align-items:center;gap:7px;border:1px solid var(--line);background:#fff;border-radius:7px;padding:7px 10px;color:#75897d;font-size:12px}.dot{display:inline-block;vertical-align:middle;width:6px;height:6px;background:#b9c4bf;border-radius:50%;margin-right:3px}.dot.online{background:#61a87e}.dot.warning{background:#d4a556}.demo-banner{background:#fff2d9;color:#95702b;text-align:center;padding:8px;font-size:12px;flex:none}.workspace{display:grid;grid-template-columns:300px minmax(300px,1fr) 280px;flex:1;min-height:0}.customer-panel{background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0}.panel-title{padding:25px 22px 18px;display:flex;align-items:center;justify-content:space-between}.panel-title h1{font-size:16px}.panel-title h1 span{font-size:12px;color:#97a99c;font-weight:400;margin-left:5px}.panel-caption{font-size:10px;color:#9eadA4}.search-wrap{margin:0 18px 16px;position:relative}.search-wrap>span{position:absolute;top:9px;left:12px;color:#9aa69f;font-size:21px}.search-wrap input{width:100%;background:#f7f9f7;border:0;padding:12px 10px 12px 37px;font-size:12px}.filters{padding:0 18px 16px;display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--line)}.filter{border:0;background:transparent;color:#8d9b92;padding:7px 10px;border-radius:6px;font-size:12px}.filter.active{background:var(--pale);color:var(--green);font-weight:600}.filter span{font-size:10px;margin-left:3px}#tag-filter{margin-left:auto;min-width:0;max-width:95px;border:0;font-size:11px;color:#8d9b92;padding:6px;background:transparent}.customer-list{flex:1;min-height:0;overflow:auto;padding:8px}.customer-row{width:100%;display:flex;align-items:center;gap:11px;text-align:left;border:0;border-radius:9px;background:#fff;padding:15px 11px;position:relative;margin:2px 0}.customer-row:hover{background:#f6f9f6}.customer-row.active{background:#edf4ee}.avatar{flex:none;width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:#e8eee7;color:#64866d;font-weight:600;font-size:12px}.customer-row:nth-child(3n+2) .avatar{background:#f0eae0;color:#988b64}.customer-row:nth-child(3n) .avatar{background:#e7ebef;color:#6d8092}.customer-copy{flex:1;min-width:0}.customer-line{display:flex;justify-content:space-between;align-items:center;gap:5px;margin-bottom:6px}.customer-name{font-weight:600;font-size:13px}.customer-time{font-size:10px;color:#a1aca5;white-space:nowrap}.customer-preview{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;color:#8c9c91;line-height:1.5;padding-right:18px}.unread-badge{position:absolute;right:15px;bottom:16px;background:var(--green);color:#fff;border-radius:8px;padding:1px 5px;min-width:15px;font-size:10px;text-align:center}.customer-tags{display:flex;gap:4px;margin-top:6px}.customer-tags span{font-size:9px;color:#82a08a;border:1px solid #dce8de;border-radius:3px;padding:1px 4px}.list-footer{flex:none;font-size:10px;color:#a4b1a7;padding:15px 20px;border-top:1px solid var(--line)}.lock-icon{color:#87a18e;margin-right:6px}.chat-panel{min-width:0;min-height:0;position:relative;background:#f6f8f5}.empty-chat{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center;padding:30px}.empty-symbol{font-size:46px;color:#9dbba7;margin-bottom:20px}.empty-chat h2{font-size:21px;color:#658572;font-weight:500;margin-bottom:14px}.empty-chat p{font-size:13px;color:#9aab9e;line-height:1.9;margin-bottom:24px}.chat{height:100%;display:flex;flex-direction:column;min-height:0}.chat-header{height:80px;flex:none;border-bottom:1px solid var(--line);background:#ffffffc0;display:flex;align-items:center;gap:12px;padding:15px 28px}.chat-identity{flex:1;min-width:0}.chat-identity h2{font-size:15px}.chat-identity p{font-size:10px;color:#95a699;margin-top:6px}.manual-label{font-size:11px;color:#a0afa4}.chat-notice{background:#faf1dc;color:#9b803d;line-height:1.7;font-size:11px;padding:8px 24px;flex:none}.message-scroll{flex:1;overflow:auto;min-height:0;padding:28px;scroll-behavior:auto}.message-date{text-align:center;color:#a5b1a7;font-size:10px;margin:6px 0 25px}.message-row{display:flex;align-items:flex-start;gap:10px;margin-bottom:24px}.message-row.out{flex-direction:row-reverse}.message-row .avatar{width:30px;height:30px;font-size:10px;border-radius:9px}.message-row.out .avatar{background:#dbe9df;color:#4d7d60}.message-stack{max-width:82%;min-width:50px}.message-meta{display:flex;gap:8px;font-size:9px;color:#a6b1a8;margin:0 1px 7px}.out .message-meta{justify-content:flex-end}.message-bubble{padding:12px 15px;border-radius:0 12px 12px 12px;background:white;color:#4e6255;border:1px solid #eaf0e9;line-height:1.8;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.out .message-bubble{background:#dfeee1;border:1px solid #dae8dc;border-radius:12px 0 12px 12px;color:#3e6550}.message-status{font-size:9px;color:#9baa9b;margin-top:6px;text-align:right;line-height:1.6}.message-status.warning{color:#b0853e}.message-status button{font-size:10px;border:0;background:none;color:var(--green);text-decoration:underline;margin-left:7px;padding:0}.older{display:block;margin:0 auto 20px;border:1px solid var(--line);border-radius:20px;background:#fff;color:#8e9e92;padding:5px 14px;font-size:10px}.composer{background:#fff;flex:none;padding:15px 24px 18px;border-top:1px solid var(--line)}.composer-top{display:flex;justify-content:space-between;font-size:10px;color:#a1afa5;margin-bottom:8px}.composer-top span:first-child{color:#77937e}.composer textarea{width:100%;border:0;resize:none;min-height:65px;max-height:130px;padding:4px 0;font-size:13px;outline-offset:4px}.composer-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:10px;gap:10px}.send-hint{font-size:10px;color:#a5b1a7}.send-hint span{margin-left:12px;color:#bbc3bd}.composer .primary{font-size:12px;padding:9px 22px}.composer .primary span{margin-left:16px}.details-panel{background:#fff;border-left:1px solid var(--line);padding:0 22px;overflow:auto}.details-header{display:flex;align-items:center;justify-content:space-between;height:73px;border-bottom:1px solid var(--line);margin-bottom:10px}.details-header h2{font-size:13px}.details-header .icon-button{display:none}.details-empty{text-align:center;padding:50px 0;font-size:12px;color:#a2aea5}.profile-card{text-align:center;padding:20px 0 30px}.avatar.large{width:60px;height:60px;border-radius:18px;font-size:19px;margin:0 auto 13px}.profile-card h3{font-size:15px;margin-bottom:7px}.profile-card p{font-size:10px;margin-bottom:10px}#profile-form label{display:block;font-weight:600;font-size:11px;margin:16px 0 9px;color:#69816f}#profile-form textarea,#profile-form input{width:100%;padding:10px;font-size:11px;background:#fbfcfa}#profile-form textarea{min-height:110px}.field-help{font-size:10px;color:#abb5ac;margin-top:8px;line-height:1.7}#save-profile{font-size:11px;width:100%;margin-top:17px}.isolation-note{padding-top:22px;margin:25px 0;border-top:1px solid var(--line);font-size:10px;color:#9fafA3;line-height:1.8}.isolation-note strong{font-weight:500;color:#829989}.isolation-note p{margin-top:6px}.statusbar{height:30px;flex:none;display:flex;justify-content:space-between;align-items:center;font-size:9px;padding:0 22px;border-top:1px solid var(--line);background:#fff;color:#a2afa5}.statusbar .dot{width:5px;height:5px}.mobile-only{display:none}.empty-list{padding:40px 15px;text-align:center;color:#9aa69f;font-size:12px;line-height:1.8}dialog{border:1px solid var(--line);border-radius:16px;padding:26px;width:min(460px,calc(100% - 30px));box-shadow:0 30px 90px #142e2430;color:var(--ink)}dialog::backdrop{background:#203d3244;backdrop-filter:blur(3px)}dialog header{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}dialog h2{font-size:21px;margin-top:8px}.connection-row{display:flex;justify-content:space-between;gap:20px;font-size:12px;padding:11px 0;border-bottom:1px solid var(--line)}.connection-row span{color:#7c9785}.connection-row span.problem{color:#b78b46}.connection-note{color:#97a79b;font-size:11px;line-height:1.8;margin:20px 0}dialog .secondary{width:100%;font-size:12px}.toast{position:fixed;bottom:48px;left:50%;transform:translateX(-50%);background:#2e493c;color:white;box-shadow:0 8px 30px #203d3220;border-radius:10px;padding:12px 20px;z-index:20;max-width:calc(100% - 30px);font-size:12px;line-height:1.6}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:1190px){.workspace{grid-template-columns:275px minmax(280px,1fr)}.details-panel{display:none;position:fixed;right:0;top:64px;bottom:30px;width:290px;z-index:5;box-shadow:-12px 0 30px #203d3210}.workspace.details-open .details-panel{display:block}.details-header .icon-button{display:block}}
@media(max-width:620px), (max-width:960px) and (max-height:500px) and (pointer:coarse){.topbar{height:56px;padding:0 14px}.brand{gap:8px}.brand strong{font-size:17px}.brand .badge{font-size:9px}.brand-symbol.small{height:28px;width:28px;font-size:16px}.top-actions{gap:5px}.mode-pill{display:none}.connection-button{border:0;font-size:10px;padding:5px}.quiet{font-size:10px;padding:5px}.workspace{display:block;position:relative}.customer-panel{height:100%;border:0}.panel-title{padding:22px 20px 17px}.chat-panel{display:none;height:100%}.workspace.chat-open .customer-panel{display:none}.workspace.chat-open .chat-panel{display:block}.mobile-only{display:block}.chat-header{height:67px;padding:10px 12px;gap:9px}.manual-label{display:none}.chat-identity h2{font-size:14px}.chat-identity p{font-size:10px}.chat-header .avatar{width:34px;height:34px}.message-scroll{padding:20px 15px}.message-stack{max-width:84%}.message-bubble{font-size:13px;padding:10px 12px}.message-row{gap:8px}.message-row .avatar{width:27px;height:27px}.message-meta{font-size:9px}.composer{padding:12px 15px max(12px,env(safe-area-inset-bottom))}.composer textarea{font-size:16px;min-height:65px}.composer-top{font-size:10px}.send-hint{font-size:9px}.send-hint span{display:none}.statusbar{padding:0 13px;font-size:8px;height:26px}.statusbar>span:last-child{display:none}.details-panel{top:56px;bottom:26px;width:100%;box-shadow:none;padding:0 25px}.demo-banner{font-size:10px;padding:6px}.workspace.details-open .details-panel{display:block}.chat-notice{padding:7px 15px;font-size:10px}.login-card{padding:30px}.login-card h1{font-size:23px}.customer-row{padding:16px 12px}.customer-preview{font-size:12px}.customer-name{font-size:14px}.customer-time{font-size:11px}.customer-row .avatar{width:43px;height:43px}}

.customer-preview{display:block}.recovery-row{background:#faf1dc;padding:0 18px 5px}.recovery-row button{font-size:11px;color:#8e763d}

.channel-link{font-size:12px;text-decoration:none;color:#386a52;white-space:nowrap;padding:8px}.topbar .brand strong{white-space:nowrap}@media(max-width:390px){.brand strong{font-size:13px}.channel-link{font-size:11px;padding:4px}.top-actions{gap:4px}.topbar{padding:10px 8px}}
.delivery-review{flex:none;margin:0;background:#fff5e3;border-block:1px solid #eed8ac;padding:12px 24px;color:#755820;font-size:12px;line-height:1.7}.delivery-review strong{display:block;font-size:13px}.delivery-review p{margin:4px 0}.delivery-review label{display:flex;align-items:flex-start;gap:8px;margin:8px 0;cursor:pointer}.delivery-review input{flex:none;margin:4px 0}.delivery-review .secondary{font-size:12px;max-width:100%;white-space:normal}.delivery-review .secondary:disabled{cursor:default}@media(max-width:620px), (max-width:960px) and (max-height:500px) and (pointer:coarse){.delivery-review{padding:10px 15px;font-size:11px}.delivery-review strong{font-size:12px}.delivery-review .secondary{width:100%;padding:9px 12px}}

/* Mobile reception: the screen shell stays still; its content panes own scrolling. */
@media(max-width:620px), (max-width:960px) and (max-height:500px) and (pointer:coarse){
  html,body{min-width:0;max-width:100%;overflow-x:hidden}
  #app{position:fixed;inset-inline:0;top:var(--mobile-viewport-top,0px);height:var(--mobile-viewport-height,100dvh);width:100%;min-width:0;overflow:hidden;padding-top:env(safe-area-inset-top,0px);padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
  .topbar,.customer-panel,.chat-panel,.chat,.workspace,.details-panel{min-width:0;min-height:0}
  .topbar{flex-shrink:0;gap:6px}.brand{min-width:0;gap:6px}.brand strong{min-width:0;overflow:hidden;text-overflow:ellipsis}.brand .badge{flex:none;max-width:70px;overflow:hidden;text-overflow:ellipsis}.top-actions{flex:none;gap:3px}.top-actions .channel-link{font-size:11px;padding:5px}
  .workspace{overflow:hidden;flex:1 1 0}.customer-panel,.chat-panel,.chat{height:100%;overflow:hidden}
  .customer-list,.message-scroll,.details-panel{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;overflow-x:hidden}
  .customer-list,.message-scroll{flex:1 1 0;min-height:0;min-width:0}
  .chat-header{flex:none}.chat-identity h2,.chat-identity p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .chat-notice{flex:0 1 auto;min-height:0;max-height:64px;overflow:auto}
  .recovery-row{flex:none}.delivery-review{flex:0 1 auto;min-height:44px;max-height:35%;overflow:auto;overscroll-behavior:contain}
  .composer{flex:none;min-width:0;padding:10px 12px}.composer-top{gap:8px;flex-wrap:wrap}.composer textarea{display:block;min-height:54px;height:54px;max-height:100px}.composer-bottom{flex-wrap:wrap;margin-top:6px}.composer-bottom .primary{flex:none;margin-left:auto}
  .filters{min-width:0;flex-wrap:wrap}.filters .filter{flex:none}.filters #tag-filter{max-width:130px}
  .message-image{max-width:100%;height:auto}.message-stack{min-width:0}.customer-name{overflow-wrap:anywhere}
  .details-panel{overscroll-behavior:contain}.details-header{position:sticky;top:0;z-index:1;background:#fff}
  .login-screen{min-height:100dvh;overflow:auto;padding:max(18px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.login-card{width:min(440px,100%);min-width:0}
  input,textarea,select,.search-wrap input,#tag-filter,#profile-form textarea,#profile-form input{font-size:16px}
  dialog{max-height:calc(var(--mobile-viewport-height,100dvh) - 24px);overflow:auto;overflow-wrap:anywhere}.connection-row{flex-wrap:wrap;gap:8px}.connection-row span{overflow-wrap:anywhere}
  .toast{bottom:calc(env(safe-area-inset-bottom,0px) + 65px)}
  .mobile-viewport-compact .topbar{height:40px;padding-block:4px}.mobile-viewport-compact .chat-header{height:44px;padding:5px 10px}.mobile-viewport-compact .chat-header .avatar{width:28px;height:28px}
  .mobile-viewport-compact .composer{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:14px auto 38px;gap:3px 8px;padding:4px 10px}
  .mobile-viewport-compact .composer-top{grid-column:1;grid-row:1;flex-wrap:nowrap;white-space:nowrap;overflow:auto;min-width:0;height:14px;margin:0;line-height:14px}.mobile-viewport-compact .composer-top span{flex:none}
  .mobile-viewport-compact .composer textarea{grid-column:1;grid-row:3;height:38px;min-height:38px;max-height:38px;padding-block:2px}
  .mobile-viewport-compact .composer-bottom{display:contents}.mobile-viewport-compact .composer .send-hint{grid-column:2;grid-row:1;justify-self:end;align-self:center;font-size:9px;line-height:14px;white-space:nowrap}
  .mobile-viewport-compact .composer .primary{grid-column:2;grid-row:3;margin:0;padding:6px 12px;min-height:38px;align-self:stretch;justify-self:stretch}
  .mobile-viewport-compact .chat-notice{max-height:32px;padding:4px 10px}.mobile-viewport-compact .delivery-review{padding:5px 10px;max-height:20%;min-height:36px}.mobile-viewport-compact .recovery-row{padding:0 10px}.mobile-viewport-compact .message-scroll{padding:0 10px}.mobile-viewport-compact #messages{padding-block:8px}
  .mobile-viewport-compact .panel-title{padding:8px 14px}.mobile-viewport-compact .search-wrap{margin-bottom:6px}.mobile-viewport-compact .search-wrap input{padding-block:8px}.mobile-viewport-compact .filters{padding-bottom:6px}.mobile-viewport-compact .list-footer{padding:7px 14px}
}

/* Authenticated, scoped native profile images never change mobile geometry. */
.avatar{overflow:hidden;flex-shrink:0}.customer-avatar-image{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
