/* ============================================
   沥青进销记账系统 - Linear 风格
   暗色极简 · 紫色点缀 · Inter 字体
   ============================================ */

/* ── 基础 ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
}

body {
    font-family: 'JetBrainsMono', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 1.4rem;
    line-height: 1.5;
    font-weight: 400;
    color: #d0d6e0;
    background: #08090a;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body,
.num,
.stat-value,
.stat-label,
td,
th {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

a {
    color: #d0d6e0;
    text-decoration: none;
}

a:hover {
    color: #f7f8f8;
}

/* V1.9.0：导航"总览"绿色高亮 */
#header nav a.nav-overview {
    color: #27a644;
    font-weight: 590;
}

#header nav a.nav-overview:hover {
    color: #2fc156;
}

/* ── 布局 ── */
#header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 4.8rem;
    background: #0f1011;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    max-width: 100vw;
}

#main {
    max-width: 120rem;
    margin: 0 auto;
    padding: 3.2rem 2.4rem;
    overflow-x: auto;
}

#header h1 {
    font-size: 1.5rem;
    font-weight: 510;
    color: #f7f8f8;
    letter-spacing: -0.165px;
}

#header nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

#header nav a {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 1.4rem;
    font-weight: 510;
    color: #8a8f98;
    transition: color 0.15s;
}

#header nav a:hover {
    color: #f7f8f8;
    background: rgba(255, 255, 255, 0.04);
}

/* ── 导航下拉 ── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    cursor: default;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: -0.2rem;
    padding-top: 0.4rem;
    min-width: 12rem;
    background: #191a1b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.4rem;
    z-index: 200;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 4px 12px;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem !important;
    border-radius: 5px;
    font-size: 1.3rem;
    font-weight: 400;
    color: #d0d6e0;
    white-space: nowrap;
    border: none !important;
}

.nav-dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f7f8f8;
}

.nav-right-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}

.nav-dropdown-right {
    left: auto;
    right: 0;
}

#header nav a.nav-logout {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 1.3rem;
    font-weight: 510;
    color: #e5484d;
    margin-left: 0.4rem;
}

#header nav a.nav-logout:hover {
    color: #ff6b70;
    background: rgba(229, 72, 77, 0.1);
}

#footer {
    text-align: center;
    padding: 3.2rem;
    color: #62666d;
    font-size: 1.2rem;
    font-weight: 400;
}

/* ── 页面标题 ── */
.page h2 {
    font-size: 1.6rem;
    font-weight: 590;
    color: #f7f8f8;
    letter-spacing: -0.288px;
    margin-bottom: 2.4rem;
}

.page h3 {
    font-size: 1.6rem;
    font-weight: 590;
    color: #f7f8f8;
    margin: 3.2rem 0 1.6rem;
}

/* ── 统计卡片 ── */
.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2.4rem;
}

.stat-card {
    flex: 0 0 auto;
    min-width: 10rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1.6rem;
    transition: background 0.15s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.04);
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 400;
    color: #8a8f98;
    margin-bottom: 0.6rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 590;
    color: #f7f8f8;
    letter-spacing: -0.2px;
    font-variant-numeric: tabular-nums;
}

.stat-card.danger .stat-value {
    color: #e5484d;
}

.stat-card.success .stat-value {
    color: #27a644;
}

/* ── 表格 ── */
.table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.table th,
.table td {
    white-space: nowrap;
    vertical-align: middle;
    line-height: 1.5;  /* 正常行高（原 0rem 导致文本列行高被吃，操作日志表显挤） */
}

.table th {
    padding: 0.5rem 0.3rem;
    font-size: 1.3rem;
    font-weight: 510;
    color: #8a8f98;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* 表头排序链接撑满整列：点列标题任意位置都可排序（曾因内联 a 只有文字可点） */
.table th a {
    display: block;
    padding: 0.5rem 0.2rem;
    margin: -0.5rem -0.2rem;
}

.table td {
    padding: 0.5rem 0.3rem;
    font-size: 1.2rem;
    font-weight: 400;
    color: #d0d6e0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.table td:last-child {
    border-right: none;
}

/* 收付预测表（dashboard）显式 padding 0.5 0.3 */
.table-pad th,
.table-pad td {
    padding: 0.5rem 0.3rem;
}
.table.table-pad .num {
    padding: 0.5rem 0.3rem;  /* 特异性(0,3,0) > .table .num(0,2,0) */
}

/* 合同表（销售/采购）保持紧凑：覆盖 .table 宽松 padding */
.table-contract th {
    padding: 0.5rem 0.2rem;
}
.table-contract td {
    padding: 0.2rem 0.2rem;
    line-height: 0rem;  /* 合同表保持紧凑行高 */
}
.table-contract .num {
    padding: 0.2rem 0.2rem;
}

.table .num {
    padding: 0rem 0.2rem;
    line-height: 1.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* V1.9.6：已/未收款、已/未开票 双行显示 */
.table .num div {
    line-height: 1.5rem;
    white-space: nowrap;
}

.th-dual {
    white-space: nowrap;
}

/* V1.9.6：操作按钮上下两行 */
.ops-col div {
    margin: 0.5rem 0;
    white-space: nowrap;
}

.table tfoot td {
    padding: 0.5rem 0.6rem;
    font-weight: 590;
    color: #d0d6e0;
    background: rgba(255, 255, 255, 0.04);
    border-top: 1px solid rgba(94, 106, 210, 0.35);
}

.table .danger {
    color: #e5484d;
}

.table .success {
    color: #27a644;
}

.table tbody tr:hover {
    background: rgba(94, 106, 210, 0.15);
}

.table tbody tr:hover td {
    color: #f7f8f8;
}

.table tbody tr.selected {
    background: rgba(94, 106, 210, 0.3) !important;
}

.table tbody tr.selected td {
    color: #f7f8f8;
}

/* ── 表单 ── */
/* ── 日期轮盘 ── */
.date-wheel {
    display: flex;
    gap: 0.4rem;
}

.date-wheel select {
    flex: 1;
    padding: 0.8rem 0.4rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #d0d6e0;
    font-size: 1.3rem;
    font-family: inherit;
    text-align: center;
    text-align-last: center;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.date-wheel select:focus {
    outline: none;
    border-color: #5e6ad2;
}

.date-wheel .dw-year {
    flex: 1.2;
}

.date-wheel .dw-month {
    flex: 1;
}

.date-wheel .dw-day {
    flex: 1;
}

.form-group input,
.form-group select,
.form-group textarea,
select {
    width: 100%;
    padding: 0.6rem 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #d0d6e0;
    font-size: 1.3rem;
    font-family: inherit;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
select:focus {
    outline: none;
    border-color: #5e6ad2;
    box-shadow: 0 0 0 1px rgba(94, 106, 210, 0.3);
}

select option {
    background: #191a1b;
    color: #d0d6e0;
}

/* ── 按钮 ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    color: #d0d6e0;
    font-size: 1.3rem;
    font-weight: 510;
    cursor: pointer;
    transition: all 0.15s;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f7f8f8;
}

.btn-primary {
    background: #5e6ad2;
    color: #fff;
    border-color: #5e6ad2;
}

.btn-primary:hover {
    background: #7170ff;
    border-color: #7170ff;
    color: #fff;
}

.btn-danger {
    border-color: rgba(229, 72, 77, 0.3);
    color: #e5484d;
}

.btn-danger:hover {
    background: rgba(229, 72, 77, 0.1);
}

.btn-sm {
    padding: 0.5rem 0.8rem;
    font-size: 1.2rem;
    border-radius: 5px;
}

/* 图标按钮：统一正方形尺寸（导出/复制/返回），继承 .btn 布局及 hover */
.btn-icon {
    width: 3.2rem;   /* 与 .btn 高度一致，水平对齐 */
    height: 3.2rem;
    padding: 0;
    font-size: 1.4rem;
    background: #191a1b;
    flex-shrink: 0;
}

/* ── 悬浮提示：统一 help 光标（非链接） ── */
[title]:not(a):not(button) {
    cursor: help;
}

/* ── 滚动条 ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* ── 小号统计卡片 ── */
.stats-sm {
    gap: 0.6rem;
    margin-top: 1.2rem;
}

.stats-sm .stat-card {
    padding: 0.8rem 1rem;
}

.stats-sm .stat-label {
    margin-bottom: 0.3rem;
}

/* ── 小号表格 ── */
.table-sm th,
.table-sm td {
    padding: 0.3rem 0.6rem;
    font-size: 1.2rem;
}

/* ── 标签切换 ── */
.tab-group {
    display: flex;
    gap: 0.4rem;
}

.tab-btn {
    padding: 0.4rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    color: #8a8f98;
    font-size: 1.2rem;
    font-weight: 510;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.tab-btn:hover {
    color: #d0d6e0;
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    background: #5e6ad2;
    border-color: #5e6ad2;
    color: #fff;
}

/* 年份选择器 */
.year-picker {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.2rem 0.4rem;
}

.year-picker-btn {
    color: #8a8f98;
    font-size: 1.6rem;
    padding: 0 0.4rem;
    text-decoration: none;
    line-height: 1;
}

.year-picker-btn:hover {
    color: #f7f8f8;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.year-picker-val {
    color: #f7f8f8;
    font-size: 1.3rem;
    font-weight: 510;
    padding: 0 0.6rem;
    min-width: 5rem;
    text-align: center;
}

.year-picker-clear {
    color: #8a8f98;
    font-size: 1.1rem;
    padding: 0.1rem 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.year-picker-clear:hover {
    color: #e5484d;
}

.tab-panel .table td,
.tab-panel .table th {
    padding: 0.5rem 1rem;
}

.table th:first-child,
.table td:first-child {
    text-align: center;
}

.th-filter {
    cursor: pointer;
    user-select: none;
}

.table th.th-filter:hover {
    color: #5e6ad2;
}

.table th.th-filter.active-filter {
    color: #5e6ad2;
}

.filter-arrow {
    font-size: 0.8rem;
    color: #8a8f98;
}

/* 筛选下拉菜单 */
.filter-drop a {
    display: block;
    padding: 0.4rem 1.2rem;
    color: #d0d6e0;
    font-size: 1.2rem;
    font-weight: 400;
    text-decoration: none;
}

.filter-drop a:hover {
    background: rgba(255, 255, 255, 0.04);
}

.filter-drop a.active {
    color: #5e6ad2;
    font-weight: 510;
}

/* ── 开关（toggle）── */
.form-group .toggle-label {
    display: inline-flex !important;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 1.3rem;
    color: #d0d6e0;
    user-select: none;
    padding: 0.3rem 0;
    width: auto;
    line-height: 20px;
}

.toggle-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.toggle-switch {
    display: inline-block;
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    transition: background 0.2s, border-color 0.2s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #8a8f98;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.toggle-label input:checked+.toggle-switch {
    background: rgba(94, 106, 210, 0.3);
    border-color: #5e6ad2;
}

.toggle-label input:checked+.toggle-switch::after {
    transform: translateX(16px);
    background: #5e6ad2;
}

/* ── 表单增强 ── */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 1.2rem;
    color: #8a8f98;
    margin-bottom: 0.4rem;
    font-weight: 510;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238a8f98'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.4rem;
}

/* ── 弹窗通用 ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #191a1b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2.4rem;
    width: 48rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

/* ── 单位内联编辑 ── */
.entity-input {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px;
    color: #d0d6e0;
    font-size: 1.3rem;
    font-family: inherit;
    padding: 0.3rem 0.5rem;
}

.entity-input:focus {
    outline: none;
    border-color: #5e6ad2 !important;
}

/* ── 空状态 ── */
.empty-state {
    text-align: center;
    padding: 4rem;
    color: #8a8f98;
    font-size: 1.3rem;
}

/* ── 弹性布局辅助 ── */
.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-2 {
    gap: 0.8rem;
}

.gap-1 {
    gap: 0.4rem;
}

.mt-2 {
    margin-top: 0.8rem;
}

.mb-2 {
    margin-bottom: 1.6rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

/* ── 金额显示 ── */
.amount-display {
    padding: 0.8rem 1.2rem;
    background: rgba(94, 106, 210, 0.06);
    border: 1px solid rgba(94, 106, 210, 0.15);
    border-radius: 6px;
    font-weight: 590;
    font-size: 1.6rem;
    color: #5e6ad2;
}

/* ── 文字颜色 ── */
.text-subtle {
    color: #8a8f98;
}

.text-danger {
    color: #e5484d !important;
}

.text-success {
    color: #27a644 !important;
}

.text-primary {
    color: #5e6ad2 !important;
}

.text-bold {
    font-weight: 590 !important;
}

/* ── 点击行（仪表盘合同明细弹窗）── */
.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 768px) {
    html {
        font-size: 62.5%;
    }

    body {
        font-size: 1.5rem;
    }

    a {
        text-decoration: none;
    }

    #header {
        padding: 0 1.2rem;
        height: auto;
        flex-wrap: wrap;
        gap: 0.8rem;
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
    }

    .nav-right-group {
        margin-left: 0;
        gap: 0.2rem;
    }

    #main {
        padding: 1.6rem 1rem;
    }

    /* 控制栏换行，按钮不被拆散 */
    .flex-between {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .flex-between .btn,
    .flex-between .year-picker {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .table .num {
        padding: 0rem 0.5rem;
        line-height: 1.5rem;
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.3rem;
        font-size: 1.3rem;
    }

    .page h2 {
        font-size: 1.4rem;
        margin-bottom: 0.4rem;
    }

    .page h3 {
        margin: 0.2rem 0 0.2rem;
    }

    .stats {
        gap: 0.6rem;
    }

    .stat-card {
        flex: 1 1 calc(50% - 0.6rem);
        min-width: 0;
        padding: 0.8rem;
    }

    .stat-label {
        margin-bottom: 0.3rem;
        line-height: 1.2;
        font-size: 1.2rem;
    }

    .stat-value {
        line-height: 1.2;
        font-size: 1.6rem;
    }

    .stats:not(.stats-sm)>.stat-card:first-child {
        flex: 1 1 100%;
    }

    .stats-sm .stat-card {
        flex: 1 1 calc(50% - 0.6rem);
        min-width: 0;
    }

    .stats-sm .stat-value {
        font-size: 1.6rem;
    }

    .stats-sm .stat-label {
        font-size: 1.2rem;
    }

    .btn {
        font-size: 1.3rem;
        padding: 0.7rem 1.4rem;
    }

    /* 手机 .btn padding 变大，图标按钮同步增高保持对齐 */
    .btn-icon {
        width: 3.4rem;
        height: 3.4rem;
    }

    .btn-sm {
        font-size: 1.2rem;
    }

    .stat-card .stat-value {
        text-decoration: none !important;
    }

    .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 合同表（销售/采购）保持紧凑，手机版也一样 */
    .table-contract th {
        padding: 0.5rem 0.2rem;
    }

    .table-contract td {
        padding: 0.2rem 0.2rem;
        line-height: 0rem;  /* 合同表手机版也保持紧凑 */
    }

    @media (max-width: 480px) {
        html {
            font-size: 62.5%;
        }

        .stat-card {
            flex: 1 1 calc(50% - 0.8rem);
        }

        .stats:not(.stats-sm)>.stat-card:first-child {
            flex: 1 1 100%;
        }

        .stats-sm .stat-card {
            flex: 1 1 calc(50% - 0.8rem);
        }

        .stats-sm .stat-value {
            font-size: 1.4rem;
        }

        .stats-sm .stat-label {
            font-size: 1.1rem;
        }

        .stat-value {
            font-size: 1.4rem;
        }

        .stat-label {
            font-size: 1.1rem;
        }

        #header nav {
            font-size: 1.1rem;
        }
    }
}

/* ════════════════════════════════════════════════════════════════
 * V1.9.9 + 汉堡按钮（手机适配补充）
 * 电脑版：汉堡隐藏，nav 横排（原样）
 * 手机版：汉堡显示，nav 折叠为下拉面板
 * ════════════════════════════════════════════════════════════════ */

/* 汉堡按钮（默认桌面隐藏） */
.nav-toggle {
    display: none;
    width: 3.6rem;
    height: 3.6rem;
    padding: 0;
    margin-left: auto;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    display: block;
    width: 1.8rem;
    height: 2px;
    background: #d0d6e0;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle-icon::before { transform: translateY(-6px); }
.nav-toggle-icon::after  { transform: translateY(4px); }

/* header-inner 容器（桌面） */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 120rem;
    margin: 0 auto;
    padding: 0 2rem;
    height: 4.8rem;
    width: 100%;  /* 关键：占满 #header，避免被 space-between 居中挤压 */
}

/* ── 手机 ≤768px ── */
@media (max-width: 768px) {

    /* 汉堡按钮显示 */
    .nav-toggle {
        display: flex;
    }

    /* header 高度自适应 */
    .header-inner {
        height: auto;
        min-height: 4.8rem;
        padding: 0.6rem 1.2rem;
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    #header h1 {
        font-size: 1.4rem;
        flex: 1 1 auto;
        min-width: 0;
    }

    /* nav 折叠为全宽下拉面板（覆盖旧的 order:3 平铺） */
    #header #main-nav {
        display: none;
        position: absolute;      /* 浮层：展开不推内容 */
        top: 100%;               /* 贴 header 底部 */
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        margin: 0;
        padding: 0.6rem 1.2rem 1rem;
        background: #0f1011;     /* 与 header 同底色 */
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
        width: 100%;
        justify-content: flex-start;
        z-index: 200;
        order: 0;  /* 压过旧手机段 #header nav 的 order:3 平铺（已随死码删除） */
    }

    body.nav-open #header #main-nav {
        display: flex;
    }

    /* 汉堡按钮 X 态 */
    body.nav-open .nav-toggle-icon { background: transparent; }
    body.nav-open .nav-toggle-icon::before { transform: rotate(45deg); }
    body.nav-open .nav-toggle-icon::after  { transform: rotate(-45deg); }

    /* nav 链接全宽 + 加大点击区 */
    #main-nav > a,
    #main-nav .nav-dropdown > a {
        display: block;
        width: 100%;
        padding: 1rem 1.2rem !important;
        font-size: 1.5rem !important;
        border-radius: 6px;
        text-align: left;
    }

    /* dropdown 手风琴：默认收起，点击 trigger 展开（互斥） */
    #main-nav .nav-dropdown {
        position: static;
    }

    #main-nav .nav-dropdown-menu {
        display: none;
        position: static;
        margin: 0.2rem 0 0.6rem 1rem;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
        border-left: 2px solid rgba(255, 255, 255, 0.06);
        min-width: 0;
    }

    /* 展开态（JS 加 .open） */
    #main-nav .nav-dropdown.open .nav-dropdown-menu {
        display: block;
    }

    #main-nav .nav-dropdown-menu a {
        padding: 0.7rem 1rem !important;
        font-size: 1.4rem !important;
        color: #8a8f98 !important;
    }

    /* trigger 可点击（手风琴由 JS 控制，不禁用点击） */
    #main-nav .nav-dropdown-trigger {
        cursor: pointer;
        pointer-events: auto;
    }

    /* 展开态 trigger 箭头旋转 */
    #main-nav .nav-dropdown.open .nav-dropdown-trigger {
        color: #f7f8f8;
    }

    /* 退出按钮上方加分隔 */
    #main-nav .nav-logout {
        margin-top: 0.4rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 1rem !important;
    }
}

/* ════════════════════════════════════════════════════════════════
 * V1.11.1 内联样式抽类（自 views 内联迁移，渲染行为不变）
 * 工具类带 !important：与原内联样式同等最高优先级，防 .table td / .page h3 等高特异性规则改变渲染
 * ════════════════════════════════════════════════════════════════ */
.mt-3 { margin-top: 2.4rem; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-12 { margin-bottom: 1.2rem !important; }
.ml-auto { margin-left: auto; }
.m-0 { margin: 0 !important; }
.flex-1 { flex: 1; }
.w-10 { width: 10rem !important; }
.w-12 { width: 12rem !important; }
.text-strong { color: #f7f8f8 !important; font-weight: 510 !important; }
.text-subtle-sm { color: #8a8f98; font-size: 1.2rem; }
.text-subtle-xs { color: #8a8f98; font-size: 1.1rem; }
.text-underline { text-decoration: underline; }
.text-inherit { color: inherit !important; }
.page-indicator { padding: 0.3rem 0.8rem; }
.list-footer { margin-top: 1.6rem; font-size: 1.2rem; color: #8a8f98; }
.toggle-sm { font-size: 1.1rem !important; margin-top: 0.4rem !important; }
.filter-select { font-size: 1.2rem; padding: 0.3rem 0.6rem; width: auto; }
.pager-select { width: auto; font-size: 1.2rem; padding: 0.2rem 0.5rem; margin: 0 0.4rem; }
.toolbar-right { align-items: center; margin-left: auto; }
.btn-bottom { align-self: flex-end; height: fit-content; }

/* 仪表盘面板/卡片 */
.dash-panel { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 1.6rem; margin-bottom: 2.4rem; }
.dash-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 1.6rem; flex: 1; min-width: 28rem; }
.dash-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.dash-value { color: #f7f8f8; font-size: 1.8rem; font-weight: 590; }
.dash-label { color: #8a8f98; font-size: 1.1rem; margin-bottom: 0.4rem; }
.dash-num { font-size: 1.5rem; font-weight: 590; }
.dash-subtitle { color: #8a8f98; font-size: 1.3rem; }

/* 合同表单计算面板 */
.calc-row { display: flex; justify-content: space-between; margin-bottom: 0.8rem; }
.calc-label { color: #8a8f98; font-size: 1.3rem; font-weight: 510; }
.calc-value { color: #d0d6e0; font-size: 1.4rem; font-weight: 510; }
