/* ==== Design Tokens ==== */
:root {
    --sidebar-bg: #ffffff;
    --sidebar-active: rgba(99,102,241,0.10);
    --sidebar-active-text: #4f46e5;
    --sidebar-hover: rgba(99,102,241,0.06);
    --sidebar-text: #64748b;
    --sidebar-sub: #94a3b8;
    --text: #0f172a;
    --text-sub: #64748b;
    --border: rgba(0,0,0,0.04);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --primary: #4f46e5;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 25%, #f5f3ff 55%, #fbcfe8 100%);
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}
/* ==== App Window ==== */
.app-window {
    width: 100vw;
    height: 100vh;
    background: #f8f9fc;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ==== Title Bar ==== */
.title-bar {
    height: 64px;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 55%, #db2777 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    flex-shrink: 0;
}
.title-bar .buttons { display: flex; gap: 8px; }
.title-bar .btn { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.35); }
.btn-min { background: rgba(255,255,255,0.25); }
.btn-close { background: rgba(255,255,255,0.25); }

/* ==== Layout ==== */
.app-body { display: flex; flex: 1; overflow: hidden; min-width: 0; }
.sidebar {
    width: 220px;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    padding-top: 1rem;
    flex-shrink: 0;
    height: 100%;
    overflow-y: auto;
}
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.toolbar {
    height: 56px;
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    flex-shrink: 0;
}
.content {
    flex: 1;
    overflow-y: auto;
    padding: 1.75rem;
    min-width: 0;
}
        /* ==== Design Tokens ==== */
        :root {
            --sidebar-bg: #ffffff;
            --sidebar-active: rgba(99,102,241,0.10);
            --sidebar-active-text: #4f46e5;
            --sidebar-hover: rgba(99,102,241,0.06);
            --sidebar-text: #64748b;
            --sidebar-sub: #94a3b8;
            --text: #0f172a;
            --text-sub: #64748b;
            --border: rgba(0,0,0,0.04);
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --primary: #4f46e5;
        }
        * { margin: 0; padding: 0; box-sizing: border-box; }

        /* ==== Title Bar ==== */
        .title-bar {
            height: 64px;
            background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 55%, #db2777 100%);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 1.75rem;
            color: #fff;
            font-size: 0.9rem;
            font-weight: 500;
            flex-shrink: 0;
        }
        .title-bar .buttons { display: flex; gap: 8px; }
        .title-bar .btn { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.35); }
        .btn-min { background: rgba(255,255,255,0.25); }
        .btn-close { background: rgba(255,255,255,0.25); }

        /* ==== Layout ==== */
        .app-body { display: flex; flex: 1; overflow: hidden; min-width: 0; }
        .sidebar {
            width: 220px;
            background: var(--sidebar-bg);
            border-right: 1px solid rgba(0,0,0,0.03);
            display: flex;
            flex-direction: column;
            padding-top: 1rem;
            flex-shrink: 0;
            height: 100%;
            overflow-y: auto;
        }
        .main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
        .toolbar {
            height: 56px;
            background: #ffffff;
            border-bottom: 1px solid rgba(0,0,0,0.03);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 1.5rem;
            flex-shrink: 0;
        }
        .content {
            flex: 1;
            overflow-y: auto;
            padding: 1.75rem;
            min-width: 0;
        }

        /* ==== Sidebar ==== */
        .sidebar-header { padding: 1.25rem 1.5rem 1.5rem; }
        .sidebar-header .logo {
            font-size: 1.1rem;
            font-weight: 700;
            color: #0f172a;
            letter-spacing: -0.3px;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .sidebar-header .version {
            font-size: 0.7rem;
            color: #94a3b8;
            margin-top: 0.25rem;
            font-weight: 500;
        }
        .nav-group { margin-bottom: 1.25rem; }
        .nav-group-title {
            padding: 0 1.5rem;
            font-size: 0.7rem;
            font-weight: 600;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 0.5rem;
        }
        .nav-item {
            margin: 0 0.75rem;
            padding: 0.55rem 0.9rem;
            border-radius: 10px;
            color: #64748b;
            font-size: 0.82rem;
            font-weight: 500;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            cursor: pointer;
        }
        .nav-item:hover { background: rgba(99,102,241,0.06); color: #4f46e5; }
        .nav-item.active {
            background: rgba(99,102,241,0.10);
            color: #4f46e5;
            font-weight: 600;
        }
        .nav-item .badge {
            margin-left: auto;
            background: rgba(99,102,241,0.12);
            color: #4f46e5;
            font-size: 0.6rem;
            font-weight: 700;
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
        .nav-item .badge.badge-count {
            background: #ef4444;
            color: #fff;
            border-radius: 9px;
            min-width: 16px;
            text-align: center;
            padding: 0.15rem 0.35rem;
        }

        /* ==== Jelly Glass Icons (参考图风格) ==== */
        .nav-icon {
            width: 34px;
            height: 34px;
            border-radius: 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 0.7rem;
            position: relative;
            overflow: hidden;
            background:
                radial-gradient(140% 60% at 30% 5%, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 55%),
                linear-gradient(180deg, #e9d5ff 0%, #d8b4fe 25%, #c4b5fd 50%, #a78bfa 75%, #8b5cf6 100%);
            border: 2px solid rgba(255,255,255,0.6);
            box-shadow:
                inset 0 2px 3px rgba(255,255,255,0.5),
                0 8px 20px rgba(139,92,246,0.22),
                0 4px 8px rgba(0,0,0,0.04);
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .nav-icon svg { width: 18px; height: 18px; fill: #ffffff; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15)); position: relative; z-index: 2; }
        .nav-icon::before {
            content: "";
            position: absolute;
            top: 6%;
            left: 12%;
            width: 76%;
            height: 42%;
            background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0) 100%);
            border-radius: 50% 50% 45% 45% / 70% 70% 30% 30%;
            filter: blur(0.3px);
            pointer-events: none;
            z-index: 1;
        }
        .nav-icon::after {
            content: "";
            position: absolute;
            bottom: -2px;
            left: 8%;
            width: 84%;
            height: 28%;
            background: linear-gradient(0deg, rgba(91,33,182,0.35) 0%, rgba(91,33,182,0) 100%);
            border-radius: 0 0 50% 50% / 0 0 100% 100%;
            pointer-events: none;
            z-index: 1;
            mix-blend-mode: multiply;
        }
        .nav-item:hover .nav-icon {
            transform: scale(1.12) translateY(-3px);
            background:
                radial-gradient(140% 60% at 30% 5%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 55%),
                linear-gradient(180deg, #f3e8ff 0%, #e9d5ff 25%, #d8b4fe 50%, #a78bfa 75%, #7c3aed 100%);
            box-shadow:
                inset 0 2px 3px rgba(255,255,255,0.6),
                0 14px 32px rgba(139,92,246,0.30),
                0 6px 12px rgba(0,0,0,0.06);
        }
        .nav-item.active .nav-icon {
            background:
                radial-gradient(140% 60% at 30% 5%, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0) 55%),
                linear-gradient(180deg, #ddd6fe 0%, #c4b5fd 25%, #a78bfa 50%, #8b5cf6 75%, #6d28d9 100%);
            border-color: rgba(255,255,255,0.7);
        }

        /* ==== Toolbar ==== */
        .toolbar-left { display: flex; align-items: center; gap: 0.75rem; }
        .toolbar-title { font-size: 1.05rem; font-weight: 650; color: #0f172a; letter-spacing: -0.2px; }
        .breadcrumb { color: #94a3b8; font-size: 0.8rem; font-weight: 500; }
        .toolbar-right { display: flex; gap: 0.5rem; }
        .tool-btn {
            display: flex; align-items: center; gap: 0.35rem;
            padding: 0.45rem 0.9rem;
            border-radius: 10px;
            font-size: 0.82rem;
            border: 1px solid rgba(0,0,0,0.06);
            background: #fff;
            color: #475569;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .tool-btn:hover { background: #f8fafc; border-color: rgba(0,0,0,0.10); color: #0f172a; }
        .tool-btn.primary { background: #0f172a; color: #fff; border-color: #0f172a; font-weight: 600; }
        .tool-btn.primary:hover { background: #1e293b; border-color: #1e293b; }

        /* ==== Cards ==== */
        .panel, .card {
            background: #ffffff;
            border-radius: 24px;
            box-sizing: border-box;
            overflow: hidden;
            border: 1px solid rgba(0,0,0,0.015);
            box-shadow: 0 10px 40px rgba(0,0,0,0.04);
            padding: 1.6rem;
            margin-bottom: 1.25rem;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .panel:hover, .card:hover { transform: translateY(-2px); box-shadow: 0 16px 48px rgba(0,0,0,0.05); }

        /* 含下拉组件的卡片不裁剪：.panel/.card 默认 overflow:hidden 会把绝对定位的下拉截断，凡卡片内放了下拉组件一律放行 */
        .panel:has(.biz-multi-select, .ship-sku-dropdown, .sku-bundle-dropdown, .inv-batch-dropdown, .pp-comp-dropdown),
        .card:has(.biz-multi-select, .ship-sku-dropdown, .sku-bundle-dropdown, .inv-batch-dropdown, .pp-comp-dropdown) {
            overflow: visible;
        }
        .panel-header {
            display: flex; align-items: flex-end; justify-content: space-between;
            margin-bottom: 1.1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid rgba(0,0,0,0.03);
        }
        .panel-title { font-size: 1rem; font-weight: 700; color: #0f172a; letter-spacing: -0.2px; }
        .panel-sub { font-size: 0.78rem; color: #94a3b8; font-weight: 500; }

        /* ==== Stats Row ==== */
        .stats-row { display: flex; gap: 1.25rem; margin-bottom: 1.5rem; }
        .stat-box {
            flex: 1;
            background: #ffffff;
            border-radius: 22px;
            border: 1px solid rgba(0,0,0,0.015);
            box-shadow: 0 6px 24px rgba(0,0,0,0.03);
            padding: 1.35rem 1.5rem;
            position: relative;
            overflow: hidden;
            transition: transform 0.25s ease, box-shadow 0.25s ease;
        }
        .stat-box:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.04); }
        .stat-box::before {
            content: "";
            position: absolute; top: 0; left: 0; right: 0; height: 3px;
            background: linear-gradient(90deg, #cbd5e1 0%, #94a3b8 100%); opacity: 0.35;
        }
        .stat-box.success::before { background: #34d399; opacity: 0.55; }
        .stat-box.warning::before { background: #fbbf24; opacity: 0.55; }
        .stat-box.danger::before { background: #f87171; opacity: 0.55; }
        .stat-box .label {
            font-size: 0.75rem; font-weight: 600; color: #94a3b8;
            text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.5rem;
        }
        .stat-box .value {
            font-size: 1.6rem; font-weight: 700; color: #0f172a;
            letter-spacing: -1px; line-height: 1.1; margin-bottom: 0.3rem;
        }
        .stat-box .value.success { color: #059669; }
        .stat-box .value.warning { color: #b45309; }
        .stat-box .value.danger { color: #b91c1c; }
        .stat-box .trend { font-size: 0.74rem; font-weight: 500; color: #cbd5e1; }

        /* ==== Tables ==== */
        .data-table { width: auto; min-width: 100%; border-collapse: collapse; font-size: 0.82rem; }
        .data-table th, .data-table td { padding: 0.75rem 0.55rem; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.04); vertical-align: middle; white-space: nowrap; }
        .data-table th {
            background: transparent; color: #64748b; font-size: 0.68rem; font-weight: 600;
            text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid rgba(0,0,0,0.08);
        }
        .profit-thead tr:first-child th {
            background: #f1f5f9;
            color: #0f172a;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.4px;
            padding: 0.42rem 0.32rem;
            vertical-align: middle;
        }
        .profit-thead tr:last-child th {
            background: #ffffff;
            color: #475569;
            font-size: 0.68rem;
            font-weight: 500;
            padding: 0.32rem 0.32rem;
            vertical-align: middle;
        }

        .profit-table { font-size: 0.75rem; }
        .profit-table th, .profit-table td { padding: 0.42rem 0.32rem; }
        .profit-table .product-thumb { width: 36px; height: 36px; }
        .profit-table tbody tr:last-child td { border-bottom: none; }

        .overview-table thead.overview-thead th {
            background: #f1f5f9;
            color: #475569;
            font-size: 0.7rem;
            font-weight: 600;
            padding: 0.45rem 0.38rem;
            vertical-align: middle;
            border-right: 1px solid rgba(0,0,0,0.05);
        }
        .overview-table thead.overview-thead th:last-child { border-right: none; }
        .overview-table thead.overview-thead tr:last-child th {
            background: #ffffff;
            color: #64748b;
            font-weight: 500;
            font-size: 0.68rem;
        }

        .overview-table { font-size: 0.75rem; }
        .overview-table th, .overview-table td { padding: 0.42rem 0.32rem; }
        .overview-table .product-thumb { width: 36px; height: 36px; }
        .overview-table tbody tr:last-child td { border-bottom: none; }
        .data-table tbody tr:hover { background: rgba(0,0,0,0.02); }
        .data-table tbody tr:last-child td { border-bottom: none; }

        /* ==== Tags / Badges ==== */
        .tag {
            display: inline-flex; align-items: center; justify-content: center;
            border-radius: 20px; font-size: 0.7rem; font-weight: 600;
            padding: 0.22rem 0.65rem; letter-spacing: 0.2px; border: 1px solid transparent;
        }
        .score-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 22px;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 700;
        }
        .score-high { background: #f0fdf4; color: #15803d; }
        .score-mid { background: #fffbeb; color: #b45309; }
        .score-low { background: #fef2f2; color: #dc2626; }

        .tag-blue { background: #eff6ff; color: #2563eb; border-color: rgba(59,130,246,0.10); }
        .tag-green { background: #f0fdf4; color: #15803d; border-color: rgba(16,185,129,0.10); }
        .tag-orange { background: #fffbeb; color: #b45309; border-color: rgba(245,158,11,0.10); }
        .tag-gray { background: #f1f5f9; color: #475569; border-color: rgba(0,0,0,0.05); }
        .tag-red { background: #fef2f2; color: #dc2626; border-color: rgba(220,38,38,0.10); }
        .rank-badge {
            display: inline-flex; align-items: center; justify-content: center;
            width: 22px; height: 22px; border-radius: 6px; font-size: 0.72rem; font-weight: 700;
            background: #f1f5f9; color: #64748b;
        }
        .rank-badge.top1 { background: #f59e0b; color: #fff; }
        .rank-badge.top3 { background: #3b82f6; color: #fff; }

        /* ==== Layout Helpers ==== */
        .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
        .chart-placeholder {
            height: 220px;
            background: #fafafa;
            border-radius: 18px;
            border: 1px dashed rgba(0,0,0,0.06);
            color: #94a3b8;
            font-size: 0.9rem;
            display: flex; align-items: center; justify-content: center;
        }
    
.page { display: none; }
.page.active { display: block; }
.scroll-x { overflow-x: auto; padding-bottom: 0.5rem; }
.scroll-x::-webkit-scrollbar { height: 8px; }
.scroll-x::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
.scroll-x::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.scroll-x::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.scroll-x table { min-width: max-content; }
.category-card {
    background: #ffffff; border-radius: 20px; border: 1px solid rgba(0,0,0,0.02);
    box-shadow: 0 6px 24px rgba(0,0,0,0.03); padding: 1.25rem; margin-bottom: 1rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.category-card:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(0,0,0,0.04); }
.category-card .header { display:flex; align-items:center; justify-content:space-between; margin-bottom:0.75rem; }
.category-card .title { font-size:1rem; font-weight:700; color:#0f172a; }
.category-card .tags { display:flex; gap:0.4rem; flex-wrap:wrap; margin-top:0.5rem; }
.metric-cell {
    background: #ffffff; border-radius: 18px; border: 1px solid rgba(0,0,0,0.015);
    box-shadow: 0 4px 16px rgba(0,0,0,0.02); padding: 1.1rem 1.25rem;
    display:flex; flex-direction:column; gap:0.25rem;
}
.metric-cell .m-label { font-size:0.72rem; font-weight:600; color:#94a3b8; text-transform:uppercase; letter-spacing:0.4px; }
.metric-cell .m-value { font-size:1.35rem; font-weight:700; color:#0f172a; letter-spacing:-0.6px; }
.metric-cell .m-sub { font-size:0.72rem; color:#cbd5e1; font-weight:500; }
.metric-grid-9 { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; margin-bottom:1.25rem; }
.insight-bar { display:flex; flex-direction:column; gap:0.6rem; }
.insight-item {
    display:flex; align-items:center; gap:0.75rem; background:#ffffff; border-radius:14px;
    border:1px solid rgba(0,0,0,0.015); padding:0.85rem 1rem; font-size:0.84rem; color:#334155;
    box-shadow:0 2px 8px rgba(0,0,0,0.01); transition:all 0.2s ease;\n}
}
.insight-item:hover { transform:translateX(3px); background:#fafafa; }
.insight-item.p1 { background:#fef2f2; color:#991b1b; border-color:rgba(239,68,68,0.10); }
.insight-item.p2 { background:#eff6ff; color:#1e40af; border-color:rgba(59,130,246,0.10); }
.insight-item.p3 { background:#f8fafc; color:#475569; border-color:rgba(0,0,0,0.05); }
.quadrant-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:1.25rem; }
.quadrant-cell {
    background:#ffffff; border-radius:20px; border:1px solid rgba(0,0,0,0.015);
    box-shadow:0 4px 20px rgba(0,0,0,0.02); padding:1.25rem 1.5rem;
    transition:transform 0.3s ease, box-shadow 0.3 ease;
    display:flex; flex-direction:column; gap:0.35rem;
}
.quadrant-cell:hover { transform:translateY(-3px); box-shadow:0 12px 32px rgba(0,0,0,0.03); }
.q-profit { background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%); border-top:3px solid #60a5fa; }
.q-drain { background:linear-gradient(180deg,#ffffff 0%,#fffdfb 100%); border-top:3px solid #fbbf24; }
.q-image { background:linear-gradient(180deg,#ffffff 0%,#fdfbff 100%); border-top:3px solid #a78bfa; }
.q-risk { background:linear-gradient(180deg,#ffffff 0%,#fffafa 100%); border-top:3px solid #f87171; }
.q-label { color:#94a3b8; font-size:0.78rem; font-weight:600; text-transform:uppercase; letter-spacing:0.4px; }
.q-value { color:#0f172a; font-size:1.2rem; font-weight:700; letter-spacing:-0.5px; }
.q-desc { color:#cbd5e1; font-size:0.75rem; font-weight:500; }
.product-thumb {
    width:64px; height:64px; border-radius:12px; background:#f1f5f9;
    object-fit:cover; border:1px solid rgba(0,0,0,0.04);
}
.progress-track { background:rgba(0,0,0,0.04); border-radius:8px; height:8px; overflow:hidden; margin-top:0.5rem; }
.progress-fill { height:100%; background:linear-gradient(90deg,#60a5fa 0%,#3b82f6 100%); border-radius:8px; }
.tabs { display:flex; gap:0.35rem; }
.tab {
    padding:0.35rem 0.75rem; border-radius:8px; font-size:0.8rem; font-weight:500;
    color:#64748b; background:transparent; cursor:pointer; border:1px solid transparent;
}
.tab:hover { background:#f8fafc; color:#334155; }
.tab.active { background:#eff6ff; color:#3b82f6; border-color:rgba(59,130,246,0.12); }
.upload-zone {
    border:2px dashed rgba(0,0,0,0.08); border-radius:18px; padding:2rem; text-align:center;
    color:#94a3b8; font-size:0.85rem; background:#fafafa; margin-bottom:1rem;
}
.strategy-badge {
    display:inline-flex; align-items:center; gap:0.35rem; padding:0.25rem 0.6rem;
    border-radius:6px; font-size:0.72rem; font-weight:600;
}
.category-select {
    background:#ffffff; border:1px solid rgba(0,0,0,0.06); border-radius:10px; color:#334155;
    padding:0.45rem 0.8rem; font-size:0.82rem; transition:all 0.2s ease;
}
.category-select:focus { border-color:#0f172a; outline:none; box-shadow:0 0 0 3px rgba(15,23,42,0.06); }
\n        


        

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.35); z-index: 100; justify-content: center; align-items: center; }
        .modal-overlay.active { display: flex; }
        .modal-box { background: #ffffff; border-radius: 20px; border: 1px solid rgba(0,0,0,0.02); box-shadow: 0 24px 64px rgba(0,0,0,0.12); padding: 1.75rem; width: 520px; max-width: 90vw; max-height: 85vh; overflow-y: auto; }
        .modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
        .modal-title { font-size: 1.05rem; font-weight: 700; color: #0f172a; }
        .modal-close { width: 32px; height: 32px; border-radius: 8px; border: none; background: #f1f5f9; color: #64748b; font-size: 1.1rem; cursor: pointer; }
        .form-field { display: flex; flex-direction: column; gap: 0.35rem; }
        .form-field label { font-size: 0.75rem; font-weight: 600; color: #64748b; }
        .form-field input, .form-field select { border: 1px solid rgba(0,0,0,0.08); border-radius: 8px; padding: 0.45rem 0.7rem; font-size: 0.82rem; color: #334155; background: #fff; }
    
.th-tip {
    display:inline-flex;align-items:center;justify-content:center;
    width:10px;height:10px;border-radius:50%;
    background:#e2e8f0;color:#64748b;font-size:8px;font-weight:600;
    margin-left:2px;cursor:pointer;position:relative;
    vertical-align:super;
}
.th-tip:hover, .th-tip:focus { background:#cbd5e1;color:#475569; }
.th-tip::before {
    content:attr(data-tip);
    position:absolute;top:50%;left:110%;transform:translateY(-50%);
    background:#0f172a;color:#fff;font-size:11px;font-weight:400;
    padding:6px 10px;border-radius:6px;white-space:normal;
    width:max-content;max-width:320px;line-height:1.4;text-align:left;
    opacity:0;visibility:hidden;transition:all .2s ease;
    z-index:1000;pointer-events:none;box-shadow:0 4px 12px rgba(0,0,0,0.15);
}






.th-tip::after {
    content:'';position:absolute;top:50%;left:100%;transform:translateY(-50%);
    border:5px solid transparent;border-left-color:#0f172a;
    opacity:0;visibility:hidden;transition:all .2s ease;
    z-index:1000;pointer-events:none;
}






.th-tip:hover::before, .th-tip:focus::before,
.th-tip:hover::after, .th-tip:focus::after { opacity:1;visibility:visible; }

        
        /* ==== Product List Sections ==== */
        .product-section {
            background: #ffffff;
            border-radius: 20px;
            border: 1px solid rgba(0,0,0,0.015);
            box-shadow: 0 4px 20px rgba(0,0,0,0.02);
            margin-bottom: 1rem;
            overflow: hidden;
        }
        .section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.25rem;
            background: linear-gradient(90deg, #f8fafc 0%, #ffffff 100%);
            border-bottom: 1px solid rgba(0,0,0,0.03);
            cursor: pointer;
            transition: background 0.2s ease;
        }
        .section-header:hover { background: #f1f5f9; }
        .section-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.9rem;
            font-weight: 600;
            color: #0f172a;
        }
        .section-badge {
            background: rgba(0,0,0,0.06);
            color: #64748b;
            font-size: 0.7rem;
            font-weight: 600;
            padding: 0.15rem 0.5rem;
            border-radius: 4px;
        }
        .section-desc {
            font-size: 0.75rem;
            color: #94a3b8;
            margin-left: 0.5rem;
        }
        .section-toggle {
            font-size: 0.8rem;
            color: #94a3b8;
            transition: transform 0.2s ease;
        }
        .section-toggle.collapsed { transform: rotate(-90deg); }
        .section-body { padding: 0.75rem 1.25rem 1rem; }
        .section-body.collapsed { display: none; }


        /* ==== Category Type Distribution ==== */
        .type-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 1rem;
            margin-bottom: 1.25rem;
        }
        .type-card {
            background: #ffffff;
            border-radius: 18px;
            border: 1px solid rgba(0,0,0,0.015);
            box-shadow: 0 4px 20px rgba(0,0,0,0.02);
            padding: 1.1rem 1.25rem;
            transition: all 0.25s ease;
        }
        .type-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.04); }
        .type-card.star { border-top: 3px solid #10b981; background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%); }
        .type-card.drain { border-top: 3px solid #3b82f6; background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%); }
        .type-card.potential { border-top: 3px solid #8b5cf6; background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%); }
        .type-card.image { border-top: 3px solid #f59e0b; background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%); }
        .type-card.eliminate { border-top: 3px solid #ef4444; background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%); }
        .type-icon { font-size: 1.25rem; margin-bottom: 0.35rem; }
        .type-name { font-size: 0.85rem; font-weight: 600; color: #0f172a; margin-bottom: 0.15rem; }
        .type-count { font-size: 1.1rem; font-weight: 700; color: #0f172a; }
        .type-desc { font-size: 0.7rem; color: #94a3b8; margin-top: 0.25rem; }

        /* ==== Five Dimension Score Cards - Redesigned ==== */
        .feasibility-layout {
            display: flex;
            gap: 1rem;
            margin-bottom: 1rem;
        }
        /* 左侧：综合健康度 */
        .overall-panel {
            width: 180px;
            flex-shrink: 0;
            background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #d1fae5 100%);
            border-radius: 16px;
            border: 1px solid rgba(16,185,129,0.15);
            padding: 1.25rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
        }
        .overall-panel .label {
            font-size: 0.8rem;
            color: #059669;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }
        .overall-panel .score {
            font-size: 3rem;
            font-weight: 700;
            color: #059669;
            line-height: 1;
            margin-bottom: 0.5rem;
        }
        .overall-panel .rating {
            font-size: 0.85rem;
            color: #10b981;
            font-weight: 600;
            padding: 0.3rem 0.75rem;
            background: rgba(16,185,129,0.12);
            border-radius: 20px;
        }
        .overall-panel .formula {
            font-size: 0.65rem;
            color: #6b7280;
            margin-top: 0.75rem;
            padding-top: 0.75rem;
            border-top: 1px dashed rgba(16,185,129,0.2);
            line-height: 1.5;
        }
        /* 右侧：五维卡片网格 */
        .dimension-grid {
            flex: 1;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            grid-template-rows: repeat(2, 1fr);
            gap: 0.75rem;
        }
        .dimension-card {
            background: #ffffff;
            border-radius: 12px;
            border: 1px solid rgba(0,0,0,0.04);
            padding: 0.875rem 1rem;
            display: flex;
            flex-direction: column;
            transition: all 0.25s ease;
        }
        .dimension-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(0,0,0,0.06);
        }
        .dimension-card.profit { border-left: 3px solid #10b981; }
        .dimension-card.roi { border-left: 3px solid #3b82f6; }
        .dimension-card.conversion { border-left: 3px solid #8b5cf6; }
        .dimension-card.scale { border-left: 3px solid #f59e0b; }
        .dimension-card.trend { border-left: 3px solid #ec4899; }

        
        .dimension-card .header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.4rem;
            position: relative;
        }
        .dimension-card .header .tooltip-content {
            bottom: auto;
            top: -8px;
            transform: translateX(-50%) translateY(-100%);
        }
        .dimension-card .name {
            font-size: 0.8rem;
            font-weight: 600;
            color: #374151;
        }
        .dimension-card .weight {
            font-size: 0.65rem;
            color: #9ca3af;
            background: #f3f4f6;
            padding: 0.1rem 0.35rem;
            border-radius: 4px;
        }
        /* 数值 - 最大最突出 */
        .dimension-card .value {
            font-size: 1.5rem;
            font-weight: 700;
            color: #111827;
            line-height: 1.2;
            margin-bottom: 0.1rem;
        }
        .dimension-card .value.high { color: #059669; }
        .dimension-card .value.mid { color: #b45309; }
        .dimension-card .value.low { color: #dc2626; }
        /* 评分 - 小字次要 */
        .dimension-card .score-line {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            margin-bottom: 0.35rem;
        }
        .dimension-card .score-bar {
            flex: 1;
            height: 4px;
            background: #e5e7eb;
            border-radius: 2px;
            overflow: hidden;
        }
        .dimension-card .score-bar-fill {
            height: 100%;
            border-radius: 2px;
            transition: width 0.5s ease;
        }
        .dimension-card.profit .score-bar-fill { background: #10b981; }
        .dimension-card.roi .score-bar-fill { background: #3b82f6; }
        .dimension-card.conversion .score-bar-fill { background: #8b5cf6; }
        .dimension-card.scale .score-bar-fill { background: #f59e0b; }
        .dimension-card.trend .score-bar-fill { background: #ec4899; }

        .dimension-card .score-text {
            font-size: 0.7rem;
            color: #6b7280;
            font-weight: 500;
            min-width: 32px;
            text-align: right;
        }
        /* 说明 */
        /* ==== Dimension Card Tooltips ==== */
        .dimension-card { position: relative; }
        .dimension-card .tooltip-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: rgba(0,0,0,0.06);
            color: #9ca3af;
            font-size: 9px;
            cursor: help;
            transition: all 0.2s ease;
            margin-left: 0.35rem;
            flex-shrink: 0;
        }
        .dimension-card .tooltip-icon:hover {
            background: rgba(0,0,0,0.1);
            color: #374151;
        }
        .dimension-card .tooltip-content {
            position: absolute;
            bottom: calc(100% + 6px);
            left: 50%;
            transform: translateX(-50%);
            padding: 0.75rem 1rem;
            background: #1e293b;
            color: #fff;
            font-size: 0.75rem;
            line-height: 1.6;
            border-radius: 8px;
            white-space: pre-line;
            min-width: 260px;
            max-width: 320px;
            z-index: 9999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2);
        }
        .dimension-card .tooltip-content::before {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: #1e293b;
        }
        
        .dimension-grid .dimension-card:nth-child(-n+3) .tooltip-content {
            bottom: auto;
            top: calc(100% + 6px);
        }
        .dimension-grid .dimension-card:nth-child(-n+3) .tooltip-content::before {
            top: auto;
            bottom: 100%;
            border-top-color: transparent;
            border-bottom-color: #1e293b;
        }

        .dimension-card .header:hover .tooltip-content,
        .dimension-card .tooltip-content:hover {
            opacity: 1;
            visibility: visible;
        }

        .dimension-card .desc {
            font-size: 0.7rem;
            color: #9ca3af;
            line-height: 1.4;
            margin-top: auto;
        }

        /* 移动端适配 */
        @media (max-width: 1100px) {
            .feasibility-layout { flex-direction: column; }
            .overall-panel {
                width: 100%;
                flex-direction: row;
                justify-content: space-between;
                padding: 0.6rem;
            }
            .overall-panel .formula { display: none; }
            .dimension-grid { grid-template-columns: repeat(2, 1fr); }
        }

    
        .overall-panel { position: relative; }
        .overall-panel .tooltip-icon {
            position: absolute;
            top: 0.75rem;
            right: 0.75rem;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: rgba(5, 150, 105, 0.15);
            color: #059669;
            font-size: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: help;
            transition: all 0.2s ease;
            z-index: 10;
        }
        .overall-panel .tooltip-icon:hover {
            background: rgba(5, 150, 105, 0.25);
        }
        .overall-panel .tooltip-content {
            position: fixed;
            top: auto;
            left: auto;
            right: auto;
            bottom: auto;
            transform: none;
            padding: 0.75rem 1rem;
            background: #1e293b;
            color: #fff;
            font-size: 0.75rem;
            line-height: 1.6;
            border-radius: 8px;
            white-space: pre-line;
            min-width: 280px;
            max-width: 320px;
            z-index: 99999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
            box-shadow: 0 10px 40px rgba(0,0,0,0.3);
            pointer-events: none;
        }
        .overall-panel:hover .tooltip-content,
        .overall-panel .tooltip-content:hover {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }
        .overall-panel .tooltip-content::before {
            display: none;
        }
        .overall-panel:hover .tooltip-content,
        .overall-panel .tooltip-content:hover,
        .overall-panel .tooltip-icon:hover + .tooltip-content {
            opacity: 1;
            visibility: visible;
        }
    
        /* ==== Key Metrics Cards ==== */
        .metrics-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 0.875rem;
            margin: 1rem 0;
        }
        .metrics-card {
            background: #ffffff;
            border-radius: 14px;
            border: 1px solid rgba(0,0,0,0.04);
            padding: 1rem 1rem 0.75rem;
            display: flex;
            flex-direction: column;
            transition: all 0.25s ease;
            position: relative;
            overflow: hidden;
        }
        .metrics-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(0,0,0,0.06);
        }
        .metrics-card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
        }
        .metrics-card.star::before { background: linear-gradient(90deg, #34d399, #10b981); }
        .metrics-card.profit::before { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
        .metrics-card.data::before { background: linear-gradient(90deg, #a78bfa, #8b5cf6); }
        .metrics-card.shipping::before { background: linear-gradient(90deg, #fbbf24, #f59e0b); }

        .metrics-card .label-row {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            margin-bottom: 0.5rem;
        }
        .metrics-card .label {
            font-size: 0.75rem;
            color: #64748b;
            font-weight: 500;
        }
        .metrics-card .tooltip-icon {
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: rgba(0,0,0,0.06);
            color: #94a3b8;
            font-size: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: help;
            transition: all 0.2s ease;
        }
        .metrics-card .tooltip-icon:hover {
            background: rgba(0,0,0,0.1);
            color: #475569;
        }
        .metrics-card .tooltip-content {
            position: absolute;
            bottom: calc(100% + 6px);
            left: 50%;
            transform: translateX(-50%);
            padding: 0.75rem 1rem;
            background: #1e293b;
            color: #fff;
            font-size: 0.75rem;
            line-height: 1.6;
            border-radius: 8px;
            white-space: pre-line;
            min-width: 220px;
            max-width: 280px;
            z-index: 9999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2);
        }
        .metrics-card .tooltip-content::before {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: #1e293b;
        }
        .metrics-card .label-row:hover .tooltip-content,
        .metrics-card .tooltip-content:hover {
            opacity: 1;
            visibility: visible;
        }

        .metrics-card .value-row {
            display: flex;
            align-items: baseline;
            gap: 0.5rem;
            margin-bottom: 0.35rem;
        }
        .metrics-card .value {
            font-size: 1.6rem;
            font-weight: 700;
            color: #0f172a;
            line-height: 1;
        }
        .metrics-card .value.success { color: #059669; }
        .metrics-card .check {
            font-size: 0.85rem;
            color: #10b981;
            font-weight: 600;
        }
        .metrics-card .standard {
            font-size: 0.7rem;
            color: #94a3b8;
            padding-top: 0.4rem;
            border-top: 1px dashed rgba(0,0,0,0.06);
            margin-top: auto;
        }

        @media (max-width: 1100px) {
            .metrics-grid { grid-template-columns: repeat(2, 1fr); }
        }

        
        /* ==== Table Header Sortable ==== */
        .data-table th.sortable {
            cursor: pointer;
            user-select: none;
            transition: all 0.2s ease;
        }
        .data-table th.sortable:hover {
            background: #e2e8f0;
        }
        .data-table th.sortable .sort-icon {
            font-size: 0.7rem;
            color: #94a3b8;
            margin-left: 2px;
        }
        .data-table th.sortable.asc .sort-icon {
            color: #2563eb;
        }
        .data-table th.sortable.asc .sort-icon::after {
            content: '↑';
        }
        .data-table th.sortable.desc .sort-icon {
            color: #2563eb;
        }
        .data-table th.sortable.desc .sort-icon::after {
            content: '↓';
        }
        .data-table th.sortable.asc .sort-icon,
        .data-table th.sortable.desc .sort-icon {
            font-size: 0;
        }
        </style>
<style>
/* Tooltip styles for stat cards */
.stat-box { position: relative; }
.stat-box .tooltip-icon {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    color: #64748b;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    transition: all 0.2s ease;
}
.stat-box .tooltip-icon:hover {
    background: rgba(0,0,0,0.1);
    color: #0f172a;
}
.stat-box .tooltip-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    padding: 0.75rem 1rem;
    background: #1e293b;
    color: #fff;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 8px;
    white-space: pre-line;
    min-width: 220px;
    max-width: 280px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.stat-box .tooltip-content::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #1e293b;
}
.stat-box .tooltip-icon:hover + .tooltip-content,
.stat-box .tooltip-content:hover {
    opacity: 1;
    visibility: visible;
}

/* ==== 店铺分析：格局判定卡片 ==== */
.pattern-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.pattern-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--pattern-c, #3B82F6);
}
.pattern-card.monopoly::before { background: var(--pattern-a, #8B5CF6); }
.pattern-card.brand::before { background: var(--pattern-b, #F59E0B); }
.pattern-card.operation::before { background: var(--pattern-c, #3B82F6); }
.pattern-card.chaos::before { background: var(--pattern-d, #EF4444); }
.pattern-card.reshaping::before { background: var(--pattern-e, #10B981); }
.pattern-card.opportunity::before { background: var(--pattern-f, #6366F1); }

.pattern-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}
.pattern-metrics {
    display: flex;
    gap: 1.5rem;
}
.pattern-metric {
    display: flex;
    flex-direction: column;
}
.pattern-metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}
.pattern-metric-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* ==== 店铺分析：策略建议卡片 ==== */
.strategy-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.strategy-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}
.strategy-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}
.identity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}
.identity-selector select {
    padding: 0.4rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 0.875rem;
    color: #1f2937;
    cursor: pointer;
}
.strategy-table {
    width: 100%;
    border-collapse: collapse;
}
.strategy-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}
.strategy-table td:first-child {
    width: 100px;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 4px;
}
.strategy-table td:last-child {
    color: #1f2937;
}
.strategy-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* ==== 店铺分析：店铺类型标签 ==== */
.store-type-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
}
.store-type-tag.single { background: #8B5CF6; }
.store-type-tag.precision { background: #3B82F6; }
.store-type-tag.multi { background: #9CA3AF; }
.store-type-tag.dropship { background: #EF4444; }

.identity-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #374151;
}
.identity-tag::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.identity-tag.local::before { background: #10b981; }
.identity-tag.cross::before { background: #f59e0b; }

/* ==== 店铺分析：数据表格 ==== */
.store-list-section {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
    padding: 1.5rem;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}
.filters {
    display: flex;
    gap: 0.75rem;
}
.filter-select, .search-input, .sort-select {
    padding: 0.4rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151;
}
.search-input { width: 180px; }

.trend-up { color: #10b981; }
.trend-down { color: #ef4444; }

/* ==== 店铺分析：布局网格 ==== */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-card, .history-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
    padding: 1.5rem;
}
.chart-card h3, .history-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}
.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
}
.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.history-trend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.trend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.trend-label {
    font-size: 0.875rem;
    color: #6b7280;
}
.trend-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
}
.trend-value.up { color: #10b981; }
.trend-text {
    font-size: 0.875rem;
    color: #374151;
}

/* ==== 通用按钮样式补充 ==== */
.btn-primary {
    padding: 0.5rem 1rem;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}
.btn-primary:hover { background: #4338ca; }

.btn-secondary {
    padding: 0.5rem 1rem;
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
}
.btn-secondary:hover { background: #f9fafb; }

.btn-text {
    padding: 0.35rem 0.75rem;
    background: transparent;
    color: #4f46e5;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
}
.btn-text:hover { text-decoration: underline; }

/* ==== 下拉菜单 ==== */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 120px;
    z-index: 100;
}
.dropdown:hover .dropdown-menu {
    display: block;
}
.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
}
.dropdown-menu a:hover {
    background: #f9fafb;
}

/* ==== 分页 ==== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* ==== 工具栏补充 ==== */
.category-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.category-selector label {
    font-size: 0.875rem;
    color: #6b7280;
}
.category-selector select {
    padding: 0.4rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151;
}

/* ==== 模态框 ==== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.35);
    z-index: 100;
    justify-content: center;
    align-items: center;
}
.modal-overlay.active {
    display: flex;
}
.modal-box {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.02);
    box-shadow: 0 24px 64px rgba(0,0,0,0.12);
    padding: 1.75rem;
    width: 520px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}
.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-size: 1.1rem;
    cursor: pointer;
}
.modal-close:hover {
    background: #e2e8f0;
}
/**
 * ============================================
 * Page Component Styles
 * ============================================
 * 所有页面共享的组件样式
 * 此文件包含各个页面使用的卡片、表格、标签等组件样式
 */

/* ==== Panel / Card 卡片 ==== */
.panel, .card {
    background: #ffffff;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover, .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.05);
}

.panel-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.2px;
}

.panel-sub {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ==== Stats Row & Stat Box 统计卡片 ==== */
.stats-row {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    flex: 1;
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.04);
}

.stat-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #cbd5e1 0%, #94a3b8 100%);
    opacity: 0.35;
}

.stat-box.success::before { background: #34d399; opacity: 0.55; }
.stat-box.warning::before { background: #fbbf24; opacity: 0.55; }
.stat-box.danger::before { background: #f87171; opacity: 0.55; }
.stat-box.info::before { background: #60a5fa; opacity: 0.55; }
.stat-box.purple::before { background: #a78bfa; opacity: 0.55; }

.stat-box .label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-box .value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.stat-box .value.success { color: #059669; }
.stat-box .value.warning { color: #b45309; }
.stat-box .value.danger { color: #b91c1c; }
.stat-box .value.info { color: #2563eb; }
.stat-box .value.purple { color: #7c3aed; }

.stat-box .trend {
    font-size: 0.74rem;
    font-weight: 500;
    color: #cbd5e1;
}

.stat-box .sub {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Tooltip */
.stat-box .tooltip-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

.stat-box .tooltip-content {
    display: none;
    position: absolute;
    top: 2.5rem;
    right: 0;
    width: 280px;
    background: #1e293b;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.5;
    z-index: 10;
    white-space: pre-line;
}

.stat-box .tooltip-icon:hover + .tooltip-content,
.stat-box .tooltip-content:hover {
    display: block;
}

/* ==== Insight Card 洞察卡片 ==== */
.insight-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(0,0,0,0.03);
}

.insight-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-bar {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.875rem;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.04);
    font-size: 0.82rem;
    color: #334155;
    transition: all 0.2s ease;
}

.insight-item:hover {
    transform: translateX(3px);
    background: #fafafa;
}

.insight-item.p1 { background: #fef2f2; color: #991b1b; border-color: rgba(239,68,68,0.10); }
.insight-item.p2 { background: #eff6ff; color: #1e40af; border-color: rgba(59,130,246,0.10); }
.insight-item.p3 { background: #f8fafc; color: #475569; border-color: rgba(0,0,0,0.05); }

/* ==== Feasibility Layout 可行性布局 ==== */
.feasibility-layout {
    display: flex;
    gap: 1.25rem;
}

.overall-panel {
    flex: 0 0 220px;
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
}

.dimension-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dimension-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.03);
}

.dimension-name {
    width: 80px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}

.dimension-bar {
    flex: 1;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.dimension-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.dimension-score {
    width: 50px;
    text-align: right;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
}

@media (max-width: 768px) {
    .feasibility-layout {
        flex-direction: column;
    }
    .overall-panel {
        flex: 1;
    }
}

/* ==== Form Field 表单字段 ==== */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.form-field input,
.form-field select {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    font-size: 0.82rem;
    color: #334155;
    background: #fff;
    transition: border-color 0.2s ease;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.08);
}

/* ==== Tag 标签 ==== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.tag-green {
    background: #f0fdf4;
    color: #15803d;
    border-color: rgba(16,185,129,0.10);
}

.tag-orange {
    background: #fffbeb;
    color: #b45309;
    border-color: rgba(245,158,11,0.10);
}

.tag-red {
    background: #fef2f2;
    color: #dc2626;
    border-color: rgba(220,38,38,0.10);
}

.tag-blue {
    background: #eff6ff;
    color: #2563eb;
    border-color: rgba(59,130,246,0.10);
}

.tag-gray {
    background: #f1f5f9;
    color: #475569;
    border-color: rgba(0,0,0,0.05);
}

.tag-purple {
    background: #faf5ff;
    color: #7c3aed;
    border-color: rgba(147,51,234,0.10);
}

/* ==== Data Table 数据表格 ==== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    vertical-align: middle;
}

.data-table th {
    font-weight: 600;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
}

.data-table tbody tr:hover {
    background: rgba(0,0,0,0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.data-table th.sortable:hover {
    background: #f1f5f9;
}

/* ==== Progress Bar 进度条 ==== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.success { background: linear-gradient(90deg, #34d399, #10b981); }
.progress-fill.warning { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.progress-fill.danger { background: linear-gradient(90deg, #f87171, #ef4444); }
.progress-fill.info { background: linear-gradient(90deg, #60a5fa, #3b82f6); }

/* ==== Page Layout Helpers 页面布局辅助 ==== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.page-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stats-row { flex-direction: column; }
}

/* ==== Chart Container 图表容器 ==== */
.chart-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

/* ==== Action Bar 操作栏 ==== */
.action-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ==== Filter Bar 筛选栏 ==== */
.filter-bar {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    padding: 0.6rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.03);
}

/* ==== Empty State 空状态 ==== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    color: #94a3b8;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.empty-state-desc {
    font-size: 0.82rem;
    color: #94a3b8;
}

/* ==== Loading State 加载状态 ==== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f1f5f9;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==== Scroll Container 滚动容器 ==== */
.scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.scroll-y {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==== Text Helpers 文本辅助 ==== */
.text-success { color: #059669; }
.text-warning { color: #b45309; }
.text-danger { color: #b91c1c; }
.text-info { color: #2563eb; }
.text-muted { color: #94a3b8; }
.text-primary { color: #4f46e5; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-sm { font-size: 0.75rem; }
.text-base { font-size: 0.875rem; }
.text-lg { font-size: 1rem; }
.text-xl { font-size: 1.125rem; }

/* ==== Spacing Helpers 间距辅助 ==== */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* ============================================
 * Page Specific Styles Extracted from Original
 * ============================================ */

/* ==== Category Select ==== */
.category-select {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 10px;
    color: #334155;
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

.category-select:focus {
    border-color: #0f172a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(15,23,42,0.06);
}

/* ==== Profit Analysis Page - Five Dimension Score ==== */
.overall-panel {
    width: 180px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #d1fae5 100%);
    border-radius: 16px;
    border: 1px solid rgba(16,185,129,0.15);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.overall-panel .label {
    font-size: 0.8rem;
    color: #059669;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.overall-panel .score {
    font-size: 3rem;
    font-weight: 700;
    color: #059669;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.overall-panel .rating {
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    background: rgba(16,185,129,0.12);
    border-radius: 20px;
}

.overall-panel .formula {
    font-size: 0.65rem;
    color: #6b7280;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(16,185,129,0.2);
    line-height: 1.5;
}

.overall-panel .tooltip-icon {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(5, 150, 105, 0.15);
    color: #059669;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

.dimension-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.75rem;
}

.dimension-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.dimension-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.dimension-card.profit { border-left: 3px solid #10b981; }
.dimension-card.roi { border-left: 3px solid #3b82f6; }
.dimension-card.conversion { border-left: 3px solid #8b5cf6; }
.dimension-card.scale { border-left: 3px solid #f59e0b; }
.dimension-card.trend { border-left: 3px solid #ec4899; }

.dimension-card .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.dimension-card .name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dimension-card .weight {
    font-size: 0.7rem;
    color: #9ca3af;
    font-weight: 500;
}

.dimension-card .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.dimension-card .value.high { color: #059669; }
.dimension-card .value.mid { color: #b45309; }
.dimension-card .value.low { color: #dc2626; }

.dimension-card .score-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.dimension-card .score-bar {
    flex: 1;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}

.dimension-card .score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.dimension-card.profit .score-bar-fill { background: #10b981; }
.dimension-card.roi .score-bar-fill { background: #3b82f6; }
.dimension-card.conversion .score-bar-fill { background: #8b5cf6; }
.dimension-card.scale .score-bar-fill { background: #f59e0b; }
.dimension-card.trend .score-bar-fill { background: #ec4899; }

.dimension-card .score-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.dimension-card .desc {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

@media (max-width: 1024px) {
    .dimension-grid { grid-template-columns: repeat(2, 1fr); }
    .overall-panel {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 0.6rem;
    }
    .overall-panel .formula { display: none; }
}

/* ==== Score Badge ==== */
.score-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.score-high { background: #f0fdf4; color: #15803d; }
.score-mid { background: #fffbeb; color: #b45309; }
.score-low { background: #fef2f2; color: #dc2626; }

/* ==== Cost Page Specific ==== */
.cost-params-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cost-param-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.cost-param-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cost-param-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================
 * Additional Page Component Styles
 * ============================================ */

/* ==== Tooltip Helper ==== */
.th-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
    cursor: help;
    position: relative;
    vertical-align: middle;
}

.th-tip:hover, .th-tip:focus {
    background: #cbd5e1;
    color: #475569;
}

/* ==== Score Bar ==== */
.score-bar {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    transition: width 0.5s ease;
}

/* ==== Quadrant Grid (Profit Analysis) ==== */
.quadrant-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.quadrant-cell {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.quadrant-cell:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.03);
}

.quadrant-cell .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.quadrant-cell .title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

.quadrant-cell .count {
    font-size: 0.75rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .quadrant-grid {
        grid-template-columns: 1fr;
    }
}

/* ==== Matrix Item (Store Analysis) ==== */
.matrix-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 0.6rem;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.matrix-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

/* ==== Range Row (Price Band) ==== */
.range-min, .range-max {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8rem;
}

.range-min:focus, .range-max:focus {
    outline: none;
    border-color: #4f46e5;
}

/* ==== Preset Chip (Price Band Config) ==== */
.preset-chip {
    flex: 1;
    padding: 6px 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 0.75rem;
    color: #475569;
    cursor: pointer;
    transition: all .2s;
}

.preset-chip:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.preset-chip.active {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 600;
    border-color: #cbd5e1;
}

/* ==== Pattern Card (Store Analysis) ==== */
.pattern-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.pattern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.04);
}

.pattern-card .title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.pattern-card .desc {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.5;
}

/* ==== Strategy Card ==== */
.strategy-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid rgba(16,185,129,0.15);
}

.strategy-card .title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 0.4rem;
}

.strategy-card .item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
}

.strategy-card .label {
    color: #64748b;
    font-weight: 500;
    min-width: 70px;
}

.strategy-card .value {
    color: #334155;
    flex: 1;
}

/* ==== Store Type Tag ==== */
.store-type-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
}

.store-type-tag.local {
    background: #f0fdf4;
    color: #15803d;
}

.store-type-tag.cross {
    background: #eff6ff;
    color: #2563eb;
}

.store-type-tag.matrix {
    background: #fffbeb;
    color: #b45309;
}

/* ==== Section Title ==== */
.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 1.25rem;
}

/* ==== Info Grid ==== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item .label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.info-item .value {
    font-size: 0.9rem;
    color: #0f172a;
    font-weight: 600;
}

/* ==== Content Card ==== */
.content-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.04);
}

.content-card .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.content-card .title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.content-card .actions {
    display: flex;
    gap: 0.5rem;
}
/* ============================================
 * Missing Component Styles
 * ============================================
 */

/* ==== Filter Bar & Filter Tag ==== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
    margin-bottom: 1rem;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 20px;
    font-size: 0.78rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    background: #f1f5f9;
    border-color: rgba(0,0,0,0.1);
}

.filter-tag.active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

/* ==== Card Header (used in profit page) ==== */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

/* ==== Product Section ==== */
.product-section {
    margin-bottom: 1.5rem;
}

.product-section .title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

/* ==== Insight Suggestion ==== */
.insight-suggestion {
    background: #f0fdf4;
    border: 1px solid rgba(16,185,129,0.15);
    border-radius: 12px;
    padding: 0.6rem;
    margin-top: 1rem;
}

.insight-suggestion .title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #15803d;
    margin-bottom: 0.5rem;
}

.insight-suggestion .content {
    font-size: 0.82rem;
    color: #334155;
    line-height: 1.5;
}

/* ==== Quadrant Grid (Profit Analysis) ==== */
.quadrant-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.quadrant-cell {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid rgba(0,0,0,0.04);
}

.quadrant-cell .title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

/* ==== Fix for stat-box variants ==== */
.stat-box.info .label { color: #60a5fa; }
.stat-box.purple .label { color: #a78bfa; }

/* ==== Header inside dimension-card ==== */
.dimension-card .header .tooltip-icon {
    position: relative;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    margin-left: 4px;
}

/* ==== Score in overall-panel ==== */
.overall-panel .score {
    font-size: 3rem;
    font-weight: 700;
    color: #059669;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.overall-panel .rating {
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    background: rgba(16,185,129,0.12);
    border-radius: 20px;
}

.overall-panel .formula {
    font-size: 0.65rem;
    color: #6b7280;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(16,185,129,0.2);
    line-height: 1.5;
}

/* ==== Fix stat-box tooltip ==== */
.stat-box {
    position: relative;
}

.stat-box .tooltip-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

.stat-box .tooltip-content {
    display: none;
    position: absolute;
    top: 2.5rem;
    right: 0;
    width: 280px;
    background: #1e293b;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.5;
    z-index: 10;
    white-space: pre-line;
}

.stat-box .tooltip-icon:hover + .tooltip-content,
.stat-box .tooltip-content:hover {
    display: block;
}

/* ==== Sub text in stat-box ==== */
.stat-box .sub {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.25rem;
}


/* ==== Fix for standalone pages ==== */
.page.standalone { display: block !important; }

/* ==== Sidebar Scrollbar ==== */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }

/* ==== Tree Pager ==== */
.tree-pager { display:flex; align-items:center; justify-content:center; gap:0.35rem; flex-wrap:wrap; font-size:0.72rem; }
.tree-pager .pager-info { color:#64748b; margin-right:0.5rem; }
.tree-pager .pager-btn { padding:0.25rem 0.55rem; border:1px solid #e2e8f0; background:#fff; color:#475569; border-radius:4px; cursor:pointer; font-size:0.7rem; line-height:1; }
.tree-pager .pager-btn:hover:not(:disabled) { background:#f1f5f9; border-color:#cbd5e1; }
.tree-pager .pager-btn:disabled { color:#94a3b8; cursor:not-allowed; background:#f8fafc; }
.tree-pager .pager-btn.active { background:#3b82f6; color:#fff; border-color:#3b82f6; font-weight:600; }

/* 店铺标签统一格式：小店铺图标 + CBT·墨 / 本土·墨 前缀 + 店名，同字号一行、无底色 */
.store-label { display:inline-flex; align-items:center; white-space:nowrap; }
.store-chip { display:inline-flex; align-items:center; font-size:inherit; color:#94a3b8; margin-right:3px; white-space:nowrap; }
.store-chip svg { width:.95em; height:.95em; margin-right:2px; opacity:.8; }
