/* 隐藏滚动条但保留滚动功能（优化表格体验） */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* 侧边栏折叠状态样式 (仅桌面端生效) */
@media (min-width: 1024px) {
    body.sidebar-collapsed #sidebar {
        width: 5rem; /* w-20 即 80px */
    }
    body.sidebar-collapsed #main-content {
        margin-left: 5rem; /* ml-20 */
    }
    body.sidebar-collapsed .sidebar-text {
        display: none;
    }
    body.sidebar-collapsed .nav-item {
        padding-left: 0;
        padding-right: 0;
        justify-content: center;
    }
    body.sidebar-collapsed .logo-container {
        padding-left: 0;
        padding-right: 0;
        justify-content: center;
    }
    body.sidebar-collapsed .logo-text {
        display: none;
    }
}
/* ==================== Sparkline 背景卡片组件 ==================== */
.card-sparkline {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-sparkline:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    border-color: currentColor;
}

.card-sparkline::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    box-shadow: inset 0 0 20px -5px currentColor;
    transition: opacity 0.5s ease;
    pointer-events: none;
    border-radius: inherit;
}

.card-sparkline:hover::after {
    opacity: 0.15;
}

.sparkline-path {
    stroke-width: 1.0;
    transition: all 0.6s ease;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawLine 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0.3;
}

.card-sparkline:hover .sparkline-path {
    stroke-width: 1.8;
    opacity: 0.6;
    filter: drop-shadow(0 0 3px currentColor);
}

.sparkline-area {
    transform-origin: bottom;
    transition: all 0.6s ease;
    opacity: 0;
    animation: fadeInArea 1s ease 1s forwards;
}

.card-sparkline:hover .sparkline-area {
    opacity: 0.25;
    transform: scaleY(1.05);
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

@keyframes fadeInArea {
    from { opacity: 0; transform: scaleY(0.8); }
    to { opacity: 0.15; transform: scaleY(1); }
}

.sparkline-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ==================== 文章正文排版及标题字号控制 (Typography Styles) ==================== */
#editor-container h1,
.ce-block h1,
.w-e-text-container h1 {
    font-size: 2.25rem !important; /* 36px */
    line-height: 1.25 !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin-top: 1.75rem !important;
    margin-bottom: 1rem !important;
    letter-spacing: -0.025em !important;
}
.dark #editor-container h1,
.dark .ce-block h1,
.dark .w-e-text-container h1 {
    color: #f8fafc !important;
}

#editor-container h2,
.ce-block h2,
.w-e-text-container h2 {
    font-size: 1.75rem !important; /* 28px */
    line-height: 1.35 !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.85rem !important;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.4rem;
}
.dark #editor-container h2,
.dark .ce-block h2,
.dark .w-e-text-container h2 {
    color: #f1f5f9 !important;
    border-bottom-color: #334155 !important;
}

#editor-container h3,
.ce-block h3,
.w-e-text-container h3 {
    font-size: 1.35rem !important; /* 21.6px */
    line-height: 1.4 !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin-top: 1.25rem !important;
    margin-bottom: 0.75rem !important;
}
.dark #editor-container h3,
.dark .ce-block h3,
.dark .w-e-text-container h3 {
    color: #e2e8f0 !important;
}

#editor-container h4,
.ce-block h4,
.w-e-text-container h4 {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
}
.dark #editor-container h4,
.dark .ce-block h4,
.dark .w-e-text-container h4 {
    color: #cbd5e1 !important;
}

#editor-container h5,
.ce-block h5,
.w-e-text-container h5 {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    margin-top: 0.85rem !important;
    margin-bottom: 0.5rem !important;
}
.dark #editor-container h5,
.dark .ce-block h5,
.dark .w-e-text-container h5 {
    color: #94a3b8 !important;
}

#editor-container h6,
.ce-block h6,
.w-e-text-container h6 {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    text-transform: uppercase;
    margin-top: 0.75rem !important;
    margin-bottom: 0.5rem !important;
}

#editor-container p,
.ce-block p {
    margin-bottom: 1rem !important;
    line-height: 1.75 !important;
}

#editor-container ul {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
    margin-bottom: 1rem !important;
}
#editor-container ol {
    list-style-type: decimal !important;
    padding-left: 1.5rem !important;
    margin-bottom: 1rem !important;
}
#editor-container blockquote {
    border-left: 4px solid #0d9488 !important;
    padding-left: 1rem !important;
    margin: 1rem 0 !important;
    color: #64748b !important;
    font-style: italic !important;
}
.dark #editor-container blockquote {
    color: #94a3b8 !important;
}
