/* 库存管理页面样式 */

/* 库存概览卡片 */
.inventory-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.overview-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.overview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s ease;
}

.card-icon.total {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    color: #00acc1;
}

.card-icon.warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #ffa000;
}

.card-icon.inbound {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #43a047;
}

.card-icon.outbound {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #e53935;
}

.card-info h3 {
    margin: 0;
    font-size: 16px;
    color: #5f6368;
    font-weight: 500;
}

.card-info .amount {
    margin: 10px 0 5px;
    font-size: 28px;
    font-weight: 700;
    color: #202124;
    letter-spacing: -0.5px;
}

.card-info .unit {
    font-size: 14px;
    color: #80868b;
    margin-left: 4px;
}

/* 库存管理区域 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f3f4;
}

.section-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #202124;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2::before {
    content: '';
    display: block;
    width: 4px;
    height: 20px;
    background: #3498db;
    border-radius: 2px;
}

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

.search-box {
    position: relative;
    width: 280px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #80868b;
    font-size: 16px;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background-color: #f8f9fa;
}

.search-box input:hover {
    border-color: #3498db;
    background-color: #fff;
}

.search-box input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
    background-color: #fff;
}

.warehouse-select {
    padding: 10px 14px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
    color: #202124;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 150px;
}

.warehouse-select:hover {
    border-color: #3498db;
    background-color: #fff;
}

.warehouse-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
    background-color: #fff;
}

/* 表格样式 */
.inventory-table {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #f1f3f4;
}

.inventory-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.inventory-table th,
.inventory-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f1f3f4;
}

.inventory-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #5f6368;
    position: sticky;
    top: 0;
    z-index: 10;
}

.inventory-table th:first-child {
    border-top-left-radius: 8px;
}

.inventory-table th:last-child {
    border-top-right-radius: 8px;
}

.inventory-table tr:hover td {
    background: #f8f9fa;
}

.inventory-table tr:last-child td {
    border-bottom: none;
}

.inventory-table tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.inventory-table tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

.inventory-table td {
    color: #5f6368;
}

/* 状态标签 */
.status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

.status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status.normal {
    background: #e8f5e9;
    color: #43a047;
}

.status.normal::before {
    background: #43a047;
}

.status.warning {
    background: #fff8e1;
    color: #ffa000;
}

.status.warning::before {
    background: #ffa000;
}

.status.success {
    background: #e8f5e9;
    color: #43a047;
}

.status.success::before {
    background: #43a047;
}

.status.pending {
    background: #e3f2fd;
    color: #1976d2;
}

.status.pending::before {
    background: #1976d2;
}

/* 按钮样式 */
.btn {
    padding: 10px 16px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: #f8f9fa;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.btn i {
    font-size: 16px;
}

.btn:hover {
    background-color: #f1f3f4;
    border-color: #dadce0;
    color: #202124;
}

.btn.primary {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
}

.btn.primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    box-shadow: 0 2px 6px rgba(41, 128, 185, 0.3);
}

.btn.danger {
    background-color: #e53935;
    border-color: #e53935;
    color: white;
}

.btn.danger:hover {
    background-color: #d32f2f;
    border-color: #d32f2f;
    box-shadow: 0 2px 6px rgba(211, 47, 47, 0.3);
}

.btn.small {
    padding: 6px 12px;
    font-size: 13px;
}

/* 入库列表和出库列表 */
.inbound-list, .outbound-list, .transfer-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.record-card {
    padding: 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #f1f3f4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.record-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-color: #dadce0;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f3f4;
}

.record-title {
    font-weight: 600;
    color: #202124;
    font-size: 15px;
}

.record-status {
    font-size: 13px;
}

.record-content {
    margin-bottom: 12px;
}

.record-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.record-label {
    color: #5f6368;
}

.record-value {
    color: #202124;
    font-weight: 500;
}

.record-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #f1f3f4;
}

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

.modal.active {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: all 0.3s;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modal.active .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #202124;
}

.close-btn {
    border: none;
    background: none;
    padding: 8px;
    cursor: pointer;
    color: #5f6368;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #f1f3f4;
    color: #202124;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #f1f3f4;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
    color: #202124;
    background: #f8f9fa;
    transition: all 0.3s;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #3498db;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
    background: #fff;
}

.upload-area {
    border: 2px dashed #dadce0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.upload-area:hover {
    border-color: #3498db;
    background: #fff;
}

.upload-area i {
    font-size: 48px;
    color: #3498db;
    margin-bottom: 16px;
}

.upload-area p {
    margin: 8px 0;
    color: #5f6368;
}

.upload-tip {
    font-size: 13px;
    color: #80868b;
    margin-top: 8px;
}

.template-download {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    gap: 8px;
    color: #3498db;
    font-size: 14px;
}

.template-download a {
    color: inherit;
    text-decoration: none;
}

.template-download a:hover {
    text-decoration: underline;
}

/* 响应式样式 */
@media screen and (max-width: 768px) {
    .overview-cards {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
    }

    .search-box {
        width: 100%;
    }
    
    .warehouse-select {
        width: 100%;
    }

    .modal-content {
        max-width: 95%;
        max-height: 80vh;
    }
    
    .inbound-list, .outbound-list, .transfer-list {
        grid-template-columns: 1fr;
    }
} 