body {
    background-color: #f8f9fa;
}

.navbar {
    margin-bottom: 20px;
}

/* 导航栏样式 */
.navbar-nav {
    margin-left: 3rem;  /* 增加导航栏与标题的距离 */
}

.nav-link {
    position: relative;
    padding: 0.5rem 1.5rem;  /* 增加导航项之间的间距 */
    margin: 0 0.5rem;  /* 添加外边距 */
}

/* 导航项悬停效果 */
.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background-color: #fff;
}

/* 内容区域样式 */
#content-area {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.table th {
    background-color: #f8f9fa;
}

/* 状态标签样式 */
.status-scheduled {
    color: #0d6efd;
}

.status-in-progress {
    color: #ffc107;
}

.status-completed {
    color: #198754;
}

.status-cancelled {
    color: #dc3545;
}

/* 模态框样式 */
.modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 60px);  /* 减去一些空间以确保不会太贴近顶部和底部 */
}

.modal-content {
    width: 100%;
    max-height: 90vh;  /* 最大高度为视口高度的90% */
    overflow-y: auto;  /* 如果内容太多，允许滚动 */
}

/* 确保模态框在小屏幕上也有良好的显示效果 */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* 增加容器最大宽度 */
.container {
    max-width: 1600px !important;
}

/* 调整表格样式 */
.table {
    font-size: 0.9rem;
}

.table td, .table th {
    padding: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* 添加工具提示效果 */
.table td {
    position: relative;
}

.table td:hover::after {
    content: attr(title);
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 1000;
    background: #333;
    color: white;
    padding: 5px;
    border-radius: 3px;
    white-space: normal;
    max-width: 300px;
    display: none;
}

.table td[title]:hover::after {
    display: block;
}

/* 调整按钮组样式 */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* 序列详情表格样式 */
.series-container {
    padding: 10px 20px;
    background-color: #f8f9fa;
}

.series-detail-table {
    width: auto !important;
    min-width: 560px;
    max-width: 800px;
    margin: 0 !important;
    background-color: white;
}

.series-detail-table th {
    background-color: #e9ecef;
    font-size: 14px;
    padding: 8px;
    white-space: nowrap;
}

.series-detail-table td {
    font-size: 14px;
    padding: 6px 8px;
}

/* 让序列描述可以自动换行 */
.series-detail-table td:nth-child(3) {
    white-space: normal;
    word-break: break-word;
}

/* 可点击行样式 */
.table tr[data-study-uid] {
    cursor: pointer;
}

/* 可点击行悬停效果 */
.table tr[data-study-uid]:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

        .drop-zone {
            min-height: 150px;
            border: 2px dashed #dee2e6;
            transition: all 0.3s ease;
            background-color: #f8f9fa;
        }
        
        .drop-zone.border-primary {
            border-color: #0d6efd;
            background-color: #f8f9fa;
        }
        
        .drop-zone i {
            font-size: 2rem;
            color: #6c757d;
            margin-bottom: 0.5rem;
        }
        
        .drop-zone p {
            color: #6c757d;
        }
        
        #selectedFiles {
            max-height: 400px;
            overflow-y: auto;
        }
        
        /* 服务状态样式 */
        .service-status-group {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            grid-gap: 2px;
            background: rgba(33, 37, 41, 0.1);
            padding: 3px;
            min-width: 200px;
        }
        
        .service-status {
            display: flex;
            align-items: center;
            gap: 3px;
            padding: 1px 3px;
            background: transparent;
            height: 22px;
        }
        
        .service-name {
            color: rgba(173, 181, 189, 0.8);
            font-size: 0.75rem;
            min-width: 52px;
            text-align: right;
            line-height: 1;
        }
        
        .service-status .badge {
            font-size: 0.7rem;
            padding: 0.15em 0.4em;
            font-weight: normal;
            min-width: 45px;
            text-align: center;
            background-color: rgba(33, 37, 41, 0.3);
            line-height: 1.2;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 18px;
        }
        
        .service-status .badge.bg-success {
            background-color: rgba(25, 135, 84, 0.7) !important;
        }
        
        .service-status .badge.bg-danger {
            background-color: rgba(220, 53, 69, 0.7) !important;
        }
        
        .service-status .badge.bg-warning {
            background-color: rgba(255, 193, 7, 0.7) !important;
            color: #000;
        }
        
        .service-status .badge.bg-secondary {
            background-color: rgba(108, 117, 125, 0.7) !important;
        }

/* 重启按钮样式 */
.service-restart-btn {
    background: rgba(33, 37, 41, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    padding: 3px 10px;
    font-size: 0.85rem;
    margin-left: 8px;
    transition: all 0.2s;
    height: 30px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    border-radius: 3px;
    letter-spacing: 1px;
}

.service-restart-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

        .service-restart-btn:active {
            background: rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 255, 255, 0.4);
        }

        .service-restart-btn i {
            font-size: 0.95rem;
            margin-right: 4px;
        }

        /* 刷新按钮旋转动画 */
        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .refresh-spin {
            animation: spin 1s linear;
        }

/* 系统状态样式 */
.system-status-group {
    font-size: 0.85rem;
}

        .status-item {
            padding: 0px 8px;
            min-width: 90px;
            text-align: right;
            color: rgba(255, 255, 255, 0.9);
            background: none;
            border: none;
            box-shadow: none;
        }

        .status-item.mb-1 {
            margin-bottom: 0px !important;
        }

        .status-item i {
            margin-right: 4px;
            font-size: 0.9rem;
            float: left;
            color: rgba(255, 255, 255, 0.9);
        }
    .page {
        opacity: 1;
        transition: opacity 0.2s ease-in-out;
    }
    
    /* 预加载状态样式 */
    .page.loading {
        position: relative;
    }
    
    .page.loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.8);
        display: flex;
        align-items: center;
        justify-content: center;
    }
     /* 配置编辑器样式 */
     #configEditor {
        background-color: #1e1e1e;
        color: #d4d4d4;
        font-family: Consolas, Monaco, "Courier New", monospace;
        font-size: 14px;
        line-height: 1.5;
        padding: 12px;
        border: 1px solid #2d2d2d;
        border-radius: 4px;
        width: 100%;
        height: 500px;
        resize: vertical;
        outline: none;
    }

    #configEditor:focus {
        border-color: #0078d4;
        box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
    }

    /* 滚动条样式 */
    #configEditor::-webkit-scrollbar {
        width: 12px;
        height: 12px;
    }

    #configEditor::-webkit-scrollbar-track {
        background: #1e1e1e;
    }

    #configEditor::-webkit-scrollbar-thumb {
        background-color: #424242;
        border-radius: 6px;
        border: 3px solid #1e1e1e;
    }

/* 状态颜色样式 */
.status-item.cpu-normal { color: #98ff98; }
.status-item.cpu-warning { color: #ffeb99; }
.status-item.cpu-danger { color: #ffb3b3; }

.status-item.memory-normal { color: #98ff98; }
.status-item.memory-warning { color: #ffeb99; }
.status-item.memory-danger { color: #ffb3b3; }

/* 页面切换相关样式 */
#worklist-page, #images-page, #settings-page, #qr-page, #store-page, #logs-page, #print-page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#worklist-page.show, #images-page.show, #settings-page.show, #qr-page.show, #store-page.show, #logs-page.show, #print-page.show {
    opacity: 1;
}

/* 加载遮罩 */
#loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

#loading-mask.hide {
    opacity: 0;
    pointer-events: none;
}