/* 巡检数据监控样式 */
.inspection-data-monitoring {
    width: 100%;
    height: 100%; /* 改为100%填充父容器 */
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 5px;
    box-sizing: border-box;
}

/* 巡检区块样式 */
.inspection-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 10px;
    position: relative;
    overflow: hidden;
    min-height: fit-content;
}

.inspection-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 216, 255, 0.8), transparent);
    animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 今日值班长区域 */
.duty-leader-section {
    height: auto;
    min-height: fit-content;
}

/* 巡检任务统计区域 */
.task-statistics-section {
    height: auto;
    min-height: fit-content;
}

/* 任务列表区域 */
.task-list-section {
    flex: 1;
    height: auto; /* 改为自适应高度 */
    min-height: 200px; /* 增加最小高度以容纳380px内容容器和标题 */
    max-height: 450px; /* 增加最大高度限制，确保完整显示内容 */
    overflow: hidden; /* 保持隐藏溢出，让内容容器处理滚动 */
    display: flex;
    flex-direction: column;
}

/* 任务列表区域的内容容器特殊处理 */
.inspection-section.task-list-section > .section-content {
    flex: 1; /* 使用flex填充剩余空间 */
    height: auto; /* 改为自适应高度 */
    min-height: unset; /* 重置最小高度 */
    display: flex; /* 使用flex布局 */
    flex-direction: column; /* 垂直排列 */
    width: 100%; /* 确保宽度100% */
    max-height: calc(100% - 4px); /* 调整标题高度计算，确保380px内容完整显示 */
    padding-bottom: 10px; /* 增加底部padding，提供更好的视觉间距 */
}

/* 标题样式 */
.inspection-section .section-title {
    font-size: 14px;
    font-weight: bold;
    color: #00d8ff;
    margin-bottom: 8px; /* 减小底部margin */
    padding-bottom: 8px; /* 减小底部padding */
    border-bottom: 2px solid rgba(0, 216, 255, 0.3);
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 216, 255, 0.5);
}

/* 内容区域 */
.inspection-section .section-content {
    flex: 1; /* 使用flex填充剩余空间 */
    height: auto; /* 改为自适应高度 */
    min-height: unset; /* 移除最小高度限制 */
    display: flex;
    flex-direction: column;
    width: 100%; /* 确保宽度100% */
}

/* 值班长区域的内容容器 */
.inspection-section.duty-leader-section > .section-content {
    height: auto;
    min-height: fit-content;
    flex: unset; /* 重置flex属性 */
    display: block; /* 使用块级布局 */
}

/* 统计区域的内容容器 */
.inspection-section.task-statistics-section > .section-content {
    height: auto;
    min-height: fit-content;
    flex: unset; /* 重置flex属性 */
    display: block; /* 使用块级布局 */
}

/* 值班人员网格 */
.duty-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    height: auto;
}

.duty-item {
    background: rgba(0, 30, 60, 0.5);
    border: 1px solid rgba(0, 216, 255, 0.2);
    border-radius: 4px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all 0.3s ease;
    height: auto;
    min-height: fit-content;
}

.duty-item:hover {
    border-color: rgba(0, 216, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 216, 255, 0.3);
    transform: translateY(-2px);
}

.duty-position {
    font-size: 11px;
    color: #aaa;
    font-weight: 400;
}

.duty-name {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

/* DQ值班项特殊样式 - 占两列 */
.duty-item-dq {
    grid-column: span 2;
    text-align: center;
}

/* 统计汇总 */
.statistics-summary {
    display: flex;
    justify-content: space-around;
    padding: 12px;
    background: rgba(0, 50, 100, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(0, 216, 255, 0.2);
    height: auto;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 30px;
    font-weight: bold;
    font-family: 'DS-Digital', Arial, sans-serif;
}

.stat-value.total {
    color: #00d8ff;
    text-shadow: 0 0 10px rgba(0, 216, 255, 0.8);
}

.stat-value.completed {
    color: #52c41a;
    text-shadow: 0 0 10px rgba(82, 196, 26, 0.8);
}

.stat-value.pending {
    color: #faad14;
    text-shadow: 0 0 10px rgba(250, 173, 20, 0.8);
}

/* 任务列表容器 */
.task-list-container {
    flex: 1; /* 使用flex填充剩余空间 */
    height: auto; /* 改为自适应高度 */
    min-height: 150px; /* 设置最小高度 */
    max-height: 380px; /* 调整为380px高度，完整显示更多任务数据 */
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 0; /* 移除底部margin */
}

/* 自定义滚动条 */
.task-list-container::-webkit-scrollbar {
    width: 6px;
}

.task-list-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.task-list-container::-webkit-scrollbar-thumb {
    background: rgba(0, 216, 255, 0.3);
    border-radius: 3px;
}

.task-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 216, 255, 0.5);
}

/* 任务项 */
.task-item {
    background: rgba(0, 30, 60, 0.5);
    border: 1px solid rgba(0, 216, 255, 0.2);
    border-radius: 4px;
    padding: 8px; /* 减小padding */
    margin-bottom: 6px; /* 减小任务项间距 */
    transition: all 0.3s ease;
}

.task-item:hover {
    border-color: rgba(0, 216, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 216, 255, 0.3);
    transform: translateX(3px);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px; /* 减小底部margin */
}

.task-name {
    font-size: 13px;
    color: #fff;
    font-weight: 500;
    flex: 1;
}

.task-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 500;
}

.task-status.pending {
    background: rgba(250, 173, 20, 0.2);
    color: #faad14;
    border: 1px solid rgba(250, 173, 20, 0.4);
}

.task-status.completed {
    background: rgba(82, 196, 26, 0.2);
    color: #52c41a;
    border: 1px solid rgba(82, 196, 26, 0.4);
}

.task-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #aaa;
}

.task-time {
    color: #00d8ff;
}

.task-person {
    color: #aaa;
}

/* 响应式调整 */
@media (max-width: 1600px) {
    .duty-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .duty-item {
        padding: 6px 8px;
    }
    
    .duty-position {
        font-size: 10px;
    }
    
    .duty-name {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .task-name {
        font-size: 12px;
    }
}

/* 更小屏幕的响应式调整 */
@media (max-width: 1200px) {
    .duty-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
    
    .duty-item {
        padding: 4px 6px;
    }
    
    .duty-position {
        font-size: 9px;
    }
    
    .duty-name {
        font-size: 11px;
    }
    
    /* 小屏幕上DQ项仍然占两列 */
    .duty-item-dq {
        grid-column: span 2;
    }
}

@keyframes numberRoll {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.number-roll {
    animation: numberRoll 0.5s ease-out;
}

