* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f8fafc;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 5px;
}

.header {
    background: white;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 5px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 10px;
}

.header p {
    color: #718096;
    font-size: 14px;
}

.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th {
    background: #f7fafc;
    padding: 2px 5px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

th.supplier-header {
    background: #e6fffa;
    border-bottom: 2px solid #81e6d9;
    text-align: center;
}

th.supplier-subheader {
    background: #f0fff4;
    border-bottom: 1px solid #c6f6d5;
    text-align: center;
}

th.supplier-name-header {
    background: #e6fffa;
    border-bottom: 1px solid #81e6d9;
    text-align: center;
    font-weight: 600;
    color: #2d3748;
}

th.supplier-total-header {
    background: #f0fff4;
    border-bottom: 1px solid #c6f6d5;
    text-align: center;
    font-weight: 600;
    color: #22543d;
}

td {
    padding: 2px 5px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

tr:hover {
    background-color: #f7fafc;
}

.product-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
}

.product-spec {
    color: #718096;
    font-size: 12px;
}

.product-detail {
    color: #4a5568;
    font-size: 12px;
    line-height: 1.2;
}

.price-cell {
    text-align: center;
    min-width: 50px;
}

.price-amount {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
}

.subtotal-amount {
    color: #718096;
    font-size: 12px;
}

.no-data {
    color: #a0aec0;
    font-style: italic;
    text-align: center;
}

.supplier-total {
    background: #f0fff4;
    font-weight: 600;
    text-align: center;
    border-right: 1px solid #e2e8f0;
}

.supplier-total .total-amount {
    font-size: 16px;
    color: #22543d;
    margin-bottom: 2px;
}

.supplier-total .supplier-name {
    font-size: 12px;
    color: #38a169;
}

.table-scroll {
    overflow-x: auto;
    max-height: 100%;
    overflow-y: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 5px;
    }
    
    .header {
        padding: 5px;
    }
    
    th, td {
        padding: 2px 5px;
    }
}

/* 空单元格样式 */
td:empty::before {
    content: "-";
    color: #a0aec0;
    font-style: italic;
}

/* 加载状态 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #718096;
}

.loading-spinner {
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid #3498db;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误信息 */
.error {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 20px 0;
    color: #c53030;
}

/* 无数据提示 */
.no-data {
    text-align: center;
    padding: 10px;
    color: #a0aec0;
    font-style: italic;
}