/* PC端进销存管理样式 */

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #f3f4f6;
}

.tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.tab:hover {
    color: #1a1a1a;
}

.tab.active {
    color: #667eea;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-icon.procurement {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.orders {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-icon.suppliers {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-icon.alerts {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-period {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #10b981;
}

.stat-trend.negative {
    color: #ef4444;
}

.stat-trend.neutral {
    color: #6b7280;
}

.vs-label {
    color: #9ca3af;
    font-weight: 400;
}

/* 订单部分 */
.orders-section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.filter-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-select {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1a1a;
    outline: none;
    cursor: pointer;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-width: 280px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    flex: 1;
}

.table-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead tr {
    border-bottom: 2px solid #f3f4f6;
}

.data-table th {
    text-align: left;
    padding: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
}

.data-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table td {
    padding: 16px 12px;
    font-size: 14px;
    color: #1a1a1a;
}

.order-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #667eea;
}

.supplier-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.supplier-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.warning {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.success {
    background: #d1fae5;
    color: #10b981;
}

.status-badge.info {
    background: #dbeafe;
    color: #2563eb;
}

.status-badge.completed {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-small {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-right: 4px;
}

.btn-small.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-small.btn-outline {
    background: transparent;
    color: #667eea;
    border: 1px solid #667eea;
}

.btn-text {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* 库存监控 */
.inventory-monitor {
    margin-bottom: 32px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.alert-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.alert-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.alert-icon.critical {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.alert-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.alert-info {
    flex: 1;
}

.alert-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.alert-info p {
    font-size: 13px;
    color: #6b7280;
}

.btn-action {
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-action.secondary {
    background: #f3f4f6;
    color: #1a1a1a;
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    align-items: center;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.product-sku {
    font-size: 11px;
    color: #6b7280;
}

.stock-info,
.reorder-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stock-label,
.reorder-label {
    font-size: 11px;
    color: #6b7280;
}

.stock-value {
    font-size: 16px;
    font-weight: 700;
    color: #10b981;
}

.stock-value.critical {
    color: #ef4444;
}

.stock-value.warning {
    color: #f59e0b;
}

.reorder-value {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

/* 库存分布 */
.distribution-section {
    margin-bottom: 32px;
}

.distribution-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.distribution-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.card-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.total-value {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.card-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.card-stats .label {
    font-size: 11px;
    color: #6b7280;
}

.card-stats .value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.card-stats .value.warning {
    color: #f59e0b;
}

.distribution-chart {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-bar {
    flex: 1;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s;
}

.bar-label {
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
}
