* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f2f2f2;
    color: #333;
    line-height: 1.6;
    padding: 20px 0;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #e47911;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e47911;
    font-weight: bold;
}

h2 {
    color: #232f3e;
    margin: 20px 0 15px;
    font-size: 1.5rem;
    border-left: 4px solid #e47911;
    padding-left: 10px;
}

.basic-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.form-group {
    flex: 1;
    min-width: 150px;
    max-width: 220px;
    margin-bottom: 10px;
}

/* 特定字段样式 */
.exchange-rate-field,
.product-cost-field {
    max-width: 160px;
}

/* 尺寸字段样式 */
.dimension-field {
    max-width: 120px;
}

/* 重量字段样式 */
.product-weight-field {
    max-width: 150px;
}

/* FBA默认配送费字段 */
.fba-fee-field {
    max-width: 180px;
}

/* 佣金比例字段 */
.commission-field {
    flex: 1;
    min-width: 150px;
    max-width: 180px;
}

/* 佣金比例标签样式 */
.commission-field label {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 售价和计算按钮行 */
.price-calc-row {
    display: flex;
    width: 100%;
    gap: 15px;
    justify-content: flex-end;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 5px;
}

.price-calc-row .form-group {
    flex: 1;
    min-width: 150px;
    max-width: 210px;
    margin-bottom: 0;
}

/* FBA配送费字段样式 */
.price-calc-row .form-group:not(.price-field):not(.button-field) label {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* 按钮字段样式 */
.button-field {
    flex: 0 0 auto !important;
    width: 80px;
    display: flex;
    align-items: flex-end;
    margin-bottom: 0;
    padding-right: 0;
    min-width: 80px !important;
    max-width: 80px !important;
}

/* 价格字段样式 */
.price-field {
    flex: 0 0 auto !important;
    width: 140px;
    margin-bottom: 0;
    min-width: 140px !important;
    max-width: 140px !important;
}

/* 价格字段标签样式 */
.price-field label {
    font-size: 16px !important;
    color: #e47911 !important;
    font-weight: bold !important;
    padding: 0 !important;
    margin-bottom: 5px !important;
    display: block !important;
    line-height: 1.2 !important;
}

/* 清理之前可能存在的冲突样式 */
.price-field label strong {
    display: none;
}

/* 确保price-calc-row内的默认标签样式不会覆盖价格字段的特定样式 */
.price-calc-row .price-field label {
    font-size: 16px !important;
    line-height: 1.2 !important;
}

.button-field button {
    height: 42px;
    width: 100%;
    margin-top: 0;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #232f3e;
    text-align: center;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    text-align: center;
}

input:focus, select:focus {
    outline: none;
    border-color: #e47911;
    box-shadow: 0 0 5px rgba(228, 121, 17, 0.3);
}

input[type="number"] {
    text-align: center;
}

select {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23232f3e" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    padding: 0;
}

.calculation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

.calculation-table th,
.calculation-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calculation-table th {
    background-color: #232f3e;
    color: white;
    font-weight: bold;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #e47911;
}

.calculation-table th:first-child,
.calculation-table td:first-child {
    width: 180px;
    text-align: center;
}

.calculation-table th:not(:first-child),
.calculation-table td:not(:first-child) {
    width: 120px;
}

.calculation-table td:first-child {
    font-weight: bold;
    color: #232f3e;
    background-color: #f9f9f9;
    position: sticky;
    left: 0;
    z-index: 5;
    border-right: 1px solid #eee;
}

/* 统一数据列样式 */
.calculation-table .tax-fee,
.calculation-table .shipping-fee,
.calculation-table .commission-fee,
.calculation-table .selling-cost,
.calculation-table .profit-jpy,
.calculation-table .profit-rmb,
.calculation-table .suggested-price {
    text-align: center;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 15px !important;
    font-weight: 500;
    padding: 0 5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* 统一的数值单元格样式 */
.calculation-table .tax-fee,
.calculation-table .shipping-fee,
.calculation-table .commission-fee,
.calculation-table .selling-cost,
.calculation-table .profit-jpy,
.calculation-table .profit-rmb {
    color: #333333;
    font-weight: bold;
    text-align: center !important;
    width: 120px !important;
    word-break: keep-all !important;
    white-space: nowrap !important;
}

/* 建议售价单元格特别突出 */
.calculation-table .suggested-price {
    font-size: 16px !important;
    font-weight: bold;
    color: #0066cc !important; /* 保持蓝色突出 */
    text-align: center !important;
    width: 120px !important;
}

/* 只读字段样式 */
.readonly-field {
    background-color: #f8f8f8 !important;
    color: #666 !important;
    border: 1px solid #ddd !important;
    cursor: not-allowed !important;
    position: relative;
    opacity: 0.9;
}

.readonly-field:focus {
    outline: none !important;
    border-color: #ddd !important;
    box-shadow: none !important;
}

/* 只读字段标签样式 */
.readonly-field + label::after {
    content: " (自动计算)";
    font-size: 0.8em;
    color: #777;
    font-style: italic;
}

.calculation-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.calculation-table tr:hover {
    background-color: #f0f7ff;
}

.calculation-table tr:hover td:first-child {
    background-color: #e8f1ff;
}

/* 正负利润颜色设置 */
.profit-positive {
    color: #007500 !important;
}

.profit-negative {
    color: #d00000 !important;
}

/* 低利润警告覆盖颜色设置 */
.low-profit-warning {
    color: #d00000 !important; /* 红色显示 */
    font-weight: bold !important;
}

/* 最小建议售价行中的利润数据 */
.min-price-row .profit-jpy,
.min-price-row .profit-rmb {
    background-color: transparent !important;
}

/* 最小建议售价行中的负值或低利润 */
.min-price-row .profit-negative,
.min-price-row .low-profit-warning {
    color: #d00000 !important;
    background-color: transparent !important;
}

button {
    background-color: #e47911;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.3s;
}

button:hover {
    background-color: #c45500;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .basic-info {
        flex-direction: column;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .commission-field {
        width: 100%;
    }
    
    .price-calc-row {
        width: 100%;
        gap: 10px;
        flex-direction: column;
    }
    
    .price-calc-row .form-group {
        width: 100%;
    }
    
    .button-field {
        flex: 0.3;
        width: auto;
        padding-right: 0;
    }
    
    .price-field {
        flex: 0.7;
        width: auto;
    }
    
    .calculation-table {
        font-size: 12px;
    }
    
    .calculation-table th,
    .calculation-table td {
        padding: 8px 10px;
    }
}

/* 最小建议售价行的高亮样式 */
.min-price-row {
    background-color: #D9F2D9 !important; /* 浅绿色背景 */
    font-weight: bold !important;
    box-shadow: 0 0 8px rgba(0, 150, 0, 0.3) !important;
    position: relative !important;
    z-index: 1 !important;
    animation: highlight-pulse 2s infinite alternate !important;
}

@keyframes highlight-pulse {
    from { background-color: #D9F2D9; }
    to { background-color: #B5E6B5; }
}

.min-price-row td {
    border-bottom: 2px solid #76C376 !important;
    border-top: 2px solid #76C376 !important;
    color: #007700 !important;
}

.min-price-row td:first-child {
    background-color: #C0E5C0 !important; /* 第一列稍深一点的绿色 */
    position: relative !important;
    border-left: 3px solid #4CAF50 !important;
    padding-left: 22px !important;
}

.min-price-row td:first-child::before {
    content: "★";
    color: #007700;
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: bold;
}

.min-price-row .suggested-price {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #007700 !important;
    text-decoration: underline !important;
}

.min-price-row:hover {
    background-color: #C0E5C0 !important;
}

.min-price-row:hover td:first-child {
    background-color: #A1D6A1 !important;
}

/* 最小建议售价行中统一颜色为绿色 */
.min-price-row .tax-fee,
.min-price-row .shipping-fee,
.min-price-row .commission-fee,
.min-price-row .selling-cost {
    color: #007700 !important;
    font-size: 16px !important;
}

/* 最小建议售价行中的正利润单元格 */
.min-price-row .profit-jpy.profit-positive,
.min-price-row .profit-rmb.profit-positive {
    color: #007700 !important;
    font-size: 16px !important;
}

/* 修复表格单元格样式 */
.calculation-table td {
    vertical-align: middle !important;
    text-align: center !important;
    height: 45px !important;
    line-height: 1.2 !important;
    padding: 8px 5px !important;
}

/* 重新定义利润列样式，使用内联样式优先级更高 */
.profit-jpy,
.profit-rmb {
    font-family: 'Consolas', 'Courier New', monospace !important;
    text-align: center !important;
    font-size: 16px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* 补货规则信息容器样式 */
.replenishment-info {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.replenishment-info h2 {
    color: #232f3e;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.6rem;
    text-align: center;
    border-left: none;
    border-bottom: 2px solid #e47911;
    padding-bottom: 10px;
    padding-left: 0;
}

/* 补货规则表格样式 */
.replenishment-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
    table-layout: fixed;
}

.replenishment-table th,
.replenishment-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e1e1e1;
}

.replenishment-table th {
    background-color: #232f3e;
    color: white;
    font-weight: bold;
}

.replenishment-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.replenishment-table tr:hover {
    background-color: #f0f7ff;
}

/* 评价星级表格样式 */
.replenishment-table td:empty {
    background-color: #f8f8f8;
}

/* 新增：补货规则表格对齐样式 */
.replenishment-table th,
.replenishment-table td {
    text-align: center;
}

/* 新增：月销量表格列宽调整 - 修改为与新样式一致 */
.replenishment-table.sales-table th:first-child,
.replenishment-table.sales-table td:first-child {
    width: 65%;
    text-align: left;
}

.replenishment-table.sales-table th:last-child,
.replenishment-table.sales-table td:last-child {
    width: 35%;
    text-align: center;
    white-space: nowrap;
}

/* 确保月销量表格的数字对齐 */
.replenishment-table.sales-table td:last-child {
    font-family: 'Consolas', 'Courier New', monospace;
    font-weight: bold;
}

/* 新品补货策略表格样式 - 单列 */
.replenishment-table tr td:only-child {
    line-height: 1.8;
    padding: 15px;
}

/* 新增：策略表格样式 */
.replenishment-table.strategy-table td {
    text-align: left;
    padding: 15px;
    line-height: 1.8;
}

/* 增强表格间距 */
.table-container {
    margin-bottom: 20px;
}

/* 增强表格标题 */
.replenishment-info .table-container:before {
    content: "";
    display: block;
    height: 8px;
    margin-bottom: 15px;
    border-top: 1px solid #f0f0f0;
}

.replenishment-info .table-container:first-of-type:before {
    display: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .replenishment-table th,
    .replenishment-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .replenishment-info h2 {
        font-size: 1.4rem;
    }
    
    /* 移动设备上的表格列宽调整 */
    .replenishment-table.sales-table th:first-child,
    .replenishment-table.sales-table td:first-child {
        width: 65%;
    }
    
    .replenishment-table.sales-table th:last-child,
    .replenishment-table.sales-table td:last-child {
        width: 35%;
    }
}

/* 统一表头样式 */
.replenishment-table th {
    background-color: #232f3e;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 12px 15px;
    vertical-align: middle;
}

/* 策略表格表头特殊样式 */
.replenishment-table.strategy-table th {
    text-align: center;
}

/* 表格单元格悬停效果 */
.replenishment-table tbody tr:hover {
    background-color: #f0f7ff;
}

/* 统一单元格垂直对齐 */
.replenishment-table td {
    vertical-align: middle;
}

/* 补货备货天数列的宽度固定 - 修改为与新样式一致 */
.replenishment-table.sales-table th:last-child,
.replenishment-table.sales-table td:last-child {
    width: 35%;
    min-width: 130px;
}

/* 备货天数列特殊样式 - 已被新样式替代，移除可能冲突的属性 */
.replenishment-table.sales-table th:last-child {
    background-color: #2c3e50;
    border-left: 2px solid #fff;
}

.replenishment-table.sales-table td:last-child {
    color: #232f3e;
    font-size: 15px;
}

/* 表格表头加粗文字，增强视觉效果 */
.replenishment-table th {
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* 强调偶数行 */
.replenishment-table.sales-table tr:nth-child(even) td:last-child {
    background-color: #edf2f7;
}

/* 新增：评价星级表格的单列样式 */
.replenishment-table.rating-table td {
    text-align: left;
    width: 100%;
    padding: 15px;
    line-height: 1.5;
    font-size: 15px;
}

.replenishment-table.rating-table tr {
    border-bottom: 1px solid #e1e1e1;
}

.replenishment-table.rating-table tr:last-child {
    border-bottom: none;
}

.replenishment-table.rating-table th {
    font-size: 16px;
    padding: 15px;
}

/* 给评价星级添加特殊标记 */
.replenishment-table.rating-table tr:first-child td {
    color: #d00000;
    font-weight: bold;
}

.replenishment-table.rating-table tr:nth-child(2) td {
    color: #e67700;
}

.replenishment-table.rating-table tr:nth-child(3) td {
    color: #2b6cb0;
}

/* 统一颜色样式，强调评价规则表 */
.replenishment-table.rating-table tr:nth-child(odd) {
    background-color: #f8f9fa;
}

.replenishment-table.rating-table tr:nth-child(even) {
    background-color: #edf2f7;
}

.replenishment-table.rating-table {
    width: 100%;
    table-layout: fixed;
}

/* 月销量表格列宽和分隔样式优化 - 增强分隔效果 */
.replenishment-table.sales-table td:first-child {
    width: 65%;
    text-align: left;
    border-right: 3px solid #999;
    background-color: #f4f4f4;
    padding-left: 25px;
    font-weight: 500;
}

.replenishment-table.sales-table th:first-child {
    width: 65%;
    text-align: center;
    border-right: 3px solid #fff;
    border-bottom: 3px solid #fff;
    position: relative;
}

.replenishment-table.sales-table th:first-child::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -1px;
    height: 80%;
    transform: translateY(-50%);
    border-right: 3px solid #fff;
}

.replenishment-table.sales-table th:last-child {
    background-color: #1a3a5c;
    border-left: 3px solid #fff;
    border-bottom: 3px solid #fff;
    width: 35%;
    font-size: 16px;
    letter-spacing: 1px;
    position: relative;
}

/* 增加垂直分隔线 */
.replenishment-table.sales-table {
    border-collapse: separate;
    border-spacing: 0;
    position: relative;
}

.replenishment-table.sales-table::after {
    content: "";
    position: absolute;
    top: 0;
    left: 65%;
    width: 3px;
    height: 100%;
    background-color: #999;
    z-index: 2;
    pointer-events: none;
}

/* 备货天数列样式强化 */
.replenishment-table.sales-table td:last-child {
    width: 35%;
    text-align: center;
    white-space: nowrap;
    font-family: 'Consolas', 'Courier New', monospace;
    font-weight: 700;
    font-size: 18px;
    background-color: #f0f7ff;
    color: #2c3e50;
    padding: 12px 10px;
    border-left: 3px solid #999;
    position: relative;
    box-shadow: inset 3px 0 5px -3px rgba(0,0,0,0.1);
}

/* 更明显的表头和数据之间的分隔 */
.replenishment-table.sales-table thead {
    border-bottom: 4px solid #1a3a5c;
}

/* 偶数行背景色对比增强 */
.replenishment-table.sales-table tr:nth-child(even) td:first-child {
    background-color: #e8e8e8;
}

.replenishment-table.sales-table tr:nth-child(even) td:last-child {
    background-color: #e1ebf7;
}

/* 销量表格增强样式 */
.replenishment-table.sales-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
    font-size: 15px !important;
    margin-bottom: 20px !important;
    table-layout: fixed !important;
    background-color: #fff !important;
    border-spacing: 0 !important;
    position: static !important;
    border-radius: 0 !important;
    overflow: visible !important;
}

.replenishment-table.sales-table th,
.replenishment-table.sales-table td {
    border: 1px solid #333 !important;
    padding: 12px !important;
    text-align: center !important;
    vertical-align: middle !important;
    position: static !important;
    background-color: #fff !important;
    box-shadow: none !important;
}

.replenishment-table.sales-table th {
    background-color: #fff !important;
    color: #333 !important;
    font-weight: bold !important;
    font-size: 16px !important;
    border-bottom: 2px solid #333 !important;
    border-right: 1px solid #333 !important;
    border-left: 1px solid #333 !important;
    border-top: 1px solid #333 !important;
}

.replenishment-table.sales-table td:first-child {
    color: #333 !important;
    font-weight: normal !important;
    width: 50% !important;
    font-size: 15px !important;
    text-align: center !important;
    background-color: #fff !important;
    border-right: 1px solid #333 !important;
    position: static !important;
}

.replenishment-table.sales-table td:last-child {
    width: 50% !important;
    font-weight: bold !important;
    font-size: 16px !important;
    color: #000 !important;
    text-align: center !important;
    background-color: #fff !important;
    position: static !important;
    box-shadow: none !important;
    border-left: 1px solid #333 !important;
}

/* 移除多余装饰 */
.replenishment-table.sales-table::after,
.replenishment-table.sales-table td::after,
.replenishment-table.sales-table th::after,
.replenishment-table.sales-table td::before,
.replenishment-table.sales-table th::before {
    display: none !important;
    content: none !important;
}

/* 简单hover效果 */
.replenishment-table.sales-table tr:hover td {
    background-color: #f9f9f9 !important;
}

/* 表头更醒目 */
.replenishment-table.sales-table thead th {
    padding-top: 15px;
    padding-bottom: 15px;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* 增加最后一行的边框，完成视觉封闭 */
.replenishment-table.sales-table tr:last-child td {
    border-bottom: 2px solid #999;
}

/* 悬停效果增强 */
.replenishment-table.sales-table tr:hover td:first-child {
    background-color: #e8f0f8;
}

.replenishment-table.sales-table tr:hover td:last-child {
    background-color: #d9e9f7;
}

/* 增加垂直分隔线的视觉效果 */
.replenishment-table.sales-table td:first-child::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 1px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.1), rgba(0,0,0,0.05));
    z-index: 5;
}

/* 相对定位设置，用于垂直分隔线 */
.replenishment-table.sales-table td:first-child {
    position: relative;
}

/* 模态框样式 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 800px;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.close-btn:hover {
    color: #333;
}

/* 二次确认按钮样式 */
.secondary-btn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background-color: #e0e0e0;
} 