        html { color-scheme: light; }
        html.dark { color-scheme: dark; }
        [hidden] { display: none !important; }
        html[data-statistics-scope="none"] .sider-group:has(#dashboard-nav-btn),
        html[data-statistics-scope="none"] .sider-group:has(#accordion-btn-customer),
        html[data-statistics-scope="none"] .sider-group:has(#accordion-btn-sales),
        html:not([data-statistics-scope="global"]) .sider-group:has(#accordion-btn-tenant),
        html:not([data-statistics-scope="global"]) .sider-group:has(#home-nav-btn),
        html[data-statistics-scope="none"] #main-table-wrap,
        html[data-statistics-scope="none"] #main-table-instruction,
        html[data-statistics-scope="none"] .kpi-grid { display: none !important; }
        :root {
            --selected-row-bg: #CFEBD4;
            --selected-row-text: #201F1E;
            --selected-row-soft: #CFEBD4;
            --selected-row-accent: #0078D4;
        }
        html.dark {
            --selected-row-bg: rgba(99, 102, 241, 0.55);
            --selected-row-text: #FFFFFF;
            --selected-row-soft: rgba(99, 102, 241, 0.22);
            --selected-row-accent: #818CF8;
        }
        .dark body { background-color: #111111 !important; }

        .dark .dashboard-card { background-color: #1B1A19 !important; border-color: #252423 !important; }
        .dark .dashboard-card,
        .dark .dashboard-card * { color: #ffffff !important; }

        /* 即使浏览器处于系统深色，也在 light 状态下强制回到浅色视觉 */
        html:not(.dark) body { background-color: #f8fafc !important; color: #201F1E !important; }
        html:not(.dark) .dark\:bg-slate-950 { background-color: #f8fafc !important; }
        html:not(.dark) .dark\:bg-slate-900 { background-color: #ffffff !important; }
        html:not(.dark) .dark\:bg-slate-800:not(#home-login-view *) { background-color: #e2e8f0 !important; }
        html:not(.dark) .dark\:bg-slate-700 { background-color: #ffffff !important; }
        html:not(.dark) .dark\:border-slate-800 { border-color: #e2e8f0 !important; }
        html:not(.dark) .dark\:border-slate-700 { border-color: #cbd5e1 !important; }
        html:not(.dark) .dark\:divide-slate-800 > :not([hidden]) ~ :not([hidden]) { border-color: #e2e8f0 !important; }
        html:not(.dark) .dark\:text-white { color: #0f172a !important; }
        html:not(.dark) .dark\:text-slate-300 { color: #334155 !important; }
        html:not(.dark) .dark\:text-slate-200 { color: #0f172a !important; }
        html:not(.dark) .dark\:text-slate-500 { color: #94a3b8 !important; }
        html:not(.dark) .dark\:text-slate-400 { color: #64748b !important; }
        html:not(.dark) .dark\:text-blue-400 { color: #2563eb !important; }
        html:not(.dark) .dark\:bg-blue-400\/5 { background-color: rgba(239, 246, 255, 0.7) !important; }

        /* 浅色模式下的斑马纹和行悬停 */
        .zebra-table tbody tr:nth-child(even) { background-color: #CFE6FB; }
        html:not(.dark) #main-table tbody tr:nth-child(odd) { background-color: #FFFFFF !important; }
        html:not(.dark) #main-table tbody tr:nth-child(even) { background-color: #CFE6FB !important; }
        .zebra-table tbody tr:hover,
        .zebra-table tbody tr.selected,
        .zebra-table tbody tr[aria-selected="true"] { background-color: #CFEBD4 !important; }
        .zebra-table tbody tr:hover td { color: #201F1E !important; }
        
        /* 深色模式下的斑马纹和行悬停 */
        .dark .zebra-table tbody tr:nth-child(even) { background-color: #201F1E; }
        .dark .zebra-table tbody tr:hover { background-color: rgba(0, 69, 120, 0.2) !important; }
        .dark .zebra-table tbody tr.selected,
        .dark .zebra-table tbody tr[aria-selected="true"] { background-color: #11575B !important; }
        .dark .zebra-table tbody tr.selected td,
        .dark .zebra-table tbody tr[aria-selected="true"] td { color: #FFFFFF !important; }
        .dark .zebra-table tbody tr:hover td { color: #FFFFFF !important; }

        html:not(.dark) #main-table tbody tr.customer-inactive-row,
        html.dark #main-table tbody tr.customer-inactive-row { background-color: #B4BDC6 !important; }
        html.dark #main-table tbody tr.customer-inactive-row td { color: #201F1E !important; }

        /* 三个维度（销售/客户/租户）统计主表选中行：深一点的青绿色，仅限 #main-table */
        html:not(.dark) #main-table tbody tr:hover,
        html:not(.dark) #main-table tbody tr.selected,
        html:not(.dark) #main-table tbody tr[aria-selected="true"] { background-color: #CFEBD4 !important; }
        html:not(.dark) #main-table tbody tr:hover td,
        html:not(.dark) #main-table tbody tr.selected td,
        html:not(.dark) #main-table tbody tr[aria-selected="true"] td { color: #201F1E !important; }
        html.dark #main-table tbody tr:hover,
        html.dark #main-table tbody tr.selected,
        html.dark #main-table tbody tr[aria-selected="true"] { background-color: #11575B !important; }
        html.dark #main-table tbody tr:hover td { color: #FFFFFF !important; }
        html.dark #main-table tbody tr.selected td,
        html.dark #main-table tbody tr[aria-selected="true"] td { color: #FFFFFF !important; }

        /* 表头样式优化 */
        .zebra-table thead { background-color: #F3F2F1; color: #323130; }
        .zebra-table thead th { color: #323130; font-weight: 600; border-bottom: 1px solid #EDEBE9; }
        .zebra-table tfoot { background-color: #F3F2F1; color: #323130; }
        .zebra-table tfoot td { color: #323130; font-weight: 600; }
        .dark .zebra-table thead { background-color: #252423; color: #F1F5F9; }
        .dark .zebra-table thead th { color: #F1F5F9; }
        .dark .zebra-table tfoot { background-color: #252423; color: #F1F5F9; }
        .dark .zebra-table tfoot td { color: #F1F5F9; }

        .compact-td { line-height: 1.2; }
        table > thead th { text-align: center !important; }

        table > thead,
        table > tfoot,
        table .simple-modal-thead {
            background-color: #0078D4 !important;
            color: #FFFFFF !important;
        }
        table > thead th,
        table > tfoot td,
        table .simple-modal-thead th {
            background-color: #0078D4 !important;
            color: #FFFFFF !important;
        }

        .home-hidden { display: none; }
        .nav-count-badge {
            font-size: 10px;
            color: #0078D4;
            font-weight: 800;
            background: #EEF6FC;
            border-radius: 999px;
            padding: 1px 7px;
        }
        .home-entra-login-sider { margin-top: 8px; }
        .legend-swatch-prepaid { background: #30A14E; }
        .legend-swatch-actual { background: #007FFF; }
        .legend-swatch-over-budget { background: #FF0000; }
        .legend-swatch-no-budget {
            background: #A9A9A9;
            border: 1px solid #bbb;
        }
        .th-center { text-align: center; }
        .th-left { text-align: left; }
        .td-center { text-align: center; }
        .td-right { text-align: right; }
        .td-mono { font-family: monospace; }
        .td-empty-24 {
            text-align: center;
            padding: 24px;
            color: #94a3b8;
        }
        .td-empty-16 {
            text-align: center;
            padding: 16px;
            color: #94a3b8;
        }
        .col-w-56 { width: 56px; }
        .col-w-110 { width: 110px; }
        .col-w-120 { width: 120px; }
        .col-w-140 { width: 140px; }
        .modal-header-clean {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px 20px;
        }
        .modal-header-bordered {
            flex-shrink: 0;
            border-bottom: 1px solid #cbd5e1;
        }
        html.dark .modal-header-bordered { border-bottom-color: #334155; }
        .modal-title-clean {
            font-size: 15px;
            font-weight: 900;
            text-align: center;
        }
        .modal-close-clean {
            position: absolute;
            right: 20px;
            font-size: 20px;
            line-height: 1;
            border: 0;
            background: none;
            color: inherit;
            cursor: pointer;
        }
        .modal-body-padded {
            flex: 1;
            overflow: auto;
            padding: 16px 20px;
        }
        .modal-body-padded-y {
            padding: 18px 22px;
            overflow: auto;
        }
        .modal-panel-compact {
            width: 96%;
            max-width: 600px;
            height: auto;
            max-height: 92vh;
            display: flex;
            flex-direction: column;
            border-radius: 1rem;
            background: #ffffff;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }
        .simple-modal-table {
            width: 100%;
            border-collapse: collapse;
        }
        .simple-modal-table thead,
        .simple-modal-thead {
            position: sticky;
            top: 0;
            z-index: 2;
            background: #F3F2F1;
            color: #323130;
            font-weight: 600;
        }
        .simple-modal-table tbody,
        .simple-modal-tbody { background: #ffffff; }
        .simple-modal-table th,
        .simple-modal-table td {
            border: 1px solid #EDEBE9;
            padding: 6px 12px;
            font-size: 12px;
        }
        .openai-rejection-reason-box {
            white-space: pre-wrap;
            font-size: 13px;
            line-height: 1.7;
            color: #334155;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 0.75rem;
            padding: 14px 16px;
        }
        #openai-rejection-modal {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 110;
            align-items: center;
            justify-content: center;
            background: rgba(0,0,0,0.5);
        }
        .openai-test-field {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
        }
        .openai-test-label {
            font-size: 0.78rem;
            font-weight: 800;
            color: #334155;
        }
        html.dark .openai-test-label { color: #cbd5e1; }
        .openai-test-input {
            width: 100%;
            border: 1px solid #cbd5e1;
            border-radius: 0.75rem;
            background: #ffffff;
            color: #0f172a;
            padding: 0.65rem 0.8rem;
            font-size: 0.875rem;
            outline: none;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
        }
        .openai-test-input:focus {
            border-color: #0078D4;
            box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.16);
        }
        html.dark .openai-test-input {
            background: #1B1A19;
            border-color: #334155;
            color: #f8fafc;
        }
        html.dark .openai-test-input::placeholder { color: #94a3b8; }

        /* 表格格线 */
        .zebra-table { border-collapse: collapse; }
        .zebra-table th, .zebra-table td { border: 1px solid #EDEBE9; }
        .dark .zebra-table th, .dark .zebra-table td { border-color: #334155; }

        /* 所有统计表统一使用高对比度格线。 */
        table th, table td { border: 1px solid #000000 !important; }
        html.dark table th, html.dark table td { border-color: #ffffff !important; }

        /* 三个维度统计主表格 tbody 文字适度缩小（不影响 thead / tfoot / 每日明细） */
        #main-table tbody td { font-size: 13px !important; }
        
        /* 平滑过渡动画 */
        body { transition: background-color 0.3s ease, color 0.3s ease; }

        /* ── 每日明细 Modal ── */
        #tenant-customers-modal { display: none; position: fixed; inset: 0; z-index: 100;
                       background: rgba(0,0,0,0.5); align-items: center; justify-content: center; }
        #tenant-customers-modal.open { display: flex; }
        html.dark #tenant-customers-panel {
            background: #1B1A19 !important; border: 1px solid #334155 !important;
        }
        html.dark #tenant-customers-panel thead {
            background: #252423 !important; color: #F1F5F9 !important;
        }
        html.dark #tenant-customers-tbody {
            background: #1B1A19 !important;
        }
        html.dark #tenant-customers-table th, html.dark #tenant-customers-table td {
            border-color: #ffffff !important; color: #F1F5F9 !important;
        }
        html.dark #tenant-customers-panel > div:first-child {
            border-bottom-color: #334155 !important;
            color: #F1F5F9;
        }
        html.dark #tenant-customers-title { color: #F1F5F9; }

        #customer-current-month-modal { display: none; position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, 0.5); align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; }
        #customer-current-month-modal.open { display: flex; }
        #customer-current-month-panel { width: min(560px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; overflow: hidden; background: #ffffff; border-radius: 1rem; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); animation: customer-current-month-card-in 0.2s ease-out; }
        #customer-current-month-panel-header { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 56px 14px 20px; border-bottom: 1px solid #cbd5e1; color: #334155; background: #ffffff; }
        .customer-current-month-title-row { display: flex; align-items: baseline; width: 100%; }
        .customer-current-month-title-with-kicker { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
        #customer-current-month-title { display: block; min-width: 0; color: #334155; font-size: 11px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
        #customer-current-month-kicker { flex-shrink: 0; color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; white-space: nowrap; }
        #customer-current-month-panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px; }
        .customer-current-month-download-btn { padding: 4px 10px; border: 0; border-radius: 6px; background: transparent; color: #000000; cursor: pointer; font-size: 12px; font-weight: 700; }
        .customer-current-month-header-download { position: absolute; top: 50%; right: 52px; transform: translateY(-50%); }
        .customer-current-month-download-btn:hover { background: #E1F1FF; }
        #customer-current-month-table { width: 100%; border-collapse: collapse; background: #ffffff; }
        #customer-current-month-table th { position: sticky; top: 0; z-index: 1; padding: 4px 14px; color: #323130; background: #F3F2F1; font-size: 12px; font-weight: 600; line-height: 1.2; text-align: left; }
        #customer-current-month-table th:first-child, #customer-current-month-table td:first-child { width: 112px; white-space: nowrap; }
        #customer-current-month-table th:last-child, #customer-current-month-table td:last-child { text-align: right; font-family: monospace; }
        #customer-current-month-table td { padding: 5px 14px; border: 1px solid #EDEBE9; color: #323130; font-size: 12px; }
        #customer-current-month-table td.customer-current-month-cost { position: relative; isolation: isolate; overflow: hidden; }
        #customer-current-month-table td.customer-current-month-cost::before { position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 2px; width: var(--cost-bar-width); background: #007FFF; border-right: 1px solid #007FFF; content: ''; pointer-events: none; }
        #customer-current-month-table td.customer-current-month-cost > span { position: relative; z-index: 1; }
        #customer-current-month-table th { border: 1px solid #EDEBE9; }
        #customer-current-month-table tfoot { background: #F3F2F1; color: #323130; font-weight: 800; }
        #customer-current-month-table tfoot td { padding: 5px 14px; border: 1px solid #EDEBE9; }
        #customer-current-month-table tfoot td:last-child { text-align: right; font-family: monospace; }
        #customer-current-month-table tbody tr:nth-child(even) { background: #CFE6FB; }
        #customer-current-month-table tbody tr:hover,
        #customer-current-month-table tbody tr.selected,
        #customer-current-month-table tbody tr[aria-selected="true"],
        #monthly-date-product-table tbody tr:hover,
        #monthly-date-product-table tbody tr.selected,
        #monthly-date-product-table tbody tr[aria-selected="true"] { background: #CFEBD4 !important; }
        html.dark #customer-current-month-table tbody tr:hover,
        html.dark #customer-current-month-table tbody tr.selected,
        html.dark #customer-current-month-table tbody tr[aria-selected="true"],
        html.dark #monthly-date-product-table tbody tr:hover,
        html.dark #monthly-date-product-table tbody tr.selected,
        html.dark #monthly-date-product-table tbody tr[aria-selected="true"] { background: #11575B !important; }
        html.dark #customer-current-month-table tbody tr:hover td,
        html.dark #customer-current-month-table tbody tr.selected td,
        html.dark #customer-current-month-table tbody tr[aria-selected="true"] td,
        html.dark #monthly-date-product-table tbody tr:hover td,
        html.dark #monthly-date-product-table tbody tr.selected td,
        html.dark #monthly-date-product-table tbody tr[aria-selected="true"] td { color: #FFFFFF !important; }
        html.dark #customer-current-month-panel { background: #1B1A19; border: 1px solid #334155; }
        html.dark #customer-current-month-panel-header { color: #F1F5F9; background: #1B1A19; border-color: #334155; }
        html.dark #customer-current-month-title { color: #F1F5F9; }
        html.dark #customer-current-month-kicker { color: #94a3b8; }
        html.dark .customer-current-month-download-btn { color: #ffffff; }
        html.dark .customer-current-month-download-btn:hover { background: #1d4f7a; }
        html.dark #customer-current-month-panel-body, html.dark #customer-current-month-table { background: #1B1A19; }
        html.dark #customer-current-month-table th { color: #F1F5F9; background: #252423; border-color: #334155; }
        html.dark #customer-current-month-table td { color: #F1F5F9; border-color: #334155; }
        html.dark #customer-current-month-table tfoot { color: #F1F5F9; background: #252423; }
        html.dark #customer-current-month-table tfoot td { border-color: #334155; }
        html.dark #customer-current-month-table td.customer-current-month-cost::before { background: #007FFF; border-color: #007FFF; }
        html.dark #customer-current-month-table tbody tr:nth-child(even) { background: #201F1E; }
        html.dark #customer-current-month-table tbody tr:hover { background: rgba(20, 184, 166, 0.40); }
        @keyframes customer-current-month-card-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
        @media (max-width: 640px) {
            #customer-current-month-modal { padding: 12px; }
            #customer-current-month-panel { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
            #customer-current-month-panel-header { gap: 12px; padding: 12px 44px 12px 14px; }
            .customer-current-month-title-row { align-items: flex-start; }
            #customer-current-month-title { font-size: 10px; }
            #customer-current-month-panel-body { padding: 10px; }
            #customer-current-month-table th:first-child, #customer-current-month-table td:first-child { width: 96px; }
            #customer-current-month-table th { padding: 4px 8px; }
            #customer-current-month-table td { padding: 5px 8px; }
        }

        /* ── 月份明细 Modal ── */
        #monthly-modal { display: none; position: fixed; inset: 0; z-index: 110;
                        background: rgba(0,0,0,0.5); align-items: center; justify-content: center; }
        #monthly-modal.open { display: flex; }
        #monthly-panel { height: auto; max-height: calc(100dvh - 2px); margin-block: 1px; display: flex; flex-direction: column; width: 96%; max-width: 1200px;
                        background: #ffffff; border-radius: 1rem; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
        #monthly-panel-header { flex-shrink: 0; border-bottom: 1px solid #cbd5e1; }
        #monthly-panel-header.modal-header-clean { padding-top: 8px; padding-bottom: 8px; }
        html.dark #monthly-panel-header { border-color: #334155; }
        #monthly-panel-body { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding: 8px 20px; }
        #monthly-summary-section { flex: 0 0 auto; overflow-y: auto; max-height: 320px; }
        #monthly-day-table-scroll { flex: 1; min-height: 0; overflow-y: auto; }
        html.dark #monthly-panel { background: #1B1A19; border: 1px solid #334155; }
        #monthly-panel table { border-collapse: collapse; width: 100%; }
        #monthly-panel thead { background: #F3F2F1; color: #323130; position: sticky; top: 0; z-index: 2; font-weight: 600; }
        html.dark #monthly-panel thead { background: #252423; color: #F1F5F9; }
        #monthly-panel th, #monthly-panel td { border: 1px solid #EDEBE9; padding: 6px 12px; font-size: 12px; }
        html.dark #monthly-panel th, html.dark #monthly-panel td { border-color: #334155; }
        #monthly-panel tbody tr:nth-child(even) { background: transparent; }
        html.dark #monthly-panel tbody tr:nth-child(even) { background: transparent; }
        #monthly-panel tbody tr:hover { background: #CFEBD4 !important; }
        #monthly-panel tbody tr:hover td { color: inherit !important; }
        html.dark #monthly-panel tbody tr:hover { background: transparent !important; }
        html.dark #monthly-panel tbody tr:hover td { color: #FFFFFF !important; }
        #monthly-panel td, #monthly-panel th { color: inherit; }
        html.dark #monthly-panel td, html.dark #monthly-panel th { color: #F1F5F9; }
        .month-clickable { cursor: pointer; }
        .month-clickable:hover { text-decoration: underline dotted; }

        .monthly-month-cell {
            cursor: pointer;
            -webkit-user-select: none;
            user-select: none;
            transition: background-color 0.15s ease;
        }
        /* 选中行整行柔和背景，覆盖斑马纹 */
        .zebra-table tbody tr:has(.monthly-month-cell.selected) td {
            background-color: #CFEBD4 !important;
            color: #201F1E !important;
        }
        html.dark .zebra-table tbody tr:has(.monthly-month-cell.selected) td {
            background-color: rgba(40, 153, 245, 0.20) !important;
            color: #FFFFFF !important;
        }
        .monthly-month-cell.selected {
            background: #CFEBD4 !important;
            color: #201F1E !important;
            font-weight: 900;
            box-shadow: none;
        }
        html.dark .monthly-month-cell.selected {
            background: #2899F5 !important;
            color: #FFFFFF !important;
            box-shadow: 0 0 0 1px rgba(40, 153, 245, 0.45);
        }

        #monthly-drilldown-wrap {
            margin-top: 6px;
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            padding: 6px 12px;
            background: #f8fafc;
            display: none;
            flex: 1;
            min-height: 0;
            flex-direction: column;
        }
        html.dark #monthly-drilldown-wrap {
            border-color: #334155;
            background: #1B1A19;
        }
        .monthly-day-table-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: 0 0 4px;
        }
        .monthly-detail-toolbar {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .monthly-detail-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 5px 10px;
            border-radius: 6px;
            border: 1px solid #cbd5e1;
            background: #ffffff;
            color: #475569;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .monthly-detail-toggle.active {
            background: #E1F1FF;
            border-color: #CFE6FB;
            color: #201F1E;
        }
        html.dark .monthly-detail-toggle {
            background: #111827;
            border-color: #334155;
            color: #cbd5e1;
        }
        html.dark .monthly-detail-toggle.active {
            background: #0284c7;
            border-color: #0284c7;
            color: #ffffff;
        }
        .monthly-detail-dropdown {
            position: relative;
            display: inline-flex;
            align-items: center;
        }
        .monthly-detail-menu {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            min-width: 128px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            background: #ffffff;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
            z-index: 80;
            padding: 4px;
            display: none;
            flex-direction: column;
            gap: 2px;
        }
        .monthly-detail-menu.open {
            display: flex;
        }
        .monthly-detail-menu button {
            border: none;
            background: transparent;
            text-align: left;
            border-radius: 6px;
            padding: 6px 8px;
            font-size: 12px;
            color: #334155;
            cursor: pointer;
        }
        .monthly-detail-menu button:hover {
            background: #f1f5f9;
        }
        .monthly-detail-menu button.active {
            background: #E1F1FF;
            color: #0f172a;
            font-weight: 700;
        }
        html.dark .monthly-detail-menu {
            border-color: #334155;
            background: #111827;
        }
        html.dark .monthly-detail-menu button {
            color: #e2e8f0;
        }
        html.dark .monthly-detail-menu button:hover {
            background: #1e293b;
        }
        html.dark .monthly-detail-menu button.active {
            background: #1d4f7a;
            color: #ffffff;
        }
        #monthly-day-table-title {
            font-size: 13px;
            font-weight: 800;
            color: #334155;
        }
        html.dark #monthly-day-table-title {
            color: #e2e8f0;
        }
        .monthly-day-download-btn {
            padding: 6px 12px;
            background: transparent;
            color: #000000;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 700;
        }
        html.dark .monthly-day-download-btn {
            color: #ffffff;
        }
        #monthly-day-table {
            width: 100%;
            border-collapse: collapse;
        }
        #monthly-day-table thead {
            background: #F3F2F1;
            color: #323130;
            font-weight: 600;
        }
        html.dark #monthly-day-table thead {
            background: #252423;
            color: #F1F5F9;
        }
        #monthly-day-table th,
        #monthly-day-table td {
            border: 1px solid #EDEBE9;
            padding: 6px 10px;
            font-size: 12px;
        }
        #monthly-day-table th:first-child,
        #monthly-day-table td:first-child {
            width: 1%;
            padding-right: 6px;
            padding-left: 6px;
            white-space: nowrap;
        }
        #monthly-day-table td.monthly-day-summary-cost {
            position: relative;
            isolation: isolate;
            overflow: hidden;
            text-align: right;
            font-family: monospace;
            font-weight: 600;
        }
        #monthly-day-table td.monthly-day-summary-cost::before {
            position: absolute;
            z-index: -1;
            top: 50%;
            left: 2px;
            height: 18px;
            width: var(--monthly-day-cost-bar-width);
            background: #007FFF;
            border-right: 1px solid #007FFF;
            content: '';
            pointer-events: none;
            transform: translateY(-50%);
        }
        #monthly-day-table td.monthly-day-summary-cost > span {
            position: relative;
            z-index: 1;
        }
        #monthly-day-table td.monthly-day-summary-cost-clickable { cursor: pointer; }
        #monthly-day-table td.monthly-day-summary-cost-clickable:hover > span { text-decoration: underline dotted; }
        html.dark #monthly-day-table th,
        html.dark #monthly-day-table td {
            border-color: #334155;
            color: #F1F5F9;
        }
        html.dark #monthly-day-table td.monthly-day-summary-cost::before {
            background: #007FFF;
            border-color: #007FFF;
        }
        #monthly-date-product-modal { display: none; position: fixed; inset: 0; z-index: 130; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; background: rgba(0, 0, 0, 0.5); }
        #monthly-date-product-modal.open { display: flex; }
        #monthly-date-product-panel { width: min(900px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; overflow: hidden; border-radius: 1rem; background: #ffffff; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); }
        #monthly-date-product-panel-header { flex-shrink: 0; border-bottom: 1px solid #cbd5e1; }
        #monthly-date-product-panel-body { min-height: 0; overflow: auto; padding: 14px; }
        #monthly-date-product-table-actions { display: flex; justify-content: flex-end; margin-bottom: 6px; }
        .monthly-date-product-download-btn { padding: 4px 10px; border: 0; border-radius: 6px; background: transparent; color: #000000; cursor: pointer; font-size: 12px; font-weight: 700; }
        .monthly-date-product-download-btn:hover { background: #E1F1FF; }
        #monthly-date-product-table { width: 100%; border-collapse: collapse; }
        #monthly-date-product-table thead, #monthly-date-product-table tfoot { background: #F3F2F1; color: #323130; font-weight: 700; }
        #monthly-date-product-table th, #monthly-date-product-table td { border: 1px solid #EDEBE9; padding: 6px 12px; font-size: 12px; }
        #monthly-date-product-table th:last-child, #monthly-date-product-table td:last-child { text-align: right; font-family: monospace; }
        #monthly-date-product-table tbody tr:nth-child(even) { background: #CFE6FB; }
        html.dark #monthly-date-product-panel { background: #1B1A19; border: 1px solid #334155; }
        html.dark #monthly-date-product-panel-header { border-color: #334155; }
        html.dark .monthly-date-product-download-btn { color: #ffffff; }
        html.dark .monthly-date-product-download-btn:hover { background: #1d4f7a; }
        html.dark #monthly-date-product-table thead, html.dark #monthly-date-product-table tfoot { background: #252423; color: #F1F5F9; }
        html.dark #monthly-date-product-table th, html.dark #monthly-date-product-table td { border-color: #334155; color: #F1F5F9; }
        html.dark #monthly-date-product-table tbody tr:nth-child(even) { background: #201F1E; }
        #monthly-day-table tbody tr:nth-child(even) {
            background: #CFE6FB;
        }
        html.dark #monthly-day-table tbody tr:nth-child(even) {
            background: #201F1E;
        }
        #monthly-day-table tbody tr:hover,
        #monthly-day-table tbody tr.selected,
        #monthly-day-table tbody tr[aria-selected="true"] {
            background: #CFEBD4 !important;
        }
        #monthly-day-table tbody tr:hover td {
            color: #201F1E !important;
        }
        html.dark #monthly-day-table tbody tr:hover,
        html.dark #monthly-day-table tbody tr.selected,
        html.dark #monthly-day-table tbody tr[aria-selected="true"] {
            background: rgba(20, 184, 166, 0.40) !important;
        }
        html.dark #monthly-day-table tbody tr:hover td,
        html.dark #monthly-day-table tbody tr.selected td,
        html.dark #monthly-day-table tbody tr[aria-selected="true"] td {
            color: #FFFFFF !important;
        }
        #monthly-day-table tfoot {
            background: #F3F2F1;
            color: #323130;
            font-weight: 900;
        }
        html.dark #monthly-day-table tfoot {
            background: #252423;
            color: #F1F5F9;
        }
        .monthly-day-filter-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-left: 4px;
            width: 16px;
            height: 16px;
            border-radius: 3px;
            background: rgba(255,255,255,0.2);
            border: none;
            cursor: pointer;
            font-size: 9px;
            color: inherit;
            vertical-align: middle;
            line-height: 1;
            transition: background 0.15s;
        }
        .monthly-day-filter-btn.active {
            background: #ffffff;
            color: #1e293b;
        }
        .monthly-day-filter-btn:hover:not(.active) {
            background: rgba(255,255,255,0.4);
        }
        #monthly-day-filter-panel {
            position: fixed;
            background: #fff;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.2);
            z-index: 9999;
            width: 250px;
            max-height: min(440px, 70vh);
            padding: 12px;
            display: none;
            flex-direction: column;
            gap: 6px;
            font-size: 12px;
            overflow: hidden;
        }
        #monthly-day-filter-panel.open { display: flex; }
        html.dark #monthly-day-filter-panel {
            background: #1B1A19;
            border-color: #334155;
            color: #F1F5F9;
        }

        .monthly-chart-cell { min-width: 420px; }
        #main-table.customer-all-compact { min-width: 1280px; }
        #main-table.customer-all-compact th,
        #main-table.customer-all-compact td { padding-left: 4px; padding-right: 4px; }
        #main-table.customer-all-compact .monthly-chart-cell { min-width: 176px; }
        #main-table.customer-detail-trend-fluid th:last-child,
        #main-table.customer-detail-trend-fluid .monthly-chart-cell { width: auto; min-width: 176px; }
        #main-table.trend-fluid th:last-child,
        #main-table.trend-fluid .monthly-chart-cell { width: auto; min-width: 176px; }
        table.home-statistics-percent { table-layout: fixed; }
        [data-subscription-home] #main-table { width: 100%; min-width: 1440px; }
        table.home-statistics-percent th,
        table.home-statistics-percent td { white-space: nowrap !important; overflow-wrap: normal !important; word-break: normal !important; overflow: hidden; text-overflow: clip; }
        table.home-statistics-percent td > div:not(.monthly-chart-wrap) { white-space: nowrap; max-width: none; overflow: hidden; text-overflow: clip; }
        table.home-statistics-percent td > span.block { display: inline; margin-left: 4px; }
        .monthly-chart-wrap {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 2px 0;
        }
        .monthly-chart-bars {
            height: 56px;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            gap: 14px;
        }
        .monthly-chart-bar {
            flex: 1 1 0;
            width: 9px;
            min-width: 7px;
            border-radius: 4px 4px 0 0;
            background: #007FFF;
            cursor: pointer;
            opacity: 0.92;
            transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
        }
        .monthly-chart-wrap:hover .monthly-chart-bar {
            opacity: 1;
        }
        .monthly-chart-wrap:hover .monthly-chart-bar:hover {
            background: #007FFF;
            transform: translateY(-2px);
        }
        .monthly-chart-labels {
            display: flex;
            justify-content: center;
            gap: 14px;
            font-size: 9px;
            line-height: 1;
            color: #64748b;
            font-family: monospace;
            letter-spacing: 0.02em;
        }
        .monthly-chart-labels span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        .monthly-chart-caption {
            font-size: 10px;
            line-height: 1;
            color: #475569;
            font-weight: 700;
        }
        .monthly-chart-twelve { max-width: 100%; align-items: flex-start; overflow-x: auto; }
        .monthly-chart-twelve .monthly-chart-bars,
        .monthly-chart-twelve .monthly-chart-labels { flex-shrink: 0; margin-inline: auto; }
        .monthly-chart-twelve .monthly-chart-bar { flex: 0 0 auto; }
        .monthly-chart-twelve .monthly-chart-labels span { flex: 0 0 auto; }
        html.dark .monthly-chart-bar {
            background: #007FFF;
        }
        html.dark .monthly-chart-wrap:hover .monthly-chart-bar:hover {
            background: #007FFF;
        }
        html.dark .monthly-chart-labels,
        html.dark .monthly-chart-caption {
            color: #ffffff;
        }

        .download-btn-clean {
            background: transparent !important;
            border: none;
            color: #000000;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 700;
            padding: 6px 12px;
        }
        .download-btn-clean:hover {
            background: rgba(37, 99, 235, 0.08) !important;
        }
        html.dark .download-btn-clean {
            color: #e2e8f0;
        }
        html.dark .download-btn-clean:hover {
            background: rgba(226, 232, 240, 0.15) !important;
        }

        /* 每日明细筛选按鈕 */
        .daily-filter-btn {
            display: inline-flex; align-items: center; justify-content: center;
            margin-left: 4px; width: 16px; height: 16px; border-radius: 3px;
            background: rgba(255,255,255,0.2); border: none; cursor: pointer;
            font-size: 9px; color: inherit; vertical-align: middle; line-height: 1;
            transition: background 0.15s;
        }
        .daily-filter-btn.active { background: #ffffff; color: #1e293b; }
        .daily-filter-btn:hover:not(.active) { background: rgba(255,255,255,0.4); }

        /* 筛选下拉面板 */
        #home-openai-filter-panel {
            position: fixed; background: #fff; border: 1px solid #cbd5e1;
            border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
            z-index: 9999; width: 250px; max-height: min(440px, 70vh); padding: 12px;
            display: none; flex-direction: column; gap: 6px; font-size: 12px;
            overflow: hidden; box-sizing: border-box; margin-left: 0; transform: none;
        }
        #home-openai-filter-panel.open { display: flex; }
        html.dark #home-openai-filter-panel { background: #1e293b; border-color: #334155; color: #e2e8f0; }
        #home-openai-filter-search {
            width: 100%; box-sizing: border-box; padding: 8px 10px;
            border: 1px solid #cbd5e1; border-radius: 6px; font-size: 12px; outline: none;
            background: inherit; color: inherit;
        }
        html.dark #home-openai-filter-search { border-color: #475569; }
        .daily-filter-list {
            flex: 1; min-height: 0; max-height: 320px; overflow-y: auto;
            display: flex; flex-direction: column; gap: 1px; padding-right: 1px;
        }
        .daily-filter-list label {
            display: flex; align-items: center; gap: 3px; padding: 2px 5px;
            border-radius: 6px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            min-height: 18px; line-height: 1.1;
        }
        .daily-filter-list input[type="checkbox"] { margin: 0; flex-shrink: 0; }
        .daily-filter-list span { overflow: hidden; text-overflow: ellipsis; }
        .daily-filter-list label:hover { background: #f1f5f9; }
        html.dark .daily-filter-list label:hover { background: #334155; }
        #home-openai-filter-panel > div:not(.daily-filter-list),
        #sub-filter-panel > div:not(.daily-filter-list) {
            display: flex; align-items: center; gap: 8px; padding: 1px 2px 0;
        }
        #home-openai-filter-panel > div:not(.daily-filter-list) span,
        #sub-filter-panel > div:not(.daily-filter-list) span {
            cursor: pointer; font-size: 11px; font-weight: 600;
        }

        /* 12M 累计金额筛选 */
        #amount-filter-panel, #column-amount-filter-panel {
            position: fixed; background: #fff; border: 1px solid #cbd5e1;
            border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
            z-index: 9999; width: 140px; padding: 6px 0;
            display: none; flex-direction: column; font-size: 13px; box-sizing: border-box; margin-left: 0; transform: none;
        }
        #amount-filter-panel.open, #column-amount-filter-panel.open { display: flex; }
        html.dark #amount-filter-panel, html.dark #column-amount-filter-panel { background: #1B1A19; border-color: #334155; color: #F1F5F9; }
        #amount-filter-panel label, #column-amount-filter-panel label {
            display: flex; align-items: center; gap: 6px; padding: 6px 14px;
            cursor: pointer; white-space: nowrap;
        }
        #amount-filter-panel label:hover, #column-amount-filter-panel label:hover { background: #f1f5f9; }
        html.dark #amount-filter-panel label:hover, html.dark #column-amount-filter-panel label:hover { background: #334155; }

        /* 主表格订阅列/租户列筛选 */
        #sub-filter-panel, #tenant-filter-panel, .subscription-text-filter-panel {
            position: fixed; background: #fff; border: 1px solid #cbd5e1;
            border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
            z-index: 9999; width: min(260px, calc(100vw - 16px)); max-height: min(460px, 72vh); padding: 12px;
            display: none; flex-direction: column; gap: 6px; font-size: 12px;
            overflow: hidden; box-sizing: border-box; margin-left: 0; transform: none;
        }
        #sub-filter-panel.open, #tenant-filter-panel.open, .subscription-text-filter-panel.open { display: flex; }
        html.dark #sub-filter-panel, html.dark #tenant-filter-panel, html.dark .subscription-text-filter-panel { background: #1B1A19; border-color: #334155; color: #F1F5F9; }

        #meta-filter-panel, .analysis-list-filter-panel {
            position: fixed; background: #fff; border: 1px solid #cbd5e1;
            border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
            z-index: 9999; width: 260px; max-height: min(460px, 72vh); padding: 12px;
            display: none; flex-direction: column; gap: 6px; font-size: 12px;
            overflow: hidden; box-sizing: border-box; margin-left: 0; transform: none;
        }
        #meta-filter-panel.open, .analysis-list-filter-panel.open { display: flex; }
        html.dark #meta-filter-panel, html.dark .analysis-list-filter-panel { background: #1e293b; border-color: #334155; color: #e2e8f0; }


        .app-shell {
            max-width: 116rem;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 220px minmax(0, 1fr);
            gap: 16px;
            min-height: calc(100vh - 48px);
            transition: grid-template-columns 0.28s ease;
        }
        .sider-panel {
            background: #F3F2F1;
            border: 1px solid #e2e8f0;
            border-radius: 18px;
            box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            position: sticky;
            top: 16px;
            height: fit-content;
            max-height: calc(100vh - 32px);
            overflow: auto;
            transition: padding 0.28s ease;
        }
        html.dark .sider-panel {
            background: #161514;
            border-color: #252423;
        }
        .sider-section-title {
            font-size: 15px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #64748b;
            margin-bottom: 6px;
            text-align: center;
        }
        .sider-title-row {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 32px;
        }
        .sider-title-text {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            pointer-events: none;
            font-size: 15px;
            font-weight: 800;
            white-space: normal;
            overflow-wrap: anywhere;
            padding: 0 34px;
            line-height: 1.25;
            box-sizing: border-box;
        }
        .sider-dimension-label {
            display: inline-flex;
            align-items: center;
            justify-content: flex-start;
            width: 100%;
            position: relative;
            gap: 6px;
            text-align: left;
            padding-left: 30px;
            box-sizing: border-box;
            min-width: 0;
        }
        .sider-dimension-icon-wrap {
            position: absolute;
            left: 0;
            width: 24px;
            height: 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
        }
        .sider-dimension-icon-wrap svg {
            width: 16px;
            height: 16px;
        }
        html.dark .sider-dimension-icon-wrap { color: #94a3b8; }
        .sider-icon-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 30px;
            height: 30px;
            border-radius: 999px;
            border: 1px solid #cbd5e1;
            background: linear-gradient(180deg, #ffffff 0%, #eaf3ff 100%);
            color: #334155;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 5px 12px rgba(15, 23, 42, 0.12), 0 1px 2px rgba(15, 23, 42, 0.08);
            transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
        }
        #sidebar-toggle {
            border-radius: 999px;
        }
        .sider-icon-btn:hover {
            transform: translateY(calc(-50% - 1px));
            border-color: #93c5fd;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 8px 16px rgba(14, 116, 144, 0.18), 0 2px 4px rgba(15, 23, 42, 0.08);
        }
        .sider-icon-btn:active {
            transform: translateY(calc(-50% + 1px));
            box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.12), 0 2px 4px rgba(15, 23, 42, 0.08);
        }
        .sider-icon-btn svg {
            width: 18px;
            height: 18px;
            filter: drop-shadow(0 1px 0 rgba(255,255,255,0.65));
        }
        .sider-icon-btn.left { left: 0; }
        .sider-icon-btn.right { right: 0; }
        html.dark .sider-section-title { color: #94a3b8; }
        html.dark .sider-icon-btn {
            border-color: #334155;
            background: linear-gradient(180deg, #243447 0%, #17212f 100%);
            color: #cbd5e1;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 18px rgba(2, 6, 23, 0.34), 0 1px 2px rgba(0,0,0,0.2);
        }
        html.dark .sider-icon-btn:hover {
            border-color: #38bdf8;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 20px rgba(8, 47, 73, 0.36), 0 2px 4px rgba(0,0,0,0.22);
        }
        .app-shell.sidebar-collapsed {
            grid-template-columns: 52px minmax(0, 1fr);
            gap: 8px;
        }
        .app-shell.sidebar-collapsed .sider-panel {
            padding-left: 4px;
            padding-right: 4px;
            overflow: hidden;
        }
        .app-shell.sidebar-collapsed .sider-title-row {
            min-height: 28px;
        }
        .app-shell.sidebar-collapsed .sider-icon-btn {
            width: 30px;
            height: 30px;
        }
        .app-shell.sidebar-collapsed .sider-icon-btn svg {
            width: 18px;
            height: 18px;
        }
        .app-shell.sidebar-collapsed .sider-icon-btn.left {
            left: 50%;
            transform: translate(-50%, -50%);
        }
        .app-shell.sidebar-collapsed .sider-title-text,
        .app-shell.sidebar-collapsed .sider-group,
        .app-shell.sidebar-collapsed .sider-bottom-admin,
        .app-shell.sidebar-collapsed #home-entra-logout-icon-btn {
            display: none !important;
        }
        .app-shell.sidebar-collapsed .sider-section-title {
            margin-bottom: 0;
        }
        body.sidebar-collapsed-page {
            padding-left: 2px !important;
        }
        .nav-overview-btn {
            width: 100%;
            text-align: left;
            border: 1px solid #bfdbfe;
            background: linear-gradient(135deg, #e0f2fe 0%, #bfdbfe 100%);
            color: #0f172a;
            border-radius: 12px;
            padding: 10px 12px;
            font-size: 12px;
            font-weight: 800;
            cursor: pointer;
        }
        html.dark .nav-overview-btn {
            border-color: #334155;
            background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
            color: #e2e8f0;
        }
        .sider-group { border-top: none; padding-top: 0; margin-bottom: 12px; display: flex; flex-direction: column; }
        html.dark .sider-group { border-top: none; }
        .sider-bottom-admin {
            margin-top: auto;
            padding-top: 10px;
            border-top: none;
        }
        html.dark .sider-bottom-admin { border-top: none; }
        .admin-entry-btn {
            width: 100%;
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            background: #f8fafc;
            color: #1e293b;
            font-size: 14px;
            font-weight: 800;
            text-align: center;
            padding: 10px 12px;
            cursor: pointer;
        }
        .admin-entry-btn:hover { background: #e2e8f0; }
        html.dark .admin-entry-btn {
            border-color: #334155;
            background: #1e293b;
            color: #e2e8f0;
        }
        html.dark .admin-entry-btn:hover { background: #334155; }
        .sider-subtitle {
            font-size: 15px;
            font-weight: 800;
            color: #334155;
            margin: 0;
            text-align: left;
            white-space: nowrap;
            flex: 0 1 auto;
        }
        html.dark .sider-subtitle { color: #cbd5e1; }
        .sider-accordion-btn {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 8px;
            background: #f1f5f9;
            border: 1px solid transparent;
            border-radius: 8px;
            cursor: pointer;
            padding: 10px 20px 10px 8px;
            min-height: 44px;
            color: inherit;
            position: relative;
        }
        .sider-mode-btn {
            padding-right: 10px;
        }
        .sider-mode-btn.mode-active {
            border-color: #0078D4;
            background: #E1F1FF;
            box-shadow: 0 4px 14px rgba(0, 120, 212, 0.12);
        }
        .sider-accordion-btn:hover { background: #e2e8f0; }
        html.dark .sider-accordion-btn {
            background: #1e293b;
            border-color: #334155;
        }
        html.dark .sider-mode-btn.mode-active {
            border-color: #14B8A6;
            background: rgba(20, 184, 166, 0.40);
            box-shadow: 0 6px 16px rgba(20, 184, 166, 0.16);
        }
        html.dark .sider-accordion-btn:hover { background: #334155; }
        #dingtalk-self-bind-panel {
            background: #f1f5f9;
            border-color: transparent;
        }
        html.dark #dingtalk-self-bind-panel {
            background: #1e293b;
            border-color: #334155;
        }
        #dingtalk-self-bind-status {
            color: #334155;
            opacity: 1;
        }
        html.dark #dingtalk-self-bind-status { color: #cbd5e1; }
        .sider-accordion-icon {
            font-size: 14px;
            color: #64748b;
            transition: transform 0.2s ease;
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
        }
        html.dark .sider-accordion-icon { color: #94a3b8; }
        .sider-accordion-btn.open .sider-accordion-icon { transform: translateY(-50%) rotate(90deg); }
        .sider-accordion-body {
            max-height: 0;
            opacity: 0.3;
            overflow: hidden;
            transition: max-height 0.25s ease, opacity 0.2s ease;
        }
        .sider-accordion-body.open { 
            opacity: 1;
            overflow: visible;
        }
        .sider-accordion-body.open .sider-nav-list {
            max-height: calc(100vh - 280px);
            overflow-y: auto;
            overflow-x: hidden;
        }
        .sider-nav-list {
            display: flex;
            flex-direction: column;
            gap: 2px;
            max-height: none;
            overflow: auto;
            padding-right: 4px;
        }
        .sider-nav-divider {
            height: 1px;
            margin: -1px 4px 8px;
            background: linear-gradient(90deg, rgba(148, 163, 184, 0.15) 0%, rgba(148, 163, 184, 0.6) 50%, rgba(148, 163, 184, 0.15) 100%);
        }
        html.dark .sider-nav-divider {
            background: linear-gradient(90deg, rgba(100, 116, 139, 0.15) 0%, rgba(100, 116, 139, 0.65) 50%, rgba(100, 116, 139, 0.15) 100%);
        }
        .sider-nav-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            border: 1px solid transparent;
            background: #ffffff;
            color: #201F1E;
            border-radius: 8px;
            padding: 7px 9px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 700;
            text-align: left;
            margin-bottom: 8px;
            white-space: nowrap;
        }
        .sider-nav-item > span:first-child {
            flex: 1;
            min-width: 0;
            text-align: left;
            white-space: normal;
            overflow-wrap: anywhere;
        }
        .sider-nav-item:hover { background: #E1F1FF; }
        .sider-nav-item.home {
            border-color: rgba(0, 120, 212, 0.28);
            background: linear-gradient(135deg, #eff8ff 0%, #e7f3ff 100%);
            color: #0f172a;
            box-shadow: 0 4px 14px rgba(0, 120, 212, 0.12);
            margin-bottom: 10px;
        }
        .home-nav-label {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        .home-nav-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 900;
            background: rgba(37, 99, 235, 0.13);
            color: #1d4ed8;
            line-height: 1;
        }
        .sider-nav-item.home > span:first-child {
            font-weight: 800;
            letter-spacing: 0.01em;
        }
        .sider-nav-item.home::before {
            content: '';
            width: 3px;
            align-self: stretch;
            border-radius: 999px;
            background: linear-gradient(180deg, #0ea5e9 0%, #2563eb 100%);
            margin-right: 2px;
        }
        .sider-nav-item.home:hover {
            background: linear-gradient(135deg, #e0f0ff 0%, #d9ecff 100%);
            border-color: rgba(0, 120, 212, 0.45);
        }
        .sider-nav-item.home.active {
            border-color: #0078d4;
            background: linear-gradient(135deg, #d8ebff 0%, #cfe7ff 100%);
            color: #0b3b66;
            box-shadow: 0 6px 18px rgba(0, 120, 212, 0.18);
        }
        .sider-nav-item.active {
            border-color: #0078D4;
            background: #E1F1FF;
            color: var(--selected-row-text);
        }
        html.dark .sider-nav-item {
            background: #252423;
            color: #FFFFFF;
        }
        html.dark .sider-nav-item.home {
            border-color: rgba(56, 189, 248, 0.35);
            background: linear-gradient(135deg, rgba(3, 105, 161, 0.42) 0%, rgba(30, 64, 175, 0.38) 100%);
            color: #e2f5ff;
            box-shadow: 0 8px 18px rgba(2, 132, 199, 0.18);
        }
        html.dark .home-nav-icon {
            background: rgba(34, 211, 238, 0.2);
            color: #67e8f9;
        }
        html.dark .sider-nav-item.home::before {
            background: linear-gradient(180deg, #22d3ee 0%, #38bdf8 100%);
        }
        html.dark .sider-nav-item.home:hover {
            background: linear-gradient(135deg, rgba(8, 145, 178, 0.38) 0%, rgba(30, 64, 175, 0.42) 100%);
            border-color: rgba(56, 189, 248, 0.55);
        }
        html.dark .sider-nav-item.home.active {
            border-color: #22d3ee;
            background: linear-gradient(135deg, rgba(14, 116, 144, 0.5) 0%, rgba(30, 64, 175, 0.5) 100%);
            color: #ecfeff;
        }
        html.dark .sider-nav-item:hover { background: rgba(0, 69, 120, 0.2); }
        html.dark .sider-nav-item.active {
            border-color: #14B8A6;
            background: rgba(20, 184, 166, 0.40);
            color: var(--selected-row-text);
        }
        .sider-nav-item .count {
            font-size: 10px;
            color: #605E5C;
            font-weight: 700;
            flex-shrink: 0;
        }
        .sider-nav-item.child { padding-left: 18px; }
        .sales-department-toggle { width: 100%; }
        .sales-department-arrow { font-size: 10px; flex-shrink: 0; }
        .sales-department-toggle[aria-expanded="true"] .sales-department-arrow { transform: rotate(90deg); }
        .sales-department-children { display: flex; flex-direction: column; gap: 2px; }
        .sales-department-children[hidden] { display: none; }
        #sales-nav .sales-department-children > .sider-nav-item.child,
        #sales-nav > .sider-nav-item.child { padding-left: 32px; }
        #accordion-body-sales.open { overflow: hidden; }
        html.dark .sider-nav-item .count { color: #A19F9D; }
        .sider-panel .sider-nav-item:hover,
        .sider-panel .sider-accordion-btn:hover,
        html.dark .sider-panel .sider-nav-item:hover,
        html.dark .sider-panel .sider-accordion-btn:hover {
            background: #CFEBD4;
            color: #201F1E;
        }
        .sider-panel .sider-nav-item.active,
        .sider-panel .sider-mode-btn.mode-active,
        html.dark .sider-panel .sider-nav-item.active,
        html.dark .sider-panel .sider-mode-btn.mode-active {
            background: #CFE6FB;
            color: #201F1E;
        }
        .sider-panel .sider-nav-item:is(:hover, .active) .count,
        .sider-panel .sider-nav-item:is(:hover, .active) .home-nav-icon,
        .sider-panel .sider-accordion-btn:is(:hover, .mode-active) :is(.sider-subtitle, .sider-dimension-icon-wrap, .sider-accordion-icon),
        html.dark .sider-panel .sider-nav-item:is(:hover, .active) .count,
        html.dark .sider-panel .sider-nav-item:is(:hover, .active) .home-nav-icon,
        html.dark .sider-panel .sider-accordion-btn:is(:hover, .mode-active) :is(.sider-subtitle, .sider-dimension-icon-wrap, .sider-accordion-icon) {
            color: #201F1E;
        }
        .sider-search {
            width: 100%;
            box-sizing: border-box;
            padding: 7px 9px;
            border: 1px solid #8A8886;
            border-radius: 8px;
            background: #ffffff;
            color: #201F1E;
            font-size: 12px;
            margin-bottom: 7px;
        }
        html.dark .sider-search {
            background: #252423;
            border-color: #484644;
            color: #FFFFFF;
        }
        .sider-search:focus {
            outline: none;
            border-color: #0078D4;
            box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.15);
        }
        .sider-search-wrap {
            position: relative;
            margin-bottom: 7px;
        }
        .sider-search-wrap .sider-search {
            margin-bottom: 0;
            padding-right: 28px;
        }
        .sider-search-clear {
            position: absolute;
            right: 6px;
            top: 50%;
            transform: translateY(-50%);
            width: 18px;
            height: 18px;
            border: none;
            border-radius: 999px;
            background: #e2e8f0;
            color: #334155;
            font-size: 12px;
            line-height: 1;
            cursor: pointer;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 0;
        }
        .sider-search-clear.show {
            display: inline-flex;
        }
        html.dark .sider-search-clear {
            background: #334155;
            color: #e2e8f0;
        }
        .content-panel {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }
        .dashboard-header {
            background: #FFFFFF;
            border: 1px solid #e2e8f0;
            border-radius: 18px;
            box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
            padding: 8px 16px;
            position: relative;
        }
        .dashboard-title-row {
            position: relative;
            min-height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        .dashboard-theme-btn {
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 30px;
            height: 30px;
            border-radius: 999px;
            border: 1px solid #cbd5e1;
            background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
            color: #334155;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 5px 12px rgba(15, 23, 42, 0.12), 0 1px 2px rgba(15, 23, 42, 0.08);
            transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
        }
        .dashboard-logout-btn {
            left: 0;
            right: auto;
        }
        .dashboard-theme-btn:hover {
            transform: translateY(calc(-50% - 1px));
            border-color: #93c5fd;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 8px 16px rgba(14, 116, 144, 0.18), 0 2px 4px rgba(15, 23, 42, 0.08);
        }
        .dashboard-theme-btn:active {
            transform: translateY(calc(-50% + 1px));
            box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.12), 0 2px 4px rgba(15, 23, 42, 0.08);
        }
        .dashboard-theme-btn svg {
            width: 18px;
            height: 18px;
            filter: drop-shadow(0 1px 0 rgba(255,255,255,0.65));
        }
        html.dark .dashboard-header {
            background: #111111;
            border-color: #252423;
        }
        html.dark .dashboard-theme-btn {
            border-color: #334155;
            background: linear-gradient(180deg, #243447 0%, #17212f 100%);
            color: #cbd5e1;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 18px rgba(2, 6, 23, 0.34), 0 1px 2px rgba(0,0,0,0.2);
        }
        html.dark .dashboard-theme-btn:hover {
            border-color: #38bdf8;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 20px rgba(8, 47, 73, 0.36), 0 2px 4px rgba(0,0,0,0.22);
        }
        .kpi-grid {
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 280px));
            justify-content: space-between;
            gap: 28px;
        }
        .kpi-grid.subscription-kpi-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
        .subscription-month-select {
            color: #0f172a;
            background: #fff;
            border-radius: 4px;
            padding: 2px;
            font: 12px monospace;
        }
        html.dark .subscription-month-select {
            color: #f1f5f9;
            background: #0f172a;
        }
        .kpi-card {
            border-radius: 12px;
            border: 1px solid #EDEBE9;
            background: #F8F9FA;
            padding: 1px 12px;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 10px;
            row-gap: 0;
        }
        html.dark .kpi-card {
            border-color: #252423;
            background: #1B1A19;
        }
        .kpi-label {
            font-size: 12px;
            font-weight: 700;
            color: #64748b;
            white-space: nowrap;
        }
        html.dark .kpi-label { color: #94a3b8; }
        .kpi-value {
            font-size: 18px;
            white-space: nowrap;
            font-weight: 900;
            color: #201F1E;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
        }
        html.dark .kpi-value { color: #FFFFFF; }
        .dimension-badge {
            width: fit-content;
            margin: 0 auto;
            border: 1px solid #EEF6FC;
            border-radius: 999px;
            background: #EEF6FC;
            color: #0078D4;
            font-size: 14px;
            font-weight: 800;
            padding: 6px 16px;
        }
        html.dark .dimension-badge {
            border-color: rgba(0, 69, 120, 0.4);
            background: rgba(0, 69, 120, 0.4);
            color: #2899F5;
        }

        .zebra-table thead th {
            white-space: nowrap;
        }
        .th-filter-wrap {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            white-space: nowrap;
            vertical-align: middle;
        }
        .dimension-switching {
            animation: dimension-switch 0.28s ease;
        }
        @keyframes dimension-switch {
            0% { opacity: 0.55; transform: translateY(6px); }
            100% { opacity: 1; transform: translateY(0); }
        }


        @media (max-width: 1100px) {
            .app-shell {
                grid-template-columns: 1fr;
            }
            .app-shell.sidebar-collapsed {
                grid-template-columns: 1fr;
            }
            .app-shell.sidebar-collapsed .sider-title-text,
            .app-shell.sidebar-collapsed .sider-group,
            .app-shell.sidebar-collapsed .sider-bottom-admin,
            .app-shell.sidebar-collapsed #home-entra-logout-icon-btn {
                display: initial !important;
            }
            .app-shell.sidebar-collapsed .sider-panel {
                padding-left: 14px;
                padding-right: 14px;
                overflow: auto;
            }
            .dashboard-theme-btn {
                right: 2px;
            }
            .sider-panel {
                position: static;
                max-height: none;
            }
            .kpi-grid, .kpi-grid.subscription-kpi-grid {
                grid-template-columns: 1fr;
            }
        }

        /* ============================================================
           === UI-1: design tokens + dark palette + table polish ===
           ï¼ˆä»…æ–°å¢žï¼Œä¸åˆ é™¤æ—¢æœ‰è§„åˆ™ï¼›ä¼˜å…ˆçº§ä»…åœ¨æ–°é€‰æ‹©å™¨ä¸Šæ–½åŠ ï¼‰
           ============================================================ */
        :root {
            --ui-radius-sm: 4px;
            --ui-radius-md: 6px;
            --ui-radius-lg: 10px;
            --ui-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
            --ui-shadow-md: 0 2px 6px rgba(0,0,0,0.08);
            --ui-shadow-lg: 0 6px 16px rgba(0,0,0,0.10);
            --ui-ease: cubic-bezier(.2,.8,.2,1);
            --ui-dur-fast: 120ms;
            --ui-dur-base: 180ms;
            --ui-dur-slow: 260ms;
        }

        /* U4 æ·±è‰²æ¨¡å¼è‰²é˜¶ï¼šçº¯é»‘ â†’ å¾®æš–æ·±ç°ï¼Œå¡ç‰‡å±‚æ¬¡æ›´ç«‹ä½“ */
        html.dark body { background-color: #15171A !important; }
        html.dark .dashboard-card {
            background-color: #1F2126 !important;
            border-color: #2A2D33 !important;
            box-shadow: 0 1px 0 rgba(255,255,255,0.02), 0 8px 24px rgba(0,0,0,0.35);
        }
        /* ä¸Žå¡ç‰‡åŒæºçš„æ¬¡çº§è¡¨é¢ï¼ˆå¦‚ drilldown å®¹å™¨ï¼‰ */
        html.dark #monthly-drilldown-wrap { background: #1A1C20; border-color: #2A2D33; }

        /* U1 è¡¨æ ¼ï¼šthead stickyã€å•å…ƒæ ¼ padding ä¸€è‡´ã€æ•°å­—åˆ—å³å¯¹é½ç­‰å®½æ•°å­— */
        .zebra-table thead th {
            position: sticky;
            top: 0;
            z-index: 2;
            background-clip: padding-box;
        }
        .zebra-table th,
        .zebra-table td {
            padding: 6px 10px;
            vertical-align: middle;
        }
        .zebra-table tbody td {
            font-variant-numeric: tabular-nums;
            font-feature-settings: "tnum" 1;
        }
        /* å°†å¸¸è§æ•°å­—åˆ—ï¼ˆè´§å¸/ç™¾åˆ†æ¯”ï¼‰å³å¯¹é½â€”â€”é€šè¿‡å·¥å…·ç±»æŒ‰éœ€å¯ç”¨ï¼Œä¸ç ´åçŽ°æœ‰ inline style */
        .zebra-table .num,
        .zebra-table td.num,
        .zebra-table th.num { text-align: right; }
        /* æš—è‰² sticky è¡¨å¤´éœ€è¦ä¸é€æ˜ŽèƒŒæ™¯ï¼Œé¿å…ä¸‹æ–¹å†…å®¹é€å‡º */
        .dark .zebra-table thead th { background-color: #252423; }

        /* U5 å…¨å±€è¿‡æ¸¡ï¼šç»Ÿä¸€ ease/durationï¼›å°Šé‡ç”¨æˆ·ã€Œå‡å°‘åŠ¨æ•ˆã€åå¥½ */
        a, button, input, select, textarea,
        .dashboard-card, .sider-nav-item, .monthly-month-cell,
        .pill, .chip, .tag {
            transition-property: background-color, border-color, color, box-shadow, transform, opacity;
            transition-duration: var(--ui-dur-base);
            transition-timing-function: var(--ui-ease);
        }
        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                transition-duration: 1ms !important;
                animation-duration: 1ms !important;
                animation-iteration-count: 1 !important;
                scroll-behavior: auto !important;
            }
        }

        /* ============================================================
           === UI-2: a11y focus, scrollbar, sider polish, fluent inputs ===
           ï¼ˆä»…æ–°å¢žï¼›ä¸è¦†ç›–å·²æœ‰è§„åˆ™çš„é¢œè‰² / å¸ƒå±€ï¼‰
           ============================================================ */

        /* U2 å…¨å±€ :focus-visible â€”â€” ä»…é”®ç›˜èšç„¦å±•ç¤ºï¼Œä¸æ‰“æ‰°é¼ æ ‡ç”¨æˆ· */
        :focus { outline: none; }
        a:focus-visible,
        button:focus-visible,
        [role="button"]:focus-visible,
        input:focus-visible,
        select:focus-visible,
        textarea:focus-visible,
        .sider-nav-item:focus-visible,
        .sider-icon-btn:focus-visible,
        .monthly-month-cell:focus-visible {
            outline: 2px solid #0078D4;
            outline-offset: 2px;
            border-radius: var(--ui-radius-sm);
        }
        html.dark a:focus-visible,
        html.dark button:focus-visible,
        html.dark [role="button"]:focus-visible,
        html.dark input:focus-visible,
        html.dark select:focus-visible,
        html.dark textarea:focus-visible,
        html.dark .sider-nav-item:focus-visible,
        html.dark .sider-icon-btn:focus-visible,
        html.dark .monthly-month-cell:focus-visible {
            outline-color: #2899F5;
        }

        /* U2 ç¦ç”¨æ€ç»Ÿä¸€ */
        button[disabled],
        [aria-disabled="true"],
        input[disabled],
        select[disabled],
        textarea[disabled] {
            opacity: 0.55;
            cursor: not-allowed;
            filter: saturate(0.85);
        }

        /* U2 ä¸€è‡´çš„ hover/active åé¦ˆï¼šä»…åœ¨æ™®é€šæŒ‰é’®å’Œå¸¦ .btn çš„å…ƒç´ ä¸Šå åŠ å¾®åŠ¨ */
        button:not([disabled]):active,
        .btn:not([disabled]):active {
            transform: translateY(0.5px);
        }

        /* U3 æ»šåŠ¨æ¡å‡è–„ï¼ˆWebKit / Blinkï¼‰ */
        *::-webkit-scrollbar { width: 10px; height: 10px; }
        *::-webkit-scrollbar-track { background: transparent; }
        *::-webkit-scrollbar-thumb {
            background: rgba(100, 116, 139, 0.35);
            border-radius: 8px;
            border: 2px solid transparent;
            background-clip: padding-box;
        }
        *::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.55); background-clip: padding-box; border: 2px solid transparent; }
        html.dark *::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.30); background-clip: padding-box; border: 2px solid transparent; }
        html.dark *::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.50); background-clip: padding-box; border: 2px solid transparent; }
        /* U7 ä¾§è¾¹æ æŠ˜å æŒ‰é’®ï¼šåœ†è§’ + å¾®é˜´å½± + active å¼ºè°ƒæ¡ */
        .sider-icon-btn {
            border-radius: var(--ui-radius-md);
        }
        .sider-icon-btn:hover {
            box-shadow: var(--ui-shadow-sm);
        }
        .sider-nav-item {
            border-radius: var(--ui-radius-md);
            position: relative;
        }
        .sider-nav-item.active::before {
            content: "";
            position: absolute;
            left: 0;
            top: 6px;
            bottom: 6px;
            width: 3px;
            border-radius: 2px;
            background: var(--selected-row-accent);
        }
        html.dark .sider-nav-item.active::before { background: var(--selected-row-accent); }
        .sider-nav-item.child.active::before { content: none; }
        .sider-nav-item.active::before { content: none; }

        /* U8 Fluent é£Žæ ¼çš„è¾“å…¥æ¡† / ä¸‹æ‹‰ / æ–‡æœ¬åŸŸï¼ˆä¸è¦†ç›–ä¸šåŠ¡è‡ªå®šä¹‰ç±»çš„é¢œè‰²ï¼Œä»…è®¾é»˜è®¤å¤–è§‚ï¼‰ */
        input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
        select,
        textarea {
            border-radius: var(--ui-radius-md);
        }
        input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):hover,
        select:hover,
        textarea:hover {
            border-color: rgba(0, 120, 212, 0.55);
        }
        html.dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):hover,
        html.dark select:hover,
        html.dark textarea:hover {
            border-color: rgba(40, 153, 245, 0.55);
        }

        /* U8 å¼¹çª—ï¼ˆåŸºäºŽå…¬å…±ç±»å .modal / .modal-overlay / [role=dialog]ï¼‰ */
        [role="dialog"],
        .modal-content,
        .modal-card,
        .modal {
            border-radius: var(--ui-radius-lg);
            box-shadow: var(--ui-shadow-lg);
        }
        .modal-overlay,
        .overlay,
        [data-modal-backdrop] {
            -webkit-backdrop-filter: blur(2px);
            backdrop-filter: blur(2px);
        }

        /* ============================================================
           === UI-3: skeleton loaders + empty-state utilities ===
           ï¼ˆæ–°å¢žå·¥å…·ç±»ï¼Œéœ€è¦æ—¶ç”±æ¨¡æ¿/JS æ·»åŠ  class å¯ç”¨ï¼Œä¸åŠ¨çŽ°æœ‰ DOMï¼‰
           ============================================================ */

        /* â€”â€” Skeleton å ä½ â€”â€” ç”¨æ³•ï¼š<div class="ui-skel ui-skel-text"></div> */
        .ui-skel {
            display: inline-block;
            position: relative;
            overflow: hidden;
            background: #E5E7EB;
            border-radius: var(--ui-radius-sm);
            color: transparent !important;
            -webkit-user-select: none;
            user-select: none;
            pointer-events: none;
            min-height: 0.9em;
            min-width: 1.5em;
        }
        html.dark .ui-skel { background: #2A2D33; }
        .ui-skel::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg,
                transparent 0%,
                rgba(255, 255, 255, 0.45) 50%,
                transparent 100%);
            animation: ui-skel-shimmer 1.4s linear infinite;
        }
        html.dark .ui-skel::after {
            background: linear-gradient(90deg,
                transparent 0%,
                rgba(255, 255, 255, 0.08) 50%,
                transparent 100%);
        }
        @keyframes ui-skel-shimmer {
            0%   { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        /* å¸¸ç”¨å°ºå¯¸å˜ä½“ */
        .ui-skel-text   { width: 80%;  height: 0.9em; }
        .ui-skel-title  { width: 60%;  height: 1.2em; }
        .ui-skel-line   { display: block; width: 100%; height: 0.9em; margin: 4px 0; }
        .ui-skel-num    { width: 5em;  height: 1.1em; }
        .ui-skel-pill   { width: 4em;  height: 18px;  border-radius: 999px; }
        .ui-skel-avatar { width: 28px; height: 28px;  border-radius: 50%; }
        .ui-skel-card   { display: block; width: 100%; height: 80px; border-radius: var(--ui-radius-md); }
        .ui-skel-row    { display: block; width: 100%; height: 24px; margin: 6px 0; border-radius: var(--ui-radius-sm); }

        /* Skeleton è¡¨æ ¼è¡Œï¼šåœ¨ <tr class="ui-skel-tr"> ä¸Šå¯ç”¨ */
        .ui-skel-tr td {
            position: relative;
            color: transparent !important;
        }
        .ui-skel-tr td::before {
            content: "";
            display: block;
            height: 0.9em;
            background: #E5E7EB;
            border-radius: var(--ui-radius-sm);
            overflow: hidden;
        }
        html.dark .ui-skel-tr td::before { background: #2A2D33; }
        .ui-skel-tr td::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
            animation: ui-skel-shimmer 1.4s linear infinite;
            pointer-events: none;
        }
        html.dark .ui-skel-tr td::after {
            background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
        }

        /* â€”â€” Empty State ç©ºæ€ â€”â€” ç”¨æ³•ï¼š
              <div class="ui-empty">
                  <div class="ui-empty-icon">ðŸ“­</div>
                  <div class="ui-empty-title">æš‚æ— æ•°æ®</div>
                  <div class="ui-empty-desc">è¯·å…ˆé€‰æ‹©æŸ¥è¯¢æ¡ä»¶</div>
                  <button class="ui-empty-action">é‡æ–°æŸ¥è¯¢</button>
              </div>                                                         */
        .ui-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 32px 16px;
            color: #6B7280;
            text-align: center;
            min-height: 160px;
        }
        html.dark .ui-empty { color: #94A3B8; }
        .ui-empty-icon {
            font-size: 36px;
            line-height: 1;
            opacity: 0.55;
            filter: grayscale(0.2);
        }
        .ui-empty-title {
            font-size: 14px;
            font-weight: 700;
            color: #374151;
        }
        html.dark .ui-empty-title { color: #E5E7EB; }
        .ui-empty-desc {
            font-size: 12px;
            color: #6B7280;
            max-width: 420px;
            line-height: 1.5;
        }
        html.dark .ui-empty-desc { color: #9CA3AF; }
        .ui-empty-action {
            margin-top: 8px;
            padding: 6px 14px;
            border-radius: var(--ui-radius-md);
            border: 1px solid #0078D4;
            background: transparent;
            color: #0078D4;
            font-size: 12px;
            cursor: pointer;
        }
        .ui-empty-action:hover { background: #E1F1FF; }
        html.dark .ui-empty-action {
            border-color: #2899F5;
            color: #2899F5;
        }
        html.dark .ui-empty-action:hover { background: rgba(40, 153, 245, 0.15); }

        /* è¡¨æ ¼å†…çš„ç©ºæ€ï¼šè·¨æ•´è¡Œï¼›ç”¨æ³•ï¼š<tr><td colspan="N" class="ui-empty-cell">â€¦</td></tr> */
        .ui-empty-cell {
            padding: 32px 16px !important;
            text-align: center;
            color: #6B7280;
            font-size: 13px;
            background: transparent !important;
        }
        html.dark .ui-empty-cell { color: #94A3B8; }

        /* åŠ è½½æ–‡å­—å¾½æ ‡ï¼šç”¨äºŽæŒ‰é’®å†…çš„"åŠ è½½ä¸­â€¦" */
        .ui-loading-dot::after {
            content: "";
            display: inline-block;
            width: 0.4em;
            height: 0.4em;
            margin-left: 0.4em;
            border-radius: 50%;
            background: currentColor;
            opacity: 0.6;
            vertical-align: middle;
            animation: ui-loading-blink 1.2s ease-in-out infinite;
        }
        @keyframes ui-loading-blink {
            0%, 100% { opacity: 0.2; }
            50%      { opacity: 0.9; }
        }

        /* ç”¨æˆ·åå¥½å‡å°‘åŠ¨æ•ˆæ—¶ç¦ç”¨ shimmer */
        @media (prefers-reduced-motion: reduce) {
            .ui-skel::after,
            .ui-skel-tr td::after,
            .ui-loading-dot::after { animation: none !important; }
        }

        /* ============================================================
           === UI-1L: light-mode parity polish (é•œåƒ UI-1 æš—è‰²è°ƒæ•´) ===
           - èƒŒæ™¯ç”±æ‰å¹³ #f8fafc å‡çº§ä¸ºå¸¦å±‚æ¬¡çš„ 4 æ¡£è¡¨é¢
           - å¡ç‰‡å¢žåŠ æŸ”å’Œé˜´å½±ï¼Œä¸ŽèƒŒæ™¯æ‹‰å¼€å±‚æ¬¡
           - æ¬¡çº§è¡¨é¢ï¼ˆdrilldown ç­‰ï¼‰
           ï¼ˆä»…æ–°å¢žï¼›æ—¢æœ‰ light è§„åˆ™ä¿ç•™ï¼‰
           ============================================================ */

        /* æµ…è‰² 4 æ¡£è¡¨é¢ï¼šèƒŒæ™¯ â†’ æ¬¡çº§ â†’ å¡ç‰‡ â†’ è¾¹æ¡† */
        html:not(.dark) body {
            /* æžè½»çš„çºµå‘æ¸å˜ï¼Œæ¯”çº¯ #f8fafc æ›´è€çœ‹ï¼Œå¯¹çœ¼ç›æ›´å‹å¥½ */
            background-color: #F4F6FA !important;
            background-image: linear-gradient(180deg, #F4F6FA 0%, #EEF1F6 100%);
            background-attachment: fixed;
        }
        html:not(.dark) .dashboard-card {
            background-color: #FFFFFF;
            border-color: #E5E9F0;
            box-shadow:
                0 1px 0 rgba(15, 23, 42, 0.02),
                0 2px 8px rgba(15, 23, 42, 0.04),
                0 12px 24px -12px rgba(15, 23, 42, 0.06);
        }
        html:not(.dark) #monthly-drilldown-wrap {
            background: #FAFBFD;
            border-color: #E5E9F0;
        }

        /* æµ…è‰²è¡¨å¤´ sticky ä¸é€æ˜ŽèƒŒæ™¯ï¼ˆé¿å…ä¸‹æ–¹å†…å®¹é€å‡ºï¼‰ */
        html:not(.dark) .zebra-table thead th {
            background-color: #F3F4F8;
        }

        /* æµ…è‰²æ–‘é©¬çº¹å¾®è°ƒï¼šä»Ž #FAFAFA â†’ æ›´æŸ”çš„å†·ç™½ï¼Œä¸Žå¡ç‰‡ç™½å½¢æˆå±‚æ¬¡ */
        html:not(.dark) .zebra-table tbody tr:nth-child(even) {
            background-color: #CFE6FB;
        }

        /* æµ…è‰²è¡¨æ ¼è¾¹æ¡†ï¼šä»Ž #EDEBE9 æš–ç° â†’ åå†· #E5E9F0ï¼Œä¸Žæ–°èƒŒæ™¯è°ƒä¸€è‡´ */
        html:not(.dark) .zebra-table th,
        html:not(.dark) .zebra-table td {
            border-color: #E5E9F0;
        }

        /* æµ…è‰² thead/tfoot ä¸Žæ–°è‰²è°ƒå¯¹é½ */
        html:not(.dark) .zebra-table thead { background-color: #F3F4F8; color: #1F2937; }
        html:not(.dark) .zebra-table thead th { color: #1F2937; border-bottom-color: #E5E9F0; }
        html:not(.dark) .zebra-table tfoot { background-color: #F3F4F8; color: #1F2937; }
        html:not(.dark) .zebra-table tfoot td { color: #1F2937; }

        /* ============================================================
           === U-color + typography: brand color SSoT + font stack ===
           - ä»…è¿½åŠ  CSS å˜é‡ä¸Žå…¨å±€ font è§„åˆ™ï¼Œä¸æ”¹å†™çŽ°æœ‰ #0078D4 å­—é¢é‡
           - æ—¢æœ‰å†™æ­»çš„ #0078D4 / #2899F5 ä»æŒ‰åŽŸå€¼ç”Ÿæ•ˆï¼›æ–°æ¨¡å—/æŒ‰éœ€è¿ç§»å¯
             ç”¨ var(--brand) / var(--brand-hover) ç­‰
           ============================================================ */

        :root {
            /* â€”â€” å“ç‰Œè‰²å•æºï¼ˆFluent UI 8 è“è‰²æ¢¯åº¦ï¼‰ â€”â€” */
            --brand:           #0078D4;  /* Communication Blue Primary */
            --brand-hover:     #106EBE;  /* hover */
            --brand-active:    #005A9E;  /* pressed */
            --brand-disabled:  #C7E0F4;  /* disabled fill */
            --brand-tint-10:   #E1F1FF;  /* hover bg / selected soft */
            --brand-tint-20:   #CFE6FB;  /* selected row */
            --brand-tint-30:   #B3D7F4;
            --brand-shade-10:  #2B88D8;
            --brand-shade-20:  #106EBE;
            --brand-shade-30:  #005A9E;

            /* â€”â€” è¯­ä¹‰è‰² â€”â€” */
            --semantic-success:  #107C10;
            --semantic-warning:  #C19C00;
            --semantic-danger:   #D13438;
            --semantic-info:     var(--brand);

            /* â€”â€” ä¸­æ€§ â€”â€” */
            --neutral-fg:        #201F1E;
            --neutral-fg-muted:  #605E5C;
            --neutral-fg-subtle: #8A8886;

            /* â€”â€” å­—ä½“æ ˆ â€”â€” */
            --font-sans:
                "Inter", -apple-system, BlinkMacSystemFont,
                "Segoe UI Variable", "Segoe UI",
                "PingFang SC", "Hiragino Sans GB",
                "Microsoft YaHei UI", "Microsoft YaHei",
                "Source Han Sans SC", "Noto Sans CJK SC", "Noto Sans SC",
                Roboto, "Helvetica Neue", Arial, sans-serif,
                "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
            --font-mono:
                ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Monaco,
                Consolas, "Liberation Mono", "Courier New", monospace;
            --font-num:
                "Inter", "Segoe UI Variable", "Segoe UI",
                ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo,
                Consolas, monospace;
        }

        /* æš—è‰²å“ç‰Œè‰²å¾®è°ƒï¼šåœ¨æ·±è‰²èƒŒæ™¯ä¸Šç”¨æ›´äº®çš„è“ï¼Œæå‡å¯¹æ¯”åº¦ */
        html.dark {
            --brand:          #2899F5;
            --brand-hover:    #46A6F7;
            --brand-active:   #1A82D9;
            --brand-disabled: rgba(40, 153, 245, 0.30);
            --brand-tint-10:  rgba(40, 153, 245, 0.15);
            --brand-tint-20:  rgba(40, 153, 245, 0.25);
            --brand-tint-30:  rgba(40, 153, 245, 0.35);
            --semantic-success: #4CAF50;
            --semantic-warning: #FFB900;
            --semantic-danger:  #F25F5C;
            --neutral-fg:        #FFFFFF;
            --neutral-fg-muted:  #C8C6C4;
            --neutral-fg-subtle: #A19F9D;
        }

        /* å…¨å±€å­—ä½“æ ˆï¼šä»…ç»™ body è®¾é»˜è®¤å€¼ï¼Œä¸åŠ¨å±€éƒ¨ font å£°æ˜Žï¼ˆä¸ç ´åæ—¢æœ‰ monospace ç­‰ï¼‰ */
        html, body {
            font-family: var(--font-sans);
            font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-rendering: optimizeLegibility;
        }
        body { font-synthesis: none; }

        /* æ•°å­—åˆ—ï¼šä½¿ç”¨ tabular æ•°å­—å­—ä½“ï¼ˆä¸Ž UI-1 çš„ font-variant-numeric ååŒï¼‰ */
        .tabular-nums,
        .num,
        .zebra-table .num,
        .zebra-table tbody td,
        .kpi-value,
        .monthly-month-cell {
            font-variant-numeric: tabular-nums;
            font-feature-settings: "tnum" 1, "cv02", "cv03", "cv11";
        }

        /* ç­‰å®½å·¥å…·ç±»ï¼ˆä¸Ž --font-mono ååŒï¼‰ */
        .mono { font-family: var(--font-mono) !important; }

        #sales-inactive-customers-toggle,
        #customer-subaccounts-toggle {
            appearance: none;
            position: relative;
            width: 32px;
            height: 18px;
            flex-shrink: 0;
            border: 1px solid #6b7280;
            border-radius: 9px;
            background: #6b7280;
            cursor: pointer;
        }
        #sales-inactive-customers-toggle:checked,
        #customer-subaccounts-toggle:checked {
            border-color: #2563eb;
            background: #2563eb;
        }
        #sales-inactive-customers-toggle::before,
        #customer-subaccounts-toggle::before {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #ffffff;
        }
        #sales-inactive-customers-toggle:checked::before,
        #customer-subaccounts-toggle:checked::before {
            transform: translateX(14px);
        }
        #sales-inactive-customers-toggle:focus-visible,
        #customer-subaccounts-toggle:focus-visible {
            outline: 2px solid #2563eb;
            outline-offset: 2px;
        }
        @media (max-width: 640px) {
            #main-table-instruction {
                flex-wrap: wrap;
                gap: 8px;
            }
            #main-table-instruction > div:last-child {
                margin-left: auto;
            }
        }
        #t-body [data-customer-group-toggle] [data-group-indicator] {
            position: relative;
            display: inline-block;
            transform: scale(1.5);
        }
        #t-body [data-customer-group-toggle] [data-group-indicator]::before {
            content: "";
            position: absolute;
            width: 24px;
            height: 24px;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
        .customer-forecast-exhausted {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 46px;
            min-height: 22px;
            padding: 2px 6px;
            border-radius: 4px;
        }
        .customer-forecast-exhausted {
            min-width: 0;
            padding: 2px;
        }
        .customer-forecast-exhausted {
            color: #ffffff !important;
            background-color: #FF0000 !important;
            text-shadow: none !important;
        }
        td:has(> .customer-forecast-exhausted) {
            font-family: inherit;
        }
        .customer-forecast-exhausted {
            font-size: 13px;
            font-weight: 900;
        }
        .customer-forecast-exhausted {
            color: #FFFFFF !important;
        }
        table :is(button, [role="button"], input[type="button"], input[type="submit"]),
        table :is(button, [role="button"]) * { font-weight: 400 !important; }
        :is(.download-btn-clean, .monthly-day-download-btn, .monthly-date-product-download-btn,
            .customer-current-month-download-btn, .monthly-detail-toggle),
        .monthly-detail-menu button { font-size: 12px !important; }

/* Match AzureVMList table filter buttons, including dynamically rendered tables. */
.daily-filter-btn, .monthly-day-filter-btn { width: 16px; height: 16px; padding: 0; border: 0; border-radius: 3px; margin-left: 4px; }
.daily-filter-btn svg, .monthly-day-filter-btn svg { width: 12px; height: 12px; flex-shrink: 0; opacity: 1; pointer-events: none; }

/* Calendar header follows AzureBill's compact icon placement. */
.history-date-picker { position:relative; display:inline-flex; align-items:center; justify-content:center; width:20px; height:24px; cursor:pointer; color:inherit; }
.history-date-picker input { position:absolute; inset:0; width:100%; height:100%; opacity:0; padding:0; border:0; cursor:pointer; }
.history-date-picker input::-webkit-calendar-picker-indicator { position:absolute; inset:0; width:100%; height:100%; margin:0; padding:0; cursor:pointer; }
.history-date-picker:has(input:focus-visible) { outline:2px solid currentColor; outline-offset:2px; border-radius:3px; }
