:root{font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;color:#15343d;background:#f2f8f6;font-synthesis:none}*{box-sizing:border-box}body{margin:0}[hidden]{display:none!important}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:default}a{color:inherit}header.topbar{height:68px;background:#102d3a;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 max(18px,calc((100vw - 1180px)/2));gap:18px}.back{text-decoration:none;color:#b8d9d3;font-size:14px}.brand{display:flex;align-items:center;gap:9px}.brand img{width:38px;height:38px}.brand strong{display:block;font-size:16px}.brand small{display:block;color:#88b7ac;font-size:10px;letter-spacing:.08em}.topbar button{background:transparent;border:1px solid #5c8187;border-radius:8px;color:#e6f9f2;padding:7px 12px}main{max-width:1180px;margin:auto;padding:28px 18px 80px}.card{background:#fff;border:1px solid #dfebe6;border-radius:18px;box-shadow:0 9px 28px rgba(16,57,53,.055)}.login{max-width:420px;margin:70px auto;padding:30px}.login img{width:54px;height:54px}.login h1{margin:16px 0 5px;font-size:26px}.login p{color:#638077;line-height:1.6}.login form{margin-top:25px}.login label,.product-form label,.settings-form label,.rule-row label{display:block;font-size:13px;font-weight:700;color:#48685e;margin:14px 0}.login input,.product-form input:not([type=checkbox]),.product-form textarea,.product-form select,.settings-form textarea,.rule-row input,.rule-row textarea,.test-card input{display:block;width:100%;border:1px solid #cfe1da;border-radius:9px;background:#fbfefd;color:#183b3e;padding:11px 12px;margin-top:7px;outline:none;min-height:44px}.login input:focus,.product-form input:focus,.settings-form textarea:focus,.rule-row input:focus,.rule-row textarea:focus,.reply-form input:focus{border-color:#0dbf9f;box-shadow:0 0 0 3px #d9faf1}.primary{background:#0cc7a5;color:#093e38;border:0;border-radius:9px;padding:11px 16px;font-weight:800}.login .primary{width:100%;margin-top:10px}.heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0 22px}.heading span{font-size:11px;letter-spacing:.15em;color:#0eaa91;font-weight:900}.heading h1{font-size:31px;margin:5px 0}.heading p{margin:0;color:#668278;font-size:13px}.heading button,.card-title button,.section-head button:not(.primary),.message-tools button,.form-actions button:not(.primary),.test-card button{border:1px solid #c7e1d8;background:#fff;color:#176b5a;border-radius:8px;padding:9px 12px;font-weight:700}.tabs{display:flex;gap:8px;margin:0 0 20px}.tabs button{border:1px solid #cfe5de;background:#fff;border-radius:10px;color:#4b6c62;padding:11px 15px;font-weight:800}.tabs button.active{background:#103945;border-color:#103945;color:#fff}.tabs b{display:inline-block;background:#ef5f5f;color:#fff;border-radius:99px;min-width:20px;padding:2px 5px;font-size:11px}.inbox-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:16px}.inbox-list{min-height:550px;overflow:hidden}.card-title{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:16px;border-bottom:1px solid #e5efeb}.card-title h2,.card-title h3{margin:0;font-size:17px}.conversation-list{max-height:520px;overflow:auto}.conversation{width:100%;display:flex;gap:11px;align-items:flex-start;text-align:left;background:#fff;border:0;border-bottom:1px solid #edf3f0;padding:14px;color:#173a3c}.conversation.active{background:#e9faf4}.conversation-avatar{background:#cceee4;color:#13735e;border-radius:11px;width:38px;height:38px;display:grid;place-items:center;font-weight:900;flex:none}.conversation-info{min-width:0;flex:1}.conversation strong,.conversation small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.conversation small{color:#729087;margin-top:5px;font-size:12px}.unread{background:#e84f52;color:#fff;padding:2px 6px;border-radius:99px;font-size:11px}.chat-detail{display:flex;flex-direction:column;height:550px;overflow:hidden}.chat-title{min-height:70px;border-bottom:1px solid #e4efea;padding:15px 17px;display:flex;justify-content:space-between;align-items:center}.chat-title h2{margin:0;font-size:17px}.chat-title small{color:#78938b}.chat-title button{background:#fff4f3;color:#bc3f38;border:1px solid #f0c9c6;border-radius:8px;padding:8px}.detail-messages{flex:1;background:#f8fbfa;overflow:auto;padding:16px;display:flex;flex-direction:column;gap:11px}.hint{color:#80978e;font-size:13px;padding:12px}.message{max-width:82%;font-size:14px;line-height:1.5}.message.visitor{align-self:flex-start}.message.admin,.message.auto,.message.system{align-self:flex-end}.message-bubble{display:inline-block;background:#fff;border:1px solid #e4ebe8;padding:10px 12px;border-radius:12px;white-space:pre-wrap;overflow-wrap:anywhere}.message.admin .message-bubble{background:#d8f7ec;border-color:#d8f7ec}.message.auto .message-bubble{background:#eaf5ff}.message.system .message-bubble{background:#edf1f0;color:#526b64}.message-bubble img{max-width:220px;max-height:180px;border-radius:7px;display:block}.message-bubble audio{width:230px;max-width:100%;display:block}.message time{display:block;font-size:10px;color:#8ea39a;margin:4px}.message-tools{display:flex;align-items:center;gap:8px;padding:9px 13px 0}.message-tools button{padding:6px 9px;font-size:12px}.message-tools .recording{background:#fff0ef;color:#b43d39}.message-tools span{font-size:11px;color:#ae625b}.reply-form{display:flex;gap:8px;padding:9px 13px 12px}.reply-form input{flex:1;min-width:0;border:1px solid #d2e5dc;border-radius:9px;padding:10px;outline:none}.reply-form button{flex:none}#replyStatus{font-size:12px;color:#b43d39;margin:0 14px 8px;min-height:0}.call-status{color:#176d5b;font-size:12px;padding:0 17px}.call-banner{background:#e3faf1;border:1px solid #8cdfc4;border-radius:12px;padding:14px 16px;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center;gap:12px}.call-banner button{border:1px solid #c6dbd3;border-radius:8px;padding:9px 12px;margin-left:7px;background:#fff}.call-banner .primary{background:#0cc7a5;border:0}.section-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:10px 0 18px}.section-head h2{margin:0 0 6px;font-size:23px}.section-head p{margin:0;color:#6b847b;font-size:13px}.product-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,430px);gap:16px;align-items:start}.product-layout:has(#productForm[hidden]){grid-template-columns:1fr}.admin-product{display:flex;align-items:center;gap:12px;border-bottom:1px solid #edf3f0;padding:16px}.admin-product:last-child{border:0}.admin-product-icon{background:#dcf4eb;color:#17896d;border-radius:10px;width:39px;height:39px;display:grid;place-items:center;font-weight:900}.admin-product-info{flex:1;min-width:0}.admin-product-info strong,.admin-product-info small{display:block}.admin-product-info small{font-size:12px;color:#789186;margin-top:4px}.admin-product button{border:1px solid #cce5d9;border-radius:7px;padding:7px 10px;background:#fff;color:#176b5a}.status{font-size:11px;color:#138c68}.status.off{color:#a17870}.product-form{padding:20px}.product-form h3{margin:0 0 10px}.check{display:flex!important;align-items:center;gap:8px}.check input{width:18px;height:18px}.form-actions{display:flex;gap:8px}.form-actions .primary{flex:1}#productStatus,#saveStatus,#loginStatus{font-size:13px;color:#b54743}.automation-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:16px;align-items:start}.settings-form,.test-card{padding:20px}.settings-form .card-title{padding:14px 0;margin-top:18px}.rule-row{position:relative;border:1px solid #e0eee8;background:#f9fdfb;border-radius:11px;padding:11px;margin:12px 0}.rule-row .delete-rule{float:right;border:0;background:transparent;color:#b4534c;font-size:12px}.test-card input{margin:18px 0 10px}.test-card p{font-size:13px;color:#507064;line-height:1.6}
@media(max-width:800px){.inbox-layout,.product-layout,.automation-layout{grid-template-columns:1fr}.inbox-list{min-height:0}.conversation-list{max-height:215px}.chat-detail{height:510px}.heading h1{font-size:25px}}
@media(max-width:520px){header.topbar{padding:0 14px}.brand strong{font-size:14px}.back{font-size:12px}main{padding:17px 12px 65px}.heading{align-items:flex-start;flex-direction:column}.heading button{font-size:12px}.tabs{gap:5px}.tabs button{font-size:12px;padding:10px 9px;flex:1}.inbox-layout{gap:10px}.inbox-list .card-title{padding:11px}.conversation{padding:10px}.chat-detail{height:min(68dvh,550px)}.section-head h2{font-size:21px}.section-head p{line-height:1.5}.call-banner{align-items:flex-start;flex-direction:column}.login{margin:45px auto;padding:22px}}
.screen-back{display:none;border:0;background:transparent;color:#176b5a;font-size:32px;line-height:1;padding:0 10px 0 0}
.editor-head{justify-content:flex-start}.editor-head .screen-back{display:block}.editor-head h2{margin:0}
.icon-preview{height:104px;display:flex;align-items:center;justify-content:center;border:1px dashed #bfd9cc;border-radius:12px;background:#f7fbf9;color:#83a096;font-size:13px;margin:8px 0 18px}
.icon-preview img{height:76px;width:76px;object-fit:cover;border-radius:17px}
.settings-form input[type=number]{display:block;width:100%;min-height:44px;margin-top:7px;padding:10px 12px;border:1px solid #cfe1da;border-radius:9px;background:#fbfefd;color:#183b3e}
.field-help{display:block;margin-top:7px;color:#789186;font-size:12px;font-weight:400;line-height:1.5}
.admin-product-icon img{width:39px;height:39px;object-fit:cover;border-radius:10px}
#productEditorPane .product-form{max-width:720px;margin:auto}
.tabs .nav-icon{display:none}
@media(max-width:800px){
  body{background:#f5f8f6}
  header.topbar{height:56px}
  main{padding:12px 0 95px}
  .heading{padding:0 17px;margin:5px 0 16px;flex-direction:row;align-items:center}
  .heading span{display:none}.heading h1{font-size:24px;margin:0 0 4px}.heading button{font-size:11px;padding:8px;max-width:120px}
  .tabs{position:fixed;z-index:20;bottom:0;left:0;right:0;margin:0;padding:7px 6px calc(7px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #dcebe3;box-shadow:0 -5px 20px rgba(18,60,51,.06);justify-content:space-around}
  .tabs button{border:0;background:transparent;border-radius:9px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-width:0;flex:1;padding:3px 6px;font-size:11px;color:#80958a;position:relative}
  .tabs button.active{background:transparent;border:0;color:#0ba789}
  .tabs .nav-icon{display:block;font-size:23px;line-height:1.1}
  .tabs b{position:absolute;top:0;left:54%;font-size:10px}
  .tab-pane{padding:0 12px}
  .inbox-layout{display:block}.inbox-list{border-radius:0;box-shadow:none;border-left:0;border-right:0;min-height:calc(100dvh - 200px)}.inbox-list .card-title{padding:14px 18px}.conversation-list{max-height:none}.conversation{padding:14px 17px;align-items:center}.conversation-avatar{width:46px;height:46px;border-radius:13px}.conversation strong{font-size:15px}.conversation small{font-size:13px}
  .chat-detail{display:none}.screen-back{display:block}
  body[data-chat-open="true"] .heading,body[data-chat-open="true"] .tabs,body[data-chat-open="true"] .inbox-list{display:none}
  body[data-chat-open="true"] main{padding:0}
  body[data-chat-open="true"] #inboxPane{padding:0}
  body[data-chat-open="true"]{overflow:hidden}
  body[data-chat-open="true"] .chat-detail{position:fixed;inset:56px 0 0;z-index:30;display:flex;flex-direction:column;width:100%;height:auto;min-height:0;border:0;border-radius:0;box-shadow:none}
  .chat-title{background:#f7fbf9;min-height:58px;padding:8px 14px}.chat-title h2{font-size:16px}.chat-title small{font-size:11px}.detail-messages{padding:14px}.message{max-width:86%}.reply-form{padding-bottom:calc(12px + env(safe-area-inset-bottom))}
  .chat-title .screen-back{background:transparent;border:0;color:#176b5a;font-size:32px;padding:0 10px 0 0}
  .chat-title,.message-tools,.reply-form,#replyStatus{flex:none}
  .detail-messages{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
  .message-tools,.reply-form,#replyStatus{background:#fff}
  #replyStatus:empty{display:none}
  body[data-view="productEditor"] .tabs{display:none}
  body[data-view="productEditor"] main{padding-bottom:20px}
  .section-head{padding:0 4px;align-items:flex-start}.section-head h2{font-size:21px}.section-head p{line-height:1.4}.section-head .primary{white-space:nowrap;font-size:12px;padding:10px}
  #productsPane .card{border-radius:0;box-shadow:none;border-left:0;border-right:0}.admin-product{padding:15px 12px}.admin-product-info small{line-height:1.4}.admin-product button{white-space:nowrap}
  #productEditorPane .product-form{border:0;box-shadow:none;border-radius:0;padding:16px 18px}
  .automation-layout{display:block}.test-card{margin-top:12px}.login{margin:45px 16px}
}
.rules-list{border:1px solid #e0eee8;border-radius:11px;overflow:hidden;margin:12px 0 6px}
.rules-list .hint{margin:0}
.rule-item{display:grid;grid-template-columns:minmax(0,42%) minmax(0,1fr);align-items:center;gap:12px;width:100%;min-height:52px;padding:12px 14px;text-align:left;border:0;border-bottom:1px solid #e8f1ed;background:#fff;color:#173a3c}
.rule-item:last-child{border-bottom:0}
.rule-item:hover,.rule-item:focus-visible{background:#eefaf5}
.rule-item strong,.rule-item span{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.rule-item strong{font-size:14px}.rule-item span{font-size:13px;color:#729087}
.rule-dialog{width:min(540px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;border:1px solid #d9e9e2;border-radius:16px;padding:22px;background:#fff;color:#173a3c;box-shadow:0 18px 60px #102d3a44}
.rule-dialog::backdrop{background:#102d3a99}
.rule-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.rule-dialog-head h3{margin:0;font-size:20px}.rule-dialog-head button{border:0;background:transparent;color:#607e74;font-size:28px;line-height:1;padding:4px 8px}
.rule-dialog label{display:block;margin:18px 0;font-size:14px;font-weight:700;color:#48685e}
.rule-dialog input,.rule-dialog textarea{display:block;width:100%;margin-top:8px;border:1px solid #cfe1da;border-radius:9px;background:#fbfefd;color:#183b3e;padding:11px 12px;outline:none;resize:vertical}
.rule-dialog input:focus,.rule-dialog textarea:focus{border-color:#0dbf9f;box-shadow:0 0 0 3px #d9faf1}
.rule-dialog-actions{display:flex;justify-content:space-between;gap:10px;margin-top:22px}.rule-dialog-actions #deleteRule{border:1px solid #f0c9c6;background:#fff4f3;color:#bc3f38;border-radius:9px;padding:10px 14px}.rule-dialog-actions .primary{margin-left:auto}
.product-head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.product-head-actions button:not(.primary),.description-add button,.description-block-bar button,.category-actions button:not(.primary){border:1px solid #c7e1d8;background:#fff;color:#176b5a;border-radius:8px;padding:9px 12px;font-weight:700}
.category-help{color:#638077;font-size:14px;line-height:1.6;margin:12px 0}
.category-list{border:1px solid #e0eee8;border-radius:10px;overflow:auto;max-height:40dvh}
.category-item{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;border:0;border-bottom:1px solid #e8f1ed;background:#fff;color:#173a3c;text-align:left;padding:12px 14px}
.category-item:last-child{border-bottom:0}.category-item.active{background:#e9faf4}.category-item span{color:#729087;font-size:13px}
.category-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.category-actions .primary{margin-left:auto}.category-actions #deleteCategory{color:#b43d39;border-color:#f0c9c6;background:#fff4f3}
#categoryStatus{font-size:13px;color:#b54743;min-height:20px;margin:12px 0 0}
.description-editor{margin:20px 0}.description-editor-head{display:flex;gap:8px;flex-direction:column;color:#48685e;font-size:14px}.description-editor-head span{font-size:13px;font-weight:400;color:#789186;line-height:1.5}
.description-blocks{display:flex;flex-direction:column;gap:10px;margin:12px 0}.description-block{border:1px solid #dcebe4;border-radius:11px;padding:12px;background:#fbfefd}.description-block-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;color:#48685e;font-size:13px}.description-block-bar span{display:flex;gap:5px}.description-block-bar button{font-size:12px;padding:6px 8px}.description-block-bar button:disabled{opacity:.45}.description-block textarea{display:block;width:100%;min-height:105px;border:1px solid #cfe1da;border-radius:9px;background:#fff;color:#183b3e;padding:10px 12px;resize:vertical;outline:none}.description-block img{display:block;max-width:100%;max-height:260px;object-fit:contain;border-radius:8px}.description-add{display:flex;gap:8px}
@media(max-width:800px){.product-head-actions{justify-content:flex-start}.product-head-actions button{font-size:12px;padding:9px 10px}.description-block-bar button{font-size:11px}}
.price-editor{margin:20px 0}.price-editor-head{display:flex;flex-direction:column;gap:5px;color:#48685e;font-size:14px}.price-editor-head span{font-size:13px;font-weight:400;color:#789186}.price-options{display:flex;flex-direction:column;gap:8px;margin:12px 0}.price-option{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px;align-items:center}.price-option input{margin:0!important;min-width:0}.price-option button,#addPriceOption{border:1px solid #c7e1d8;background:#fff;color:#176b5a;border-radius:8px;padding:10px 12px;font-weight:700}.price-option button{color:#b43d39;border-color:#f0c9c6}.price-options .hint{margin:0;padding:10px 0}@media(max-width:500px){.price-option{grid-template-columns:minmax(0,1fr) auto}.price-option input:nth-child(2){grid-column:1;grid-row:2}.price-option button{grid-column:2;grid-row:1/3}}
.inbox-actions{display:flex;gap:6px;align-items:center}.inbox-actions button{white-space:nowrap}
.chat-title>div{flex:1;min-width:0}.chat-title #blockVisitor{flex:none;border:1px solid #e8b7b4;border-radius:8px;padding:8px 10px;background:#fff5f4;color:#a9312a;font-size:12px;font-weight:700}.chat-title #blockVisitor.blocked{border-color:#c7e1d8;background:#f0faf5;color:#176b5a}
@media(max-width:520px){.inbox-actions button{font-size:11px;padding:7px 9px}.chat-title #blockVisitor{font-size:11px;padding:7px 8px}}
