.bm-container {
    font-family: 'Roboto', sans-serif;
    color: #333;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.bm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: linear-gradient(120deg, #1e3c72, #2a5298);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

.bm-title {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.bm-stats {
    display: flex;
    gap: 20px;
}

.bm-stat-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    contain: layout style;
}

.bm-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.14);
}

.bm-stat-item i {
    font-size: 24px;
    color: #3498db;
    margin-right: 15px;
}

.bm-stat-content {
    display: flex;
    flex-direction: column;
}

.bm-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
}

.bm-stat-label {
    font-size: 14px;
    color: #bdc3c7;
}

.bm-add-box-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bm-add-box-btn:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

.bm-filters {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.bm-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    flex: 1;
    width: 100%; /* 确保过滤组占满整行 */
}

.bm-filter-item {
    flex: 1 1 calc(33.33% - 15px); /* 使用 calc 来计算宽度，考虑间隙 */
    min-width: 200px;
    max-width: calc(33.33% - 15px);
}

.bm-filter-label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
}

.bm-filter-select, .bm-search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background-color: #fff;
    color: #495057;
    font-size: 14px;
    transition: all 0.3s ease;
}

.bm-filter-select:focus, .bm-search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.25);
}

.bm-bulk-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.bm-bulk-btn {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bm-bulk-btn:hover {
    background-color: #0056b3;
}

.bm-table-container {
    overflow-x: auto;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    contain: layout style;
}

.bm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.bm-table th, .bm-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.bm-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bm-table tr:hover {
    background-color: #f1f3f5;
}

.bm-status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.bm-status-online {
    background-color: #28a745;
}

.bm-status-offline {
    background-color: #dc3545;
}

.bm-action-btn {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 12px;
    margin-right: 5px;
}

.bm-action-btn:hover {
    background-color: #0056b3;
}


.bm-page-info {
    font-size: 14px;
    color: #bdc3c7;
}

.bm-page-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px; /* 在小屏幕上给顶部一些间距 */
}

.bm-page-btn {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap; /* 防止文字换行 */
    min-width: 80px; /* 确保按钮有足够的宽度 */
    text-align: center;
}

.bm-page-btn:hover {
    background-color: #0056b3;
}

.bm-page-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.bm-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.bm-modal-content {
    background-color: #fff;
    margin:1% auto auto auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    height:88%;
    max-width: 1234px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.bm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0 15px;
}

.bm-modal-title {
    font-size: 21px;
    font-weight: bold;
    color: #495057;
}

.bm-modal-close {
    font-size: 28px;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.3s ease;
}

.bm-modal-close:hover {
    color: #e74c3c;
}

.bm-modal-body {
    height: 66vh;
    margin-bottom: 20px;
}

.bm-modal-footer {
    text-align: right;
}

.bm-modal-btn {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bm-modal-btn:hover {
    background-color: #0056b3;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
    .bm-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .bm-stats {
        margin-top: 20px;
        width: 100%;
    }

    .bm-add-box-btn {
        margin-top: 20px;
        width: 100%;
    }

    .bm-filters {
        flex-direction: column;
    }

    .bm-filter-group {
        width: 100%;
    }

    .bm-bulk-actions {
        flex-direction: column;
    }

    .bm-bulk-btn {
        width: 100%;
    }

    .bm-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .bm-page-controls {
        width: 100%;
        justify-content: space-between;
    }

    .bm-page-btn, #bm-page-size {
        flex: 1;
    }
}

/* 修复搜索框右侧超出问题 */
.bm-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    flex: 1;
    width: 100%; /* 确保过滤组占满整行 */
}

.bm-filter-item {
    flex: 1 1 calc(33.33% - 15px); /* 使用 calc 来计算宽度，考虑间隙 */
    min-width: 200px;
    max-width: calc(33.33% - 15px);
}

/* 增大列表的选择框 */
.bm-table input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* 为复选框添加一些额外的样式，使其更易于点击 */
.bm-table th:first-child,
.bm-table td:first-child {
    width: 40px; /* 增加列宽 */
    text-align: center;
}

.bm-table input[type="checkbox"] {
    margin: 0;
    vertical-align: middle;
}

/* 确保分页按钮文字不会换行 */
.bm-page-btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 100px; /* 增加最小宽度 */
}

/* 调整分页控件在小屏幕上的布局 */
@media (max-width: 768px) {
    .bm-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .bm-page-controls {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .bm-page-btn, #bm-page-size {
        flex: 1 1 auto;
        margin: 5px;
    }
}

/* 在文件末尾添加以下样式 */

#bm-filter-tab{
    margin-top:5px;
    height:100%;
}

.bm-box-list {
    max-height: 40vh;
    overflow-y: auto;
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    padding: 10px;
    border-radius: 5px;
}

.bm-box-item {
    margin-bottom: 10px;
}

.bm-box-item label {
    margin-left: 5px;
    cursor: pointer;
}

.bm-filter-select[multiple] {
    height: 100px;
}











.filters {
    margin-bottom: 20px;
}

.filters label {
    margin-right: 10px;
}


.bm-modal-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #f5f5f5;
}
.bm-tab-switcher {
    display: flex;
}
.bm-tab-btn {
    padding: 5px 10px;
    border: none;
    background-color: #e0e0e0;
    cursor: pointer;
}
.bm-tab-btn.active {
    background-color: #007bff;
    color: white;
}
.bm-tab-content {
    display: none;
}
.bm-tab-content.active {
    display: block;
}
.bm-box-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}
.bm-box-item label {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-left: 10px;
}
.bm-box-idleStatus {
    padding: 2px 5px;
    border-radius: 3px;
    color: white;
}
.bm-box-idleStatus.green { background-color: #28a745; }
.bm-box-idleStatus.yellow { background-color: #ffc107; }
.bm-box-idleStatus.red { background-color: #dc3545; }



.bm-box-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.bm-box-table th,
.bm-box-table td {
    padding: 12px;
    text-align: left;
}

.bm-box-table th {
    font-weight: bold;
    color: #666;
}

.bm-box-table td {
    background-color: #f9f9f9;
}

.bm-status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.bm-status-dot.green { background-color: #4CAF50; }
.bm-status-dot.yellow { background-color: #FFC107; }
.bm-status-dot.red { background-color: #F44336; }

.bm-box-checkbox {
    width: 18px;
    height: 18px;
}


.bm-box-row {
    cursor: pointer;
}

.bm-box-row.selected {
    background-color: #e6f7ff;
}

.bm-remove-box {
    background-color: #ff4d4f;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}

.bm-remove-box:hover {
    background-color: #ff7875;
}

.bm-selected-box-list {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.bm-selected-box-item {
    display: table-row;
    background-color: #f9f9f9;
}

.bm-selected-box-item > * {
    display: table-cell;
    padding: 12px;
    vertical-align: middle;
}

.bm-selected-box-info {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
}

.bm-selected-box-info span {
    white-space: nowrap;
}

.bm-remove-box {
    background-color: #ff4d4f;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    white-space: nowrap;
}

.bm-remove-box:hover {
    background-color: #ff7875;
}

.bm-box-idleStatus {
    padding: 2px 5px;
    border-radius: 3px;
    color: white;
}

.bm-box-idleStatus.green { background-color: #28a745; }
.bm-box-idleStatus.yellow { background-color: #ffc107; }
.bm-box-idleStatus.red { background-color: #dc3545; }



.bm-server-selection {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.bm-server-selection label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#bm-server-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}










/* Select All checkbox */
.bm-box-list-header {
    margin-top:10px;
    padding: 10px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.bm-box-list-header label {
    display: flex;
    align-items: center;
    font-weight: bold;
}

.bm-box-list-header input[type="checkbox"] {
    margin-right: 5px;
}

/* Pagination */
.bm-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
}

.bm-pagination button {
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.bm-pagination button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#bm-page-info {
    font-size: 14px;
}

#bm-items-per-page {
    padding: 5px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

/* Box list table */
.bm-box-table {
    width: 100%;
    border-collapse: collapse;
}

.bm-box-table th,
.bm-box-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.bm-box-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.bm-box-table tr:hover {
    background-color: #f9f9f9;
}

.bm-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.bm-status-dot.green {
    background-color: #28a745;
}

.bm-status-dot.yellow {
    background-color: #ffc107;
}

.bm-status-dot.red {
    background-color: #dc3545;
}
