.shop-analysis {
    color-scheme: light;
    /* Looper tokens from the host website; all styles stay inside this route. */
    --blue:var(--primary,#346cb0); --blue-dark:#2b5a92; --ink:#363642; --muted:#888c9b;
    --border:rgba(20,20,31,.12); --bg:#f6f7f9; --light:#edf2f8;
    --focus-ring:rgba(52,108,176,.25); --primary-border:#b8cce3; --primary-hover:#dce7f3;
    --price:var(--blue); --star:#f7c46c; --mall:var(--blue);
    --shopee-grad:var(--blue);
    --font-ui:var(--font-family-sans-serif,-apple-system,BlinkMacSystemFont,"Fira Sans","Helvetica Neue",sans-serif);
    --radius-sm:4px; --radius-md:4px; --radius-lg:6px;
    --motion-fast:140ms; --motion-base:220ms; --motion-slow:420ms;
    --ease-standard:cubic-bezier(.2,.8,.2,1); --ease-enter:cubic-bezier(.16,1,.3,1);
}
.shop-analysis * { box-sizing:border-box; }
.shop-analysis { scroll-behavior:smooth; scroll-padding-top:88px; }
.shop-analysis { margin:0; font-family:var(--font-ui); color:var(--ink); line-height:1.6; }
.shop-analysis button,.shop-analysis input,.shop-analysis select,.shop-analysis textarea { font:inherit; }
.shop-analysis button,.shop-analysis a { -webkit-tap-highlight-color:transparent; }
.shop-analysis button { cursor:pointer; }
.shop-analysis button:disabled { cursor:not-allowed; }
.shop-analysis [hidden] { display:none!important; }
.shop-analysis :focus-visible { outline:3px solid var(--blue); outline-offset:4px; }
.shop-analysis a { color:inherit; }
.shop-analysis .brand-symbol { display:inline-grid; place-items:center; width:34px; height:34px; flex-shrink:0; border-radius:9px; background:var(--blue); color:white; }
.shop-analysis .brand-symbol svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.shop-analysis.motion-ready [data-reveal].reveal-pending { opacity:0; transform:translateY(18px); }
.shop-analysis [data-reveal] { transition:opacity var(--motion-slow) var(--ease-enter),transform var(--motion-slow) var(--ease-enter); }
.shop-analysis .skeleton-list { display:grid; gap:14px; padding:16px 0; }
.shop-analysis .skeleton-row { display:flex; gap:14px; align-items:center; }
.shop-analysis .skeleton-block { display:block; height:12px; border-radius:5px; background:#e9eef6; overflow:hidden; position:relative; }
.shop-analysis .skeleton-block::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,transparent,#ffffffaa,transparent); transform:translateX(-100%); animation:shimmer 1.5s ease-in-out infinite; }
.shop-analysis .skeleton-thumb { width:46px; height:46px; flex-shrink:0; border-radius:8px; }
.shop-analysis .skeleton-lines { display:grid; gap:10px; flex:1; }
.shop-analysis .skeleton-lines .skeleton-block:last-child { width:58%; }
@keyframes shimmer { to { transform:translateX(100%); } }
@keyframes soft-enter { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes turn { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) {
 .shop-analysis { scroll-behavior:auto; }
 .shop-analysis *,.shop-analysis *::before,.shop-analysis *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
 .shop-analysis.motion-ready [data-reveal].reveal-pending { opacity:1; transform:none; }
}
@media print { .shop-analysis [data-reveal] { opacity:1!important; transform:none!important; } }


    .shop-analysis * { box-sizing:border-box; }
    .shop-analysis { scroll-behavior:smooth; scroll-padding-top:100px; }
    .shop-analysis { margin:0; font-family:var(--font-ui); color:var(--ink); background:var(--bg); font-size:14px; line-height:1.6; }
    .shop-analysis button,.shop-analysis input,.shop-analysis select { font:inherit; }
    .shop-analysis button,.shop-analysis a,.shop-analysis input,.shop-analysis select { -webkit-tap-highlight-color:transparent; }
    .shop-analysis button,.shop-analysis a { transition:background .18s, color .18s, box-shadow .18s; }
    .shop-analysis button { cursor:pointer; }
    .shop-analysis button:disabled { opacity:.5; cursor:not-allowed; }
    .shop-analysis a { color:inherit; text-decoration:none; }
    .shop-analysis :focus-visible { outline:3px solid var(--primary-border); outline-offset:3px; }
    .shop-analysis [hidden] { display:none !important; }
    .shop-analysis .icon { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; vertical-align:middle; }
    .shop-analysis .sidebar { width:224px; position:fixed; inset:0 auto 0 0; background:#fff; border-right:1px solid var(--border); padding:26px 14px 18px; display:flex; flex-direction:column; z-index:30; overflow-y:auto; overscroll-behavior:contain; transition:transform 260ms var(--ease-enter), visibility 260ms; }
    .shop-analysis .brand { display:flex; align-items:center; gap:9px; padding:0 10px; font-size:25px; font-weight:750; letter-spacing:-1.1px; }
    .shop-analysis .brand-mark { display:grid; place-items:center; width:34px; height:34px; border-radius:9px; background:var(--blue); color:#fff; box-shadow:none; }
    .shop-analysis .brand-mark .icon { width:22px; height:22px; }
    .shop-analysis .brand span:last-child { color:var(--blue); }
    .shop-analysis .nav-label { font-size:9px; font-weight:700; letter-spacing:1.3px; color:var(--muted); padding:0 14px; margin:32px 0 12px; }
    .shop-analysis .nav-link { display:flex; gap:12px; align-items:center; padding:10px 12px; border-radius:7px; color:var(--muted); margin-bottom:3px; font-weight:550; font-size:12px; min-height:44px; }
    .shop-analysis .nav-link:hover { background:var(--light); color:var(--blue); }
    .shop-analysis .nav-link.active { color:var(--blue); background:var(--light); box-shadow:none; }
    .shop-analysis .nav-link.active::after { content:""; width:4px; height:16px; border-radius:2px; background:var(--blue); margin-left:auto; }
    .shop-analysis .sidebar-bottom { margin-top:auto; }
    .shop-analysis .sidebar-note { background:transparent; border:0; border-radius:0; padding:18px 8px 0; margin:24px 0 16px; border-top:1px solid var(--border); }
    .shop-analysis .sidebar-note .icon { color:var(--blue); margin-bottom:8px; }
    .shop-analysis .sidebar-note b { display:block; font-size:12px; }
    .shop-analysis .sidebar-note p { color:var(--muted); font-size:11px; margin:6px 0 0; }
    .shop-analysis .workspace { display:flex; gap:10px; align-items:center; border-top:1px solid var(--border); padding:15px 8px 0; }
    .shop-analysis .avatar { width:35px; height:35px; display:grid; place-items:center; background:var(--light); border-radius:50%; color:var(--blue); font-size:12px; font-weight:700; }
    .shop-analysis .workspace b { display:block; font-size:12px; }
    .shop-analysis .workspace small { color:var(--muted); font-size:10px; }
    .shop-analysis .shell { margin-left:224px; min-width:0; }
    .shop-analysis .topbar { height:64px; display:flex; align-items:center; justify-content:space-between; padding:0 32px; background:var(--shopee-grad); border-bottom:0; position:sticky; top:0; z-index:20; backdrop-filter:none; }
    .shop-analysis .topbar .breadcrumb { color:#ffffffd9; }
    .shop-analysis .topbar .breadcrumb strong { color:#fff; }
    .shop-analysis .topbar .menu-button { color:#fff; }
    .shop-analysis .topbar .platform-badge { background:#ffffff26; border-color:#ffffff59; color:#fff; }
    .shop-analysis .topbar .platform-badge i { background:#fff; }
    .shop-analysis .breadcrumb { display:flex; align-items:center; gap:13px; font-size:12px; color:var(--muted); }
    .shop-analysis .breadcrumb strong { color:var(--ink); font-weight:550; max-width:280px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .shop-analysis .platform-badge { display:flex; align-items:center; gap:7px; border:1px solid var(--border); border-radius:7px; padding:5px 10px; font-size:11px; color:var(--muted); background:#fff; }
    .shop-analysis .platform-badge i { width:6px; height:6px; border-radius:50%; background:var(--blue); }
    .shop-analysis .wrap { max-width:1380px; margin:auto; padding:30px 32px 20px; }
    .shop-analysis .page-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:22px; padding:0; }
    .shop-analysis .eyebrow { color:var(--muted); font-size:9px; letter-spacing:1.4px; font-weight:750; text-transform:uppercase; }
    .shop-analysis h1 { font-size:34px; line-height:1.2; letter-spacing:-1.2px; margin:9px 0 10px; font-weight:600; }
    .shop-analysis .page-heading p { margin:0; font-size:13px; color:var(--muted); max-width:520px; }
    .shop-analysis .secondary-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:9px 13px; background:#fff; color:var(--ink); border:1px solid var(--border); border-radius:7px; font-size:12px; font-weight:600; white-space:nowrap; min-height:40px; }
    .shop-analysis .secondary-button:hover { background:var(--light); color:var(--blue); }
    .shop-analysis .panel { background:#fff; border:1px solid var(--border); border-radius:12px; box-shadow:none; margin-bottom:22px; overflow:hidden; }
    .shop-analysis .search-panel { padding:22px 24px; background:#fff; border-color:var(--border); }
    .shop-analysis .panel-title { display:flex; align-items:center; gap:10px; margin-bottom:14px; font-weight:650; font-size:13px; }
    .shop-analysis .panel-title>.icon { color:var(--blue); }
    .shop-analysis .search-grid { display:grid; grid-template-columns:1.6fr auto 1fr; gap:20px; align-items:end; }
    .shop-analysis .search label { display:block; font-size:11px; font-weight:600; margin-bottom:7px; color:#50617a; }
    .shop-analysis .input-group { display:flex; align-items:center; border:1px solid var(--border); border-radius:8px; background:#fff; padding:4px; gap:5px; }
    .shop-analysis .input-group:focus-within { border-color:var(--blue); box-shadow:0 0 0 3px var(--focus-ring); }
    .shop-analysis .input-group>.icon { margin-left:8px; color:#8d9bb0; width:17px; }
    .shop-analysis .search input { width:100%; min-width:0; border:0; background:transparent; padding:8px 6px; outline:none; font-size:12px; color:var(--ink); }
    .shop-analysis .search input::placeholder { color:#92a0b4; }
    .shop-analysis .search button { border:0; border-radius:6px; padding:9px 13px; font-weight:600; white-space:nowrap; font-size:12px; color:var(--blue); background:var(--light); }
    .shop-analysis .search button:hover { background:var(--primary-hover); }
    .shop-analysis .search .primary { color:#fff; background:var(--blue); padding:9px 17px; }
    .shop-analysis .search .primary:hover { background:var(--blue-dark); }
    .shop-analysis .search-divider { align-self:end; padding-bottom:15px; color:#96a2b4; font-size:11px; }
    .shop-analysis .hint { display:flex; align-items:center; gap:6px; font-size:11px; color:#7c8ba0; margin:12px 0 0; line-height:1.7; }
    .shop-analysis .hint .icon { width:13px; height:13px; }
    .shop-analysis .msg { padding:13px 16px; border:1px solid transparent; border-radius:9px; margin-bottom:20px; font-size:13px; animation:soft-enter 220ms var(--ease-enter); }
    .shop-analysis .msg.err { background:#fff1f2; color:#b4233b; border-color:#ffe0e4; }
    .shop-analysis .msg.info { background:var(--light); color:var(--blue-dark); border-color:var(--primary-hover); }
    .shop-analysis .msg.warn { background:#fffbeb; color:#94651b; border-color:#f7ebca; }
    .shop-analysis .empty-state { padding:30px; text-align:center; position:relative; background:#fff; border-style:solid; }
    .shop-analysis .empty-illustration { width:210px; height:90px; margin:0 auto 25px; display:flex; align-items:flex-end; justify-content:center; gap:12px; position:relative; margin-bottom:18px; transform:scale(.85); }
    .shop-analysis .empty-illustration::before { content:""; position:absolute; inset:0 10px -8px; border-radius:50%; background:transparent; }
    .shop-analysis .illustration-card { position:relative; width:136px; height:95px; border:1px solid var(--primary-border); border-radius:8px; background:white; box-shadow:none; padding:18px; display:flex; align-items:flex-end; gap:8px; transform:none; }
    .shop-analysis .illustration-card i { width:18px; border-radius:4px 4px 0 0; background:#c3d5e9; height:24px; }
    .shop-analysis .illustration-card i:nth-child(2) { height:36px; background:#8cadd3; }
    .shop-analysis .illustration-card i:nth-child(3) { height:47px; background:#5282bc; }
    .shop-analysis .illustration-card i:nth-child(4) { height:59px; background:var(--blue); }
    .shop-analysis .floating-icon { position:absolute; right:15px; top:0; width:34px; height:34px; display:grid; place-items:center; border-radius:8px; background:var(--blue); color:white; transform:none; box-shadow:none; }
    .shop-analysis .empty-state h2 { font-size:21px; letter-spacing:-.5px; margin:0 0 9px; font-weight:600; }
    .shop-analysis .empty-state>p { max-width:430px; margin:0 auto; color:var(--muted); font-size:13px; }
    .shop-analysis .steps { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; max-width:860px; margin:34px auto 0; border-top:1px solid var(--border); padding-top:20px; text-align:left; margin-top:26px; }
    .shop-analysis .step { display:flex; gap:11px; }
    .shop-analysis .step-number { height:28px; min-width:25px; border-radius:6px; display:grid; place-items:center; background:var(--light); color:var(--blue); font-size:11px; font-weight:700; width:28px; }
    .shop-analysis .step b { display:block; font-size:12px; margin-bottom:3px; }
    .shop-analysis .step p { margin:0; color:var(--muted); font-size:11px; }
    .shop-analysis .section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px 22px; border-bottom:1px solid var(--border); }
    .shop-analysis .section-heading h2 { font-size:16px; font-weight:600; margin:0; letter-spacing:-.2px; }
    .shop-analysis .section-heading p { margin:3px 0 0; color:var(--muted); font-size:12px; margin-top:4px; }
    .shop-analysis .section-number { display:inline-grid; place-items:center; width:auto; height:auto; background:transparent; color:#75849b; font-size:11px; border-radius:8px; margin-right:10px; vertical-align:middle; }
    .shop-analysis .section-.shop-analysis { padding:22px; }
    .shop-analysis .shop-heading { display:flex; align-items:center; gap:12px; margin:20px 0; padding:0; }
    .shop-analysis .shop-icon { display:grid; place-items:center; width:44px; height:44px; border-radius:10px; border:1px solid var(--primary-hover); color:var(--blue); background:#fff; }
    .shop-analysis .shop-heading h2 { margin:0; font-size:22px; letter-spacing:-.4px; font-weight:600; }
    .shop-analysis .shop-heading p { margin:3px 0 0; font-size:11px; color:var(--muted); }
    .shop-analysis .shop-heading .platform-badge { margin-left:auto; }
    .shop-analysis .cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:24px; }
    .shop-analysis .card { background:#fff; border:1px solid var(--border); border-radius:10px; padding:12px; box-shadow:none; }
    .shop-analysis .card .label { color:var(--muted); font-size:11px; display:flex; align-items:center; justify-content:space-between; gap:8px; }
    .shop-analysis .metric-icon { width:24px; height:24px; display:grid; place-items:center; background:transparent; color:#8493ac; border-radius:8px; }
    .shop-analysis .metric-icon .icon { width:17px; height:17px; }
    .shop-analysis .card .value { font-size:clamp(22px,1.9vw,30px); letter-spacing:-.8px; font-weight:700; margin-top:14px; line-height:1.25; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
    .shop-analysis .card .metric-note { color:var(--muted); font-size:11px; margin-top:9px; line-height:1.6; }
    .shop-analysis #cards .card:nth-child(3) { border-color:var(--border); background:#fff; }
    .shop-analysis #cards .card:nth-child(3) .value { color:var(--ink); }
    .shop-analysis .table-scroll { overflow-x:auto; min-width:0; overscroll-behavior-x:contain; }
    .shop-analysis table { width:100%; border-collapse:collapse; background:#fff; }
    .shop-analysis th,.shop-analysis td { padding:15px 19px; text-align:left; border-bottom:1px solid #edf1f7; font-size:12px; }
    .shop-analysis th { background:#f8fafc; color:var(--muted); font-size:11px; font-weight:600; white-space:nowrap; position:sticky; top:0; z-index:1; padding:13px 18px; }
    .shop-analysis td { color:#475970; padding:15px 18px; font-size:12px; }
    .shop-analysis tbody tr:last-child td { border-bottom:0; }
    .shop-analysis tbody tr:hover { background:#f9fbff; }
    .shop-analysis .product-cell { display:flex; align-items:center; gap:12px; width:100%; min-width:240px; }
    .shop-analysis .product-thumb { width:46px; height:46px; flex-shrink:0; border-radius:7px; background:#f0f4fa; display:grid; place-items:center; color:#94a7c1; overflow:hidden; border:1px solid var(--border); }
    .shop-analysis .product-thumb img { width:100%; height:100%; object-fit:cover; }
    .shop-analysis .product-name { font-weight:550; font-size:13px; color:var(--ink); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.5; }
    .shop-analysis .product-id { font-size:11px; color:var(--muted); margin-top:4px; }
    .shop-analysis .product-name-button { display:block; width:100%; padding:0; border:0; background:transparent; text-align:left; cursor:pointer; }
    /* Danh sách sản phẩm — lưới thẻ phong cách Shopee */
    .shop-analysis .products-toolbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:10px 0; }
    .shop-analysis .products-sort { font-size:12px; color:var(--muted); display:inline-flex; align-items:center; gap:7px; }
    .shop-analysis .products-sort select { padding:8px 10px; border:1px solid var(--border); border-radius:7px; font-size:12px; color:var(--ink); background:#fff; min-height:38px; }
    /* Cột cố định theo container 1380 (mentor): card đều nhau, responsive theo bề rộng. */
    .shop-analysis .shopee-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin-top:4px; }
    @media(max-width:1200px) { .shop-analysis .shopee-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
    @media(max-width:900px) { .shop-analysis .shopee-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
    .shop-analysis .sc-card { display:flex; flex-direction:column; background:#fff; border:1px solid var(--border); border-radius:4px; overflow:hidden; transition:box-shadow .18s, border-color .18s, transform .18s; }
    .shop-analysis .sc-card:hover { box-shadow:0 3px 14px #0000001c; border-color:var(--blue); transform:translateY(-2px); position:relative; z-index:1; }
    .shop-analysis .sc-card:focus-within { border-color:var(--blue); box-shadow:0 3px 14px #0000001c; }
    .shop-analysis .sc-media { position:relative; padding:0; border:0; width:100%; aspect-ratio:1/1; background:#f6f6f6; display:grid; place-items:center; overflow:hidden; color:#c4cdda; }
    .shop-analysis .sc-media img { width:100%; height:100%; object-fit:cover; }
    .shop-analysis .sc-media .icon { width:34px; height:34px; }
    .shop-analysis .sc-rank { position:absolute; top:0; left:0; z-index:1; background:var(--blue); color:#fff; font-size:11px; font-weight:700; padding:2px 9px; border-radius:0 0 8px 0; }
    .shop-analysis .sc-rank-muted { background:#bdbdbd; }
    .shop-analysis .sc-rank-1 { background:linear-gradient(135deg,#e8a200,#ffcb3d); color:#4a3200; }
    .shop-analysis .sc-rank-2 { background:linear-gradient(135deg,#98a1ab,#cbd2d8); color:#2b3138; }
    .shop-analysis .sc-rank-3 { background:linear-gradient(135deg,#c07a33,#e2a468); color:#3f2409; }
    .shop-analysis .sc-body { padding:8px 9px 5px; display:flex; flex-direction:column; gap:5px; flex:1; }
    .shop-analysis .sc-name { text-align:left; padding:0; border:0; background:none; cursor:pointer; font-size:13px; line-height:1.35; color:var(--ink); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:35px; }
    .shop-analysis .sc-name:hover { color:var(--blue); }
    .shop-analysis .sc-rating { font-size:11px; color:var(--muted); display:flex; align-items:center; gap:3px; }
    .shop-analysis .sc-star { color:var(--star); }
    .shop-analysis .sc-norate { color:#bbb; }
    .shop-analysis .sc-price { color:var(--price); font-weight:700; font-size:16px; font-variant-numeric:tabular-nums; }
    .shop-analysis .sc-price-rating { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
    .shop-analysis .sc-price-rating .sc-price { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .shop-analysis .sc-price-rating .sc-rating { flex:0 0 auto; white-space:nowrap; }
    .shop-analysis .sc-sold { position:relative; height:16px; border-radius:9px; background:var(--light); overflow:hidden; display:flex; align-items:center; margin-top:2px; }
    .shop-analysis .sc-sold-fill { position:absolute; inset:0 auto 0 0; background:var(--primary-border); border-radius:9px; }
    .shop-analysis .sc-sold-text { position:relative; z-index:1; font-size:9.5px; font-weight:600; color:var(--ink); padding:0 8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .shop-analysis .sc-sold-none { background:#f0f0f0; }
    .shop-analysis .sc-sold-none .sc-sold-text { color:var(--muted); }
    .shop-analysis .sc-actions { display:flex; gap:5px; padding:8px; border-top:1px solid var(--border); flex-wrap:nowrap; justify-content:space-between; }
    .shop-analysis .sc-actions a, .shop-analysis .sc-actions button { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; flex:0 0 auto; border:1px solid var(--border); border-radius:6px; background:#fff; color:#74859c; }
    .shop-analysis .sc-actions .icon { width:15px; height:15px; }
    .shop-analysis .sc-actions button:hover { color:var(--blue); background:var(--light); border-color:var(--blue); }
    .shop-analysis .sc-actions a { background:var(--blue); color:#fff; border-color:var(--blue); }
    .shop-analysis .sc-actions a:hover { background:var(--blue-dark); color:#fff; border-color:var(--blue-dark); }
    .shop-analysis .key-mini-stats { display:flex; justify-content:space-between; gap:10px; margin:3px 0 0; }
    .shop-analysis .key-mini-stats div { min-width:0; }
    .shop-analysis .key-mini-stats dt { color:var(--muted); font-size:10px; }
    .shop-analysis .key-mini-stats dd { margin:1px 0 0; font-size:12px; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
    .shop-analysis .key-mini-stats dd.revenue { color:var(--price); }
    .shop-analysis .key-revenue-stat { padding:8px; border:1px solid #dbe7f5; border-radius:8px; background:#f5f9ff; }
    .shop-analysis .key-revenue-stat div { width:100%; }
    .shop-analysis .key-revenue-stat dt { display:flex; align-items:center; justify-content:space-between; gap:6px; color:#59718d; font-weight:600; }
    .shop-analysis .key-revenue-stat dd.revenue { margin-top:3px; color:#2465ac; }
    .shop-analysis .key-revenue-share { flex:0 0 auto; padding:2px 6px; border-radius:999px; background:#dceafb; color:#2465ac; font-size:10px; font-weight:700; }
    @media(max-width:600px) { .shop-analysis .shopee-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } .shop-analysis .sc-price { font-size:15px; } }
    .shop-analysis .product-name-button:hover .product-name { color:var(--blue); }
    .shop-analysis .num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
    .shop-analysis .revenue { font-weight:650; color:var(--blue); }
    .shop-analysis .rating-pill { display:inline-block; background:#fffae9; color:#a9790c; padding:2px 6px; border-radius:5px; font-size:11px; }
    .shop-analysis th.sortable { cursor:pointer; user-select:none; }
    .shop-analysis th.sortable:hover, .shop-analysis .arrow-active { color:var(--blue); }
    .shop-analysis td.actions { text-align:center; white-space:nowrap; }
    .shop-analysis td.actions a,.shop-analysis td.actions button { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; padding:0; border:1px solid var(--border); border-radius:6px; background:#fff; color:#74859c; margin:0 2px; }
    .shop-analysis td.actions .icon { width:14px; height:14px; }
    .shop-analysis td.actions a:hover,.shop-analysis td.actions button:hover { color:var(--blue); background:var(--light); border-color:var(--primary-border); }
    .shop-analysis .pager { display:flex; align-items:center; justify-content:flex-end; gap:12px; padding:15px 21px; border-top:1px solid var(--border); }
    .shop-analysis .pager .muted { margin-right:auto; font-size:11px; }
    .shop-analysis .pager button { padding:5px 10px; border:1px solid var(--border); border-radius:6px; color:#58708e; background:#fff; font-size:11px; min-height:40px; }
    .shop-analysis .pager button:hover:not(:disabled) { background:var(--light); color:var(--blue); }
    .shop-analysis .product-filters { display:grid; grid-template-columns:minmax(150px,2fr) repeat(4,minmax(80px,1fr)) auto auto; gap:8px; padding:16px 22px; border-bottom:1px solid var(--border); background:#fafbfd; }
    .shop-analysis .product-filters input,.shop-analysis .product-filters select { width:100%; min-width:0; padding:10px; border:1px solid var(--border); border-radius:8px; background:#fff; color:var(--ink); font-size:12px; min-height:42px; }
    .shop-analysis .product-filters button { border:1px solid var(--primary-border); border-radius:8px; padding:10px 14px; color:var(--blue); background:var(--light); font-size:11px; font-weight:600; }
    .shop-analysis .product-filters button:hover { background:var(--primary-hover); }
    .shop-analysis .saved-shops { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 20px; padding:0 0 20px; }
    .shop-analysis .saved-shops-label { color:var(--muted); font-size:11px; font-weight:600; }
    .shop-analysis .saved-shop { display:inline-flex; align-items:center; gap:6px; padding:10px 13px; border:1px solid var(--border); border-radius:10px; background:white; color:var(--muted); font-size:11px; cursor:pointer; }
    .shop-analysis .saved-shop.active { border-color:var(--primary-border); color:var(--blue); background:var(--light); }
    .shop-analysis .saved-shop small { color:var(--muted); font-size:10px; }
    .shop-analysis .compare-link { text-decoration:none; font-weight:650; color:var(--blue); border-color:var(--primary-border); }

    /* Theo dõi shop */
    .shop-analysis .watch-btn { display:inline-flex; align-items:center; gap:6px; margin-left:auto; padding:9px 14px; border:1px solid var(--primary-border); border-radius:9px; background:#fff; color:var(--blue); font-size:11px; font-weight:650; cursor:pointer; }
    .shop-analysis .watch-btn:hover { background:var(--light); }
    .shop-analysis .watch-btn.watching { background:var(--blue); border-color:var(--blue); color:#fff; }
    .shop-analysis .watch-btn .icon { width:15px; height:15px; }

    /* Thay đổi gần đây */
    /* Xếp cột kiểu masonry thay vì grid: số dòng mỗi nhóm chênh nhau rất nhiều
       (nhóm 1 mã cạnh nhóm 15 mã). Với grid, mọi ô cùng hàng bị kéo cao bằng ô
       cao nhất nên nhóm ngắn để lại mảng trắng vài trăm px. */
    .shop-analysis .change-groups { columns:280px 4; column-gap:16px; }
    .shop-analysis .change-group { break-inside:avoid; margin-bottom:16px; }
    .shop-analysis .change-group h3 { margin:0; font-size:13px; font-weight:650; }
    .shop-analysis .change-note { margin:2px 0 8px; font-size:11px; color:var(--muted); }
    .shop-analysis .change-list { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
    .shop-analysis .change-row { display:grid; grid-template-columns:32px 1fr auto; align-items:center; gap:9px; padding:7px 9px; border:1px solid var(--border); border-radius:9px; background:#fff; }
    .shop-analysis .change-thumb { width:32px; height:32px; display:grid; place-items:center; overflow:hidden; border-radius:7px; background:var(--light); color:#8493ac; }
    .shop-analysis .change-thumb img { width:100%; height:100%; object-fit:cover; }
    .shop-analysis .change-name { font-size:11px; line-height:1.4; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
    .shop-analysis .change-name a { color:inherit; text-decoration:none; }
    .shop-analysis .change-name a:hover { color:var(--blue); text-decoration:underline; }
    .shop-analysis .change-value { text-align:right; font-size:11px; white-space:nowrap; }
    .shop-analysis .change-value small { display:block; color:var(--muted); font-size:10px; font-weight:500; }
    .shop-analysis .change-up { color:#b4232b; }
    .shop-analysis .change-down { color:#1c7c4a; }
    /* Chú thích chung cho cả khối — phải trải hết bề ngang, nếu không nó bị hút
       vào cột đầu và chen vào tiêu đề nhóm. */

    /* So sánh shop */
    .shop-compare .compare-picker { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
    .shop-compare .compare-chip { display:inline-flex; align-items:center; gap:7px; padding:7px 11px; border:1px solid var(--primary-border); border-radius:9px; background:var(--light); color:var(--blue); font-size:11px; font-weight:650; }
    .shop-compare .compare-chip button { border:0; background:none; color:inherit; font-size:14px; line-height:1; cursor:pointer; }
    .shop-compare #compareTable { width:100%; border-collapse:collapse; }
    .shop-compare #compareTable th, .shop-compare #compareTable td { padding:10px 12px; border-bottom:1px solid var(--border); font-size:12px; text-align:left; }
    .shop-compare #compareTable thead th { font-weight:650; vertical-align:bottom; }
    .shop-compare #compareTable thead th small { display:block; color:var(--muted); font-size:10px; font-weight:500; }
    .shop-compare #compareTable tbody th { color:var(--muted); font-weight:500; }
    .shop-compare #compareTable td.num { text-align:right; font-variant-numeric:tabular-nums; }
    .shop-compare #compareTable .compare-best { font-weight:700; color:var(--blue); background:var(--light); }
    .shop-analysis .saved-shop-default { align-items:flex-start; flex-direction:column; gap:3px; min-width:150px; padding:12px 14px; border-color:#a9c6e8; background:#edf5ff; color:#245d99; text-align:left; font-weight:650; box-shadow:0 2px 7px rgba(52,108,176,.12); transition:background .18s,border-color .18s,color .18s,box-shadow .18s,transform .18s; }
    .shop-analysis .saved-shop-default:hover { border-color:var(--blue); background:#dcecff; color:#174f89; box-shadow:0 5px 14px rgba(52,108,176,.2); transform:translateY(-1px); }
    .shop-analysis .saved-shop-default small { color:#607b9c; font-size:10px; font-weight:500; }
    .shop-analysis .prototype-note { color:var(--muted); font-size:10px; margin:0 22px 16px; }
    .shop-analysis .saved-shop-remove { border:0; padding:0; background:transparent; color:#8d9bb0; cursor:pointer; }
    .shop-analysis .grid2 { display:grid; grid-template-columns:1fr 1fr; gap:22px; }
    .shop-analysis .bar { background:#edf2fa; border-radius:5px; height:7px; overflow:hidden; }
    .shop-analysis .bar>span { display:block; height:100%; background:var(--blue); border-radius:5px; transform-origin:left; }
    .shop-analysis .breakdown-item { margin-bottom:19px; }
    .shop-analysis .breakdown-item:last-child { margin-bottom:0; }
    .shop-analysis .breakdown-label { display:flex; justify-content:space-between; gap:12px; margin-bottom:8px; font-size:11px; }
    .shop-analysis .breakdown-label span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .shop-analysis .breakdown-label span:last-child { color:var(--muted); flex-shrink:0; }
    .shop-analysis #priceSegments .bar>span { background:#76a4f8; }
    .shop-analysis .muted { color:var(--muted); font-size:12px; }
    .shop-analysis select { max-width:100%; border:1px solid var(--border); border-radius:7px; padding:8px 11px; color:#50617a; background:#fff; font-size:11px; }
    .shop-analysis #affCards { padding:20px 22px 0; margin-bottom:20px; }
    .shop-analysis #affCards .card { background:#f8faff; padding:12px; }
    .shop-analysis #affCards .value { font-size:21px; }
    .shop-analysis .affiliate-signal { display:inline-flex; max-width:100%; margin:7px 0 1px; padding:3px 6px; border-radius:4px; font-size:10px; line-height:1.35; font-weight:600; }
    .shop-analysis .affiliate-signal.is-ready { color:#167141; background:#edf9f1; }
    .shop-analysis .affiliate-signal.is-review { color:#916312; background:#fff8e8; }
    .shop-analysis .footnote { margin:0; padding:13px 22px; color:var(--muted); background:#fbfcfe; font-size:11px; border-top:1px solid var(--border); }
    .shop-analysis .stock-summary { display:flex; align-items:center; gap:12px; padding:16px 23px; background:#f8faff; color:#657993; font-size:12px; }
    .shop-analysis .stock-summary b { color:var(--ink); font-size:19px; }
    .shop-analysis .no-data { padding:22px; text-align:center; color:var(--muted); font-size:12px; }
    .shop-analysis .footer { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:3px 0 12px; color:var(--muted); font-size:11px; }
    .shop-analysis .footer-brand { font-weight:650; letter-spacing:.2px; }
    .shop-analysis .modal-bg { position:fixed; inset:0; background:#10182866; backdrop-filter:none; display:flex; align-items:center; justify-content:center; padding:24px; z-index:100; visibility:hidden; opacity:0; pointer-events:none; transition:opacity 220ms var(--ease-standard),visibility 220ms; }
    .shop-analysis .modal-bg.open { display:flex; visibility:visible; opacity:1; pointer-events:auto; }
    .shop-analysis .modal { background:#fff; border:1px solid var(--border); border-radius:14px; padding:25px; max-width:720px; width:100%; max-height:calc(100dvh - 48px); overflow:auto; box-shadow:0 24px 80px #10182826; transform:translateY(8px) scale(.985); transition:transform 260ms var(--ease-enter); }
    .shop-analysis .modal h3 { margin:0 35px 20px 0; font-size:15px; }
    .shop-analysis .modal .close { float:right; display:grid; place-items:center; border:0; background:#f1f5fa; border-radius:8px; width:44px; height:44px; font-size:20px; color:#66768e; }
    .shop-analysis .product-detail { display:grid; grid-template-columns:130px 1fr; gap:20px; }
    .shop-analysis .product-detail-image { width:130px; aspect-ratio:1; object-fit:cover; border:1px solid var(--border); border-radius:10px; background:#f0f4fa; }
    .shop-analysis .product-detail h4 { margin:0 0 6px; font-size:15px; line-height:1.45; }
    .shop-analysis .product-detail-id { color:var(--muted); font-size:11px; margin-bottom:14px; }
    .shop-analysis .product-detail-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
    .shop-analysis .product-detail-stat { padding:10px; border:1px solid var(--border); border-radius:8px; background:#fbfcfe; }
    .shop-analysis .product-detail-stat span { display:block; color:var(--muted); font-size:10px; }
    .shop-analysis .product-detail-stat b { display:block; margin-top:3px; color:var(--ink); font-size:13px; }
    .shop-analysis .chart-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:10px 0 22px; color:var(--muted); font-size:11px; }
    .shop-analysis .chart-stats b { display:block; margin-top:4px; color:var(--ink); font-size:16px; }
    .shop-analysis .chart-tip { position:absolute; background:var(--ink); color:#fff; font-size:11px; padding:6px 9px; border-radius:7px; pointer-events:none; white-space:nowrap; transform:translateY(-100%); z-index:5; box-shadow:0 2px 8px #172b4d20; }
    .shop-analysis .menu-button { display:none; border:0; background:var(--light); border-radius:7px; padding:7px; color:var(--blue); width:44px; height:44px; }
    .shop-analysis .nav-backdrop { display:block; position:fixed; inset:0; border:0; z-index:25; background:#10182866; opacity:0; visibility:hidden; pointer-events:none; transition:opacity 220ms,visibility 220ms; }
    .shop-analysis .skip-link { position:fixed; top:-60px; left:250px; padding:10px; background:#fff; z-index:120; color:var(--blue); }
    .shop-analysis .skip-link:focus { top:10px; }
    .shop-analysis .analysis-progress { padding:22px; margin-bottom:20px; border:1px solid var(--primary-border); border-radius:12px; background:#fff; animation:soft-enter 240ms var(--ease-enter);max-height:250px; overflow:hidden; transition:max-height 260ms var(--ease-standard),padding 260ms var(--ease-standard); }
    .shop-analysis .analysis-progress[hidden] { display:none; }
    .shop-analysis .progress-heading { display:flex; justify-content:space-between; gap:16px; align-items:center; }
    .shop-analysis .progress-heading strong { font-size:14px; }
    .shop-analysis .progress-heading small { color:var(--muted); white-space:nowrap; }
    .shop-analysis .progress-track { height:6px; margin:14px 0; background:#dbeafe; border-radius:9px; overflow:hidden; }
    .shop-analysis .progress-track span { display:block; width:35%; height:100%; background:var(--blue); border-radius:9px; animation:analysis-loading 1.6s ease-in-out infinite alternate; }
    .shop-analysis .analysis-progress[data-state="done"] .progress-track span { width:100%; animation:none; }
    .shop-analysis .analysis-progress[data-state="error"] .progress-track span { width:100%; background:#dc2626; animation:none; }
    .shop-analysis .progress-steps { display:flex; flex-wrap:wrap; gap:10px 22px; padding:0; margin:0; list-style:none; color:var(--muted); font-size:12px; }
    .shop-analysis .progress-steps .active { color:var(--blue); font-weight:700; }
    .shop-analysis .progress-steps .complete { color:#15803d; }
    .shop-analysis .progress-detail { margin:10px 0 0; color:var(--muted); font-size:12px; }
    .shop-analysis .report-actions { display:flex; flex-wrap:wrap; gap:10px; }
    .shop-analysis #btnAdvancedAi { cursor:not-allowed; opacity:.6; white-space:normal; }
    .shop-analysis .coming-soon { font-size:10px; padding:3px 6px; border-radius:6px; background:#eaf1fc; }
    .shop-analysis .report-content { padding:20px 22px; }
    .shop-analysis .report-status { margin:0 0 18px; font-size:12px; color:var(--muted); }
    .shop-analysis .report-charts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:24px; }
    .shop-analysis .report-charts:empty { display:none; }
    .shop-analysis .report-chart { min-width:0; margin:0; padding:12px; border:1px solid var(--border); border-radius:12px; background:#fff; }
    .shop-analysis .report-chart h3 { margin:0 0 7px; font-size:14px; }
    .shop-analysis .report-chart figcaption>p { font-size:11px; line-height:1.6; color:var(--muted); margin:0 0 18px; }
    .shop-analysis .report-chart-row { margin:14px 0; }
    .shop-analysis .report-chart-label { display:flex; align-items:baseline; gap:8px; margin-bottom:7px; font-size:11px; }
    .shop-analysis .report-chart-label details { flex:1; min-width:0; }
    .shop-analysis .report-chart-label summary { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
    .shop-analysis .report-chart-label details[open] summary { white-space:normal; overflow-wrap:anywhere; }
    .shop-analysis .report-chart-label details p { margin:4px 0; color:var(--muted); }
    .shop-analysis .report-chart-label b { flex-shrink:0; color:var(--blue); }
    .shop-analysis .report-chart .bar { height:9px; }
    .shop-analysis .report-donut { width:154px; aspect-ratio:1; border-radius:50%; margin:20px auto; display:grid; place-items:center; }
    .shop-analysis .report-donut-center { width:116px; aspect-ratio:1; border-radius:50%; background:#fff; display:flex; flex-direction:column; justify-content:center; align-items:center; }
    .shop-analysis .report-donut-center b { font-size:27px; color:var(--blue); }
    .shop-analysis .report-donut-center span { font-size:10px; color:var(--muted); }
    .shop-analysis .report-legend { padding:0; margin:0; list-style:none; font-size:11px; }
    .shop-analysis .report-legend li { display:flex; justify-content:space-between; gap:8px; margin:10px 0; }
    .shop-analysis .report-legend i { display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--blue); margin-right:6px; }
    .shop-analysis .report-legend li+li i { background:#cbdcf6; }
    .shop-analysis .report-text { font-size:14px; line-height:1.85; color:var(--ink); overflow-wrap:anywhere; max-width:100%; }
    .shop-analysis .report-text h1,.shop-analysis .report-text h2,.shop-analysis .report-text h3 { margin:18px 0 8px; line-height:1.35; }
    .shop-analysis .report-text h1 { font-size:20px; }
    .shop-analysis .report-text h2 { font-size:17px; }
    .shop-analysis .report-text h3 { font-size:15px; margin-top:28px; padding-top:18px; border-top:1px solid var(--border); color:var(--blue-dark); }
    .shop-analysis .report-text p { margin:8px 0; }
    .shop-analysis .report-text ul,.shop-analysis .report-text ol { margin:8px 0; padding-left:22px; }
    .shop-analysis .report-text li { margin:4px 0; margin-bottom:9px; }
    .shop-analysis .report-text table { display:block; overflow-x:auto; width:100%; border-collapse:collapse; margin:12px 0; font-size:13px; }
    .shop-analysis .report-text th,.shop-analysis .report-text td { border:1px solid var(--border); padding:8px 10px; text-align:left; }
    .shop-analysis .report-text th { background:var(--light); }
    .shop-analysis .report-text strong { color:var(--ink); }
    .shop-analysis .report-text code { background:#f3f5f9; padding:1px 5px; border-radius:4px; font-size:12px; }
    .shop-analysis .column-chart { display:flex; gap:12px; align-items:flex-end; padding-top:18px; overflow-x:auto; }
    .shop-analysis .column-item { flex:1; min-width:48px; text-align:center; font-size:10px; color:var(--muted); }
    .shop-analysis .column-item>b { color:var(--blue); font-size:12px; }
    .shop-analysis .column-track { height:150px; display:flex; align-items:flex-end; justify-content:center; margin:8px 0; }
    .shop-analysis .column-track span { width:70%; max-width:44px; background:var(--blue); border-radius:6px 6px 0 0; transform-origin:bottom; }
    .shop-analysis .column-item>span { display:block; min-height:36px; }
    .shop-analysis h1 span { color:var(--blue); }
    .shop-analysis .unified-search { max-width:none; }
    .shop-analysis .unified-search label { font-size:12px; }
    .shop-analysis .unified-search .input-group { padding:5px; border-radius:9px; box-shadow:none; }
    .shop-analysis .unified-search input { padding:10px 9px; font-size:15px; }
    .shop-analysis .unified-search .primary { padding:12px 18px; border-radius:6px; box-shadow:none; min-width:180px; min-height:46px; }
    .shop-analysis #cards { grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; border:1px solid var(--border); border-bottom:0; border-radius:12px 12px 0 0; background:white; overflow:hidden; }
    .shop-analysis #cards .card:nth-child(2) { background:#fff; border-color:var(--border); color:var(--ink); }
    .shop-analysis #cards .card:nth-child(2) .label,.shop-analysis #cards .card:nth-child(2) .metric-note { color:var(--muted); }
    .shop-analysis #cards .card:nth-child(2) .metric-icon { background:var(--light); color:var(--blue); }
    .shop-analysis .overview-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin:28px 0 16px; }
    .shop-analysis .overview-heading h2 { font-size:20px; letter-spacing:-.5px; margin:5px 0 0; font-weight:600; }
    .shop-analysis .overview-charts { padding:0; margin-bottom:28px; gap:18px; }
    .shop-analysis .report-chart figcaption p { min-height:36px; font-size:11px; }
    .shop-analysis .bar span { background:var(--blue); border-radius:5px; }
    .shop-analysis .product-filters .clear-filters { background:#fff; color:var(--muted); border:1px solid var(--border); }
    .shop-analysis #products .table-scroll { max-height:650px; overflow:auto; }
    .shop-analysis .inventory-details summary { cursor:pointer; padding:18px 24px; color:var(--blue); border-top:1px solid var(--border); font-weight:600; }
    .shop-analysis.has-results h1 { font-size:25px; letter-spacing:-.8px; }
    .shop-analysis.has-results h1 br { display:none; }
    .shop-analysis.has-results .page-heading { padding-top:0; }
    .shop-analysis.has-results .page-heading h1 span::before { content:' '; }
    .shop-analysis .key-group { padding:20px 24px; }
    .shop-analysis .key-group + .key-group { border-top:1px solid var(--border); }
    .shop-analysis .key-group-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
    .shop-analysis .key-group-head h3 { margin:0; font-size:13px; font-weight:650; }
    .shop-analysis .key-hint { font-size:11px; color:var(--muted); text-align:right; }
    .shop-analysis .link-button { border:1px solid var(--primary-border); background:var(--light); color:var(--blue); border-radius:8px; padding:8px 13px; font-size:11px; font-weight:600; }
    .shop-analysis .link-button:hover { background:var(--primary-hover); }
    /* 5 cột cố định → top 10 chia đều 5+5. Responsive 5/4/3/2. */
    .shop-analysis .key-cards { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
    @media(max-width:1200px) { .shop-analysis .key-cards { grid-template-columns:repeat(4,minmax(0,1fr)); } }
    @media(max-width:900px) { .shop-analysis .key-cards { grid-template-columns:repeat(3,minmax(0,1fr)); } }
    .shop-analysis .key-card { display:flex; flex-direction:column; gap:12px; border:1px solid var(--border); border-radius:10px; padding:18px; background:#fff; transition:border-color 180ms,box-shadow 180ms; }
    .shop-analysis .key-card-top { display:flex; align-items:center; gap:10px; }
    .shop-analysis .key-card-head { display:flex; align-items:center; gap:10px; }
    .shop-analysis .key-card-head .product-cell { min-width:0; }
    .shop-analysis .key-rank { display:inline-grid; place-items:center; min-width:34px; height:26px; padding:0 8px; border-radius:5px; background:var(--light); color:var(--blue); font-size:12px; font-weight:600; }
    .shop-analysis .key-rank-muted { background:#eef2f8; color:var(--muted); font-size:10px; font-weight:600; }
    .shop-analysis .key-thumb { width:44px; height:44px; margin-left:auto; border-radius:9px; overflow:hidden; background:#f0f4fa; display:grid; place-items:center; color:#94a7c1; border:1px solid var(--border); }
    .shop-analysis .key-thumb img { width:100%; height:100%; object-fit:cover; }
    .shop-analysis .key-card-name { font-size:13px; }
    .shop-analysis .key-card-name-static { font-size:13px; font-weight:600; color:var(--ink); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.5; }
    .shop-analysis .key-card-stats { display:grid; grid-template-columns:1fr 1fr; gap:10px 14px; margin:0; }
    .shop-analysis .key-card-stats > div { min-width:0; }
    .shop-analysis .key-card-stats dt { color:var(--muted); font-size:11px; }
    .shop-analysis .key-card-stats dd { margin:2px 0 0; font-size:13px; font-weight:600; color:var(--ink); overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
    .shop-analysis .key-card-stats dd.revenue { color:var(--blue); }
    .shop-analysis .key-card-actions { display:flex; gap:8px; margin-top:auto; }
    .shop-analysis .key-card-actions a, .shop-analysis .key-card-actions button, .shop-analysis .product-detail-actions a, .shop-analysis .product-detail-actions button { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border:1px solid var(--border); border-radius:7px; background:#fff; color:#74859c; }
    .shop-analysis .key-card-actions .icon, .shop-analysis .product-detail-actions .icon { width:17px; height:17px; }
    .shop-analysis .key-card-actions a:hover, .shop-analysis .key-card-actions button:hover, .shop-analysis .product-detail-actions a:hover, .shop-analysis .product-detail-actions button:hover { color:var(--blue); background:var(--light); border-color:var(--primary-border); }
    .shop-analysis .product-detail-actions { display:flex; gap:8px; margin:16px 0 0; }
    .shop-analysis .key-card-missing { background:#fbfcfe; }
    .shop-analysis .key-card-note { margin:0; font-size:11px; color:#94651b; background:#fffbeb; border:1px solid #f7ebca; border-radius:8px; padding:6px 9px; }
    .shop-analysis .key-empty { margin:0; color:var(--muted); font-size:12px; }
    .shop-analysis .pin-btn[aria-pressed="true"] { color:var(--blue); background:var(--light); border-color:var(--primary-border); }
    .shop-analysis .pin-btn[aria-pressed="true"] .icon { fill:var(--blue); }
    .shop-analysis #relatedForm label { display:block; font-size:12px; font-weight:600; margin-bottom:8px; color:#50617a; }
    .shop-analysis #relatedForm input { width:100%; padding:12px 13px; border:1px solid var(--border); border-radius:10px; font-size:14px; color:var(--ink); }
    .shop-analysis #relatedForm input:focus { outline:none; border-color:var(--blue); box-shadow:0 0 0 3px var(--focus-ring); }
    .shop-analysis .related-suggestions { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 12px; }
    .shop-analysis .related-suggestions button { border:1px solid var(--border); border-radius:6px; padding:5px 9px; color:var(--muted); background:#fbfcfe; font-size:11px; cursor:pointer; min-height:36px; }
    .shop-analysis .related-suggestions button:hover,.shop-analysis .related-suggestions button.active { color:var(--blue); border-color:var(--primary-border); background:var(--light); }
    .shop-analysis #relatedForm .primary { width:100%; margin-top:6px; border:0; border-radius:9px; padding:13px 18px; font-weight:600; color:#fff; background:var(--blue); }
    .shop-analysis #relatedForm .primary:hover { background:var(--blue-dark); }
    .shop-analysis #relatedForm .footnote { padding:0; background:none; border:0; margin:10px 0 16px; }
    .shop-analysis #relatedForm .primary:disabled { opacity:.6; cursor:progress; }
    .shop-analysis .related-drawer-bg { justify-content:center; padding:24px; }
    .shop-analysis .related-drawer { max-width:760px; width:100%; max-height:calc(100dvh - 48px); border-radius:14px; padding:25px 28px; overflow:auto; transform:translateY(8px) scale(.985); overscroll-behavior:contain; }
    .shop-analysis .related-head { position:sticky; top:-25px; background:var(--card,#fff); margin:-25px -28px 12px; padding:25px 28px 10px; z-index:2; }
    .shop-analysis .related-head h3 { margin:0; }
    .shop-analysis .related-ref { margin:6px 0 0; font-size:12px; color:var(--muted); }
    .shop-analysis .related-ref b { color:var(--ink); }
    .shop-analysis .related-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:14px 0 6px; }
    .shop-analysis .related-summary span { padding:9px 11px; border:1px solid var(--border); border-radius:9px; background:#fbfcfe; font-size:11px; color:var(--muted); display:flex; flex-direction:column; gap:3px; }
    .shop-analysis .related-summary b { color:var(--ink); font-size:13px; }
    .shop-analysis .related-summary-note { font-size:10px; color:var(--muted); margin:0 0 12px; }
    .shop-analysis .related-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:8px 0 12px; font-size:11px; }
    .shop-analysis .related-toolbar label { font-weight:600; color:#50617a; }
    .shop-analysis .related-toolbar select { padding:7px 9px; border:1px solid var(--border); border-radius:8px; font-size:11px; color:var(--ink); }
    .shop-analysis .related-sort-note { font-size:10px; }
    .shop-analysis .related-filters { display:flex; flex-direction:column; gap:12px; margin:14px 0; padding:14px 16px; border:1px solid var(--border); border-radius:12px; background:#fbfcfe; }
    .shop-analysis .related-filters-head { display:flex; align-items:center; justify-content:space-between; }
    .shop-analysis .related-filters-title { font-size:11px; font-weight:700; letter-spacing:.04em; color:#7a889c; text-transform:uppercase; }
    .shop-analysis .related-check { display:flex !important; align-items:center; gap:8px; margin:0 !important; font-size:13px !important; font-weight:500; color:var(--ink); cursor:pointer; }
    .shop-analysis .related-price { display:flex; align-items:center; gap:10px; }
    .shop-analysis .related-price input[type="number"] { flex:1; width:auto; min-width:0; padding:10px 12px; border:1px solid var(--border); border-radius:9px; font-size:13px; }
    .shop-analysis .related-price-sep { flex:0 0 auto; color:var(--muted); }
    .shop-analysis .related-clear { border:1px solid var(--border); background:#fff; border-radius:8px; padding:6px 12px; font-size:11px; font-weight:600; color:var(--muted); cursor:pointer; }
    .shop-analysis .related-clear:hover { color:var(--blue); border-color:var(--primary-border); }
    .shop-analysis .related-note { padding:0; background:none; border:0; margin:14px 0; }
    .shop-analysis .related-error { color:#b42318; background:#fef3f2; border:1px solid #fecdc9; border-radius:9px; padding:9px 11px; font-size:12px; margin:10px 0; }
    .shop-analysis .related-results { display:flex; flex-direction:column; gap:8px; max-width:680px; margin:0 auto; }
    .shop-analysis .related-item { display:grid; grid-template-columns:52px minmax(0,1fr) minmax(132px,auto); gap:12px; align-items:center; padding:12px; border:1px solid #dde7f3; border-radius:10px; background:#fff; }
    .shop-analysis .related-item img,.shop-analysis .related-item .related-thumb { width:52px; height:58px; border-radius:8px; object-fit:cover; background:#f0f4fa; border:1px solid var(--border); display:grid; place-items:center; color:#94a7c1; }
    .shop-analysis .related-main { min-width:0; }
    .shop-analysis .related-item h4 { margin:0 0 6px; font-size:12px; line-height:1.45; color:#233d5a; }
    .shop-analysis .related-meta { display:flex; gap:5px; flex-wrap:wrap; font-size:10px; align-items:center; }
    .shop-analysis .related-chip { display:inline-flex; align-items:center; min-height:20px; padding:2px 7px; border:1px solid transparent; border-radius:999px; font-weight:600; line-height:1.2; }
    .shop-analysis .related-chip.shop { color:#285f9c; background:#edf5ff; border-color:#cfe2f7; }
    .shop-analysis .related-chip.sales { color:#344054; background:#f2f4f7; border-color:#e0e6ed; }
    .shop-analysis .related-chip.rating { color:#946200; background:#fff7df; border-color:#f6df9d; }
    .shop-analysis .related-chip.keyword { color:#255fa3; background:#eff6ff; border-color:#c8dcf6; }
    .shop-analysis .related-chip.category { color:#6750a4; background:#f4f0ff; border-color:#ddd3fa; }
    .shop-analysis .related-chip.category.none,.shop-analysis .related-chip.category.unknown { color:#667085; background:#f7f8fa; border-color:#e4e7ec; }
    .shop-analysis .related-badge { color:#8a5a00; background:#fff3d6; border:1px solid #ffe1a3; border-radius:999px; padding:1px 7px; font-size:9px; }
    .shop-analysis .related-price { text-align:center; font-size:11px; color:var(--ink); white-space:nowrap; padding:8px; border-radius:8px; background:#f4f8fd; }
    .shop-analysis .related-price b { display:block; color:var(--blue); font-size:13px; }
    .shop-analysis .related-price.lower { background:#edf9f0; }
    .shop-analysis .related-price.lower b,.shop-analysis .related-delta.lower { color:#18753a; }
    .shop-analysis .related-price.higher { background:#fff4f2; }
    .shop-analysis .related-price.higher b,.shop-analysis .related-delta.higher { color:#bf3c2e; }
    .shop-analysis .related-price.same { background:#f4f8fd; }
    .shop-analysis .related-price small { display:block; margin-top:4px; font-size:10px; line-height:1.35; color:var(--muted); white-space:normal; }
    .shop-analysis .related-open { display:inline-flex; margin-top:5px; color:var(--blue); font-size:12px; min-height:44px; align-items:center; }
    .shop-analysis .related-more { display:block; margin:16px auto 0; min-height:40px; }
    .shop-analysis .related-more:disabled { opacity:.6; cursor:progress; }
    .shop-analysis .filter-toggle { display:none; }
    .shop-analysis #filterCount { font-weight:700; }
    .shop-analysis .seg { display:inline-flex; border:1px solid var(--border); border-radius:9px; overflow:hidden; background:#fff; }
    .shop-analysis .seg button { border:0; background:#fff; color:var(--muted); padding:8px 12px; font-size:11px; font-weight:600; min-height:40px; }
    .shop-analysis .seg button.active { background:var(--blue); color:#fff; }
    .shop-analysis .seg button:not(.active):hover { background:var(--light); color:var(--blue); }
    .shop-analysis .history-controls { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
    .shop-analysis .history-body { padding:16px 22px; }
    .shop-analysis .history-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
    .shop-analysis .history-updated { font-size:11px; color:var(--muted); }
    .shop-analysis .history-chart { position:relative; }
    .shop-analysis .history-legend { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
    .shop-analysis .history-legend-item { display:inline-flex; align-items:center; gap:7px; border:1px solid var(--border); border-radius:20px; background:#fff; padding:6px 12px; font-size:11px; color:var(--ink); }
    .shop-analysis .history-legend-item.off { color:var(--muted); text-decoration:line-through; }
    .shop-analysis .history-legend-item[data-empty="1"] { opacity:.6; }
    .shop-analysis .legend-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
    .shop-analysis .history-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:8px; }
    .shop-analysis .history-card { border:1px solid var(--border); border-radius:12px; padding:12px; background:#fbfcfe; }
    .shop-analysis .history-card-head { display:flex; align-items:center; gap:8px; justify-content:space-between; }
    .shop-analysis .history-card-head b { font-size:13px; }
    .shop-analysis .history-card-link { min-width:0; text-decoration:none; color:inherit; }
    .shop-analysis .history-card-link:hover b { color:var(--blue); text-decoration:underline; }
    .shop-analysis .history-badge { font-size:10px; background:#fffbeb; color:#94651b; border:1px solid #f7ebca; border-radius:6px; padding:2px 6px; white-space:nowrap; }
    .shop-analysis .history-card-range { font-size:11px; color:var(--muted); margin:6px 0 10px; }
    .shop-analysis .history-card-stats { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; font-size:11px; color:var(--muted); }
    .shop-analysis .history-card-stats b { display:block; color:var(--ink); font-size:12px; }
    .shop-analysis .hist-up { color:#c62828 !important; }
    .shop-analysis .hist-down { color:#2e7d32 !important; }
    .shop-analysis .history-card-err { font-size:11px; color:#b4233b; margin:8px 0; }
    .shop-analysis .history-card .link-button { margin-top:10px; }
    .shop-analysis .picker-list { max-height:320px; overflow:auto; margin:12px 0; display:flex; flex-direction:column; gap:4px; }
    .shop-analysis .picker-item { display:flex; align-items:flex-start; gap:10px; padding:10px; border:1px solid var(--border); border-radius:9px; cursor:pointer; }
    .shop-analysis .picker-item.disabled { opacity:.5; cursor:not-allowed; }
    .shop-analysis .picker-item input { margin-top:2px; }
    .shop-analysis .picker-item span { display:flex; flex-direction:column; font-size:12px; }
    .shop-analysis .picker-item small { color:var(--muted); font-size:10px; }
    .shop-analysis .picker-item em { color:var(--blue); font-style:normal; }
    .shop-analysis #historyPickerSearch { width:100%; padding:11px 12px; border:1px solid var(--border); border-radius:10px; font-size:13px; }
    .shop-analysis .picker-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:6px; }
    .shop-analysis .picker-actions .primary { border:0; border-radius:9px; padding:11px 18px; color:#fff; background:var(--blue); font-weight:600; }
    .shop-analysis .profit-header-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
    .shop-analysis .profit-empty { padding:30px 24px; text-align:center; color:var(--muted); }
    .shop-analysis .profit-empty b { color:var(--ink); font-size:14px; }
    .shop-analysis .profit-empty p { margin:5px 0 0; }
    .shop-analysis .profit-workspace { padding:0 24px 24px; }
    .shop-analysis .profit-product-tabs { display:flex; gap:8px; overflow-x:auto; padding:18px 0; scrollbar-width:thin; }
    .shop-analysis .profit-product-tabs button { min-width:190px; max-width:280px; text-align:left; border:1px solid var(--border); border-radius:11px; background:#fff; padding:11px 13px; color:var(--ink); }
    .shop-analysis .profit-product-tabs button.active { border-color:#8eb1f8; background:var(--light); box-shadow:inset 3px 0 var(--blue); }
    .shop-analysis .profit-product-tabs span { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:12px; font-weight:650; }
    .shop-analysis .profit-product-tabs small { display:block; margin-top:3px; color:var(--muted); font-size:10px; }
    .shop-analysis .profit-layout { display:grid; grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr); gap:18px; align-items:start; }
    .shop-analysis .profit-form,.shop-analysis .profit-output { min-width:0; border:1px solid var(--border); border-radius:14px; background:#fbfcff; padding:18px; }
    .shop-analysis .profit-form-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:15px; }
    .shop-analysis .profit-form-heading>div { min-width:0; }
    .shop-analysis .profit-form-heading h3 { margin:3px 0 0; font-size:14px; max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .shop-analysis .profit-save-status { color:var(--muted); font-size:10px; text-align:right; }
    .shop-analysis .profit-source-price { display:flex; justify-content:space-between; gap:10px; border:1px solid #d9e6ff; border-radius:10px; background:var(--light); padding:10px 12px; margin-bottom:12px; font-size:11px; }
    .shop-analysis .profit-source-price b { color:var(--blue); font-size:13px; }
    .shop-analysis .help { position:relative; display:inline-grid; place-items:center; width:15px; height:15px; padding:0; border-radius:50%; border:1px solid #cdd8ea; background:#fff; color:#6b7a90; font-size:10px; font-weight:700; line-height:1; vertical-align:middle; margin-left:2px; }
    .shop-analysis .help:hover,.shop-analysis .help:focus-visible { color:var(--blue); border-color:#9dbcff; }
    .shop-analysis .help-bubble { position:absolute; bottom:calc(100% + 8px); left:50%; transform:translateX(-50%); width:230px; max-width:72vw; background:#1f2b3d; color:#fff; font-size:11px; font-weight:400; line-height:1.5; text-align:left; padding:8px 10px; border-radius:8px; box-shadow:0 8px 24px #0b183022; opacity:0; visibility:hidden; transition:opacity .14s; z-index:80; pointer-events:none; }
    .shop-analysis .help-bubble::after { content:""; position:absolute; top:100%; left:50%; transform:translateX(-50%); border:5px solid transparent; border-top-color:#1f2b3d; }
    .shop-analysis .help:hover .help-bubble,.shop-analysis .help:focus-visible .help-bubble,.shop-analysis .help.open .help-bubble { opacity:1; visibility:visible; }
    .shop-analysis .profit-check,.shop-analysis .profit-radio { display:flex; align-items:center; gap:8px; font-size:12px; font-weight:500; color:#50617a; margin:7px 0; }
    .shop-analysis .profit-check input,.shop-analysis .profit-radio input { flex-shrink:0; }
    .shop-analysis .profit-checks { margin:10px 0; }
    .shop-analysis .profit-promo { border:1px solid var(--border); border-radius:10px; padding:11px 13px; margin:13px 0; }
    .shop-analysis .profit-promo legend { font-size:11px; font-weight:600; color:#50617a; padding:0 5px; }
    .shop-analysis .profit-seller-type { display:flex; align-items:center; gap:12px; flex-wrap:wrap; border:1px solid var(--primary-border); border-radius:10px; padding:10px 13px; margin:0 0 12px; background:var(--light); }
    .shop-analysis .profit-seller-type legend { width:100%; margin:0 0 2px; padding:0 5px; color:var(--blue-dark); font-size:11px; font-weight:650; }
    .shop-analysis .profit-seller-type .profit-radio { margin:0; }
    .shop-analysis .profit-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
    .shop-analysis .profit-field { min-width:0; color:#50617a; font-size:11px; font-weight:600; }
    .shop-analysis .profit-field>span { display:block; margin-bottom:5px; }
    .shop-analysis .profit-field small { color:var(--muted); font-weight:400; }
    .shop-analysis .profit-field input,.shop-analysis .profit-field select,.shop-analysis .scenario-inputs input,.shop-analysis .scenario-inputs select,.shop-analysis .scenario-custom input { width:100%; min-height:42px; border:1px solid var(--border); border-radius:9px; background:#fff; padding:9px 10px; color:var(--ink); }
    .shop-analysis .profit-field input:focus,.shop-analysis .profit-field select:focus,.shop-analysis .scenario-inputs input:focus,.shop-analysis .scenario-inputs select:focus,.shop-analysis .scenario-custom input:focus { outline:0; border-color:var(--blue); box-shadow:0 0 0 3px var(--focus-ring); }
    .shop-analysis .profit-field-wide { display:block; margin:0 0 11px; }
    .shop-analysis .profit-hint { margin:-4px 0 12px; font-size:11px; line-height:1.5; color:var(--muted); }
    .shop-analysis .profit-hint a { color:var(--blue); font-weight:600; text-decoration:none; }
    .shop-analysis .profit-hint a:hover { text-decoration:underline; }
    .shop-analysis .profit-fee-notice { margin:-2px 0 13px; padding:10px 12px; border:1px solid var(--primary-border); border-radius:8px; background:#f7faff; color:#50617a; font-size:11px; line-height:1.55; }
    .shop-analysis .profit-fee-notice b { color:var(--ink); }
    .shop-analysis .profit-fee-notice a { color:var(--blue); font-weight:650; text-decoration:none; }
    .shop-analysis .profit-fee-notice a:hover { text-decoration:underline; }
    .shop-analysis .profit-form.masked .profit-sensitive-input { -webkit-text-security:disc; }
    .shop-analysis .profit-confirm { display:flex; align-items:flex-start; gap:9px; margin:13px 0; color:#50617a; font-size:11px; }
    .shop-analysis .profit-confirm input { margin-top:3px; }
    .shop-analysis .profit-defaults { border-top:1px solid var(--border); padding-top:13px; margin-top:13px; }
    .shop-analysis .profit-defaults summary { cursor:pointer; color:var(--blue); font-size:12px; font-weight:650; }
    .shop-analysis .profit-defaults .muted { margin:8px 0 12px; font-size:10px; }
    .shop-analysis .profit-form-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:16px; }
    .shop-analysis .primary-button { border:0; border-radius:9px; background:var(--blue); color:#fff; padding:11px 16px; font-weight:650; }
    .shop-analysis .primary-button:hover { background:var(--blue-dark); }
    .shop-analysis .text-danger { border:0; background:transparent; color:#b4233b; padding:9px 0; font-size:10px; }
    .shop-analysis .profit-kpis { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .shop-analysis .profit-kpis>div { border:1px solid var(--border); border-radius:11px; background:#fff; padding:13px; }
    .shop-analysis .profit-kpis span,.shop-analysis .scenario-result span { display:block; color:var(--muted); font-size:10px; }
    .shop-analysis .profit-kpis b { display:block; margin-top:5px; color:var(--blue-dark); font-size:18px; overflow-wrap:anywhere; }
    .shop-analysis .profit-kpis b.negative,.shop-analysis .scenario-result b.negative { color:#b4233b; }
    .shop-analysis .profit-breakdown { margin-top:12px; border:1px solid var(--border); border-radius:11px; background:#fff; padding:6px 13px; }
    .shop-analysis .profit-breakdown>div { display:flex; justify-content:space-between; gap:12px; padding:8px 0; color:var(--muted); font-size:11px; }
    .shop-analysis .profit-breakdown .total { border-top:1px solid var(--border); color:var(--ink); font-weight:700; }
    .shop-analysis .profit-caveat { margin:9px 0 0; color:var(--muted); font-size:10px; line-height:1.6; }
    .shop-analysis .profit-incomplete { border:1px dashed var(--primary-border); border-radius:12px; background:var(--light); padding:20px; text-align:center; }
    .shop-analysis .profit-incomplete p { margin:5px 0 0; color:var(--muted); font-size:11px; }
    .shop-analysis .scenario-box { border-top:1px solid var(--border); margin-top:18px; padding-top:18px; }
    .shop-analysis #profitScenario h4,.shop-analysis .profit-suggestions h4 { margin:14px 0 10px; font-size:13px; }
    .shop-analysis .scenario-title { flex-wrap:wrap; display:flex; align-items:center; justify-content:space-between; gap:10px; }
    .shop-analysis .scenario-status { border-radius:20px; padding:4px 8px; font-size:9px; font-weight:700; white-space:nowrap; }
    .shop-analysis .scenario-status.good { background:#ecfdf3; color:#18794e; }
    .shop-analysis .scenario-status.warn { background:#fffbeb; color:#94651b; }
    .shop-analysis .scenario-status.danger { background:#fff1f2; color:#b4233b; }
    .shop-analysis .sale-presets { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:10px; }
    .shop-analysis .sale-presets button { border:1px solid var(--border); border-radius:8px; background:#fff; color:var(--blue); padding:7px 10px; font-size:11px; }
    .shop-analysis .sale-presets button.active { background:var(--blue); color:#fff; }
    .shop-analysis .scenario-inputs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .shop-analysis .scenario-inputs label,.shop-analysis .scenario-custom { position:relative; color:var(--muted); font-size:10px; }
    .shop-analysis .scenario-inputs label>span,.shop-analysis .scenario-custom>span { position:absolute; right:10px; bottom:11px; }
    .shop-analysis .scenario-custom { display:block; max-width:180px; }
    .shop-analysis .scenario-custom input { margin-top:4px; padding-right:30px; }
    .shop-analysis .scenario-result { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; }
    .shop-analysis .scenario-result>div { border-radius:9px; background:#fff; padding:10px; border:1px solid var(--border); }
    .shop-analysis .scenario-result b { display:block; margin-top:3px; font-size:12px; overflow-wrap:anywhere; }
    .shop-analysis .profit-suggestions { margin-top:14px; border:1px solid #d9e6ff; border-radius:11px; background:var(--light); padding:12px 14px; }
    .shop-analysis .profit-suggestions h4 { margin:0 0 5px; color:var(--blue-dark); }
    .shop-analysis .profit-suggestions p { margin:0; color:#50617a; font-size:11px; line-height:1.65; }
    .shop-analysis.has-results .page-heading p { display:none; }
    .shop-analysis #cards .card { border:0; border-radius:0; background:transparent; border-right:1px solid var(--border); }
    .shop-analysis #cards .card:last-child { border-right:0; }
    .shop-analysis #cards .card:nth-child(2) .value { color:var(--price); font-size:clamp(26px,2.3vw,38px); }
    .shop-analysis .key-card:focus-within { border-color:var(--primary-border); box-shadow:0 3px 12px #10182806; }
    .shop-analysis .analysis-progress[data-state="done"] { border-color:#b9dacb; background:#f8fcfa; }
    .shop-analysis .analysis-progress[data-state="error"] { border-color:#ecc1c1; }
    .shop-analysis .progress-steps li::before { content:""; display:inline-block; width:7px; height:7px; border-radius:50%; border:1px solid currentColor; margin-right:7px; }
    .shop-analysis .progress-steps .complete::before { background:currentColor; }
    .shop-analysis .modal-bg.open>.modal { transform:none; }
    .shop-analysis.nav-open .nav-backdrop { opacity:1; visibility:visible; pointer-events:auto; }
    .shop-analysis #btn:disabled::before, .shop-analysis #relatedSubmit:disabled::before { content:""; display:inline-block; width:13px; height:13px; border:2px solid #ffffff66; border-top-color:#fff; border-radius:50%; margin-right:8px; vertical-align:-2px; animation:turn 700ms linear infinite; }
    .shop-analysis .product-filters.open { animation:soft-enter 180ms var(--ease-enter); }
    .shop-analysis .related-filters input[type="checkbox"] { width:18px!important; height:18px; flex-shrink:0; accent-color:var(--blue); }
    @keyframes analysis-loading { from { transform:translateX(0); } to { transform:translateX(185%); } }
    @media print { .shop-analysis .sidebar,.shop-analysis .topbar,.shop-analysis .search-panel,.shop-analysis .page-heading,.shop-analysis .saved-shops,.shop-analysis .overview-heading a { display:none!important; } .shop-analysis .shell { margin:0; } .shop-analysis .wrap { padding:0; } .shop-analysis #cards { grid-template-columns:repeat(2,1fr); } .shop-analysis .table-scroll { max-height:none!important; } }


    .shop-analysis .analysis-progress.is-settled { max-height:68px; padding:14px 22px; }
    .shop-analysis .analysis-progress.is-settled .progress-track,.shop-analysis .analysis-progress.is-settled .progress-steps,.shop-analysis .analysis-progress.is-settled .progress-detail { display:none; }
    @media(max-width:1100px) { .shop-analysis .profit-layout { grid-template-columns:minmax(0,1fr); } }
    @media(max-width:1200px) {
        .shop-analysis .product-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
        .shop-analysis #cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
        .shop-analysis #cards .card:nth-child(2) { border-right:0; }
        .shop-analysis #cards .card:nth-child(-n+2) { border-bottom:1px solid var(--border); }
        .shop-analysis .report-charts { grid-template-columns:1fr; }
    }
    @media(max-width:900px) {
        .shop-analysis .sidebar { visibility:hidden; transform:translateX(-100%); width:244px; }
        .shop-analysis.nav-open .sidebar { visibility:visible; transform:none; }
        .shop-analysis .shell { margin-left:0; }
        .shop-analysis .menu-button { display:inline-grid; place-items:center; }
        .shop-analysis .wrap { padding:24px; }
        .shop-analysis .topbar { padding-inline:24px; }
        .shop-analysis .skip-link { left:12px; }
    }
    @media(max-width:700px) {
        .shop-analysis .grid2 { grid-template-columns:1fr; gap:0; }
        .shop-analysis .key-cards { grid-template-columns:1fr; }
        .shop-analysis .profit-layout { grid-template-columns:minmax(0,1fr); }
        .shop-analysis .history-summary { grid-template-columns:1fr; }
    }
    @media(max-width:600px) {
        .shop-analysis .wrap { padding:20px 14px; }
        .shop-analysis .topbar { padding-inline:14px; height:60px; }
        .shop-analysis .breadcrumb { gap:10px; min-width:0; }
        .shop-analysis .breadcrumb>span,.shop-analysis .topbar>.platform-badge { display:none; }
        .shop-analysis .breadcrumb strong { max-width:220px; }
        .shop-analysis h1 { font-size:28px; }
        .shop-analysis .page-heading { align-items:flex-start; gap:12px; }
        .shop-analysis .page-heading>div { min-width:0; }
        .shop-analysis .page-heading p { font-size:12px; }
        .shop-analysis .page-heading>.secondary-button { padding:10px; }
        .shop-analysis .page-heading>.secondary-button span { display:none; }
        .shop-analysis.has-results h1 { font-size:23px; }
        .shop-analysis.has-results .page-heading { margin-bottom:18px; }
        .shop-analysis .search-panel { padding:18px 16px; }
        .shop-analysis .unified-search .input-group { flex-wrap:wrap; }
        .shop-analysis .unified-search input { flex:1; width:calc(100% - 40px); font-size:16px; }
        .shop-analysis .unified-search .primary { width:100%; }
        .shop-analysis .hint { align-items:flex-start; font-size:11px; }
        .shop-analysis .hint .icon { margin-top:4px; }
        .shop-analysis .panel { margin-bottom:16px; }
        .shop-analysis .empty-state { padding:24px 18px; }
        .shop-analysis .empty-state h2 { font-size:20px; }
        .shop-analysis .steps { grid-template-columns:1fr; gap:18px; }
        .shop-analysis .step b { font-size:13px; }.shop-analysis .step p { font-size:12px; }
        .shop-analysis .shop-heading { align-items:flex-start; }
        .shop-analysis .shop-heading>div { min-width:0; }
        .shop-analysis .shop-heading h2 { font-size:21px; overflow-wrap:anywhere; }
        .shop-analysis .shop-heading .platform-badge { display:none; }
        .shop-analysis #cards { gap:0; }
        .shop-analysis #cards .card { padding:16px 13px; }
        .shop-analysis .card .value { font-size:21px; overflow-wrap:anywhere; }
        .shop-analysis .card .label { align-items:flex-start; font-size:11px; }
        .shop-analysis .card .metric-note { font-size:11px; }
        .shop-analysis .metric-icon { width:20px; height:20px; }
        .shop-analysis .overview-heading { flex-direction:column; align-items:flex-start; gap:10px; }
        .shop-analysis .section-heading { padding:18px 16px; flex-wrap:wrap; }
        .shop-analysis .section-heading h2 { font-size:16px; }
        .shop-analysis .section-heading p { font-size:12px; }
        .shop-analysis .section-.shop-analysis,.shop-analysis .key-group,.shop-analysis .history-.shop-analysis,.shop-analysis .report-chart { padding:16px; }
        .shop-analysis .key-hint { max-width:145px; }
        .shop-analysis .key-cards { gap:12px; }
        .shop-analysis .key-card-stats dt { font-size:11px; }.shop-analysis .key-card-stats dd { font-size:14px; }
        .shop-analysis .filter-toggle { display:inline-flex; align-items:center; gap:6px; margin:14px 16px; padding:10px 14px; min-height:44px; border:1px solid var(--border); border-radius:7px; background:white; color:var(--blue); font-size:12px; }
        .shop-analysis #productFilters { display:none; grid-template-columns:1fr 1fr; padding:0 16px 16px; }
        .shop-analysis #productFilters.open { display:grid; }
        .shop-analysis #productSearch { grid-column:1/-1; }
        .shop-analysis .product-filters input,.shop-analysis .product-filters select { width:100%; font-size:16px; }
        .shop-analysis td.actions a,.shop-analysis td.actions button { width:44px; height:44px; }
        .shop-analysis .pager { padding:12px; gap:8px; flex-wrap:wrap; }
        .shop-analysis .report-content { padding:16px; }
        .shop-analysis .report-actions { width:100%; }
        .shop-analysis .report-actions button { white-space:normal; }
        .shop-analysis .modal-bg { padding:12px; }
        .shop-analysis .modal { padding:18px; max-height:calc(100dvh - 24px); }
        .shop-analysis .product-detail { grid-template-columns:1fr; gap:15px; }
        .shop-analysis .product-detail-image { width:100px; }
        .shop-analysis .chart-stats { grid-template-columns:1fr 1fr; }
        .shop-analysis .related-drawer-bg { padding:12px; }
        .shop-analysis .related-drawer { width:100%; padding:20px 16px max(20px,env(safe-area-inset-bottom)); max-height:calc(100dvh - 24px); border-radius:14px; transform:translateY(24px); }
        .shop-analysis .related-head { top:-20px; margin:-20px -16px 12px; padding:20px 16px 10px; }
        .shop-analysis .related-summary { grid-template-columns:1fr 1fr; }
        .shop-analysis .related-item { grid-template-columns:44px minmax(0,1fr); }
        .shop-analysis .related-item img,.shop-analysis .related-item .related-thumb { width:44px; height:50px; }
        .shop-analysis .related-price { grid-column:2; text-align:left; }
        .shop-analysis .related-open,.shop-analysis .related-clear,.shop-analysis .related-toolbar select { min-height:44px; }
        .shop-analysis #relatedForm input:not([type=checkbox]),.shop-analysis #historyPickerSearch { font-size:16px; }
        .shop-analysis .history-controls { width:100%; }
        .shop-analysis .history-meta { gap:8px; }
        .shop-analysis .history-legend-item { min-height:44px; }
        .shop-analysis .profit-header-actions { width:100%; justify-content:flex-start; flex-wrap:wrap; }
        .shop-analysis .profit-header-actions .secondary-button { flex:1; padding-inline:8px; }
        .shop-analysis .profit-workspace { padding:0 14px 16px; }
        .shop-analysis .profit-product-tabs { margin-inline:-2px; }
        .shop-analysis .profit-product-tabs button { min-width:165px; min-height:54px; }
        .shop-analysis .profit-layout { gap:12px; }
        .shop-analysis .profit-form,.shop-analysis .profit-output { padding:14px; }
        .shop-analysis .profit-field-grid { grid-template-columns:1fr; }
        .shop-analysis .profit-field input { font-size:16px; }
        .shop-analysis .profit-kpis,.shop-analysis .scenario-result { grid-template-columns:repeat(2,minmax(0,1fr)); }
        .shop-analysis .profit-kpis b { font-size:15px; }
        .shop-analysis .profit-form-actions { align-items:flex-start; flex-direction:column; }
        .shop-analysis .primary-button { min-height:44px; width:100%; }
        .shop-analysis .scenario-inputs { grid-template-columns:1fr; }
        .shop-analysis #affCards { grid-template-columns:1fr; padding:16px; }
        .shop-analysis .stock-summary { flex-wrap:wrap; padding:16px; }
        .shop-analysis .footer { flex-direction:column; gap:4px; align-items:flex-start; }
        .shop-analysis .picker-actions { flex-wrap:wrap; }
    }
    @media(prefers-reduced-motion:reduce) {
        .shop-analysis { scroll-behavior:auto; }
        .shop-analysis *,.shop-analysis *::before,.shop-analysis *::after { animation:none!important; transition:none!important; }
    }
/* Biến động giá mở ngay dưới sản phẩm thay vì một hộp thoại che nội dung. */
/* Biến động giá render trong modal căn giữa (#priceMovementModal) → panel chỉ là nội dung, khung do modal lo */
.shop-analysis .price-movement-modal { max-width:560px; }
.shop-analysis .inline-price-movement { margin:0; padding:0; background:transparent; border:0; box-shadow:none; }
.shop-analysis .inline-price-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding-bottom:10px; border-bottom:1px solid var(--border); }
.shop-analysis .inline-price-head .eyebrow { display:block; color:var(--blue); font-size:10px; font-weight:700; letter-spacing:.06em; }
.shop-analysis .inline-price-head h3 { margin:3px 0 0; font-size:13px; line-height:1.4; color:var(--ink); }
.shop-analysis .inline-price-close { display:grid; place-items:center; flex:0 0 auto; width:30px; height:30px; padding:0; border:0; border-radius:6px; background:#edf3fa; color:#66768e; font-size:18px; }
.shop-analysis .inline-price-close:hover { color:var(--blue); background:#e0ebf8; }
.shop-analysis .inline-price-body .chart-wrap { max-width:100%; }
.shop-analysis .inline-price-body .chart-stats { grid-template-columns:repeat(4,1fr); gap:14px; margin:10px 0 14px; }
@media(max-width:600px) { .shop-analysis .inline-price-body .chart-stats { grid-template-columns:1fr 1fr; } }
.shop-analysis .history-card-chart { margin-top:12px; padding:12px; border-radius:8px; background:#f5f8fc; }
.shop-analysis .history-card-chart svg { display:block; width:100%; height:auto; }
.shop-analysis .history-card-insight { margin:12px 0 0; padding-top:10px; border-top:1px solid var(--border); color:#53657b; font-size:11px; line-height:1.55; }
.shop-analysis .history-card-insight b { color:var(--ink); }

/* Compact spacing scale: 8px inside components, 12px between component groups.
   Keep controls at their existing 44px touch target; only reduce empty chrome. */
.shop-analysis .panel { margin-bottom:12px; }
.shop-analysis .search-panel,
.shop-analysis .section-heading,
.shop-analysis .section-.shop-analysis,
.shop-analysis .key-group,
.shop-analysis .report-content,
.shop-analysis .report-chart,
.shop-analysis .product-filters,
.shop-analysis .history-body,
.shop-analysis .stock-summary,
.shop-analysis .no-data { padding:12px; }
.shop-analysis .cards { gap:8px; margin-bottom:12px; }
.shop-analysis #cards { margin-bottom:0; border-bottom:0; align-items:stretch; }
.shop-analysis #cards .card { align-self:stretch; height:100%; border-bottom:0 !important; }
.shop-analysis #cards + .panel { margin-top:12px; }
.shop-analysis .shop-heading { margin:12px 0; }
.shop-analysis .overview-heading { margin:16px 0 12px; }
.shop-analysis .overview-charts { margin-bottom:12px; gap:12px; }
.shop-analysis .section-heading p { margin-top:2px; }
.shop-analysis .key-group-head { gap:8px; margin-bottom:8px; }
.shop-analysis .key-cards,
.shop-analysis .shopee-grid,
.shop-analysis .grid2,
.shop-analysis .report-charts { gap:8px; }
.shop-analysis .key-card { gap:8px; padding:12px; }
.shop-analysis .key-card-top,
.shop-analysis .key-card-head,
.shop-analysis .key-card-actions,
.shop-analysis .key-card-stats { gap:8px; }
.shop-analysis .sc-body { padding:8px; gap:4px; }
.shop-analysis .sc-actions { gap:4px; padding:8px; }
.shop-analysis .products-toolbar { gap:8px; margin:8px 0; }
.shop-analysis .product-filters button { padding:8px 12px; }
.shop-analysis .pager { gap:8px; padding:12px; }
.shop-analysis .saved-shops { gap:8px; margin-bottom:12px; padding-bottom:12px; }
.shop-analysis .saved-shop { padding:8px 12px; }
.shop-analysis .saved-shop-default { padding:12px; }
.shop-analysis .prototype-note { margin:0 12px 12px; }
.shop-analysis #affCards { padding:12px 12px 0; margin-bottom:12px; }
.shop-analysis .footnote { padding:8px 12px; }
.shop-analysis .breakdown-item { margin-bottom:12px; }
.shop-analysis .breakdown-label { gap:8px; margin-bottom:6px; }
.shop-analysis .analysis-progress { padding:12px; margin-bottom:12px; }
.shop-analysis .analysis-progress.is-settled { padding:12px; }
.shop-analysis .progress-heading,
.shop-analysis .progress-steps,
.shop-analysis .report-actions { gap:8px; }
.shop-analysis .progress-track { margin:8px 0; }
.shop-analysis .progress-detail { margin-top:8px; }
.shop-analysis .report-status { margin-bottom:12px; }
.shop-analysis .report-chart figcaption>p { margin-bottom:12px; }
.shop-analysis .report-chart-row { margin:12px 0; }
.shop-analysis .report-donut { margin:12px auto; }
.shop-analysis .report-legend li { margin:8px 0; }
.shop-analysis .inventory-details summary { padding:12px; }

.shop-analysis .profit-workspace { padding:0 12px 12px; }
.shop-analysis .profit-form,
.shop-analysis .profit-output,
.shop-analysis .profit-incomplete { padding:12px; }
.shop-analysis .profit-layout,
.shop-analysis .profit-field-grid,
.shop-analysis .profit-kpis { gap:8px; }
.shop-analysis .profit-promo,
.shop-analysis .profit-seller-type,
.shop-analysis .profit-kpis>div,
.shop-analysis .profit-suggestions { padding:12px; }
.shop-analysis .profit-breakdown { padding:4px 12px; }
.shop-analysis .profit-form-actions { gap:8px; margin-top:12px; }
.shop-analysis .scenario-box { margin-top:12px; padding-top:12px; }

/* Remaining shells, dialogs and data states use the same compact scale. */
.shop-analysis .skeleton-list { gap:12px; padding:12px 0; }
.shop-analysis .sidebar { padding:12px; }
.shop-analysis .nav-label { padding:0 12px; }
.shop-analysis .sidebar-note { padding:12px 8px 0; }
.shop-analysis .workspace { padding:12px 8px 0; }
.shop-analysis .topbar { padding-inline:12px; }
.shop-analysis .search .primary,
.shop-analysis .search button,
.shop-analysis .secondary-button,
.shop-analysis .primary-button,
.shop-analysis .link-button { padding:8px 12px; }
.shop-analysis .msg,
.shop-analysis .empty-state,
.shop-analysis .illustration-card { padding:12px; }
.shop-analysis th,
.shop-analysis td { padding:12px; }
.shop-analysis .modal-bg,
.shop-analysis .related-drawer-bg { padding:12px; }
.shop-analysis .modal,
.shop-analysis .related-drawer { padding:12px; }
.shop-analysis .related-head { top:-12px; margin:-12px -12px 12px; padding:12px 12px 8px; }
.shop-analysis .related-filters { gap:8px; margin:12px 0; padding:12px; }
.shop-analysis .related-item { gap:8px; padding:8px 0; }
.shop-analysis .history-legend { margin:12px 0; }
.shop-analysis .profit-empty,
.shop-analysis .profit-product-tabs { padding:12px 0; }
.shop-analysis .profit-product-tabs button { padding:8px 12px; }
.shop-analysis .profit-promo,
.shop-analysis .profit-seller-type { padding:12px; }
.shop-analysis .profit-kpis>div { padding:12px; }

@media(max-width:600px) {
    .shop-analysis .wrap { padding:12px; }
    .shop-analysis .search-panel,
    .shop-analysis .section-heading,
    .shop-analysis .section-.shop-analysis,
    .shop-analysis .key-group,
    .shop-analysis .report-content,
    .shop-analysis .report-chart,
    .shop-analysis .profit-form,
    .shop-analysis .profit-output,
    .shop-analysis #affCards,
    .shop-analysis .stock-summary { padding:12px; }
    .shop-analysis #cards .card { padding:12px; }
    .shop-analysis .key-cards { gap:8px; }
    .shop-analysis .filter-toggle { margin:12px; padding:8px 12px; }
    .shop-analysis #productFilters { padding:0 12px 12px; }
    .shop-analysis .modal { padding:12px; }
    .shop-analysis .related-drawer { padding:12px 12px max(12px,env(safe-area-inset-bottom)); }
    .shop-analysis .related-head { margin:-12px -12px 12px; padding:12px 12px 8px; top:-12px; }
    .shop-analysis .profit-workspace { padding:0 12px 12px; }
}
