:root{
  --nav:#102b46;
  --blue:#1769aa;
  --bg:#f4f6f8;
  --line:#dde4ea;
  --text:#172333;
  --danger:#b42318;
  --green:#087a55;
  --amber:#a4520a;
  --sidebar:240px;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--text);font:14px system-ui,-apple-system,"PingFang SC",sans-serif}
.auth{min-height:100vh;padding:32px 16px;background:linear-gradient(135deg,#0d2741,#1f6598)}
.auth-shell{width:min(1180px,100%);margin:auto;display:grid;grid-template-columns:minmax(320px,390px) minmax(0,1fr);gap:22px;align-items:start}
.auth-shell:not(.subscriber-auth){grid-template-columns:minmax(320px,420px);justify-content:center}
.subscriber-auth{grid-template-columns:repeat(2,minmax(300px,390px));justify-content:center}
.subscriber-auth .public-catalog{grid-column:1/-1}
.auth-card{width:100%;background:#fff;border-radius:12px;padding:32px;box-shadow:0 16px 45px #0005}
.auth-card h1,.auth-card h2{margin:0}
.auth-card p{color:#627180}
.auth-card button{width:100%;margin-top:14px}
.auth-tabs{display:flex;background:#f1f5f9;border-radius:8px;padding:3px;margin:16px 0 10px;gap:2px}
.auth-tab{flex:1;border:0;background:transparent;color:#64748b;padding:8px 12px;font-size:13px;font-weight:600;border-radius:6px;cursor:pointer;margin:0!important;transition:all .18s ease}
.auth-tab.active{background:#fff;color:#0f172a;box-shadow:0 1px 4px rgba(0,0,0,.08)}
.auth-tab:hover:not(.active){color:#1e293b;filter:none}
.verify-code-row{display:flex;gap:8px;align-items:stretch;margin-top:6px}
.verify-code-row input{margin-top:0;flex:1}
.btn-send-code{width:auto!important;margin:0!important;padding:8px 14px;font-size:13px;font-weight:600;white-space:nowrap;border-radius:6px;background:#2563eb;color:#fff;border:0;flex-shrink:0}
.btn-send-code:disabled{background:#94a3b8;cursor:not-allowed;opacity:.8}
.ghost.dark{color:var(--blue);border-color:#b8cfdf}
label{display:block;margin:12px 0 0;font-weight:600}
input,select,textarea,button{font:inherit;border-radius:6px}
input,select,textarea{width:100%;padding:10px;border:1px solid #cbd5df;margin-top:6px;background:#fff}
textarea{min-height:76px;resize:vertical}
.agreement-editor{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;max-width:1180px}
.agreement-editor .agreement-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.agreement-editor .agreement-body{grid-column:1/-1;min-width:100%}
.agreement-editor .agreement-body textarea{min-height:480px;line-height:1.75;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;padding:18px;background:#fbfdff}
.agreement-editor .agreement-actions{grid-column:1/-1;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
@media(max-width:760px){.agreement-editor .agreement-meta{grid-template-columns:1fr}.agreement-editor .agreement-body textarea{min-height:360px}}
.site-logo-preview{display:block;max-width:180px;max-height:72px;object-fit:contain;margin:10px 0;border:1px solid var(--line);border-radius:8px;padding:6px;background:#fff}
.runtime-environment{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap;margin:12px 0;padding:12px 14px;border-radius:8px;border:1px solid #b9d8ea;background:#eef8ff;color:#174969}.runtime-environment.live{border-color:#f2c689;background:#fff7ea;color:#7a4810}.runtime-environment span{color:inherit}
.value-block{display:inline-block;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:5px 8px;border:1px solid #c9d8e5;border-radius:6px;background:#f4f8fb;color:#24506e;font:12px ui-monospace,SFMono-Regular,Menlo,monospace;vertical-align:middle}
.table-actions{display:flex;flex-wrap:wrap;gap:5px;min-width:205px}.table-actions button{margin:0}
button{border:0;background:var(--blue);color:#fff;padding:10px 14px;cursor:pointer;white-space:nowrap}
button:hover{filter:brightness(.92)}
button:disabled{cursor:wait;opacity:.65}
.error{min-height:20px;color:var(--danger);font-weight:600}
.success{color:var(--green);font-weight:600}
.login-status{min-height:20px;color:#1769aa;font-weight:600}
.ghost{background:transparent;color:inherit;border:1px solid var(--line)}
.public-catalog{background:#f8fbfd;border-radius:12px;padding:24px;box-shadow:0 16px 45px #0004}
.public-catalog h2{margin:0 0 5px}
.public-catalog>p{color:#637687}
.warehouse-public-card{background:#fff;border:1px solid #d9e5ed;border-radius:10px;padding:17px}
.warehouse-public-card h3{margin:0 0 6px}
.availability{display:inline-block;border-radius:999px;padding:4px 9px;background:#e5f6ef;color:#087a55;font-size:12px;font-weight:700}
.availability.WAITLIST,.availability.UNAVAILABLE{background:#fff1e8;color:#9a4213}
.public-detail{grid-column:1/-1;background:#fff;border:1px solid var(--line);border-radius:8px;padding:12px;margin-top:10px}

#app{min-height:100vh;display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);align-items:stretch;max-width:100vw;overflow-x:hidden}
aside{
  width:var(--sidebar);
  min-width:var(--sidebar);
  max-width:var(--sidebar);
  min-height:100vh;
  height:auto;
  background:var(--nav);
  color:#fff;
  padding:20px 14px 75px;
  display:flex;
  flex-direction:column;
  box-sizing:border-box;
  position:relative;
}
aside h1{font-size:18px;margin:0 8px 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:0}
aside p{margin:0 8px 12px;color:#b9c9d8;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:0}
.identity-profile-link{display:block;width:calc(100% - 16px);margin:0 8px 12px;padding:7px 9px;text-align:left;background:#173b59;border:1px solid #315671;color:#e9f3fa;overflow:hidden;text-overflow:ellipsis;border-radius:7px;flex-shrink:0}
.identity-profile-link:hover{background:#1f4a6b}
nav{
  display:block;
  flex:1;
  min-width:0;
  padding:0 2px 12px;
  overflow:visible;
}
#logout{
  position:fixed;
  bottom:16px;
  left:14px;
  width:calc(var(--sidebar) - 28px);
  z-index:99;
  padding:9px 12px;
  border-radius:6px;
  border:1px solid #315671;
  background:#173b59;
  color:#e9f3fa;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,0.3);
  transition:background .15s ease,border-color .15s ease;
}
#logout:hover{
  background:#a83232;
  border-color:#c94444;
  color:#fff;
}
.nav-group{font-size:11px;color:#8eabc4;margin:18px 8px 4px;text-transform:uppercase;letter-spacing:.04em;font-weight:600;padding-top:14px;border-top:1px solid #243f55}
.nav-group:first-child{margin-top:6px;padding-top:0;border-top:0}
.nav-item{
  display:flex;
  align-items:center;
  width:100%;
  min-width:0;
  max-width:100%;
  min-height:40px;
  margin:3px 0;
  text-align:left;
  background:transparent;
  color:#dce8f2;
  padding:9px 10px;
  border-radius:6px;
  white-space:normal;
  line-height:1.35;
  overflow:hidden;
}
.nav-item span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav-item.active,.nav-item:hover{background:#1f4a6b}
.workspace{width:100%;min-width:0;overflow:hidden}
.workspace header{height:66px;background:#fff;border-bottom:1px solid var(--line);padding:0 25px;display:flex;align-items:center;gap:15px}
.workspace header small{display:block;color:#687887;margin-top:3px}
.workspace main{width:100%;padding:24px;max-width:1500px}
.support-session-indicator{margin-left:auto;display:flex;align-items:center;gap:8px}
.support-session-indicator .support-badge{background:#fff8e1;border:1px solid #f1c97f;color:#7a5a18;border-radius:14px;padding:4px 12px;font-size:12px;display:inline-flex;align-items:center;gap:6px}
.support-session-indicator .support-badge b{color:#5e450f}
.support-session-indicator button{font-size:12px;padding:3px 10px}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px}
.metrics{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.card,.panel{background:#fff;border:1px solid var(--line);border-radius:10px;padding:18px}
.metric{font-size:27px;font-weight:700;margin-top:12px}
.muted,.hint{color:#6e7e8c}
.panel{margin-top:18px}
.panel:first-child{margin-top:0}
.panel h2{font-size:17px;margin:0 0 14px}
.panel h3{font-size:14px;margin:22px 0 8px}
.settlement-account-confirmation{display:flex;flex-direction:column;gap:10px;background:linear-gradient(145deg,#f8fbfd,#fff)}
.settlement-account-confirmation.verified{border-color:#8dd6b8;background:linear-gradient(145deg,#effbf6,#fff)}
.settlement-account-confirmation-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.settlement-account-confirmation strong{font:600 16px ui-monospace,SFMono-Regular,Menlo,monospace;color:#173c56;word-break:break-word}
.settlement-account-confirmation p,.settlement-account-confirmation small{margin:0;color:#637687;line-height:1.55}
.settlement-account-editor{margin-top:16px;border:1px solid #d9e4eb;border-radius:10px;background:#f8fafc;overflow:hidden}
.settlement-account-editor>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 17px;cursor:pointer;list-style:none;color:#274e68}
.settlement-account-editor>summary::-webkit-details-marker{display:none}
.settlement-account-editor>summary>span:first-child{display:flex;flex-direction:column;gap:4px}
.settlement-account-editor>summary small{color:#718493;font-weight:400}
.settlement-account-editor>summary>span:last-child{font-size:12px;color:#1769aa}
.settlement-account-editor[open]>summary{border-bottom:1px solid #d9e4eb;background:#eef5f9}
.settlement-account-editor[open]>summary>span:last-child{font-size:0}
.settlement-account-editor[open]>summary>span:last-child::after{content:'收起编辑';font-size:12px}
.settlement-account-editor>.card{margin:16px;border:0;box-shadow:0 2px 10px #15324b12}
.warehouse-finance-hub{scroll-margin-top:20px}
.finance-route-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0 22px}
.finance-route-card{display:flex;flex-direction:column;min-height:190px;padding:17px;border:1px solid #d5e2eb;border-radius:11px;background:linear-gradient(145deg,#f8fbfd,#fff)}
.finance-route-card.primary{border-color:#80b9dc;background:linear-gradient(145deg,#eaf6fd,#fff)}
.finance-route-card>span{color:#477087;font-size:12px;font-weight:700}
.finance-route-card h3{margin:8px 0!important;font-size:16px!important;color:#173c56}
.finance-route-card p{margin:0 0 14px;color:#657987;line-height:1.55;flex:1}
.finance-route-card a{align-self:flex-start;padding:8px 11px;border-radius:6px;background:#1769aa;color:#fff;text-decoration:none;font-weight:650}
.finance-route-card a:hover{filter:brightness(.92)}
.finance-workflow-block{scroll-margin-top:18px;margin-top:18px;padding:16px;border:1px solid #dce6ed;border-radius:11px;background:#f8fafc}
.finance-workflow-heading{display:flex;align-items:flex-start;gap:11px;margin-bottom:12px}
.finance-workflow-heading>span{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#1769aa;color:#fff;font-size:12px;font-weight:800;flex:0 0 auto}
.finance-workflow-heading h3{margin:0 0 4px!important;font-size:15px!important}
.finance-workflow-heading p{margin:0;color:#687d8b;font-size:12px;line-height:1.5}
.finance-workflow-block>.card{border-color:#e1e8ed;box-shadow:0 3px 12px #173c560d}
.finance-workflow-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;scroll-margin-top:18px}
.sensitive-payment-warning{display:flex;gap:12px;align-items:flex-start;margin-bottom:16px;padding:12px 14px;border:1px solid #efbd72;border-radius:8px;background:#fff8e8;color:#704607}
.sensitive-payment-warning span{line-height:1.55}
.settlement-payment-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.settlement-payment-details>div{display:flex;flex-direction:column;gap:6px;min-width:0;padding:12px 14px;border:1px solid #e0e8ee;border-radius:8px;background:#f9fbfc}
.settlement-payment-details>div>span{font-size:12px;color:#6c7f8e}
.settlement-payment-details>div>b{line-height:1.5;word-break:break-word}
.settlement-payment-details .full-span{grid-column:1/-1}
.sensitive-account-value{border-color:#8dbbd8!important;background:#eef8ff!important}
.sensitive-account-value code{font:700 18px ui-monospace,SFMono-Regular,Menlo,monospace;color:#123f5e;word-break:break-all;user-select:all}
@media(max-width:900px){.finance-route-grid,.finance-workflow-grid{grid-template-columns:1fr}}
@media(max-width:600px){.settlement-payment-details{grid-template-columns:1fr}.settlement-payment-details .full-span{grid-column:auto}.settlement-account-editor>summary{align-items:flex-start}.settlement-account-editor>.card{margin:10px}}
.warehouse-directory{margin-top:18px}.warehouse-directory-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;padding:4px 2px 16px}.warehouse-directory-head h2{margin:0 0 6px;font-size:20px}.warehouse-directory-head p{margin:0;color:#687887}.warehouse-directory-metrics{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.warehouse-directory-metrics span{padding:9px 11px;border-radius:8px;background:#eaf3f9;color:#356079;font-size:12px}.warehouse-directory-metrics b{font-size:16px;color:#173c56}.warehouse-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:16px}.warehouse-card{background:#fff;border:1px solid #dce6ed;border-radius:12px;padding:17px;box-shadow:0 5px 16px #1232;display:flex;flex-direction:column;gap:14px}.warehouse-card-top{display:flex;justify-content:space-between;gap:12px}.warehouse-card h3{margin:5px 0;font-size:17px}.warehouse-card p{margin:0;color:#687887}.warehouse-code{font:12px ui-monospace,SFMono-Regular,Menlo,monospace;color:#38708f}.warehouse-status-stack{display:flex;align-items:flex-end;flex-direction:column;gap:6px}.warehouse-state{font-size:11px;font-weight:700;padding:4px 8px;border-radius:999px;background:#eef3f6;color:#59707e}.warehouse-state.state-active{background:#e2f5eb;color:#087a55}.warehouse-state.state-suspended,.warehouse-state.state-closed{background:#ffebe8;color:#b42318}.warehouse-state.state-testing,.warehouse-state.state-configuring{background:#fff3df;color:#a4520a}.warehouse-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0}.warehouse-meta div{min-width:0}.warehouse-meta dt{color:#758693;font-size:12px}.warehouse-meta dd{margin:4px 0 0;font-weight:600;word-break:break-word}.warehouse-plan-area{grid-column:1/-1}.warehouse-plan-chip{display:inline-block;margin:0 5px 5px 0;padding:4px 7px;border-radius:5px;background:#f0f6fb;color:#30617e;font-size:12px;font-weight:500}.warehouse-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:end;border-top:1px solid #e5edf2;padding-top:13px}.warehouse-card-actions label{margin:0;font-size:12px;color:#687887}.warehouse-card-actions select{margin-top:4px}.warehouse-card-actions button{padding:8px 10px}@media(max-width:650px){.warehouse-directory-head{flex-direction:column}.warehouse-directory-metrics{justify-content:flex-start}.warehouse-card-actions{grid-template-columns:1fr}.warehouse-card-grid{grid-template-columns:1fr}}
.warehouse-card.settlement-review-pending{border-color:#e8b65c;box-shadow:0 5px 18px #a66a1426;background:linear-gradient(155deg,#fff9e9,#fff 38%)}
.warehouse-card.settlement-review-verified{border-color:#78c5a5;box-shadow:0 5px 18px #087a5520;background:linear-gradient(155deg,#effbf6,#fff 38%)}
.warehouse-card.settlement-review-rejected{border-color:#e69a93;box-shadow:0 5px 18px #b4231820;background:linear-gradient(155deg,#fff1ef,#fff 38%)}
.warehouse-card.settlement-review-disabled{border-color:#becbd4;background:linear-gradient(155deg,#f1f4f6,#fff 38%)}
.warehouse-settlement-review{padding:14px;border:1px solid #d9e4eb;border-radius:9px;background:#fff}
.warehouse-settlement-review-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:11px}
.warehouse-settlement-review-head>div{display:flex;flex-direction:column;gap:3px}
.warehouse-settlement-review-head>div>span{font-size:12px;color:#647986}
.warehouse-settlement-review-head>div>b{font-size:15px;color:#173c56}
.warehouse-settlement-review dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}
.warehouse-settlement-review dl>div{min-width:0;padding:9px 10px;border-radius:7px;background:#f7fafc}
.warehouse-settlement-review dt{font-size:11px;color:#6f818e}
.warehouse-settlement-review dd{margin:4px 0 0;font-weight:650;line-height:1.45;word-break:break-word}
.warehouse-settlement-review code{font:700 14px ui-monospace,SFMono-Regular,Menlo,monospace;color:#12476b;user-select:all;word-break:break-all}
.warehouse-settlement-review-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid #e4ebf0}
@media(max-width:650px){.warehouse-settlement-review dl{grid-template-columns:1fr}}
.form-grid,.toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap}
.form-grid label,.toolbar label{min-width:180px;flex:1}
.form-grid button,.toolbar button{height:40px;margin-top:12px}
/* 统一表单响应式布局 */
.form-grid,form{max-width:100%}
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px 18px;align-items:start}
.form-grid label{min-width:0;display:flex;flex-direction:column;gap:5px}
.form-grid button,.form-grid [type=submit]{justify-self:start;margin-top:4px}
/* textarea/全宽字段跨列 */
.form-grid label.full-width,.form-grid textarea{grid-column:1/-1}
/* 表单行：多个字段并排 */
.form-row{display:contents}
/* 区域邮费表单 - 响应式网格布局 */
.postage-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px 16px;align-items:start}
.postage-form label{min-width:0;display:flex;flex-direction:column;gap:5px}
.postage-form .form-actions{grid-column:1/-1;display:flex;justify-content:flex-start;margin-top:4px}
.postage-form .btn-primary{padding:10px 24px;font-size:14px;background:#2d7dd2;color:#fff;border:none;border-radius:8px;cursor:pointer}
.postage-form .btn-primary:hover{background:#1a5fb4}
@media(max-width:600px){
  .form-grid,.postage-form{grid-template-columns:1fr}
  .form-row{display:flex;flex-direction:column}
}
.site-settings-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:0 18px}
.site-settings-form h3{grid-column:1/-1;margin:20px 0 0;padding:12px 0 7px;border-bottom:1px solid var(--line);color:#174968}
.site-settings-form label{min-width:0;display:flex;flex-direction:column;gap:5px}
.site-settings-form label:has(textarea){grid-column:1/-1}
.site-settings-form textarea{min-height:112px}
.site-settings-form small{color:#667887;line-height:1.45}
.site-settings-form>button{grid-column:1/-1;justify-self:start}
.users-page{border-left:4px solid #3d86ba}
.rules-editor-panel{border-left:4px solid #b7791f;background:linear-gradient(110deg,#fffaf1,#fff)}
.rules-publish-panel{border-left:4px solid #16805c;background:linear-gradient(110deg,#f3fcf8,#fff)}
.rule-workflow-note{margin:0 0 14px;padding:12px 14px;border:1px solid #f0c36a;border-radius:10px;background:#fff8e8;color:#6a4800;line-height:1.65}
.rule-json-guide{margin:14px 0;padding:12px 14px;border:1px solid #c9d8e7;border-radius:10px;background:#f7fbff;line-height:1.65}
.rule-json-guide summary{cursor:pointer;font-weight:700;color:#174d76}
.rule-json-guide code{display:block;margin-top:6px;padding:8px;overflow:auto;border-radius:6px;background:#162537;color:#eaf4ff;white-space:pre-wrap}
.archive-panel{background:#f8fafc;border-color:#d9e4eb}
.archive-panel summary{cursor:pointer;color:#38576d}
.public-spec-prices{margin-top:12px;padding:12px;border:1px solid #d8e5ef;border-radius:10px;background:#f8fbff}
.public-spec-prices h4{margin:0 0 8px;color:#1f4d71}
.public-price-row{display:grid;gap:3px;padding:9px 0;border-top:1px solid #e1eaf0}
.public-price-row:first-of-type{border-top:0}
.public-price-row span{color:#1f7a55;font-weight:700}
.public-price-row small{line-height:1.55;color:#50677a}
.table-wrap{width:100%;overflow:auto}
table{width:100%;border-collapse:collapse;min-width:650px}
.table-pagination{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding:10px 0 2px;color:#687887;font-size:12px}
.table-pagination button{padding:6px 10px;margin:0}
th,td{padding:10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
th{font-size:12px;color:#617181;background:#fafbfc}
td select{min-width:145px;margin:0;padding:7px}
td button{padding:6px 9px;margin:2px}
.small-btn{padding:5px 9px!important;font-size:12px!important;line-height:1.25!important;border-radius:4px;white-space:nowrap}
.stripe-key-block{display:block;box-sizing:border-box;max-width:160px;min-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:7px 9px;border:1px solid #c9d8e5;border-radius:6px;background:#f4f8fb;color:#24506e;font-size:12px}
.stripe-config-actions{display:flex;flex-wrap:wrap;gap:4px;min-width:210px}.stripe-config-actions button{margin:0}
.empty,.loading{padding:28px;color:#6e7e8c;text-align:center}
.setup{border-left:4px solid var(--blue)}
.toast{position:fixed;z-index:20;right:24px;bottom:24px;background:#0d6847;color:#fff;padding:12px 18px;border-radius:8px;box-shadow:0 8px 25px #0004}
.error-toast{background:var(--danger)}

.page-guide{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(230px,340px);
  gap:22px;
  align-items:center;
  border-left:4px solid #3d86ba;
  background:linear-gradient(100deg,#f8fcff,#fff);
}
.page-guide h2{margin:3px 0 5px}
.page-guide p{margin:0;color:#536779;line-height:1.65}
.guide-kicker{color:var(--blue);font-size:11px;font-weight:800;letter-spacing:.08em}
.page-guide details{border-left:1px solid var(--line);padding-left:22px}
.page-guide summary{color:var(--blue);font-weight:700;cursor:pointer}
.page-guide ol{margin:10px 0 0;padding-left:20px;color:#536779;line-height:1.8}
.section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.section-heading h2{margin-bottom:5px}
.section-heading p{margin:0}

/* 三端总览的“常用工作”：把复杂后台拆成每个角色可执行的四步。 */
.workflow-panel{border-top:4px solid #2c719f;background:linear-gradient(135deg,#f7fbfe,#fff)}
.workflow-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:15px}
.workflow-step{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:84px;padding:12px;text-align:left;color:var(--text);background:#fff;border:1px solid #d9e6ee;border-radius:9px;white-space:normal}
.workflow-step:hover,.workflow-step:focus-visible{border-color:#2f7aa8;background:#f0f8fc;transform:translateY(-1px)}
.workflow-step b,.workflow-step small{display:block}.workflow-step small{margin-top:4px;color:#637786;line-height:1.35}
.workflow-number{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#e4f1f8;color:#176292;font-size:13px;font-weight:800}
.workflow-arrow{font-size:12px;color:#176292;font-weight:700;white-space:nowrap}

.todo-panel{border-top:4px solid var(--blue)}
.todo-total{display:grid;place-items:center;min-width:44px;height:36px;padding:0 12px;border-radius:999px;background:#e6f1f8;color:#155f96;font-size:18px;font-weight:800}
.todo-list{display:grid;gap:9px;margin-top:16px}
.todo-item{
  width:100%;
  display:grid;
  grid-template-columns:46px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  color:var(--text);
  background:#f8fafc;
  border:1px solid var(--line);
  border-left:4px solid #7a8b9a;
  text-align:left;
  white-space:normal;
}
.todo-item.urgent{border-left-color:var(--danger);background:#fff8f7}
.todo-item.warning{border-left-color:#d97706;background:#fffbf3}
.todo-count{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#fff;border:1px solid var(--line);font-size:16px;font-weight:800}
.todo-item b,.todo-item small{display:block}
.todo-item small{margin-top:4px;color:#647585;line-height:1.4}
.todo-arrow{color:var(--blue);font-weight:700}
.all-clear{display:flex;gap:8px;flex-direction:column;margin-top:16px;padding:18px;border-radius:8px;background:#eef9f4;color:var(--green)}

.format-badge,.status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:800;white-space:nowrap}
.format-badge{background:#e6f1f8;color:#155f96}
.status-pill.done{background:#e7f6ef;color:var(--green)}
.status-pill.pending{background:#fff4df;color:var(--amber)}
.label-toolbar{margin:18px 0 10px;padding:12px 14px;border:1px solid var(--line);border-radius:8px;background:#f8fafc;align-items:center}
.label-toolbar .check-all{display:flex;align-items:center;gap:8px;min-width:auto;flex:0 0 auto;margin:0}
.check-all input,.label-check{width:18px;height:18px;margin:0;vertical-align:middle}
.label-toolbar button{margin:0}
.pdf-note{display:flex;gap:8px;flex-direction:column;margin-top:15px;padding:13px 15px;border-radius:8px;background:#eef6fb;color:#42657e}
.edit-dialog{width:min(720px,calc(100vw - 30px));max-height:88vh;border:0;border-radius:12px;padding:0;box-shadow:0 24px 80px #001a;overflow:auto}
.edit-dialog::backdrop{background:#07192ab8;backdrop-filter:blur(2px)}
.edit-dialog form{padding:22px}
.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid var(--line);padding-bottom:13px}
.dialog-heading h2{margin:0;font-size:18px}
.dialog-close{font-size:22px;padding:3px 10px;color:#526373}
.dialog-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}
.dialog-fields .checkbox-field{display:flex;align-items:center;gap:8px;padding-top:18px}
.dialog-fields .checkbox-field input{width:18px;height:18px;margin:0}
.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;padding-top:15px;border-top:1px solid var(--line)}
.dialog-error{margin:10px 0 0}
.danger-button{background:#b42318}
.secondary-button{background:#596b7b}

.portal-landing{min-height:100vh;background:linear-gradient(135deg,#0d2741,#1f6598);padding:50px 20px}
.landing-shell{max-width:1000px;margin:auto;color:#fff;text-align:center}
.landing-shell>p{color:#d5e4ef}
.portal-link{display:block;color:var(--text);text-decoration:none;text-align:left;min-height:150px;box-shadow:0 12px 35px #0003}
.portal-link:hover{transform:translateY(-2px)}

@media(max-width:980px){
  .page-guide{grid-template-columns:1fr}
  .workflow-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page-guide details{border-left:0;border-top:1px solid var(--line);padding:14px 0 0}
  .todo-item{grid-template-columns:42px minmax(0,1fr)}
  .todo-arrow{grid-column:2}
}
@media(max-width:840px){
  .auth-shell,.subscriber-auth{grid-template-columns:1fr}
  .auth-card{max-width:430px;margin:auto}
}
@media(max-width:760px){
  #app{grid-template-columns:1fr}
  aside{display:none}
  aside.open{display:flex;position:fixed;z-index:30;inset:0 auto 0 0;width:min(82vw,var(--sidebar));min-width:min(82vw,var(--sidebar));max-width:min(82vw,var(--sidebar));height:100vh;overflow-y:auto;padding-bottom:75px}
  aside.open #logout{position:fixed;bottom:16px;left:14px;width:calc(min(82vw,var(--sidebar)) - 28px);z-index:99}
  .workspace main{padding:14px}
  .cards{grid-template-columns:1fr}
  .form-grid{display:grid}
  .form-grid label{min-width:0}
  .workspace header{padding:0 14px}
  .section-heading{align-items:flex-start}
  .todo-item{padding:11px}
  .dialog-fields{grid-template-columns:1fr}
  .workflow-grid{grid-template-columns:1fr}
}

.rts-price{display:inline-flex;flex-direction:column;gap:4px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;background:#f8fbfd;min-width:170px}
.rts-price-title{display:flex;align-items:baseline;gap:8px;border-bottom:1px dashed var(--line);padding-bottom:4px;margin-bottom:2px}
.rts-price-currency{font-size:11px;letter-spacing:.5px;color:var(--muted,#6b7c8d);font-weight:700;text-transform:uppercase}
.rts-price-row{display:flex;justify-content:space-between;gap:14px;font-size:12px;line-height:1.4}
.rts-price-label{color:#5c6e7d}
.rts-price-value{font-weight:600;color:#0d2741;font-variant-numeric:tabular-nums}

/* 租户查看仓库收费：颜色只用于帮助区分费用类别，文字仍保留完整计价单位。 */
.tenant-price-card{margin:12px 0;padding:13px;border:1px solid #d7e3ec;border-radius:9px;background:#fbfdff;max-width:440px}
.tenant-price-title{display:flex;justify-content:space-between;gap:10px;padding-bottom:8px;margin-bottom:5px;border-bottom:1px solid #dce7ef;color:#17354b}
.tenant-price-title span{font-size:12px;font-weight:800;color:#597084;letter-spacing:.06em}
.tenant-fee-row{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:8px;padding:6px 8px;margin:3px 0;border-left:4px solid;border-radius:4px;background:#fff;font-size:13px}
.tenant-fee-row b{font-variant-numeric:tabular-nums}.tenant-fee-row small{font-weight:500;color:#526b7d}.tenant-fee-row em{font-style:normal;font-size:11px;padding:2px 6px;border-radius:10px;background:#eef2f5;color:#5c6e7d}
.tenant-fee-storage{border-color:#2563eb;background:#eff6ff;color:#174ea6}.tenant-fee-inbound{border-color:#d97706;background:#fff7ed;color:#9a4f08}.tenant-fee-fulfillment{border-color:#059669;background:#ecfdf5;color:#067052}.tenant-fee-printing{border-color:#7c3aed;background:#f5f3ff;color:#6130bd}.tenant-fee-recycling{border-color:#0f766e;background:#f0fdfa;color:#0b625c}.tenant-fee-destruction{border-color:#dc2626;background:#fff1f2;color:#b51f2a}
.fee-text-storage{color:#174ea6;font-weight:800}.fee-text-inbound{color:#9a4f08;font-weight:800}

/* 仓库分级 badge（T9/T12） */
.badge{display:inline-block;font-size:11px;padding:2px 8px;border-radius:999px;background:#243f55;color:#e6f0fa;margin-right:6px;font-weight:600;letter-spacing:.02em}
.badge.badge-ok{background:#1f7a3a}
.badge.badge-retired{background:#7a4040;color:#ffd6d6}
.badge.tier-basic{background:#37516d}
.badge.tier-priority{background:#0e6e6e}
.badge.tier-specialty{background:#7a4d12}
.badge.tier-bonded{background:#5a1e5a}
.warehouse-public-card .badge,.cards .card .badge{margin-bottom:6px}

/* 财务总览页面样式 */
.finance-flow{display:flex;align-items:stretch;gap:12px;padding:20px 0;overflow-x:auto;flex-wrap:wrap}
.flow-step{flex:1;min-width:140px;background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:16px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:6px}
.flow-step.highlight{background:#eff6ff;border-color:#93c5fd}
.flow-icon{font-size:28px;line-height:1}
.flow-label{font-weight:700;color:#17406a;font-size:13px}
.flow-value{font-size:18px;font-weight:800;color:#0d2741;font-variant-numeric:tabular-nums}
.flow-sub{font-size:11px;color:#5c6e7d}
.flow-arrow{font-size:24px;color:#93c5fd;display:flex;align-items:center;font-weight:700;flex-shrink:0}

.settlement-status{display:flex;gap:12px;flex-wrap:wrap;padding:16px 0}
.settlement-item{display:flex;flex-direction:column;align-items:center;gap:4px;padding:14px 20px;background:#f8fafc;border:1px solid var(--line);border-radius:8px;min-width:100px;text-align:center}
.settlement-item span{font-size:12px;color:#5c6e7d}
.settlement-item b{font-size:20px;font-weight:800;color:#0d2741}
.settlement-item.pending{background:#fff7ed;border-color:#fed7aa}
.settlement-item.pending b{color:#9a4213}
.settlement-item.active{background:#eff6ff;border-color:#93c5fd}
.settlement-item.active b{color:#174ea6}
.settlement-item.success{background:#ecfdf5;border-color:#6ee7b7}
.settlement-item.success b{color:#065f46}
.settlement-item.error{background:#fff1f2;border-color:#fecaca}
.settlement-item.error b{color:#991b1b}

.card.highlight{background:linear-gradient(135deg,#eff6ff,#dbeafe);border-color:#93c5fd}
.card.warning{background:linear-gradient(135deg,#fff7ed,#ffedd5);border-color:#fed7aa}

/* ===== 财务仪表板新样式 ===== */

/* Tab 切换 */
.finance-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 16px;
  padding-bottom: 0;
  border-bottom: 2px solid var(--line, #e2e8f0);
}

.finance-tab {
  position: relative;
  padding: 10px 18px;
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #5c6e7d;
  background: #f4f6f8;
  border: 1px solid #d9e4ea;
  border-bottom: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -2px;
}

.finance-tab:hover {
  background: #e8eef3;
  color: #17406a;
}

.finance-tab.active {
  background: #fff;
  color: #1769aa;
  border-color: #93c5fd;
  border-bottom: 2px solid #fff;
  font-weight: 700;
}

/* 财务仪表板容器 */
.finance-dashboard {
  padding: 0;
}

.finance-dashboard h2 {
  margin: 20px 20px 10px;
  font-size: 20px;
}

.finance-dashboard > p.hint {
  margin: 0 20px 10px;
}

/* 财务总览 Tab */
.finance-overview {
  padding: 0 20px 20px;
}

/* 摘要卡片网格 */
.finance-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.summary-card.warning {
  background: linear-gradient(135deg, #fff7ed, #fffbf3);
  border-color: #fed7aa;
}

.summary-card.success {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-color: #6ee7b7;
}

.summary-card.highlight {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-color: #93c5fd;
}

.summary-icon {
  font-size: 32px;
  line-height: 1;
}

.summary-content {
  flex: 1;
}

.summary-label {
  font-size: 12px;
  color: #5c6e7d;
  margin-bottom: 4px;
}

.summary-value {
  font-size: 22px;
  font-weight: 700;
  color: #0d2741;
  font-variant-numeric: tabular-nums;
}

/* 图表网格 */
.finance-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.chart-container {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  min-height: 320px;
}

.chart-container.wide {
  grid-column: 1 / -1;
}

.chart-container h3 {
  margin: 0 0 16px;
  font-size: 14px;
  color: #17406a;
  border-bottom: 1px solid #e5edf2;
  padding-bottom: 10px;
}

.chart-container canvas {
  max-height: 280px;
}

/* 结算状态卡片网格 */
.settlement-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.settlement-status-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
  transition: all 0.2s ease;
}

.settlement-status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.settlement-status-card.pending {
  background: #fff7ed;
  border-color: #fed7aa;
}

.settlement-status-card.active {
  background: #eff6ff;
  border-color: #93c5fd;
}

.settlement-status-card.success {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.settlement-status-card.error {
  background: #fff1f2;
  border-color: #fecaca;
}

/* 字段级校验失败：给 input 加 .field-error 后显示红框 */
input.field-error,
input.field-error:focus {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  outline-color: #ef4444;
}

.settlement-status-icon {
  font-size: 28px;
}

.settlement-status-label {
  font-size: 12px;
  color: #5c6e7d;
}

.settlement-status-count {
  font-size: 24px;
  font-weight: 700;
  color: #0d2741;
}

.settlement-status-amount {
  font-size: 13px;
  color: #17406a;
  font-weight: 600;
}

/* 状态分布条形图 */
.status-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-item {
  display: grid;
  grid-template-columns: 140px 60px 1fr;
  align-items: center;
  gap: 16px;
}

.status-name {
  font-size: 13px;
  font-weight: 600;
  color: #17406a;
}

.status-count {
  font-size: 14px;
  font-weight: 700;
  color: #0d2741;
  text-align: right;
}

.status-bar {
  height: 24px;
  background: #f1f5f9;
  border-radius: 12px;
  overflow: hidden;
}

.status-fill {
  height: 100%;
  background: linear-gradient(90deg, #1769aa, #059669);
  border-radius: 12px;
  transition: width 0.3s ease;
}

.status-item.active .status-fill { background: linear-gradient(90deg, #059669, #34d399); }
.status-item.trial .status-fill { background: linear-gradient(90deg, #d97706, #fbbf24); }
.status-item.past-due .status-fill { background: linear-gradient(90deg, #dc2626, #f87171); }
.status-item.suspended .status-fill { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.status-item.cancelled .status-fill { background: linear-gradient(90deg, #6b7280, #9ca3af); }
.status-item.pending-subscription .status-fill { background: linear-gradient(90deg, #1769aa, #60a5fa); }

/* Tab 内容区 */
#financeTabContent {
  padding: 0 20px 20px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .finance-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 12px;
  }
  
  .finance-tab {
    padding: 8px 14px;
    font-size: 12px;
    white-space: nowrap;
  }
  
  .finance-charts-grid {
    grid-template-columns: 1fr;
  }
  
  .finance-summary-cards {
    grid-template-columns: 1fr 1fr;
  }
  
  .summary-value {
    font-size: 18px;
  }
  
  .settlement-status-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .status-item {
    grid-template-columns: 100px 50px 1fr;
    gap: 10px;
  }
}

/* 入驻进度条 */
.onboarding-panel { margin-bottom: 1.5rem; }
.onboarding-progress { display: flex; align-items: center; gap: .75rem; margin: .75rem 0; }
.progress-bar-wrap { flex: 1; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #16a34a, #4ade80); border-radius: 4px; transition: width .5s ease; }
.progress-label { font-size: .75rem; color: #6b7280; white-space: nowrap; font-weight: 600; }
.onboarding-steps { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.onboard-step { display: flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border-radius: 6px; font-size: .8rem; border: 1px solid #e5e7eb; }
.onboard-step.done { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.onboard-step.current { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; font-weight: 600; }
.onboard-step.pending { background: #f9fafb; color: #9ca3af; }
.step-icon { font-size: 1rem; }
.step-label { }
.step-check { margin-left: .25rem; }
.step-next { font-size: .7rem; color: #60a5fa; margin-left: .4rem; }
.onboarding-alert { margin-top: .75rem; padding: .6rem .8rem; background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px; color: #b91c1c; font-size: .85rem; }
.onboarding-alert button { margin-left: .5rem; }
.next-step-cta { margin: .75rem 0; }
.next-step-cta button { padding: .5rem 1rem; font-size: .9rem; }

/* Tab 通用样式 */
.ftab { background: transparent; border: 1px solid #d1d5db; border-bottom: none; border-radius: 6px 6px 0 0; padding: .4rem .9rem; cursor: pointer; font-size: .85rem; color: #6b7280; margin-right: .25rem; }
.ftab:hover { background: #f3f4f6; color: #374151; }
.ftab.active { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; font-weight: 600; }
.finance-tab-nav { display: flex; border-bottom: 2px solid #e5e7eb; margin-bottom: 1rem; padding-bottom: 0; }
.ftab-panel { display: none; }
.ftab-panel.active { display: block; }
.section-sub { margin-bottom: 1.5rem; }
.section-sub h3 { font-size: 1rem; margin-bottom: .5rem; color: #374151; }
.section-sub summary { cursor: pointer; color: #1d4ed8; font-size: .9rem; }

/* ============ 总部端"查看本机构仓库"弹窗 ============ */
/* 列表型弹窗，需要更宽的窗口与卡片网格以容纳多仓库 */
.view-dialog-wide{width:min(1100px,calc(100vw - 32px));max-height:88vh;border:0;border-radius:12px;padding:0;box-shadow:0 24px 80px #001a;overflow:hidden}
.view-dialog-wide::backdrop{background:#07192ab8;backdrop-filter:blur(2px)}
.view-dialog-wide .dialog-heading{padding:18px 22px 14px;border-bottom:1px solid var(--line);background:#f8fbfd}
.view-dialog-wide .dialog-body{padding:18px 22px 20px;overflow:auto;max-height:calc(88vh - 110px)}
.view-dialog-wide .dialog-actions{padding:14px 22px;border-top:1px solid var(--line);background:#f8fbfd;margin:0}
.entity-warehouses-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:16px}
.entity-warehouses-summary .card{padding:14px 16px;display:flex;flex-direction:column;gap:6px;background:linear-gradient(180deg,#fff,#f8fbfd)}
.entity-warehouses-summary .card .metric{margin-top:0;font-size:24px}
.entity-warehouses-summary .card small{color:#687887;font-size:11px}
.entity-warehouses-summary .card.util-card .util-bar{height:6px;border-radius:999px;background:#eef3f6;overflow:hidden;margin-top:4px}
.entity-warehouses-summary .card.util-card .util-bar>span{display:block;height:100%;background:linear-gradient(90deg,#0e6e6e,#087a55);border-radius:999px;transition:width .25s}
.entity-warehouses-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px;padding:10px 12px;background:#f5f9fc;border:1px solid #e1ebf2;border-radius:10px}
.entity-warehouses-toolbar .search{flex:1;min-width:180px;display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #dce6ed;border-radius:8px;padding:6px 10px}
.entity-warehouses-toolbar .search input{flex:1;border:0;outline:none;background:transparent;font:inherit;color:inherit;min-width:0}
.entity-warehouses-toolbar .search svg{flex:none;color:#7c8c99}
.entity-warehouses-toolbar .count{color:#526373;font-size:13px;white-space:nowrap}
.entity-warehouses-toolbar select{padding:7px 10px;border:1px solid #dce6ed;border-radius:8px;background:#fff;font:inherit;color:inherit;min-width:140px}
.entity-warehouse-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:14px}
.entity-warehouse-card{background:#fff;border:1px solid #dce6ed;border-radius:12px;padding:15px;display:flex;flex-direction:column;gap:12px;box-shadow:0 2px 8px #02121a14;transition:border-color .15s,box-shadow .15s}
.entity-warehouse-card:hover{border-color:#9ec1d6;box-shadow:0 4px 14px #02121a26}
.entity-warehouse-card .ewc-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.entity-warehouse-card .ewc-id{font:12px ui-monospace,SFMono-Regular,Menlo,monospace;color:#38708f}
.entity-warehouse-card h4{margin:4px 0 2px;font-size:16px;color:#102d44;line-height:1.3}
.entity-warehouse-card .ewc-sub{margin:0;color:#687887;font-size:13px}
.entity-warehouse-card .ewc-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.entity-warehouse-card .ewc-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;margin:0;font-size:12px}
.entity-warehouse-card .ewc-meta div{min-width:0}
.entity-warehouse-card .ewc-meta dt{color:#758693;font-size:11px;margin-bottom:2px}
.entity-warehouse-card .ewc-meta dd{margin:0;font-weight:600;color:#1c3548;word-break:break-word}
.entity-warehouse-card .ewc-capacity{padding:10px 12px;background:#f5f9fc;border:1px solid #e1ebf2;border-radius:8px;display:flex;flex-direction:column;gap:6px}
.entity-warehouse-card .ewc-capacity .ewc-cap-line{display:flex;justify-content:space-between;gap:8px;align-items:baseline;font-size:12px;color:#526373}
.entity-warehouse-card .ewc-capacity .ewc-cap-line b{color:#0d2741;font-size:15px;font-variant-numeric:tabular-nums}
.entity-warehouse-card .ewc-capacity .ewc-util-bar{height:8px;border-radius:999px;background:#eef3f6;overflow:hidden;position:relative}
.entity-warehouse-card .ewc-capacity .ewc-util-bar>span{display:block;height:100%;border-radius:999px;transition:width .25s}
.entity-warehouse-card .ewc-capacity .ewc-util-bar>span.low{background:linear-gradient(90deg,#0e6e6e,#087a55)}
.entity-warehouse-card .ewc-capacity .ewc-util-bar>span.mid{background:linear-gradient(90deg,#a88107,#d18a08)}
.entity-warehouse-card .ewc-capacity .ewc-util-bar>span.high{background:linear-gradient(90deg,#b42318,#d04a2b)}
.entity-warehouse-card .ewc-footer{display:flex;justify-content:space-between;align-items:center;gap:8px;padding-top:10px;border-top:1px dashed #e5edf2;font-size:12px;color:#687887}
.entity-warehouse-card .ewc-footer .visibility{display:inline-flex;align-items:center;gap:5px}
.entity-warehouse-card .ewc-footer .visibility .dot{width:8px;height:8px;border-radius:50%;background:#9aa9b6}
.entity-warehouse-card .ewc-footer .visibility.on .dot{background:#087a55}
.entity-warehouse-card.is-hidden{display:none}
.entity-warehouses-empty{padding:36px 24px;text-align:center;color:#687887;background:#f8fbfd;border:1px dashed #d9e4eb;border-radius:12px}
@media(max-width:720px){.view-dialog-wide{width:calc(100vw - 16px)}.entity-warehouses-toolbar{flex-direction:column;align-items:stretch}.entity-warehouse-card .ewc-meta{grid-template-columns:1fr}}

/* ============ 总部端「订阅授权」按状态分组的租户列表 ============ */
/* 把正常 / 待续订 / 欠费暂停 / 已退订未订阅四类租户拆到不同 tab，避免单页过长；
   每个 tab 内部独立搜索 + 分页，避免单个 tab 数据过多导致表格过长。 */
.sub-status-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px;background:#f4f8fc;border:1px solid #dbe5ee;border-radius:10px;padding:6px}
.sub-status-tabs .sub-tab{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:7px;background:transparent;border:1px solid transparent;color:#38576d;font-weight:500;font-size:13px;cursor:pointer;transition:background .15s,color .15s,border-color .15s}
.sub-status-tabs .sub-tab:hover{background:#e7eff7}
.sub-status-tabs .sub-tab.active{background:#fff;color:#0d2741;border-color:#9ec1d6;box-shadow:0 2px 6px #02121a18}
.sub-status-tabs .sub-tab .pill{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:20px;padding:0 7px;border-radius:999px;background:#d9e4eb;color:#38576d;font-size:11px;font-weight:700}
.sub-status-tabs .sub-tab.active .pill{background:#0d6e9d;color:#fff}
.sub-status-tabs .sub-tab[data-tone="warn"] .pill{background:#fff3df;color:#a4520a}
.sub-status-tabs .sub-tab[data-tone="danger"] .pill{background:#ffebe8;color:#b42318}
.sub-status-tabs .sub-tab[data-tone="muted"] .pill{background:#e5ebf1;color:#526373}
.sub-status-panel{display:none}
.sub-status-panel.active{display:block}
.sub-status-panel-head{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.sub-status-panel-head h3{margin:0;font-size:16px}
.sub-status-panel-head .sub-search{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #dce6ed;border-radius:8px;padding:6px 10px;min-width:240px;flex:1;max-width:340px}
.sub-status-panel-head .sub-search input{flex:1;border:0;outline:none;background:transparent;font:inherit;color:inherit;min-width:0}
.sub-status-panel-head .sub-search svg{flex:none;color:#7c8c99}
.sub-status-pager{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:10px 4px 2px;color:#687887;font-size:12px}
.sub-status-pager .pager-nav{display:flex;align-items:center;gap:6px}
.sub-status-pager .pager-nav button{padding:5px 10px;margin:0;font-size:12px}
.sub-status-pager .pager-nav button[disabled]{opacity:.45;cursor:not-allowed}
.sub-status-panel .empty{padding:18px 14px;color:#687887;background:#f8fbfd;border:1px dashed #d9e4eb;border-radius:8px}
.sub-status-pager .count b{color:#0d2741;font-variant-numeric:tabular-nums}
@media(max-width:720px){.sub-status-panel-head{flex-direction:column;align-items:stretch}.sub-status-panel-head .sub-search{max-width:none}}

/* ============ 总部端「客户账号」分组 + 折叠面板 ============ */
/* 把「订阅状态有效租户」默认展开，「过期租户」折叠收纳；
   每个分组内按邮箱模糊搜索 + 本地分页 + 行内展开成员列表。 */
.subscribers-collapsible{border:1px solid #dbe5ee;border-radius:10px;background:#fff;margin-bottom:14px;overflow:hidden}
.subscribers-collapsible>summary{list-style:none;cursor:pointer;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;font-weight:600;font-size:15px;color:#0d2741;background:#f4f8fc;transition:background .15s}
.subscribers-collapsible>summary::-webkit-details-marker{display:none}
.subscribers-collapsible>summary::before{content:'▸';display:inline-block;color:#5e7a90;font-size:13px;margin-right:8px;transition:transform .15s}
.subscribers-collapsible[open]>summary::before{transform:rotate(90deg)}
.subscribers-collapsible>summary:hover{background:#e7eff7}
.subscribers-collapsible>summary .group-count{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:22px;padding:0 8px;margin-left:8px;border-radius:999px;background:#d9e4eb;color:#38576d;font-size:11px;font-weight:700}
.subscribers-collapsible>summary .group-hint{color:#526373;font-weight:400;font-size:12px;margin-left:6px}
.subscribers-collapsible>summary[data-tone="muted"]{color:#526373;background:#f6f8fa}
.subscribers-collapsible[open]>summary[data-tone="muted"]{background:#eef1f4}
.subscribers-collapsible>summary .summary-search{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #dce6ed;border-radius:8px;padding:6px 10px;min-width:240px;flex:1;max-width:340px;margin-left:auto;font-weight:400}
.subscribers-collapsible>summary .summary-search input{flex:1;border:0;outline:none;background:transparent;font:inherit;color:inherit;min-width:0}
.subscribers-collapsible>summary .summary-search svg{flex:none;color:#7c8c99}
.subscribers-collapsible .collapsible-body{padding:6px 18px 18px 18px}
.subscribers-collapsible .members-subtable{background:#fbfdff;border:1px dashed #d9e4eb;border-radius:8px;padding:10px 14px;margin-top:8px}
.subscribers-collapsible .members-subtable table{margin:0;font-size:12px}
.subscribers-collapsible .members-subtable th{background:transparent;color:#526373;font-size:11px}
.subscribers-collapsible .members-subtable .empty{padding:10px 0;color:#8a99a8;font-size:12px;text-align:center}
.subscribers-collapsible details.row-toggle>summary{list-style:none;cursor:pointer;padding:6px 12px;background:transparent;border:1px solid #dbe5ee;border-radius:6px;color:#38576d;font-size:12px;display:inline-flex;align-items:center;gap:6px}
.subscribers-collapsible details.row-toggle>summary::-webkit-details-marker{display:none}
.subscribers-collapsible details.row-toggle>summary::before{content:'▸';display:inline-block;color:#5e7a90;font-size:10px;transition:transform .15s}
.subscribers-collapsible details.row-toggle[open]>summary::before{transform:rotate(90deg)}
.subscribers-collapsible details.row-toggle>summary:hover{background:#eef3f8}
.subscribers-collapsible .status-pill{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:600;line-height:1.4}
.subscribers-collapsible .status-pill[data-status="ACTIVE"]{background:#d1fadf;color:#067647}
.subscribers-collapsible .status-pill[data-status="TRIAL"]{background:#dbeafe;color:#1d4ed8}
.subscribers-collapsible .status-pill[data-status="PENDING_SUBSCRIPTION"]{background:#e0e7ec;color:#475569}
.subscribers-collapsible .status-pill[data-status="PAST_DUE"]{background:#fef0c7;color:#b54708}
.subscribers-collapsible .status-pill[data-status="SUSPENDED"]{background:#ffebe8;color:#b42318}
.subscribers-collapsible .status-pill[data-status="CANCELLED"]{background:#e5ebf1;color:#526373}
.subscribers-collapsible .status-pill[data-status="CLOSED"]{background:#e5ebf1;color:#526373}
@media(max-width:720px){.subscribers-collapsible>summary{flex-direction:column;align-items:flex-start}.subscribers-collapsible>summary .summary-search{max-width:none;margin-left:0}}

/* ============ 总部端「平台治理」三页（协议政策 / 商品规则 / 人员权限） ============ */
/* 设计原则：先看快照（hero）理解当前生效 / 当前人员 / 当前发布版本，
   再用工具栏按状态 / 邮箱 / 角色筛选，最后看历史 / 编辑器。
   hero + toolbar + cards + table 四个层次分明，避免过去「表单堆 + 大表格」平铺。 */
.governance-hero{border:1px solid #dbe5ee;border-radius:14px;background:linear-gradient(180deg,#f4f8fc 0%,#ffffff 70%);padding:20px 24px;margin-bottom:18px;box-shadow:0 2px 6px #02121a08}
.governance-hero .governance-hero-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:14px}
.governance-hero .governance-hero-head h2{margin:0;font-size:20px;color:#0d2741}
.governance-hero .governance-hero-head .guide-kicker{color:var(--blue);font-size:11px;font-weight:800;letter-spacing:.08em;display:inline-block;margin-bottom:4px}
.governance-hero .governance-hero-summary{color:#3c5163;line-height:1.65;font-size:13.5px;max-width:74ch;margin:0 0 14px 0}
.governance-hero .governance-hero-actions{display:flex;gap:8px;flex-wrap:wrap}
.governance-hero details.help{margin-top:8px;border:1px solid #dbe5ee;border-radius:8px;background:#fff;padding:8px 14px}
.governance-hero details.help>summary{font-weight:600;color:#0d6e9d;cursor:pointer;list-style:none}
.governance-hero details.help>summary::-webkit-details-marker{display:none}
.governance-hero details.help>summary::before{content:'▸';display:inline-block;margin-right:6px;font-size:11px;color:#5e7a90;transition:transform .15s}
.governance-hero details.help[open]>summary::before{transform:rotate(90deg)}
.governance-hero details.help ol{margin:8px 0 4px 18px;color:#536779;line-height:1.85;font-size:13px;padding:0}
.governance-hero details.help p{margin:6px 0;color:#536779;font-size:13px;line-height:1.7}

/* 协议代码 / 套餐级别 / 规则类型 chip：横排 + 状态色 */
.code-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border-radius:6px;background:#eef3f8;color:#38576d;font-size:11px;font-weight:700;font-family:'SF Mono',Consolas,monospace;letter-spacing:.02em}
.code-chip[data-code^="PLATFORM_WAREHOUSE"]{background:#e7f2ec;color:#1f7a3a}
.code-chip[data-code^="PLATFORM_TENANT"]{background:#fff3df;color:#a4520a}
.code-chip[data-code^="PRIVACY"]{background:#ede1f5;color:#5a1e5a}
.code-chip[data-code^="DATA_PROCESSING"]{background:#dbeafe;color:#1d4ed8}
.code-chip[data-code^="FRANCHISE"]{background:#ffe2e2;color:#b42318}
.code-chip[data-code^="COMPLIANCE"]{background:#e0f2ff;color:#0d6e9d}

/* 规则类型 chip（SYSTEM / ALLOW / MANUAL_REVIEW / RESTRICT / PROHIBIT） */
.rule-type-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border-radius:6px;background:#eef3f8;color:#38576d;font-size:11px;font-weight:700;font-family:'SF Mono',Consolas,monospace}
.rule-type-chip[data-type="SYSTEM"]{background:#dbeafe;color:#1d4ed8}
.rule-type-chip[data-type="ALLOW"]{background:#d1fadf;color:#067647}
.rule-type-chip[data-type="MANUAL_REVIEW"]{background:#fef0c7;color:#b54708}
.rule-type-chip[data-type="RESTRICT"]{background:#ffedd5;color:#c2410c}
.rule-type-chip[data-type="PROHIBIT"]{background:#ffebe8;color:#b42318}

/* 治理页工具栏（搜索 + 状态过滤 + 操作按钮） */
.governance-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;margin-bottom:14px;background:#fff;border:1px solid #dbe5ee;border-radius:10px}
.governance-toolbar .toolbar-search{flex:1;display:flex;align-items:center;gap:8px;background:#f4f8fc;border:1px solid #dce6ed;border-radius:8px;padding:6px 12px;min-width:240px}
.governance-toolbar .toolbar-search input{flex:1;border:0;outline:none;background:transparent;font:inherit;color:inherit;min-width:0}
.governance-toolbar .toolbar-search svg{flex:none;color:#7c8c99}
.governance-toolbar .toolbar-filter{display:flex;gap:6px;flex-wrap:wrap}
.governance-toolbar .toolbar-filter .chip{padding:4px 12px;border-radius:999px;background:#eef3f8;border:1px solid transparent;color:#38576d;font-size:12px;font-weight:600;cursor:pointer;transition:all .15s}
.governance-toolbar .toolbar-filter .chip:hover{background:#e0e9f1}
.governance-toolbar .toolbar-filter .chip.active{background:#0d6e9d;color:#fff;border-color:#0d6e9d}
.governance-toolbar .toolbar-action{margin-left:auto}
@media(max-width:720px){.governance-toolbar{flex-direction:column;align-items:stretch}.governance-toolbar .toolbar-action{margin-left:0}}

/* 协议代码分组卡：每张卡是 1 个协议代码 × 全部历史版本 */
.code-history-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:14px;margin-bottom:18px}
.code-history-card{border:1px solid #dbe5ee;border-radius:12px;background:#fff;overflow:hidden}
.code-history-card .code-card-header{padding:14px 16px;background:#f4f8fc;border-bottom:1px solid #dbe5ee;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.code-history-card .code-card-header h3{margin:0;font-size:14.5px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.code-history-card .code-card-current{padding:12px 16px;border-bottom:1px dashed #dbe5ee;background:#fbfdff}
.code-history-card .code-card-current.is-empty{background:#fff7e6;color:#9a6900}
.code-history-card .code-card-current .current-version-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.code-history-card .code-card-current .current-version-line b{color:#0d2741}
.code-history-card .code-card-current .current-version-meta{font-size:12px;color:#526373;line-height:1.7}
.code-history-card .code-card-history{padding:6px 0;max-height:240px;overflow:auto}
.code-history-card .code-card-history .history-row{padding:6px 16px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;border-top:1px solid #f1f5f9;font-size:12px;color:#526373}
.code-history-card .code-card-history .history-row:first-child{border-top:0}
.code-history-card .code-card-history .history-row .history-version{font-family:'SF Mono',Consolas,monospace;color:#38576d}
.code-history-card .code-card-history .history-row .history-actions{margin-left:auto;display:flex;gap:4px}
.code-history-card .code-card-history .history-row .history-actions button{padding:3px 8px;font-size:11px}
.code-history-card .code-card-empty{padding:18px 16px;color:#8a99a8;font-size:13px;text-align:center}

/* 商品规则 / 协议 / 人员 三页通用状态徽章 */
.status-badge{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.02em}
.status-badge::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.7}
.status-badge[data-status="ACTIVE"]{background:#d1fadf;color:#067647}
.status-badge[data-status="DRAFT"]{background:#e0e7ec;color:#475569}
.status-badge[data-status="RETIRED"]{background:#ffebe8;color:#b42318}
.status-badge[data-status="SUSPENDED"]{background:#fef0c7;color:#b54708}
.status-badge[data-status="IS_ACTIVE"]{background:#d1fadf;color:#067647}
.status-badge[data-status="IS_DISABLED"]{background:#ffebe8;color:#b42318}

/* 规则 / 协议 表的展开行（点行展开详情） */
.rule-detail-row>td{background:#fbfdff;padding:14px 18px;border-top:1px dashed #dbe5ee}
.rule-detail-row .rule-detail-grid{display:grid;grid-template-columns:140px 1fr;gap:6px 14px;font-size:13px;color:#3c5163}
.rule-detail-row .rule-detail-grid dt{color:#526373;font-weight:600}
.rule-detail-row .rule-detail-grid dd{margin:0;line-height:1.6}
.rule-detail-row .rule-detail-actions{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
.rule-detail-row .rule-detail-actions button{padding:4px 10px;font-size:12px}
.rule-detail-row .rule-detail-json{background:#0d2741;color:#cbe2f5;border-radius:6px;padding:10px 12px;font-family:'SF Mono',Consolas,monospace;font-size:11.5px;white-space:pre-wrap;word-break:break-all;margin-top:6px;max-height:200px;overflow:auto}

/* 人员表分组头 */
.user-group-row>td{background:#f4f8fc;color:#0d2741;font-weight:700;font-size:12px;letter-spacing:.06em;text-transform:uppercase;padding:8px 14px;border-top:1px solid #dbe5ee;border-bottom:1px solid #dbe5ee}
.user-group-row:first-child>td{border-top:0}

/* 角色徽章（HQ:role / WAREHOUSE:role@code） */
.role-chip{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:6px;background:#eef3f8;color:#38576d;font-size:11px;font-weight:600;font-family:'SF Mono',Consolas,monospace;margin:2px 4px 2px 0}
.role-chip[data-scope="HEADQUARTERS"]{background:#dbeafe;color:#1d4ed8}
.role-chip[data-scope="WAREHOUSE"]{background:#ede1f5;color:#5a1e5a}

/* 租户首次建品的主操作必须保持展开且明显，避免被普通折叠区淹没。 */
.sku-create-card{border:2px solid #2563eb;background:linear-gradient(135deg,#eff6ff 0%,#fff 70%);box-shadow:0 10px 26px rgba(37,99,235,.12)}
.sku-create-card>summary{display:flex;align-items:center;justify-content:space-between;gap:1rem;color:#1d4ed8;background:#dbeafe;border-radius:.6rem;padding:.9rem 1rem;cursor:pointer}
.sku-create-card>summary span{background:#2563eb;color:#fff;border-radius:999px;padding:.3rem .7rem;font-size:.78rem;font-weight:700}
.sku-create-card[open]>summary{margin-bottom:1rem}
.role-chip[data-scope="SUPER_ADMIN"]{background:#fee2e2;color:#991b1b}

/* 工作流横条（用于商品规则：维护 → 启用 → 发布） */
.workflow-ribbon{display:flex;align-items:stretch;gap:8px;padding:12px 14px;margin-bottom:16px;background:#fff;border:1px solid #dbe5ee;border-radius:10px;flex-wrap:wrap}
.workflow-ribbon .workflow-step{flex:1;min-width:200px;display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:8px;background:#f4f8fc;border:1px solid #dbe5ee;position:relative}
.workflow-ribbon .workflow-step .step-num{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#0d6e9d;color:#fff;font-weight:800;font-size:13px;flex:none}
.workflow-ribbon .workflow-step .step-text{display:flex;flex-direction:column;gap:2px;font-size:12.5px;color:#3c5163}
.workflow-ribbon .workflow-step .step-text b{color:#0d2741;font-size:13.5px}
.workflow-ribbon .workflow-step.is-done{background:#e7f6ef;border-color:#bfe5cf}
.workflow-ribbon .workflow-step.is-done .step-num{background:#1f7a3a}
.workflow-ribbon .workflow-step.is-active{background:#fff4df;border-color:#f5d9a3}
.workflow-ribbon .workflow-step.is-active .step-num{background:#a4520a}
@media(max-width:720px){.workflow-ribbon{flex-direction:column}.workflow-ribbon .workflow-step{min-width:0}}

/* 详情对话框（查看协议正文 / 规则 JSON）的内容样式 */
.dialog-body .agreement-content{max-height:60vh;overflow:auto;background:#fbfdff;border:1px solid #dbe5ee;border-radius:8px;padding:18px 22px;font-size:13.5px;line-height:1.85;color:#2c3a47;white-space:pre-wrap;word-break:break-word}
.dialog-body .agreement-content h1,.dialog-body .agreement-content h2,.dialog-body .agreement-content h3{margin:14px 0 8px;color:#0d2741}
.dialog-body .agreement-content p{margin:0 0 10px}
.dialog-body .agreement-meta-card{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin-bottom:14px;padding:10px 14px;background:#f4f8fc;border-radius:8px;font-size:12.5px;color:#3c5163}
.dialog-body .agreement-meta-card dt{color:#526373;font-weight:600}
.dialog-body .agreement-meta-card dd{margin:0;color:#0d2741;font-family:'SF Mono',Consolas,monospace}

/* 通用：表单内字段块（用于协议编辑器） */
.form-stack{display:flex;flex-direction:column;gap:14px}
.form-stack label{display:flex;flex-direction:column;gap:6px;font-weight:600;color:#38576d;font-size:13px}
.form-stack label small{font-weight:400;color:#687887;font-size:11.5px;line-height:1.55}
.form-stack .agreement-editor{background:#fff;border:1px solid #dbe5ee;border-radius:12px;padding:18px 20px}
.form-stack .agreement-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:flex-end;border-top:1px dashed #dbe5ee;padding-top:14px}
.form-stack .agreement-actions .terms-check{font-weight:400;color:#3c5163;font-size:13px;flex-direction:row;align-items:center;gap:6px}

/* 内联空状态 */
.inline-empty{padding:18px;color:#687887;text-align:center;background:#f8fbfd;border:1px dashed #d9e4eb;border-radius:8px;font-size:13px}

/* ============ 仓库基础设置 Tab 切换样式 ============ */
.settings-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--line);
  margin: 20px 0;
  overflow-x: auto;
}

.settings-tab {
  padding: 12px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: #687887;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.settings-tab:hover {
  color: var(--text);
  background: #f4f8fc;
}

.settings-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 600;
}

.settings-tab .tab-icon {
  font-size: 16px;
}

/* ============ 地址卡片样式 ============ */
.address-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.address-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}

.address-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.address-card.empty {
  opacity: 0.7;
}

.address-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #f4f8fc;
  border-bottom: 1px solid var(--line);
}

.address-type-badge {
  font-weight: 600;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-icon {
  font-size: 16px;
}

.history-badge {
  font-size: 11px;
  padding: 2px 8px;
  background: #e5ebf1;
  color: #526373;
  border-radius: 4px;
}

.edit-address-btn {
  padding: 6px 12px;
  font-size: 12px;
  background: white;
  border: 1px solid var(--line);
  color: var(--blue);
}

.edit-address-btn:hover {
  background: #f4f8fc;
  border-color: var(--blue);
}

.address-card-body {
  padding: 18px;
}

.address-company {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.address-row {
  margin-bottom: 4px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.address-icon {
  width: 18px;
  text-align: center;
}

.address-divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

.address-lines {
  font-size: 14px;
  line-height: 1.6;
}

.address-lines-label {
  font-weight: 600;
  color: #526373;
  margin-bottom: 6px;
  font-size: 12px;
}

.address-line {
  color: var(--text);
}

.address-line.primary {
  font-weight: 500;
}

.address-line.country {
  color: #687887;
  font-size: 13px;
}

.address-instructions {
  margin-top: 14px;
  padding: 12px;
  background: #f8fbfd;
  border-radius: 8px;
  border: 1px solid #e5eef4;
}

.instructions-label {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 12px;
  color: #526373;
}

.instructions-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.address-card-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 14px 18px;
  background: #fafbfc;
  border-top: 1px solid var(--line);
}

.copy-address-btn, .show-qr-btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-address-btn:hover, .show-qr-btn:hover {
  background: #f4f8fc;
  border-color: var(--blue);
  color: var(--blue);
}

.effective-date {
  margin-left: auto;
  font-size: 12px;
  color: #8a99a8;
}

/* ============ 二维码弹窗样式 ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.qr-modal h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 18px;
}

.qr-modal .hint {
  color: #687887;
  font-size: 13px;
  margin-bottom: 0;
}

.qr-display {
  margin: 20px 0;
}

.qr-image {
  width: 200px;
  height: 200px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: white;
}

.qr-hint {
  margin-top: 10px;
  font-size: 12px;
  color: #8a99a8;
}

.qr-preview {
  text-align: left;
  padding: 12px;
  background: #f4f8fc;
  border-radius: 8px;
  margin-bottom: 20px;
}

.preview-label {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 12px;
  color: #526373;
}

.preview-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-actions button {
  min-width: 120px;
}

.modal-actions button.secondary {
  background: #e5ebf1;
  color: #526373;
}

.modal-actions button.secondary:hover {
  background: #d0d9e0;
}

/* 折叠/展开功能 */
.collapsible-toggle {
  background: #f0f4f8;
  border: 1px solid #d0d9e0;
  border-radius: 6px;
  padding: 12px 16px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.collapsible-toggle:hover {
  background: #e8eef3;
}

.collapsible-toggle .toggle-icon {
  font-size: 12px;
  transition: transform 0.2s;
}

.collapsible-content {
  margin-bottom: 20px;
}

/* RTS 服务费标准表格 */
.rts-pricing-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.rts-pricing-summary h4 {
  margin: 0 0 12px 0;
  color: #475569;
  font-size: 14px;
}

.rts-pricing-summary .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rts-pricing-summary .data-table th,
.rts-pricing-summary .data-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.rts-pricing-summary .data-table th {
  background: #eef2f7;
  font-weight: 600;
  color: #475569;
}

.rts-pricing-summary .data-table tr:last-child td {
  border-bottom: none;
}

.rts-pricing-summary .hint {
  margin-top: 10px;
  margin-bottom: 0;
}

/* RTS 规格尺寸表格 */
.rts-specs-summary {
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.rts-specs-summary h4 {
  margin: 0 0 12px 0;
  color: #1e40af;
  font-size: 14px;
}

.rts-specs-summary .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rts-specs-summary .data-table th,
.rts-specs-summary .data-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #e0f2fe;
}

.rts-specs-summary .data-table th {
  background: #dbeafe;
  font-weight: 600;
  color: #1e40af;
}

.rts-specs-summary .data-table tr:last-child td {
  border-bottom: none;
}

/* 响应式调整 */
@media (max-width: 600px) {
  .address-cards-container {
    grid-template-columns: 1fr;
  }

  .settings-tabs {
    gap: 2px;
  }

  .settings-tab {
    padding: 10px 14px;
    font-size: 13px;
  }

  .address-card-footer {
    flex-wrap: wrap;
  }

  .effective-date {
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
    text-align: left;
  }
}

/* 仓库详情 Modal */
.warehouse-detail-modal h4 {
  margin: 16px 0 8px;
  font-size: 14px;
  color: #174968;
}

.warehouse-detail-modal .modal-action {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5edf2;
}

.warehouse-detail-modal .hint {
  margin-bottom: 12px;
}

/* ==========================================================================
   2DSM 全球直营海外仓 · 品牌视觉系统 & 社交媒体传播装修
   ========================================================================== */

/* 侧边栏品牌区域 */
.brand-sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 4px 14px;
  padding: 10px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(23, 105, 170, 0.25), rgba(15, 23, 42, 0.4));
  border: 1px solid rgba(147, 197, 253, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
  object-fit: contain;
}

.brand-sidebar-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.brand-sidebar-name {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.brand-sidebar-tagline {
  font-size: 10.5px;
  color: #93c5fd;
  margin-top: 3px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

/* 侧边栏底部官方生态与传播卡片 */
.brand-sidebar-footer {
  margin: 18px 4px 12px;
  padding: 11px 12px;
  background: rgba(15, 35, 56, 0.75);
  border: 1px solid rgba(147, 197, 253, 0.18);
  border-radius: 8px;
  font-size: 11.5px;
  color: #cbd5e1;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.brand-sidebar-footer-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.brand-sidebar-footer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  color: #f1f5f9;
  text-decoration: none;
  font-weight: 600;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  transition: all 0.15s ease;
  margin-top: 4px;
}

.brand-sidebar-footer-link:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.brand-copy-btn {
  background: transparent;
  border: 0;
  color: #93c5fd;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 11px;
  border-radius: 4px;
}
.brand-copy-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.brand-share-trigger {
  width: 100%;
  margin-top: 8px;
  padding: 6px 8px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  border: 0;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
  transition: filter 0.15s ease;
}
.brand-share-trigger:hover {
  filter: brightness(1.1);
}

/* 顶栏品牌背书与节点指示 */
.brand-top-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid #a7f3d0;
  border-radius: 20px;
  font-size: 12px;
  color: #065f46;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.brand-top-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* 社交媒体截图传播水印与背书卡片 */
.brand-social-proof {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  margin-top: 20px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0284c7;
  border-radius: 8px;
  font-size: 12px;
  color: #475569;
}

.brand-social-proof-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-social-proof-logo {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.brand-social-proof-text b {
  color: #0f172a;
  font-weight: 700;
}

.brand-social-proof-url {
  font-family: ui-monospace, monospace;
  font-weight: 600;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 7px;
  border-radius: 4px;
}

/* 社交传播海报弹窗 */
.brand-share-poster {
  text-align: center;
  padding: 18px 12px;
}

.brand-share-poster-card {
  background: linear-gradient(135deg, #0f172a, #1e3a8a, #0369a1);
  color: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 18px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.35);
  position: relative;
  overflow: hidden;
}

.brand-share-poster-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.3), transparent 70%);
  pointer-events: none;
}

.brand-share-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.brand-share-header img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.brand-share-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0;
}

.brand-share-subtitle {
  font-size: 13px;
  color: #93c5fd;
  margin: 4px 0 0;
  font-weight: 500;
}

.brand-share-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0;
  text-align: left;
}

.brand-share-feature-item {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
}

.brand-share-feature-item b {
  display: block;
  color: #38bdf8;
  font-size: 13px;
  margin-bottom: 2px;
}

.brand-share-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px;
  color: #bae6fd;
}

.brand-share-footer-url {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 6px;
}

/* 登录卡片品牌头部 */
.auth-brand-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.auth-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.auth-brand-name {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.auth-brand-slogan {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.auth-feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
}

.auth-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

