/* ── Ukuran kolom (sesuaikan di sini) ── */
.wrapper {
    --acq-dimension-width: 140px;
    /* kolom dimensi (Session source, channel, dll.) */
    --acq-metric-width: 92px;
    /* kolom metrik biasa (Engaged, Orders, dll.) */
    --acq-metric-wide-width: 104px;
    /* Avg time, Engaged / user */
    --acq-metric-bar-width: 128px;
    /* Sessions (dengan bar) */
    --acq-bar-track-width: 64px;
    /* lebar bar biru di Sessions */
    --acq-cell-padding-x: 10px;
    --acq-cell-padding-y: 8px;
    --acq-header-font-size: 12px;
    --acq-value-font-size: 13px;

    border: 1px solid #e8eaed;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    position: relative;
}

.wrapperLanding {
    --acq-dimension-width: 200px;
}

.wrapperLandingCompact {
    --acq-dimension-width: 180px;
    --acq-metric-width: 72px;
    --acq-metric-wide-width: 132px;
    --acq-metric-bar-width: 112px;
    --acq-bar-track-width: 72px;
    --acq-cell-padding-x: 6px;
    --acq-cell-padding-y: 4px;
    --acq-header-font-size: 11px;
    --acq-value-font-size: 11px;
}

.wrapperLandingCompact .toolbar {
    padding: 8px 10px;
    gap: 8px;
}

.wrapperLandingCompact .select,
.wrapperLandingCompact .search {
    height: 28px;
    font-size: 12px;
}

.loadingPanel {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    color: #5f6368;
    font-size: 13px;
}

:global(.dark) .loadingPanel {
    color: #94a3b8;
}

.wrapperCompare {
    --acq-metric-width: 110px;
    --acq-metric-wide-width: 124px;
    --acq-metric-bar-width: 148px;
}

:global(.dark) .wrapper {
    border-color: #334155;
    background: #0e1726;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #e8eaed;
    background: #fafafa;
}

:global(.dark) .toolbar {
    border-bottom-color: #334155;
    background: #1a2332;
}

.toolbarLeft,
.toolbarRight {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.fieldLabel {
    font-size: 12px;
    color: #5f6368;
    white-space: nowrap;
}

:global(.dark) .fieldLabel {
    color: #94a3b8;
}

.select,
.search {
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: #fff;
    color: #202124;
}

:global(.dark) .select,
:global(.dark) .search {
    border-color: #475569;
    background: #0e1726;
    color: #e2e8f0;
}

.search {
    min-width: 200px;
}

.iconBtn {
    font-size: 13px;
    color: #1a73e8;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.iconBtn:hover {
    background: #f8f9fa;
}

.iconBtnExpandOpen {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotate(90deg);
}

.iconBtnExpandClosed {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotate(0deg);
}

:global(.dark) .iconBtn {
    border-color: #475569;
    background: #0e1726;
    color: #60a5fa;
}

.columnsPanel {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    min-width: 220px;
    padding: 12px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 16px rgb(0 0 0 / 12%);
}

:global(.dark) .columnsPanel {
    border-color: #334155;
    background: #1a2332;
}

.columnsPanelTitle {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #5f6368;
}

.tableScroll {
    overflow: auto;
    max-height: 520px;
}

.table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    table-layout: auto;
}

.thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8f9fa;
}

:global(.dark) .thead {
    background: #1e293b;
}

.th {
    padding: var(--acq-cell-padding-y) var(--acq-cell-padding-x);
    font-size: var(--acq-header-font-size);
    font-weight: 500;
    color: #5f6368;
    border-bottom: 1px solid #e8eaed;
    white-space: nowrap;
    user-select: none;
    cursor: pointer;
}

.thDimension {
    text-align: left;
    width: var(--acq-dimension-width);
    min-width: var(--acq-dimension-width);
    max-width: var(--acq-dimension-width);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thAttr {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

.thFrozen {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #f8f9fa;
    box-shadow: 2px 0 6px -2px rgb(0 0 0 / 10%);
}

:global(.dark) .thFrozen {
    background: #1e293b;
    box-shadow: 2px 0 6px -2px rgb(0 0 0 / 35%);
}

.thMetric {
    text-align: right;
    width: var(--acq-metric-width);
    max-width: var(--acq-metric-width);
    white-space: normal;
    line-height: 1.25;
    vertical-align: bottom;
}

.thMetricBar {
    width: var(--acq-metric-bar-width);
    max-width: var(--acq-metric-bar-width);
}

.thMetricWide {
    width: var(--acq-metric-wide-width);
    max-width: var(--acq-metric-wide-width);
}

:global(.dark) .th {
    color: #94a3b8;
    border-bottom-color: #334155;
}

.sortIcon {
    margin-left: 4px;
    color: #1a73e8;
    font-size: 11px;
}

.tr {
    border-bottom: 1px solid #f1f3f4;
}

.trDetail {
    background: #f8f9fa;
}

:global(.dark) .trDetail {
    background: #162033;
}

.trDetail .td {
    padding: 0;
    vertical-align: top;
}

.detailReveal {
    display: grid;
    min-height: 0;
    transition: grid-template-rows 280ms cubic-bezier(0.4, 0, 0.2, 1), opacity 220ms ease;
}

.detailRevealOpen {
    grid-template-rows: 1fr;
    opacity: 1;
}

.detailRevealClosed {
    grid-template-rows: 0fr;
    opacity: 0;
}

.detailRevealInner {
    overflow: hidden;
    min-height: 0;
    padding: var(--acq-cell-padding-y) var(--acq-cell-padding-x);
}

.trDetail .tdFrozen {
    background: #f8f9fa;
}

:global(.dark) .trDetail .tdFrozen {
    background: #162033;
}

.trClickable {
    cursor: pointer;
}

.trClickable:hover {
    background: #f8f9fa;
}

.trSelected {
    background: #e8f0fe !important;
}

:global(.dark) .trSelected {
    background: #1e3a5f !important;
}

.filterBanner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-bottom: 1px solid #e8eaed;
    background: #e8f0fe;
    font-size: 12px;
    color: #1a73e8;
}

:global(.dark) .filterBanner {
    border-bottom-color: #334155;
    background: #1e3a5f;
    color: #93c5fd;
}

.filterChip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #c6dafc;
    color: #1a73e8;
}

:global(.dark) .filterChip {
    background: #0e1726;
    border-color: #334155;
    color: #93c5fd;
}

.filterChipRemove {
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

.clearFilterBtn {
    margin-left: auto;
    border: none;
    background: none;
    color: #1a73e8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.crumb {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    color: #1a73e8;
    cursor: pointer;
    text-decoration: underline;
}

.crumb:hover {
    color: #174ea6;
}

.crumbCurrent {
    color: #174ea6;
    font-weight: 700;
    text-decoration: none;
    cursor: default;
    pointer-events: none;
}

.crumbSep {
    color: #5f6368;
}

:global(.dark) .crumb {
    color: #93c5fd;
}

:global(.dark) .crumbCurrent {
    color: #bfdbfe;
}

:global(.dark) .crumbSep {
    color: #94a3b8;
}

.refreshOverlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55);
}

:global(.dark) .refreshOverlay {
    background: rgba(14, 23, 38, 0.55);
}

.refreshSpinner {
    width: 28px;
    height: 28px;
    border: 3px solid #c6dafc;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: acq-spin 0.7s linear infinite;
}

@keyframes acq-spin {
    to {
        transform: rotate(360deg);
    }
}

:global(.dark) .clearFilterBtn {
    color: #93c5fd;
}

:global(.dark) .tr {
    border-bottom-color: #334155;
}

:global(.dark) .trClickable:hover {
    background: #1e293b;
}

.trTotal {
    background: #f8f9fa;
    font-weight: 600;
}

:global(.dark) .trTotal {
    background: #1e293b;
}

.td {
    padding: var(--acq-cell-padding-y) var(--acq-cell-padding-x);
    color: #202124;
    vertical-align: middle;
}

.tdDimension {
    text-align: left;
    width: var(--acq-dimension-width);
    min-width: var(--acq-dimension-width);
    max-width: var(--acq-dimension-width);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tdAttr {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

.tdFrozen {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    box-shadow: 2px 0 6px -2px rgb(0 0 0 / 8%);
    border-right: 1px solid #0c0c0c2b;
}

:global(.dark) .tdFrozen {
    background: #0e1726;
    box-shadow: 2px 0 6px -2px rgb(0 0 0 / 35%);
}

.trClickable:hover .tdFrozen {
    background: #f8f9fa;
}

:global(.dark) .trClickable:hover .tdFrozen {
    background: #1e293b;
}

.trSelected .tdFrozen {
    background: #e8f0fe !important;
}

:global(.dark) .trSelected .tdFrozen {
    background: #1e3a5f !important;
}

.trTotal .tdFrozen {
    background: #f8f9fa;
    font-weight: 600;
}

:global(.dark) .trTotal .tdFrozen {
    background: #1e293b;
}

.tdMetric {
    text-align: right;
    font-variant-numeric: tabular-nums;
    width: var(--acq-metric-width);
    max-width: var(--acq-metric-width);
}

.tdMetricBar {
    width: var(--acq-metric-bar-width);
    max-width: var(--acq-metric-bar-width);
}

.tdMetricWide {
    width: var(--acq-metric-wide-width);
    max-width: var(--acq-metric-wide-width);
}

:global(.dark) .td {
    color: #e2e8f0;
}

.dimensionLink {
    color: #020202;
    font-weight: 500;
}

:global(.dark) .dimensionLink {
    color: #60a5fa;
}

.barCell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.barTrack {
    position: relative;
    flex: 0 0 var(--acq-bar-track-width);
    height: 8px;
    border-radius: 999px;
    background: #e8f0fe;
    overflow: hidden;
}

:global(.dark) .barTrack {
    background: #1e3a5f;
}

.barFill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 999px;
    background: #1a73e8;
}

:global(.dark) .barFill {
    background: #4285f4;
}

.barValue {
    min-width: 32px;
    text-align: right;
    font-size: var(--acq-value-font-size);
}

.metricCell {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    min-width: 0;
    width: 100%;
}

.metricValue {
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    font-size: var(--acq-value-font-size);
}

.metricPct {
    font-size: 10px;
    color: #5f6368;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    white-space: nowrap;
}

.compareHint {
    display: block;
    font-size: 9px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.compareUp {
    color: #137333;
}

.compareDown {
    color: #c5221f;
}

.compareFlat {
    color: #5f6368;
}

.eventCountHeader {
    position: relative;
    display: inline-flex;
    justify-content: flex-end;
    width: 100%;
}

.eventCountHeaderBtn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.eventCountChevron {
    font-size: 10px;
    color: #5f6368;
}

.eventCountMenu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    min-width: 220px;
    max-width: 280px;
    max-height: 320px;
    overflow: auto;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgb(60 64 67 / 18%);
    padding: 8px 0;
}

:global(.dark) .eventCountMenu {
    background: #0f172a;
    border-color: #334155;
    box-shadow: 0 4px 16px rgb(0 0 0 / 35%);
}

.eventCountSearch {
    display: block;
    width: calc(100% - 24px);
    margin: 0 12px 8px;
    padding: 8px 10px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

:global(.dark) .eventCountSearch {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

.eventCountOption {
    display: block;
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    padding: 8px 16px;
    font-size: 13px;
    color: #202124;
    cursor: pointer;
}

.eventCountOption:hover,
.eventCountOptionActive {
    background: #e8f0fe;
}

:global(.dark) .eventCountOption {
    color: #e2e8f0;
}

:global(.dark) .eventCountOption:hover,
:global(.dark) .eventCountOptionActive {
    background: #1e3a5f;
}

.eventCountEmpty {
    padding: 8px 16px;
    font-size: 12px;
    color: #5f6368;
}

:global(.dark) .metricPct {
    color: #94a3b8;
}

:global(.dark) .compareUp {
    color: #81c995;
}

:global(.dark) .compareDown {
    color: #f28b82;
}

:global(.dark) .compareFlat {
    color: #94a3b8;
}

.metricCellWithBar {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 0;
    width: 100%;
}

.metricCellWithBar .barCell {
    width: 100%;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid #e8eaed;
    background: #fafafa;
    font-size: 12px;
    color: #5f6368;
}

:global(.dark) .footer {
    border-top-color: #334155;
    background: #1a2332;
    color: #94a3b8;
}

.footerBtns {
    display: flex;
    gap: 6px;
}

.pageBtn {
    height: 28px;
    padding: 0 10px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
}

.pageBtn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

:global(.dark) .pageBtn {
    border-color: #475569;
    background: #0e1726;
    color: #e2e8f0;
}

.empty {
    padding: 32px 16px;
    text-align: center;
    color: #5f6368;
}