/* 自定义样式 */
body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.stat-card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card p {
    color: #6c757d;
    font-size: 0.9rem;
}

.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

.table td {
    vertical-align: middle;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading.show {
    display: flex;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background-color: #667eea;
    border-color: #667eea;
}

.btn-primary:hover {
    background-color: #5a6fd8;
    border-color: #5a6fd8;
}

.btn-outline-primary {
    color: #667eea;
    border-color: #667eea;
}

.btn-outline-primary:hover {
    background-color: #667eea;
    border-color: #667eea;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .header {
        padding: 1.5rem 0;
    }
    
    .header h1 {
        font-size: 1.75rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .stat-card.clickable {
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .stat-card.clickable:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .stat-card.active {
        border: 2px solid #667eea;
        background-color: #f8f9ff;
    }
}

.overflow-x-auto {
    padding: 0 15px 10px;
    width: 100%;
    box-sizing: border-box;
}

.row.flex-nowrap {
    width: 100%;
    margin: 0 -5px;
}

.col-6.col-md-3.flex-shrink-0 {
    width: calc(25% - 10px);
    flex: 0 0 calc(25% - 10px);
    padding: 0 5px;
}

@media (max-width: 768px) {
    .col-6.col-md-3.flex-shrink-0 {
        width: calc(50% - 10px);
        flex: 0 0 calc(50% - 10px);
    }
}

/* 确保卡片边框显示正常 */
.stat-card {
    border: 1px solid transparent;
}

.stat-card.active {
    border: 2px solid #667eea !important;
    background-color: #f8f9ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* 统计卡片点击效果 */
.stat-card.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.stat-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card.active {
    border: 2px solid #667eea;
    background-color: #f8f9ff;
}

.stat-card.active i,
.stat-card.active h3,
.stat-card.active p {
    color: #667eea;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 状态颜色 */
.status-authorized {
    color: #198754;
}

.status-unauthorized {
    color: #dc3545;
}

.status-expired {
    color: #fd7e14;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}