/* 管理后台样式 */

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 10px 20px;
    border-radius: 0;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.sidebar .nav-link.active {
    color: #007bff;
    background-color: #e3f2fd;
    border-left: 3px solid #007bff;
}

.sidebar .nav-link i {
    margin-right: 8px;
}

/* 主要内容区域 */
main {
    margin-top: 56px;
    padding-top: 20px;
}

/* 标签页内容 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 统计卡片 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

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

.card-header {
    background-color: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-weight: bold;
}

/* 状态指示器 */
.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-online {
    background-color: #d4edda;
    color: #155724;
}

.status-offline {
    background-color: #f8d7da;
    color: #721c24;
}

.status-warning {
    background-color: #fff3cd;
    color: #856404;
}

.status-indicator i {
    margin-right: 4px;
}

/* 表格样式 */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.table td {
    vertical-align: middle;
}

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

/* 操作按钮 */
.btn-action {
    padding: 4px 8px;
    font-size: 0.8em;
    margin: 0 2px;
}

/* 搜索过滤区域 */
.filter-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 日志显示 */
#logContent {
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.log-error {
    color: #dc3545;
    font-weight: bold;
}

.log-warning {
    color: #ffc107;
    font-weight: bold;
}

.log-info {
    color: #17a2b8;
}

.log-debug {
    color: #6c757d;
}

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

/* 性能指标 */
.performance-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.performance-metric:last-child {
    border-bottom: none;
}

.metric-label {
    font-weight: 500;
    color: #495057;
}

.metric-value {
    font-weight: bold;
    font-size: 1.1em;
}

.metric-good {
    color: #28a745;
}

.metric-warning {
    color: #ffc107;
}

.metric-danger {
    color: #dc3545;
}

/* 进度条 */
.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    border-radius: 4px;
}

/* 通知重试结果 */
.retry-result {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.retry-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.retry-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.retry-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        height: auto;
        padding: 0;
    }
    
    main {
        margin-top: 0;
    }
    
    .performance-metric {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .metric-value {
        margin-top: 5px;
    }
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.loading .spinner-border {
    margin-bottom: 15px;
}

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

.empty-state i {
    font-size: 3em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 10px;
}

/* 工具提示 */
.tooltip-inner {
    max-width: 300px;
    text-align: left;
}

/* 模态框 */
.modal-content {
    border: none;
    border-radius: 10px;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 10px 10px 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 10px 10px;
}