/* 6列宽表格概览界面样式 - 修正版 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.overview-container {
    position: fixed;     /* 🔧 新增：固定定位 */
    top: 0;             /* 🔧 新增：顶部对齐 */
    left: 0;            /* 🔧 新增：左侧对齐 */
    width: 100vw;
    height: 100vh;
    background: white;
    font-family: "Microsoft YaHei", "宋体", Arial, sans-serif;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    z-index: 1000;      /* 🔧 新增：确保在最上层 */
}

/* 概览包装器 */
.overview-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 防止整体滚动，让内容区域独立滚动 */
}

/* 页面标题 */
.overview-header {
    text-align: center;
    padding: 0 !important;
    margin-bottom: 0;
    border-bottom: none;
    background: #f8f9fa;
}

.overview-header h1 {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin: 5px 0;
}

/* 主要内容区域 */
.overview-content {
    flex: 1;
    padding: 0 5px;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* 6列表格 */
.overview-table {
    width: 120%; /* 增加宽度 */
    max-width: 1500px;
    border-collapse: collapse;
    border: 2px solid #333;
    font-size: 9px;
    table-layout: fixed; /* 固定表格布局 */
}

/* 设置6列的宽度分配 */
.overview-table col:nth-child(1) { width: 12%; } /* section-label */
.overview-table col:nth-child(2) { width: 18%; } /* 标签列 */
.overview-table col:nth-child(3) { width: 18%; } /* 输入列 */
.overview-table col:nth-child(4) { width: 18%; } /* 标签列 */
.overview-table col:nth-child(5) { width: 17%; } /* 输入列 */
.overview-table col:nth-child(6) { width: 17%; } /* 输入列 */

.overview-table td {
    border: 1px solid #333;
    padding: 2px 3px;
    vertical-align: middle;
    height: 22px;
    line-height: 1.2;
}

/* 左侧章节标签 - 关键样式 */
.section-label {
    background: #d1ecf1 !important;
    color: #0c5460 !important;
    font-weight: bold !important;
    text-align: center !important;
    writing-mode: vertical-lr !important; /* 垂直文本 */
    text-orientation: mixed !important;
    font-size: 9px !important;
    width: 60px !important;
    border-right: 3px solid #0c5460 !important;
    vertical-align: middle !important;
}
/* 左侧章节标签 - 关键样式 */
.section-label-two {
    background: #d1ecf1 !important;
    color: #0c5460 !important;
    font-weight: bold !important;
    text-align: center !important;
    writing-mode: horizontal-tb !important; /* 垂直文本 */
    font-size: 9px !important;
    width: 60px !important;
    border-right: 3px solid #0c5460 !important;
    vertical-align: middle !important;
}
/* 标签单元格 */
.label-cell {
    background: #f5f5f5;
    font-weight: bold;
    text-align: center;
    color: #333;
    white-space: nowrap;
    font-size: 8px;
}

/* 输入单元格 */
.input-cell {
    background: white;
    text-align: center;
    padding: 1px 2px;
}

/* 表格输入框 */
.table-input {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 8px;
    padding: 1px;
    outline: none;
    height: 18px;
}

.table-input:focus {
    background: #fff3cd;
    border: 1px solid #ffc107;
}

/* 全宽输入框 */
.full-input {
    width: 100%;
    border: none;
    background: transparent;
    resize: none;
    font-size: 8px;
    padding: 1px;
    outline: none;
    min-height: 20px;
    line-height: 1.2;
}

.full-input:focus {
    background: #fff3cd;
    border: 1px solid #ffc107;
}

/* 总投资突出显示 */
.total-input {
    font-weight: bold !important;
    background: #e7f3ff !important;
}

/* 底部按钮区域 */
.overview-footer {
    padding: 5px;
    text-align: center;
    border-top: 1px solid #ddd;
    background: #f8f9fa;
    flex-shrink: 0;
}

.btn {
    padding: 4px 15px;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    margin: 0 5px;
    transition: all 0.2s;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

/* 滚动条样式 */
.overview-content::-webkit-scrollbar {
    width: 6px;
}

.overview-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.overview-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
}

.overview-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 响应式调整 */
@media (max-width: 1400px) {
    .overview-table {
        width: 110%;
        max-width: 1300px;
    }
    
    .section-label {
        width: 50px !important;
        font-size: 8px !important;
    }
}

@media (max-height: 800px) {
    .overview-table td {
        height: 20px;
        padding: 1px 2px;
    }
    
    .table-input {
        height: 16px;
    }
    
    .full-input {
        min-height: 18px;
    }
}

/* 更新按钮样式 */
.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
    font-weight: 500;
}

.btn-needs-update {
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { box-shadow: 0 0 0 4px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

/* 字段高亮样式 */
.field-changed {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
}

.field-will-update {
    background-color: #fff3cd !important;
    border: 1px solid #ffc107 !important;
}

.field-updated {
    background-color: #d1edff !important;
    border: 1px solid #0d6efd !important;
    transition: all 0.3s ease;
}

/* 成功提示框样式 */
.update-success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 9999;
    font-size: 14px;
    max-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 概览界面按钮布局 */
.overview-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
}

.overview-footer .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

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

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}