:root{
  --ink:#172033;--muted:#737d91;--faint:#a6adbb;--line:#e8eaf0;--canvas:#f5f6f8;
  --panel:#fff;--nav:#171d2d;--nav-soft:#252d42;--primary:#695cf6;--primary-dark:#5548e5;
  --primary-soft:#f0eeff;--cyan:#39c4d8;--green:#20a674;--green-soft:#eaf8f3;
  --amber:#e99a36;--amber-soft:#fff5e7;--red:#dc5360;--red-soft:#fff0f1;
  --shadow:0 12px 32px rgba(29,36,56,.07);--radius:18px;--font:"Segoe UI","Microsoft YaHei",system-ui,sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body,#app{height:100%}
body{font-family:var(--font);background:var(--canvas);color:var(--ink);font-size:14px;overflow:hidden}
button,input,select,textarea{font:inherit;color:inherit}
button{border:0}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(105,92,246,.18);outline-offset:1px}
::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-thumb{background:#d9dde6;border-radius:10px}::-webkit-scrollbar-track{background:transparent}

.topbar{height:72px;display:flex;justify-content:space-between;align-items:center;padding:0 24px;background:#fff;border-bottom:1px solid var(--line);position:relative;z-index:20}
.brand-lockup{display:flex;align-items:center;gap:12px;min-width:212px}.brand-mark{width:38px;height:38px;border-radius:12px;background:linear-gradient(145deg,#7064f8,#4d43ce);display:flex;align-items:flex-end;justify-content:center;gap:3px;padding:9px;box-shadow:0 8px 18px rgba(105,92,246,.25)}
.brand-mark span{width:5px;border-radius:3px;background:#fff}.brand-mark span:nth-child(1){height:11px;opacity:.7}.brand-mark span:nth-child(2){height:19px}.brand-mark span:nth-child(3){height:15px;opacity:.85}
.brand{font-size:17px;font-weight:750;letter-spacing:.2px}.brand-sub{font-size:10px;color:var(--muted);margin-top:1px;letter-spacing:.6px}
.top-actions{display:flex;align-items:center;gap:12px}.system-state{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px;padding-right:12px;border-right:1px solid var(--line)}
.live-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px rgba(32,166,116,.11)}
.store-picker{display:flex;align-items:center;gap:9px;border:1px solid var(--line);padding:5px 6px 5px 12px;border-radius:11px;background:#fafbfc}.store-picker>span{font-size:11px;color:var(--muted);white-space:nowrap}.store-picker .sel{border:0;background:transparent;min-width:120px;padding:4px 24px 4px 4px}
.top-create{background:var(--ink)!important;color:#fff!important;border-color:var(--ink)!important;padding:9px 14px!important;box-shadow:0 6px 14px rgba(23,32,51,.14)}

.layout{display:grid;grid-template-columns:236px minmax(0,1fr);height:calc(100vh - 72px)}
.sidebar-nav{background:var(--nav);color:#dfe4f0;display:flex;flex-direction:column;padding:22px 14px 16px;overflow:auto}
.nav-context{padding:0 12px 18px;display:flex;flex-direction:column;gap:3px}.nav-context .eyebrow{color:#6f7b98}.nav-context strong{font-size:15px;color:#fff}.nav-section{display:flex;flex-direction:column;gap:4px}
.nav-label{font-size:10px;text-transform:uppercase;letter-spacing:1.2px;color:#65708b;padding:24px 13px 9px}.nav-item{width:100%;display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:10px;cursor:pointer;color:#9ea8bf;background:transparent;text-align:left;transition:.18s;position:relative}
.nav-item:hover{color:#fff;background:rgba(255,255,255,.055)}.nav-item.active{background:linear-gradient(90deg,rgba(105,92,246,.27),rgba(105,92,246,.12));color:#fff}.nav-item.active:before{content:"";position:absolute;left:-14px;width:3px;height:24px;border-radius:0 4px 4px 0;background:#7d70ff}
.ni-icon{width:25px;height:25px;border-radius:7px;background:rgba(255,255,255,.055);display:grid;place-items:center;font-size:15px;color:#bbc3d6}.nav-item.active .ni-icon{background:#695cf6;color:#fff}.ni-label{flex:1;font-size:13px}.nav-beta{font-size:9px;color:#c9c4ff;background:rgba(105,92,246,.24);padding:2px 5px;border-radius:4px}.nav-pulse{width:6px;height:6px;border-radius:50%;background:var(--cyan)}.nav-spacer{flex:1;min-height:18px}
.mode-card{display:flex;align-items:center;gap:9px;padding:11px;background:var(--nav-soft);border:1px solid rgba(255,255,255,.06);border-radius:13px}.mode-icon{width:28px;height:28px;border-radius:8px;background:#303a55;color:#9fa9c2;display:grid;place-items:center}.mc-text{flex:1;min-width:0}.mc-title{font-size:11px;font-weight:650;color:#f2f4fa}.mc-desc{font-size:9px;color:#7f8aa5;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.switch{position:relative;width:34px;height:19px;flex-shrink:0}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;inset:0;background:#434d64;border-radius:20px;cursor:pointer;transition:.2s}.slider:before{content:"";position:absolute;width:15px;height:15px;left:2px;top:2px;background:#fff;border-radius:50%;transition:.2s}.switch input:checked+.slider{background:var(--primary)}.switch input:checked+.slider:before{transform:translateX(15px)}
.sidebar-foot{display:flex;align-items:center;gap:9px;padding:15px 7px 0;margin-top:14px;border-top:1px solid rgba(255,255,255,.08)}.avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#4bd1d8,#6a5cf6);font-size:10px;font-weight:700;color:#fff}.sidebar-foot div{display:flex;flex-direction:column}.sidebar-foot strong{font-size:11px;color:#d8ddea}.sidebar-foot small{font-size:9px;color:#69758e;margin-top:2px}

.view{display:none;height:100%;min-width:0}.view.active{display:grid}.view-workbench.active{grid-template-columns:minmax(270px,300px) minmax(480px,1fr) minmax(290px,330px);gap:12px;padding:12px;background:#eef1f5}.view-orders.active{grid-template-columns:minmax(250px,310px) minmax(480px,1fr) minmax(230px,280px);gap:14px;padding:14px}.view-management.active{display:block;padding:14px}
.management-shell{height:100%;display:flex;flex-direction:column;overflow:hidden}.management-head{min-height:96px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 26px;border-bottom:1px solid var(--line);background:linear-gradient(135deg,#fff,#fafaff)}.management-heading h1{font-size:23px;letter-spacing:-.65px}.management-heading p{font-size:10px;color:var(--muted);margin-top:5px}.management-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.management-body{flex:1;min-height:0;overflow:auto;padding:24px 28px 38px;background:#fff}.management-content-inner{width:min(1180px,100%);margin:0 auto}.management-toolbar{display:flex;align-items:center;justify-content:space-between;padding:13px 15px;margin-bottom:16px;border:1px solid var(--line);border-radius:13px;background:#fafbfc}.management-toolbar label{display:flex;align-items:center;gap:10px}.management-toolbar label>span{font-size:10px;color:var(--muted);white-space:nowrap}.management-toolbar .sel{min-width:230px}.page-actions{position:sticky;bottom:-38px;display:flex;justify-content:flex-end;gap:8px;margin-top:22px;padding:15px 0;background:linear-gradient(180deg,rgba(255,255,255,.35),#fff 24%);border-top:1px solid var(--line);z-index:3}.helper-download-link{text-decoration:none;color:var(--ink)}.helper-download-card{display:grid;grid-template-columns:46px 1fr auto;align-items:center;gap:13px;margin:14px 0 18px;padding:15px;border:1px solid #dad6ff;border-radius:15px;background:linear-gradient(135deg,#f5f3ff,#f8fffe)}.helper-download-icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:var(--primary);color:#fff;font-size:20px;box-shadow:0 7px 17px rgba(105,92,246,.22)}.helper-download-card b{display:block;font-size:12px}.helper-download-card p{font-size:9px;line-height:1.6;color:var(--muted);margin-top:4px}.helper-download-card a{text-decoration:none;white-space:nowrap}
.helper-download-link,.helper-download-card a{display:inline-flex;align-items:center;justify-content:center}.form-page-card{max-width:760px;padding:24px;border:1px solid var(--line);border-radius:17px;background:linear-gradient(145deg,#fff,#fafbfc);box-shadow:0 12px 30px rgba(29,36,56,.05)}.form-page-card .inp,.form-page-card .sel{font-size:12px;padding:11px 12px}.pricing-total{display:flex;justify-content:space-between;align-items:center;margin-top:16px;padding:19px;border-radius:14px;background:linear-gradient(135deg,#1d263b,#2c3855);color:#fff}.pricing-total span{font-size:11px;color:#c5cede}.pricing-total b{font-size:26px;letter-spacing:-.7px}
.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);min-width:0;overflow:hidden}.panel-head{min-height:70px;display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--line)}.panel-head h2{font-size:16px;letter-spacing:-.2px}.eyebrow{display:block;font-size:9px;text-transform:uppercase;letter-spacing:1.35px;color:#9aa2b2;margin-bottom:4px;font-weight:700}
.icon-btn{width:34px;height:34px;border-radius:10px;background:var(--primary-soft);color:var(--primary);cursor:pointer;font-size:21px;line-height:1}.icon-btn:hover{background:var(--primary);color:#fff;transform:translateY(-1px)}
.search-wrap{position:relative;margin:12px 14px}.search-wrap>span{position:absolute;left:12px;top:50%;transform:translateY(-53%);font-size:18px;color:#98a1b2;pointer-events:none}.search-wrap .inp{padding-left:35px;background:#f7f8fa;border-color:transparent}.list-meta{display:flex;align-items:center;justify-content:space-between;padding:3px 17px 8px;color:#9da5b4;font-size:10px;text-transform:uppercase;letter-spacing:.6px}

.conv-list,.chat-panel,.profile-panel,.sidebar,.dash,.main{height:100%}.conv-list,.chat-panel,.profile-panel,.sidebar{display:flex;flex-direction:column}.conv-items,.order-list{flex:1;overflow:auto;padding:4px 8px 14px}.conv-item{padding:12px 10px;border-radius:13px;cursor:pointer;margin-bottom:3px;border:1px solid transparent;transition:.16s}.conv-item:hover{background:#f7f8fb}.conv-item.active{background:var(--primary-soft);border-color:#ddd9ff}.ci-name{font-weight:650;font-size:12px;display:flex;justify-content:space-between;align-items:center;gap:8px}.ci-name>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ci-count{font-size:9px;color:#969fb1;font-weight:500}.ci-last{font-size:10px;color:var(--muted);margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ci-sum{font-size:9px;color:#6255dc;margin-top:7px;background:rgba(255,255,255,.62);padding:4px 7px;border-radius:6px;display:inline-block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.empty-list{color:var(--muted);padding:34px 15px;text-align:center;font-size:11px;line-height:1.7}.empty-list strong{display:block;color:var(--ink);font-size:12px;margin-bottom:4px}

.chat-head{min-height:70px;display:flex;justify-content:space-between;align-items:center;padding:13px 18px;border-bottom:1px solid var(--line)}.chat-person{display:flex;align-items:center;gap:11px;min-width:0}.chat-avatar{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#e7e3ff,#d8f7f4);display:grid;place-items:center;color:#5548d9;font-size:15px;font-weight:750;flex-shrink:0}.chat-title{font-weight:700;font-size:14px}.chat-sub{font-size:10px;color:var(--muted);margin-top:3px;max-width:420px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-head-actions{display:flex;align-items:center;gap:8px}.channel-chip{font-size:10px;padding:4px 8px;border-radius:20px;color:#d98322;background:var(--amber-soft);border:1px solid #fae3c2}
.wb-chat{flex:1;overflow:auto;padding:24px 5%;background:linear-gradient(180deg,#fcfcfe,#f8f9fb);border:0;border-radius:0;margin:0;height:auto}.wb-input{padding:11px 17px 14px;border-top:1px solid var(--line);background:#fff}.composer-note{display:flex;justify-content:space-between;color:#a1a8b6;font-size:9px;margin:0 4px 6px}.composer{display:flex;gap:8px;padding:5px 5px 5px 14px;border:1px solid #dfe2e9;border-radius:14px;box-shadow:0 4px 14px rgba(29,36,56,.04)}.composer .inp{border:0;padding:6px 0;background:transparent}.send-btn{display:flex;align-items:center;gap:7px;padding:8px 13px;border-radius:10px;background:var(--primary);color:#fff;cursor:pointer;font-size:11px;font-weight:650}.send-btn:hover{background:var(--primary-dark)}.send-btn:disabled{opacity:.55;cursor:wait}
.msg{margin:0 0 16px;max-width:78%;display:flex;flex-direction:column;align-items:flex-start}.msg.customer,.msg.seller{margin-left:auto;align-items:flex-end}.msg .role{font-size:9px;color:#9aa2b2;margin:0 6px 5px}.msg .bubble{padding:10px 13px;border-radius:6px 15px 15px 15px;background:#fff;border:1px solid var(--line);box-shadow:0 4px 12px rgba(29,36,56,.035);display:inline-block;line-height:1.65;font-size:12px;white-space:pre-wrap;word-break:break-word}.msg.customer .bubble,.msg.seller .bubble{color:#fff;background:linear-gradient(135deg,#7367f7,#6054e9);border-color:transparent;border-radius:15px 6px 15px 15px;box-shadow:0 6px 14px rgba(105,92,246,.18)}.msg.error .bubble{background:var(--red-soft);color:#af3542;border-color:#ffdadd}.stage-tag{font-size:9px;color:#5549db;background:var(--primary-soft);padding:4px 8px;border-radius:6px;margin:7px 0}.file-card{display:flex;align-items:center;gap:9px;margin-top:7px;padding:9px;background:#fff;border:1px solid var(--line);border-radius:10px}.fc-type,.ftype{font-size:9px;padding:3px 6px;border-radius:5px;font-weight:700}.fc-type.sample,.ftype.sample{background:var(--amber-soft);color:#bb7022}.fc-type.watermarked,.ftype.watermarked{background:#fff0f6;color:#bd4c7a}.fc-type.final,.ftype.final{background:var(--green-soft);color:#168158}.fc-dl{color:var(--primary);text-decoration:none;font-size:10px;font-weight:650}.fc-dl:hover{text-decoration:underline}

.profile-head{background:#fdfdfe}.profile-state{font-size:9px;color:var(--green);background:var(--green-soft);border-radius:20px;padding:4px 8px}.pp-body{flex:1;overflow:auto;padding:15px}.pp-empty{height:100%;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted);padding:28px}.pp-empty>span{width:40px;height:40px;border-radius:13px;background:var(--primary-soft);display:grid;place-items:center;color:var(--primary);font-size:21px;margin-bottom:12px}.pp-empty strong{font-size:12px;color:var(--ink);margin-bottom:5px}.pp-empty p{font-size:10px;line-height:1.65}.pp-row{display:flex;justify-content:space-between;align-items:flex-start;padding:10px 11px;border-radius:10px;background:#f7f8fa;margin-bottom:7px;gap:12px}.pp-k{color:var(--muted);font-size:10px}.pp-v{font-size:11px;color:var(--ink);font-weight:650;max-width:64%;text-align:right;word-break:break-word}.pp-meta{background:var(--primary-soft)}.pp-meta .pp-v{color:var(--primary)}.profile-tip{display:flex;gap:8px;margin:0 14px 14px;padding:10px;background:#f8f9fb;border-radius:10px;color:var(--muted)}.profile-tip>span{width:17px;height:17px;border-radius:50%;background:#e6e8ee;display:grid;place-items:center;font-size:10px;font-weight:700;flex-shrink:0}.profile-tip p{font-size:9px;line-height:1.55}

/* Reference-style customer service workbench */
.message-rail,.chat-panel{height:100%;display:flex;flex-direction:column}.message-rail-head{display:flex;align-items:center;justify-content:space-between;padding:16px 14px 9px}.message-title{display:flex;align-items:center;gap:8px}.message-title h2{font-size:18px}.message-title span{min-width:19px;height:19px;padding:0 6px;display:grid;place-items:center;border-radius:20px;background:var(--red);color:#fff;font-size:9px}.text-action{background:none;color:var(--muted);font-size:10px;cursor:pointer}.text-action:hover{color:var(--primary)}.message-search{margin:8px 12px}.message-filters{display:grid;grid-template-columns:1fr 1fr 1fr;gap:5px;padding:0 12px 8px}.message-filters .sel{padding:7px 5px;font-size:9px;background:#fafbfc}.message-tabs{height:39px;display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid var(--line);padding:0 9px}.message-tabs button{position:relative;background:none;color:var(--muted);font-size:10px;cursor:pointer}.message-tabs button span{margin-left:3px;padding:1px 5px;border-radius:9px;background:#f0f1f4;font-size:8px}.message-tabs button.active{color:#2487ec;font-weight:700}.message-tabs button.active:after{content:"";position:absolute;left:12%;right:12%;bottom:-1px;height:2px;background:#338ef2}.conv-items{padding:7px;min-height:0}.conv-item{position:relative;display:grid;grid-template-columns:38px minmax(0,1fr);gap:9px;padding:11px 9px;border-radius:10px;margin:0 0 4px}.conv-item.active{background:#e9f2ff;border-color:#dceaff}.conv-avatar{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(135deg,#ffe063,#ffb837);color:#503b00;font-weight:800}.conv-copy{min-width:0}.ci-name time{font-size:8px;color:#a1a8b5;font-weight:400}.ci-last{margin-top:4px}.ci-tags{display:flex;gap:4px;margin-top:7px}.ci-tags span,.ci-tags i,.ci-tags em{font-style:normal;font-size:8px;padding:2px 5px;border-radius:4px;background:#fff3d7;color:#9b691a}.ci-tags span:nth-child(2){background:#f1f3f6;color:#7d8696}.ci-tags i{background:#fff0f1;color:#d84b58}.ci-tags em{background:#eaf8f3;color:#1c9368}.unread-dot{position:absolute;right:8px;bottom:12px;width:17px;height:17px;display:grid;place-items:center;border-radius:50%;background:#ef4654;color:#fff;font-size:8px}.new-conv-button{margin:8px 12px 12px;padding:9px;border:1px dashed #c8d3e2;border-radius:9px;background:#fafcff;color:#5d6b80;cursor:pointer;font-size:10px}.new-conv-button:hover{border-color:#6c9ce7;color:#257de0}
.reference-chat-head{min-height:68px;padding:10px 18px}.chat-name-line{display:flex;align-items:center;gap:8px}.seller-badge{font-size:8px;color:#a5701a;background:#fff3d8;border:1px solid #ffe4a6;padding:3px 6px;border-radius:4px}.round-action{width:30px;height:30px;border-radius:50%;background:transparent;color:#8c97a9;cursor:pointer;font-size:16px}.round-action:hover{background:#f2f4f7;color:#358be8}.wb-chat{background:#f3f6fa;padding:24px 6%}.quick-replies{display:flex;align-items:center;gap:7px;padding:9px 16px;border-top:1px solid var(--line);overflow-x:auto;white-space:nowrap}.quick-replies>span{font-size:9px;color:#999}.quick-replies button{padding:5px 9px;border-radius:16px;background:#f5f6f8;color:#636d7d;font-size:9px;cursor:pointer}.quick-replies button:hover{background:#eaf2ff;color:#267fe4}.quick-replies .manage-quick{color:#2783e6}.reference-composer{padding:0;border-top:1px solid var(--line)}.composer-tools{height:36px;display:flex;align-items:center;gap:7px;padding:0 15px}.composer-tools button{background:none;font-size:17px;color:#606b7a;cursor:pointer}.composer-tools span{margin-left:auto;color:#a1a9b5;font-size:8px}.reference-composer textarea{height:78px;resize:none;border:0;border-radius:0;padding:8px 16px;font-size:11px}.reference-composer textarea:focus{outline:0}.composer-footer{display:flex;justify-content:space-between;align-items:center;padding:7px 14px 10px}.composer-footer>span{color:#a6adba;font-size:8px}.composer-footer .send-btn{padding:7px 15px;background:#2f8df5;border-radius:6px}
.deal-sidebar{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px}.source-card{display:flex;align-items:center;gap:8px;padding:13px 16px;font-size:10px;color:var(--muted)}.source-card b{margin-left:auto;padding:3px 8px;border-radius:5px;background:#fff0ce;color:#a36d17}.deal-card{display:flex;flex-direction:column;min-height:0}.deal-tabs{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--line);padding:0 7px}.deal-tabs button{height:40px;background:none;font-size:9px;color:#4e586a;cursor:pointer;white-space:nowrap}.deal-tabs button.active{background:#2f8df5;color:#fff;border-radius:4px;margin:7px 0;height:27px}.deal-body{flex:1;min-height:0;overflow:auto;padding:12px}.recognition-card{display:flex;align-items:center;gap:9px;padding:10px;margin-bottom:10px;border-radius:9px;background:#edf6ff;color:#2076ce}.recognition-card>span{width:30px;height:30px;display:grid;place-items:center;border-radius:8px;background:#338ef2;color:#fff;font-size:9px;font-weight:800}.recognition-card b,.recognition-card small{display:block}.recognition-card b{font-size:10px}.recognition-card small{font-size:8px;margin-top:3px;color:#6193c6}.deal-order{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;padding:11px;margin-bottom:7px;border:1px solid var(--line);border-radius:9px;background:#fff;cursor:pointer}.deal-order:hover{border-color:#9dc8f5;background:#f6fbff}.deal-order span b,.deal-order span small{display:block}.deal-order span b{font-size:10px}.deal-order span small{font-size:8px;color:var(--muted);margin-top:4px}.deal-order>strong{font-size:11px;color:#ee655a}.deal-file{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:8px;padding:10px;border:1px solid var(--line);border-radius:9px;margin-bottom:7px}.deal-file>span{width:30px;height:30px;display:grid;place-items:center;border-radius:7px;background:#f0eeff;color:var(--primary)}.deal-file b,.deal-file small{display:block}.deal-file b{font-size:10px}.deal-file small{font-size:8px;color:var(--muted);margin-top:3px}.deal-file button{font-size:8px;padding:4px 6px;border-radius:5px;color:#267fe4;background:#edf6ff;cursor:pointer}.note-editor label{display:block;font-size:10px;font-weight:700;margin-bottom:8px}.note-editor textarea{min-height:160px;resize:vertical;line-height:1.7}.note-editor .btn{width:100%;margin-top:9px}.takeover-card{padding:13px}.takeover-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:11px}.takeover-row b,.takeover-row span{display:block}.takeover-row b{font-size:10px}.takeover-row span{color:var(--green);font-size:8px;margin-top:3px}.create-order-wide{width:100%;padding:9px;background:#2791f5;color:#fff;border-radius:6px;cursor:pointer;font-size:10px}.create-order-wide:hover{background:#167fe1}

/* Full-page channel and resource management */
.resource-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(320px,.7fr);gap:18px;align-items:start}.resource-list,.resource-form{border:1px solid var(--line);border-radius:16px;background:#fff;padding:18px}.resource-form{position:sticky;top:0;max-width:none}.section-heading{display:flex;align-items:center;justify-content:space-between;padding-bottom:13px;margin-bottom:10px;border-bottom:1px solid var(--line)}.section-heading>div>span{font-weight:750;font-size:13px}.section-heading b{margin-left:7px;padding:2px 6px;border-radius:10px;background:var(--primary-soft);color:var(--primary);font-size:9px}.section-heading small{display:block;margin-top:4px;color:var(--muted);font-size:9px}.resource-row{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;padding:12px 3px;border-bottom:1px solid var(--line)}.resource-row:last-child{border-bottom:0}.resource-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:#fff1d4;color:#a96e13;font-size:11px;font-weight:800}.resource-icon.customer{background:#eaf4ff;color:#257edb}.resource-row b,.resource-row span{display:block}.resource-row b{font-size:11px}.resource-row>div:nth-child(2)>span{color:var(--muted);font-size:9px;margin-top:4px}.resource-id{font-size:9px;color:var(--faint)}.full-btn{width:100%;margin-top:7px;padding:10px}.info-banner{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;margin-bottom:16px;border:1px solid #d9e9fa;border-radius:12px;background:#f1f7ff;color:#3974ad}.info-banner b{font-size:10px;white-space:nowrap}.info-banner span{font-size:9px;line-height:1.6}

.order-filters{padding-bottom:2px}.order-filters .search-wrap{margin-bottom:8px}.order-filters>.sel{margin:0 14px;width:calc(100% - 28px);background:#fff}.order-list{display:flex;flex-direction:column;gap:5px}.order-item{padding:12px;border:1px solid var(--line);border-radius:12px;cursor:pointer;transition:.16s}.order-item:hover{border-color:#cfc9ff;transform:translateY(-1px);box-shadow:0 5px 14px rgba(29,36,56,.05)}.order-item.active{border-color:#bdb5ff;background:var(--primary-soft)}.oi-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-weight:650;font-size:12px}.oi-sub{color:var(--muted);font-size:10px;margin-top:6px}.status-tag{display:inline-flex;align-items:center;padding:4px 8px;border-radius:20px;font-size:9px;background:var(--primary-soft);color:var(--primary);white-space:nowrap;font-weight:650}
.main{overflow:auto;padding:20px}.detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.detail-head h2{font-size:20px;letter-spacing:-.4px}.detail-head .meta{color:var(--muted);font-size:10px;margin-top:5px}.flow-steps{display:flex;align-items:center;gap:3px;margin:18px 0 8px;overflow-x:auto;padding-bottom:5px}.flow-step{padding:5px 8px;border-radius:7px;font-size:9px;background:#f1f2f5;color:#979fae;white-space:nowrap}.flow-step.done{background:var(--green-soft);color:var(--green)}.flow-step.cur{background:var(--primary);color:#fff}.section-title{font-size:10px;font-weight:750;margin:18px 0 8px;color:#7e8798;text-transform:uppercase;letter-spacing:.6px}.req-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:10px}.price-box{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:11px;background:#f7f8fa;border-radius:10px;font-size:11px}.price-box .inp{width:90px}.file-item{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:9px 10px;border:1px solid var(--line);border-radius:10px;margin-bottom:6px;font-size:11px}.log-list{font-size:10px;color:var(--muted);max-height:160px;overflow:auto;border:1px solid var(--line);border-radius:10px;padding:9px 11px}.log-list .li{padding:5px 0;border-bottom:1px dashed var(--line)}.log-list .li:last-child{border:0}.suggest{background:var(--amber-soft);border:1px solid #f8dfbd;border-radius:8px;padding:7px 9px;font-size:10px;margin-top:6px}.suggest b{color:#bd7629}.action-bar{display:flex;flex-wrap:wrap;gap:7px;margin-top:16px;padding:13px;background:#f8f9fb;border-radius:12px}
.dash{overflow:auto}.dash-box{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px}.stat-card{padding:12px;border:1px solid var(--line);border-radius:12px;background:linear-gradient(145deg,#fff,#fafbfc)}.stat-card.revenue{grid-column:1/-1;background:linear-gradient(135deg,#1d263b,#29344e);color:#fff;border:0}.stat-card .label{color:var(--muted);font-size:9px}.stat-card.revenue .label{color:#aeb8ca}.stat-card .val{font-size:20px;font-weight:750;margin-top:4px;letter-spacing:-.6px}.dash-box>.section-title,.dash-box>.mini-row{grid-column:1/-1}.mini-row{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;font-size:10px;padding:7px 1px;border-bottom:1px dashed var(--line)}.mini-row:last-child{border:0}.mini-row>span{min-width:0;word-break:break-word}.skeleton-card{height:70px;border-radius:12px;background:linear-gradient(90deg,#f2f3f6 25%,#f8f8fa 37%,#f2f3f6 63%);background-size:400% 100%;animation:shimmer 1.4s infinite}@keyframes shimmer{0%{background-position:100% 0}100%{background-position:0 0}}

.btn{padding:7px 11px;border:1px solid var(--line);background:#fff;border-radius:9px;cursor:pointer;font-size:11px;transition:.15s}.btn:hover{background:#f5f6f9;border-color:#d9dce5}.btn.primary{background:var(--primary);color:#fff;border-color:var(--primary)}.btn.primary:hover{background:var(--primary-dark)}.btn.green{background:var(--green);color:#fff;border-color:var(--green)}.btn.orange{background:var(--amber);color:#fff;border-color:var(--amber)}.btn.danger{background:var(--red-soft);color:var(--red);border-color:#ffd8db}.btn.subtle{color:var(--muted);background:#fafbfc}.btn.sm{padding:5px 8px;font-size:10px}.btn:disabled{opacity:.5;cursor:not-allowed}
.sel,.inp{padding:8px 10px;border:1px solid #dfe2e9;border-radius:9px;font-size:11px;width:100%;background:#fff}.inp::placeholder{color:#abb2bf}.inp:focus,.sel:focus{border-color:#a9a1ff}.fld{display:block;margin-bottom:8px}.fld>span{display:block;font-size:10px;color:var(--muted);margin-bottom:4px}.chat-box{border:1px solid var(--line);border-radius:10px;height:220px;overflow:auto;padding:10px;background:#fafbfc;margin-bottom:8px}.chat-input{display:flex;gap:6px}.chat-input .inp{flex:1}.qrow{padding:10px;border:1px solid var(--line);border-radius:10px;margin-bottom:8px;background:#fafbfc}.qrow-grid{display:flex;gap:6px}.qrow-grid .inp{font-size:10px}

.empty-state{height:100%;min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--muted);gap:5px;text-align:center;padding:25px}.empty-state.compact{min-height:180px}.empty-visual{width:52px;height:52px;border-radius:17px;background:linear-gradient(135deg,var(--primary-soft),#e5faf8);display:grid;place-items:center;color:var(--primary);font-size:24px;margin-bottom:8px}.empty-state strong{font-size:13px;color:var(--ink)}.empty-state p{font-size:10px;max-width:260px;line-height:1.6}
.modal-mask{position:fixed;inset:0;background:rgba(17,23,37,.53);backdrop-filter:blur(5px);display:none;align-items:center;justify-content:center;z-index:50;padding:20px}.modal-mask.show{display:flex}.modal{background:#fff;border-radius:18px;padding:22px;width:560px;max-width:94vw;max-height:88vh;overflow:auto;box-shadow:0 30px 80px rgba(13,18,30,.25);animation:modal-in .18s ease-out}.modal.wide{width:760px}@keyframes modal-in{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}.modal h3{font-size:17px;margin-bottom:15px}.modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:16px;padding-top:13px;border-top:1px solid var(--line)}
.qr-loading,.qr-error,.qr-success{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:112px;margin:10px 0;padding:16px;border-radius:13px;background:#f7f8fb;color:var(--muted);text-align:center}.qr-loading b,.qr-error b,.qr-success b{font-size:12px;color:var(--ink)}.qr-loading small,.qr-error span,.qr-success span{font-size:10px}.qr-error{background:var(--red-soft);color:#a63a45}.qr-error b{color:var(--red)}.qr-success{background:var(--green-soft);color:#167955}.qr-success b{color:var(--green)}.spinner{width:24px;height:24px;border:3px solid #ddd9ff;border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.qr-view{margin:10px 0;padding:13px;border:1px solid var(--line);border-radius:14px;background:#fafbfc;text-align:center}.qr-view .qr-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px}.qr-view .qr-head b{font-size:11px}.qr-view .qr-head span,.qr-help{font-size:9px;color:var(--muted)}.qr-view img{display:block;width:100%;max-width:520px;max-height:360px;object-fit:contain;margin:auto;border:1px solid var(--line);border-radius:10px;background:#fff}.qr-help{margin-top:8px}
#toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);background:#1b2234;color:#fff;padding:10px 16px;border-radius:10px;z-index:99;font-size:11px;box-shadow:0 12px 28px rgba(0,0,0,.2)}

.login-gate{position:fixed;inset:0;z-index:120;display:none;place-items:center;padding:24px;background:radial-gradient(circle at 20% 10%,rgba(105,92,246,.2),transparent 33%),linear-gradient(135deg,#111827,#1d263d 58%,#172033)}.login-gate.show{display:grid}.login-card{width:min(410px,94vw);padding:34px;background:rgba(255,255,255,.97);border:1px solid rgba(255,255,255,.7);border-radius:24px;box-shadow:0 32px 90px rgba(0,0,0,.32)}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:30px}.login-brand .brand-mark{position:relative;display:block;flex:none}.login-brand>div{display:flex;flex-direction:column}.login-brand b{font-size:18px}.login-brand small{color:var(--muted);font-size:10px;margin-top:2px}.login-card h1{font-size:26px;letter-spacing:-.8px}.login-card>p{color:var(--muted);font-size:11px;margin:7px 0 25px}.login-card .fld{margin-bottom:14px}.login-card .inp{font-size:13px;padding:11px 12px}.login-submit{width:100%;padding:11px;margin-top:8px;font-size:12px}.form-error{min-height:18px;color:var(--red);font-size:10px;margin-top:2px}
.auth-hero{display:grid;grid-template-columns:1.4fr .8fr;gap:12px;padding:15px;border-radius:15px;background:linear-gradient(135deg,#1d263b,#2b3651);color:#fff;margin:9px 0 13px}.auth-hero h4{font-size:14px;margin-bottom:5px}.auth-hero p{font-size:10px;line-height:1.6;color:#b8c2d7}.auth-state{display:flex;align-items:center;justify-content:center;gap:7px;border-radius:11px;background:rgba(255,255,255,.08);font-size:11px}.auth-state i{width:8px;height:8px;border-radius:50%;background:#8b95aa}.auth-state.connected i{background:#4fd2a4;box-shadow:0 0 0 4px rgba(79,210,164,.12)}.permission-list{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.permission-chip{padding:4px 7px;border-radius:6px;background:var(--green-soft);color:var(--green);font-size:9px}.launch-panel{padding:13px;border:1px solid var(--line);border-radius:13px;background:#fafbfc;margin:10px 0}.launch-progress{display:flex;align-items:center;gap:9px;font-size:11px;font-weight:650}.manual-code{display:flex;align-items:center;gap:7px;margin-top:10px}.manual-code code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#eef0f5;border-radius:7px;padding:7px 8px;font-size:9px;color:#47516a}.security-note{display:flex;gap:8px;padding:10px 12px;border-radius:11px;background:#f0faf7;color:#2c705d;font-size:9px;line-height:1.6;margin:9px 0}.security-note b{font-size:12px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.settings-grid .full{grid-column:1/-1}.settings-grid textarea{min-height:150px;resize:vertical;line-height:1.6}.provider-presets{display:flex;gap:6px;flex-wrap:wrap;margin:4px 0 12px}.provider-preset{font-size:9px;padding:5px 8px;border-radius:7px;background:#f2f3f7;color:#586174;cursor:pointer}.provider-preset:hover{background:var(--primary-soft);color:var(--primary)}.test-result{display:none;margin-top:10px;padding:10px 12px;border-radius:10px;font-size:10px}.test-result.show{display:block}.test-result.success{background:var(--green-soft);color:var(--green)}.test-result.error{background:var(--red-soft);color:var(--red)}.setting-hint{font-size:9px;color:var(--muted);line-height:1.6;margin-top:4px}.status-line{display:flex;align-items:center;gap:7px;font-size:10px;color:var(--muted)}.status-line .dot{width:7px;height:7px;border-radius:50%;background:#aab1c0}.status-line .dot.ok{background:var(--green)}
.user-row{display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:10px;padding:10px 11px;border:1px solid var(--line);border-radius:11px;margin-bottom:7px}.user-avatar{width:34px;height:34px;border-radius:10px;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;font-size:12px;font-weight:750}.user-meta b{font-size:11px}.user-meta small{display:block;color:var(--muted);font-size:9px;margin-top:3px}.role-tag{font-size:9px;padding:4px 7px;border-radius:6px;background:#f1f3f7;color:#697287}

@media(max-width:1240px){.view-workbench.active{grid-template-columns:250px minmax(400px,1fr)}.deal-sidebar{display:none}.view-orders.active{grid-template-columns:280px minmax(450px,1fr)}.dash{display:none}}
@media(max-width:900px){.topbar{padding:0 14px}.system-state,.brand-sub,.store-picker>span{display:none}.layout{grid-template-columns:72px minmax(0,1fr)}.sidebar-nav{padding:17px 9px}.nav-context,.nav-label,.ni-label,.nav-beta,.nav-pulse,.mc-text,.sidebar-foot div{display:none}.nav-item{justify-content:center;padding:9px}.nav-item.active:before{left:-9px}.mode-card{justify-content:center;padding:10px 6px;flex-wrap:wrap}.mode-icon{display:none}.sidebar-foot{justify-content:center;padding:14px 0 0}.view-workbench.active,.view-orders.active{grid-template-columns:230px minmax(360px,1fr);gap:10px;padding:10px}.view-management.active{padding:10px}.management-body{padding:20px}.management-head{padding:18px 20px}.resource-layout{grid-template-columns:1fr}.resource-form{position:static}}
@media(max-width:680px){body{overflow:auto}.topbar{height:64px;position:sticky;top:0}.brand-lockup{min-width:0}.brand-mark{width:34px;height:34px}.brand-lockup .brand{font-size:15px}.top-create{display:none}.store-picker{max-width:150px}.store-picker .sel{min-width:0}.layout{display:block;height:auto}.sidebar-nav{position:fixed;left:0;right:0;bottom:0;height:64px;z-index:30;display:flex;flex-direction:row;padding:7px 10px;background:rgba(23,29,45,.97);overflow:visible}.sidebar-nav>.nav-section:first-of-type{display:grid;grid-template-columns:repeat(5,1fr);width:100%;gap:3px}.sidebar-nav>.nav-section:nth-of-type(2),.nav-spacer,.mode-card,.sidebar-foot{display:none}.nav-item{height:50px;flex-direction:column;gap:2px;padding:4px}.nav-item .ni-label{display:block;font-size:7px}.nav-item.active:before{left:25%;right:25%;top:-7px;width:auto;height:3px;border-radius:0 0 4px 4px}.view{height:calc(100vh - 128px)}.view-workbench.active,.view-orders.active{grid-template-columns:1fr;padding:8px;gap:8px}.view-management.active{padding:8px}.management-head{min-height:104px;align-items:flex-start;padding:15px;flex-direction:column;gap:10px}.management-heading h1{font-size:20px}.management-actions{width:100%;justify-content:flex-start}.management-body{padding:15px 13px 30px}.management-toolbar{align-items:flex-start}.management-toolbar label{width:100%;flex-direction:column;align-items:flex-start}.management-toolbar .sel{min-width:0}.helper-download-card{grid-template-columns:42px 1fr}.helper-download-card a{grid-column:1/-1;justify-content:center}.page-actions{bottom:-30px}.message-rail,.sidebar{display:none}.chat-panel,.main{height:100%}.chat-sub,.channel-chip{display:none}.wb-chat{padding:18px 12px}.msg{max-width:90%}.req-grid,.two-col,.settings-grid,.auth-hero{grid-template-columns:1fr}.main{padding:15px}.modal{padding:18px}.qrow-grid{flex-wrap:wrap}.login-card{padding:25px}}


/* Responsive density fix: keep the full three-column workbench usable at 100% zoom. */
@media (min-width:1101px) {
  .layout {
    grid-template-columns:210px minmax(0,1fr);
  }

  .sidebar-nav {
    padding-left:12px;
    padding-right:12px;
  }

  .view-workbench.active {
    grid-template-columns:minmax(225px,260px) minmax(360px,1fr) minmax(235px,285px);
    gap:10px;
    padding:10px;
  }

  .deal-sidebar {
    display:grid;
  }

  .message-filters {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .message-filters .sel {
    min-width:0;
  }
}

@media (min-width:1101px) and (max-width:1280px) {
  .layout {
    grid-template-columns:196px minmax(0,1fr);
  }

  .view-workbench.active {
    grid-template-columns:minmax(215px,238px) minmax(350px,1fr) minmax(225px,255px);
    gap:8px;
    padding:8px;
  }

  .nav-item {
    padding-left:9px;
    padding-right:9px;
  }

  .wb-chat {
    padding-left:3.5%;
    padding-right:3.5%;
  }

  .quick-replies {
    padding-left:10px;
    padding-right:10px;
  }
}


/* Keep the workbench inside the viewport; only inner lists/messages scroll. */
.layout,
.view,
.view-workbench.active,
.message-rail,
.chat-panel {
  min-height:0;
}

.view-workbench.active {
  overflow:hidden;
}

.message-rail,
.chat-panel {
  overflow:hidden;
}

.conv-items,
.wb-chat {
  min-height:0;
  overscroll-behavior:contain;
}

.new-conv-button,
.quick-replies,
.reference-composer {
  flex-shrink:0;
}
