

/* 你可以在需要的地方应用变量，例如：
body, html {
    font-size: var(--bb-font-size);
}
*/

/* Enterprise Theme CSS */

/* ===== 委托方级主题颜色变量 ===== */
: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-shadow-sm: none;
    --enterprise-shadow-md: none;
    --enterprise-shadow-lg: none;
    --enterprise-shadow-xl: none;
    
    /* 边框半径 */
    --enterprise-border-radius: 8px;
    --enterprise-border-radius-sm: 4px;
    --enterprise-border-radius-lg: 12px;
}

/* ===== 委托方级登录页面样式 ===== */
.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.5rem;
}

.enterprise-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--enterprise-text-primary);
    margin-bottom: 0.5rem;
}

.enterprise-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border: 2px solid var(--enterprise-border-color);
    border-radius: var(--enterprise-border-radius);
    background-color: white;
    transition: all 0.2s ease-in-out;
}

.enterprise-form-control:focus {
    outline: none;
    border-color: var(--enterprise-primary-lighter);
    box-shadow: none;
}

.enterprise-form-control::placeholder {
    color: var(--enterprise-text-muted);
}

/* ===== 按钮样式 ===== */
.enterprise-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--enterprise-border-radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    min-height: 44px;
}

.enterprise-btn-primary {
    background: var(--enterprise-primary);
    color: white;
}

.enterprise-btn-primary:hover {
    background: var(--enterprise-primary-light);
}

.enterprise-btn-primary:active {
    background: var(--enterprise-primary-dark);
}

.enterprise-btn-secondary {
    background: white;
    color: var(--enterprise-primary);
    border: 2px solid var(--enterprise-primary);
}

.enterprise-btn-secondary:hover {
    background: var(--enterprise-primary);
    color: white;
}

.enterprise-btn-block {
    width: 100%;
}

.enterprise-btn:disabled {
    opacity: 0.6;
    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;
}

