/* 全局变量定义 */
:root {
    --primary-color: #009942; 
    --primary-rgb: 0, 153, 66;
    --primary-light: rgba(0, 153, 66, 0.1);
    --primary-hover: rgba(0, 153, 66, 0.2);
    --nav-height: 60px; 
    --logo-size-nav: 45px; 
    --nav-shadow: 0 2px 3px rgba(10, 10, 10, 0.05);
    --text-main: #161616;
    --text-sm: 12px;
    --text-md: 14px;
    --text-lg: 18px;
    --spacing-xs: 5px;
    --spacing-sm: 8px;
    --spacing-md: 10px;
    --spacing-lg: 15px;
    --breakpoint-sm: 768px;
    --breakpoint-md: 992px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 导航栏 */
.navbar-custom {
    height: var(--nav-height) !important;
    width: 100% !important;
    background-color: #FFFFFF !important; 
    border-bottom: none !important;
    box-shadow: var(--nav-shadow) !important;
    padding: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 999 !important;
    overflow: hidden !important;
}

.navbar-custom .container-fluid {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(12, 1fr) !important;
    gap: 0 var(--spacing-xs) !important;
    align-items: center !important;
}

.nav-col-2 {
    grid-column: 1 / 3 !important;
    display: flex !important;
    align-items: center !important;
    padding-left: var(--spacing-md) !important;
}

.nav-logo {
    width: var(--logo-size-nav) !important;
    height: var(--logo-size-nav) !important;
    margin-right: var(--spacing-sm) !important;
}

.nav-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.nav-title {
    font-size: var(--text-lg) !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
}

.nav-col-8 {
    grid-column: 3 / 11 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;  /* 确保高度传递 */
}

/* 关键修复：高度传递链 */
.navbar-nav {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.navbar-nav .nav-item {
    flex: 1 1 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
}

.navbar-nav .nav-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 var(--spacing-sm) !important;
    color: var(--text-main) !important;
    font-size: var(--text-md) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    border-radius: 2px !important;
    line-height: normal !important;  /* 防止行高干扰 */
}

.navbar-nav .nav-link.active {
    background-color: var(--primary-color) !important;
    color: #FFFFFF !important;
}

.navbar-nav .nav-link:hover:not(.active) {
    background-color: var(--primary-hover) !important;
    color: var(--primary-color) !important;
}

.nav-col-2-right {
    grid-column: 11 / 13 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding-right: var(--spacing-md) !important;
}

.navbar-user {
    font-size: var(--text-md) !important;
    color: var(--text-main) !important;
    margin-right: 1rem !important;
}

.nav-col-2-right a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    font-size: var(--text-md) !important;
    padding: 2px var(--spacing-xs) !important;
    border-radius: 2px !important;
}

.nav-col-2-right a:hover {
    background-color: var(--primary-light) !important;
}

/* 页面主体 */
body {
    padding-top: var(--nav-height) !important;
    font-family: "Microsoft YaHei", sans-serif !important;
}

/* 数据卡片 */
.data-card {
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.data-card .card-header {
    background-color: var(--primary-color) !important;
    color: #FFFFFF !important;
    padding: var(--spacing-md) var(--spacing-lg) !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.data-card .card-body {
    padding: var(--spacing-lg) !important;
}

/* 人才列表页专用样式（保留原有） */
.table {
    table-layout: fixed !important;
}
.table thead th {
    background-color: #FAF9FF !important;
    border: none !important;
    font-weight: normal !important;
}
table tbody td .name-link {
    color: #009942 !important;
    font-weight: bold !important;
    text-decoration: none !important;
}
table tbody td.operate-col .view-link {
    color: #00A0EA !important;
    text-decoration: none !important;
}
table tbody td.operate-col .view-link:hover {
    text-decoration: underline !important;
}
.table th.operate-col,
.table td.operate-col {
    width: 120px !important;
    text-align: center !important;
}
/* 列宽度百分比（可按需调整） */
.table th:nth-child(1),
.table td:nth-child(1) { width: 8%; }
.table th:nth-child(2),
.table td:nth-child(2) { width: 8%; }
.table th:nth-child(3),
.table td:nth-child(3) { width: 6%; }
.table th:nth-child(4),
.table td:nth-child(4) { width: 6%; }
.table th:nth-child(5),
.table td:nth-child(5) { width: 10%; }
.table th:nth-child(6),
.table td:nth-child(6) { width: 12%; }
.table th:nth-child(7),
.table td:nth-child(7) { width: 12%; }
.table th:nth-child(8),
.table td:nth-child(8) { width: 10%; }
.table th:nth-child(9),
.table td:nth-child(9) { width: 8%; }
.table th:nth-child(10),
.table td:nth-child(10) { width: 8%; }

/* 分页控件 */
.pagination-wrap {
    margin-top: 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}
.page-size-select {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.page-size-select select {
    height: 30px !important;
    font-size: 14px !important;
    width: 80px !important;
    border-radius: 4px !important;
    border: 1px solid #ddd !important;
}
.pagination {
    margin: 0 !important;
}
.pagination .page-link {
    color: #333 !important;
    border: 1px solid #ddd !important;
}
.pagination .page-item.active .page-link {
    background: #009942 !important;
    border-color: #009942 !important;
    color: #fff !important;
}
.pagination-info {
    color: #6c757d !important;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .table th:nth-child(1),
    .table td:nth-child(1) { width: 10%; }
    .table th:nth-child(2),
    .table td:nth-child(2) { width: 10%; }
}
.modal {
    z-index: 1060 !important;
}
.modal-backdrop {
    z-index: 1050 !important;
}

/* 全局统一 placeholder 文字颜色为浅灰色（提高权重） */
::-webkit-input-placeholder { /* Chrome/Edge/Safari */
    color: #cecece !important;
    opacity: 1 !important;
}
:-moz-placeholder { /* Firefox 18- */
    color: #cecece !important;
    opacity: 1 !important;
}
::-moz-placeholder { /* Firefox 19+ */
    color: #cecece !important;
    opacity: 1 !important;
}
:-ms-input-placeholder { /* IE 10-11 */
    color: #cecece !important;
}
::placeholder { /* 标准语法 */
    color: #cecece !important;
    opacity: 1 !important;
}