/* 观略运营数据看板 - 样式文件 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 300;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* 时间选择器 */
.time-selector {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.time-selector h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.btn-time {
    padding: 0.75rem 1.5rem;
    border: 2px solid #3498db;
    background: transparent;
    color: #3498db;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-time:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-time.active {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.custom-date-picker {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.date-input {
    padding: 0.75rem;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.date-input:focus {
    border-color: #3498db;
}

.btn-small {
    padding: 0.75rem 1.5rem;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

/* 报表网格 */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.report-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.report-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-card p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 图表控件 */
.chart-controls {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: stretch; /* 确保所有控件高度一致 */
}

.chart-select {
    width: 100%;
    height: 44px; /* 统一高度 */
    padding: 0 12px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.chart-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.chart-select:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

/* 多选仓库选择器容器样式 */
.warehouse-selector-container {
    position: relative;
    width: 100%;
}

/* 多选仓库选择器样式 */
#turnover-warehouse {
    display: none; /* 隐藏原生select */
}

/* 自定义多选下拉菜单显示区域 */
#turnover-warehouse-display {
    background: white;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 44px; /* 与其他控件统一高度 */
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
}

#turnover-warehouse-display:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

#turnover-warehouse-display.active {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#turnover-warehouse-display:focus-within {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 选中标签容器 */
.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    align-items: center;
    overflow: hidden; /* 防止标签溢出 */
}

/* 选中标签样式 */
.selected-tag {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 3px 8px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: tagFadeIn 0.2s ease-out;
    height: 20px; /* 固定标签高度 */
    box-sizing: border-box;
}

@keyframes tagFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.selected-tag .remove-tag {
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.selected-tag .remove-tag:hover {
    opacity: 1;
}

/* 下拉箭头 */
.dropdown-arrow {
    margin-left: 8px;
    font-size: 12px;
    color: #7f8c8d;
    transition: transform 0.3s ease;
}

.dropdown-arrow.open {
    transform: rotate(180deg);
}

/* 下拉选项列表 */
.warehouse-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #3498db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 通用的show状态样式 */
.warehouse-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#turnover-warehouse-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 下拉选项样式 */
.warehouse-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f4;
    font-size: 14px;
    color: #333;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.warehouse-option:last-child {
    border-bottom: none;
}

.warehouse-option:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

.warehouse-option.selected {
    background: linear-gradient(135deg, #e3f2fd, #f0f8ff);
    color: #1976d2;
    font-weight: 500;
    border-left: 3px solid #3498db;
}

.warehouse-option.selected::after {
    content: "✓";
    color: #3498db;
    font-weight: bold;
    font-size: 16px;
}

/* 仓库类型选项样式（正常仓、残次仓） */
.warehouse-category-option {
    font-weight: bold !important;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
    color: #495057 !important;
    border-left: 3px solid #6c757d !important;
    font-size: 14px !important;
}

.warehouse-category-option:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6) !important;
    color: #343a40 !important;
}

/* 占位文本 */
.placeholder-text {
    color: #95a5a6;
    font-style: italic;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .chart-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .chart-select {
        height: 40px;
        font-size: 13px;
    }
    
    #turnover-warehouse-display {
        height: 40px;
        font-size: 13px;
    }
    
    .selected-tag {
        font-size: 11px;
        padding: 2px 6px;
        max-width: 80px;
        height: 18px;
    }
    
    .warehouse-dropdown {
        max-height: 180px;
    }
    
    .warehouse-option {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .chart-controls {
        gap: 0.5rem;
    }
    
    .chart-select, #turnover-warehouse-display {
        height: 36px;
        font-size: 12px;
    }
    
    .selected-tag {
        font-size: 10px;
        padding: 2px 5px;
        max-width: 60px;
        height: 16px;
    }
    
    .warehouse-dropdown {
        max-height: 160px;
    }
    
    .warehouse-option {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* 图表容器 */
.chart-container {
    height: 400px;
    max-height: 400px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 库存汇总样式 */
.stock-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.summary-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.summary-item h4 {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.summary-item .number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.summary-item.warning .number {
    color: #e74c3c;
}

/* 错误消息 */
.error-message {
    text-align: center;
    padding: 2rem;
    color: #e74c3c;
    font-size: 1.1rem;
    background: #fdf2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .time-buttons {
        flex-direction: column;
    }
    
    .btn-time {
        width: 100%;
        text-align: center;
    }
    
    .custom-date-picker {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-input {
        width: 100%;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stock-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 周转天数报表移动端优化 */
    .turnover-table {
        font-size: 0.8rem;
    }
    
    .turnover-table th,
    .turnover-table td {
        padding: 8px 4px;
    }
    
    .chart-controls {
        flex-direction: column;
    }
    
    .chart-controls select {
        min-width: auto !important;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1.5rem 1rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .report-card {
        padding: 1rem;
    }
    
    .stock-summary {
        grid-template-columns: 1fr;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 图表工具提示样式 */
.chartjs-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 周转天数分析报表全宽度样式 */
.turnover-report-card {
    grid-column: 1 / -1; /* 占据整个网格宽度 */
    width: 100%;
    max-width: none;
}

/* 表格容器样式 */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-height: 500px;
    overflow-y: auto;
    width: 100%;
}

.turnover-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: auto;
}

/* 表格列宽优化 */
.turnover-table th:nth-child(1), /* 展开按钮 */
.turnover-table td:nth-child(1) {
    width: 3%;
    min-width: 30px;
    text-align: center;
}

.turnover-table th:nth-child(2), /* 货品编号 */
.turnover-table td:nth-child(2) {
    width: 13%;
    min-width: 120px;
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.turnover-table th:nth-child(3), /* 品牌 */
.turnover-table td:nth-child(3) {
    width: 8%;
    min-width: 70px;
}

.turnover-table th:nth-child(4), /* 商品名称 */
.turnover-table td:nth-child(4) {
    width: 18%;
    min-width: 140px;
}

.turnover-table th:nth-child(5), /* 总库存 */
.turnover-table td:nth-child(5) {
    width: 9%;
    min-width: 70px;
    text-align: right;
}

.turnover-table th:nth-child(6), /* 在仓库存 */
.turnover-table td:nth-child(6) {
    width: 9%;
    min-width: 70px;
    text-align: right;
}

.turnover-table th:nth-child(7), /* 在途库存 */
.turnover-table td:nth-child(7) {
    width: 9%;
    min-width: 70px;
    text-align: right;
}

.turnover-table th:nth-child(8), /* 销量 */
.turnover-table td:nth-child(8) {
    width: 8%;
    min-width: 60px;
    text-align: right;
}

.turnover-table th:nth-child(9), /* 日均销量 */
.turnover-table td:nth-child(9) {
    width: 9%;
    min-width: 70px;
    text-align: right;
}

.turnover-table th:nth-child(10), /* 剩余动销天数 */
.turnover-table td:nth-child(10) {
    width: 14%;
    min-width: 120px;
    text-align: right;
    white-space: nowrap;
}

.turnover-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: pointer;
    transition: background 0.3s ease;
}

.turnover-table th:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.turnover-table th.sortable::after {
    content: ' ↕';
    opacity: 0.5;
}

.turnover-table th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}

.turnover-table th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}

.turnover-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #ecf0f1;
    transition: background 0.2s ease;
}

.turnover-table tr:hover {
    background: #f8f9fa;
}

.turnover-table tr:nth-child(even) {
    background: #fafbfc;
}

.turnover-table tr:nth-child(even):hover {
    background: #f0f1f2;
}

/* 商品名称链接美化：去掉默认蓝色和下划线 */
/* 通用商品链接样式 */
a.sku-link {
    color: #2980b9; /* 更改为更清晰的蓝色 */
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
a.sku-link:hover {
    color: #1f618d; /* 悬停时颜色变深 */
    border-bottom-color: #1f618d;
    text-decoration: none;
}
a.sku-link:visited {
    color: #7f8c8d;
}
a.sku-link:focus {
    outline: 2px solid rgba(45, 108, 223, 0.3);
    outline-offset: 2px;
    border-radius: 2px;
}

/* turnover表中商品链接（保持更高优先级选择器，覆盖必要样式） */
.turnover-table a.sku-link {
    color: #2980b9; /* 更改为更清晰的蓝色 */
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.turnover-table a.sku-link:hover {
    color: #1f618d; /* 悬停时颜色变深 */
    border-bottom-color: #1f618d;
    text-decoration: none;
}
.turnover-table a.sku-link:visited {
    color: #7f8c8d; /* 访问后颜色更柔和，不突兀 */
}
.turnover-table a.sku-link:focus {
    outline: 2px solid rgba(45, 108, 223, 0.3);
    outline-offset: 2px;
    border-radius: 2px;
}

.stock-high {
    color: #27ae60;
    font-weight: 600;
}

.stock-medium {
    color: #f39c12;
    font-weight: 600;
}

.stock-low {
    color: #e74c3c;
    font-weight: 600;
}

/* 库存货值分析报表全宽度样式 */
.inventory-value-report-card {
    grid-column: 1 / -1; /* 占据整个网格宽度 */
    width: 100%;
    max-width: none;
}

.inventory-value-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: auto;
}

/* 库存货值表格列宽优化 */
.inventory-value-table th:nth-child(1), /* 展开按钮 */
.inventory-value-table td:nth-child(1) {
    width: 3%;
    min-width: 30px;
    text-align: center;
}

.inventory-value-table th:nth-child(2), /* 货品编号 */
.inventory-value-table td:nth-child(2) {
    width: 15%;
    min-width: 140px;
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inventory-value-table th:nth-child(3), /* 品牌 */
.inventory-value-table td:nth-child(3) {
    width: 10%;
    min-width: 80px;
}

.inventory-value-table th:nth-child(4), /* 商品名称 */
.inventory-value-table td:nth-child(4) {
    width: 30%;
    min-width: 180px;
}

.inventory-value-table th:nth-child(5), /* 当前库存 */
.inventory-value-table td:nth-child(5) {
    width: 12%;
    min-width: 90px;
    text-align: right;
}

.inventory-value-table th:nth-child(6), /* 平均成本 */
.inventory-value-table td:nth-child(6) {
    width: 15%;
    min-width: 100px;
    text-align: right;
}

.inventory-value-table th:nth-child(7), /* 库存货值 */
.inventory-value-table td:nth-child(7) {
    width: 15%;
    min-width: 100px;
    text-align: right;
}

.inventory-value-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: pointer;
    transition: background 0.3s ease;
}

.inventory-value-table th:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.inventory-value-table th.sortable::after {
    content: ' ↕';
    opacity: 0.5;
}

.inventory-value-table th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}

.inventory-value-table th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}

.inventory-value-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #ecf0f1;
    transition: background 0.2s ease;
}

.inventory-value-table tr:hover {
    background: #f8f9fa;
}

.inventory-value-table tr:nth-child(even) {
    background: #fafbfc;
}

.inventory-value-table tr:nth-child(even):hover {
    background: #f0f1f2;
}

/* 库存货值单元格样式 */
.inventory-value-cell {
    color: #27ae60;
    font-weight: 600;
    font-size: 1.05em;
}

/* 库存货值分析移动端优化 */
@media (max-width: 768px) {
    .inventory-value-table {
        font-size: 0.8rem;
    }
    
    .inventory-value-table th,
    .inventory-value-table td {
        padding: 8px 4px;
    }
}

.days-infinite {
    color: #95a5a6;
    font-style: italic;
}

.days-high {
    color: #e74c3c;
    font-weight: 600;
}

.days-medium {
    color: #f39c12;
    font-weight: 600;
}

.days-low {
    color: #27ae60;
    font-weight: 600;
}

.days-alert {
    color: #ffffff;
    background-color: #e74c3c;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    animation: pulse 2s infinite;
}

.days-no-stock {
    color: #95a5a6;
    font-style: italic;
    opacity: 0.7;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.table-summary {
    background: #f8f9fa;
    padding: 15px;
    border-top: 2px solid #3498db;
    font-size: 0.9rem;
    color: #2c3e50;
}

.table-summary strong {
    color: #3498db;
}

/* 周转天数分析 - 行展开功能样式 */
.expandable-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.expandable-row:hover {
    background: #f8f9fa !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.expandable-row.expanded {
    background: #e8f4fd !important;
    border-left: 4px solid #3498db;
}

.expand-indicator {
    display: inline-block;
    transition: transform 0.2s ease;
    margin-left: 8px;
    color: #3498db;
    font-size: 12px;
    font-weight: bold;
}

.expanded .expand-indicator {
    transform: rotate(90deg);
}

.warehouse-detail-row {
    background: #f8f9fa !important;
}

.warehouse-detail-row:hover {
    background: #f8f9fa !important;
}

.warehouse-detail-row td {
    padding: 0 !important;
    border-bottom: none;
}

/* 仓库详情容器 */
.warehouse-detail-container {
    margin: 0;
    padding: 0;
    background: transparent;
}

/* 仓库详情表格 */
.warehouse-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.9rem;
}

.warehouse-detail-table td {
    padding: 8px;
    border-bottom: 1px solid #ecf0f1;
    vertical-align: middle;
}

.warehouse-detail-table tr:hover {
    background-color: #f1f3f4;
}

.warehouse-detail-table .warehouse-row {
    background: #f8f9fa;
    border-left: 3px solid #007bff;
}

/* 仓库类型标识 */
.warehouse-type-badge {
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    display: inline-block;
    min-width: 35px;
}

.warehouse-type-badge.normal-warehouse {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.warehouse-type-badge.defective-warehouse {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 加载和错误状态 */
.loading, .no-data, .error {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.loading {
    color: #3498db;
    font-weight: 600;
}

.error {
    color: #e74c3c;
    font-weight: 600;
}

.no-data {
    color: #95a5a6;
    font-style: italic;
}

/* 为拆分行的最后一行添加下边距，与下一个SKU形成视觉间隔 */
.warehouse-detail-container:last-child {
    margin-bottom: 12px;
}

/* 确保展开行容器有适当的下边距 */
.expandable-row.expanded + tr .warehouse-detail-container {
    margin-bottom: 12px;
}

.warehouse-detail-table tr:last-child {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 8px;
}

/* 库存货值分析 - 仓库明细样式 */
.warehouse-detail {
    margin: 0;
    padding: 0;
}

.warehouse-detail h4 {
    margin: 0 0 10px 0;
    padding: 8px 0;
    font-size: 0.9rem;
    color: #2c3e50;
    border-bottom: 1px solid #ecf0f1;
}

/* 使用表格布局替代网格布局，保持与周转天数分析一致 */
.warehouse-grid {
    display: table;
    width: 100%;
    border-collapse: collapse;
}

.warehouse-item {
    display: table-row;
    border-bottom: 1px solid #ecf0f1;
}

.warehouse-item:hover {
    background-color: #f1f3f4;
}

.warehouse-name,
.warehouse-stock,
.warehouse-cost,
.warehouse-value {
    display: table-cell;
    padding: 8px;
    vertical-align: middle;
    text-align: left;
}

.warehouse-name {
    width: 40%;
    font-weight: 500;
    color: #2c3e50;
    padding-left: 20px;
}

.warehouse-name::before {
    content: "└ ";
    color: #7f8c8d;
}

.warehouse-stock {
    width: 20%;
    text-align: right;
    color: #27ae60;
    font-weight: 600;
}

.warehouse-cost {
    width: 20%;
    text-align: right;
    color: #3498db;
    font-weight: 600;
}

.warehouse-value {
    width: 20%;
    text-align: right;
    color: #e74c3c;
    font-weight: 600;
    font-size: 1.05em;
}

/* 模块权限管理系统将通过JavaScript动态控制报表显示 */
