

/* 你可以在需要的地方应用变量，例如：
body, html {
    font-size: var(--bb-font-size);
}
*/

/* Enterprise Theme CSS
   修改记录：
     2026-11-08  v2.96 公共组件全量主题化：新增语义表面/线条令牌
                 （--surface- 与 --line- 前缀及 --card-shadow，浅色基线；深色
                 主题 b 在 ui-themes.css 覆盖），供 page-template.css 与
                 Components/Common 全部共享组件换肤；新增全局 DX 网格美化
                 令牌与类规则（表头底/分隔线/行悬停/选中行/分页），所有
                 DxGrid 统一精致风格并随主题换肤
*/

/* ===== 委托方级主题颜色变量 ===== */
:root {
    /* 主品牌色 - 专业蓝色系 */
    --enterprise-primary: #1a365d;
    --enterprise-primary-light: #2d5282;
    --enterprise-primary-lighter: #4299e1;
    --enterprise-primary-dark: #0f2540;
    
    /* 辅助颜色 */
    --enterprise-secondary: #4a5568;
    --enterprise-accent: #ed8936;
    --enterprise-success: #38a169;
    --enterprise-warning: #d69e2e;
    --enterprise-danger: #e53e3e;
    --enterprise-info: #3182ce;
    
    /* 中性色 */
    --enterprise-gray-50: #f7fafc;
    --enterprise-gray-100: #edf2f7;
    --enterprise-gray-200: #e2e8f0;
    --enterprise-gray-300: #cbd5e0;
    --enterprise-gray-400: #a0aec0;
    --enterprise-gray-500: #718096;
    --enterprise-gray-600: #4a5568;
    --enterprise-gray-700: #2d3748;
    --enterprise-gray-800: #1a202c;
    --enterprise-gray-900: #171923;
    
    /* 文字颜色 */
    --enterprise-text-primary: var(--enterprise-gray-800);
    --enterprise-text-secondary: var(--enterprise-gray-600);
    --enterprise-text-muted: var(--enterprise-gray-500);
    
    /* 边框 */
    --enterprise-border-color: var(--enterprise-gray-200);
    --enterprise-border-color-hover: var(--enterprise-gray-300);

    /* 控件中性令牌（--ctl-*）：供权限动作栏/行操作/表格工具/统一查询等
       共享组件的描边按钮、悬停底、文本与警示色使用。浅色基线（t1/a/c/d 通用），
       深色主题 b 在 ui-themes.css 的 :root[data-ui-theme="b"] 中覆盖。
       组件 CSS 一律用 var(--ctl-*)，保证随 data-ui-theme 换肤。 */
    --ctl-border: #E4E7EC;
    --ctl-border-hover: #D0D5DD;
    --ctl-bg-hover: #EFF1F5;
    --ctl-bg-active: #E4E7EC;
    --ctl-text: #39414F;
    --ctl-text-hover: #1E2430;
    --ctl-icon: #8A93A3;
    --ctl-danger-bg: #FCE8E6;
    --ctl-danger-border: #F2B8B3;
    --ctl-danger-text: #B93B31;

    /* 语义表面/线条令牌（--surface-/--line-）：页面底、卡片、内嵌区、悬停、
       分隔线与卡片阴影。浅色基线（t1/a/c/d 通用），深色主题 b 在 ui-themes.css
       的 :root[data-ui-theme="b"] 中覆盖。page-template.css（.tpl-* 页面模板）
       与 Components/Common 共享组件一律用 var() 引用，保证随 data-ui-theme 换肤。 */
    --surface-page: #F6F7F9;
    --surface-card: #FFFFFF;
    --surface-inset: #F8F9FA;
    --surface-hover: #EFF1F5;
    --surface-active: #E4E7EC;
    --line-soft: #EEF0F3;
    --line-default: #E5E8EC;
    --line-strong: #DEE2E6;
    --card-shadow: 0 1px 2px rgba(16, 24, 40, 0.03), 0 6px 20px rgba(16, 24, 40, 0.04);

    /* 阴影层次（从无到分级，提升卡片/下拉层次感） */
    --enterprise-shadow-sm: 0 1px 3px rgba(16, 42, 67, 0.08), 0 1px 2px rgba(16, 42, 67, 0.04);
    --enterprise-shadow-md: 0 4px 6px rgba(16, 42, 67, 0.07), 0 2px 4px rgba(16, 42, 67, 0.06);
    --enterprise-shadow-lg: 0 10px 15px rgba(16, 42, 67, 0.10), 0 4px 6px rgba(16, 42, 67, 0.05);
    --enterprise-shadow-xl: 0 20px 25px rgba(16, 42, 67, 0.12), 0 10px 10px rgba(16, 42, 67, 0.04);
    
    /* 边框半径 */
    --enterprise-border-radius: 8px;
    --enterprise-border-radius-sm: 4px;
    --enterprise-border-radius-lg: 12px;
    --enterprise-border-radius-xl: 16px;
    --enterprise-border-radius-pill: 999px;

    /* 间距比例 */
    --enterprise-space-1: 0.25rem;
    --enterprise-space-2: 0.5rem;
    --enterprise-space-3: 0.75rem;
    --enterprise-space-4: 1rem;
    --enterprise-space-5: 1.5rem;
    --enterprise-space-6: 2rem;
    --enterprise-space-8: 3rem;
}

/* ===== 双引擎视觉统一映射区 =====
 * 将企业令牌映射到 BootstrapBlazor（--bb-*）、Bootstrap（--bs-*）
 * 与 DevExpress（--dxbl-*），使 DX 表格与 BB 布局呈现同一套品牌色。
 * 原则：仅声明 CSS 变量，不直接覆盖组件类名，避免影响组件内部行为。
 */
:root {
    /* BootstrapBlazor */
    --bb-primary: var(--enterprise-primary-lighter);
    --bb-primary-active: var(--enterprise-primary-light);
    --bb-primary-border: var(--enterprise-primary-lighter);
    --bb-primary-hover: var(--enterprise-primary-light);
    --bb-focus-ring-color: rgba(66, 153, 225, 0.35);
    --bb-font-size: 0.875rem;

    /* Bootstrap */
    --bs-primary: var(--enterprise-primary-lighter);
    --bs-primary-rgb: 66, 153, 225;
    --bs-link-color: var(--enterprise-primary-lighter);
    --bs-link-hover-color: var(--enterprise-primary-light);
    --bs-border-radius: var(--enterprise-border-radius);
    --bs-card-border-radius: var(--enterprise-border-radius-lg);
    --bs-border-color: var(--enterprise-border-color);

    /* DevExpress Grid 美化令牌（v2.96：全局统一精致风格，主题 b 在
       ui-themes.css 覆盖为深色值；.dtpl 页面另有更具体的覆写，互不冲突） */
    --dxbl-grid-header-bg: #F8F9FA;
    --dxbl-grid-header-color: #475467;
    --dxbl-grid-header-font-weight: 600;
    --dxbl-grid-border-color: var(--enterprise-gray-200);
    --dxbl-grid-font-size: 0.875rem;
    /* 分页：页码按钮悬停浅底、当前页主色 */
    --dxbl-pager-page-btn-color: #39414F;
    --dxbl-pager-page-btn-hover-bg: var(--surface-hover);
    --dxbl-pager-page-btn-hover-color: var(--enterprise-text-primary);
    --dxbl-pager-active-page-btn-bg: var(--enterprise-primary);
    --dxbl-pager-active-page-btn-color: #FFFFFF;
    --dxbl-pager-btn-color: #667085;
    --dxbl-pager-btn-hover-bg: var(--surface-hover);
    --dxbl-pager-btn-hover-color: var(--enterprise-text-primary);
}

/* ===== 全局 DX 网格美化（v2.96）：表头底已由 :root 令牌驱动，此处补
 *  单元格分隔线 / 行悬停 / 选中行三类 DX 未暴露为令牌的细节。
 *  选择器均不带 !important 例外标记的旧规则优先；.dtpl 页面有更具体的
 *  覆写（.dtpl .dxbl-cell 等），自动覆盖本节，互不冲突 ===== */
.dxbl-cell {
    border-color: var(--line-soft);
}
/* 行悬停（DxGrid HighlightRowOnHover 启用后表体加 dxbl-grid-row-hover-enabled） */
.dxbl-grid-row-hover-enabled > tbody > tr:hover > td {
    background: var(--surface-hover);
}
/* 选中行：主色浅底（多选/单选），旧浏览器回退浅蓝底 */
.dxbl-grid .dxbl-grid-selected-row > td {
    background: rgba(66, 153, 225, 0.08);
    background: color-mix(in srgb, var(--enterprise-primary-lighter) 9%, var(--surface-card));
}


/* ===== 委托方级登录页面样式 ===== */
.enterprise-login-container {
    min-height: 100vh;
    background: var(--enterprise-primary);
    position: relative;
    overflow: hidden;
}

.enterprise-login-container::before {
    display: none;
}

.enterprise-login-card {
    background: white;
    border: 1px solid var(--enterprise-border-color);
    border-radius: var(--enterprise-border-radius-lg);
    width: 420px;
    max-width: 90vw;
    padding: 2.5rem;
    position: relative;
    z-index: 1;
}

.enterprise-login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.enterprise-login-logo {
    height: 64px;
    width: 64px;
    margin: 0 auto 1rem;
    border-radius: var(--enterprise-border-radius);
    box-shadow: var(--enterprise-shadow-md);
}

.enterprise-login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--enterprise-primary);
    margin: 0;
    letter-spacing: -0.025em;
}

.enterprise-login-subtitle {
    font-size: 0.875rem;
    color: var(--enterprise-text-secondary);
    margin-top: 0.5rem;
}

/* ===== 表单样式 ===== */
.enterprise-form-group {
    margin-bottom: 1.25rem;
}

.enterprise-form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--enterprise-text-primary);
    margin-bottom: 0.375rem;
}

.enterprise-form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--enterprise-border-color);
    border-radius: var(--enterprise-border-radius-sm);
    background-color: white;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.enterprise-form-control:focus {
    outline: none;
    border-color: var(--enterprise-primary-lighter);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

.enterprise-form-control::placeholder {
    color: var(--enterprise-text-muted);
}

/* ===== 按钮样式 ===== */
.enterprise-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--enterprise-border-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
    line-height: 1.5;
}

.enterprise-btn-primary {
    background: var(--enterprise-primary);
    color: white;
    border-color: var(--enterprise-primary);
}

.enterprise-btn-primary:hover {
    background: var(--enterprise-primary-light);
    border-color: var(--enterprise-primary-light);
}

.enterprise-btn-primary:active {
    background: var(--enterprise-primary-dark);
    border-color: var(--enterprise-primary-dark);
}

.enterprise-btn-secondary {
    background: white;
    color: var(--enterprise-primary);
    border-color: var(--enterprise-border-color);
}

.enterprise-btn-secondary:hover {
    border-color: var(--enterprise-primary);
    background: rgba(26, 54, 93, 0.03);
    color: var(--enterprise-primary-light);
}

.enterprise-btn-block {
    width: 100%;
}

.enterprise-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== 选择器样式 ===== */
.enterprise-select {
    position: relative;
}

.enterprise-select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* ===== 布局头部样式 ===== */
/* 委托方级头部基础样式 - 现在主要由 header-override.css 处理 */
.enterprise-layout-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.75rem 1rem !important;
    min-height: auto !important;
    width: 100% !important;
}

/* 委托方级头部标题样式 */
.enterprise-layout-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.025em;
}

.enterprise-layout-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* ===== 委托方级侧边栏样式修复 ===== */
.enterprise-sidebar {
    background: white;
    border-right: 1px solid var(--enterprise-border-color);
    box-shadow: var(--enterprise-shadow-sm);
    /* 修复：完全移除高度限制，让内容自然流动 */
    height: auto !important;
    min-height: auto !important; /* 关键修复：移除最小高度 */
    /* 使用简单的block布局 */
    display: block !important;
    /* 移除overflow限制 */
    overflow: visible !important;
}

.enterprise-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--enterprise-border-color);
    background: var(--enterprise-gray-50);
    /* 头部自适应高度 */
    height: auto !important;
    min-height: auto !important;
}

.enterprise-sidebar-logo {
    height: 40px;
    width: 40px;
    border-radius: var(--enterprise-border-radius);
    box-shadow: var(--enterprise-shadow-sm);
}

.enterprise-sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--enterprise-primary);
    margin: 0;
}

/* 侧边栏内容区域 */
.enterprise-sidebar-content {
    /* 内容区域自适应 */
    height: auto !important;
    min-height: auto !important;
    /* 移除overflow限制 */
    overflow: visible !important;
}

/* 确保BootstrapBlazor Layout组件中的enterprise-sidebar正确显示 */
.layout-side .enterprise-sidebar {
    /* 关键修复：完全移除高度和最小高度限制 */
    height: auto !important;
    min-height: auto !important;
    display: block !important;
    overflow: visible !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;
    /* 自然的padding */
    padding: 0.5rem 0 !important;
}

/* 菜单在委托方侧边栏内的样式 */
.enterprise-sidebar .menu,
.enterprise-sidebar .bb-menu {
    /* 菜单自适应高度 */
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    /* 只在内容超出时显示滚动条 */
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* 委托方侧边栏滚动条样式 */
.enterprise-sidebar::-webkit-scrollbar,
.enterprise-sidebar .sidebar-menu-enterprise::-webkit-scrollbar,
.enterprise-sidebar .menu::-webkit-scrollbar {
    width: 6px;
}

.enterprise-sidebar::-webkit-scrollbar-track,
.enterprise-sidebar .sidebar-menu-enterprise::-webkit-scrollbar-track,
.enterprise-sidebar .menu::-webkit-scrollbar-track {
    background: transparent;
}

.enterprise-sidebar::-webkit-scrollbar-thumb,
.enterprise-sidebar .sidebar-menu-enterprise::-webkit-scrollbar-thumb,
.enterprise-sidebar .menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.enterprise-sidebar::-webkit-scrollbar-thumb:hover,
.enterprise-sidebar .sidebar-menu-enterprise::-webkit-scrollbar-thumb:hover,
.enterprise-sidebar .menu::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ===== 动画效果 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.enterprise-login-card {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== 加载状态 ===== */
.enterprise-loading {
    display: inline-flex;
    align-items: center;
}

.enterprise-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== 通知和消息样式 ===== */
.enterprise-alert {
    padding: 1rem;
    border-radius: var(--enterprise-border-radius);
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

.enterprise-alert-info {
    background: rgba(49, 130, 206, 0.1);
    border-color: var(--enterprise-info);
    color: var(--enterprise-info);
}

.enterprise-alert-success {
    background: rgba(56, 161, 105, 0.1);
    border-color: var(--enterprise-success);
    color: var(--enterprise-success);
}

.enterprise-alert-warning {
    background: rgba(214, 158, 46, 0.1);
    border-color: var(--enterprise-warning);
    color: var(--enterprise-warning);
}

.enterprise-alert-danger {
    background: rgba(229, 62, 62, 0.1);
    border-color: var(--enterprise-danger);
    color: var(--enterprise-danger);
}

/* ===== 卡片样式 ===== */
.enterprise-card {
    background: white;
    border-radius: var(--enterprise-border-radius);
    box-shadow: var(--enterprise-shadow-sm);
    border: 1px solid var(--enterprise-border-color);
    overflow: hidden;
}

.enterprise-card-header {
    padding: 1.5rem 1.5rem 0;
    border-bottom: 1px solid var(--enterprise-border-color);
}

.enterprise-card-body {
    padding: 1.5rem;
}

.enterprise-card-footer {
    padding: 1rem 1.5rem;
    background: var(--enterprise-gray-50);
    border-top: 1px solid var(--enterprise-border-color);
}

/* ===== 表格样式 ===== */
.enterprise-table {
    width: 100%;
    border-collapse: collapse;
}

.enterprise-table th,
.enterprise-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--enterprise-border-color);
}

.enterprise-table th {
    background: var(--enterprise-gray-50);
    font-weight: 600;
    color: var(--enterprise-text-primary);
}

.enterprise-table tbody tr:hover {
    background: var(--enterprise-gray-50);
}

/* ===== 工具提示样式 ===== */
.enterprise-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.enterprise-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--enterprise-gray-800);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--enterprise-border-radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
    z-index: 1000;
}

.enterprise-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

