/* 共用交互规则；业务内容和按钮事件由现有页面维护。 */
button,input,select,textarea{font-family:inherit}
.btn{justify-content:center;white-space:nowrap;flex-shrink:0;line-height:1.4;min-height:36px}
.btn:disabled,button:disabled{opacity:.55;cursor:not-allowed}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #007aff;outline-offset:3px}
.form-control{min-width:0}
.modal-overlay{padding:12px}
.modal-box{max-height:calc(100dvh - 24px);overflow-wrap:anywhere}
.modal-box button{margin-bottom:4px}
.mobile-menu,.mobile-chat-back{display:none}
body.admin-ui .topbar{position:sticky;top:0;z-index:20;gap:12px}
body.admin-ui .topbar-title{flex:1}
body.admin-ui .card-header{gap:12px;flex-wrap:wrap}
body.admin-ui .card-body{min-width:0}
.responsive-table-scroll{width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.responsive-table-scroll table{min-width:680px}
body.admin-ui td{overflow-wrap:anywhere}
body.admin-ui td .btn{margin:2px 0}
.orders-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}
.orders-toolbar #orderStatusTabs,.orders-toolbar .order-date-filters{grid-column:1/-1;width:100%}
.orders-toolbar .order-search{display:flex;gap:8px;min-width:0}
.order-search input{flex:1;width:0;min-width:0}
.order-search button{min-width:80px}
.order-date-filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.order-date-filters>div{flex-wrap:wrap}
.orders-toolbar>div:nth-child(2){overflow:visible}
#orderTable{width:100%;min-width:1100px}
#orderTable col:nth-child(1){width:3%!important}
#orderTable col:nth-child(2){width:17%!important}
#orderTable col:nth-child(3){width:15%!important}
#orderTable col:nth-child(4){width:4%!important}
#orderTable col:nth-child(5){width:6%!important}
#orderTable col:nth-child(6){width:13%!important}
#orderTable col:nth-child(7){width:9%!important}
#orderTable col:nth-child(8){width:8%!important}
#orderTable col:nth-child(9){width:10%!important}
#orderTable col:nth-child(10){width:15%!important}
body.admin-ui .sidebar .btn-outline{color:#e2e8f0;border-color:#64748b}
body.admin-ui .sidebar .btn-outline:hover{background:#ffffff18}
.order-more{position:relative}
.order-more summary{cursor:pointer;color:#555;padding:6px 10px;border:1px solid #ddd;border-radius:8px;list-style:none;min-height:36px}
.order-more[open]{display:flex;flex-direction:column;gap:6px}
.order-more summary::after{content:' ▾'}
.order-secondary-actions{align-items:flex-start;flex-wrap:wrap}
.shop-item-name{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
body.shop-ui .btn-outline{border-color:#d1d5db;color:#374151;background:#fff}
@media(min-width:769px){body.shop-ui .col-lg-auto{width:auto}}
@media(max-width:768px){
 .btn,button.nav-item{min-height:44px;padding:10px 12px;font-size:14px}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important}
 input[type=checkbox],input[type=radio]{width:20px;height:20px;vertical-align:middle}
 .modal-box{width:100%;padding:20px;max-height:calc(100dvh - 24px)}
 .login-box{width:calc(100% - 32px);max-width:380px;padding:28px}
 body.admin-ui .content{padding:12px}
 body.admin-ui .topbar{padding:12px}
 .mobile-menu{display:inline-flex}
 body.admin-ui .sidebar{position:fixed;inset:0 auto 0 0;width:min(280px,85vw);z-index:60;transform:translateX(-100%);transition:transform .18s;overflow-y:auto;height:100dvh}
 body.admin-ui.menu-open .sidebar{transform:translateX(0)}
 .nav-backdrop{position:fixed;inset:0;background:#0008;z-index:50;border:0;width:100%;height:100%;display:none}
 body.menu-open .nav-backdrop{display:block}
 body.admin-ui.menu-open{overflow:hidden}
 body.admin-ui .grid-2{grid-template-columns:minmax(0,1fr)}
 body.admin-ui .grid-2>.form-group{grid-column:auto!important}
 body.admin-ui .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body.admin-ui .stat-card{padding:16px 10px}
 body.admin-ui .card-body{padding:14px}
 .orders-toolbar{padding:12px;grid-template-columns:minmax(0,1fr)}
 body.admin-ui .orders-toolbar .order-date-filters{overflow:visible;flex-wrap:wrap!important}
 .order-date-filters>div{min-width:0;max-width:100%;flex-shrink:1!important}
 .orders-toolbar .order-date-filters>div{width:100%}
 .order-date-filters input[type=date]{width:calc((100% - 24px)/2)!important;min-height:44px}
 .order-search{grid-column:1/-1}
 #orderStatusTabs{gap:6px!important}
 .mobile-records{min-width:0!important;width:100%!important;table-layout:auto!important;display:block}
 .mobile-records colgroup{display:none}
 .mobile-records thead{position:absolute!important;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%)}
 .mobile-records tbody{display:block;padding:8px}
 .mobile-records tr{display:block;border:1px solid #e5e7eb;border-radius:12px;margin-bottom:12px;padding:8px;background:#fff}
 .mobile-records td{display:grid!important;grid-template-columns:80px minmax(0,1fr);align-items:start;gap:8px;width:100%;padding:8px!important;border:0;white-space:normal;overflow:visible!important}
 .mobile-records td::before{content:attr(data-label);font-size:13px;color:#687386;line-height:1.6}
 .mobile-records td>*{min-width:0}
 .mobile-records td[colspan]{display:block!important;text-align:center}
 .mobile-records td[colspan]::before{display:none}
 .mobile-records .order-number{white-space:normal;overflow-wrap:anywhere}
 .mobile-records .order-copy,.mobile-records .order-card-note{grid-column:2}
 .mobile-records .order-product{-webkit-line-clamp:unset}
 .mobile-records .order-actions{align-items:stretch}
 .mobile-records .order-secondary-actions{gap:8px}
 .mobile-records .badge{justify-self:start}
 body.shop-ui .container{padding:0 12px}
 body.shop-ui header .d-flex{justify-content:center;gap:12px!important}
 body.shop-ui header .col-12{width:100%;margin-right:0!important}
 body.shop-ui .input-search{width:100%;min-height:44px}
 body.shop-ui .nav{justify-content:center}
 body.shop-ui .nav-link{min-height:44px;padding:10px 14px}
 body.shop-ui .shop-stock-info{gap:8px;flex-wrap:wrap}
 body.shop-ui .modal-box .btn{white-space:normal}
 body.chat-ui,body.chat-ui .chat-container{height:100dvh}
 body.chat-ui .sessions-panel{width:100%;flex-shrink:0}
 body.chat-ui .chat-panel{display:none;min-width:0}
 body.chat-ui.chat-selected .sessions-panel{display:none}
 body.chat-ui.chat-selected .chat-panel{display:flex;width:100%}
 .mobile-chat-back{display:inline-flex;min-height:44px;align-items:center;padding:8px 12px;border:1px solid #ddd;background:white;border-radius:8px;flex-shrink:0}
 body.chat-ui .chat-header{padding:10px;flex-wrap:wrap;gap:10px}
 body.chat-ui .chat-actions{flex-wrap:wrap;gap:6px}
 body.chat-ui .chat-actions button{min-height:44px}
 body.chat-ui .chat-input-area{padding:12px;padding-bottom:max(12px,env(safe-area-inset-bottom))}
 body.chat-ui .message{max-width:90%}
 body.chat-ui .templates-panel{max-width:calc(100vw - 24px)}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}
