/* Improvements are isolated from /demo/ and the source UI reference. */
.live-backoffice .be-guest-navigation{padding:0 20px 20px;font-size:13px;line-height:1.8;color:var(--muted,#6b7280)}
.live-backoffice .be-guest-navigation a{color:#b84400}
.live-backoffice [hidden]{display:none!important}
.live-backoffice .backend-announcement,.live-backoffice .demo-context,.live-backoffice .channel-bottom,.live-backoffice .global-footer,.live-backoffice .backend-menu-note,.live-backoffice .tool-link>small{display:none}
/* Keep the sticky search flush with the scrollport so menu text cannot peek above it. */
.live-backoffice .backend-sidebar{padding-top:0;scroll-padding-top:106px;overscroll-behavior:contain;max-height:calc(100dvh - 40px)}
.live-backoffice .be-menu-search{position:sticky;top:0;z-index:3;padding:14px 12px 10px;background:#fff;border-bottom:1px solid var(--line,#e6e8ec)}
.live-backoffice .be-menu-search label{display:block;margin-bottom:7px;font-size:12px;font-weight:600;color:var(--ink,#1f2329)}
.live-backoffice .be-menu-search>div{position:relative}
.live-backoffice .be-menu-search input{box-sizing:border-box;width:100%;min-width:0;min-height:36px;padding:7px 42px 7px 9px;border:1px solid #dfe2e7;border-radius:7px;background:#f8f9fb;font:12px/1.5 var(--sans,sans-serif);color:#1f2329}
.live-backoffice .be-menu-search input::-webkit-search-cancel-button{display:none}
.live-backoffice .be-menu-search button{position:absolute;right:4px;top:4px;min-height:28px;padding:2px 4px;border:0;background:transparent;font-size:11px;color:var(--accent-strong,#c2410c);cursor:pointer}
.live-backoffice .be-menu-search p{margin:8px 0 0;font-size:12px;line-height:1.6;color:#6b7280}
.live-backoffice .backend-home[aria-current=page]{background:var(--accent-soft,#fff3ec);color:var(--accent-strong,#c2410c)}
.live-backoffice .backend-group [aria-current=page]{font-weight:600}
.live-backoffice :is(a,button,summary):focus-visible{outline:2px solid var(--accent,#eb5405);outline-offset:3px}
.live-backoffice .be-page-state{padding:40px 24px;max-width:640px;margin:auto;text-align:center}
.live-backoffice .be-page-state :is(h1,h2){font:600 22px/1.5 var(--sans,sans-serif);color:#1f2329;margin:0 0 10px}
.live-backoffice .be-page-state p{font-size:14px;line-height:1.8;color:#6b7280;margin:0 0 20px;overflow-wrap:anywhere}
.live-backoffice .be-page-state .be-state-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px}
.live-backoffice form[aria-busy=true]{cursor:progress}
.live-backoffice #admin-engine fieldset:not(.ae-checks){min-width:0;margin:0;padding:0;border:0}
.live-backoffice #stock-upload fieldset{min-width:0;margin:0;padding:0;border:0}
.live-backoffice #admin-engine .be-form-section{margin:26px 0 14px;padding-bottom:10px;border-bottom:1px solid var(--line,#e6e8ec);font-size:16px}
.live-backoffice #admin-engine .be-form-section:first-child{margin-top:0}
.live-backoffice #admin-engine .be-form-actions{position:sticky;bottom:0;z-index:3;padding:14px 0;background:#fff;border-top:1px solid var(--line,#e6e8ec)}
.live-backoffice #admin-engine .be-list-actions{position:sticky;top:0;z-index:3;padding:10px 0;background:#fff}
.live-backoffice #admin-engine .be-list-actions>span{margin-right:auto;font-size:13px;color:#6b7280}
.live-backoffice #admin-engine .ae-status:empty{display:none}
.live-backoffice #member-list table{min-width:760px}
.live-backoffice #admin-engine[data-module=ic] .ae-scroll table,.live-backoffice #admin-engine[data-module=ic_hot] .ae-scroll table,.live-backoffice #admin-engine[data-module=ic_xianhuo] .ae-scroll table,.live-backoffice #admin-engine[data-module=ic_yuanzhuang] .ae-scroll table{min-width:860px}
.live-backoffice #member-list td:nth-child(2){min-width:190px}
.live-backoffice #member-list :is(td:nth-child(4),td:nth-child(6),td:last-child){white-space:nowrap}
.live-backoffice .be-table-hint{display:none}
.live-backoffice .be-loading{padding:16px;color:#6b7280}
.live-backoffice form [role=alert]:not([hidden]){border:1px solid #f6d0cb;border-radius:8px;background:#fef3f2;color:#b42318;font-size:13px;padding:12px;line-height:1.7;overflow-wrap:anywhere}
.live-backoffice .be-password{display:flex;align-items:stretch;position:relative;width:100%;min-width:0}
.live-backoffice .be-password input{width:100%;box-sizing:border-box;padding-right:62px!important}
.live-backoffice .be-password-toggle{position:absolute;right:5px;top:50%;transform:translateY(-50%);min-height:30px;padding:3px 10px;border:0;background:transparent;color:var(--accent-strong,#c2410c);font:13px var(--sans,sans-serif);cursor:pointer}
.live-backoffice .toast{max-width:calc(100vw - 32px);box-sizing:border-box;display:flex;align-items:center;gap:16px;white-space:normal;overflow-wrap:anywhere}
.live-backoffice .toast [data-dismiss-notice]{flex-shrink:0;min-width:32px;min-height:32px;border:0;background:transparent;color:inherit;font-size:22px;cursor:pointer}
@media(max-width:980px){
 body.live-backoffice .backend-top{min-width:0}
 body.live-backoffice .backend-top nav{min-width:0;scrollbar-width:none}
 body.live-backoffice .backend-top nav::-webkit-scrollbar{display:none}
}
@media(max-width:650px){
 .live-backoffice .be-table-hint{display:block;margin:8px 0;color:#6b7280;font-size:12px}
 body.live-backoffice.backend .btn.backend-menu-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;margin:0 0 12px}
 body.live-backoffice .backend-sidebar[data-toggle-ready="1"]:not(.open){display:none}
 body.live-backoffice .backend-sidebar[data-toggle-ready="1"]{max-height:60vh;margin-bottom:16px}
 body.live-backoffice .backend-sidebar.open{display:block}
 body.live-backoffice .backend-top{min-height:0;height:auto;padding:12px;gap:8px;flex-wrap:wrap}
 body.live-backoffice .backend-top nav{flex-basis:100%;order:3;width:100%;gap:20px}
 body.live-backoffice .backend-top nav a{min-height:36px;display:inline-flex;align-items:center}
 body.live-backoffice .backend-account{display:flex;margin-left:auto;font-size:12px}
 body.live-backoffice .backend-account .avatar{display:none}
 body.live-backoffice .backend-group a{min-height:40px;display:flex;align-items:center}
 body.live-backoffice .be-menu-search input{min-height:44px;font-size:16px}
 body.live-backoffice .be-menu-search button{top:8px}
 body.live-backoffice .be-page-state{padding:28px 16px}
 body.live-backoffice .be-page-state :is(h1,h2){font-size:20px}
 body.live-backoffice #admin-engine :is(input:not([type=checkbox]):not([type=radio]),select,textarea),body.live-backoffice .auth input{font-size:16px;min-height:42px}
 body.live-backoffice .auth{max-width:100%;box-sizing:border-box}
 body.live-backoffice .toast{bottom:16px}
}

.live-backoffice .supply-photos{grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr))}.live-backoffice .supply-watermark{grid-column:1/-1}.live-backoffice .supply-photo{min-width:0;padding:12px;border:1px solid #e6e8ec;border-radius:8px}.live-backoffice .supply-photo input[type=file]{box-sizing:border-box;width:100%;min-width:0}.live-backoffice .supply-photo img{display:block;object-fit:contain;margin:10px 0}.live-backoffice .supply-photo button{margin-top:8px}@media(max-width:650px){.live-backoffice .supply-photos{grid-template-columns:minmax(0,1fr)}}

body.backend [data-member-usage] .member-usage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
body.backend [data-member-usage] .member-usage-grid h3{margin:10px 0;font-size:14px}
body.backend [data-member-usage] .member-usage-grid p{margin:8px 0}
body.backend [data-member-usage] .member-usage-grid strong{font-size:24px;font-variant-numeric:tabular-nums}
@media(max-width:650px){body.backend [data-member-usage] .member-usage-grid{grid-template-columns:1fr;gap:8px}}

/* Floating backoffice login modal (keeps management shell visible, zero page jump) */
body.be-login-modal-open{overflow:hidden}
.be-login-overlay{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:20px;background:rgb(15 23 42 / 18%);backdrop-filter:none;-webkit-backdrop-filter:none;animation:beLoginFade .16s ease-out}
.be-login-overlay[hidden]{display:none!important}
.be-login-modal{position:relative;width:min(392px,100%);max-height:calc(100dvh - 40px);overflow-y:auto;box-sizing:border-box;padding:32px 30px 26px;background:#fff;border:1px solid #e6eaf0;border-top:3px solid var(--accent,#e65016);border-radius:12px;box-shadow:0 20px 50px rgb(15 23 42 / 16%),0 4px 12px rgb(15 23 42 / 6%);animation:beLoginPop .18s ease-out}
.be-login-modal-close{position:absolute;top:18px;right:18px;width:30px;height:30px;display:grid;place-items:center;border:0;border-radius:7px;background:transparent;color:#94a3b8;font-size:20px;line-height:1;cursor:pointer;transition:background-color .14s ease,color .14s ease}
.be-login-modal-close:hover{background:#f1f5f9;color:#0f172a}
.be-login-modal h2{margin:0 0 24px;font-size:20px;font-weight:700;color:#0f172a;line-height:1.35}
.be-login-modal-sub{margin:-14px 0 18px;font-size:12.5px;line-height:1.5;color:#64748b}
.be-login-modal-form{display:grid;gap:16px}
.be-login-modal-field{display:grid;min-width:0}
.be-login-modal-field input{width:100%;height:46px;min-height:46px;padding:0 14px;border:1px solid #dce2ea;border-radius:8px;background:#fafbfc;color:#0f172a;font-size:14px;box-sizing:border-box;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}
.be-login-modal-field input:focus{outline:none;background:#fff;border-color:var(--accent,#e65016);box-shadow:0 0 0 3px rgb(230 80 22 / 12%)}
.be-login-modal-field .be-password-toggle{min-height:34px;min-width:48px;font-size:13px;right:6px}
.be-login-modal-captcha-row{display:flex;align-items:center;gap:8px}
.be-login-modal-captcha-row input{flex:1 1 auto;min-width:0}
.be-login-modal-captcha-row img{flex-shrink:0;width:86px;height:28px;object-fit:contain;border:1px solid #dce2ea;border-radius:6px;background:#fff}
.be-login-modal-captcha-refresh{flex-shrink:0;min-height:34px;padding:0 8px;border:0;background:transparent;color:var(--accent-strong,#c2410c);font-size:12.5px;cursor:pointer;white-space:nowrap}
.be-login-modal-captcha-refresh:hover{text-decoration:underline}
.be-login-modal-alert{margin:0;padding:10px 12px;border:1px solid #f6d0cb;border-radius:8px;background:#fef3f2;color:#b42318;font-size:12.5px;line-height:1.5}
.be-login-modal-submit{width:100%;height:46px;min-height:46px;margin-top:6px;border-radius:8px;font-size:15px;font-weight:600;cursor:pointer}
.be-login-modal-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:22px;padding-top:16px;border-top:1px solid #f1f5f9;font-size:13px}
.be-login-modal-foot a{color:var(--accent-strong,#c2410c);text-decoration:none}
.be-login-modal-foot a:hover{text-decoration:underline}
@keyframes beLoginFade{from{opacity:0}to{opacity:1}}
@keyframes beLoginPop{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
@media(max-width:640px){
 .be-login-overlay{padding:14px}
 .be-login-modal{padding:22px 20px 20px}
 .be-login-modal-field input{font-size:16px}
}

/* Formal /backend/login.html: float centered over the real backoffice shell instead of hiding sidebar */
body.backend.live-backoffice:has(#admin-engine form[data-form="login"]) #admin-engine{position:fixed;inset:0;z-index:1200;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;margin:0;max-width:none;background:rgb(15 23 42 / 18%);backdrop-filter:none;-webkit-backdrop-filter:none;box-sizing:border-box}
body.backend.live-backoffice:has(#admin-engine form[data-form="login"]) #admin-engine>h1{position:relative;z-index:2;width:min(440px,100%);margin:0;padding:26px 30px 10px;background:#fff;border:1px solid #e2e8f0;border-bottom:0;border-top:3px solid var(--accent,#eb5405);border-radius:14px 14px 0 0;box-sizing:border-box;font-size:22px;font-weight:700;color:#0f172a;line-height:1.35}
body.backend.live-backoffice:has(#admin-engine form[data-form="login"]) #admin-engine>.ae-panel{position:relative;z-index:1;width:min(440px,100%);margin:0;padding:12px 30px 28px;background:#fff;border:1px solid #e2e8f0;border-top:0;border-radius:0 0 14px 14px;box-shadow:0 24px 60px rgb(15 23 42 / 22%);box-sizing:border-box}
body.backend.live-backoffice #admin-engine form[data-form="login"] .ae-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
body.backend.live-backoffice #admin-engine form[data-form="login"] label{display:grid;gap:6px;font-size:13px;font-weight:500;color:#334155;min-width:0}
body.backend.live-backoffice #admin-engine form[data-form="login"] :is(input,select){width:100%;min-width:0;min-height:44px;height:44px;font-size:15px;border-radius:8px;box-sizing:border-box}
body.backend.live-backoffice #admin-engine form[data-form="login"] .be-password-toggle{min-height:36px;min-width:52px;font-size:13px}
body.backend.live-backoffice #admin-engine form[data-form="login"] .ae-toolbar{margin:20px 0 0;padding:0}
body.backend.live-backoffice #admin-engine form[data-form="login"] .ae-primary{width:100%;min-height:44px;height:44px;font-size:15px;font-weight:600;border-radius:8px}
@media(max-width:640px){
 body.backend.live-backoffice:has(#admin-engine form[data-form="login"]) #admin-engine{padding:14px}
 body.backend.live-backoffice:has(#admin-engine form[data-form="login"]) #admin-engine>h1{padding:22px 20px 8px}
 body.backend.live-backoffice:has(#admin-engine form[data-form="login"]) #admin-engine>.ae-panel{padding:10px 20px 22px}
 body.backend.live-backoffice #admin-engine form[data-form="login"] :is(input,select){font-size:16px}
}
body.backend.live-backoffice #admin-engine form[data-form="login"] .be-login-error{color:#b42318;font-size:13px;line-height:1.6}
body.backend.live-backoffice #admin-engine form[data-form="login"] .be-login-error[hidden]{display:none}
body.backend.live-backoffice #admin-engine form[data-form="login"] [aria-invalid="true"]{border-color:#b42318}

/* Backoffice WeChat QR & Enterprise QQ panel (/backend/company.html & /settings.html) */
.be-wechat-qr-panel{margin:0 0 18px;padding:18px 20px;background:#fff;border:1px solid #e5e9f0;border-radius:10px}
.be-im-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:22px;align-items:start}
.be-wx-layout{display:flex;align-items:center;gap:18px;min-width:0}
.be-entqq-box{min-width:0;padding-left:22px;border-left:1px solid #eef2f6}
.be-wx-preview{width:116px;height:116px;flex:0 0 116px;display:flex;align-items:center;justify-content:center;border:1.5px dashed #cbd5e1;border-radius:10px;background:#f8fafc;cursor:pointer;overflow:hidden;transition:border-color .15s ease,background-color .15s ease}
.be-wx-preview:hover,.be-wx-preview[data-drag="1"]{border-color:#28c445;background:#f0fdf4}
.be-wx-preview img{width:106px;height:106px;object-fit:contain;display:block;background:#fff;border-radius:6px}
.be-wx-placeholder{display:flex;flex-direction:column;align-items:center;gap:6px;color:#28c445;font-size:12px}
.be-wx-placeholder svg{width:30px;height:30px;display:block}
.be-wx-placeholder span{color:#64748b;font-size:11.5px}
.be-wx-body{min-width:0;flex:1 1 auto}
.be-wx-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0 0 6px}
.be-wx-title-row h2{margin:0;font-size:15.5px;font-weight:600;color:#0f172a;line-height:1.35}
.be-wx-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:11.5px;font-weight:500;line-height:1.4}
.be-wx-badge[data-state="active"]{background:#dcfce7;color:#15803d}
.be-wx-badge[data-state="ent"]{background:#dbeafe;color:#1d4ed8}
.be-wx-badge[data-state="empty"]{background:#f1f5f9;color:#64748b}
.be-wx-desc{margin:0 0 12px;font-size:12.5px;line-height:1.6;color:#475569}
.be-wx-desc code{font-size:11.5px;padding:1px 4px;border-radius:4px;background:#f1f5f9;color:#334155}
.be-wx-actions,.be-entqq-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.be-entqq-input{flex:1 1 200px;min-width:0;height:34px;min-height:34px;padding:0 10px;border:1px solid #d5dde7;border-radius:6px;font-size:13px;color:#0f172a;box-sizing:border-box}
.be-entqq-input:focus{outline:none;border-color:#1296db;box-shadow:0 0 0 3px rgb(18 150 219 / 12%)}
.be-wx-upload-btn{background:#28c445;border-color:#28c445;color:#fff}
.be-wx-upload-btn:hover:not(:disabled){background:#20ae3b;border-color:#20ae3b;color:#fff}
.be-entqq-save-btn{background:#1296db;border-color:#1296db;color:#fff}
.be-entqq-save-btn:hover:not(:disabled){background:#0e82bf;border-color:#0e82bf;color:#fff}
.be-wx-hint{font-size:12px;color:#94a3b8}
.be-wx-status{margin:8px 0 0;font-size:12px;line-height:1.5;color:#15803d}
.be-wx-status[data-tone="error"]{color:#b42318}
@media(max-width:920px){
 .be-im-grid{grid-template-columns:minmax(0,1fr);gap:18px}
 .be-entqq-box{padding-left:0;padding-top:16px;border-left:0;border-top:1px solid #eef2f6}
}
@media(max-width:640px){
 .be-wx-layout{flex-direction:column;align-items:flex-start;gap:14px}
}
