:root{
    --bg:#f7f9fc;
    --canvas:#edf2f8;
    --card:#ffffff;
    --card-2:#f8fafd;
    --border:#dbe5f0;
    --border-strong:#c7d5e5;
    --hair:#e8eef5;
    --row:#f0f5fb;
    --text:#152238;
    --text-1:var(--text);
    --text-2:#526176;
    --text-3:#78869a;
    --text-4:#a5b0c0;
    --green:#0d5be1;
    --green-d:#0847b5;
    --green-l:#e9f1ff;
    --green-ll:#f4f8ff;
    --sage:#2ba28d;
    --success:#08766d;
    --success-l:#e5f5f1;
    --warning:#a86608;
    --warning-l:#fff4df;
    --danger:#c2473a;
    --danger-l:#fff0ee;
    --ink:#101827;
    --ink-2:#172235;
    --gold:#a86a13;
    --font-sans:"Schibsted Grotesk","PingFang SC","Microsoft YaHei","Hiragino Sans GB",system-ui,-apple-system,sans-serif;
    --font-serif:"Newsreader",Georgia,"Songti SC",serif;
    --font-mono:"Schibsted Grotesk",ui-monospace,"SF Mono",Menlo,monospace;
    --shadow-sm:0 1px 2px rgba(21,34,56,.04);
    --shadow:0 1px 3px rgba(21,34,56,.06);
  }
  *{box-sizing:border-box;}
  .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
  html,body{margin:0;padding:0;}
  body{
    font-family:var(--font-sans);
    color:var(--text);
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
    background:var(--canvas);
  }
  /* ─────────── App shell ─────────── */
  .app{display:flex;width:1440px;height:100%;background:var(--bg);font-size:14px;letter-spacing:.1px;}
  .sb{width:232px;flex:0 0 232px;background:var(--ink);display:flex;flex-direction:column;position:relative;}
  .sb::after{content:"";position:absolute;top:0;right:0;bottom:0;width:1px;background:rgba(0,0,0,.25);}
  .sb-brand{height:72px;display:flex;align-items:center;gap:12px;padding:0 22px;}
  .sb-logo{width:34px;height:34px;border-radius:9px;background:var(--green);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:600;font-size:18px;flex:0 0 auto;box-shadow:inset 0 1px 0 rgba(255,255,255,.18);}
  .sb-name{font-size:16px;font-weight:600;color:#f8fafc;letter-spacing:1px;}
  .sb-name small{display:block;font-family:var(--font-sans);font-size:9.5px;font-weight:500;color:#8fa0b8;letter-spacing:2.5px;margin-top:2px;}
  .sb-nav{flex:1;padding:14px 14px;overflow:hidden;}
  .nav-sec{font-size:10.5px;letter-spacing:1.5px;color:#71819a;font-weight:600;padding:0 12px;margin:16px 0 8px;text-transform:uppercase;}
  .nav-group{margin-bottom:1px;}
  .nav-item{display:flex;align-items:center;gap:12px;height:42px;padding:0 14px;border-radius:9px;color:#aab7c9;cursor:pointer;font-size:14px;position:relative;transition:background .15s,color .15s;}
  .nav-item .ic{width:18px;height:18px;flex:0 0 auto;color:#7e8fa7;transition:color .15s;}
  .nav-item.top{font-weight:500;}
  .nav-item.active-top{color:#f8fafc;background:rgba(255,255,255,.07);}
  .nav-item.active-top .ic{color:#7bb0ff;}
  .nav-item.solo:hover,.nav-item.top:hover{background:rgba(255,255,255,.05);color:#e4ebf5;}
  .nav-item .caret{margin-left:auto;width:11px;height:11px;color:#71819a;transition:transform .15s;}
  .nav-group:not(.is-expanded) .caret{transform:rotate(-90deg);}
  .nav-sub{margin:2px 0 8px;}
  .nav-subitem{display:flex;align-items:center;height:38px;padding:0 14px 0 46px;border-radius:8px;color:#9aa9be;font-size:13.5px;cursor:pointer;position:relative;transition:background .15s,color .15s;}
  .nav-subitem:hover{background:rgba(255,255,255,.05);color:#dce6f4;}
  .nav-subitem.active{color:#f8fafc;font-weight:500;background:rgba(13,91,225,.18);}
  .nav-subitem.active::before{content:"";position:absolute;left:26px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:50%;background:#6da8ff;box-shadow:0 0 0 3px rgba(109,168,255,.18);}
  .nav-subitem .dot{position:absolute;left:25px;top:50%;transform:translateY(-50%);width:5px;height:5px;border-radius:50%;background:#53647d;}
  .nav-badge{margin-left:auto;min-width:19px;height:19px;padding:0 6px;border-radius:10px;background:rgba(235,102,84,.18);color:#ffad9f;font-size:11px;font-weight:600;display:flex;align-items:center;justify-content:center;font-variant-numeric:tabular-nums;}
  .nav-badge[hidden]{display:none!important;}
  .nav-subitem .nav-badge{position:relative;margin-left:auto;}
  .sb-foot{padding:14px 18px;border-top:1px solid rgba(255,255,255,.07);display:flex;align-items:center;gap:11px;}
  .sb-foot .ava{width:32px;height:32px;border-radius:50%;background:rgba(73,139,255,.18);color:#9fc2ff;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;}
  .sb-foot .who{font-size:13px;color:#d8e2ee;font-weight:500;}
  .sb-foot .who small{display:block;font-size:11px;color:#8fa0b8;font-weight:400;margin-top:1px;white-space:nowrap;}

  /* ─────────── Main ─────────── */
  .main{flex:1;display:flex;flex-direction:column;min-width:0;}
  .topbar{height:72px;flex:0 0 72px;background:var(--bg);border-bottom:1px solid var(--hair);display:flex;align-items:center;padding:0 34px;gap:16px;}
  .crumb{font-size:13px;color:var(--text-3);display:flex;align-items:center;gap:9px;font-weight:500;}
  .crumb b{color:var(--text);font-weight:600;font-size:15px;}
  .crumb .sep{color:var(--text-4);font-weight:400;}
  .topbar .spacer{flex:1;}
  .tb-icon{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:var(--text-3);border:1px solid var(--border);background:var(--card);}
  .content{flex:1;padding:30px 34px 40px;overflow:hidden;}
  .content-mall-product-ledger{padding-top:0;}
  .page-head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:24px;}
  .page-title{font-family:var(--font-serif);font-size:29px;font-weight:500;letter-spacing:-.3px;color:var(--text);line-height:1.1;}
  .page-desc{font-size:13px;color:var(--text-3);margin-top:8px;letter-spacing:.2px;}

  /* ─────────── Buttons ─────────── */
  .btn{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 16px;border-radius:9px;border:1px solid var(--border-strong);background:var(--card);color:var(--text-2);font-size:13.5px;font-weight:500;cursor:pointer;white-space:nowrap;font-family:inherit;transition:all .15s;}
  .btn:hover{border-color:#9fb9e1;color:var(--text);background:#fff;}
  .btn .ic{width:15px;height:15px;}
  .btn-primary{background:var(--green);border-color:var(--green);color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.12);}
  .btn-primary:hover{background:var(--green-d);border-color:var(--green-d);color:#fff;}
  .btn-sm{height:32px;padding:0 12px;font-size:12.5px;border-radius:8px;}
  .btn-link{background:none;border:none;color:var(--green);font-weight:600;cursor:pointer;font-size:13px;padding:0;font-family:inherit;white-space:nowrap;}
  .btn-link:hover{color:var(--green-d);}
  .btn-ghost{border-color:transparent;background:transparent;}

  /* ─────────── Filter bar ─────────── */
  .filters{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:18px 20px;margin-bottom:18px;display:flex;flex-wrap:wrap;gap:16px 20px;align-items:flex-end;box-shadow:var(--shadow-sm);}
  .field{display:flex;flex-direction:column;gap:7px;}
  .field label{font-size:11.5px;color:var(--text-3);font-weight:600;letter-spacing:.4px;}
  .ctrl{height:38px;border:1px solid var(--border-strong);border-radius:9px;background:#fff;padding:0 13px;display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--text);min-width:140px;}
  .ctrl.sel{justify-content:space-between;cursor:pointer;}
  .ctrl .ph{color:var(--text-4);}
  .ctrl .ic{width:14px;height:14px;color:var(--text-4);}
  .ctrl.search{min-width:240px;}
  .ctrl.search input{border:none;outline:none;font-size:13.5px;flex:1;background:none;font-family:inherit;color:var(--text);}

  /* segmented status chips */
  .seg{display:inline-flex;background:var(--card-2);border:1px solid var(--border);border-radius:10px;padding:3px;gap:2px;}
  .seg span{padding:7px 14px;border-radius:7px;font-size:13px;color:var(--text-2);cursor:pointer;font-weight:500;}
  .seg span.on{background:var(--green);color:#fff;}

  /* tabs */
  .tabs{display:flex;gap:28px;border-bottom:1px solid var(--border);margin-bottom:0;}
  .tabs .tab{padding:0 2px 14px;font-size:15px;color:var(--text-3);cursor:pointer;position:relative;font-weight:500;}
  .tabs .tab.on{color:var(--text);}
  .tabs .tab.on::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--green);}
  .tabs .tab .cnt{margin-left:8px;font-size:12px;color:var(--text-4);background:var(--card-2);padding:1px 8px;border-radius:9px;font-variant-numeric:tabular-nums;}
  .tabs .tab.on .cnt{background:var(--green-l);color:var(--green-d);}

  /* ─────────── Card / table ─────────── */
  .card{background:var(--card);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-sm);overflow:hidden;}
  .card-head{display:flex;align-items:center;justify-content:space-between;padding:17px 20px;border-bottom:1px solid var(--hair);}
  .card-head h3{margin:0;font-size:15px;font-weight:600;letter-spacing:.2px;white-space:nowrap;}
  .card-head .sub{font-size:12.5px;color:var(--text-3);font-weight:400;margin-left:9px;white-space:nowrap;}
  .table-shell{max-width:100%;overflow:auto;border:1px solid var(--border);border-radius:8px;background:var(--card);}
  .listing-sticky-scrollbar{position:fixed;z-index:1100;bottom:8px;height:18px;overflow-x:auto;overflow-y:hidden;border:1px solid var(--border-strong);border-radius:9px;background:rgba(255,255,255,.96);box-shadow:0 2px 10px rgba(21,34,56,.14);scrollbar-color:var(--green) transparent;}
  .listing-sticky-scrollbar[hidden]{display:none;}
  .listing-sticky-scrollbar > div{height:1px;}
  .mall-ledger-sticky-header{position:fixed;z-index:1050;overflow:hidden;background:var(--card-2);border:1px solid var(--border);border-radius:8px 8px 0 0;box-shadow:0 2px 8px rgba(21,34,56,.12);pointer-events:none;}
  .mall-ledger-sticky-header[hidden]{display:none;}
  .mall-ledger-sticky-header table{table-layout:fixed;margin:0;transform-origin:top left;}
  .mall-ledger-sticky-header .mall-product-table-head th{position:static;box-shadow:0 1px 0 var(--border);}
  .tbl{width:100%;border-collapse:collapse;font-size:13.5px;}
  .tbl th{text-align:left;font-weight:600;color:var(--text-3);background:transparent;padding:14px 18px;border-bottom:1px solid var(--border);white-space:nowrap;font-size:11.5px;letter-spacing:.5px;text-transform:uppercase;}
  .mall-product-table-head th,.listing-table-head th{position:sticky;top:0;z-index:8;background:var(--card-2);box-shadow:0 1px 0 var(--border),0 3px 8px rgba(21,34,56,.08);}
  .tbl td{padding:17px 18px;border-bottom:1px solid var(--hair);color:var(--text-2);vertical-align:middle;}
  .tbl tr:last-child td{border-bottom:none;}
  .tbl tbody tr{transition:background .12s;}
  .tbl tbody tr:hover td{background:var(--green-ll);}
  .tbl .num{text-align:right;font-variant-numeric:tabular-nums;font-feature-settings:"tnum";}
  .tbl .right{text-align:right;}
  .tbl .center{text-align:center;}
  .tbl .mono{font-family:var(--font-mono);font-size:12.5px;color:var(--text);letter-spacing:-.2px;}
  .tbl .prod{color:var(--text);font-weight:500;max-width:280px;}
  .tbl .strong{color:var(--text);font-weight:600;}
  .tbl .pos{color:var(--success);font-weight:600;}
  .tbl .neg{color:var(--danger);font-weight:600;}
  .tbl .muted{color:var(--text-4);}
  .product-thumb{width:64px;height:64px;border-radius:6px;overflow:hidden;background:#f4f7fb;display:flex;align-items:center;justify-content:center;color:var(--text-4);font-size:11px;}
  .product-thumb img{width:100%;height:100%;object-fit:contain;display:block;}
  .product-thumb[data-image-preview]{cursor:zoom-in;}
  .product-thumb img[data-image-preview]{cursor:zoom-in;}
  .image-preview-modal{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;padding:32px;background:rgba(16,24,39,.78);cursor:zoom-out;}
  .image-preview-modal img{max-width:90vw;max-height:90vh;object-fit:contain;border-radius:10px;background:#fff;box-shadow:0 18px 60px rgba(0,0,0,.28);cursor:default;}
  .image-preview-close{position:absolute;top:18px;right:22px;width:38px;height:38px;border:1px solid rgba(255,255,255,.55);border-radius:50%;background:rgba(0,0,0,.2);color:#fff;font-size:28px;line-height:1;cursor:pointer;}
  .mall-product-table td{padding-top:10px;padding-bottom:10px;}
  .ledger-goods-group td{padding:10px 18px;background:var(--card-2);border-bottom:1px solid var(--border);}
  .ledger-group-head{display:flex;align-items:center;gap:12px;}
  .ledger-group-toggle{flex:0 0 auto;}
  .ledger-profit-summary{margin-left:auto;min-width:190px;padding:8px 12px;border-left:3px solid var(--border-strong);background:var(--card);border-radius:7px;line-height:1.35;}
  .ledger-profit-title{font-size:11px;color:var(--text-3);}
  .ledger-profit-value{font-size:14px;font-weight:700;color:var(--text);margin-top:2px;}
  .ledger-profit-missing{font-size:11px;color:var(--danger);margin-top:3px;}
  .ledger-profit-summary.profit-good{border-left-color:var(--success);}
  .ledger-profit-summary.profit-good .ledger-profit-value,.ledger-profit-rate.profit-good{color:var(--success);}
  .ledger-profit-summary.profit-warn{border-left-color:var(--warning);}
  .ledger-profit-summary.profit-warn .ledger-profit-value,.ledger-profit-rate.profit-warn{color:var(--warning);}
  .ledger-profit-summary.profit-risk{border-left-color:var(--danger);}
  .ledger-profit-summary.profit-risk .ledger-profit-value,.ledger-profit-rate.profit-risk{color:var(--danger);}
  .ledger-profit-summary.profit-missing{border-left-color:var(--danger);}
  .ledger-profit-summary.profit-missing .ledger-profit-value,.ledger-profit-rate.profit-missing{color:var(--danger);}
  .ledger-profit-rate{font-weight:600;}
  .grp-row td{background:var(--card-2) !important;font-weight:600;color:var(--text);font-size:13px;padding:12px 18px;}
  .row-merge td{border-bottom:none;}
  .row-merge.last td{border-bottom:1px solid var(--hair);}
  .ck{width:16px;height:16px;border:1.5px solid var(--border-strong);border-radius:5px;display:inline-block;vertical-align:middle;background:#fff;}
  .ck.on{background:var(--green);border-color:var(--green);position:relative;}
  .ck.on::after{content:"";position:absolute;left:4.5px;top:1.5px;width:4px;height:8px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg);}

  /* link to 1688 */
  .lk{color:var(--green);text-decoration:none;border-bottom:1px solid rgba(13,91,225,.3);font-size:12.5px;font-weight:500;}
  .lk:hover{color:var(--green-d);border-color:var(--green-d);}
  .id1688{display:inline-flex;align-items:center;gap:5px;background:var(--card-2);color:var(--gold);border:1px solid #f1dfc0;border-radius:6px;padding:2px 8px;font-size:11px;font-weight:600;font-family:var(--font-mono);letter-spacing:-.2px;}

  /* tags — muted, cohesive */
  .tag{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:7px;font-size:11.5px;font-weight:600;white-space:nowrap;letter-spacing:.2px;}
  .tag .pip{width:5px;height:5px;border-radius:50%;background:currentColor;}
  .t-gray{background:#eef2f6;color:#64748b;}
  .t-blue{background:#e9f1ff;color:#2860a9;}
  .t-green{background:var(--success-l);color:var(--success);}
  .t-amber{background:var(--warning-l);color:var(--warning);}
  .t-red{background:var(--danger-l);color:var(--danger);}
  .t-purple{background:#f0edfa;color:#6557a5;}
  .t-teal{background:#e4f5f3;color:#08766d;}

  /* stat cards (dashboard) */
  .stat-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:13px;margin-bottom:20px;}
  .stat{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:17px 17px;box-shadow:var(--shadow-sm);position:relative;}
  .stat .lbl{font-size:12px;color:var(--text-3);display:flex;align-items:center;gap:6px;font-weight:500;white-space:nowrap;}
  .stat .val{font-family:var(--font-serif);font-size:32px;font-weight:440;margin-top:10px;letter-spacing:-.5px;font-variant-numeric:tabular-nums;color:var(--text);line-height:1;}
  .stat .val small{font-family:var(--font-sans);font-size:12.5px;font-weight:500;color:var(--text-3);margin-left:3px;}
  .stat.alert .val{color:var(--danger);}
  .stat.alert::before{content:"";position:absolute;top:16px;right:16px;width:7px;height:7px;border-radius:50%;background:var(--danger);}
  .stat.profit{background:var(--ink-2);border-color:var(--ink-2);box-shadow:0 6px 20px rgba(21,34,56,.18);}
  .stat.profit .lbl{color:rgba(232,240,251,.72);}
  .stat.profit .val{color:#fff;}
  .stat.profit .val small{color:rgba(232,240,251,.62);}
  .stat .trend{font-size:11px;margin-top:8px;color:var(--text-4);}
  .stat .trend .up{color:var(--green);}
  .stat .trend .dn{color:var(--danger);}
  .stat.profit .trend{color:rgba(232,240,251,.6);}

  /* big metric row */
  .metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;}
  .metric{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:20px 22px;box-shadow:var(--shadow-sm);}
  .metric .mh{display:flex;align-items:center;justify-content:space-between;}
  .metric .mt{font-size:12.5px;color:var(--text-3);font-weight:600;letter-spacing:.3px;}
  .metric .mv{font-family:var(--font-serif);font-size:30px;font-weight:440;margin-top:12px;letter-spacing:-.4px;color:var(--text);}
  .metric .msub{font-size:12px;color:var(--text-3);margin-top:8px;}
  .metric .msub .up{color:var(--green);font-weight:600;}
  .metric .msub .dn{color:var(--danger);font-weight:600;}

  /* spark / mini bars */
  .spark{display:flex;align-items:flex-end;gap:4px;height:36px;margin-top:14px;}
  .spark i{flex:1;background:var(--green-l);border-radius:2px 2px 0 0;}
  .spark i.hi{background:var(--green);}

  /* dashboard panels */
  .panels{display:grid;grid-template-columns:1.3fr 1fr;gap:16px;margin-top:18px;}
  .todo-item{display:flex;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid var(--hair);}
  .todo-item:last-child{border-bottom:none;}
  .todo-item .oid{font-family:var(--font-mono);font-size:12.5px;color:var(--text);font-weight:600;letter-spacing:-.2px;}
  .todo-item .meta{font-size:12px;color:var(--text-3);margin-top:3px;}
  .todo-item .amt{margin-left:auto;text-align:right;}
  .todo-item .amt b{font-variant-numeric:tabular-nums;font-family:var(--font-serif);font-weight:500;font-size:15px;}

  .batch-item{padding:14px 0;border-bottom:1px solid var(--hair);}
  .batch-item:last-child{border-bottom:none;}
  .bar{height:6px;border-radius:3px;background:var(--row);overflow:hidden;margin-top:10px;}
  .bar i{display:block;height:100%;background:var(--green);border-radius:3px;}

  /* progress pill */
  .prog{display:inline-flex;align-items:center;gap:9px;}
  .prog .track{width:96px;height:6px;border-radius:3px;background:var(--row);overflow:hidden;}
  .prog .track i{display:block;height:100%;background:var(--green);}
  .prog .pct{font-size:12px;color:var(--text-3);font-variant-numeric:tabular-nums;min-width:62px;font-family:var(--font-mono);}

  /* detail page */
  .grid-2{display:grid;grid-template-columns:1fr 328px;gap:16px;align-items:start;}
  .info-row{display:flex;padding:12px 0;border-bottom:1px solid var(--hair);font-size:13.5px;}
  .info-row:last-child{border-bottom:none;}
  .info-row .k{width:90px;flex:0 0 90px;color:var(--text-3);}
  .info-row .v{color:var(--text);flex:1;}
  .summary-line{display:flex;justify-content:space-between;padding:12px 0;font-size:13.5px;border-bottom:1px solid var(--hair);}
  .summary-line:last-child{border-bottom:none;}
  .summary-line .k{color:var(--text-3);}
  .summary-line .v{font-variant-numeric:tabular-nums;font-weight:600;color:var(--text);}
  .summary-line.total{margin-top:6px;padding-top:16px;border-top:1.5px solid var(--border-strong);border-bottom:none;}
  .summary-line.total .k{color:var(--text);font-weight:600;font-size:14px;}
  .summary-line.total .v{font-family:var(--font-serif);font-size:24px;font-weight:500;color:var(--green);}

  .form-inline{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;}
  .input{height:38px;border:1px solid var(--border-strong);border-radius:9px;padding:0 13px;font-size:13.5px;background:#fff;display:flex;align-items:center;color:var(--text);font-family:inherit;}
  .input.ph{color:var(--text-4);}

  .callout{display:flex;gap:11px;padding:14px 16px;border-radius:11px;font-size:13px;line-height:1.55;}
  [data-fixed-category-summary][hidden]{display:none}
  .callout .ic{width:17px;height:17px;flex:0 0 auto;margin-top:1px;}
  .c-amber{background:var(--warning-l);color:var(--warning);border:1px solid #f5dfb4;}
  .c-blue{background:#edf4ff;color:#255ca5;border:1px solid #d7e6fb;}
  .c-green{background:var(--success-l);color:var(--success);border:1px solid #cce9e2;}
  .c-red{background:var(--danger-l);color:var(--danger);border:1px solid #f3d3cf;}

  /* candidate suggestion box */
  .cand{background:var(--card-2);border:1px solid var(--border);border-radius:9px;padding:11px 13px;font-size:12.5px;}
  .cand .ct{color:var(--text-3);margin-bottom:7px;font-weight:500;}
  .cand .cmatch{display:flex;align-items:center;gap:8px;color:var(--text);}
  .cand .pctn{margin-left:auto;color:var(--green);font-weight:600;}

  /* upload dropzone */
  .drop{border:1.5px dashed #b9c9dc;border-radius:11px;background:var(--card-2);padding:32px;text-align:center;color:var(--text-3);}
  .drop .di{width:36px;height:36px;color:var(--green);margin:0 auto 11px;}
  .drop b{color:var(--text);font-weight:600;}

  /* chart (finance) */
  .chart{position:relative;height:240px;padding:10px 8px 24px;}
  .chart .gl{position:absolute;left:50px;right:8px;border-top:1px solid var(--hair);}
  .chart .yl{position:absolute;left:0;font-size:11px;color:var(--text-4);transform:translateY(-50%);font-family:var(--font-mono);}
  .bars{position:absolute;left:50px;right:8px;bottom:24px;top:10px;display:flex;align-items:flex-end;gap:12px;}
  .bars .bcol{flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;height:100%;justify-content:flex-end;}
  .bars .bstack{width:58%;display:flex;flex-direction:column-reverse;border-radius:4px 4px 0 0;overflow:hidden;}
  .bars .bx{font-size:10.5px;color:var(--text-4);position:absolute;bottom:4px;}
  .legend{display:flex;gap:18px;font-size:12px;color:var(--text-3);}
  .legend span{display:flex;align-items:center;gap:7px;}
  .legend i{width:10px;height:10px;border-radius:3px;}

  .pager{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-top:1px solid var(--hair);font-size:13px;color:var(--text-3);}
  .pager .pages{display:flex;gap:5px;}
  .pager .pg{min-width:32px;height:32px;border-radius:8px;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;background:var(--card);cursor:pointer;font-size:13px;color:var(--text-2);font-variant-numeric:tabular-nums;}
  .pager .pg.on{background:var(--green);border-color:var(--green);color:#fff;}

  .switch{width:38px;height:21px;border-radius:11px;background:var(--green);position:relative;display:inline-block;vertical-align:middle;cursor:pointer;}
  .switch::after{content:"";position:absolute;top:2px;left:19px;width:17px;height:17px;border-radius:50%;background:#fff;transition:left .15s;box-shadow:0 1px 2px rgba(0,0,0,.2);}
  .switch.off{background:#c8d3df;}
  .switch.off::after{left:2px;}

  /* ─────────── 交互原型模式 ─────────── */
  html.proto, body.proto{height:100%;}
  body.proto{background:var(--bg);overflow:hidden;}
  #app{width:100vw;height:100vh;overflow:hidden;}
  body.proto .app{width:100%;height:100vh;min-width:1080px;}
  body.proto .content{overflow:auto;}
  body.proto .nav-item,body.proto .nav-subitem,body.proto .tab,body.proto .seg span,body.proto .pg,body.proto .lk,body.proto .btn,body.proto .btn-link{cursor:pointer;}
  body.proto .ck{cursor:pointer;}
  /* scrollbar */
  body.proto .content::-webkit-scrollbar{width:10px;height:10px;}
  body.proto .content::-webkit-scrollbar-thumb{background:#c8d4e2;border-radius:6px;border:2px solid var(--bg);}
  body.proto .content::-webkit-scrollbar-track{background:transparent;}

  /* toast */
  .toast{position:fixed;bottom:30px;left:50%;transform:translate(-50%,16px);z-index:1400;display:flex;align-items:center;gap:10px;
    background:var(--ink);color:#f8fafc;padding:13px 20px;border-radius:12px;font-size:14px;font-weight:500;letter-spacing:.2px;
    box-shadow:0 12px 36px rgba(16,24,39,.28);opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;}
  .toast.show{opacity:1;transform:translate(-50%,0);}
  .toast svg{width:18px;height:18px;color:var(--sage);flex:0 0 auto;}

  /* application dialogs */
  .action-dialog{position:fixed;inset:0;z-index:1300;display:flex;align-items:center;justify-content:center;padding:24px;}
  .action-dialog-backdrop{position:absolute;inset:0;background:rgba(16,24,39,.48);opacity:0;transition:opacity .16s ease;}
  .action-dialog-panel{position:relative;width:min(100%,460px);padding:24px;background:var(--card);border:1px solid var(--border);border-radius:16px;box-shadow:0 24px 64px rgba(16,24,39,.24);opacity:0;transform:translateY(8px) scale(.985);transition:opacity .16s ease,transform .16s ease;}
  .action-dialog.is-open .action-dialog-backdrop,.action-dialog.is-open .action-dialog-panel{opacity:1;}
  .action-dialog.is-open .action-dialog-panel{transform:translateY(0) scale(1);}
  .action-dialog-head{display:grid;grid-template-columns:38px minmax(0,1fr) 28px;gap:12px;align-items:start;}
  .action-dialog-icon{width:38px;height:38px;border-radius:10px;background:var(--green-l);color:var(--green);display:flex;align-items:center;justify-content:center;}
  .action-dialog-danger .action-dialog-icon{background:var(--danger-l);color:var(--danger);}
  .action-dialog-icon svg{width:20px;height:20px;}
  .action-dialog-head h2{margin:1px 0 5px;font-size:17px;line-height:1.35;color:var(--text);}
  .action-dialog-head p{margin:0;font-size:13px;line-height:1.65;color:var(--text-2);}
  .action-dialog-close{width:28px;height:28px;padding:0;border:0;border-radius:7px;background:transparent;color:var(--text-3);font-size:22px;line-height:1;cursor:pointer;}
  .action-dialog-close:hover{background:var(--card-2);color:var(--text);}
  .action-dialog-field{display:block;margin-top:18px;}
  .action-dialog-field span{display:block;margin-bottom:7px;font-size:12px;font-weight:600;color:var(--text-2);}
  .action-dialog-field input,.action-dialog-field select{width:100%;height:40px;padding:0 11px;border:1px solid var(--border-strong);border-radius:9px;background:var(--card-2);color:var(--text);font:inherit;outline:none;}
  .action-dialog-field input:focus,.action-dialog-field select:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(13,91,225,.12);background:#fff;}
  .action-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px;}
  .action-dialog-actions .btn{min-width:90px;justify-content:center;}
  .cloud-binding-panel{width:min(100%,860px);max-height:calc(100vh - 48px);overflow:auto;}
  .cloud-binding-layout{display:grid;grid-template-columns:minmax(260px,.9fr) minmax(320px,1.1fr);gap:16px;margin-top:20px;}
  .cloud-binding-candidates{display:flex;flex-direction:column;gap:8px;max-height:420px;overflow:auto;}
  .cloud-binding-candidate{display:flex;flex-direction:column;gap:5px;padding:13px;text-align:left;border:1px solid var(--border);border-radius:10px;background:var(--card-2);color:var(--text);cursor:pointer;}
  .cloud-binding-candidate span{font-size:12px;color:var(--text-3);}
  .cloud-binding-candidate.is-selected{border-color:var(--green);background:var(--green-l);box-shadow:0 0 0 2px rgba(13,91,225,.08);}
  .cloud-binding-mappings{padding:14px;border:1px solid var(--border);border-radius:10px;background:#fff;}
  .cloud-binding-mappings h3{margin:0 0 10px;font-size:14px;}
  .cloud-binding-map{display:grid;grid-template-columns:minmax(120px,1fr) minmax(160px,1.2fr);gap:10px;align-items:center;padding:9px 0;border-top:1px solid var(--border);}
  .cloud-binding-map span{display:flex;flex-direction:column;gap:3px;}
  .cloud-binding-map em{font-size:12px;font-style:normal;color:var(--text-3);}
  .cloud-binding-map select{height:38px;border:1px solid var(--border-strong);border-radius:8px;background:#fff;padding:0 9px;color:var(--text);}
  .cloud-binding-error{min-height:18px;margin-top:10px;color:var(--danger);font-size:12px;}
  .listing-cloud-exists{color:#9a6700;font-weight:600;}
  @media(max-width:760px){.cloud-binding-layout{grid-template-columns:1fr}.cloud-binding-map{grid-template-columns:1fr}.cloud-binding-candidates{max-height:220px}}
  .btn-danger{background:var(--danger);border-color:var(--danger);color:#fff;}
  .btn-danger:hover{background:#a9342a;border-color:#a9342a;color:#fff;}

  /* drawer */
  #drawer{position:fixed;inset:0;z-index:150;}
  .drawer-mask{position:absolute;inset:0;background:rgba(16,24,39,.32);opacity:0;transition:opacity .26s;}
  #drawer.open .drawer-mask{opacity:1;}
  .drawer{position:absolute;top:0;right:0;bottom:0;width:480px;background:var(--bg);box-shadow:-16px 0 48px rgba(16,24,39,.2);
    display:flex;flex-direction:column;transform:translateX(100%);transition:transform .28s cubic-bezier(.3,.7,.3,1);}
  #drawer.open .drawer{transform:none;}
  .drawer-head{display:flex;align-items:flex-start;justify-content:space-between;padding:24px 26px;border-bottom:1px solid var(--hair);}
  .drawer-x{border:none;background:transparent;font-size:24px;line-height:1;color:var(--text-3);cursor:pointer;width:32px;height:32px;border-radius:8px;}
  .drawer-x:hover{background:var(--card-2);color:var(--text);}
  .drawer-body{flex:1;overflow:auto;padding:24px 26px;}
  .drawer-foot{display:flex;justify-content:flex-end;gap:10px;padding:18px 26px;border-top:1px solid var(--hair);background:var(--card);}
  .drawer-foot .btn{height:40px;padding:0 22px;}

  /* ─────────── 多店铺上品与设置 ─────────── */
  .malls-import-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 10px;
  }
  .mall-import-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    background-color: var(--card);
  }
  .mall-import-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 12px;
  }
  .mall-import-item select {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--text-1);
    outline: none;
    font-size: 13.5px;
  }
  .mall-config-row {
    display: grid;
    grid-template-columns: 74px 150px 1.5fr 2fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    background: var(--card);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
  }
  .mall-config-row input {
    height: 34px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-1);
    width: 100%;
  }
  .mall-config-row .btn-sm {
    height: 34px;
  }

  /* ─────────── 新品上架草稿 ─────────── */
  .listing-import-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
  .listing-import-body{padding:20px;display:flex;flex-direction:column;gap:14px;}
  .listing-import-body .input{width:100%;}
  .listing-import-body .btn{align-self:flex-start;}
  .manual-listing-form{margin-bottom:16px;overflow:hidden;}
  .manual-listing-form>summary{padding:17px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;list-style:none;}
  .manual-listing-form>summary::-webkit-details-marker{display:none;}
  .manual-listing-form>summary span:first-child{display:flex;flex-direction:column;gap:4px;}
  .manual-listing-form>summary b{font-size:14px;}
  .manual-listing-form>summary small,.manual-listing-form>summary span:last-child{font-size:11.5px;color:var(--text-3);}
  .manual-listing-body{padding:18px 20px 20px;border-top:1px solid var(--hair);}
  .manual-listing-base,.manual-listing-images{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
  .manual-listing-images{margin-top:14px;}
  .manual-listing-base .input{width:100%;}
  .manual-listing-skus{margin-top:20px;padding-top:17px;border-top:1px solid var(--hair);}
  .manual-listing-section-head,.manual-listing-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;}
  .manual-listing-sku-row{margin-top:10px;padding:12px;display:grid;grid-template-columns:minmax(150px,1.4fr) repeat(4,minmax(105px,1fr)) auto;gap:10px;align-items:end;border:1px solid var(--hair);border-radius:10px;background:var(--card-2);}
  .manual-listing-sku-row .input{width:100%;}
  .manual-listing-remove{margin-bottom:1px;color:#a8392c;}
  .manual-listing-actions{margin-top:18px;justify-content:flex-start;}
  .manual-listing-actions span{font-size:11.5px;color:var(--text-3);}
  .listing-targets{padding:18px 20px;display:grid;grid-template-columns:220px minmax(280px,1fr);gap:16px;}
  .listing-targets .input{width:100%;}
  .listing-table{min-width:1280px;}
  .listing-product{min-width:250px;vertical-align:top;}
  .listing-product-main{display:flex;align-items:flex-start;gap:12px;}
  .listing-product-main img.product-thumb{object-fit:contain;flex:0 0 64px;}
  .listing-price{width:92px;height:34px;padding:0 9px;text-align:right;font-family:var(--font-mono);}
  .listing-no-image{flex:0 0 64px;}
  .listing-status-card{overflow:hidden;}
  .listing-status-head{gap:16px;align-items:flex-start;}
  .listing-status-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;}
  .listing-status-tabs{display:flex;gap:6px;padding:0 20px 14px;border-bottom:1px solid var(--hair);overflow-x:auto;}
  .listing-status-tab{height:34px;padding:0 13px;border:1px solid var(--border);border-radius:8px;background:var(--card-2);color:var(--text-2);display:inline-flex;align-items:center;gap:7px;font:inherit;white-space:nowrap;cursor:pointer;}
  .listing-status-tab b{min-width:20px;padding:1px 6px;border-radius:999px;background:rgba(13,91,225,.08);font-size:11px;font-variant-numeric:tabular-nums;}
  .listing-status-tab.active{border-color:var(--green);background:var(--green);color:#fff;}
  .listing-status-tab.active b{background:rgba(255,255,255,.18);color:#fff;}
  .listing-status-cell{min-width:92px;vertical-align:top;}
  .listing-status-reason{min-width:190px;max-width:260px;vertical-align:top;line-height:1.55;}
  .listing-table th:last-child,.listing-table td:last-child{position:sticky;right:0;z-index:5;background:var(--card);box-shadow:-8px 0 12px -12px rgba(21,34,56,.42);}
  .listing-table-head th:last-child{z-index:12;background:var(--card-2);}
  @media (max-width:1100px){.listing-status-head{flex-direction:column;}.listing-status-actions{justify-content:flex-start;}}
  @media (max-width:1100px){.manual-listing-sku-row{grid-template-columns:repeat(3,minmax(120px,1fr));}.manual-listing-remove{justify-self:start;}.manual-listing-base,.manual-listing-images{grid-template-columns:1fr 1fr;}}
  .listing-master-detail{height:calc(100vh - 420px);min-height:560px;max-height:720px;display:grid;grid-template-columns:330px minmax(0,1fr);background:var(--card);border-top:1px solid var(--border);overflow:hidden;}
  .listing-master{min-width:0;min-height:0;border-right:1px solid var(--border);display:flex;flex-direction:column;background:var(--card);}
  .listing-master-head{height:51px;flex:0 0 51px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--hair);}
  .listing-master-head b{font-size:14px;}
  .listing-master-head span{font-size:12px;color:var(--text-3);}
  .listing-product-list{flex:1;min-height:0;overflow:auto;scrollbar-color:#c8d4e2 transparent;}
  .listing-product-item{position:relative;min-height:108px;padding:14px;display:grid;grid-template-columns:18px 58px minmax(0,1fr) auto;gap:10px;align-items:center;border-bottom:1px solid var(--hair);cursor:pointer;outline:0;}
  .listing-product-item:hover{background:var(--green-ll);}
  .listing-product-item.active{background:var(--green-l);box-shadow:inset 3px 0 0 var(--green);}
  .listing-product-item:focus-visible{box-shadow:inset 0 0 0 2px var(--green);}
  .listing-product-item .product-thumb{width:58px;height:58px;background:#fff;}
  .listing-product-copy{min-width:0;display:flex;flex-direction:column;gap:4px;}
  .listing-product-copy strong{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:13px;line-height:1.45;font-weight:600;}
  .listing-product-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;color:var(--text-3);}
  .listing-product-state{align-self:stretch;min-width:72px;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:7px;text-align:right;}
  .listing-product-state b{font-size:12px;line-height:1.3;white-space:nowrap;}
  .listing-product-state .tag{height:22px;padding:0 7px;}
  .listing-product-select-slot{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;}
  .listing-product-select-slot input{margin:0;accent-color:var(--green);cursor:pointer;}
  .listing-product-reason{grid-column:3 / 5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--text-3);}
  .listing-detail{min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--card);}
  .listing-detail-panel{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;}
  .listing-detail-panel[hidden]{display:none;}
  .listing-detail-head{padding:17px 20px 14px;display:flex;gap:14px;align-items:flex-start;border-bottom:1px solid var(--hair);}
  .listing-detail-image{width:72px;height:72px;flex:0 0 72px;background:#fff;}
  .listing-detail-copy{min-width:0;flex:1;}
  .listing-detail-copy h2{margin:1px 0 8px;font-size:17px;line-height:1.4;font-weight:650;}
  .listing-detail-meta{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:12px;color:var(--text-3);}
  .listing-detail-meta .tag{height:22px;padding:0 8px;}
  .listing-detail-copy>.btn{margin-top:10px;}
  .listing-detail-warning{margin:12px 18px 0;padding:10px 12px;display:flex;gap:9px;align-items:flex-start;border:1px solid #f5dfb4;border-radius:8px;background:var(--warning-l);color:var(--warning);}
  .listing-detail-warning .ic{width:16px;height:16px;flex:0 0 auto;margin-top:2px;}
  .listing-detail-warning div{display:flex;flex-direction:column;gap:3px;}
  .listing-detail-warning b{font-size:12.5px;}
  .listing-detail-warning span{font-size:11.5px;line-height:1.45;}
  .listing-detail-target{margin:12px 18px 0;padding:10px 12px;display:flex;align-items:flex-start;gap:12px;border:1px solid var(--hair);border-radius:8px;background:var(--card-2);font-size:12px;}
  .listing-detail-target>span{flex:0 0 auto;color:var(--text-3);font-weight:600;}
  .listing-detail-tabs{min-height:48px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--hair);}
  .listing-detail-tabs b{height:48px;display:flex;align-items:center;border-bottom:2px solid var(--green);font-size:13.5px;}
  .listing-detail-tabs span{font-size:11.5px;color:var(--text-3);text-align:right;}
  .listing-detail-table{flex:1;min-height:0;border:0;border-radius:0;overflow:auto;}
  .listing-detail-table .listing-table{min-width:1120px;}
  .listing-detail-table .listing-table th{padding:12px 11px;font-size:10.5px;letter-spacing:.2px;text-transform:none;}
  .listing-detail-table .listing-table td{padding:12px 11px;vertical-align:top;}
  .listing-detail-table .listing-table th:last-child,.listing-detail-table .listing-table td:last-child{z-index:10;background:var(--card);}
  .listing-detail-table .listing-table th:last-child{background:var(--card-2);}
  .listing-sku-id{min-width:145px;display:flex;flex-direction:column;gap:5px;}
  .listing-sku-id strong{font-family:var(--font-mono);font-size:11.5px;}
  .listing-sku-id span{font-size:11.5px;color:var(--text-2);line-height:1.4;}
  .listing-detail-table .listing-price{width:86px;}
  .listing-batch-bar{min-height:58px;flex:0 0 58px;padding:9px 16px;display:flex;align-items:center;gap:12px;border-top:1px solid var(--border);background:var(--card-2);}
  .listing-batch-bar label{font-size:12px;color:var(--text-2);}
  .listing-batch-bar>span{margin-left:auto;font-size:12px;color:var(--text-3);}
  .listing-master-empty,.listing-detail>.listing-master-empty{min-height:360px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--text-3);}
  .listing-master-empty b{color:var(--text);font-size:15px;}
  @media (max-width:1250px){
    .listing-master-detail{height:calc(100vh - 470px);grid-template-columns:285px minmax(0,1fr);}
    .listing-product-item{grid-template-columns:18px 50px minmax(0,1fr);}
    .listing-product-item .product-thumb{width:50px;height:50px;}
    .listing-product-state{grid-column:3;align-self:auto;min-width:0;flex-direction:row;align-items:center;justify-content:space-between;text-align:left;}
    .listing-product-reason{grid-column:3;}
  }
  .ledger-price{width:88px;height:34px;padding:0 8px;text-align:right;font-family:var(--font-mono);}
  .local-only{font-size:10.5px;color:var(--success);margin-top:4px;text-align:right;}
  .ledger-diff{font-size:10.5px;line-height:1.5;color:var(--warning);margin-top:5px;white-space:nowrap;}
  .ledger-review{font-size:11px;line-height:1.5;min-width:96px;}

  /* ─────────── 福利套装商品账：商品主从详情 ─────────── */
  .mall-ledger-page{display:flex;flex-direction:column;gap:16px;min-height:0;}
  .mall-ledger-summary{min-height:82px;display:flex;align-items:stretch;background:var(--card);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-sm);overflow:hidden;}
  .mall-ledger-summary>div{min-width:135px;padding:10px 22px;border-right:1px solid var(--hair);display:flex;flex-direction:column;justify-content:center;}
  .mall-ledger-summary span{font-size:11.5px;color:var(--text-3);font-weight:600;letter-spacing:.25px;}
  .mall-ledger-summary b{font-family:var(--font-serif);font-size:25px;font-weight:520;line-height:1.05;margin-top:6px;color:var(--text);font-variant-numeric:tabular-nums;}
  .mall-ledger-summary b.warn{color:var(--warning);}
  .mall-ledger-summary small{font-size:11.5px;color:var(--text-3);margin-top:3px;}
  .mall-ledger-summary .mall-ledger-sync-summary{margin-left:auto;min-width:310px;border-right:0;align-items:flex-end;gap:9px;}
  .mall-ledger-summary .mall-ledger-sync-summary small{margin:0;}
  .mall-ledger-summary-actions{display:flex;align-items:center;gap:8px;}
  .mall-ledger-filters{margin:0;padding:14px 16px;gap:12px 14px;flex-wrap:nowrap;}
  .mall-ledger-filters .field{min-width:0;}
  .mall-ledger-filters .input{min-width:132px;max-width:176px;}
  .mall-ledger-filters .seg span{padding-left:11px;padding-right:11px;}
  .mall-ledger-search{flex:1;}
  .mall-ledger-search .ctrl{width:100%;min-width:205px;}
  .mall-ledger-reset{align-self:flex-end;}
  .mall-ledger-master-detail{height:calc(100vh - 306px);min-height:570px;max-height:730px;display:grid;grid-template-columns:330px minmax(0,1fr);background:var(--card);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-sm);overflow:hidden;}
  .mall-ledger-master{min-width:0;min-height:0;border-right:1px solid var(--border);display:flex;flex-direction:column;background:var(--card);}
  .mall-ledger-master-head{height:51px;flex:0 0 51px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--hair);}
  .mall-ledger-master-head b{font-size:14px;}
  .mall-ledger-master-head span{font-size:12px;color:var(--text-3);}
  .mall-ledger-product-list{flex:1;min-height:0;overflow:auto;scrollbar-color:#c8d4e2 transparent;}
  .mall-ledger-product-item{position:relative;width:100%;min-height:104px;padding:14px 13px;display:grid;grid-template-columns:58px minmax(0,1fr) auto;gap:11px;align-items:center;text-align:left;border:0;border-bottom:1px solid var(--hair);background:transparent;color:var(--text);font-family:inherit;cursor:pointer;}
  .mall-ledger-product-item:hover{background:var(--green-ll);}
  .mall-ledger-product-item.active{background:var(--green-l);box-shadow:inset 3px 0 0 var(--green);}
  .mall-ledger-product-item .product-thumb{width:58px;height:58px;background:#fff;}
  .mall-ledger-product-copy{min-width:0;display:flex;flex-direction:column;gap:4px;}
  .mall-ledger-product-copy strong{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:13px;line-height:1.45;font-weight:600;}
  .mall-ledger-product-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;color:var(--text-3);}
  .mall-ledger-product-state{align-self:stretch;min-width:66px;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:8px;text-align:right;}
  .mall-ledger-product-state b{max-width:92px;font-size:12px;line-height:1.35;font-weight:700;}
  .mall-ledger-product-state .discount-band{color:var(--green);}
  .mall-ledger-product-state .discount-missing{color:var(--danger);}
  .mall-ledger-product-state .profit-good{color:var(--success);}
  .mall-ledger-product-state .profit-warn{color:var(--warning);}
  .mall-ledger-product-state .profit-risk,.mall-ledger-product-state .profit-missing{color:var(--danger);}
  .mall-ledger-product-state small{font-size:11px;font-weight:600;}
  .mall-ledger-product-state .state-ok{color:var(--success);}
  .mall-ledger-product-state .state-pending{color:var(--warning);}
  .mall-ledger-product-state .state-error{color:var(--danger);}
  .mall-ledger-detail{min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--card);}
  .mall-ledger-detail-panel{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;}
  .mall-ledger-detail-panel[hidden]{display:none;}
  .mall-ledger-detail-head{padding:17px 20px 15px;display:flex;gap:14px;align-items:flex-start;border-bottom:1px solid var(--hair);}
  .mall-ledger-detail-image{width:72px;height:72px;flex:0 0 72px;background:#fff;}
  .mall-ledger-detail-copy{min-width:0;flex:1;}
  .mall-ledger-detail-copy h2{margin:1px 0 8px;font-size:17px;line-height:1.4;font-weight:650;}
  .mall-ledger-detail-meta{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:12px;color:var(--text-3);}
  .mall-ledger-detail-meta .tag{height:22px;padding:0 8px;}
  .mall-ledger-offer-link{display:inline-block;margin-top:9px;}
  .mall-ledger-warning{margin:12px 18px 0;padding:10px 12px;display:flex;gap:9px;align-items:flex-start;border:1px solid #f5dfb4;border-radius:8px;background:var(--warning-l);color:var(--warning);}
  .mall-ledger-warning .ic{width:16px;height:16px;flex:0 0 auto;margin-top:2px;}
  .mall-ledger-warning div{display:flex;flex-direction:column;gap:3px;}
  .mall-ledger-warning b{font-size:12.5px;}
  .mall-ledger-warning span{font-size:11.5px;line-height:1.45;}
  .mall-ledger-detail-tabs{min-height:48px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--hair);}
  .mall-ledger-detail-tabs b{height:48px;display:flex;align-items:center;border-bottom:2px solid var(--green);font-size:13.5px;}
  .mall-ledger-detail-tabs span{font-size:11.5px;color:var(--text-3);text-align:right;}
  .mall-ledger-detail-table{flex:1;min-height:0;border:0;border-radius:0;overflow:auto;}
  .mall-ledger-detail-table .mall-product-table{min-width:1080px;}
  .mall-ledger-detail-table .tbl th{padding:12px 11px;font-size:10.5px;letter-spacing:.2px;text-transform:none;}
  .mall-ledger-detail-table .tbl td{padding:12px 11px;vertical-align:top;}
  .mall-product-table th:last-child,.mall-product-table td:last-child{position:sticky;right:0;background:var(--card);box-shadow:-6px 0 10px rgba(21,34,56,.05);}
  .mall-ledger-detail-table .mall-product-table th:last-child{z-index:10;background:var(--card-2);}
  .mall-ledger-detail-table .mall-product-table td:last-child{z-index:3;}
  .mall-ledger-detail-table .ledger-price{width:86px;}
  .mall-ledger-sku{min-width:132px;}
  .mall-ledger-sku strong,.mall-ledger-sku span{display:block;}
  .mall-ledger-sku strong{font-family:var(--font-mono);font-size:11.5px;color:var(--text);}
  .mall-ledger-sku span{max-width:150px;margin-top:6px;font-size:11.5px;color:var(--text-3);line-height:1.4;}
  .mall-ledger-row-states{min-width:118px;display:flex;flex-direction:column;align-items:flex-start;gap:7px;}
  .mall-ledger-row-actions{min-width:142px;display:flex;flex-direction:column;align-items:stretch;gap:6px;}
  .mall-ledger-row-actions .btn{justify-content:center;}
  .mall-ledger-batch-bar{min-height:58px;flex:0 0 58px;padding:9px 16px;display:flex;align-items:center;gap:14px;border-top:1px solid var(--border);background:var(--card-2);}
  .mall-ledger-batch-bar label{font-size:12px;color:var(--text-2);}
  .mall-ledger-batch-bar>span{margin-left:auto;font-size:12px;color:var(--text-3);}
  .mall-ledger-empty{min-height:420px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border);border-radius:12px;background:var(--card);}
  .mall-ledger-empty b{font-size:15px;}
  .mall-ledger-empty span{font-size:13px;color:var(--text-3);}

  /* ─────────── 供应商商品工作台 ─────────── */
  .supplier-workspace-filters{margin:0 0 16px;padding:14px 16px;gap:12px 14px;flex-wrap:nowrap;}
  .supplier-workspace-filters .field{min-width:0;}
  .supplier-workspace-filters .input{min-width:150px;max-width:186px;}
  .supplier-workspace-search{flex:1;}
  .supplier-workspace-search .ctrl{width:100%;min-width:180px;}
  .supplier-workspace-product-search{flex:1.25;}
  .supplier-workspace-filter-reset{align-self:flex-end;}
  .supplier-master-detail{height:calc(100vh - 298px);min-height:590px;max-height:760px;display:grid;grid-template-columns:278px minmax(0,1fr);overflow:hidden;border:1px solid var(--border);border-radius:12px;background:var(--card);box-shadow:var(--shadow-sm);}
  .supplier-workspace-master{min-width:0;min-height:0;display:flex;flex-direction:column;border-right:1px solid var(--border);background:var(--card);}
  .supplier-workspace-supplier-list{min-height:0;flex:1;overflow:auto;scrollbar-color:#c8d4e2 transparent;}
  .supplier-workspace-supplier-item{width:100%;min-height:92px;padding:14px 13px;display:flex;gap:10px;align-items:center;justify-content:space-between;text-align:left;border:0;border-bottom:1px solid var(--hair);background:transparent;color:var(--text);font-family:inherit;cursor:pointer;}
  .supplier-workspace-supplier-item:hover{background:var(--green-ll);}
  .supplier-workspace-supplier-item.active{background:var(--green-l);box-shadow:inset 3px 0 0 var(--green);}
  .supplier-workspace-supplier-item>span:first-child{min-width:0;display:flex;flex-direction:column;gap:4px;}
  .supplier-workspace-supplier-item strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.35;}
  .supplier-workspace-supplier-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--text-3);}
  .supplier-workspace-supplier-state{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:7px;text-align:right;}
  .supplier-workspace-supplier-state b{font-size:11.5px;color:var(--success);}
  .supplier-workspace-supplier-state small{font-size:10.5px;}
  .supplier-workspace-detail{min-width:0;min-height:0;display:grid;grid-template-columns:294px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);background:var(--card);}
  .supplier-workspace-head{grid-column:1 / -1;min-height:90px;padding:16px 20px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-bottom:1px solid var(--hair);}
  .supplier-workspace-head h2{margin:0 0 8px;font-size:18px;font-weight:650;line-height:1.35;}
  .supplier-workspace-head>.btn{flex:0 0 auto;}
  .supplier-workspace-note{margin-top:8px;font-size:11.5px;color:var(--text-3);}
  .supplier-workspace-products{min-width:0;min-height:0;display:flex;flex-direction:column;border-right:1px solid var(--border);}
  .supplier-workspace-products-head{height:50px;flex:0 0 50px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--hair);}
  .supplier-workspace-products-head b{font-size:13.5px;}
  .supplier-workspace-products-head span{font-size:12px;color:var(--text-3);}
  .supplier-workspace-product-list{min-height:0;flex:1;overflow:auto;scrollbar-color:#c8d4e2 transparent;}
  .supplier-workspace-product-list .mall-ledger-product-item{grid-template-columns:50px minmax(0,1fr);min-height:90px;padding:12px;}
  .supplier-workspace-product-list .mall-ledger-product-item .product-thumb{width:50px;height:50px;}
  .supplier-workspace-product-list .mall-ledger-product-state{grid-column:2;min-width:0;align-self:auto;flex-direction:row;align-items:center;justify-content:space-between;text-align:left;}
  .supplier-workspace-product-detail{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;}
  .supplier-workspace-product-detail .mall-ledger-detail-panel{min-height:0;}
  .supplier-workspace-product-detail .mall-product-table{min-width:860px;}
  .supplier-workspace-product-detail .mall-ledger-row-states{min-width:102px;}
  .supplier-workspace-empty{grid-column:1 / -1;border:0;border-radius:0;min-height:0;}
  .supplier-profile-dialog .action-dialog-panel{width:min(100%,760px);max-height:calc(100vh - 48px);overflow:auto;}
  .supplier-profile-modal-form{padding-top:2px;}
  .supplier-profile-section{margin-top:20px;padding-top:18px;border-top:1px solid var(--hair);}
  .supplier-profile-section>b{display:block;font-size:13px;color:var(--text);}
  .supplier-profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px;}
  .supplier-profile-fields .action-dialog-field{margin-top:14px;}
  .supplier-profile-fields .supplier-profile-wide{grid-column:1 / -1;}
  .supplier-profile-enabled>span:last-child{display:flex;align-items:center;gap:8px;margin:0;height:40px;font-size:13px;font-weight:400;color:var(--text-2);}
  .supplier-profile-enabled input{width:15px;height:15px;margin:0;accent-color:var(--green);}
  .supplier-profile-section em{display:block;margin-top:5px;font-size:11px;font-style:normal;color:var(--text-3);}
  .supplier-profile-actions{margin-top:24px;}
  .supplier-profile-error{margin-top:16px;padding:10px 12px;border:1px solid #e8b4ad;border-radius:9px;background:#fff1ef;color:#a8392c;font-size:12px;line-height:1.5;}

  /* ─────────── 订单管理 ─────────── */
  .order-section-title{margin:18px 0 10px;font-size:13px;font-weight:650;color:var(--text-2);}
  .order-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;}
  .order-kpi{min-width:0;padding:16px;text-align:left;border:1px solid var(--border);border-radius:12px;background:var(--card);color:var(--text);font-family:inherit;box-shadow:var(--shadow-sm);cursor:pointer;}
  .order-kpi:hover{border-color:var(--green);background:var(--green-ll);}
  .order-kpi span,.order-kpi small{display:block;font-size:11.5px;color:var(--text-3);}
  .order-kpi b{display:block;margin:8px 0 4px;font-size:25px;line-height:1;color:var(--text);}
  .order-overview-grid{margin-top:18px;align-items:start;}
  .order-alert-list{padding:12px;display:flex;flex-direction:column;gap:8px;}
  .order-alert{padding:11px 12px;display:flex;align-items:center;justify-content:space-between;border:1px solid #f1d7ae;border-radius:9px;background:#fff9ef;color:var(--text);font-family:inherit;cursor:pointer;}
  .order-alert span{font-size:11.5px;color:var(--text-3);}
  .order-last-sync{align-self:center;font-size:12px;color:var(--text-3);}
  .order-workflow-filters{margin-bottom:14px;align-items:flex-end;}
  .order-workflow-search{min-width:250px;flex:1;}
  .order-workflow-search .input{width:100%;}
  .order-global-notice{margin-bottom:14px;padding:11px 14px;display:flex;align-items:center;gap:16px;border:1px solid #cfe0f5;border-radius:9px;background:#f4f8fe;font-size:12.5px;}
  .order-global-notice span{color:var(--text-3);}
  .order-workflow-groups{display:flex;flex-direction:column;gap:14px;}
  .order-workflow-group{overflow:hidden;}
  .order-group-head{gap:14px;}
  .order-group-title,.order-group-actions,.order-group-select{display:flex;align-items:center;gap:10px;}
  .order-group-title{min-width:0;}
  .order-group-title h3{min-width:0;}
  .order-group-actions{margin-left:auto;flex-wrap:wrap;justify-content:flex-end;}
  .order-group-toggle{width:30px;height:30px;display:grid;place-items:center;flex:0 0 30px;border:1px solid var(--border);border-radius:8px;background:var(--card);color:var(--text-2);cursor:pointer;}
  .order-group-toggle svg{width:14px;height:14px;transition:transform .16s ease;}
  .order-group-toggle[aria-expanded="true"] svg{transform:rotate(90deg);}
  .order-group-select{font-size:12px;color:var(--text-2);cursor:pointer;white-space:nowrap;}
  .order-group-select b{font-weight:500;color:var(--text-3);}
  [data-om-group-body][hidden]{display:none;}
  .order-table-scroll{overflow-x:auto;}
  .order-workflow-group .tbl{min-width:980px;}
  .order-workflow-group .prod small{display:block;margin-top:4px;font-weight:400;color:var(--text-3);}
  .order-error-reason{display:inline-block;padding:4px 8px;border-radius:7px;background:#fff0ed;color:#a8392c;font-size:11.5px;}
  .order-empty{padding:38px;text-align:center;color:var(--text-3);}

  @media (max-width:1250px){
    .order-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
    .mall-ledger-summary>div{min-width:116px;padding-left:15px;padding-right:15px;}
    .mall-ledger-summary .mall-ledger-sync-summary{min-width:270px;}
    .mall-ledger-filters{flex-wrap:wrap;}
    .mall-ledger-search{min-width:260px;}
    .mall-ledger-master-detail{height:calc(100vh - 355px);grid-template-columns:285px minmax(0,1fr);}
    .mall-ledger-product-item{grid-template-columns:50px minmax(0,1fr);}
    .mall-ledger-product-item .product-thumb{width:50px;height:50px;}
    .mall-ledger-product-state{grid-column:2;align-self:auto;min-width:0;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;column-gap:8px;row-gap:6px;text-align:left;}
    .supplier-master-detail{height:calc(100vh - 335px);grid-template-columns:238px minmax(0,1fr);}
    .supplier-workspace-detail{grid-template-columns:245px minmax(0,1fr);}
    .supplier-workspace-head{padding-left:15px;padding-right:15px;}
    .supplier-workspace-filters{flex-wrap:wrap;}
    .supplier-workspace-search{min-width:260px;}
  }
  @media (max-width:980px){
    .order-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
    .supplier-master-detail{height:auto;min-height:0;display:block;overflow:visible;}
    .supplier-workspace-master{max-height:280px;border-right:0;border-bottom:1px solid var(--border);}
    .supplier-workspace-detail{min-height:620px;grid-template-columns:230px minmax(0,1fr);}
    .supplier-profile-fields{grid-template-columns:1fr;}
    .supplier-profile-fields .supplier-profile-wide{grid-column:auto;}
  }
