body.advisor-page {
    min-height: 100vh;
    background: #f5f7fb;
    color: var(--slate-800);
    overflow: hidden;
}

.advisor-shell {
    display: grid;
    grid-template-columns: 68px 268px minmax(0, 1fr);
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.advisor-rail {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .7rem;
    padding: 1rem .65rem;
    background: #0f172a;
    border-right: 1px solid rgba(255,255,255,.08);
}

.rail-logo {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .45rem;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.rail-logo img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.rail-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.rail-btn:hover,
.rail-btn.active {
    color: #fff;
    background: rgba(14,165,233,.22);
}

.advisor-sidebar {
    min-width: 0;
    min-height: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-right: 1px solid var(--slate-200);
    box-shadow: 12px 0 32px rgba(15,23,42,.04);
}

.advisor-brand {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: 1.05rem 1.05rem .9rem;
    border-bottom: 1px solid var(--slate-200);
}

.advisor-brand h1 {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.2;
    color: var(--slate-900);
}

.advisor-brand p {
    margin: .28rem 0 0;
    color: var(--slate-500);
    font-size: .78rem;
}

.platform-badge,
.source-pill,
.ghost-link,
.menu-item em,
.mini-badge {
    border-radius: 8px;
    font-weight: 800;
}

.platform-badge {
    padding: .24rem .42rem;
    background: #eff6ff;
    color: var(--primary-700);
    font-size: .68rem;
    border: 1px solid #bfdbfe;
}

.advisor-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--slate-200);
}

.advisor-mode-tab {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #fff;
    color: var(--slate-600);
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.advisor-mode-tab.active {
    color: #fff;
    border-color: var(--primary-600);
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
}

.advisor-menu {
    min-height: 0;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .85rem .85rem 1.2rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.advisor-menu::-webkit-scrollbar {
    width: 8px;
}

.advisor-menu::-webkit-scrollbar-track {
    background: transparent;
}

.advisor-menu::-webkit-scrollbar-thumb {
    border: 2px solid #fff;
    border-radius: 999px;
    background: #cbd5e1;
}

.advisor-menu::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.menu-block + .menu-block {
    margin-top: 1.2rem;
}

.menu-caption {
    margin: .2rem .35rem .48rem;
    color: var(--slate-400);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.menu-item {
    width: 100%;
    min-height: 40px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    margin-bottom: .24rem;
    padding: .5rem .55rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--slate-600);
    font-size: .88rem;
    font-weight: 760;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.menu-item i {
    width: 22px;
    text-align: center;
    color: var(--slate-400);
}

.menu-item em {
    padding: .14rem .34rem;
    background: #f1f5f9;
    color: var(--slate-500);
    font-size: .62rem;
    font-style: normal;
    white-space: nowrap;
}

.menu-item:hover {
    color: var(--primary-700);
    background: #f8fafc;
    border-color: var(--slate-200);
}

.menu-item:hover i,
.menu-item.active i,
.menu-item.active {
    color: var(--primary-700);
}

.menu-item.active {
    background: #e0f2fe;
    border-color: #bae6fd;
}

.menu-item.active em {
    color: var(--primary-700);
    background: #fff;
}

.menu-item.muted {
    color: var(--slate-500);
}

.menu-tree {
    margin-bottom: .24rem;
}

.menu-parent {
    width: 100%;
    min-height: 40px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 18px;
    align-items: center;
    gap: .55rem;
    padding: .5rem .55rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--slate-600);
    font-size: .88rem;
    font-weight: 760;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.menu-parent i:first-child {
    width: 22px;
    text-align: center;
    color: var(--slate-400);
}

.menu-parent:hover {
    color: var(--primary-700);
    background: #f8fafc;
    border-color: var(--slate-200);
}

.menu-parent:hover i,
.menu-parent.active,
.menu-parent.active i:first-child {
    color: var(--primary-700);
}

.menu-parent.active {
    background: #eef8ff;
    border-color: #cae8ff;
}

.menu-parent.expanded {
    background: #f7fbff;
}

.menu-parent.active.expanded {
    background: #e0f2fe;
}

.menu-chevron {
    justify-self: center;
    color: var(--slate-500);
    font-size: .65rem;
    transition: transform var(--transition-fast);
}

.menu-parent.expanded .menu-chevron {
    transform: rotate(180deg);
}

.menu-children {
    display: none;
    margin: .12rem 0 .38rem 2.05rem;
    padding-left: .52rem;
    border-left: 1px solid #e8edf5;
}

.menu-children.expanded {
    display: grid;
    gap: .12rem;
}

.menu-child {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: .32rem .68rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--slate-600);
    font-size: .84rem;
    font-weight: 690;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.menu-child:hover {
    color: var(--primary-700);
    background: #f8fafc;
}

.menu-child.active {
    color: var(--primary-700);
    background: #e9f0ff;
    border-color: #d7e5ff;
    font-weight: 850;
}

.menu-child.active::before {
    content: '';
    width: 4px;
    height: 4px;
    margin-right: .42rem;
    border-radius: 999px;
    background: currentColor;
}

.menu-direct {
    margin-bottom: .24rem;
}

.advisor-main {
    min-width: 0;
    height: 100vh;
    overflow: auto;
    background:
        linear-gradient(180deg, rgba(255,255,255,.88) 0, rgba(245,247,251,.96) 280px),
        #f5f7fb;
}

.advisor-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 66px;
    padding: .68rem 1.2rem;
    border-bottom: 1px solid rgba(226,232,240,.88);
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(16px);
}

.breadcrumb {
    color: var(--slate-500);
    font-size: .78rem;
    font-weight: 750;
}

.advisor-topbar h2 {
    margin: .18rem 0 0;
    color: var(--slate-900);
    font-size: 1.26rem;
    line-height: 1.2;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
}

.source-pill,
.ghost-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    padding: .42rem .68rem;
    border: 1px solid var(--slate-200);
    background: #fff;
    color: var(--slate-600);
    font-size: .8rem;
    text-decoration: none;
}

.advisor-view {
    display: none;
    padding: .65rem 1.2rem 1.15rem;
}

.advisor-view.active {
    display: block;
}

.advisor-loading,
.advisor-error {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-500);
    font-weight: 800;
    border: 1px dashed var(--slate-300);
    border-radius: 8px;
    background: #fff;
}

.advisor-error {
    color: var(--error);
}

.board-card {
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15,23,42,.06);
}

.heatmap-section {
    margin-bottom: 0;
    padding: 0;
}

.heatmap-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: .05rem 0 .58rem;
}

.heatmap-section-head h3 {
    margin: 0;
    color: #151824;
    font-size: 1.08rem;
    line-height: 1.2;
    font-weight: 900;
}

.heatmap-date-control {
    justify-content: flex-end;
}

.heatmap-card {
    padding: 1rem 1.08rem;
    border-color: #edf0f7;
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(24, 34, 71, .05);
}

.heatmap-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 340px) 38px minmax(180px, 1fr);
    align-items: center;
    gap: .62rem;
    margin-bottom: .72rem;
}

.heatmap-search {
    min-width: 0;
    height: 40px;
    display: flex;
    align-items: center;
    gap: .52rem;
    padding: 0 .78rem;
    border: 1px solid #e7ebf3;
    border-radius: 9px;
    background: #f9fafc;
    color: #a2a8b6;
}

.heatmap-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #2c3345;
    font: inherit;
    font-size: .84rem;
    font-weight: 700;
}

.heatmap-search input::placeholder {
    color: #a8afbd;
}

.heatmap-search-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e7ebf3;
    border-radius: 9px;
    background: #fff;
    color: #6e7689;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.heatmap-search-btn:hover {
    border-color: #c9ddff;
    color: var(--primary-700);
    background: #f5f9ff;
}

.heatmap-color-control {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: .62rem;
    color: #636b7d;
    font-size: .85rem;
    font-weight: 800;
}

.heatmap-select {
    position: relative;
    min-width: 132px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e7ebf3;
    border-radius: 9px;
    background: #fff;
    color: #2c3345;
}

.heatmap-select select {
    width: 100%;
    height: 100%;
    padding: 0 2rem 0 .74rem;
    border: 0;
    outline: 0;
    appearance: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .84rem;
    font-weight: 800;
    cursor: pointer;
}

.heatmap-select i {
    position: absolute;
    right: .72rem;
    color: #9aa2b2;
    font-size: .72rem;
    pointer-events: none;
}

.heatmap-sortbar {
    display: flex;
    align-items: center;
    gap: .64rem;
    margin-bottom: .72rem;
    color: #737b8e;
    font-size: .84rem;
    font-weight: 850;
}

.heatmap-sort-label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}

.heatmap-sortbar .sort-tabs {
    margin-bottom: 0;
    gap: .18rem;
}

.heatmap-sortbar .sort-btn {
    position: relative;
    min-height: 30px;
    padding: .22rem .52rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #677085;
    font-size: .8rem;
    font-weight: 850;
}

.heatmap-sortbar .sort-btn:hover {
    color: var(--primary-700);
    background: #f5f8ff;
}

.heatmap-sortbar .sort-btn.active {
    color: var(--primary-700);
    border-color: transparent;
    background: #eff6ff;
}

.heatmap-sortbar .sort-btn.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--primary-600);
}

.board-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

.board-title {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0;
    color: var(--slate-900);
    font-size: 1.04rem;
    line-height: 1.3;
}

.board-subtitle {
    margin: .25rem 0 0;
    color: var(--slate-500);
    font-size: .78rem;
}

.date-control,
.control-row,
.segmented-control,
.search-control,
.select-control,
.sort-tabs,
.category-tabs,
.table-tools,
.pagination-bar {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
}

.date-control button,
.segment-btn,
.icon-btn,
.sort-btn,
.utility-btn,
.category-chip,
.pagination-btn {
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #fff;
    color: var(--slate-600);
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.date-control button,
.icon-btn,
.pagination-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.date-label {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .38rem .7rem;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #fff;
    color: var(--slate-800);
    font-size: .82rem;
    font-weight: 850;
}

.date-picker-shell {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.date-control .date-picker-toggle {
    width: auto;
    min-width: 148px;
    height: 34px;
    justify-content: center;
    padding: .38rem .68rem;
}

.date-picker-toggle .date-caret {
    margin-left: .1rem;
    color: var(--slate-400);
    font-size: .68rem;
}

.date-picker-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 70;
    width: 292px;
    display: none;
    padding: .78rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
}

.date-picker-popover.open {
    display: block;
}

.date-picker-head {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    align-items: center;
    gap: .4rem;
    margin-bottom: .62rem;
}

.date-picker-head strong {
    color: var(--slate-900);
    font-size: .92rem;
    font-weight: 900;
    text-align: center;
}

.date-control .date-month-btn {
    width: 32px;
    height: 32px;
    border-color: #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: var(--slate-600);
}

.date-control .date-month-btn:hover,
.date-control .date-picker-toggle:hover,
.date-control .date-shortcut:hover,
.date-control .date-cell:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: var(--primary-700);
}

.date-picker-weekdays,
.date-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .24rem;
}

.date-picker-weekdays {
    margin-bottom: .28rem;
}

.date-picker-weekdays span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-400);
    font-size: .72rem;
    font-weight: 900;
}

.date-control .date-cell {
    width: auto;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border-color: transparent;
    border-radius: 8px;
    background: #fff;
    color: var(--slate-700);
    font-size: .78rem;
    font-weight: 850;
}

.date-cell.outside {
    background: #f8fafc;
    color: var(--slate-300);
}

.date-cell.today {
    border-color: #bae6fd;
    color: var(--primary-700);
}

.date-control .date-cell.selected,
.date-control .date-cell.selected:hover {
    border-color: var(--primary-600);
    background: var(--primary-600);
    color: #fff;
}

.date-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .7rem;
    padding-top: .68rem;
    border-top: 1px solid #edf2f7;
}

.date-control .date-shortcut {
    width: auto;
    min-width: 88px;
    height: 30px;
    padding: 0 .72rem;
    border-color: #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: var(--slate-600);
    font-size: .76rem;
}

.segment-btn {
    min-height: 34px;
    padding: .38rem .7rem;
    font-size: .8rem;
}

.segment-btn.active,
.sort-btn.active,
.category-chip.active {
    color: #fff;
    border-color: var(--primary-600);
    background: var(--primary-600);
}

.control-row {
    justify-content: space-between;
    margin-bottom: .9rem;
}

.control-left,
.control-right {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.search-control,
.select-control {
    min-height: 36px;
    padding: .35rem .6rem;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #fff;
    color: var(--slate-500);
}

.search-control input,
.select-control select {
    width: 210px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--slate-700);
    font: inherit;
    font-size: .82rem;
}

.select-control select {
    width: auto;
    min-width: 108px;
}

.sort-tabs {
    margin-bottom: .85rem;
}

.sort-btn {
    min-height: 34px;
    padding: .38rem .7rem;
    font-size: .78rem;
}

.heatmap-mosaic {
    position: relative;
    width: 100%;
    min-width: 1180px;
    height: clamp(560px, 31vw, 660px);
    min-height: 0;
    border-radius: 8px;
    overflow: visible;
}

.heat-group {
    position: relative;
    position: absolute;
    min-width: 0;
    min-height: 108px;
    display: flex;
    flex-direction: column;
    padding: 4px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    overflow: visible;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.heat-group:hover {
    border-color: #6b66ff;
    box-shadow: 0 0 0 1px rgba(107,102,255,.12);
}

.heat-group.size-xl {
    min-height: 0;
}

.heat-group.size-lg {
    min-height: 0;
}

.heat-group.size-md {
    min-height: 0;
}

.heat-group.size-sm {
    min-height: 0;
}

.heat-group-head {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: .28rem;
    min-height: 24px;
    color: #171b26;
    font-size: .86rem;
    line-height: 1.1;
    text-align: left;
    white-space: nowrap;
    padding: 0 .12rem .3rem;
}

.heat-group-head strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .88rem;
    font-weight: 900;
}

.heat-group-head span {
    font-size: .84rem;
    font-weight: 900;
}

.heat-group-tiles {
    position: relative;
    min-height: 0;
    flex: 1;
    height: auto;
    border-radius: 4px;
    overflow: hidden;
}

.heat-group.size-xl .heat-group-tiles,
.heat-group.size-lg .heat-group-tiles {
    height: auto;
}

.heat-group.size-md .heat-group-tiles {
    height: auto;
}

.heat-group.size-sm .heat-group-tiles {
    height: auto;
}

.heat-leaf {
    position: absolute;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .18rem;
    padding: .28rem;
    border: 2px solid #fff;
    border-radius: 5px;
    box-shadow: none;
    cursor: pointer;
    overflow: hidden;
    transition: border-color var(--transition-fast), filter var(--transition-fast);
}

.heat-leaf:hover {
    z-index: 3;
    border-color: #6b66ff;
    filter: saturate(1.08) brightness(1.01);
}

.leaf-name,
.leaf-delta {
    max-width: 100%;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaf-name {
    color: inherit;
    font-size: clamp(.58rem, .62vw, .72rem);
    line-height: 1.15;
    font-weight: 900;
}

.leaf-delta {
    font-size: clamp(.56rem, .58vw, .7rem);
    line-height: 1.1;
    font-weight: 900;
}

.heatmap-mosaic.red-up-green-down .heat-leaf.positive {
    background: #ffe9ef;
    color: #f04467;
}

.heatmap-mosaic.red-up-green-down .heat-leaf.negative {
    background: #cdeee5;
    color: #08a879;
}

.heatmap-mosaic.green-up-red-down .heat-leaf.positive {
    background: #cdeee5;
    color: #08a879;
}

.heatmap-mosaic.green-up-red-down .heat-leaf.negative {
    background: #ffe9ef;
    color: #f04467;
}

.heatmap-mosaic.red-up-green-down .heat-group.positive .heat-group-head span,
.heatmap-mosaic.green-up-red-down .heat-group.negative .heat-group-head span {
    color: #f04467;
}

.heatmap-mosaic.red-up-green-down .heat-group.negative .heat-group-head span,
.heatmap-mosaic.green-up-red-down .heat-group.positive .heat-group-head span {
    color: #08a879;
}

.heatmap-empty {
    grid-column: 1 / -1;
    min-height: 260px;
    display: grid;
    place-items: center;
    gap: .45rem;
    color: var(--slate-500);
    font-weight: 850;
}

.heatmap-tooltip {
    position: fixed;
    z-index: 1000;
    min-width: 520px;
    max-width: min(92vw, 640px);
    display: grid;
    grid-template-columns: minmax(110px, 1.35fr) repeat(5, minmax(70px, .8fr));
    align-items: center;
    gap: 1.1rem;
    padding: 1rem 1.1rem;
    border-radius: 10px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 14px 38px rgba(15,23,42,.18);
    color: #171b26;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.heatmap-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.heatmap-tooltip strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.02rem;
    font-weight: 900;
}

.heatmap-tooltip span {
    display: grid;
    gap: .2rem;
    color: #151824;
    font-size: .95rem;
    font-weight: 850;
    text-align: center;
    white-space: nowrap;
}

.heatmap-tooltip em {
    color: #151824;
    font-size: .68rem;
    font-style: normal;
    font-weight: 800;
}

.heatmap-tooltip .tooltip-blue,
.heatmap-tooltip .tooltip-blue em {
    color: #4f46e5;
}

.market-overview-section {
    margin-top: 1rem;
    padding: 0;
}

.section-title {
    margin: 0 0 .62rem;
    color: var(--slate-900);
    font-size: 1.06rem;
    line-height: 1.35;
    font-weight: 900;
}

.market-section {
    margin-top: 1rem;
    padding: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: .82rem;
}

.metric-card {
    min-width: 0;
    min-height: 118px;
    padding: 1rem 1.15rem;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.metric-mint {
    border-color: #c8f2df;
    background: #f0fcf8;
}

.metric-lavender {
    border-color: #dbe0ff;
    background: #f4f5ff;
}

.metric-sky {
    border-color: #cdefff;
    background: #f1f9ff;
}

.metric-amber {
    border-color: #fde7b5;
    background: #fffaf1;
}

.metric-violet {
    border-color: #dedcff;
    background: #f5f4ff;
}

.metric-head {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.metric-label {
    min-width: 0;
    color: var(--slate-500);
    font-size: .86rem;
    font-weight: 850;
}

.metric-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #dff7ec;
    color: #059669;
    font-size: .95rem;
}

.metric-lavender .metric-icon {
    background: #e4e7ff;
    color: #4f46e5;
}

.metric-sky .metric-icon {
    background: #dff4ff;
    color: #0284c7;
}

.metric-amber .metric-icon {
    background: #fff0bf;
    color: #f59e0b;
}

.metric-violet .metric-icon {
    background: #e4e3ff;
    color: #5b5cf6;
}

.metric-info {
    color: var(--slate-500);
    font-size: .72rem;
}

.metric-value {
    margin-top: .72rem;
    color: var(--slate-900);
    font-size: 1.58rem;
    line-height: 1.2;
    font-weight: 900;
}

.metric-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .5rem;
}

.delta-up {
    color: #dc2626;
}

.delta-down {
    color: #16a34a;
}

.sparkline {
    width: 74px;
    height: 26px;
}

.category-tabs {
    align-items: flex-start;
    margin-bottom: .52rem;
}

.category-chip {
    min-height: 32px;
    padding: .35rem .62rem;
    font-size: .76rem;
    white-space: nowrap;
}

.table-tools {
    justify-content: space-between;
    margin-bottom: .52rem;
}

.utility-btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    padding: .38rem .66rem;
    font-size: .78rem;
}

.table-scroll {
    overflow: auto;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
}

.market-table {
    width: max(100%, 1960px);
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

.market-table th,
.market-table td {
    padding: .82rem .88rem;
    border-bottom: 1px solid var(--slate-200);
    color: var(--slate-700);
    font-size: .78rem;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.market-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    color: var(--slate-500);
    font-weight: 900;
}

.market-table tr:last-child td {
    border-bottom: 0;
}

.rank-cell {
    width: 48px;
    color: var(--slate-900);
    font-weight: 900;
}

.market-name {
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--slate-900);
    font-weight: 850;
}

.product-stack {
    display: flex;
    align-items: center;
}

.product-thumb {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: -7px;
    border: 2px solid #fff;
    border-radius: 8px;
    background: #e0f2fe;
    color: var(--primary-700);
    font-size: .68rem;
    font-weight: 900;
    box-shadow: 0 3px 8px rgba(15,23,42,.08);
}

.table-spark {
    width: 92px;
    height: 28px;
}

.blue-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 26px;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--primary-700);
    font-weight: 900;
}

.product-dashboard {
    display: grid;
    gap: 1.05rem;
}

.product-dashboard-section {
    padding: 0;
}

.product-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .62rem;
}

.product-section-head.compact {
    align-items: center;
}

.product-section-head h3 {
    margin: 0;
    color: var(--slate-900);
    font-size: 1.08rem;
    line-height: 1.25;
    font-weight: 900;
}

.product-section-head p {
    margin: .28rem 0 0;
    color: var(--slate-500);
    font-size: .78rem;
    font-weight: 700;
}

.product-date-control {
    flex: 0 0 auto;
}

.product-share-card {
    position: relative;
    padding: .86rem;
    border-radius: 10px;
    overflow-x: auto;
}

.product-share-treemap {
    position: relative;
    width: var(--share-map-width, 1120px);
    min-width: 1120px;
    height: var(--share-map-height, 600px);
    overflow: hidden;
    border-radius: 4px;
    background: #f8fafc;
}

.product-share-tile {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .22rem;
    padding: .46rem;
    box-sizing: border-box;
    border: 3px solid #fff;
    border-radius: 0;
    background: #7d73f4;
    color: #fff;
    text-align: center;
    cursor: pointer;
    transition: filter var(--transition-fast), transform var(--transition-fast);
}

.product-share-tile:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.product-share-tile.is-selected {
    background: linear-gradient(135deg, #d977cc 0%, #4f46e5 100%);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.32);
}

.product-share-tile strong {
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: .9rem;
    line-height: 1.25;
    font-weight: 900;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-share-tile span {
    font-size: .78rem;
    line-height: 1.2;
    font-weight: 800;
    white-space: nowrap;
}

.product-share-tile.is-small {
    gap: .12rem;
    padding: .34rem;
}

.product-share-tile.is-small strong {
    font-size: .78rem;
    line-height: 1.18;
}

.product-share-tile.is-small span,
.product-share-tile.is-tiny span,
.product-share-tile.is-micro span {
    display: none;
}

.product-share-tile.is-tiny {
    padding: .24rem;
}

.product-share-tile.is-tiny strong {
    font-size: .68rem;
    line-height: 1.12;
    -webkit-line-clamp: 1;
}

.product-share-tile.is-micro {
    padding: .12rem;
}

.product-share-tile.is-micro strong {
    font-size: .62rem;
    line-height: 1.08;
    -webkit-line-clamp: 1;
}

.product-share-tile.is-dot {
    padding: 0;
}

.product-share-tile.is-dot strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.product-share-tile.is-dot span {
    display: none;
}

.product-share-back {
    position: absolute;
    z-index: 3;
    top: .75rem;
    left: .75rem;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: .36rem;
    padding: .34rem .62rem;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 8px;
    background: rgba(255,255,255,.92);
    color: var(--primary-700);
    font-size: .78rem;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15,23,42,.1);
}

.product-metric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: .82rem;
}

.product-range-tabs,
.product-ranking-tabs {
    display: inline-flex;
    align-items: center;
    gap: .12rem;
    padding: .18rem;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #fff;
}

.product-range-tabs button,
.product-ranking-tabs button {
    min-height: 30px;
    padding: .28rem .68rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--slate-500);
    font-size: .78rem;
    font-weight: 850;
    cursor: pointer;
}

.product-range-tabs button.active,
.product-ranking-tabs button.active {
    color: #fff;
    background: #4f63ff;
    box-shadow: 0 5px 12px rgba(79,99,255,.2);
}

.product-chart-card {
    padding: 1rem 1.1rem .7rem;
    border-radius: 16px;
}

.product-chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin: .4rem 0 .2rem;
    color: var(--slate-700);
    font-size: .82rem;
    font-weight: 850;
}

.product-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
}

.legend-box {
    width: 16px;
    height: 12px;
    display: inline-block;
    border-radius: 2px;
    background: #73b7fb;
}

.legend-line {
    width: 18px;
    height: 3px;
    display: inline-block;
    border-radius: 999px;
    background: #7467ff;
}

.product-trend-svg {
    width: 100%;
    min-width: 980px;
    height: 360px;
}

.chart-grid {
    stroke: #e8edf6;
    stroke-dasharray: 4 6;
}

.chart-bar {
    fill: #79baf8;
}

.chart-area {
    fill: url(#productTrendAreaGradient);
    pointer-events: none;
}

.chart-line {
    fill: none;
    stroke: #7467ff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-dot {
    fill: #7467ff;
}

.chart-label {
    fill: #96a1b3;
    font-size: 13px;
    font-weight: 750;
}

.product-more-btn {
    border: 0;
    background: transparent;
    color: var(--slate-500);
    font-size: .8rem;
    font-weight: 850;
    cursor: pointer;
}

.product-more-btn:hover {
    color: var(--primary-700);
}

.product-ranking-tabs {
    margin-bottom: .72rem;
}

.product-ranking-table-wrap {
    overflow: auto;
    border-radius: 12px;
    background: #fff;
}

.product-ranking-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

.product-ranking-table th,
.product-ranking-table td {
    padding: .78rem .9rem;
    border-bottom: 1px solid #edf1f7;
    color: var(--slate-800);
    font-size: .86rem;
    text-align: left;
    vertical-align: middle;
}

.product-ranking-table th {
    background: #f5f6ff;
    color: var(--slate-500);
    font-size: .76rem;
    font-weight: 900;
}

.product-ranking-table th button {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.product-ranking-table tr:last-child td {
    border-bottom: 0;
}

.rank-medal,
.rank-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.rank-medal {
    font-size: 1.2rem;
}

.rank-medal.gold {
    background: #fff2c7;
    color: #f59e0b;
}

.rank-medal.silver {
    background: #eef2f7;
    color: #94a3b8;
}

.rank-medal.bronze {
    background: #fff0e6;
    color: #d97706;
}

.rank-number {
    color: var(--slate-900);
    font-weight: 900;
}

.ranking-entity,
.ranking-related {
    display: flex;
    align-items: center;
    gap: .72rem;
    min-width: 0;
}

.ranking-entity img,
.ranking-related img {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 7px;
    object-fit: cover;
    background: #eef2f7;
}

.ranking-entity strong {
    display: block;
    max-width: 330px;
    overflow: hidden;
    color: var(--slate-900);
    font-size: .92rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-entity span {
    display: block;
    margin-top: .22rem;
    color: var(--slate-700);
    font-weight: 760;
}

.ranking-entity em {
    margin-left: .42rem;
    padding: .1rem .34rem;
    border-radius: 6px;
    background: #eff6ff;
    color: var(--primary-700);
    font-size: .72rem;
    font-style: normal;
}

.ranking-related span {
    max-width: 280px;
    overflow: hidden;
    color: var(--slate-900);
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-sales {
    background: #f1f2ff;
    color: var(--primary-700);
    font-weight: 900;
}

.price-distribution-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.3rem;
    padding: 1.25rem 1.4rem;
    border-radius: 16px;
}

.price-bars-panel {
    min-width: 0;
}

.price-bars-title {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) 92px;
    gap: .6rem;
    margin-bottom: .65rem;
    color: var(--slate-800);
    font-size: .88rem;
    font-weight: 900;
}

.price-bars-title strong {
    grid-column: 2 / 4;
    text-align: center;
}

.price-bar-row {
    width: 100%;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) 92px;
    align-items: center;
    gap: .6rem;
    min-height: 39px;
    border: 0;
    background: transparent;
    color: #9aa5b8;
    font-size: .78rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.price-bar-row:hover {
    background: #f8faff;
}

.price-bar-row i {
    height: 16px;
    display: block;
    overflow: hidden;
    border-radius: 4px;
    background: #f1f5f9;
}

.price-bar-row b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #6f6cf6;
}

.price-bar-row strong {
    color: #9aa5b8;
    font-weight: 850;
    text-align: right;
}

.shop-dashboard {
    display: grid;
    gap: 1.05rem;
}

.shop-dashboard-section {
    padding: 0;
}

.shop-dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .62rem;
    flex-wrap: wrap;
}

.shop-date-control {
    justify-content: flex-end;
}

.shop-category-filter {
    position: relative;
    z-index: 30;
}

.shop-category-toggle {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .36rem .68rem;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #fff;
    color: var(--slate-600);
    font-size: .8rem;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 7px 18px rgba(15,23,42,.04);
}

.shop-category-toggle strong {
    max-width: 170px;
    overflow: hidden;
    color: var(--slate-900);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-category-toggle i {
    color: var(--slate-400);
    font-size: .7rem;
}

.shop-category-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 248px;
    display: none;
    padding: .44rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15,23,42,.16);
}

.shop-category-menu.open {
    display: block;
}

.shop-category-group {
    position: relative;
}

.shop-category-group::before {
    content: '';
    position: absolute;
    top: -.44rem;
    right: 100%;
    bottom: -.44rem;
    width: 14px;
    display: none;
}

.shop-category-group:hover::before,
.shop-category-group:focus-within::before {
    display: block;
}

.shop-category-group > button,
.shop-category-submenu button {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    padding: .42rem .55rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--slate-700);
    font-size: .78rem;
    font-weight: 820;
    text-align: left;
    cursor: pointer;
}

.shop-category-group > button:hover,
.shop-category-submenu button:hover,
.shop-category-group > button.active,
.shop-category-submenu button.active {
    background: #eff6ff;
    color: var(--primary-700);
}

.shop-category-submenu {
    position: absolute;
    top: -.44rem;
    right: calc(100% + 6px);
    z-index: 2;
    width: 210px;
    display: none;
    padding: .44rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15,23,42,.14);
}

.shop-category-group:hover .shop-category-submenu,
.shop-category-group:focus-within .shop-category-submenu {
    display: block;
}

.shop-metric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: .82rem;
}

.shop-metric-card {
    min-height: 112px;
}

.shop-concentration-card,
.shop-ranking-card {
    padding: 1rem 1.1rem;
    border-radius: 16px;
}

.shop-concentration-card {
    overflow-x: auto;
}

.shop-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .78rem;
}

.shop-chart-head h4 {
    margin: 0;
    color: var(--slate-900);
    font-size: .96rem;
    font-weight: 900;
}

.shop-type-tabs {
    margin-bottom: 0;
}

.shop-concentration-svg {
    width: 100%;
    min-width: 980px;
    height: 360px;
}

.shop-chart-bar {
    fill: #74b9fb;
}

.shop-chart-line {
    fill: none;
    stroke: #7266f6;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.shop-chart-dot {
    fill: #7266f6;
    stroke: #fff;
    stroke-width: 2;
}

.shop-ranking-table th:nth-child(1),
.shop-ranking-table td:nth-child(1) {
    width: 74px;
    text-align: center;
}

.shop-ranking-table th:nth-child(2),
.shop-ranking-table td:nth-child(2) {
    min-width: 320px;
}

.product-search-page {
    display: grid;
    gap: .9rem;
}

.product-search-panel,
.product-search-results {
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
}

.product-search-panel {
    padding: .78rem .9rem .65rem;
}

.product-search-mainbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.image-search-btn,
.product-search-submit,
.product-filter-collapse,
.product-filter-btn,
.apply-range-btn,
.product-search-pagination button,
.product-row-actions button {
    min-height: 34px;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #fff;
    color: var(--slate-700);
    font-size: .8rem;
    font-weight: 850;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.image-search-btn,
.product-search-submit,
.product-filter-collapse,
.apply-range-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    padding: .42rem .72rem;
    white-space: nowrap;
}

.product-search-box .image-search-btn {
    min-height: 22px;
    height: 22px;
    gap: .25rem;
    padding: 0 .48rem;
    border: 0;
    border-radius: 7px;
    background: linear-gradient(90deg, #6e60ed 0%, #ba90f2 100%);
    color: #fff;
    font-size: .68rem;
    font-weight: 900;
}

.product-search-box .image-search-btn:hover,
.product-search-box .image-search-btn.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(90deg, #6557df 0%, #ad7fe7 100%);
}

.image-search-btn:hover,
.product-filter-collapse:hover,
.product-filter-btn:hover,
.product-row-actions button:hover,
.product-search-pagination button:hover:not(:disabled) {
    color: var(--primary-700);
    border-color: #bfdbfe;
    background: #eff6ff;
}

.image-search-btn.active {
    color: #047857;
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.product-search-submit,
.apply-range-btn {
    border-color: var(--primary-600);
    background: var(--primary-600);
    color: #fff;
}

.product-search-box {
    min-height: 36px;
    width: min(100%, 460px);
    display: flex;
    align-items: center;
    flex: 1 1 360px;
    gap: .42rem;
    padding: 0 .28rem 0 .34rem;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

.product-search-box i {
    color: var(--slate-400);
}

.product-search-box input {
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--slate-900);
    font-size: .86rem;
    font-weight: 760;
}

.product-search-icon-btn {
    width: 24px;
    height: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    border: 0;
    border-radius: 7px;
    background: #f1f5f9;
    color: var(--slate-500);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.product-search-icon-btn:hover {
    color: var(--primary-700);
    background: #e2e8f0;
}

.product-table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem;
}

.column-config-wrap,
.product-filter-menu {
    position: relative;
}

.column-config-popover,
.product-filter-popover {
    position: absolute;
    z-index: 50;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    display: none;
    padding: .42rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15,23,42,.16);
}

.product-filter-menu.open .product-filter-popover,
.column-config-wrap.open .column-config-popover {
    display: grid;
}

.product-filter-menu .product-filter-popover {
    right: auto;
    left: 0;
}

.product-filter-popover button {
    width: 100%;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .46rem;
    padding: .38rem .54rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--slate-700);
    font-size: .78rem;
    font-weight: 820;
    text-align: left;
    cursor: pointer;
}

.product-filter-popover button i {
    width: 14px;
    color: var(--primary-600);
    font-size: .68rem;
}

.product-filter-popover button:hover,
.product-filter-popover button.active {
    color: var(--primary-700);
    background: #eff6ff;
}

.column-config-popover {
    min-width: 178px;
    gap: .18rem;
}

.column-config-popover label {
    min-height: 30px;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .28rem .4rem;
    color: var(--slate-700);
    font-size: .78rem;
    font-weight: 800;
}

.product-filter-block {
    display: grid;
    gap: .52rem;
    margin-top: .68rem;
}

.product-filter-line {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.product-filter-line-label {
    flex: 0 0 auto;
    padding-top: .5rem;
    color: var(--slate-500);
    font-size: .74rem;
    font-weight: 850;
    white-space: nowrap;
}

.product-filter-row {
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: .5rem .75rem;
}

.product-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .36rem;
    min-height: 32px;
    height: 32px;
    padding: .34rem .62rem;
    font-size: .76rem;
    white-space: nowrap;
}

.product-filter-btn .product-filter-name {
    color: var(--slate-500);
}

.product-filter-btn .product-filter-name.active {
    color: var(--primary-600);
}

.product-filter-btn strong {
    max-width: 150px;
    overflow: hidden;
    color: var(--slate-900);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-filter-btn.active {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: var(--primary-700);
}

.product-advanced-filters {
    display: none;
    margin-top: .08rem;
    padding-top: .52rem;
    border-top: 1px dashed #e2e8f0;
}

.product-advanced-filters.open {
    display: flex;
}

.product-filter-toggle-inline {
    min-height: 32px;
    height: 32px;
    padding: .3rem .2rem;
    border-color: transparent;
    background: transparent;
    color: var(--slate-500);
    font-size: .76rem;
}

.product-filter-toggle-inline:hover {
    border-color: transparent;
    background: transparent;
    color: var(--primary-700);
}

.product-category-popover {
    right: auto;
    left: 0;
    width: min(560px, calc(100vw - 48px));
    grid-template-columns: 190px minmax(210px, 1fr);
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.product-category-column {
    max-height: 370px;
    overflow: auto;
    padding: .42rem;
}

.product-category-column:first-child {
    border-right: 1px solid #edf1f7;
    background: #fbfdff;
}

.product-category-main,
.product-category-child {
    justify-content: space-between;
}

.product-category-main.focused {
    color: var(--primary-700);
    background: #f1f5ff;
}

.product-category-panel {
    display: none;
}

.product-category-panel.active {
    display: grid;
    gap: .12rem;
}

.product-check-popover {
    min-width: 220px;
    gap: .12rem;
}

.product-check-option {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: .48rem;
    padding: .36rem .48rem;
    border-radius: 8px;
    color: var(--slate-700);
    font-size: .78rem;
    font-weight: 830;
    cursor: pointer;
}

.product-check-option:hover {
    background: #f8fafc;
}

.product-check-option input {
    width: 14px;
    height: 14px;
    accent-color: var(--primary-600);
}

.product-check-option span {
    flex: 1;
}

.product-check-option i {
    color: var(--slate-400);
    font-size: .72rem;
}

.product-range-popover {
    width: 286px;
    gap: .46rem;
    padding: .52rem;
}

.product-range-preset-list {
    display: grid;
    gap: .12rem;
    max-height: 258px;
    overflow: auto;
}

.product-range-preset {
    justify-content: space-between;
}

.product-range-custom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: .36rem;
    padding-top: .44rem;
    border-top: 1px solid #edf1f7;
    color: var(--slate-400);
    font-size: .74rem;
    font-weight: 850;
}

.product-range-custom input {
    width: 100%;
    min-width: 0;
    height: 32px;
    padding: .3rem .42rem;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    outline: 0;
    color: var(--slate-800);
    font-size: .78rem;
    font-weight: 760;
}

.product-range-footer {
    display: flex;
    justify-content: flex-end;
    gap: .38rem;
}

.product-range-footer button {
    width: auto;
    min-width: 58px;
    justify-content: center;
    padding: .34rem .58rem;
}

.product-range-apply {
    background: var(--primary-600) !important;
    color: #fff !important;
}

.product-selected-row {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    margin-top: .58rem;
    padding-top: .52rem;
    border-top: 1px solid #edf1f7;
    color: var(--slate-500);
    font-size: .78rem;
    font-weight: 850;
}

.product-selected-row em {
    color: var(--slate-400);
    font-style: normal;
}

.selected-chip,
.clear-all-chip {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .24rem .48rem;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--primary-700);
    font-size: .74rem;
    font-weight: 850;
    cursor: pointer;
}

.clear-all-chip {
    border-color: transparent;
    background: transparent;
    color: var(--slate-500);
}

.product-search-results {
    padding: 0;
    overflow: hidden;
}

.product-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .78rem .9rem;
    border-bottom: 1px solid var(--slate-200);
}

.product-result-head h3 {
    margin: 0;
    color: var(--slate-900);
    font-size: 1rem;
    font-weight: 900;
}

.product-result-head p,
.product-sort-hint {
    margin: .18rem 0 0;
    color: var(--slate-500);
    font-size: .78rem;
    font-weight: 800;
}

.product-search-table-wrap {
    overflow: auto;
}

.product-search-table {
    width: 100%;
    min-width: 1600px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

.product-search-table th,
.product-search-table td {
    padding: .78rem .82rem;
    border-bottom: 1px solid #edf1f7;
    color: var(--slate-700);
    font-size: .8rem;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-search-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8faff;
    color: var(--slate-500);
    font-size: .76rem;
    font-weight: 900;
}

.product-search-table thead {
    pointer-events: none;
}

.product-search-table thead button,
.product-search-table thead input,
.product-search-table thead select {
    pointer-events: auto;
}

.product-search-table th button {
    width: 100%;
    min-height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: .18rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
}

.product-search-table th.active-sort-col {
    background: #f1f5ff;
    color: #4f46e5;
    box-shadow: inset 0 -1px 0 rgba(79, 70, 229, .16);
}

.product-search-table tbody td {
    background: #fff;
    transition: background .14s ease, color .14s ease;
}

.product-search-table tbody tr:hover td {
    background: #f8fbff;
}

.product-search-table tbody tr:hover td.active-metric-cell {
    background: #edf4ff;
}

.product-search-table th.col-product,
.product-search-table td.col-product {
    width: 354px;
}

.product-search-table th.col-shop,
.product-search-table td.col-shop {
    width: 236px;
}

.product-search-table th.col-topVideos,
.product-search-table td.col-topVideos {
    width: 150px;
}

.product-search-table th.col-trend,
.product-search-table td.col-trend {
    width: 126px;
}

.product-search-table th.col-sold7d,
.product-search-table td.col-sold7d,
.product-search-table th.col-sold30d,
.product-search-table td.col-sold30d,
.product-search-table th.col-creatorCount,
.product-search-table td.col-creatorCount {
    width: 116px;
}

.product-search-table th.col-gmv7d,
.product-search-table td.col-gmv7d,
.product-search-table th.col-gmv30d,
.product-search-table td.col-gmv30d {
    width: 130px;
}

.product-search-table th.col-creatorOrderRate,
.product-search-table td.col-creatorOrderRate {
    width: 122px;
}

.product-search-table th.col-actions,
.product-search-table td.col-actions {
    width: 88px;
    text-align: center;
}

.shop-search-box {
    width: min(100%, 520px);
}

.shop-search-table {
    min-width: 1380px;
}

.shop-search-table th.col-shopInfo,
.shop-search-table td.col-shopInfo {
    width: 320px;
}

.shop-search-table th.col-trend,
.shop-search-table td.col-trend {
    width: 130px;
}

.shop-search-table th.col-sold7d,
.shop-search-table td.col-sold7d,
.shop-search-table th.col-totalSold,
.shop-search-table td.col-totalSold,
.shop-search-table th.col-productCount,
.shop-search-table td.col-productCount,
.shop-search-table th.col-creatorCount,
.shop-search-table td.col-creatorCount {
    width: 132px;
}

.shop-search-table th.col-gmv7d,
.shop-search-table td.col-gmv7d,
.shop-search-table th.col-totalGmv,
.shop-search-table td.col-totalGmv {
    width: 152px;
}

.shop-search-table th.col-actions,
.shop-search-table td.col-actions {
    width: 96px;
    padding-left: .45rem;
    padding-right: .45rem;
    text-align: center;
    overflow: visible;
}

.product-search-product-cell {
    min-width: 0;
}

.product-result,
.product-shop-cell {
    display: flex;
    align-items: flex-start;
    gap: .68rem;
    min-width: 0;
}

.product-result > div,
.product-shop-cell > div {
    min-width: 0;
}

.product-result img {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
    background: #eef2f7;
}

.product-result strong,
.product-shop-cell strong {
    display: block;
    max-width: 260px;
    overflow: hidden;
    color: var(--slate-900);
    line-height: 1.32;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-result span,
.product-shop-cell span {
    display: block;
    margin-top: .22rem;
    color: var(--slate-500);
    font-size: .75rem;
    font-weight: 760;
}

.product-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .22rem;
    margin-top: .32rem;
}

.product-result-tags em {
    padding: .1rem .32rem;
    border-radius: 6px;
    background: #f1f5f9;
    color: var(--slate-600);
    font-size: .68rem;
    font-style: normal;
    font-weight: 850;
}

.shop-logo {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
    color: var(--primary-700);
    font-weight: 900;
}

.shop-search-shop-cell {
    display: flex;
    align-items: flex-start;
    gap: .62rem;
    min-width: 0;
}

.shop-search-avatar {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    overflow: visible;
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
}

.shop-search-avatar img,
.shop-search-avatar span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    color: var(--primary-700);
    font-size: .72rem;
    font-weight: 920;
    object-fit: cover;
}

.shop-search-avatar em {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #7c3aed;
    color: #fff;
    font-size: .58rem;
    font-style: normal;
    font-weight: 900;
}

.shop-search-shop-meta {
    min-width: 0;
}

.shop-search-shop-meta strong {
    display: block;
    max-width: 230px;
    overflow: hidden;
    color: var(--slate-900);
    line-height: 1.28;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-search-shop-meta > span {
    display: block;
    max-width: 238px;
    margin-top: .18rem;
    overflow: hidden;
    color: var(--slate-500);
    font-size: .72rem;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-search-tags {
    display: flex;
    align-items: center;
    gap: .22rem;
    margin-top: .34rem;
    min-width: 0;
}

.shop-search-tags b,
.shop-search-tags i,
.shop-search-tags em {
    max-width: 112px;
    overflow: hidden;
    padding: .1rem .34rem;
    border-radius: 999px;
    font-size: .66rem;
    font-style: normal;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-search-tags b {
    background: #eff6ff;
    color: #2563eb;
}

.shop-search-tags i {
    background: #fffbeb;
    color: #d97706;
}

.shop-search-tags em {
    background: #f1f5f9;
    color: var(--slate-600);
}

.product-video-stack {
    display: flex;
    align-items: center;
    gap: .24rem;
}

.product-video-thumb {
    position: relative;
    width: 42px;
    height: 54px;
    overflow: hidden;
    border: 0;
    border-radius: 7px;
    background: #e2e8f0;
    cursor: pointer;
}

.product-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-video-thumb i {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: .68rem;
    background: rgba(15,23,42,.22);
}

.product-video-thumb.playing {
    outline: 2px solid var(--primary-600);
}

.active-metric-cell {
    background: #f4f7ff !important;
    color: #4f46e5 !important;
    font-weight: 900;
}

.product-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    width: 100%;
    min-width: 72px;
}

.product-row-actions button {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.product-row-actions button.active {
    color: #f59e0b;
    border-color: #fde68a;
    background: #fffbeb;
}

.product-empty-cell {
    height: 120px;
    color: var(--slate-400) !important;
    text-align: center !important;
}

.product-search-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .42rem;
    flex-wrap: wrap;
    padding: .72rem .9rem;
    color: var(--slate-500);
    font-size: .78rem;
    font-weight: 800;
}

.product-search-pagination select,
.product-search-pagination input {
    height: 30px;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #fff;
    color: var(--slate-700);
    font-weight: 800;
}

.product-search-pagination button {
    min-width: 30px;
    min-height: 30px;
    padding: .28rem .48rem;
}

.product-search-pagination button.active {
    border-color: var(--primary-600);
    background: var(--primary-600);
    color: #fff;
}

.product-search-pagination button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.product-rank-toolbar-panel {
    display: grid;
    gap: .72rem;
}

.product-rank-topline,
.product-rank-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.product-rank-title-block {
    min-width: 0;
}

.product-rank-title-block h3 {
    margin: 0;
    color: var(--slate-900);
    font-size: 1.02rem;
    font-weight: 920;
}

.product-rank-title-block p {
    margin: .18rem 0 0;
    color: var(--slate-500);
    font-size: .78rem;
    font-weight: 780;
}

.product-rank-date-tools {
    flex: 0 0 auto;
}

.product-rank-filter-row {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.product-rank-actions {
    margin-left: auto;
}

.product-rank-selected-row {
    margin-top: 0;
}

.static-chip {
    cursor: default;
}

.product-rank-results .product-result-head {
    background: #fff;
}

.product-rank-table {
    width: 100%;
    min-width: 1540px;
}

.product-rank-table th,
.product-rank-table td {
    padding-top: .74rem;
    padding-bottom: .74rem;
}

.product-rank-table th.col-rank,
.product-rank-table td.col-rank {
    width: 5%;
    text-align: center;
}

.product-rank-table th.col-product,
.product-rank-table td.col-product {
    width: 25.5%;
}

.product-rank-table th.col-shop,
.product-rank-table td.col-shop {
    width: 15.5%;
}

.product-rank-table th.col-dailySold,
.product-rank-table td.col-dailySold,
.product-rank-table th.col-totalSold,
.product-rank-table td.col-totalSold {
    width: 7%;
}

.product-rank-table th.col-dailySoldDelta,
.product-rank-table td.col-dailySoldDelta {
    width: 8%;
}

.product-rank-table th.col-dailyGmv,
.product-rank-table td.col-dailyGmv,
.product-rank-table th.col-totalGmv,
.product-rank-table td.col-totalGmv {
    width: 7.5%;
}

.product-rank-table th.col-dailyGmvDelta,
.product-rank-table td.col-dailyGmvDelta {
    width: 8.5%;
}

.product-rank-table th.col-actions,
.product-rank-table td.col-actions {
    width: 8%;
    min-width: 124px;
    padding-left: .5rem;
    padding-right: .5rem;
    text-align: center;
    overflow: visible;
}

.product-hot-rank-table th.col-rank,
.product-hot-rank-table td.col-rank {
    width: 5%;
}

.product-hot-rank-table th.col-product,
.product-hot-rank-table td.col-product {
    width: 24%;
}

.product-hot-rank-table th.col-shop,
.product-hot-rank-table td.col-shop {
    width: 13.5%;
}

.product-hot-rank-table th.col-dailyCreators,
.product-hot-rank-table td.col-dailyCreators {
    width: 9%;
}

.product-hot-rank-table th.col-dailyVideoViews,
.product-hot-rank-table td.col-dailyVideoViews {
    width: 9.5%;
}

.product-hot-rank-table th.col-dailyLiveCount,
.product-hot-rank-table td.col-dailyLiveCount {
    width: 8%;
}

.product-hot-rank-table th.col-dailyLiveViews,
.product-hot-rank-table td.col-dailyLiveViews {
    width: 9.5%;
}

.product-hot-rank-table th.col-dailyGmv,
.product-hot-rank-table td.col-dailyGmv {
    width: 7%;
}

.product-hot-rank-table th.col-dailySold,
.product-hot-rank-table td.col-dailySold {
    width: 6%;
}

.product-hot-rank-table th.col-actions,
.product-hot-rank-table td.col-actions {
    width: 8.5%;
    min-width: 132px;
}

.shop-rank-table {
    min-width: 1500px;
}

.shop-rank-table th.col-rank,
.shop-rank-table td.col-rank {
    width: 5%;
    text-align: center;
}

.shop-rank-table th.col-shopInfo,
.shop-rank-table td.col-shopInfo {
    width: 27%;
}

.shop-rank-table th.col-productCount,
.shop-rank-table td.col-productCount {
    width: 9%;
}

.shop-sales-rank-table th.col-dailySold,
.shop-sales-rank-table td.col-dailySold,
.shop-sales-rank-table th.col-totalSold,
.shop-sales-rank-table td.col-totalSold {
    width: 8%;
}

.shop-sales-rank-table th.col-dailySoldDelta,
.shop-sales-rank-table td.col-dailySoldDelta,
.shop-sales-rank-table th.col-dailyGmvDelta,
.shop-sales-rank-table td.col-dailyGmvDelta {
    width: 8.5%;
}

.shop-sales-rank-table th.col-dailyGmv,
.shop-sales-rank-table td.col-dailyGmv,
.shop-sales-rank-table th.col-totalGmv,
.shop-sales-rank-table td.col-totalGmv {
    width: 9%;
}

.shop-hot-rank-table th.col-dailyCreators,
.shop-hot-rank-table td.col-dailyCreators,
.shop-hot-rank-table th.col-totalCreators,
.shop-hot-rank-table td.col-totalCreators,
.shop-hot-rank-table th.col-totalVideos,
.shop-hot-rank-table td.col-totalVideos {
    width: 10%;
}

.shop-hot-rank-table th.col-totalProductCreators,
.shop-hot-rank-table td.col-totalProductCreators,
.shop-hot-rank-table th.col-totalVideoCreators,
.shop-hot-rank-table td.col-totalVideoCreators {
    width: 11%;
}

.shop-rank-table th.col-actions,
.shop-rank-table td.col-actions {
    width: 8%;
    min-width: 132px;
    padding-left: .5rem;
    padding-right: .5rem;
    text-align: center;
    overflow: visible;
}

.product-new-rank-table th.col-product,
.product-new-rank-table td.col-product {
    width: 29%;
}

.product-new-rank-table th.col-shop,
.product-new-rank-table td.col-shop {
    width: 16%;
}

.product-new-rank-table th.col-trend,
.product-new-rank-table td.col-trend {
    width: 11%;
}

.product-new-rank-table th.col-newSold3d,
.product-new-rank-table td.col-newSold3d,
.product-new-rank-table th.col-newTotalSold,
.product-new-rank-table td.col-newTotalSold {
    width: 10%;
}

.product-new-rank-table th.col-newGmv3d,
.product-new-rank-table td.col-newGmv3d,
.product-new-rank-table th.col-newTotalGmv,
.product-new-rank-table td.col-newTotalGmv {
    width: 10.5%;
}

.product-new-rank-table th.col-actions,
.product-new-rank-table td.col-actions {
    width: 8%;
    min-width: 132px;
}

.product-rank-medal,
.product-rank-number {
    min-width: 34px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .22rem;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 920;
}

.product-rank-number {
    background: #f8fafc;
    color: var(--slate-500);
}

.product-rank-medal.gold {
    background: linear-gradient(135deg, #fff7cc, #f59e0b);
    color: #7c2d12;
}

.product-rank-medal.silver {
    background: linear-gradient(135deg, #f8fafc, #cbd5e1);
    color: #334155;
}

.product-rank-medal.bronze {
    background: linear-gradient(135deg, #ffedd5, #c2410c);
    color: #fff7ed;
}

.product-rank-medal i {
    font-size: .72rem;
}

.product-rank-product img {
    width: 60px;
    height: 60px;
}

.product-rank-shop .shop-logo {
    width: 36px;
    height: 36px;
}

.rank-delta-up,
.rank-delta-down {
    display: inline-flex;
    align-items: center;
    min-width: 62px;
    padding: .18rem .38rem;
    border-radius: 7px;
    font-weight: 900;
}

.rank-delta-up {
    background: #fef2f2;
    color: #dc2626;
}

.rank-delta-down {
    background: #ecfdf5;
    color: #059669;
}

.product-rank-table .active-metric-cell {
    background: #f4f7ff !important;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .04);
}

.product-search-table tbody tr:hover td.active-metric-cell,
.product-rank-table tbody tr:hover td.active-metric-cell {
    background: #edf4ff !important;
}

@media (max-width: 980px) {
    .product-rank-topline,
    .product-rank-filter-row {
        align-items: stretch;
        flex-direction: column;
    }

    .product-rank-actions,
    .product-rank-date-tools {
        width: 100%;
        margin-left: 0;
    }
}

.jump-page {
    display: inline-flex;
    align-items: center;
    gap: .24rem;
}

.jump-page input {
    width: 62px;
    padding: 0 .38rem;
}

.pagination-bar {
    justify-content: flex-end;
    margin-top: .75rem;
    color: var(--slate-500);
    font-size: .78rem;
    font-weight: 800;
}

.placeholder-panel {
    min-height: 460px;
    display: grid;
    place-items: center;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #fff;
    text-align: center;
    padding: 2rem;
}

.placeholder-panel i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: .8rem;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--primary-700);
    font-size: 1.35rem;
}

.placeholder-panel h3 {
    margin: 0 0 .4rem;
    color: var(--slate-900);
}

.placeholder-panel p {
    max-width: 540px;
    margin: 0;
    color: var(--slate-500);
}

@media (max-width: 1180px) {
    .advisor-shell {
        grid-template-columns: 58px 230px minmax(0, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .heatmap-mosaic {
        min-width: 1120px;
    }
}

@media (max-width: 820px) {
    body.advisor-page {
        overflow: auto;
    }

    .advisor-shell {
        display: block;
        height: auto;
        min-height: 100vh;
    }

    .advisor-rail {
        position: sticky;
        top: 0;
        z-index: 40;
        flex-direction: row;
        justify-content: center;
        height: 58px;
        padding: .5rem;
    }

    .advisor-sidebar {
        position: static;
    }

    .advisor-main {
        height: auto;
        min-height: 60vh;
    }

    .advisor-topbar,
    .board-head,
    .control-row,
    .table-tools,
    .heatmap-section-head,
    .heatmap-sortbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .heatmap-card {
        padding: .82rem;
        border-radius: 12px;
        overflow-x: auto;
    }

    .heatmap-toolbar {
        grid-template-columns: 1fr 38px;
    }

    .heatmap-color-control {
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: space-between;
    }

    .heatmap-search {
        width: 100%;
    }

    .heatmap-date-control {
        justify-content: flex-start;
    }

    .date-picker-popover {
        right: auto;
        left: 0;
    }

    .heatmap-mosaic {
        min-width: 1080px;
        height: auto;
        min-height: 560px;
    }

    .heat-group-tiles {
        min-height: 0;
    }

    .heatmap-tooltip {
        min-width: min(92vw, 420px);
        grid-template-columns: 1fr 1fr;
        gap: .72rem;
    }

    .heatmap-tooltip strong {
        grid-column: 1 / -1;
    }

    .search-control input {
        width: 170px;
    }
}

@media (max-width: 560px) {
    .heatmap-mosaic {
        min-width: 980px;
        height: auto;
        min-height: 600px;
    }

    .heat-group-tiles {
        min-height: 0;
    }
}
