/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fb;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.footer {
    margin-top: auto;
}

/* 仪表盘卡片 */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.navbar-brand {
    font-weight: bold;
}

.nav-item .nav-link {
    padding: 0.5rem 1rem;
}

/* 表格样式 */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* 表单样式 */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 500;
}

/* 按钮样式 */
.btn {
    border-radius: 0.25rem;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* 数据展示页面 */
.data-container {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.data-header {
    margin-bottom: 1.5rem;
}

.data-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.data-subtitle {
    font-size: 1rem;
    color: #6c757d;
}

/* 分页样式 */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: #0d6efd;
}

.page-link:hover {
    color: #0a58ca;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.25rem solid #f3f3f3;
    border-top: 0.25rem solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 主题管理页面样式 */
.topic-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
}

.topic-active {
    background-color: #28a745;
    color: white;
}

.topic-inactive {
    background-color: #dc3545;
    color: white;
}

/* 设备管理页面样式 */
.device-card {
    transition: transform 0.2s;
}

.device-card:hover {
    transform: translateY(-5px);
}

.device-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.device-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-online {
    background-color: #28a745;
}

.status-offline {
    background-color: #dc3545;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .card-title {
        font-size: 1.1rem;
    }
    
    .data-title {
        font-size: 1.2rem;
    }
    
    .data-subtitle {
        font-size: 0.9rem;
    }
} 