:root {
    --primary-blue: #0066FF;
    --text-main: #334155;
    --text-sub: #64748b;
    --border-color: #e2e8f0;
}

body {
    background-color: #f4f7f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ============================
   方案 A：现代融合风格头部
   ============================ */
.header-section {
    background-color: #ffffff;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* 左侧 Logo 区域 */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.company-logo {
    height: 32px;
    width: auto;
    display: block;
}

.system-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-sub);
    padding-left: 15px;
    border-left: 1px solid #cbd5e1;
    height: 20px;
    line-height: 20px;
    white-space: nowrap;
}

/* 右侧导航区域 */
.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-item-link {
    text-decoration: none;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

    .nav-item-link:hover, .nav-item-link.active {
        color: var(--primary-blue);
    }

    .nav-item-link i {
        font-size: 16px;
    }

/* 用户胶囊样式 */
.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f1f5f9;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s;
}

    .user-pill:hover {
        background-color: #e2e8f0;
        border-color: #cbd5e1;
        color: var(--text-main);
    }

.user-avatar {
    width: 24px;
    height: 24px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.role-badge {
    background-color: #ef4444;
    color: white;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
}

/* ============================
   页面主体样式
   ============================ */
.main-content {
    min-height: calc(100vh - 300px);
}

/* 搜索结果表格 */
.search-result-row {
    transition: all 0.2s ease;
    cursor: pointer;
}

    .search-result-row:hover {
        background-color: #f8f9fa !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .search-result-row.selected {
        background-color: #e3f2fd !important;
        border-left: 4px solid #2196f3 !important;
    }

/* 页脚 */
.company-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%) !important;
    color: #ffffff !important;
    padding: 2.5rem 0;
    margin-top: 4rem;
    border-top: 4px solid #0d6efd;
    position: relative;
}

    .company-footer::before {
        content: '';
        position: absolute;
        top: -4px;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #0d6efd 0%, #20c997 33%, #17a2b8 66%, #ffc107 100%);
    }

    .company-footer h5 {
        color: #ffffff !important;
        font-weight: 700;
        margin-bottom: 1rem;
    }

    .company-footer p {
        color: rgba(255, 255, 255, 0.9) !important;
    }

/* 钢轨示意图 */
.rail-diagram-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 自动完成样式 */
.autocomplete-items {
    position: absolute;
    border: 1px solid #ddd;
    border-bottom: none;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
}

    .autocomplete-items div {
        padding: 10px;
        cursor: pointer;
        background-color: #fff;
        border-bottom: 1px solid #ddd;
    }

        .autocomplete-items div:hover {
            background-color: #e9e9e9;
        }

.autocomplete-active {
    background-color: #007bff !important;
    color: #ffffff;
}

/* 模型查看器 */
.model-viewer-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

    .model-viewer-wrapper iframe {
        width: 100%;
        height: 250px;
        border: none;
        background: transparent;
        border-radius: 4px;
    }

/* 响应式调整 */
@media (max-width: 768px) {
    .system-name {
        display: none;
    }

    .header-section {
        padding: 0 15px;
    }

    .nav-text {
        display: none;
    }

    .company-footer {
        text-align: center;
        padding: 2rem 0;
    }

    .rail-diagram-wrapper {
        padding: 1rem;
    }
}
