/* 委托方级组件定制样式增强 */
/* ===== 字体大小变量 ===== */
:root {
    --bb-font-size: 0.875rem;
    --bs-nav-link-font-weight: unset;
}

.form-control {
    --bb-form-control-padding: 0.275rem 0.55rem;
}
.btn
 {
    --bs-btn-font-size: 0.775rem;
   
}
@media (max-width: 1920px) {
    :root {
        --bb-font-size: 0.775rem;
    }
}

.nav {
    --bs-nav-link-padding-x: 1rem;
    --bs-nav-link-padding-y: 0.5rem;
    --bs-nav-link-font-weight:0.2rem;
    --bs-nav-link-color: var(--bs-link-color);
    --bs-nav-link-hover-color: var(--bs-link-hover-color);
    --bs-nav-link-disabled-color: var(--bs-secondary-color);
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-link {

    font-weight: var(--bs-nav-link-font-weight);

}

.h5, h5 {
    font-size: 0.95rem;
}
/* ===== 动态垂直滚动条控制 ===== */
/* 全局滚动条策略：默认隐藏，需要时自动显示 */
html, body {
    overflow-y: hidden !important; /* 改为auto，需要时自动显示滚动条 */
    overflow-x: hidden !important; /* 保持隐藏水平滚动条 */
    scroll-behavior: smooth; /* 平滑滚动 */
}
.menu .submenu .nav-link {
    border-radius: var(--bs-border-radius);
    padding: .4rem;
}
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.1rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--bs-heading-color);
}
/* 主框架布局滚动控制 */
.layout-main,
.layout-page {
    overflow-x: hidden !important; /* 隐藏水平滚动条 */
    /* 高度由 flex 父容器 .has-sidebar 自动撑开，不可设 100vh */
}

/* 内容区域滚动控制 */
.layout-main .tab-content,
.layout-main .tab-pane,
.layout-main .page-content {
    overflow-y: auto !important; /* 需要时显示垂直滚动条 */
    overflow-x: hidden !important; /* 隐藏水平滚动条 */
    max-height: calc(100vh - 140px) !important;
    /* 自定义滚动条样式 */
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f8f9fa;
}

/* WebKit浏览器滚动条样式优化 */
.layout-main .tab-content::-webkit-scrollbar,
.layout-main .tab-pane::-webkit-scrollbar,
.layout-main .page-content::-webkit-scrollbar {
    width: 8px;
}

.layout-main .tab-content::-webkit-scrollbar-track,
.layout-main .tab-pane::-webkit-scrollbar-track,
.layout-main .page-content::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.layout-main .tab-content::-webkit-scrollbar-thumb,
.layout-main .tab-pane::-webkit-scrollbar-thumb,
.layout-main .page-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    border: 1px solid #f8f9fa;
}

.layout-main .tab-content::-webkit-scrollbar-thumb:hover,
.layout-main .tab-pane::-webkit-scrollbar-thumb:hover,
.layout-main .page-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ===== 下拉框与Card样式冲突修复 ===== */
/* 修复树状下拉框造成Card滚动条的问题 */
.card,
.card-body {
    /* 防止下拉框内容造成Card溢出 */
    overflow: visible !important;
}

/* 针对OrganizationTreeSelect组件的特殊处理 */
.organization-tree-select {
    /* 确保下拉框不会影响父容器 */
    position: relative;
    /* 提高z-index确保下拉框显示在表格操作列之上 */
    z-index: 1005 !important; /* 提高层级，确保显示在表格上方 */
}

.organization-tree-select .dropdown-menu {
    /* 使用固定定位避免影响父容器布局 */
    position: absolute !important;
    /* 确保下拉框在正确的层级，高于表格操作列 */
    z-index: 1056 !important; /* 进一步提高层级 */
    /* 防止下拉框内容溢出造成滚动条 */
    max-height: 350px !important;
    overflow-y: auto !important;
    /* 确保下拉框不会被其他元素遮挡 */
    box-shadow: none !important;
    border: 1px solid var(--enterprise-border-color) !important;
    /* 添加背景色，避免透明背景问题 */
    background-color: white !important;
    /* 添加边框半径 */
    border-radius: 0.375rem !important;
}

/* 修复滚动条样式问题 */
.organization-tree-select .dropdown-menu {
    /* 自定义滚动条样式 */
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* WebKit浏览器滚动条样式 */
.organization-tree-select .dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.organization-tree-select .dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.organization-tree-select .dropdown-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    border: 1px solid #f1f1f1;
}

.organization-tree-select .dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 针对其他可能的下拉框组件 */
/*.dropdown-menu {*/
    /* 使用绝对定位，避免影响父容器尺寸 */
    /*position: absolute !important;*/
    /*z-index: 1050 !important;*/
    /* 防止下拉框内容造成父容器滚动 */
    /*max-height: 300px !important;
    overflow-y: auto !important;*/
    /* 确保背景不透明 */
    /*background-color: white !important;
}*/

/* 确保Select组件的下拉框也不会造成问题 */
/*.bb-select .dropdown-menu,
.select .dropdown-menu {
    position: absolute !important;
    z-index: 1050 !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    background-color: white !important;
}*/

/* 修复表格容器内的下拉框问题 */
.table-responsive .dropdown-menu,
.table-container .dropdown-menu {
    position: absolute !important;
    z-index: 1056 !important; /* 确保高于表格 */
    background-color: white !important;
}

/* 特别针对表格操作列的下拉框层级问题 */
.table .btn-group .dropdown-menu,
.table .action-buttons .dropdown-menu {
    z-index: 1055 !important;
}

/* 确保组织选择框的下拉框始终在最高层级 */
.table .organization-tree-select .dropdown-menu {
    z-index: 1060 !important; /* 最高层级 */
}

/* ===== 表格容器滚动控制 ===== */
/* 确保表格组件的滚动不受影响 */
.table-container,
.table-responsive {
    overflow: auto !important;
    max-height: none !important;
}

/* 表格内容区域动态滚动 */
.bb-table-container,
.data-table-container {
    overflow-y: auto !important;
    overflow-x: auto !important;
    max-height: calc(100vh - 300px) !important;
}

/* ===== 数据表格委托方级样式 ===== */
.table-enterprise {
    background: white;
    border-radius: var(--enterprise-border-radius);
    box-shadow: var(--enterprise-shadow-sm);
    overflow: hidden;
    border: 1px solid var(--enterprise-border-color);
}

.table-enterprise .table {
    margin-bottom: 0;
}

.table-enterprise .table thead th {
    background: var(--enterprise-gray-50);
    border-top: none;
    font-weight: 600;
    color: var(--enterprise-text-primary);
    padding: 1rem 0.75rem;
    font-size: 0.875rem;
}

.table-enterprise .table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    color: var(--enterprise-text-primary);
    border-bottom: 1px solid var(--enterprise-gray-200);
}

.table-enterprise .table tbody tr:hover {
    background: var(--enterprise-gray-50);
}

.table-enterprise .table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== 表单样式增强 ===== */
.form-enterprise {
    background: white;
    border-radius: var(--enterprise-border-radius);
    box-shadow: var(--enterprise-shadow-sm);
    border: 1px solid var(--enterprise-border-color);
    padding: 2rem;
    /* 确保表单可以滚动 */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: calc(100vh - 200px) !important;
}

.form-enterprise .form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--enterprise-border-color);
}

.form-enterprise .form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-enterprise .form-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--enterprise-text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.form-enterprise .form-section-title i {
    margin-right: 0.5rem;
    color: var(--enterprise-primary);
}

/* ===== 仪表板卡片样式 ===== */
.dashboard-card {
    background: white;
    border-radius: var(--enterprise-border-radius);
    box-shadow: var(--enterprise-shadow-sm);
    border: 1px solid var(--enterprise-border-color);
    padding: 1.5rem;
    transition: all 0.2s ease-in-out;
    height: 100%;
}

.dashboard-card:hover {
    border-color: var(--enterprise-gray-300);
}

.dashboard-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--enterprise-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.dashboard-card-icon.primary {
    background: var(--enterprise-primary);
}

.dashboard-card-icon.success {
    background: var(--enterprise-success);
}

.dashboard-card-icon.warning {
    background: var(--enterprise-warning);
}

.dashboard-card-icon.info {
    background: var(--enterprise-info);
}

.dashboard-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--enterprise-text-primary);
    margin-bottom: 0.5rem;
}

.dashboard-card-label {
    font-size: 0.875rem;
    color: var(--enterprise-text-secondary);
    font-weight: 500;
}

.dashboard-card-trend {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.dashboard-card-trend.up {
    color: var(--enterprise-success);
}

.dashboard-card-trend.down {
    color: var(--enterprise-danger);
}

.dashboard-card-trend i {
    margin-right: 0.25rem;
}

/* ===== 状态指示器样式 ===== */
.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-indicator.active {
    background: rgba(56, 161, 105, 0.1);
    color: var(--enterprise-success);
}

.status-indicator.inactive {
    background: rgba(160, 174, 192, 0.2);
    color: var(--enterprise-text-muted);
}

.status-indicator.pending {
    background: rgba(214, 158, 46, 0.1);
    color: var(--enterprise-warning);
}

.status-indicator.error {
    background: rgba(229, 62, 62, 0.1);
    color: var(--enterprise-danger);
}

.status-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 0.5rem;
    background: currentColor;
}

/* ===== 操作按钮组样式 ===== */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-buttons .btn {
    padding: 0.375rem 0.75rem;
    /*font-size: 0.875rem;*/
    /*border-radius: var(--enterprise-border-radius-sm);*/
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.action-buttons .btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--enterprise-border-radius-sm);
}

.action-buttons .btn-icon:hover {
    opacity: 0.85;
}

/* ===== 搜索和过滤器样式 ===== */
.search-filter-bar {
    background: white;
    border-radius: var(--enterprise-border-radius);
    box-shadow: var(--enterprise-shadow-sm);
    border: 1px solid var(--enterprise-border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    /* 防止下拉框内容影响搜索栏布局 */
    overflow: visible !important;
}

.search-filter-bar .form-control {
    border-radius: var(--enterprise-border-radius);
    border: 2px solid var(--enterprise-border-color);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease-in-out;
}

.search-filter-bar .form-control:focus {
    border-color: var(--enterprise-primary-lighter);
    box-shadow: none;
}

.search-filter-bar .btn {
    border-radius: var(--enterprise-border-radius);
    font-weight: 500;
}

/* ===== 分页样式增强 ===== */
.pagination-enterprise {
    background: white;
    border-radius: var(--enterprise-border-radius);
    box-shadow: var(--enterprise-shadow-sm);
    border: 1px solid var(--enterprise-border-color);
    padding: 1rem;
    margin-top: 1rem;
}

.pagination-enterprise .pagination {
    margin-bottom: 0;
}

.pagination-enterprise .page-link {
    border: none;
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: var(--enterprise-border-radius-sm);
    color: var(--enterprise-text-primary);
    transition: all 0.2s ease-in-out;
}

.pagination-enterprise .page-link:hover {
    background: var(--enterprise-gray-50);
    color: var(--enterprise-primary);
}

.pagination-enterprise .page-item.active .page-link {
    background: var(--enterprise-primary);
    color: white;
}

/* ===== 面包屑导航样式 ===== */
.breadcrumb-enterprise {
    background: white;
    border-radius: var(--enterprise-border-radius);
    box-shadow: var(--enterprise-shadow-sm);
    border: 1px solid var(--enterprise-border-color);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.breadcrumb-enterprise .breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-enterprise .breadcrumb-item {
    font-size: 0.875rem;
}

.breadcrumb-enterprise .breadcrumb-item a {
    color: var(--enterprise-primary);
    text-decoration: none;
}

.breadcrumb-enterprise .breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-enterprise .breadcrumb-item.active {
    color: var(--enterprise-text-secondary);
}

/* ===== 标签页样式增强 ===== */
.nav-tabs-enterprise {
    background: white;
    border-radius: var(--enterprise-border-radius) var(--enterprise-border-radius) 0 0;
    border: 1px solid var(--enterprise-border-color);
    border-bottom: none;
    padding: 0 1rem;
}

.nav-tabs-enterprise .nav-link {
    border: none;
    border-radius: var(--enterprise-border-radius-sm) var(--enterprise-border-radius-sm) 0 0;
    color: var(--enterprise-text-secondary);
    font-weight: 500;
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
    transition: all 0.2s ease-in-out;
}

.nav-tabs-enterprise .nav-link:hover {
    background: var(--enterprise-gray-50);
    color: var(--enterprise-primary);
}

.nav-tabs-enterprise .nav-link.active {
    background: white;
    color: var(--enterprise-primary);
    border-bottom: 2px solid var(--enterprise-primary);
}

.tab-content-enterprise {
    background: white;
    border: 1px solid var(--enterprise-border-color);
    border-radius: 0 0 var(--enterprise-border-radius) var(--enterprise-border-radius);
    padding: 2rem;
    /* 确保标签页内容可以滚动 */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: calc(100vh - 250px) !important;
}

/* ===== 模态框增强样式 ===== */
.modal-enterprise .modal-content {
    border: none;
    border-radius: var(--enterprise-border-radius-lg);
    box-shadow: var(--enterprise-shadow-xl);
}

.modal-enterprise .modal-header {
    background: var(--enterprise-gray-50);
    border-bottom: 1px solid var(--enterprise-border-color);
    border-radius: var(--enterprise-border-radius-lg) var(--enterprise-border-radius-lg) 0 0;
    padding: 1.5rem;
}

.modal-enterprise .modal-title {
    font-weight: 600;
    color: var(--enterprise-text-primary);
    display: flex;
    align-items: center;
}

.modal-enterprise .modal-title i {
    margin-right: 0.5rem;
    color: var(--enterprise-primary);
}

.modal-enterprise .modal-body {
    padding: 2rem;
    /* 确保模态框内容可以滚动 */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: calc(100vh - 300px) !important;
}

.modal-enterprise .modal-footer {
    border-top: 1px solid var(--enterprise-border-color);
    background: var(--enterprise-gray-50);
    border-radius: 0 0 var(--enterprise-border-radius-lg) var(--enterprise-border-radius-lg);
    padding: 1.5rem;
}

/* ===== 加载状态样式 ===== */
.loading-enterprise {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--enterprise-text-secondary);
}

.loading-enterprise .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--enterprise-gray-200);
    border-top: 3px solid var(--enterprise-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

/* ===== 空状态样式 ===== */
.empty-state-enterprise {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--enterprise-text-secondary);
}

.empty-state-enterprise i {
    font-size: 4rem;
    color: var(--enterprise-gray-300);
    margin-bottom: 1rem;
}

.empty-state-enterprise h4 {
    color: var(--enterprise-text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-enterprise p {
    margin-bottom: 1.5rem;
}

/* ===== 侧边栏菜单增强 ===== */
.sidebar-menu-enterprise {
    padding: 1rem 0;
    /* 修复：根据内容动态调整高度，而不是固定100vh */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    /* 移除固定的max-height，让菜单根据内容自适应高度 */
    min-height: auto !important;
    /* 滚动条样式优化 */
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f8f9fa;
}

/* 修复BootstrapBlazor Layout-Side 的高度问题 */
.layout-side {
    border-right: 1px solid var(--enterprise-border-color);
    background: white;
    /* 修复：允许侧边栏根据内容自适应高度 */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    /* 让侧边栏根据内容调整高度，保证最小高度填满屏幕 */
    height: auto !important;
    min-height: 100vh !important;
}

/* 针对BootstrapBlazor菜单组件的特殊优化 */
.bb-menu,
.bb-side-menu,
.menu,
.side-menu {
    /* 根据内容自适应高度，避免不必要的滚动条 */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    /* 移除固定高度限制 */
    height: auto !important;
    max-height: none !important;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f8f9fa;
}

/* 委托方级侧边栏容器优化 */
.enterprise-sidebar {
    /* 修复：让侧边栏根据内容自适应高度，不强制填满屏幕 */
    height: auto !important;
    min-height: 100vh !important;
    /* 使用flex布局但不强制拉伸内容 */
    display: flex !important;
    flex-direction: column !important;
    /* 只在内容真正超出屏幕时才显示滚动条 */
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.enterprise-sidebar .enterprise-sidebar-header {
    /* 头部固定不参与flex拉伸 */
    flex: 0 0 auto !important;
}

.enterprise-sidebar .enterprise-sidebar-content,
.enterprise-sidebar .sidebar-menu-enterprise,
.enterprise-sidebar .menu {
    /* 修复：内容区域根据实际内容调整高度，不强制拉伸 */
    flex: 0 1 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Layout侧边栏区域优化 */
.layout .layout-side {
    /* 确保侧边栏可以根据内容调整高度 */
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* 菜单容器高度自适应 */
.bb-layout .layout-side,
.bb-layout-side {
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* 防止flex布局强制拉伸菜单高度 */
.bb-layout .layout-side,
.layout .layout-side {
    display: flex !important;
    flex-direction: column !important;
}

.bb-layout .layout-side > *,
.layout .layout-side > * {
    /* 修复：让子元素根据内容自适应，不强制拉伸 */
    flex: 0 0 auto !important;
}

/* 如果菜单容器有flex-fill类，移除它 */
.bb-layout .layout-side .flex-fill,
.layout .layout-side .flex-fill {
    flex: 0 0 auto !important;
}

/* 确保委托方级侧边栏也遵循相同规则 */
.enterprise-sidebar {
    /* 重申：让侧边栏根据内容自适应 */
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.enterprise-sidebar .sidebar-menu-enterprise {
    /* 让菜单容器根据菜单项数量自适应高度 */
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* ===== 确保组件内滚动正常工作 ===== */
.bb-table-container,
.table-container,
.data-table {
    overflow: auto !important;
}

.bb-modal .modal-body,
.modal .modal-body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.bb-drawer .drawer-body,
.drawer .drawer-body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* ===== BootstrapBlazor 菜单组件滚动条控制 ===== */
.bb-menu,
.bb-side-menu,
.menu,
.side-menu {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f8f9fa;
}

/* BootstrapBlazor菜单滚动条样式 */
.bb-menu::-webkit-scrollbar,
.bb-side-menu::-webkit-scrollbar,
.menu::-webkit-scrollbar,
.side-menu::-webkit-scrollbar {
    width: 6px;
}

.bb-menu::-webkit-scrollbar-track,
.bb-side-menu::-webkit-scrollbar-track,
.menu::-webkit-scrollbar-track,
.side-menu::-webkit-scrollbar-track {
    background: transparent;
}

.bb-menu::-webkit-scrollbar-thumb,
.bb-side-menu::-webkit-scrollbar-thumb,
.menu::-webkit-scrollbar-thumb,
.side-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.bb-menu::-webkit-scrollbar-thumb:hover,
.bb-side-menu::-webkit-scrollbar-thumb:hover,
.menu::-webkit-scrollbar-thumb:hover,
.side-menu::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 确保委托方级侧边栏可以正常滚动 */
.enterprise-sidebar,
.enterprise-sidebar * {
    /* 移除之前的过于宽泛的设置 */
}

/* 针对enterprise-sidebar的特殊优化 */
.enterprise-sidebar {
    /* 修复：让侧边栏根据内容自适应高度，不强制填满屏幕 */
    height: auto !important;
    min-height: 100vh !important;
    /* 使用flex布局但不强制拉伸内容 */
    display: flex !important;
    flex-direction: column !important;
    /* 只在内容真正超出屏幕时才显示滚动条 */
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.enterprise-sidebar .enterprise-sidebar-header {
    /* 头部固定不参与flex拉伸 */
    flex: 0 0 auto !important;
}

.enterprise-sidebar .enterprise-sidebar-content,
.enterprise-sidebar .sidebar-menu-enterprise,
.enterprise-sidebar .menu {
    /* 修复：内容区域根据实际内容调整高度，不强制拉伸 */
    flex: 0 1 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* 修复Card内组织选择框的样式问题 */
.card .organization-tree-select,
.card-body .organization-tree-select {
    /* 确保下拉框不会因为父容器变化而受影响 */
    position: relative !important;
    z-index: 1005 !important; /* 提高层级，确保显示在卡片上方 */
}

/* 修复Card自身的溢出问题 */
.card,
.card-body {
    overflow: visible !important;
}

/* 但是Card内的其他内容仍然可以正常滚动 */
.card .table-responsive,
.card .form-control,
.card .overflow-auto {
    overflow: auto !important;
}

/* ===== 全局滚动条美化 ===== */
/* 为所有可滚动元素应用统一的滚动条样式 */
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    border: 1px solid #f8f9fa;
}

*::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

*::-webkit-scrollbar-corner {
    background: #f8f9fa;
}

/* Firefox滚动条样式 */
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f8f9fa;
}

/* ===== BootstrapBlazor布局组件特殊优化 ===== */

/* 针对BootstrapBlazor Layout组件的侧边栏高度修复 */
.bb-layout .layout-side,
.layout .layout-side {
    /* 移除固定高度，使用最小高度 + 自适应 */
    height: auto !important;
    min-height: 100vh !important;
    /* 只在内容超出时显示滚动条 */
    overflow-y: hidden !important;
    overflow-x: hidden !important;
}

/* 针对BootstrapBlazor Menu组件的高度修复 */
.bb-layout .layout-side .menu,
.layout .layout-side .menu,
.bb-menu,
.menu {
    /* 移除固定高度限制 */
    height: auto !important;
    max-height: none !important;
    /* 根据内容自适应，只在必要时显示滚动条 */
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* 菜单容器内部元素也要自适应 */
.bb-layout .layout-side .menu > *,
.layout .layout-side .menu > *,
.bb-menu > *,
.menu > * {
    height: auto !important;
    flex-shrink: 0; /* 防止菜单项被压缩 */
}

/* 菜单项列表容器 */
.bb-layout .layout-side .menu .menu-items,
.layout .layout-side .menu .menu-items,
.bb-menu .menu-items,
.menu .menu-items,
.menu-item-container {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
}

/* 侧边栏布局由 sidebar-fix.css 统一管理 */
/* .enterprise-sidebar 和 .layout-side 的 height/overflow 规则已移至 sidebar-fix.css */

/* Vessel Detail Modal Styles */
.vessel-detail-modal .modal-body {
    max-height: 75vh;
    overflow-y: auto;
}

.detail-header-compact {
    padding: 1rem;
    background: #667eea;
    border-radius: 8px;
    color: white;
}

.vessel-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.vessel-detail-grid {
    padding: 0.5rem;
}

.info-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.info-card-header {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.info-card-body {
    padding: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row label {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
    min-width: 100px;
}

.info-row .value {
    flex: 1;
    text-align: right;
    font-size: 0.9rem;
}

.stat-box {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
}

.stat-box label {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 0.95rem;
}

.remark-content {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #495057;
    max-height: 120px;
    overflow-y: auto;
}

/* Vessel Edit Modal Styles */
.vessel-edit-modal .modal-body {
    max-height: 75vh;
    overflow-y: auto;
    padding: 1rem;
}

.edit-header-compact {
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
}

.text-muted-light {
    color: rgba(255, 255, 255, 0.8) !important;
}

.edit-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.form-content-compact {
    padding: 0.5rem;
}

.form-group-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.form-group-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.form-tips {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: #856404;
    margin-top: 1rem;
}

.badge-lg {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}
