:root{color-scheme:light;--bg:#f3f6fa;--paper:#fff;--line:#dce4ed;--ink:#172e48;--muted:#506781;--accent:#1858a7;--hover:#134783;--bad:#9a2727;font:15px/1.55 "Microsoft YaHei","Noto Sans SC",system-ui,sans-serif}
*{box-sizing:border-box}
.erp-page[hidden],.top[hidden]{display:none!important}
body{margin:0;color:var(--ink);background:var(--bg)}
a{color:var(--accent);text-decoration-thickness:1px;text-underline-offset:3px}
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px max(24px,calc((100% - 1280px)/2));background:#11365d;color:white}
.top a{color:inherit}.top #account{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.brand{font-size:22px;font-weight:750;text-decoration:none;min-width:0}.brand small{font-size:13px;color:#b9d6f7;margin-left:5px}
.shell{width:min(1280px,calc(100% - 40px));margin:26px auto 64px}
h1,h2,h3,p{margin:0}h1{font-size:28px}h2{font-size:19px}h3{font-size:17px;margin-bottom:14px}
.heading{margin:12px 0 18px}.heading p,.muted{color:var(--muted);margin:6px 0 12px}
.panel{background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:20px;margin:16px 0}
.panel h2{margin-bottom:12px}.panel.auth{max-width:460px;margin:64px auto 24px}
.section-title{display:flex;justify-content:space-between;align-items:start;gap:14px;margin-bottom:8px}
.section-heading{margin-top:24px}
nav,.inline,.pager{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
nav{margin:14px 0}.pager{justify-content:flex-end;margin-top:14px;align-items:center}
.grid,.apps,.checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,215px),1fr));gap:14px}
.apps{grid-template-columns:repeat(auto-fit,minmax(min(100%,370px),1fr))}.apps .panel{margin-top:2px}
form{display:grid;gap:12px;justify-items:start}form>.grid,form>fieldset{width:100%}.spaced{margin-top:16px}
label{display:grid;gap:5px;font-weight:600;width:100%;color:var(--ink)}
.inline label{width:auto;min-width:125px}.check{display:flex;gap:8px;align-items:start;font-weight:400}
input,select,button,.button{font:inherit;border-radius:6px;border:1px solid var(--line);padding:8px 11px}
input,select{min-width:0;width:100%;background:white;color:var(--ink);border-color:#9db0c6}
input[type=checkbox]{width:16px;height:16px;flex:none}
button,.button{display:inline-block;background:var(--accent);border-color:var(--accent);color:white;cursor:pointer;text-decoration:none;font-weight:600}
button:hover,.button:hover,.selected{background:var(--hover)}
.secondary{color:var(--accent);background:#edf4fd;border-color:#c6d9ef}.secondary:hover{background:#dceafd;color:#11365d}
button:disabled{cursor:default;opacity:.55}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid #d99025;outline-offset:2px}
fieldset{border:1px solid var(--line);border-radius:6px;padding:10px 12px}.checks{gap:6px 14px}
details{border-top:1px solid var(--line);padding:10px 0}details form{margin-top:12px}summary{cursor:pointer;font-weight:600}
.scroll{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left}
th,td{padding:9px 12px;border-bottom:1px solid var(--line);vertical-align:middle}th{background:#eef3fa;white-space:nowrap}
td{min-width:84px;overflow-wrap:anywhere}td .inline{flex-wrap:nowrap}
.status{display:inline-block;border-radius:18px;background:#edf4fd;padding:3px 9px;white-space:nowrap}
.status.succeeded{color:#146349;background:#e4f5ee}.status.failed{color:var(--bad);background:#fcecea}
.empty{padding:24px 10px;background:#f6f8fb;color:var(--muted);text-align:center}
.feedback:not(:empty){position:fixed;bottom:16px;right:16px;max-width:min(600px,calc(100% - 32px));background:#11365d;color:white;padding:10px 15px;border-radius:7px;box-shadow:0 4px 16px #0002;z-index:2}
.feedback.error:not(:empty){background:var(--bad)}
.with-sidebar{display:grid;grid-template-columns:220px minmax(0,1fr);grid-template-rows:auto 1fr;min-height:100dvh}
.with-sidebar .top{grid-column:1/-1;padding-inline:22px}
.with-sidebar .shell{width:min(1280px,calc(100% - 40px));min-width:0}
.sidebar{background:#143452;color:#e7eff9;position:sticky;top:0;align-self:start;max-height:100dvh;min-height:calc(100dvh - 65px);overflow:auto}
.side-drawer{border:0;padding:0}
.side-drawer>summary{display:none}
.side-menu{display:block;margin:0;padding:12px 10px}
.side-menu h2{font-size:11px;color:#a8bfd6;letter-spacing:.08em;margin:13px 8px 6px}
.side-menu section:first-child h2{margin-top:3px}
.side-link,.side-group>summary{display:flex;justify-content:space-between;align-items:center;gap:6px;color:inherit;text-decoration:none;padding:7px 8px;border-radius:6px;font-size:14px;font-weight:500}
.side-link:hover,.side-group>summary:hover{background:#214b71}
.side-link[aria-current=page]{background:#25619d;color:white;font-weight:700}
.side-link small{font-size:10px;color:#c2d6ec;background:#244765;padding:1px 4px;border-radius:4px;flex:none}
.side-group{border:0;padding:0}
.side-group>summary::after{content:'›';font-size:18px;line-height:1;color:#abc6e1}
.side-group[open]>summary::after{transform:rotate(90deg)}
.side-sub{padding-left:13px}
.summary-card{display:grid;gap:6px;text-decoration:none;color:var(--ink)}
.summary-card strong{font-size:24px}.summary-card small{color:var(--accent)}
@media(max-width:760px){
  .with-sidebar{display:block}
  .sidebar{position:static;min-height:auto;max-height:none;overflow:visible}
  .side-drawer>summary{display:list-item;padding:9px 18px}
  .side-menu{max-height:45dvh;overflow:auto;padding-top:0}
}
@media(max-width:600px){.top{padding:12px;flex-wrap:wrap}.top #account{margin-left:auto}.shell{width:calc(100% - 24px);margin-top:16px}.panel{padding:13px}.panel.auth{margin-top:24px}.brand{font-size:18px}}

/* Dense order workspace with independently scrollable financial details. */
.with-sidebar .shell:has(.order-filter){width:calc(100% - 32px);max-width:none}
.order-filter{padding:16px}.quick-orders{display:flex;gap:8px;align-items:center;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:14px}
.quick-orders button{font-size:12px;padding:7px 13px;min-width:90px}.quick-orders button:disabled{background:#f5f7fa;color:#7b8794;border-color:#dce4ed;opacity:1}
.order-filter form{gap:10px 14px}.order-filter label{font-size:12px;min-width:140px}.order-filter input,.order-filter select,.order-filter button{font-size:12px;padding:7px 10px}.order-filter input[name=orderNo]{min-width:230px}
.order-notice{font-size:12px;padding:10px 14px;background:#fff5e8;color:#80551e;border:1px solid #f3e0c3;border-radius:5px;margin:12px 0}
.order-scroll{max-height:67vh;background:white;border:1px solid var(--line)}.order-table{min-width:2350px;font-size:12px;table-layout:fixed}.order-table th{position:sticky;top:0;z-index:1;background:#f5f8fc;text-align:center}.order-table td{padding:13px 10px;border:1px solid #e7edf4;vertical-align:top}.order-table th:nth-child(1){width:120px}.order-table th:nth-child(2){width:170px}.order-table th:nth-child(3){width:260px}.order-table th:nth-child(4){width:130px}.order-table th:nth-child(5){width:175px}.order-table th:nth-child(6){width:165px}.order-table th:nth-child(7){width:110px}.order-table th:nth-child(8),.order-table th:nth-child(9){width:90px}.order-table th:nth-child(10){width:110px}.order-table th:last-child{width:760px}
.order-table small{display:block;color:#65758a;font-size:11px;margin-top:6px}.order-table strong{font-weight:600}.order-table hr{border:0;border-top:1px solid #edf1f5;margin:12px 0}.order-product{display:flex;gap:8px;margin-bottom:10px;min-height:60px}.order-product img{width:52px;height:52px;object-fit:contain;flex:none}.order-product b{color:#0878ce;font-weight:500}.finance-grid{display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:8px}.finance-grid section{background:#f6f7f9;padding:9px}.finance-grid h3{font-size:12px;margin-bottom:10px;color:#294866}.fee-line{display:flex;justify-content:space-between;gap:12px;line-height:1.9}.fee-line b{font-weight:500;font-variant-numeric:tabular-nums}.unavailable{color:#929cac;font-weight:400;font-size:11px}.order-summary{display:flex;gap:18px;flex-wrap:wrap;padding:12px 14px;background:#eaf2fc;font-size:12px}.order-summary span{display:block}.order-warning{color:#966420!important}.bill-details{padding-bottom:0;margin-top:8px;font-size:11px}.bill-details table th{position:static;width:auto!important}.bill-details table td{padding:6px}.pager label{width:auto;display:flex;align-items:center;gap:8px}.pager select{width:90px}

.resale-badge{display:inline-block;padding:3px 6px;border:1px solid #b7e8cf;border-radius:4px;background:#e4f7ed;color:#087c4d;font-size:11px;font-weight:700;white-space:nowrap;margin:0 0 7px;line-height:1.5}

.product-thumb{display:block;width:56px;height:56px;object-fit:contain;background:white;border:1px solid #dce5ef;border-radius:5px}.no-thumb{font-size:12px;color:#8193a8}.stack{display:grid;gap:14px;max-width:760px}.stack textarea{min-height:110px;width:100%;padding:12px;font:inherit}.stack label{display:grid;gap:6px}details>summary{cursor:pointer;font-weight:600;padding:10px 0}.panel td{vertical-align:middle}.summary-card strong{display:block;font-size:24px}
.ad-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.ad-tabs a{padding:9px 16px;border:1px solid #c5d8ec;border-radius:6px;text-decoration:none}.ad-tabs a[aria-current]{background:#164e87;color:#fff}

.erp-fx-note{padding:10px 14px;background:#f0f8ff;border:1px solid #d8eafa;border-radius:4px;font-size:12px;line-height:1.7;color:#285276;margin:10px 0 14px}.erp-fx-note small{display:block;color:#6c7e92;font-size:11px}.erp-fx-note a{color:#008dff}
