        /* ==================== 多账本功能样式 ==================== */
        .btn-ledger {
            background: rgba(255, 154, 162, 0.12);
            color: var(--primary);
            display: inline-flex;
            align-items: center;
            gap: 6px;
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            border: 1.5px solid rgba(255, 154, 162, 0.3);
            border-radius: 999px;
            transition: all 0.25s;
        }

        .btn-ledger:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            filter: brightness(0.95);
        }

        .btn-ledger .ledger-name {
            font-weight: 600;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 130px;
        }

        /* 账本弹窗 */
        .ledger-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(64, 54, 50, 0.32);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            z-index: 2500;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .ledger-modal.active {
            display: flex;
            animation: ledgerFadeIn 0.25s ease;
        }

        @keyframes ledgerFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .ledger-modal-content {
            background: var(--card-bg);
            border-radius: 24px;
            width: 100%;
            max-width: 460px;
            max-height: 85vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            box-shadow: 0 25px 80px rgba(90, 70, 60, 0.22), 0 10px 30px rgba(0,0,0,0.1);
            animation: ledgerSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes ledgerSlideIn {
            from { opacity: 0; transform: translateY(40px) scale(0.92); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        /* 弹窗头部：扁平浅底 + 发丝分隔线，与全站弹窗统一 */
        .ledger-modal-header {
            background: #FFFBFA;
            color: var(--text);
            padding: 22px 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
            border-bottom: 1px solid rgba(90, 70, 60, 0.06);
        }

        .ledger-modal-title {
            font-size: 21px;
            font-weight: 700;
            position: relative;
            z-index: 1;
        }

        .ledger-modal-subtitle {
            font-size: 13px;
            color: var(--text-light);
            margin-top: 4px;
            position: relative;
            z-index: 1;
        }

        .ledger-modal-close {
            position: relative;
            z-index: 1;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.05);
            border: none;
            color: var(--text-light);
            font-size: 15px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .ledger-modal-close:hover {
            background: rgba(0, 0, 0, 0.09);
            color: var(--text);
            transform: rotate(90deg);
        }

        .ledger-modal-body {
            flex: 1;
            overflow-y: auto;
            padding: 18px;
            background: linear-gradient(180deg, #FFFAFB 0%, #FFFFFF 100%);
        }

        .ledger-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .ledger-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 16px;
            border-radius: 16px;
            background: white;
            border: 1.5px solid #F5E6E6;
            cursor: pointer;
            transition: all 0.25s;
            position: relative;
        }

        .ledger-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 154, 162, 0.12);
            border-color: rgba(255, 154, 162, 0.4);
        }

        .ledger-item.active {
            background: linear-gradient(135deg, #FFF5F5 0%, #FFEEEE 100%);
            border-color: var(--primary);
            box-shadow: 0 4px 16px rgba(255, 154, 162, 0.18);
        }

        .ledger-item-color-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            flex-shrink: 0;
            box-shadow: 0 0 0 3px rgba(255,255,255,0.8), 0 0 0 4px rgba(0,0,0,0.06);
        }

        .ledger-item-info {
            flex: 1;
            min-width: 0;
        }

        .ledger-item-name {
            font-size: 15px;
            font-weight: 600;
            color: var(--text);
            margin-bottom: 6px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .ledger-item-stats {
            display: flex;
            gap: 12px;
            align-items: flex-start;
        }

        .ledger-item-stat {
            display: flex;
            flex-direction: column;
            gap: 1px;
        }

        .ledger-item-stat-label {
            font-size: 11px;
            color: var(--text-light);
        }

        .ledger-item-stat-value {
            font-size: 14px;
            font-weight: 700;
        }

        .ledger-item-stat.income .ledger-item-stat-value {
            color: #4ECDC4;
        }

        .ledger-item-stat.expense .ledger-item-stat-value {
            color: var(--primary);
        }

        .ledger-item-actions {
            display: flex;
            gap: 6px;
            flex-shrink: 0;
        }

        .ledger-item-action-btn {
            width: 32px;
            height: 32px;
            border-radius: 10px;
            border: none;
            background: #F5F5F5;
            color: var(--text-light);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            font-size: 14px;
        }

        .ledger-item-action-btn:hover {
            background: var(--primary);
            color: white;
            transform: scale(1.1);
        }

        .ledger-item-action-btn.delete:hover {
            background: #FF6B6B;
        }

        .ledger-item-check {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            font-size: 12px;
            display: none;
            align-items: center;
            justify-content: center;
        }

        .ledger-item.active .ledger-item-check {
            display: flex;
            animation: checkPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes checkPop {
            0% { transform: scale(0); }
            60% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }

        .ledger-empty {
            text-align: center;
            padding: 30px 20px;
            color: var(--text-light);
        }

        .ledger-empty-icon {
            font-size: 40px;
            margin-bottom: 8px;
            opacity: 0.5;
        }

        .ledger-add-btn {
            width: 100%;
            padding: 14px;
            border: 2px dashed rgba(255, 154, 162, 0.35);
            border-radius: 16px;
            background: rgba(255, 154, 162, 0.04);
            color: var(--primary);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.25s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 10px;
        }

        .ledger-add-btn:hover {
            background: rgba(255, 154, 162, 0.1);
            border-color: var(--primary);
            transform: translateY(-1px);
        }

        .ledger-add-btn-icon {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            line-height: 1;
        }

        /* 账本表单弹窗 */
        .ledger-form-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(64, 54, 50, 0.32);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            z-index: 2600;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .ledger-form-modal.active {
            display: flex;
            animation: ledgerFadeIn 0.25s ease;
        }

        .ledger-form-content {
            background: var(--card-bg);
            border-radius: 24px;
            width: 100%;
            max-width: 420px;
            box-shadow: 0 25px 80px rgba(90, 70, 60, 0.22), 0 10px 30px rgba(0,0,0,0.1);
            overflow: hidden;
            animation: ledgerSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .ledger-form-header {
            background: #FFFBFA;
            color: var(--text);
            padding: 20px 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(90, 70, 60, 0.06);
        }

        .ledger-form-title {
            font-size: 18px;
            font-weight: 700;
        }

        .ledger-form-body {
            padding: 22px 24px;
        }

        .ledger-color-picker {
            display: flex;
            gap: 10px;
            margin-bottom: 18px;
            flex-wrap: wrap;
        }

        .ledger-color-option {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            border: 3px solid white;
            box-shadow: 0 0 0 1.5px #E0E0E0;
            transition: all 0.2s;
        }

        .ledger-color-option:hover {
            transform: scale(1.1);
        }

        .ledger-color-option.selected {
            transform: scale(1.15);
            box-shadow: 0 0 0 2.5px var(--primary);
        }

        .ledger-form-actions {
            display: flex;
            gap: 10px;
            margin-top: 8px;
        }

        .ledger-form-actions .btn {
            flex: 1;
        }

        .ledger-form-cancel {
            background: #F5F5F5;
            color: var(--text);
        }

        .ledger-form-cancel:hover {
            background: #E8E8E8;
        }

        /* ==================== 汇总查看模式样式 ==================== */

        /* 账本按钮在汇总模式下的样式 */
        .btn-ledger.aggregate-active {
            background: linear-gradient(135deg, rgba(78, 205, 196, 0.18) 0%, rgba(68, 160, 141, 0.18) 100%);
            color: #1E5C4F;
            border: 1.5px solid rgba(78, 205, 196, 0.5);
        }

        .btn-ledger.aggregate-active .ledger-name {
            max-width: 80px;
        }

        /* 账本弹窗内的 Tab 控件 */
        .ledger-modal-tabs {
            display: flex;
            gap: 0;
            padding: 0 18px;
            background: white;
            border-bottom: 1.5px solid #F5E6E6;
            flex-shrink: 0;
        }

        .ledger-modal-tab {
            flex: 1;
            padding: 12px 8px;
            background: none;
            border: none;
            color: var(--text-light);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            position: relative;
            transition: color 0.2s;
            font-family: inherit;
            border-bottom: 2.5px solid transparent;
            margin-bottom: -1.5px;
        }

        .ledger-modal-tab:hover {
            color: var(--text);
        }

        .ledger-modal-tab.active {
            color: var(--primary);
        }

        .ledger-modal-tab.active::after {
            content: '';
            position: absolute;
            left: 50%;
            bottom: -1.5px;
            transform: translateX(-50%);
            width: 50%;
            height: 2.5px;
            background: var(--primary);
            border-radius: 2px;
        }

        .ledger-modal-tab .tab-badge {
            display: inline-block;
            margin-left: 4px;
            padding: 1px 6px;
            border-radius: 8px;
            background: rgba(78, 205, 196, 0.15);
            color: #2A7867;
            font-size: 11px;
            font-weight: 700;
            vertical-align: middle;
        }

        .aggregate-banner {
            display: none;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px 18px;
            margin-bottom: 18px;
            border-radius: 16px;
            background: linear-gradient(135deg, rgba(78, 205, 196, 0.12) 0%, rgba(68, 160, 141, 0.12) 100%);
            border: 1.5px solid rgba(78, 205, 196, 0.35);
            color: #2A7867;
            font-size: 14px;
        }

        .aggregate-banner.active {
            display: flex;
        }

        .aggregate-banner-left {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
            min-width: 0;
        }

        .aggregate-banner-icon {
            font-size: 18px;
            flex-shrink: 0;
        }

        .aggregate-banner-text {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .aggregate-banner-text strong {
            color: #1E5C4F;
            font-weight: 700;
        }

        .aggregate-banner-close {
            background: rgba(255, 255, 255, 0.6);
            border: 1.5px solid rgba(78, 205, 196, 0.4);
            color: #2A7867;
            padding: 5px 12px;
            border-radius: 10px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        .aggregate-banner-close:hover {
            background: white;
            color: #1E5C4F;
        }

        /* 账本复选框（汇总模式多选时） */
        .ledger-item-checkbox {
            position: absolute;
            top: 14px;
            left: 14px;
            width: 20px;
            height: 20px;
            border-radius: 6px;
            border: 2px solid #DDD;
            background: white;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 13px;
            font-weight: 700;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        .ledger-item.checked .ledger-item-checkbox {
            background: var(--primary);
            border-color: var(--primary);
        }

        .ledger-modal-content.aggregate-mode .ledger-item {
            padding-left: 46px;
        }

        .ledger-modal-content.aggregate-mode .ledger-item-check {
            display: none !important;
        }

        /* 已确认状态下，未勾选的账本变灰 */
        .ledger-item.dimmed {
            opacity: 0.4;
            background: #FAFAFA !important;
            cursor: default;
        }

        .ledger-item.dimmed:hover {
            transform: none !important;
            box-shadow: none !important;
        }

        /* 已确认状态下，已勾选的账本略微放大高亮 */
        .ledger-item.checked:not(.dimmed) {
            box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.45);
        }

        .ledger-modal-footer {
            padding: 14px 18px;
            background: white;
            border-top: 1.5px solid #F5E6E6;
            display: flex;
            gap: 10px;
            align-items: center;
            flex-shrink: 0;
        }

        .ledger-modal-footer-info {
            flex: 1;
            font-size: 13px;
            color: var(--text-light);
        }

        .ledger-modal-footer-info strong {
            color: var(--primary);
            font-weight: 700;
        }

        .ledger-modal-footer .btn {
            flex: none;
            width: auto;
            padding: 10px 22px;
        }

        .nav-tab.disabled,
        .bottom-nav-item.disabled {
            opacity: 0.4;
            cursor: not-allowed;
            pointer-events: none;
        }

        .record-item.read-only .btn-edit,
        .record-item.read-only .btn-delete {
            display: none;
        }

        .record-ledger-tag {
            display: inline-block;
            padding: 1px 7px;
            border-radius: 8px;
            font-size: 11px;
            color: white;
            margin-left: 4px;
            font-weight: 600;
            vertical-align: middle;
        }

        /* 响应式：手机端 */
        @media (max-width: 600px) {
            .header {
                flex-wrap: nowrap;
                align-items: center;
                gap: 10px;
            }
            .logo {
                gap: 8px;
                min-width: 0;
                flex: 1 1 auto;
            }
            .logo-text {
                font-size: 16px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .logo-sub {
                font-size: 8px;
                letter-spacing: 4px;
                gap: 3px;
            }

            .logo-sub-text {
                margin-right: -4px;
            }
            .header-actions {
                flex-wrap: nowrap;
                gap: 6px;
                flex-shrink: 0;
            }
            .btn-ledger {
                max-width: 110px;
                font-size: 12px;
                padding: 7px 10px;
                gap: 4px;
            }
            .btn-ledger .ledger-name {
                max-width: 60px;
                font-size: 12px;
            }
            .btn-logout {
                padding: 7px 10px;
                font-size: 12px;
            }
            .aggregate-banner {
                font-size: 12px;
                padding: 10px 12px;
                gap: 8px;
            }
            .aggregate-banner-text {
                font-size: 12px;
            }
            .ledger-modal-content {
                max-height: 90vh;
            }
            .ledger-modal-tab {
                font-size: 13px;
                padding: 10px 6px;
            }
            .ledger-modal-footer {
                padding: 12px 14px;
                gap: 6px;
            }
            .ledger-modal-footer .btn {
                padding: 8px 14px !important;
                font-size: 13px;
            }
            .ledger-modal-footer-info {
                font-size: 12px;
            }
        }
