/* 基础样式 */
body {
    padding-bottom: 20px;
}

/* 页面切换 */
.page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 1;
}

/* 库存页面样式 */
#inventory-page {
    padding: 15px;
    position: relative;
    z-index: 1;
}

/* 卡片样式 */
.card {
    background: white;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    position: relative;
    z-index: 3;
    padding: 1rem;
}

.card-body {
    padding: 1rem;
    display: block !important;
    visibility: visible !important;
}

/* 统计卡片样式 */
.stats-card {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.stats-number {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

.stats-label {
    color: #6c757d;
    margin-top: 0.5rem;
}

/* 库存列表样式 */
#current-stock-list {
    min-height: 50px;
    position: relative;
    z-index: 4;
    background: white;
}

#current-stock-list .alert,
#history-stock-result .alert {
    margin-bottom: 8px;
    opacity: 1 !important;
    transition: all 0.3s ease;
}

#current-stock-list .alert:hover,
#history-stock-result .alert:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 警告框样式 */
.alert {
    position: relative;
    z-index: 5;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 10px 15px;
}

/* 按钮样式 */
.btn:disabled {
    cursor: not-allowed;
}

.btn-group {
    margin-bottom: 1rem;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* 加载动画 */
.spinner-border {
    margin-right: 0.5rem;
}

/* 表格样式 */
.table-responsive {
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 图表容器 */
.chart-container {
    position: relative;
    height: 300px;
}

/* 实时记录列表 */
#live-records {
    max-height: 500px;
    overflow-y: auto;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .col-md-6 {
        padding-left: 10px;
        padding-right: 10px;
    }

    .stats-card {
        margin-bottom: 15px;
    }
}
