@layer erpComponents {
  html body.erp-system-ui #shop-analytics { min-width:0; color:var(--ui-text); }
  html body.erp-system-ui #shop-analytics .sa-heading { display:flex; align-items:center; gap:10px; margin:0 0 16px; }
  html body.erp-system-ui #shop-analytics .sa-heading>span { display:grid; place-items:center; width:36px; height:36px; border-radius:10px; background:var(--ui-accent-soft); color:var(--ui-accent); }
  html body.erp-system-ui #shop-analytics .sa-heading svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  html body.erp-system-ui #shop-analytics :is(h2,h3) { margin:0!important; font-weight:600!important; color:var(--ui-text)!important; }
  html body.erp-system-ui #shop-analytics h2 { font-size:18px!important; }
  html body.erp-system-ui #shop-analytics h3 { font-size:14px!important; }
  html body.erp-system-ui #shop-analytics .sa-card { border:1px solid var(--ui-border); border-radius:12px; background:var(--ui-surface); box-shadow:0 2px 8px #20314e04; margin:0 0 16px; min-width:0; }
  html body.erp-system-ui #shop-analytics .sa-filters { display:flex; align-items:center; flex-wrap:wrap; gap:20px; padding:20px; }
  html body.erp-system-ui #shop-analytics .sa-shop { display:flex; flex:0 1 205px; min-width:170px; flex-direction:column; gap:8px; color:var(--ui-label); }
  html body.erp-system-ui #shop-analytics .sa-filter-main { display:flex; flex:1 1 550px; min-width:0; flex-direction:column; gap:16px; }
  html body.erp-system-ui #shop-analytics .sa-tabs { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
  html body.erp-system-ui #shop-analytics button { cursor:pointer; font-family:inherit!important; font-size:12px!important; font-weight:400!important; white-space:nowrap; border-radius:var(--ui-control-radius); }
  html body.erp-system-ui #shop-analytics :is(.sa-tabs button,.sa-quick button,.sa-pagination>button,.sa-search>button,[data-sa-refresh]) { min-height:34px!important; padding:7px 14px!important; border:1px solid var(--ui-border)!important; background:var(--ui-surface)!important; color:var(--ui-text)!important; transition:background .15s, border-color .15s; }
  html body.erp-system-ui #shop-analytics .sa-tabs button { min-height:38px!important; padding:8px 18px!important; }
  html body.erp-system-ui #shop-analytics .sa-tabs button[aria-selected="true"], html body.erp-system-ui #shop-analytics .sa-quick button[aria-pressed="true"] { color:var(--ui-accent)!important; border-color:var(--ui-accent)!important; background:var(--ui-accent-soft)!important; }
  html body.erp-system-ui #shop-analytics .sa-period { display:flex; align-items:center; flex-wrap:wrap; gap:12px 16px; }
  html body.erp-system-ui #shop-analytics .sa-quick { display:flex; flex-wrap:wrap; gap:6px; }
  html body.erp-system-ui #shop-analytics .sa-quick button { padding:5px 10px!important; min-height:32px!important; }
  html body.erp-system-ui #shop-analytics .sa-primary { background:var(--ui-accent)!important; border-color:var(--ui-accent)!important; color:white!important; min-width:94px; }
  html body.erp-system-ui #shop-analytics button:disabled { opacity:.5; cursor:default; }
  html body.erp-system-ui #shop-analytics button:focus-visible { outline:2px solid var(--ui-accent); outline-offset:2px; }
  html body.erp-system-ui #shop-analytics .sa-date-range { display:flex; flex:0 1 290px; width:290px; max-width:100%; cursor:pointer; align-items:center; gap:6px; min-height:36px; border:1px solid var(--ui-border); background:var(--ui-field-surface); border-radius:var(--ui-control-radius); padding:0 8px; }
  html body.erp-system-ui #shop-analytics .sa-date-range input { width:0!important; min-width:0!important; flex:1; height:32px!important; padding:0 2px!important; border:0!important; background:transparent!important; box-shadow:none!important; text-align:center; cursor:pointer; color:var(--ui-text)!important; }
  html body.erp-system-ui #shop-analytics .sa-date-range button { display:grid; place-items:center; width:24px!important; min-width:24px!important; height:28px!important; min-height:28px!important; border:0!important; background:transparent!important; padding:0!important; color:var(--ui-text)!important; }
  html body.erp-system-ui #shop-analytics .sa-date-range svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.6; }
  html body.erp-system-ui #shop-analytics .sa-status { margin:0 2px 14px; min-height:20px; color:var(--ui-accent); font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
  html body.erp-system-ui #shop-analytics .sa-error { color:#c74353!important; }
  html body.erp-system-ui #shop-analytics :is(.sa-muted,.sa-missing) { color:#8a97a8!important; font-size:12px!important; }
  html body.erp-system-ui #shop-analytics .sa-card-head { display:flex; align-items:center; flex-wrap:wrap; gap:12px 18px; min-height:64px; padding:16px 20px; border-bottom:1px solid var(--ui-border-soft); }
  html body.erp-system-ui #shop-analytics .sa-card-head>.sa-muted { margin-left:auto; }
  html body.erp-system-ui #shop-analytics .sa-chart-choice { width:156px; }
  html body.erp-system-ui #shop-analytics .sa-chart { min-width:0; height:245px; padding:8px 12px 0; }
  html body.erp-system-ui #shop-analytics .sa-chart>svg { display:block; width:100%; height:235px; overflow:visible; }
  html body.erp-system-ui #shop-analytics .sa-chart-empty { display:grid; place-items:center; height:100%; color:#98a4b4; font-size:13px; text-align:center; }
  html body.erp-system-ui #shop-analytics .sa-grid { stroke:var(--ui-border); stroke-width:1; }
  html body.erp-system-ui #shop-analytics .sa-axis { fill:#8a97a8; font:11px "Microsoft YaHei",sans-serif; }
  html body.erp-system-ui #shop-analytics .sa-line { fill:none; stroke:var(--ui-accent); stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
  html body.erp-system-ui #shop-analytics .sa-point { fill:var(--ui-accent); stroke:white; stroke-width:1.4; }
  html body.erp-system-ui #shop-analytics .sa-point:focus { outline:none; stroke:var(--ui-accent); stroke-width:4; }
  html body.erp-system-ui #shop-analytics .sa-chart-note { margin:2px 20px 12px; color:#8a97a8; font-size:11px; line-height:1.7; }
  html body.erp-system-ui #shop-analytics .sa-search { display:flex; align-items:center; gap:8px; margin:0; width:340px; max-width:100%; }
  html body.erp-system-ui #shop-analytics .sa-search input { flex:1; width:0!important; min-width:0!important; height:36px!important; border:1px solid var(--ui-border)!important; border-radius:var(--ui-control-radius)!important; padding:0 10px!important; background:var(--ui-field-surface)!important; }
  html body.erp-system-ui #shop-analytics :is(.sa-table-wrap,[data-sa-daily]) { position:relative!important; overflow-x:auto!important; overflow-y:hidden!important; isolation:isolate; overscroll-behavior-y:auto; -webkit-overflow-scrolling:touch; }
  html body.erp-system-ui #shop-analytics .sa-table-wrap { width:auto!important; max-height:none!important; height:auto!important; margin:0 16px; border:1px solid var(--ui-border); border-radius:8px; }
  html body.erp-system-ui #shop-analytics .sa-details>.sa-card-head { border-bottom:0; }
  html body.erp-system-ui #shop-analytics .sa-table { width:100%!important; min-width:1160px!important; table-layout:fixed!important; margin:0!important; }
  /* Headers move with their rows; retain separate borders for clean grid lines. */
  html body.erp-system-ui #shop-analytics :is(.sa-table,.sa-daily-table) { border-collapse:separate!important; border-spacing:0!important; }
  html body.erp-system-ui #shop-analytics :is(.sa-table,.sa-daily-table)>thead { position:static!important; top:auto!important; z-index:auto!important; box-shadow:none!important; }
  html body.erp-system-ui #shop-analytics :is(.sa-table,.sa-daily-table)>thead>tr>th { position:static!important; top:auto!important; z-index:auto!important; background:#f7f9fc!important; box-shadow:inset 0 -1px 0 var(--ui-border); }
  html body.erp-system-ui #shop-analytics[data-sa-mode="funnel"] .sa-table { min-width:940px!important; }
  html body.erp-system-ui #shop-analytics:is([data-sa-mode="best"],[data-sa-mode="search"]) .sa-table { min-width:700px!important; }
  html body.erp-system-ui #shop-analytics .sa-table :is(th,td) { padding:13px 10px!important; text-align:center!important; vertical-align:middle!important; border:0!important; border-bottom:1px solid var(--ui-border-soft)!important; font:400 12px/1.6 "Microsoft YaHei",sans-serif!important; color:var(--ui-text)!important; background:var(--ui-surface)!important; overflow-wrap:normal; }
  html body.erp-system-ui #shop-analytics .sa-table th:first-child, html body.erp-system-ui #shop-analytics .sa-table td:first-child { width:290px; text-align:left!important; }
  html body.erp-system-ui #shop-analytics .sa-table thead th { background:#f7f9fc!important; color:var(--ui-table-heading)!important; }
  html body.erp-system-ui #shop-analytics .sa-table thead button { width:100%; min-height:0!important; height:auto!important; padding:0!important; border:0!important; background:transparent!important; color:inherit!important; white-space:normal!important; line-height:1.7!important; }
  html body.erp-system-ui #shop-analytics .sa-table thead button span { color:var(--ui-accent); }
  html body.erp-system-ui #shop-analytics .sa-table tbody tr:hover td { background:color-mix(in srgb,var(--ui-accent) 3%,white)!important; }
  html body.erp-system-ui #shop-analytics .sa-table .sa-summary :is(td,th) { background:var(--ui-accent-soft)!important; font-weight:500!important; }
  html body.erp-system-ui #shop-analytics .sa-table .sa-empty { height:130px; text-align:center!important; color:#8a97a8!important; }
  html body.erp-system-ui #shop-analytics .sa-product { display:flex; gap:10px; align-items:center; min-width:0; }
  html body.erp-system-ui #shop-analytics :is(.sa-photo,.sa-no-photo) { display:grid; place-items:center; flex:0 0 44px; width:44px!important; height:44px!important; min-width:44px!important; min-height:44px!important; padding:2px!important; border:1px solid var(--ui-border)!important; border-radius:7px!important; background:#fff!important; color:#a3aebc!important; font-size:9px!important; }
  html body.erp-system-ui #shop-analytics .sa-photo img { display:block; width:100%!important; height:100%!important; max-width:100%!important; max-height:100%!important; object-fit:contain!important; border-radius:4px; }
  html body.erp-system-ui #shop-analytics .sa-product-info { min-width:0; flex:1; }
  html body.erp-system-ui #shop-analytics .sa-name { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; max-width:100%; font-size:12px!important; font-weight:400!important; color:#137fe0!important; text-decoration:none!important; line-height:1.8!important; }
  html body.erp-system-ui #shop-analytics .sa-ident { display:flex; align-items:center; min-width:0; font-size:11px; color:#8a97a8; white-space:nowrap; line-height:1.8; }
  html body.erp-system-ui #shop-analytics .sa-ident button { display:block; min-width:0!important; min-height:0!important; max-width:100%; height:auto!important; border:0!important; padding:0!important; background:transparent!important; overflow:hidden; text-overflow:ellipsis; text-align:left!important; color:#137fe0!important; font-size:11px!important; line-height:1.8!important; }
  html body.erp-system-ui #shop-analytics :is(.sa-name,.sa-ident button):hover { color:#0867bd!important; text-decoration:underline!important; }
  html body.erp-system-ui #shop-analytics .sa-pagination { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:10px; padding:16px 20px; font-size:12px; color:#748298; }
  html body.erp-system-ui #shop-analytics .sa-pagination>span:first-child { margin-right:auto; }
  html body.erp-system-ui #shop-analytics .sa-pagination>label { display:flex; align-items:center; gap:6px; white-space:nowrap; }
  html body.erp-system-ui #shop-analytics .sa-pagination .erp-select-host { min-width:65px; }
  html body.erp-system-ui #shop-analytics .sa-daily { font-size:12px; line-height:1.9; color:#7c8a9b; }
  html body.erp-system-ui #shop-analytics .sa-daily summary { cursor:pointer; color:var(--ui-text); }
  html body.erp-system-ui #shop-analytics .sa-daily { padding:0 20px 14px; }
  html body.erp-system-ui #shop-analytics .sa-daily>div { max-height:none!important; height:auto!important; margin-top:10px; }
  html body.erp-system-ui #shop-analytics .sa-daily table { width:100%; }
  html body.erp-system-ui #shop-analytics .sa-daily :is(td,th) { padding:6px 10px!important; text-align:left!important; border-bottom:1px solid var(--ui-border-soft)!important; font-weight:400!important; font-size:12px!important; }
  @media(max-width:720px) {
    html body.erp-system-ui #shop-analytics .sa-filters { padding:16px; gap:16px; }
    html body.erp-system-ui #shop-analytics .sa-shop { flex:1 1 calc(100% - 120px); order:0; min-width:145px; }
    html body.erp-system-ui #shop-analytics [data-sa-refresh] { order:1; align-self:flex-end; }
    html body.erp-system-ui #shop-analytics .sa-filter-main { order:2; flex-basis:100%; gap:12px; }
    html body.erp-system-ui #shop-analytics .sa-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
    html body.erp-system-ui #shop-analytics .sa-tabs button { padding:8px!important; }
    html body.erp-system-ui #shop-analytics .sa-period { gap:12px; }
    html body.erp-system-ui #shop-analytics .sa-date-range { flex-basis:100%; width:100%; }
    html body.erp-system-ui #shop-analytics .sa-quick { gap:6px; width:100%; display:grid; grid-template-columns:repeat(3,1fr); }
    html body.erp-system-ui #shop-analytics .sa-card-head { padding:16px; gap:10px; }
    html body.erp-system-ui #shop-analytics .sa-card-head>.sa-muted { width:100%; margin:0; font-size:10px!important; }
    html body.erp-system-ui #shop-analytics .sa-search { width:100%; }
    html body.erp-system-ui #shop-analytics .sa-chart-choice { margin-left:auto; width:138px; }
    html body.erp-system-ui #shop-analytics .sa-table-wrap { margin:0 12px; }
    html body.erp-system-ui #shop-analytics .sa-product { min-height:56px; }
    html body.erp-system-ui #shop-analytics .sa-pagination { padding:14px 12px; gap:8px; }
    html body.erp-system-ui #shop-analytics .sa-pagination>span:first-child { width:100%; }
  }
}
