/* 全局样式 */
body {
    font-family: 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', Arial, sans-serif;
    color: #333;
    background-color: #f8f9fa;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    height: 100vh;
    z-index: 100;
    padding: 0;
}

.sidebar .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 主内容区域样式 */
.main-content {
    margin-left: 16.66666667%;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background-color: #fff;
    font-weight: 500;
    padding: 1rem 1.5rem;
}

/* 表格样式 */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table td, .table th {
    padding: 0.75rem;
    vertical-align: middle;
}

/* 表格响应式滚动样式 */
.table-responsive {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 300px); /* 设置最大高度，确保可以滚动 */
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-on {
    background-color: #28a745;
}

.status-off {
    background-color: #dc3545;
}

.status-warning {
    background-color: #ffc107;
}

/* 分页导航 */
.page-item.active .page-link {
    background-color: #343a40;
    border-color: #343a40;
}

.page-link {
    color: #343a40;
}

/* 表单样式 */
.form-label {
    font-weight: 500;
}

.form-control:focus {
    border-color: #6c757d;
    box-shadow: 0 0 0 0.25rem rgba(108, 117, 125, 0.25);
}

/* 按钮样式 */
.btn-primary {
    background-color: #4285f4;
    border-color: #4285f4;
}

.btn-primary:hover {
    background-color: #3b78e7;
    border-color: #3b78e7;
}

.btn-outline-primary {
    color: #343a40;
    border-color: #343a40;
}

.btn-outline-primary:hover {
    background-color: #343a40;
    border-color: #343a40;
}

/* 数据卡片 */
.card.bg-primary {
    background-color: #4285f4 !important;
}

.card.bg-success {
    background-color: #34a853 !important;
}

.card.bg-danger {
    background-color: #ea4335 !important;
}

/* 徽章样式 */
.badge {
    padding: 0.4em 0.6em;
    font-weight: 500;
    border-radius: 4px;
}

/* 标题样式 */
.page-header h2 {
    font-weight: 500;
    color: #333;
    margin-bottom: 1rem;
}

/* 列表样式 */
.list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.75rem 1.5rem;
}

.list-group-item:first-child {
    border-top: none;
}

/* 加载动画 */
.loading-spinner {
    width: 3rem;
    height: 3rem;
    border-width: 0.25rem;
}

/* 布局调整 */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* 自定义响应式调整 */
@media (min-width: 992px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl {
        max-width: 1320px;
    }
}

/* 电量和信号强度指示器 */
.progress.battery .progress-bar {
    background-color: #28a745;
}

.progress.signal .progress-bar {
    background-color: #17a2b8;
}

/* 搜索框样式 */
.search-container {
    position: relative;
}

.search-container .bi-search {
    position: absolute;
    left: 10px;
    top: 10px;
    color: #6c757d;
}

.search-input {
    padding-left: 35px;
}

/* 过滤器样式 */
.filter-section {
    background-color: #fff;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 卡片操作按钮样式 */
.action-buttons .btn {
    margin-right: 5px;
}

.action-buttons .btn:last-child {
    margin-right: 0;
}

/* 提示信息样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.toast {
    width: 350px;
}

/* 详情模态框 */
.modal-details dl {
    margin-bottom: 0;
}

.modal-details dt {
    font-weight: 600;
}

.modal-details dd {
    margin-bottom: 10px;
}

/* 无数据占位符 */
.no-data {
    text-align: center;
    padding: 50px 0;
    color: #6c757d;
}

.no-data i {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Add additional CSS for nested sidebar menus */
.sidebar-nav .nav-link.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.5em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    transition: transform 0.2s ease-in-out;
}

.sidebar-nav .nav-link.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.sidebar-nav .collapse {
    transition: all 0.2s ease;
}

.sidebar-nav .nav-item .nav-item .nav-link {
    padding-left: 0.5rem;
    font-size: 0.9rem;
}

.sidebar-nav .nav-item .nav-item .nav-icon {
    font-size: 0.9rem;
    width: 1.5rem;
    text-align: center;
}

.sidebar-nav .ms-4 {
    margin-left: 1rem !important;
}

/* Properly show active submenu items */
.sidebar-nav .nav-item .collapse .nav-link.active {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

/* Add hover effects for stat cards */
.card a .stat-card {
    transition: all 0.3s ease;
    cursor: pointer;
}
.card a:hover .stat-card {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.card a .stat-icon {
    transition: all 0.3s ease;
}
.card a:hover .stat-icon {
    transform: scale(1.1);
} 