:root{--ink:#17213a;--muted:#70809b;--line:#e3e9f2;--bg:#f4f7fb;--blue:#2563eb;--blue2:#1d4ed8;--red:#dc2626;--shadow:0 12px 30px rgba(31,50,83,.08)}
*{box-sizing:border-box}body{margin:0;color:var(--ink);font-family:"Microsoft YaHei",system-ui,sans-serif;background:var(--bg)}button,input,select,textarea{font:inherit}.hidden{display:none!important}
.login-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 15% 15%,#dbeafe 0,transparent 32%),linear-gradient(135deg,#f8fbff,#eef3fb)}.login-card{width:min(420px,100%);padding:38px;background:#fff;border:1px solid #e7edf5;border-radius:20px;box-shadow:var(--shadow)}.brand-mark{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:var(--blue);color:#fff;font-weight:800}.login-card h1{margin:20px 0 5px;font-size:25px}.login-card p,.muted{color:var(--muted)}
.login-card label,dialog label,.settings-card label{display:grid;gap:7px;margin:14px 0;font-size:14px;font-weight:600}input,select{height:42px;padding:0 12px;border:1px solid #ccd6e5;border-radius:9px;background:#fff;color:var(--ink);outline:none}textarea{padding:10px 12px;border:1px solid #ccd6e5;border-radius:9px;outline:none;resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px #dbeafe}
.login-card label,dialog label,.settings-card label{display:grid;gap:7px;margin:14px 0;font-size:14px;font-weight:600}input,select{height:42px;padding:0 12px;border:1px solid #ccd6e5;border-radius:9px;background:#fff;color:var(--ink);outline:none}input[type=checkbox]{width:16px;height:16px;padding:0;vertical-align:middle}textarea{padding:10px 12px;border:1px solid #ccd6e5;border-radius:9px;outline:none;resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px #dbeafe}
.primary,.ghost,.danger-outline{height:40px;padding:0 16px;border-radius:9px;border:1px solid transparent;cursor:pointer}.primary{background:var(--blue);color:#fff}.primary:hover{background:var(--blue2)}.ghost{background:#fff;border-color:#ccd6e5;color:var(--ink)}.danger-outline{background:#fff;border-color:#fecaca;color:var(--red)}.danger-text{color:var(--red)!important}.wide{width:100%;margin-top:10px}.error{color:var(--red);min-height:22px;margin-top:10px;font-size:14px}
.topbar{position:sticky;top:0;z-index:20;min-height:64px;padding:0 28px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px}.topbar b{font-size:19px}.test-pill{margin-left:12px;padding:4px 8px;border-radius:99px;color:#1d4ed8;background:#dbeafe;font-size:12px}.topbar nav{align-self:stretch;display:flex}.nav-btn{border:0;border-bottom:3px solid transparent;background:transparent;padding:0 18px;color:#53647f;cursor:pointer}.nav-btn.active{color:var(--blue);border-bottom-color:var(--blue);font-weight:700}.header-actions{display:flex;align-items:center;gap:10px}.header-actions #syncBtn,.header-actions #collectBtn{height:34px;padding:0 12px;font-size:13px}.header-actions #currentUser{margin-left:4px;color:var(--muted);font-size:13px}
.content{max-width:1800px;margin:auto;padding:18px}.hero-row{display:flex;justify-content:space-between;align-items:flex-end;gap:14px}.hero-row h2{margin:0 0 2px;font-size:21px}.hero-row p{margin:0;color:var(--muted);font-size:12px}.toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.toolbar button,.toolbar .file-button{height:34px;padding:0 13px;font-size:13px}.filter-inline{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:12px;font-weight:600;white-space:nowrap}.filter-inline select{height:34px;padding:0 8px}.stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:12px 0}.stats article{background:#fff;border:1px solid var(--line);border-radius:10px;padding:9px 12px;box-shadow:0 3px 10px rgba(31,50,83,.035);min-height:65px}.stats span{color:var(--muted);font-size:11px}.stats strong{display:block;font-size:19px;line-height:1.15;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stats .finance-stat strong{color:#075985;font-size:17px}.stats .profit-stat strong{color:#08745b}.panel{background:#fff;border:1px solid var(--line);border-radius:11px;box-shadow:var(--shadow);overflow:hidden}
.order-tabs{display:flex;align-items:center;gap:4px;padding:7px 10px 0}.order-tab{border:0;background:transparent;padding:7px 10px;border-radius:7px;color:#53647f;cursor:pointer;font-size:13px}.order-tab.active{background:#e8f0ff;color:var(--blue);font-weight:700}.tab-count{display:inline-block;min-width:18px;padding:1px 5px;border-radius:99px;background:#eef2f7;color:#64748b;font-size:10px}.order-tab.active .tab-count{background:#cfe0ff;color:#1d4ed8}.result-count{margin-left:auto;color:var(--muted);font-size:12px}.filters{padding:8px 10px;display:grid;grid-template-columns:minmax(300px,1.8fr) repeat(4,minmax(112px,1fr)) auto auto;gap:7px;border-bottom:1px solid var(--line)}.filters input,.filters select,.filters button{height:34px;font-size:13px}.filters textarea{height:34px;min-height:34px;padding:7px 10px;resize:vertical;font-size:13px}#dateFilterBtn{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.batch-bar{min-height:40px;padding:5px 10px;display:flex;gap:5px;align-items:center;flex-wrap:wrap;background:#f8fafc;border-bottom:1px solid var(--line);font-size:12px}.batch-bar button{height:28px;border:1px solid #d6deea;background:#fff;border-radius:6px;padding:0 8px;cursor:pointer;font-size:12px}.batch-label{color:var(--muted);font-size:11px;margin-left:6px}.color-dot{width:23px!important;padding:0!important;border-radius:50%!important}.color-dot.blue{background:#78a7ff}.color-dot.purple{background:#bd8cff}.color-dot.red{background:#ff8e8e}.color-dot.yellow{background:#ffe062}.color-dot.clear{font-size:16px}
.order-tab.refund-tab{color:#b45309}.order-tab.refund-tab .tab-count{background:#fff1d6;color:#b45309}.order-tab.refund-tab.active{background:#fff1d6;color:#9a3412}.order-tab.refund-tab.active .tab-count{background:#fed7aa;color:#9a3412}
.orders-table tbody tr.handled-refund>td{background-color:#e5e7eb!important;color:#6b7280!important}.orders-table tbody tr.handled-refund.selected-row{outline:2px solid #2563eb;outline-offset:-2px}.orders-table .status-cell{position:relative}.refund-handle-btn{position:absolute;inset:3px;margin:0;padding:1px 4px;border:1px solid #d97706;border-radius:5px;background:#fff7ed;color:#9a3412;font-size:11px;font-weight:600;cursor:pointer;white-space:nowrap;z-index:2}.refund-handle-btn:disabled{border-color:#9ca3af;background:#f3f4f6;color:#6b7280;cursor:default}
.table-wrap{overflow:auto;min-height:430px}table{width:100%;border-collapse:collapse;white-space:nowrap}th{position:sticky;top:0;z-index:2;background:#f8fafc;color:#53647f;font-size:12px;text-align:left;padding:11px;border-bottom:1px solid var(--line)}td{padding:9px 11px;border-bottom:1px solid #edf1f6;font-size:13px}tbody tr:hover{filter:brightness(.98)}.orders-table th,.orders-table td{text-align:center}.orders-table tbody tr.row-blue>td{background-color:#cfe0ff!important}.orders-table tbody tr.row-purple>td{background-color:#e4d2ff!important}.orders-table tbody tr.row-red>td{background-color:#ffd3d3!important}.orders-table tbody tr.row-yellow>td{background-color:#fff0a6!important}.orders-table td.editable{cursor:text;background-image:linear-gradient(transparent calc(100% - 1px),#cbd5e1 1px)}.orders-table td.editable:focus{outline:2px solid #93c5fd;background:#fff}.thumb{width:32px;height:32px;object-fit:cover;border-radius:5px;cursor:zoom-in}.empty{text-align:center!important;color:var(--muted);height:280px}.order-no{font-weight:700}.money{color:#08745b;font-weight:700}.status{padding:3px 8px;border-radius:99px;background:#eef2ff;color:#4338ca;font-size:12px}.pager{padding:14px;display:flex;justify-content:flex-end;align-items:center;gap:12px}.cache-panel{margin-top:14px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px;color:var(--muted)}.cache-panel summary{cursor:pointer;color:var(--ink);font-weight:600}
.orders-table tbody tr.selected-row{box-shadow:inset 0 0 0 2px #2563eb}.orders-table tbody tr.selected-row>td:first-child{box-shadow:inset 3px 0 0 #2563eb}.orders-table td.editable{cursor:cell}.orders-table td.editable[contenteditable=true]{cursor:text;background:#fff!important;outline:2px solid #2563eb;overflow:visible;white-space:nowrap;position:relative;z-index:3}
@media(min-width:1051px){.content{max-width:none;padding:15px 12px}.orders-wrap{overflow-x:hidden}.orders-table{width:100%;table-layout:fixed}.orders-table th{padding:6px 2px;font-size:10px;line-height:1.15;white-space:normal;overflow:hidden}.orders-table td{padding:5px 2px;font-size:11px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.orders-table .thumb{width:26px;height:26px}.orders-table .status{padding:2px 3px;font-size:10px}.orders-table th:nth-child(1){width:2%}.orders-table th:nth-child(2){width:6%}.orders-table th:nth-child(3){width:6%}.orders-table th:nth-child(4){width:7%}.orders-table th:nth-child(5){width:6%}.orders-table th:nth-child(6){width:3%}.orders-table th:nth-child(7),.orders-table th:nth-child(8),.orders-table th:nth-child(9),.orders-table th:nth-child(10),.orders-table th:nth-child(11){width:3%}.orders-table th:nth-child(12),.orders-table th:nth-child(13){width:7%}.orders-table th:nth-child(14){width:4%}.orders-table th:nth-child(15){width:5%}.orders-table th:nth-child(16){width:8%}.orders-table th:nth-child(17),.orders-table th:nth-child(18),.orders-table th:nth-child(19){width:5%}.orders-table th:nth-child(20),.orders-table th:nth-child(21),.orders-table th:nth-child(22){width:3%}}
.module-panel{margin-top:22px}.module-filter{padding:14px;display:flex;align-items:center;gap:15px;border-bottom:1px solid var(--line)}.module-filter input{width:min(500px,70%)}.module-footer{padding:12px;display:flex;align-items:center;justify-content:space-between;gap:12px}.module-footer.end{justify-content:flex-end}.pager label{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:13px}.pager select{height:36px;padding:0 26px 0 9px}.inline-pager{padding:0}.file-button{display:inline-flex;align-items:center;cursor:pointer}.file-button input{display:none}.upload-progress{margin:12px;padding:10px;background:#eff6ff;color:#1e40af;border-radius:8px}.account-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:22px}.settings-card{padding:20px}.settings-card h3{margin-top:0}
.notice{padding:12px;border-radius:9px;background:#eff6ff;color:#1e40af;line-height:1.65;font-size:13px}dialog{border:0;border-radius:15px;padding:0;width:min(540px,calc(100% - 30px));box-shadow:0 24px 80px rgba(12,25,50,.3)}dialog::backdrop{background:rgba(16,24,40,.55)}dialog form{padding:22px}.dialog-title{display:flex;align-items:center;justify-content:space-between}.dialog-title h3{margin:0}.icon-btn{border:0;background:transparent;font-size:26px;cursor:pointer}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.progress-text{min-height:22px;color:#075985}.context-menu{position:fixed;z-index:100;background:#fff;border:1px solid #dbe3ef;border-radius:9px;box-shadow:0 12px 35px rgba(0,0,0,.2);padding:5px}.context-menu button{display:block;width:100%;border:0;background:#fff;text-align:left;padding:8px 12px;cursor:pointer}.context-menu button:hover{background:#eff6ff}.toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,120px);opacity:0;background:#17213a;color:#fff;border-radius:10px;padding:12px 18px;box-shadow:var(--shadow);transition:.2s;z-index:120}.toast.show{transform:translate(-50%,0);opacity:1}.toast.error-toast{background:#991b1b}
.state-action{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0}.state-action p{margin:0;flex:1}.captcha-row{display:grid;grid-template-columns:1fr 150px;gap:10px;align-items:center}.captcha-image{height:42px;padding:2px 8px;border:1px solid #ccd6e5;border-radius:9px;background:#fff;cursor:pointer;overflow:hidden}.captcha-image img{display:block;width:100%;height:36px;object-fit:contain}.settings-card>button{width:100%}
.miaoshou-account-list{display:grid;gap:8px;margin:12px 0 16px}.miaoshou-account-list.compact{margin:8px 0 12px}.miaoshou-account-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc}.miaoshou-account-item .meta{display:grid;gap:2px;min-width:0}.miaoshou-account-item .name{font-weight:700;font-size:13px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.miaoshou-account-item .sub{font-size:12px;color:var(--muted)}.miaoshou-account-item .ok{color:#15803d}.miaoshou-account-item .bad{color:#b91c1c}.miaoshou-account-item .next-tag{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-size:11px;font-weight:700}.miaoshou-account-item button{flex:0 0 auto;height:32px;padding:0 10px}
#activationState{white-space:pre-line;line-height:1.75}
#purchasePasteText{width:100%;margin-top:14px}.paste-preview{min-height:24px;line-height:1.6}.error-text{color:var(--red)!important}.orders-wrap:focus{outline:none}
/* 订单表格跟随原 Qt 客户端：35px 行高、灰色表头、完整网格、默认黑色文字。 */
.orders-table{border:1px solid #cfcfcf;background:#fff}.orders-table th{height:35px;padding:5px 4px;background:#f0f0f0;color:#202020;border-right:1px solid #d6d6d6;border-bottom:1px solid #bfc3c9;font-size:12px;font-weight:600}.orders-table td{height:35px;padding:3px 4px;color:#202020;border-right:1px solid #dedede;border-bottom:1px solid #dedede;font-size:12px;line-height:1.2}.orders-table th:last-child,.orders-table td:last-child{border-right:0}.orders-table tbody tr:hover>td{filter:none;background-color:#eef5ff}.orders-table tbody tr.row-blue>td{background-color:#c3dcff!important}.orders-table tbody tr.row-purple>td{background-color:#e2caff!important}.orders-table tbody tr.row-red>td{background-color:#ffcece!important}.orders-table tbody tr.row-yellow>td{background-color:#fff0a0!important}.orders-table td.editable{cursor:cell;background-image:none!important}.orders-table td.editable[contenteditable=true]{background:#fff!important;outline:2px solid #2377d8}.orders-table .order-no,.orders-table .money{color:inherit;font-weight:400}.orders-table .status,.orders-table .status-cell{padding:3px 4px;background:transparent;color:inherit;font-size:12px}.orders-table .thumb{width:30px;height:30px;border:1px solid #ccc;border-radius:0;background:#f5f5f5}
.orders-table tbody tr.selected-row>td{background-color:#b8d7f0!important;color:#111!important}.orders-table tbody tr.selected-row{box-shadow:none}.orders-table tbody tr.selected-row>td:first-child{box-shadow:none}.orders-table td.active-cell{box-shadow:inset 0 0 0 1px #2878c8}
.orders-table{-webkit-user-select:none;user-select:none}.orders-table td.editable[contenteditable=true]{-webkit-user-select:text;user-select:text}
.orders-table td.tracking-cell{position:relative;overflow:visible}
.extract-waybill-btn,.download-waybill-btn{display:none;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:4;height:22px;padding:0 8px;border-radius:4px;font-size:11px;font-weight:600;white-space:nowrap;cursor:pointer}
.extract-waybill-btn{border:1px solid #2563eb;background:#eff6ff;color:#1d4ed8}
.download-waybill-btn{border:1px solid #059669;background:#ecfdf5;color:#047857}
.orders-table tbody tr:hover td.tracking-cell .extract-waybill-btn,
.orders-table tbody tr:hover td.tracking-cell .download-waybill-btn{display:inline-flex;align-items:center}
.orders-table td.remaining-cell{position:relative;overflow:visible}
.cancel-order-btn{display:none;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:4;height:22px;padding:0 8px;border:1px solid #dc2626;border-radius:4px;background:#fef2f2;color:#b91c1c;font-size:11px;font-weight:600;white-space:nowrap;cursor:pointer}
.orders-table tbody tr:hover td.remaining-cell .cancel-order-btn{display:inline-flex;align-items:center}
.danger-submit{height:40px;padding:0 16px;border:0;border-radius:9px;background:#dc2626;color:#fff;cursor:pointer}
.danger-submit:hover{background:#b91c1c}
.danger-submit:disabled{opacity:.55;cursor:default}
.waybill-dialog{width:min(640px,calc(100% - 30px))}
.waybill-steps{display:flex;gap:18px;margin:8px 0 12px;color:#94a3b8;font-size:13px}
.waybill-steps .active{color:var(--blue);font-weight:700}
.waybill-size-row{display:flex;align-items:center;gap:8px;margin:12px 0}
.waybill-label{flex:0 0 72px;font-size:14px;font-weight:600}
.waybill-size-row input{width:88px;height:36px}
.waybill-unit{color:var(--muted);font-size:13px}
.waybill-same{font-weight:400!important}
.orders-table th{box-sizing:border-box}.order-col-resizer{position:absolute;z-index:5;top:0;right:-3px;width:7px;height:100%;cursor:col-resize;touch-action:none}.order-col-resizer:hover,.resizing-columns .order-col-resizer{background:rgba(37,99,235,.3)}body.resizing-columns{cursor:col-resize;user-select:none}
@media(min-width:1051px){.orders-table th:nth-child(1){width:7%}.orders-table th:nth-child(2){width:6%}.orders-table th:nth-child(3){width:8%}.orders-table th:nth-child(4){width:6%}.orders-table th:nth-child(5){width:3%}.orders-table th:nth-child(6),.orders-table th:nth-child(7),.orders-table th:nth-child(8),.orders-table th:nth-child(9),.orders-table th:nth-child(10){width:3%}.orders-table th:nth-child(11),.orders-table th:nth-child(12){width:7%}.orders-table th:nth-child(13){width:4%}.orders-table th:nth-child(14){width:5%}.orders-table th:nth-child(15){width:8%}.orders-table th:nth-child(16),.orders-table th:nth-child(17),.orders-table th:nth-child(18){width:5%}.orders-table th:nth-child(19),.orders-table th:nth-child(20),.orders-table th:nth-child(21){width:3%}}
@media(min-width:1051px){.orders-table th:nth-child(18){width:7%}}
@media(max-width:1050px){.topbar{align-items:flex-start;padding:10px 14px;flex-wrap:wrap}.topbar nav{order:3;width:100%;height:42px;overflow:auto}.nav-btn{white-space:nowrap}.content{padding:14px}.stats{grid-template-columns:repeat(2,1fr)}.hero-row{align-items:flex-start;flex-direction:column}.filters{grid-template-columns:1fr 1fr}.filters textarea{grid-column:1/-1}.toolbar{width:100%}.toolbar button,.toolbar label{flex:1}.account-grid{grid-template-columns:1fr}.test-pill{display:none}}@media(max-width:560px){.stats{gap:8px}.stats article{padding:13px}.stats strong{font-size:22px}.filters{grid-template-columns:1fr}.filters textarea{grid-column:auto}.header-actions #currentUser{display:none}.order-tabs{overflow:auto}.order-tab{white-space:nowrap}}

/* 顶部导航、统计卡片和订单标签的小图标，仅作视觉装饰，不参与业务交互。 */
.brand b::before,.nav-btn::before,.header-actions button::before,.header-actions #currentUser::before,.order-tab::before,.stats article::after{font-family:"Segoe UI Emoji","Segoe UI Symbol",sans-serif;font-weight:400}
.brand b::before{content:"▣";display:inline-grid;place-items:center;width:24px;height:24px;margin-right:7px;border-radius:7px;background:#2563eb;color:#fff;font-size:14px;vertical-align:-2px;box-shadow:0 3px 8px rgba(37,99,235,.22)}
.nav-btn::before{display:inline-block;margin-right:6px;font-size:14px;vertical-align:-1px;opacity:.82}.nav-btn[data-page="orders"]::before{content:"▤"}.nav-btn[data-page="mappings"]::before{content:"⇄"}.nav-btn[data-page="pdfs"]::before{content:"▧"}.nav-btn[data-page="account"]::before{content:"♙"}.nav-btn.active::before{opacity:1}
.header-actions button::before{display:inline-block;margin-right:5px;font-size:13px}.header-actions #syncBtn::before{content:"↻"}.header-actions #collectBtn::before{content:"✦"}.header-actions #logoutBtn::before{content:"↪"}.header-actions #currentUser::before{content:"●";margin-right:5px;color:#60a5fa;font-size:9px;vertical-align:1px}
.stats article{position:relative;padding-right:38px}.stats article::after{position:absolute;right:11px;top:10px;display:grid;place-items:center;width:23px;height:23px;border-radius:7px;background:#eff5ff;color:#3b6fb6;font-size:12px}.stats article:nth-child(1)::after{content:"▣"}.stats article:nth-child(2)::after{content:"◷"}.stats article:nth-child(3)::after{content:"⇥"}.stats article:nth-child(4)::after{content:"⊘"}.stats article:nth-child(5)::after{content:"✓"}.stats article:nth-child(6)::after{content:"▦"}.stats article:nth-child(7)::after{content:"$"}.stats article:nth-child(8)::after{content:"⌑"}.stats article:nth-child(9)::after{content:"▧"}.stats article:nth-child(10)::after{content:"⇄"}.stats article:nth-child(11)::after{content:"↗";background:#eaf8f2;color:#08745b}.stats article:nth-child(12)::after{content:"%";background:#eaf8f2;color:#08745b}
.order-tab::before{display:inline-block;margin-right:5px;font-size:12px;opacity:.78}.order-tab[data-view="waitProcess"]::before{content:"◷"}.order-tab[data-view="purchaseRefund"]::before{content:"↩"}.order-tab[data-view="all"]::before{content:"▤"}.order-tab[data-view="preCollect"]::before{content:"⇥"}.order-tab[data-view="closed"]::before{content:"⊘"}.order-tab[data-view="completed"]::before{content:"✓"}.order-tab.active::before{opacity:1}
