body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f3f4f6; padding: 20px; color: #1f2937; }
.container { max-width: 1600px; margin: 0 auto; background: rgba(255, 255, 255, 0.90); padding: 30px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); position: relative; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background-image: url('https://c-ssl.dtstatic.com/uploads/blog/202311/06/DWS6YQzbUdV06GE.thumb.400_0.jpg'); background-repeat: no-repeat; background-position: right 30px top 100px; background-size: 200px auto; }
.top-right-logo { position: absolute; top: 25px; right: 30px; height: 60px; width: auto; z-index: 20; border-radius: 4px; }
h1 { color: #111827; margin-bottom: 10px; font-size: 24px; margin-top: 10px; }
.hidden { display: none !important; }
.error-msg { color: #dc2626; margin-top: 10px; font-weight: bold; }

/* TAB 导航 */
.tab-nav { display: flex; border-bottom: 2px solid #e5e7eb; margin-bottom: 20px; gap: 10px; flex-wrap: wrap; }
.tab-button { padding: 10px 20px; border: none; background: transparent; cursor: pointer; font-size: 16px; font-weight: 600; color: #6b7280; border-bottom: 2px solid transparent; transition: 0.3s; }
.tab-button:hover { color: #1f2937; background: rgba(0,0,0,0.02); }
.tab-button.active { color: #3b82f6; border-bottom: 2px solid #3b82f6; }
.tab-button[data-tab="dy-profit"].active { color: #fe2c55; border-bottom: 2px solid #fe2c55; }
.tab-button[data-tab="deduct"].active { color: #d97706; border-bottom: 2px solid #d97706; }
.tab-button[data-tab="jingjia"].active { color: #e02e24; border-bottom: 2px solid #e02e24; }

/* 通用分析工具样式 */
.upload-area { border: 2px dashed #d1d5db; padding: 30px; text-align: center; border-radius: 8px; margin-bottom: 20px; cursor: pointer; background: rgba(249, 250, 251, 0.6); margin-top: 20px; transition: 0.3s; }
.upload-area:hover { border-color: #3b82f6; background: rgba(239, 246, 255, 0.8); }
#dy-drop-zone:hover { border-color: #fe2c55; background: #fffcfd; }
.audit-panel { background: rgba(238, 242, 255, 0.8); border: 1px solid #c7d2fe; border-radius: 8px; padding: 15px; margin-bottom: 20px; display: none; }
.audit-grid { display: flex; gap: 20px; flex-wrap: wrap; }
.audit-item { flex: 1; min-width: 120px; }
.audit-label { font-size: 12px; color: #6b7280; }
.audit-value { font-size: 20px; font-weight: bold; color: #1f2937; }
.config-section { background: rgba(255, 251, 235, 0.9); border: 1px solid #fcd34d; border-radius: 8px; padding: 20px; margin-bottom: 20px; display: none; }
#dy-config-area { background: #fff; border: 1px solid #eee; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; max-height: 150px; overflow-y: auto; padding: 10px; background: rgba(255, 255, 255, 0.8); border: 1px solid #e5e7eb; border-radius: 4px; margin-bottom: 15px; }
#dimension-radio-group { max-height: none; overflow-y: visible; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.checkbox-label { display: flex; align-items: center; cursor: pointer; font-size: 13px; color: #4b5563; }
.batch-input-group { display: flex; gap: 15px; align-items: center; background: rgba(255,255,255,0.85); padding: 15px; border-radius: 6px; border: 1px solid #e5e7eb; margin-bottom: 15px; flex-wrap: wrap;}
.batch-item { display: flex; align-items: center; gap: 5px; }
.batch-input-group input { width: 100px; padding: 6px; border: 1px solid #d1d5db; border-radius: 4px; }
.batch-label { font-size: 14px; font-weight: bold; color: #4b5563; }
.action-bar { display: flex; gap: 10px; margin-top: 15px; align-items: center; flex-wrap: wrap; }
.action-btn { background-color: #3b82f6; color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; display: flex; align-items: center; }
.action-btn:hover { background-color: #2563eb; }
.action-btn.secondary { background-color: #10b981; }
.action-btn.secondary:hover { background-color: #059669; }
.action-btn:disabled { background-color: #94a3b8; cursor: not-allowed; }
.dy-btn { background-color: #fe2c55; }
.dy-btn:hover { background-color: #e02045; }
.dy-btn-sec { background-color: #25cbb3; }
.dy-btn-sec:hover { background-color: #1da894; }
.summary-container { display: flex; flex-direction: column; gap: 15px; margin-bottom: 25px; margin-top: 20px; }
.summary-row { display: flex; gap: 15px; flex-wrap: wrap; }
.card { flex: 1; background: rgba(243, 244, 246, 0.8); padding: 15px 20px; border-radius: 8px; border-left: 5px solid #3b82f6; min-width: 200px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.card h3 { margin: 0 0 5px 0; font-size: 12px; color: #6b7280; text-transform: uppercase; font-weight: 600; }
.card p { margin: 0; font-size: 22px; font-weight: 700; color: #1f2937; }
.card.profit-card { border-left-color: #10b981; background: rgba(236, 253, 245, 0.8); }
.card.profit-card p { color: #059669; }
.card.loss-card { border-left-color: #f59e0b; background: #fffbeb; }
.card.loss-card p { color: #b45309; }
.card.cost-card { border-left-color: #6b7280; background: #f3f4f6; }
.card.danger-card { border-left-color: #dc2626; background: #fef2f2; }
.card.danger-card p { color: #991b1b; }
.dy-card-profit { border-left-color: #25cbb3; background: #e6f7f4; }
.dy-card-profit p { color: #047a69; }
.dy-card-loss { border-left-color: #ff9a2e; background: #fff8ed; }
.dy-card-loss p { color: #b56205; }
.dy-card-main { border-left-color: #fe2c55; background: #fff0f2; }
.dy-card-main p { color: #c41e3a; }
.dy-card-cost { border-left-color: #6b7280; background: #f3f4f6; }
table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 13px; table-layout: fixed; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid #e5e7eb; word-break: break-all; vertical-align: middle; }
th { background-color: rgba(249, 250, 251, 0.95); font-weight: 600; color: #374151; cursor: pointer; position: sticky; top: 0; z-index: 10; }
.col-id { width: 8%; color: #999; }
.col-code { width: 10%; color: #4b5563; }
.col-name { width: 15%; }
.col-spec { width: 12%; color: #6b7280; font-size: 12px; }
.col-num { width: 5%; text-align: center !important; }
.col-share { width: 6%; text-align: center !important; color: #7c3aed; font-weight: 600; white-space: nowrap; word-break: keep-all; }
.col-rate { width: 6%; text-align: center !important; }
.col-money { width: 8%; text-align: right !important; } 
.col-cost { width: 10%; text-align: right !important; }
.cost-input { width: 100%; padding: 4px; border: 1px solid #d1d5db; border-radius: 4px; text-align: right; background: rgba(255,255,255,0.7); box-sizing: border-box; }
.cost-input:focus { border-color: #3b82f6; outline: none; background: #fff; }
.cost-input-missing { border-color: #dc2626 !important; background: #fef2f2 !important; }
#dy-config-area .cost-input:focus { border-color: #fe2c55; }
.rate-badge { padding: 3px 6px; border-radius: 4px; font-weight: bold; font-size: 12px; display: inline-block; }
.rate-high { background-color: #fee2e2; color: #991b1b; } 
.rate-med { background-color: #ffedd5; color: #9a3412; }  
.rate-low { background-color: #dcfce7; color: #166534; }
.profit-pos { color: #16a34a; font-weight: bold; }
.profit-neg { color: #dc2626; font-weight: bold; }
.sort-icon { font-size: 12px; margin-left: 4px; color: #9ca3af; }
.hide-code .col-code, .hide-spec .col-spec, .hide-share .col-share, .hide-cost .col-cost-sku, .hide-shipping .col-cost-shipping, .hide-serviceFee .col-fee-service, .hide-loss .col-fee-loss, .hide-profit .col-profit { display: none !important; }
table.simplified th, table.simplified td { font-size: 14px; padding: 12px 10px; }

/* ROI 计算器样式 */
.roi-tool-section h2 { margin-top: 0; }
.roi-scroll-container { overflow-x: auto; padding-bottom: 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.roi-grid-layout { display: grid; grid-template-columns: minmax(80px, 1fr) repeat(9, minmax(60px, 0.8fr)) 80px; gap: 8px; align-items: center; min-width: 900px; padding: 0 10px; }
.sku-header { margin-bottom: 0; font-weight: bold; padding: 12px 10px; background: #f8fafc; border-bottom: 2px solid #e2e8f0; font-size: 13px; color: #374151; text-align: center; }
.sku-header span { white-space: nowrap; }
.sku-input { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; }
.sku-input:nth-child(even) { background-color: #fafafa; } 
.sku-input input { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; background: #fff; box-sizing: border-box; font-size: 13px; text-align: center; }
.sku-input input:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 2px rgba(59,130,246,0.1); }
.sku-input input.sku-name { font-weight: bold; text-align: left; }
.breakeven-roi { background-color: #f0f9ff !important; border-color: #bae6fd !important; color: #0284c7; font-weight: bold; }
.gross-profit-margin { background-color: #f0fdf4 !important; border-color: #bbf7d0 !important; }
.net-profit-margin { background-color: #fefce8 !important; border-color: #fde68a !important; font-weight: bold; }
.roi-status { padding: 4px 6px; border-radius: 4px; font-size: 11px; font-weight: bold; flex: 1; text-align: center; display: inline-block; white-space: nowrap; }
.roi-profit { background-color: #dcfce7; color: #15803d; }
.roi-loss { background-color: #fee2e2; color: #b91c1c; }
.roi-breakeven { background-color: #fef9c3; color: #a16207; }
.add-btn { background-color: #4CAF50; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; margin-top: 15px;}
.remove-btn { background-color: #ef4444; color: white; border: none; border-radius: 4px; cursor: pointer; height: 28px; width: 28px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.export-btn-roi { background-color: #2196F3; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; margin-right: 10px; }
.advanced-options { margin: 15px 0; padding: 15px; background-color: #f8fafc; border-radius: 6px; border: 1px solid #e2e8f0; }
.roi-result-table { width: 100%; border-collapse: collapse; margin-top: 10px; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.roi-result-table th { background: #f1f5f9; text-align: right; padding: 10px 8px; font-size: 13px; border-bottom: 2px solid #e2e8f0; white-space: normal; }
.roi-result-table td { padding: 10px 8px; border-bottom: 1px solid #f1f5f9; font-size: 14px; text-align: right; font-family: 'Consolas', monospace; }
.roi-result-table tr:last-child td { border-bottom: none; }
.roi-result-table th:first-child, .roi-result-table td:first-child { text-align: left; width: 8%; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roi-result-table th:nth-child(2), .roi-result-table td:nth-child(2) { color: #059669; font-weight: bold; background: #f0fdf4; }
.roi-result-table th:nth-last-child(2), .roi-result-table td:nth-last-child(2) { color: #2563eb; background: #eff6ff; }
.roi-result-table th:last-child, .roi-result-table td:last-child { font-weight: bold; }
.text-red { color: #ef4444; }
.text-green { color: #10b981; }

/* 扣款对账 Tab 专属样式 */
.deduct-upload-grid { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px;}
.file-box { flex: 1; border: 2px dashed #cbd5e1; padding: 20px; text-align: center; border-radius: 8px; transition: 0.3s; cursor: pointer; background: #f8fafc; }
.file-box:hover { border-color: #2563eb; background: #eff6ff; }
.file-box h3 { margin-top: 0; color: #475569; margin-bottom: 5px; }
.file-status { margin-top: 10px; font-size: 14px; color: #16a34a; font-weight: bold; min-height: 20px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; margin-bottom: 10px; border-left: 5px solid #2563eb; padding-left: 10px; }
.bg-logistics { background-color: #fff7ed; color: #d97706; }
.bg-aftersales { background-color: #eff6ff; color: #2563eb; }
.bg-freight { background-color: #f0fdf4; color: #16a34a; }
.unmatched-row { background-color: #fff1f2; }
.scroll-table-container { max-height: 500px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 30px; }

/* 评分Tab */
#scoreTab table { width: 100%; margin: 15px 0; border-collapse: collapse; }
#scoreTab th, #scoreTab td { padding: 12px; text-align: left; border-bottom: 1px solid #ddd; }
#scoreTab input[type="number"] { width: 100px; padding: 8px; margin: 5px 0; border: 1px solid #ddd; border-radius: 4px; }
#scoreTab button { background: #28a745; color: white; border: none; padding: 12px 24px; border-radius: 5px; cursor: pointer; }
#scoreTab button:hover { background: #218838; }
#result, #targetResult { margin-top: 20px; padding: 15px; background: #f8f9fa; border-radius: 5px; }
.highlight { color: #dc3545; font-weight: bold; }

/* Jingjia 竞价工具专属样式 */
.jj-header { background: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 20px; }
.jj-file-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.jj-file-tab { padding: 8px 18px; background: #f8f9fa; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; font-size: 13px; color: #666; }
.jj-file-tab.active { background: #e02e24; border-color: #e02e24; color: #fff; font-weight: bold; }
.jj-control-panel { background: #fff; padding: 20px; border-radius: 12px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.jj-search-row { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; justify-content: center; }
.jj-input-group { display: flex; align-items: center; gap: 8px; }
.jj-input-group label { font-size: 14px; color: #666; font-weight: bold; }
.jj-search-box-main { flex: 1; min-width: 300px; }
.jj-search-box-main input { width: 100%; padding: 10px 15px; border: 1px solid #ddd; border-radius: 8px; outline: none; }
.jj-price-input { width: 100px; padding: 10px; border: 1px solid #ddd; border-radius: 8px; outline: none; text-align: center; font-weight: bold; color: #e02e24; }
.jj-input-group input:focus { border-color: #e02e24; }
.jj-filter-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.jj-filter-tab { padding: 6px 16px; background: #f1f1f1; border-radius: 20px; cursor: pointer; font-size: 13px; color: #555; }
.jj-filter-tab.active { background: #333; color: #fff; }
.jj-grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.jj-goods-link { text-decoration: none; color: inherit; display: block; }
.jj-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04); transition: 0.3s; position: relative; display: flex; flex-direction: column; height: 100%; }
.jj-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.jj-rank-tag { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.7); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px; z-index: 2; }
.jj-img-box { width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #f9f9f9; }
.jj-img-box img { width: 100%; height: 100%; object-fit: cover; }
.jj-content { padding: 12px; flex-grow: 1; display: flex; flex-direction: column; }
.jj-title { font-size: 13px; font-weight: bold; height: 36px; line-height: 18px; overflow: hidden; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.jj-price-val { font-size: 20px; color: #e02e24; font-weight: 800; margin-bottom: 8px; }
.jj-sales-footer { margin-top: auto; padding-top: 10px; border-top: 1px dashed #eee; font-size: 12px; color: #666; }
.jj-sales-num { color: #e02e24; font-weight: bold; font-size: 16px; }
.jj-pager { display: flex; justify-content: center; align-items: center; gap: 15px; margin: 30px 0; }
.jj-btn { padding: 8px 20px; cursor: pointer; border-radius: 6px; border: 1px solid #ddd; background: #fff; }
.jj-sort-tip { text-align: center; font-size: 12px; color: #999; margin-bottom: 10px; }