/* 境舟 ERP · 统一界面规范（保持现有信息架构与页面布局） */
:root{
  --jz-primary:#155eef;
  --jz-primary-hover:#0f4fd1;
  --jz-primary-soft:#eef4ff;
  --jz-cyan:#22c7d9;
  --jz-text:#233044;
  --jz-text-secondary:#59677a;
  --jz-muted:#8a96a7;
  --jz-border:#dce4ee;
  --jz-border-light:#e9eef4;
  --jz-bg:#f5f8fc;
  --jz-surface:#fff;
  --jz-danger:#e5484d;
  --jz-success:#18a566;
  --jz-warning:#d98b24;
  --jz-radius:6px;
  --jz-shadow:0 8px 26px rgba(23,43,77,.10);
}

html,body,#app{color:var(--jz-text);background:var(--jz-bg)}
button,input,select,textarea{font-family:inherit}
button:focus-visible,[role="button"]:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid rgba(21,94,239,.38);outline-offset:2px}
button:disabled{cursor:not-allowed!important;opacity:.46!important}

.reference-shell{min-width:1024px!important;background:var(--jz-bg)!important;color:var(--jz-text)!important}
.reference-shell:before{opacity:.24!important}
.reference-sidebar{border-right:1px solid var(--jz-border-light)!important;box-shadow:2px 0 12px rgba(31,48,75,.035)!important}
.reference-logo{padding-left:16px!important;border-bottom:1px solid var(--jz-border-light)!important}
.reference-logo>span{border-radius:9px!important}
.reference-logo>b{color:#1c2b42!important;font-weight:600!important}.reference-logo small{letter-spacing:.45px!important}
.reference-sidebar .side-tools{border-bottom:1px solid var(--jz-border-light)!important}
.reference-sidebar .side-tools button,.reference-tab-actions button,.reference-topbar .top-actions>button{transition:background .15s,color .15s,transform .15s}
.reference-sidebar .side-tools button:hover,.reference-tab-actions button:hover,.reference-topbar .top-actions>button:hover{background:var(--jz-primary-soft)!important;color:var(--jz-primary)!important}
.reference-sidebar .side-tools button:active,.reference-tab-actions button:active,.reference-topbar .top-actions>button:active{transform:translateY(1px)}
.reference-side-menu{padding-top:10px!important}
.reference-menu-title{height:46px!important;min-height:46px!important;line-height:46px!important;padding:0 18px!important;color:#314157!important;font-weight:600!important}
.reference-side-item,.reference-side-menu .side-link{height:46px!important;min-height:46px!important;line-height:46px!important;padding:0 20px!important;border-left:3px solid transparent!important;color:var(--jz-text-secondary)!important}
.reference-side-item:hover,.reference-side-menu .side-link:hover{background:#f6f9fd!important;color:var(--jz-primary)!important}
.reference-side-item.active,.reference-side-menu .side-link.active{border-left-color:var(--jz-primary)!important;background:var(--jz-primary-soft)!important;color:var(--jz-primary)!important;font-weight:500!important}

.reference-topbar{border-bottom-color:var(--jz-border-light)!important;box-shadow:0 1px 0 rgba(31,48,75,.02)!important}
.reference-topbar .top-nav{align-items:center!important;gap:4px!important}
.reference-topbar .top-nav-item{height:42px!important;min-width:82px!important;padding:0 13px!important;border-radius:7px!important;color:var(--jz-text-secondary)!important}
.reference-topbar .top-nav-item:hover{background:#f7f9fc!important;color:var(--jz-primary)!important}
.reference-topbar .top-nav-item.active{position:relative;background:#f7f9fc!important;color:var(--jz-primary)!important;font-weight:500!important}
.reference-topbar .top-nav-item.active:after{content:"";position:absolute;left:14px;right:14px;bottom:4px;height:2px;border-radius:2px;background:var(--jz-primary)}
.reference-topbar .top-actions{gap:6px!important}
.reference-topbar .top-actions>button{width:36px!important;height:36px!important;padding:0!important;border-radius:6px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}
.top-account-name{max-width:130px;overflow:hidden;color:#34445a;text-overflow:ellipsis;white-space:nowrap}
.reference-user-trigger{min-width:110px!important;max-width:170px!important;border-radius:6px!important}
.reference-user-trigger:hover{background:#f5f8fc!important;color:var(--jz-primary)!important}
.reference-user-dropdown{top:52px!important;right:0!important;width:160px!important;max-width:calc(100vw - 20px)!important;overflow:visible!important;border-color:var(--jz-border)!important;border-radius:7px!important;box-shadow:var(--jz-shadow)!important}
.reference-user-dropdown:before{right:20px!important}
.reference-user-dropdown button{min-height:42px!important;padding:0 14px!important;color:var(--jz-text-secondary)!important}
.reference-user-dropdown button:hover{background:var(--jz-primary-soft)!important;color:var(--jz-primary)!important}

.reference-tab-strip{height:42px!important;padding-left:14px!important;border-bottom-color:var(--jz-border)!important;background:#f8faff!important;overflow:visible!important}
.reference-tab{height:42px!important;padding:0 16px!important;border-color:var(--jz-border)!important;color:var(--jz-text-secondary)!important}
.reference-tab.active{border-top-color:var(--jz-primary)!important;color:var(--jz-primary)!important;font-weight:500!important}
.reference-tab span[role="button"]{width:22px;height:22px;margin-left:7px;display:inline-flex;align-items:center;justify-content:center;border-radius:4px;color:#95a1b2}
.reference-tab span[role="button"]:hover{background:#e9eff8;color:var(--jz-danger)}
.reference-tab-actions{height:42px!important}
.reference-tab-actions button{width:42px!important;height:42px!important;border-left:1px solid var(--jz-border-light)!important}

.reference-content{box-sizing:border-box!important;padding-bottom:78px!important;overflow:auto!important;scrollbar-gutter:stable}
.reference-footer{height:62px!important;border-top-color:var(--jz-border)!important;background:rgba(255,255,255,.985)!important;color:var(--jz-text-secondary)!important;font-size:12px!important;z-index:25!important}
.reference-footer small{color:var(--jz-muted)!important}
.reference-footer{overflow:hidden!important;text-overflow:ellipsis!important}

.reference-shell input:not([type="checkbox"]):not([type="radio"]),.reference-shell select,.reference-shell textarea{box-sizing:border-box;border:1px solid var(--jz-border)!important;border-radius:var(--jz-radius)!important;background:#fff;color:var(--jz-text-secondary);transition:border-color .15s,box-shadow .15s}
.reference-shell input:not([type="checkbox"]):not([type="radio"]):hover,.reference-shell select:hover,.reference-shell textarea:hover{border-color:#b9c7d8!important}
.reference-shell input:not([type="checkbox"]):not([type="radio"]):focus,.reference-shell select:focus,.reference-shell textarea:focus{border-color:var(--jz-primary)!important;box-shadow:0 0 0 3px rgba(21,94,239,.08)!important;outline:0}
.reference-shell input::placeholder,.reference-shell textarea::placeholder{color:#a7b1bf}
.reference-shell button{border-radius:var(--jz-radius);transition:border-color .15s,background .15s,color .15s,box-shadow .15s}
.reference-shell .ref-primary{border-color:var(--jz-primary)!important;background:var(--jz-primary)!important;color:#fff!important;box-shadow:0 3px 8px rgba(21,94,239,.16)}
.reference-shell .ref-primary:hover{border-color:var(--jz-primary-hover)!important;background:var(--jz-primary-hover)!important;box-shadow:0 4px 12px rgba(21,94,239,.22)}
.reference-shell .danger-text{color:var(--jz-danger)!important}

.product-filter-row,.order-filter-one,.order-filter-two,.reference-action-row,.tool-filter-row{box-sizing:border-box!important;height:auto!important;min-height:46px!important;padding:6px 10px!important;gap:8px!important;align-items:center!important;flex-wrap:wrap!important;overflow:visible!important}
.product-filter-row input,.product-filter-row select,.order-filter-one input,.order-filter-one select,.order-filter-two input,.order-filter-two select,.tool-filter-row input,.tool-filter-row select{height:34px!important}
.reference-action-row{border:1px solid var(--jz-border-light)!important;border-radius:var(--jz-radius)!important;background:rgba(255,255,255,.92)!important}
.reference-action-row button{height:34px!important;padding:0 13px!important;border:1px solid var(--jz-border)!important;background:#fff!important;color:var(--jz-text-secondary)!important}
.reference-action-row button:hover{border-color:#a9c7fb!important;color:var(--jz-primary)!important;background:var(--jz-primary-soft)!important}
.reference-action-row .ref-primary{background:var(--jz-primary)!important;color:#fff!important}
.product-filter-row .account-scope-picker,.order-filter-one .account-scope-picker{margin-right:2px}
.account-scope-trigger{border-color:var(--jz-border)!important;border-radius:var(--jz-radius)!important}
.account-scope-picker.open .account-scope-trigger{border-color:var(--jz-primary)!important;box-shadow:0 0 0 3px rgba(21,94,239,.08)}
.account-scope-menu,.account-scope-submenu{max-height:min(420px,calc(100vh - 190px));overflow-y:auto;border-color:var(--jz-border)!important;border-radius:7px!important;box-shadow:var(--jz-shadow)!important}
.account-scope-submenu{left:calc(100% - 4px)!important}

/* Compact product date range popup and keep it inside the content area. */
.reference-shell .product-date-popup{width:min(640px,calc(100vw - 210px))!important;grid-template-columns:88px repeat(2,minmax(0,1fr))!important;overflow:hidden!important}
.reference-shell .product-date-popup>nav{padding:8px 0!important}
.reference-shell .product-date-popup>nav button{height:29px!important;padding:0 10px!important;font-size:12px!important}
.reference-shell .product-calendar{padding:9px 11px 10px!important}
.reference-shell .product-calendar header{height:27px!important;grid-template-columns:52px 1fr 52px!important}
.reference-shell .product-calendar header button{width:20px!important;height:24px!important;font-size:14px!important}
.reference-shell .product-calendar-week i{height:25px!important;font-size:11px!important}
.reference-shell .product-calendar-day{height:28px!important;font-size:11px!important}
.reference-shell .product-date-popup>p{padding:5px 12px 8px!important}
.product-filter-row .product-date-popup{left:auto!important;right:0!important}

.reference-products,.reference-orders,.reference-tools{box-sizing:border-box;max-width:100%;min-width:0!important}
.reference-product-table,.reference-order-table,.account-manager-table,.shop-manager-table{border-color:var(--jz-border)!important;background:#fff!important}
.reference-product-table thead,.reference-order-table thead,.account-manager-table thead,.shop-manager-table thead{background:#f7f9fc!important}
.reference-product-table th,.reference-order-table th,.account-manager-table th,.shop-manager-table th{color:#66758a!important;font-weight:600!important}
.reference-product-table td,.reference-order-table td,.account-manager-table td,.shop-manager-table td{border-bottom-color:var(--jz-border-light)!important;color:var(--jz-text-secondary)!important}
.reference-product-table tbody tr:hover,.reference-order-table tbody tr:hover,.account-manager-table tbody tr:hover,.shop-manager-table tbody tr:hover{background:#f8fbff!important}
.reference-product-titles a{color:var(--jz-primary)!important;font-weight:500!important}.reference-product-titles b{color:#3a485b!important;font-weight:400!important}
.reference-product-thumb{border-color:var(--jz-border)!important;border-radius:6px!important;background:#f7f9fc!important;overflow:hidden}
.product-facts{border-color:var(--jz-border)!important;border-radius:5px!important;overflow:hidden}
.reference-empty{height:150px!important;color:var(--jz-muted)!important;text-align:center!important}
.reference-pager{box-sizing:border-box!important;min-height:50px!important;padding:8px 14px!important;border-top:1px solid var(--jz-border-light)!important;background:#fff!important;overflow:hidden!important}
.reference-pager button{border-radius:5px!important}.reference-pager button.active{background:var(--jz-primary)!important;color:#fff!important}

.home-layout{gap:20px!important;padding:20px!important}.order-stats-panel,.rank-panel{border-color:var(--jz-border)!important;border-radius:8px!important;background:rgba(255,255,255,.96)!important;box-shadow:0 4px 16px rgba(23,43,77,.055)!important}
.reference-stat-grid{gap:14px!important}.reference-stat-grid article{border-color:var(--jz-border)!important;border-radius:7px!important;box-shadow:0 3px 12px rgba(23,43,77,.055)!important;overflow:hidden}
.reference-stat-grid article header{border-bottom-color:var(--jz-border-light)!important;color:var(--jz-text-secondary)!important}.reference-stat-grid .blue{color:var(--jz-primary)!important}

.shop-manager-page,.account-manager-page,.account-system-home{box-sizing:border-box!important;margin:0!important;padding:22px!important;min-width:0!important;background:rgba(255,255,255,.95)!important}
.shop-manager-toolbar,.account-manager-toolbar{min-height:54px;gap:16px!important;align-items:center!important}
.shop-manager-toolbar h2,.account-manager-toolbar h2{font-size:19px!important;color:var(--jz-text)!important}.shop-manager-toolbar p,.account-manager-toolbar p{color:var(--jz-muted)!important}
.shop-manager-table,.account-manager-table{border-radius:7px;overflow:hidden}
.shop-status,.shop-auth-empty,.shop-auth-ok,.account-role,.account-status{padding:4px 10px!important;border-radius:14px!important;font-size:12px!important}
.account-system-home{padding-top:28px!important}.account-system-title{font-size:18px!important;color:var(--jz-text)!important}
.account-system-cards{gap:16px!important}
.account-system-cards button{min-height:88px!important;padding:16px 18px!important;border:1px solid var(--jz-border-light)!important;border-radius:8px!important;background:#f8faff!important}
.account-system-cards button:hover{border-color:#b9d2ff!important;background:var(--jz-primary-soft)!important;box-shadow:0 6px 18px rgba(21,94,239,.08)}
.account-system-cards i{width:42px;height:42px;display:flex;align-items:center;justify-content:center;flex:0 0 42px;border-radius:10px;background:#e9f1ff;color:var(--jz-primary)!important;font-size:20px!important}
.account-system-cards b{color:var(--jz-text)!important}.account-system-cards small{color:var(--jz-muted)!important}
.account-summary{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:14px;margin-bottom:18px}
.account-summary article{padding:15px 17px;border:1px solid var(--jz-border-light);border-radius:7px;background:#f8faff}
.account-summary span{display:block;margin-bottom:8px;color:var(--jz-muted);font-size:12px}.account-summary strong{color:var(--jz-text);font-size:22px;font-weight:600}
.account-section-copy{margin:4px 0 0;color:var(--jz-muted)}

.modal{padding:16px;overflow:auto!important}.reference-user-dialog,.account-manager-dialog,.shop-manager-dialog,.workflow-dialog,.model-category-dialog,.product-copy-dialog{max-width:calc(100vw - 32px)!important;max-height:calc(100vh - 32px)!important;border-radius:9px!important;box-shadow:0 20px 60px rgba(16,31,56,.28)!important;overflow:auto!important}
.reference-user-dialog>header,.account-manager-dialog>header,.shop-manager-dialog>header,.workflow-dialog>header,.model-category-dialog>header,.product-copy-dialog>header{position:sticky;top:0;z-index:3;background:#fff;border-bottom-color:var(--jz-border-light)!important}
.reference-user-dialog>footer,.reference-user-dialog form>footer,.account-manager-dialog>footer,.shop-manager-dialog>footer,.workflow-dialog>footer,.model-category-dialog>footer,.product-copy-dialog>footer{position:sticky!important;bottom:0!important;z-index:3;background:#fff!important;border-top-color:var(--jz-border-light)!important}
.reference-profile-form,.account-manager-body,.shop-manager-body{box-sizing:border-box!important;max-width:100%!important}
.account-form-grid{gap:18px 22px!important}.account-form-grid label{min-width:0!important}.account-form-grid small{color:var(--jz-muted);line-height:1.45}
.toast{top:72px!important;right:22px!important;max-width:min(420px,calc(100vw - 32px));border-radius:7px!important;background:#233044!important;box-shadow:var(--jz-shadow)!important;z-index:3000!important}

/* Global select language: one chevron, one inset and one focus treatment. */
.reference-shell select:not([multiple]){
  -webkit-appearance:none!important;
  appearance:none!important;
  box-sizing:border-box!important;
  padding-right:34px!important;
  background-color:#fff!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.25 6 6.25 11 1.25' fill='none' stroke='%2373849A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;
  background-position:right 12px center!important;
  background-size:10px 7px!important;
}
.reference-shell select:not([multiple]):disabled{background-color:#f4f6f9!important;color:#9aa6b6!important}

/* Custom dropdowns use the same CSS chevron and cannot be clipped by toolbars. */
.account-scope-trigger b{position:relative;width:16px;height:16px;flex:0 0 16px;font-size:0!important}
.account-scope-trigger b::before{content:"";position:absolute;left:4px;top:3px;width:7px;height:7px;border-right:1.5px solid #73849a;border-bottom:1.5px solid #73849a;transform:rotate(45deg);transition:transform .15s ease}
.account-scope-picker.open .account-scope-trigger b::before{top:7px;transform:rotate(225deg)}
.account-scope-menu.one-level{overflow-x:hidden!important;overflow-y:auto!important}
.account-scope-menu.two-level{max-height:none!important;overflow:visible!important}
.account-scope-submenu{max-height:min(420px,calc(100vh - 190px))!important;overflow-x:hidden!important;overflow-y:auto!important;z-index:2300!important}
.shop-account-scope .account-scope-submenu{left:auto!important;right:calc(100% - 4px)!important}
.product-filter-row,.order-filter-one,.order-filter-two,.reference-action-row,.shop-manager-toolbar,.shop-manager-toolbar-actions{overflow:visible!important}
.product-batch-menu,.order-action-menu{z-index:2300!important;max-height:min(360px,calc(100vh - 180px));overflow-x:hidden;overflow-y:auto;border-color:var(--jz-border)!important;border-radius:7px!important;box-shadow:var(--jz-shadow)!important}
.variant-attribute-select{overflow:visible!important}
.variant-attribute-menu{z-index:2300!important;max-height:min(320px,calc(100vh - 150px));overflow-x:hidden;overflow-y:auto;border-color:var(--jz-border)!important;border-radius:7px!important;box-shadow:var(--jz-shadow)!important}
.product-date-popup,.reference-user-dropdown{z-index:2400!important}
.home-date-range .home-date-popup{left:auto!important;right:0!important}

@media(max-width:1280px){
  .reference-shell{min-width:960px!important}
  .reference-topbar .top-nav-item{min-width:72px!important;padding:0 9px!important}
  .top-account-name{display:none}
  .account-system-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .account-summary{grid-template-columns:repeat(2,minmax(150px,1fr))}
  .reference-profile-form{grid-template-columns:1fr!important}
  .ranking-panel th,.ranking-panel td{padding:0 10px!important}
  .ranking-panel th:nth-child(1){width:58px!important}.ranking-panel th:nth-child(2),.ranking-panel th:nth-child(3){width:auto!important}.ranking-panel th:nth-child(4){width:105px!important}
  .reference-footer{font-size:10px!important}
  .reference-content:has(.reference-products){overflow-x:hidden!important}
  .product-filter-row{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .product-filter-row>.custom-product-date-range{min-width:0!important}
  .product-filter-row>button{width:100%!important}
}
@media(max-width:1024px){
  .account-system-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .reference-user-trigger{min-width:90px!important;max-width:120px!important}
}
