/* ============ PC 端经销商订货系统 - 样式 ============ */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;background:#f0f2f6;color:#1f2937;font-size:14px;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer;border:0}
input,select,textarea{font-family:inherit;outline:none}
img{max-width:100%}

/* ============ 布局 ============ */
.pc-app{display:flex;flex-direction:column;min-height:100vh}
.topbar{position:sticky;top:0;z-index:100;height:60px;background:#fff;border-bottom:1px solid #eef0f4;display:flex;align-items:center;padding:0 24px;gap:20px}
.brand{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:800;color:#111827;white-space:nowrap}
.brand-mark{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#2f8cff,#1677ff);color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:800;box-shadow:0 6px 14px rgba(22,119,255,.3)}
.top-search{flex:1;max-width:420px;display:flex;align-items:center;background:#f3f6fb;border-radius:20px;padding:0 16px;height:38px}
.top-search input{flex:1;border:0;background:transparent;font-size:14px;color:#1f2937}
.top-search .ts-btn{background:transparent;color:#1677ff;font-size:14px;padding:0 8px;height:100%}
.top-user{margin-left:auto;display:flex;align-items:center;gap:14px}
.top-user .user-chip{display:flex;align-items:center;gap:8px;color:#374151;font-size:14px}
.top-user .avatar{width:32px;height:32px;border-radius:50%;background:#eef5ff;color:#1677ff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;overflow:hidden}
.top-user .avatar img{width:100%;height:100%;object-fit:cover}
.top-user .logout-btn{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:6px 14px;font-size:13px;color:#6b7280}
.top-user .logout-btn:hover{border-color:#ef4444;color:#ef4444}

.pc-body{display:flex;flex:1;min-height:0}
.sidebar{width:200px;flex:none;background:#fff;border-right:1px solid #eef0f4;padding:16px 10px;display:flex;flex-direction:column;gap:4px}
.sidebar .menu-title{font-size:12px;color:#9ca3af;padding:12px 12px 6px;font-weight:600}
.nav-item{display:flex;align-items:center;gap:10px;padding:11px 14px;border-radius:10px;color:#4b5563;font-size:14px;cursor:pointer;transition:background .12s,color .12s}
.nav-item:hover{background:#f3f6fb;color:#1677ff}
.nav-item.active{background:#eef5ff;color:#1677ff;font-weight:600}
.nav-item .nav-ico{width:20px;text-align:center;font-size:16px}
.nav-item .nav-badge{margin-left:auto;background:#ef4444;color:#fff;font-size:11px;border-radius:9px;padding:1px 6px;min-width:18px;text-align:center}
.main{flex:1;min-width:0;padding:20px 24px;overflow-y:auto}
.page-title{font-size:20px;font-weight:800;color:#111827;margin-bottom:16px;display:flex;align-items:center;gap:12px}
.page-title .sub{font-size:13px;color:#9ca3af;font-weight:400}

/* ============ 卡片 ============ */
.card{background:#fff;border-radius:14px;padding:18px;margin-bottom:14px;box-shadow:0 2px 10px rgba(15,23,42,.04);border:1px solid #f2f5f9}
.card-title{font-size:15px;font-weight:700;color:#111827;margin-bottom:14px;display:flex;align-items:center;justify-content:space-between}
.card-title .link{font-size:13px;color:#1677ff;font-weight:400;cursor:pointer}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}

/* ============ 按钮 ============ */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:38px;padding:0 18px;border-radius:10px;font-size:14px;font-weight:600;background:#f3f6fb;color:#1f2937;transition:all .12s}
.btn:hover{opacity:.9}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.primary{background:linear-gradient(135deg,#2f8cff,#1677ff);color:#fff;box-shadow:0 6px 16px rgba(22,119,255,.25)}
.btn.ghost{background:#fff;color:#374151;border:1px solid #e5e7eb}
.btn.ghost:hover{border-color:#1677ff;color:#1677ff}
.btn.danger{background:#fff;color:#ef4444;border:1px solid #fecaca}
.btn.danger:hover{background:#fef2f2}
.btn.solid-danger{background:linear-gradient(135deg,#f87171,#ef4444);color:#fff;box-shadow:0 6px 16px rgba(239,68,68,.22)}
.btn.warn{background:#fff;color:#f59e0b;border:1px solid #fde68a}
.btn.small{height:30px;padding:0 12px;font-size:13px;border-radius:8px}
.btn.block{width:100%}

/* ============ 表格 ============ */
.table{width:100%;border-collapse:collapse;font-size:14px}
.table th{background:#f8fafc;color:#6b7280;font-weight:600;text-align:left;padding:11px 14px;border-bottom:1px solid #eef1f5;white-space:nowrap}
.table td{padding:12px 14px;border-bottom:1px solid #f1f3f5;vertical-align:middle}
.table tbody tr:hover{background:#fafbfd}
.table .num{text-align:right}
.table .center{text-align:center}
.goods-thumb{width:52px;height:52px;border-radius:10px;object-fit:cover;background:#f3f4f6;flex:none}

/* ============ 表单 ============ */
.form-row{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.form-row label{width:90px;flex:none;color:#374151;font-weight:600;font-size:14px}
.form-row label.required::before{content:"*";color:#ef4444;margin-right:3px}
.form-row input,.form-row select,.form-row textarea{flex:1;min-width:0;height:38px;border:1px solid #e5e7eb;border-radius:10px;padding:0 12px;font-size:14px;color:#1f2937;background:#fff}
.form-row textarea{height:auto;min-height:80px;padding:10px 12px;resize:vertical}
.form-row input:focus,.form-row select:focus,.form-row textarea:focus{border-color:#1677ff;box-shadow:0 0 0 3px rgba(22,119,255,.1)}
.form-row .form-note{font-size:12px;color:#9ca3af;flex:none}

/* ============ 标签 ============ */
.tag{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;background:#eef5ff;color:#1677ff;font-size:12px;font-weight:500}
.tag.green{background:#ecfdf5;color:#10b981}
.tag.orange{background:#fff7ed;color:#f59e0b}
.tag.red{background:#fef2f2;color:#ef4444}
.tag.gray{background:#f3f4f6;color:#6b7280}
.tag.purple{background:#f5f3ff;color:#7c3aed}

/* ============ 登录页 ============ */
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(160deg,#e8f2ff 0%,#f6f7fb 55%,#eef5ff 100%)}
.login-box{width:400px;background:#fff;border-radius:20px;padding:36px 40px;box-shadow:0 20px 60px rgba(15,23,42,.1)}
.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:28px}
.login-brand .mark{width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,#2f8cff,#1677ff);color:#fff;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800}
.login-brand .t{font-size:20px;font-weight:800;color:#111827}
.login-brand .s{font-size:12px;color:#9ca3af;margin-top:2px}
.login-field{margin-bottom:16px}
.login-field label{display:block;font-size:13px;color:#374151;font-weight:600;margin-bottom:6px}
.login-field input{width:100%;height:44px;border:1px solid #e5e7eb;border-radius:10px;padding:0 14px;font-size:14px}
.login-field input:focus{border-color:#1677ff;box-shadow:0 0 0 3px rgba(22,119,255,.1)}
.login-links{display:flex;justify-content:space-between;margin-top:14px;font-size:13px;color:#1677ff}

/* ============ 商品 ============ */
.goods-layout{display:flex;gap:16px}
.goods-side{width:200px;flex:none}
.cat-list{background:#fff;border-radius:14px;padding:10px;border:1px solid #f2f5f9}
.cat-item{padding:9px 12px;border-radius:8px;font-size:14px;color:#4b5563;cursor:pointer;display:flex;align-items:center;justify-content:space-between}
.cat-item:hover{background:#f3f6fb}
.cat-item.active{background:#eef5ff;color:#1677ff;font-weight:600}
.goods-main{flex:1;min-width:0}
.goods-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.sort-tabs{display:flex;gap:6px}
.sort-tabs span{padding:7px 14px;border-radius:16px;font-size:13px;color:#6b7280;cursor:pointer;background:#fff;border:1px solid #f2f5f9}
.sort-tabs span.active{background:linear-gradient(135deg,#2f8cff,#1677ff);color:#fff;box-shadow:0 4px 12px rgba(22,119,255,.22)}
.goods-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.goods-card{background:#fff;border-radius:14px;overflow:hidden;border:1px solid #f2f5f9;box-shadow:0 2px 10px rgba(15,23,42,.04);cursor:pointer;transition:transform .12s,box-shadow .12s}
.goods-card:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(15,23,42,.1)}
.goods-card img{width:100%;height:180px;object-fit:cover;background:#f3f4f6;display:block}
.goods-card .g-info{padding:12px 14px}
.goods-card .g-name{font-weight:700;font-size:14px;line-height:1.4;min-height:38px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.goods-card .g-sub{font-size:12px;color:#9ca3af;margin:4px 0 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.goods-card .g-foot{display:flex;align-items:center;justify-content:space-between}
.goods-card .price{color:#ef4444;font-weight:800;font-size:17px}
.goods-card .g-add{width:30px;height:30px;border-radius:50%;background:#eef5ff;color:#1677ff;font-size:18px;display:flex;align-items:center;justify-content:center;border:0}
.goods-card .g-add:hover{background:#1677ff;color:#fff}
.price{color:#ef4444;font-weight:800}
.price-ori{color:#9ca3af;text-decoration:line-through;font-size:12px;font-weight:400;margin-left:6px}

/* ============ 商品详情 ============ */
.detail-layout{display:flex;gap:24px}
.detail-imgs{width:380px;flex:none}
.detail-imgs .main-img{width:380px;height:380px;border-radius:14px;object-fit:cover;background:#f3f4f6;border:1px solid #f2f5f9}
.detail-info{flex:1;min-width:0}
.detail-price-box{background:linear-gradient(135deg,#fff7ed,#fff);border:1px solid #fde68a;border-radius:14px;padding:18px;margin-bottom:16px}
.detail-price-box .price{font-size:30px}
.detail-sku{margin:16px 0}
.sku-chips{display:flex;flex-wrap:wrap;gap:10px}
.sku-chip{padding:8px 16px;border:1px solid #e5e7eb;border-radius:999px;font-size:13px;color:#374151;cursor:pointer;background:#fff}
.sku-chip.on{border-color:#1677ff;color:#1677ff;background:#eef5ff;box-shadow:0 4px 10px rgba(22,119,255,.12)}
.qty-stepper{display:flex;align-items:center;gap:0;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden}
.qty-stepper button{width:38px;height:38px;background:#f8fafc;font-size:18px;color:#374151}
.qty-stepper input{width:60px;height:38px;border:0;text-align:center;font-size:14px;border-left:1px solid #e5e7eb;border-right:1px solid #e5e7eb}
.detail-actions{display:flex;gap:12px;margin-top:20px}
.rich-content{line-height:1.8;color:#374151;font-size:14px}
.rich-content img{max-width:100%}

/* ============ 购物车 ============ */
.cart-summary{display:flex;align-items:center;justify-content:space-between;background:#fff;border-radius:14px;padding:14px 18px;border:1px solid #f2f5f9;margin-top:14px}
.cart-summary .total{font-size:20px}

/* ============ 金额明细 ============ */
.amount-rows{display:flex;flex-direction:column;gap:10px}
.amount-rows .ar{display:flex;justify-content:space-between;font-size:14px;color:#374151}
.amount-rows .ar.total{border-top:1px solid #eef1f5;padding-top:12px;font-weight:800;color:#111827}
.amount-rows .ar.total .price{font-size:18px}

/* ============ 支付方式 ============ */
.pay-options{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.pay-option{border:1px solid #e5e7eb;border-radius:12px;padding:16px;text-align:center;cursor:pointer;transition:all .12s}
.pay-option:hover{border-color:#93c5fd}
.pay-option.on{border-color:#1677ff;background:#eef5ff;box-shadow:0 4px 14px rgba(22,119,255,.14)}
.pay-option .p-ico{font-size:26px;margin-bottom:6px}
.pay-option .p-name{font-weight:700;font-size:14px;color:#111827}
.pay-option .p-desc{font-size:12px;color:#9ca3af;margin-top:3px}

/* ============ 弹窗 ============ */
.modal-mask{position:fixed;inset:0;z-index:1000;background:rgba(15,23,42,.5);display:flex;align-items:center;justify-content:center}
.modal{width:480px;max-width:92vw;max-height:86vh;background:#fff;border-radius:16px;padding:24px;box-shadow:0 24px 60px rgba(15,23,42,.2);display:flex;flex-direction:column;overflow:hidden}
.modal .modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.modal .modal-head h3{font-size:17px;font-weight:800;color:#111827}
.modal .modal-close{background:#f3f4f6;border-radius:8px;width:30px;height:30px;font-size:16px;color:#6b7280}
.modal .modal-body{overflow-y:auto;flex:1}
.modal .modal-foot{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}

/* ============ Toast ============ */
#toast{position:fixed;left:50%;bottom:60px;transform:translateX(-50%);z-index:2000;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none}
.toast{background:rgba(17,24,39,.9);color:#fff;padding:10px 20px;border-radius:999px;font-size:14px;box-shadow:0 8px 24px rgba(0,0,0,.15);animation:toastIn .2s ease}
@keyframes toastIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

/* ============ 空状态 / 分页 ============ */
.empty{text-align:center;padding:60px 20px;color:#9ca3af;font-size:14px}
.pager{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:18px;font-size:13px;color:#6b7280}
.pager button{height:32px;padding:0 14px;border-radius:8px;background:#fff;border:1px solid #e5e7eb;font-size:13px;color:#374151}
.pager button:disabled{opacity:.4}

/* ============ 订单步骤 ============ */
.order-steps{display:flex;gap:0;margin-bottom:16px}
.order-steps .step{flex:1;text-align:center;position:relative;font-size:13px;color:#9ca3af}
.order-steps .step::before{content:"";position:absolute;top:13px;left:50%;width:100%;height:2px;background:#e5e7eb}
.order-steps .step:first-child::before{display:none}
.order-steps .step .dot{width:28px;height:28px;line-height:28px;border-radius:50%;margin:0 auto 6px;background:#e5e7eb;color:#9ca3af;font-size:13px;position:relative;z-index:1}
.order-steps .step.done .dot{background:#1677ff;color:#fff}
.order-steps .step.done{color:#1677ff}
.order-steps .step.done::before{background:#1677ff}

/* ============ 打印 ============ */
.print-sheet{background:#fff;color:#111827;padding:20px}
.print-sheet h2{text-align:center;margin:0 0 16px}
.print-sheet table{width:100%;border-collapse:collapse;margin:12px 0}
.print-sheet th,.print-sheet td{border:1px solid #d9dee8;padding:8px;text-align:left;font-size:13px}
.print-sheet th{background:#f7f8fa}
.print-sheet .sheet-line{margin-bottom:8px;font-size:14px}
.print-sheet .sheet-total{text-align:right;font-size:18px;font-weight:700;color:#e64340;margin-top:12px}
@media print{.topbar,.sidebar,.no-print,.modal-head,.modal-foot,.pager,.toast{display:none!important}.pc-body{display:block}.main{padding:0;overflow:visible}.card{box-shadow:none;border:0}}

/* ============ 工具 ============ */
.row{display:flex;align-items:center}
.between{display:flex;align-items:center;justify-content:space-between}
.muted{color:#6b7280;font-size:13px}
.tiny{font-size:12px;color:#9ca3af}
.flex{flex:1;min-width:0}
.gap-8{gap:8px}.gap-12{gap:12px}.gap-16{gap:16px}
.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}
.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}
.text-right{text-align:right}
.upload-btn{display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 16px;border:1px dashed #cbd5e1;border-radius:10px;color:#6b7280;font-size:13px;background:#fafbfd;cursor:pointer}
.upload-btn.done{border-color:#1677ff;color:#1677ff;background:#eef5ff}
.upload-btn:hover{border-color:#1677ff;color:#1677ff}
.file-input{display:none}
.copyable{cursor:pointer;border-bottom:1px dashed #cbd5e1}
.copyable:hover{color:#1677ff;border-color:#1677ff}
.voucher-img{max-width:100%;max-height:320px;border-radius:10px;border:1px solid #e5e7eb}
.bank-box{background:#f8fafc;border:1px solid #eef1f5;border-radius:12px;padding:16px}
.bank-row{display:flex;justify-content:space-between;padding:8px 0;font-size:14px}
.bank-row .bl{color:#6b7280}
.bank-row .bv{font-weight:700;color:#111827}
.finance-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:14px}
.finance-card{border-radius:14px;padding:20px;color:#fff}
.finance-card.deposit{background:linear-gradient(135deg,#2f8cff,#1677ff);box-shadow:0 8px 20px rgba(22,119,255,.25)}
.finance-card.credit{background:linear-gradient(135deg,#fb923c,#f97316);box-shadow:0 8px 20px rgba(249,115,22,.25)}
.finance-card.paid{background:linear-gradient(135deg,#34d399,#10b981);box-shadow:0 8px 20px rgba(16,185,129,.25)}
.finance-card .fl{font-size:13px;opacity:.85}
.finance-card .fv{font-size:26px;font-weight:800;margin-top:8px}
.menu-list{background:#fff;border-radius:14px;overflow:hidden;border:1px solid #f2f5f9}
.menu-row{display:flex;align-items:center;gap:12px;padding:15px 18px;border-bottom:1px solid #f3f4f6;cursor:pointer;transition:background .1s}
.menu-row:last-child{border-bottom:0}
.menu-row:hover{background:#fafbfd}
.menu-row .menu-icon{width:36px;height:36px;border-radius:10px;background:#eef5ff;display:flex;align-items:center;justify-content:center;font-size:18px}
.menu-row .menu-arrow{margin-left:auto;color:#c3c9d4;font-size:16px}
.notice-bar{background:#fff8e8;border:1px solid #fde68a;border-radius:12px;padding:10px 14px;color:#8a5a00;font-size:13px;margin-bottom:14px;display:flex;align-items:center;gap:8px}
.notice-bar .n-ico{font-size:16px}
.copy-ok{color:#10b981}
