/* 1. 2025 现代盒模型标准：让边框和内边距不再撑破容器 */
*,
*::before,
*::after {
    box-sizing: border-box;
}
:root {
    /* 2. 现代字体体系：Native First */
    --main-font:
        system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC",
        sans-serif;
    font-family: var(--main-font);
    /* 3. 数据层核心：全局开启等宽+等高数字 (不需要额外加 Class 即实现对齐) */
    font-variant-numeric: tabular-nums lining-nums;
    font-feature-settings:
        "tnum" on,
        "lnum" on;
    /* 4. 2025 移动优先：均衡字间距 */
    letter-spacing: 0.015em;
    /* 平台文字平滑优化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body {
    font-family: var(--main-font);
    color: var(--main-color);
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    /* 5. 动态背景：fixed 模式在高端手机上滚动逻辑最稳 */
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    background-attachment: fixed;
    /* 6. 2025 动态视口高度：完美适配 iPhone Safari 底部工具栏伸缩 */
    min-height: 100dvh;
    /* 7. 手机安全区域：环境感知的底部边距 */
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

/* page header (shared) */
.page-header {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
    margin: 0 0 20px 0;
    background: linear-gradient(135deg, #6ab1e8 0%, #2c6bc9 100%);
    color: white;
    border-bottom: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    height: 108px;
}

/* page header 扫光效果 */
.page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    animation: page-shimmer 10s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes page-shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/** 卡片阴影效果（统一样式） */
.panel,
.table-card,
.quotation-paper,
.form-card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 25px;
    transition: box-shadow 0.3s ease;
}

.panel:hover,
.table-card:hover,
.quotation-paper:hover,
.form-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Container for common laptop width */
.container,
.container-fluid,
.container-fixed,
.container-fixed-md,
.container-fixed-sm,
.container-fixed-xs {
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    width: 100%;
}

/* 响应式断点设定 - 遵循 2025 年主流设备标准 (Mobile First) */
.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1rem;
    padding-left: 1rem;
}

/* 手机竖屏 (iPhone 14/15/16, Android) */
@media (min-width: 375px) {
    .container {
        max-width: 100%;
    }
    body {
        font-size: 17px;
    }
}

/* 平板 / 大屏手机横屏 */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding-right: 1.5rem;
        padding-left: 1.5rem;
    }
    body {
        font-size: 18px;
    }
}

/* 笔记本电脑 / iPad Pro */
@media (min-width: 1024px) {
    .container {
        max-width: 960px;
    }
}

/* 标准桌面显示器 (1080p) */
@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }
}

/* 2K/超宽屏桌面 (1440p+) */
@media (min-width: 1536px) {
    .container {
        max-width: 1440px;
    }
}

/* 4K 屏幕优化 */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
}
