/* 以租代购数据平台 - 样式表 */

body {
    background-color: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    padding-top: 70px;
    color: #333;
}

/* 导航栏 */
.navbar-inverse {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.navbar-inverse .navbar-brand {
    color: #fff;
    font-weight: bold;
    font-size: 18px;
}

.navbar-inverse .navbar-brand:hover {
    color: #e94560;
}

.navbar-inverse .navbar-nav > li > a {
    color: rgba(255,255,255,0.8);
    transition: all 0.3s;
}

.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > .active > a {
    color: #fff;
    background-color: rgba(233, 69, 96, 0.3);
    border-radius: 4px;
}

.navbar-inverse .navbar-text {
    color: rgba(255,255,255,0.7);
}

/* 主内容区 */
.main-content {
    padding: 20px 30px;
    min-height: calc(100vh - 140px);
}

/* 统计卡片 */
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 8px 0 0 8px;
}

.stat-card.card-primary::before { background: #e94560; }
.stat-card.card-success::before { background: #00b894; }
.stat-card.card-info::before { background: #0984e3; }
.stat-card.card-warning::before { background: #fdcb6e; }
.stat-card.card-purple::before { background: #6c5ce7; }
.stat-card.card-teal::before { background: #00cec9; }
.stat-card.card-danger::before { background: #e94560; }

.stat-card .stat-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    opacity: 0.1;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #636e72;
}

.stat-card .stat-extra {
    font-size: 12px;
    color: #b2bec3;
    margin-top: 8px;
}

/* 图表容器 */
.chart-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.chart-container .chart-title {
    font-size: 16px;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.chart-container .chart-title i {
    margin-right: 8px;
    color: #e94560;
}

/* 数据表格 */
.data-table-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.data-table-container .table-title {
    font-size: 16px;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* 筛选区域 */
.filter-bar {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filter-bar .form-group {
    margin-bottom: 10px;
}

.filter-bar label {
    font-weight: normal;
    color: #636e72;
    font-size: 13px;
}

.filter-bar .form-control {
    border-radius: 4px;
    border: 1px solid #dfe6e9;
}

.filter-bar .btn-filter {
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 20px;
}

.filter-bar .btn-filter:hover {
    background: #c0392b;
}

.filter-bar .btn-reset {
    background: #dfe6e9;
    color: #636e72;
    border: none;
    border-radius: 4px;
    padding: 6px 20px;
}

/* 表格样式 */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background: #f8f9fa;
    color: #2d3436;
    font-weight: 600;
    font-size: 13px;
    padding: 12px 10px;
    border-bottom: 2px solid #dfe6e9;
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #636e72;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background-color: #f8f9fa;
}

.table-custom tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.status-pending {
    background: #ffeaa7;
    color: #d63031;
}

.status-badge.status-success {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-fail {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.status-processing {
    background: #d1ecf1;
    color: #0c5460;
}

/* 分页 */
.pagination-custom {
    margin: 15px 0;
    text-align: center;
}

.pagination-custom .pagination {
    margin: 0;
}

.pagination-custom .pagination > li > a,
.pagination-custom .pagination > li > span {
    color: #e94560;
    border-color: #dfe6e9;
}

.pagination-custom .pagination > .active > a {
    background-color: #e94560;
    border-color: #e94560;
    color: #fff;
}

/* 页脚 */
.footer {
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    background: #fff;
    margin-top: 20px;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #e94560;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 数据源标签 */
.source-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

.source-tag.source-stock {
    background: #dfe6e9;
    color: #2d3436;
}

.source-tag.source-chrdb {
    background: #e94560;
    color: #fff;
}

/* 响应式 */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
    
    .stat-card .stat-value {
        font-size: 24px;
    }
    
    .stat-card .stat-icon {
        font-size: 36px;
    }
}

/* 可点击单元格 */
.clickable-cell {
    cursor: pointer;
    color: #0984e3;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: underline;
    text-decoration-style: dotted;
}

.clickable-cell:hover {
    background-color: #dfe6e9 !important;
    color: #e94560;
}
