/* 页面工具样式 - 用于替代JavaScript中的内联样式 */

/* ===== 页面显示/隐藏状态 ===== */
/* 注意：这些样式与main.css中的.page:not(.active)定义保持一致 */
.page-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.page-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ===== 侧边栏状态 ===== */
.sidebar-open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    left: 0 !important;
}

/* 侧边栏宽度 - 通过CSS变量控制 */
.sidebar-member {
    width: 230px !important;
}

.sidebar-admin {
    width: var(--sidebar-width, 280px) !important;
}

/* ===== 顶部栏固定高度 ===== */
.topbar-fixed-height {
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
}

/* ===== 菜单项显示/隐藏 ===== */
.nav-item-hidden {
    display: none !important;
}

.nav-item-visible {
    display: block !important;
}

.nav-sub-item-hidden {
    display: none !important;
}

.nav-sub-list-hidden {
    display: none !important;
}

.nav-group-icon-hidden {
    display: none !important;
}

/* ===== 编辑器状态 ===== */
.editor-enabled {
    pointer-events: auto !important;
    user-select: text !important;
    cursor: text !important;
}

/* ===== 主容器高度调整 ===== */
.main-container-auto {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

.content-area-auto {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* ===== 图表加载状态 ===== */
.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.chart-container {
    position: relative;
}

/* ===== 图表备用方案样式 ===== */
.chart-fallback-container {
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.chart-fallback-title {
    margin: 0 0 20px 0;
    color: #2d3748;
    font-size: 18px;
}

.chart-fallback-content {
    margin: 20px 0;
}

.chart-fallback-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chart-fallback-item-label {
    display: flex;
    align-items: center;
}

.chart-fallback-item-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.chart-fallback-item-value {
    font-weight: bold;
    font-size: 16px;
}

.chart-fallback-item-value.primary {
    color: #dc2626;
}

.chart-fallback-item-value.secondary {
    color: #ea580c;
}

.chart-fallback-item-value.success {
    color: #10b981;
}

.chart-fallback-item-value.info {
    color: #3b82f6;
}

.chart-fallback-notice {
    margin-top: 20px;
    padding: 12px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.chart-fallback-notice-text {
    color: #3b82f6;
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-fallback-notice-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* 图表趋势卡片样式 */
.chart-trend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.chart-trend-card {
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chart-trend-value {
    color: #059669;
    font-size: 24px;
    font-weight: bold;
}

.chart-trend-label {
    color: #6b7280;
    font-size: 12px;
}

/* ===== 进度条 ===== */
.progress-fill {
    transition: width 0.3s ease;
}

/* ===== Body overflow控制 ===== */
body.overflow-auto {
    overflow: auto !important;
}

body.overflow-hidden {
    overflow: hidden !important;
}

