:root {
  font-family: system-ui, "PingFang SC", sans-serif;
  color: #252935;
  background: #f5f6f8;
  font-size: 10.8px;
  --border: #dfe3e9;
  --muted: #68758a;
  --accent: #a94308;
}
* { box-sizing: border-box; }
body { margin: 0; }
.workspace-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 10.8px;
  padding: 0 clamp(10.8px, 1.8vw, 23.4px);
  background: white;
  border-bottom: 1px solid var(--border);
}
.workspace-nav nav { display: flex; overflow: auto; max-width: 100%; }
.workspace-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0 11.7px;
  min-height: 43.2px;
  display: inline-flex;
  align-items: center;
  gap: 6.3px;
  font-size: 11.7px;
  font-weight: 650;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.workspace-nav a[aria-current="page"] { color: var(--accent); border-color: #d86618; }
.workspace-nav small { font-size: 7.2px; letter-spacing: .13em; }
#sync { margin: 0 0 0 auto; color: var(--muted); font-size: 9.9px; }
main { margin: 9px clamp(10.8px, 1.8vw, 23.4px) 18px; }
section { border: 1px solid var(--border); border-radius: 7.2px; background: white; overflow: hidden; }
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5.4px 10.8px;
  padding: 7.2px 9px;
  border-bottom: 1px solid var(--border);
}
label { display: flex; align-items: center; gap: 5.4px; color: var(--muted); font-weight: 500; }
select, input {
  min-width: 0;
  min-height: 25.2px;
  padding: 2.7px 6.3px;
  border: 1px solid var(--border);
  border-radius: 4.5px;
  background: white;
  color: #252935;
  font: inherit;
}
.controls select { max-width: 131.4px; }
.search { flex: 1 1 145.8px; }
.search input { flex: 1; min-width: 90px; }
:focus-visible { outline: 2px solid #b94b04; outline-offset: 1px; }
#total { margin: 0; padding: 6.3px 9px; font-weight: 600; }
.table-wrap { overflow: auto; max-height: calc(100dvh - 169.2px); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 10.8px; line-height: 14.4px; }
th, td {
  padding: 5.4px 7.2px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid #e8ebef;
}
th:last-child, td:last-child { border-right: 0; }
th { position: sticky; top: 0; z-index: 1; white-space: nowrap; background: #fbfcfd; color: var(--muted); font-weight: 600; }
td { white-space: nowrap; }
td.title { white-space: normal; min-width: 189px; }
tbody tr:hover { background: #fff7ed; }
.value-tag { display: inline-block; padding: 1px 4.5px; border-radius: 3.6px; background: #f1e5ff; color: #7a1a9a; }
.value-tag[data-tone="1"] { background: #dcfce7; color: #166534; }
.value-tag[data-tone="2"] { background: #dceaff; color: #2451a6; }
.value-tag[data-tone="3"] { background: #fce6f0; color: #a3225c; }
.value-tag[data-tone="4"] { background: #d9f7f3; color: #166055; }
.value-tag[data-tone="5"] { background: #fff0d9; color: #955417; }
.grid-footer { display: flex; align-items: center; justify-content: space-between; gap: 7.2px; padding: 4.5px 9px; }
.grid-footer span:last-child { display: flex; gap: 3.6px; }
button { font: inherit; color: inherit; border: 1px solid var(--border); border-radius: 4.5px; background: white; padding: 3.6px 7.2px; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
th button { border: 0; padding: 1px 0; background: transparent; font-weight: inherit; }
th button:hover { color: var(--accent); }
.summary { margin-top: 10.8px; }
h2 { margin: 8.1px 9px; font-size: 11.7px; }
.access-form { max-width: 351px; margin: 12vh auto; padding: 23.4px; background: white; display: grid; gap: 16.2px; border: 1px solid var(--border); border-radius: 9px; font-size: 12.6px; }
.access-form label { display: grid; }
.access-form button { background: #b64d0d; color: white; }
@media (max-width: 585px) {
  .workspace-nav a { padding: 0 7.2px; min-height: 36px; }
  .workspace-nav small { display: none; }
  #sync { padding: 3.6px 0; }
  .controls select { max-width: 108px; }
}

/* The shared view follows the local lead grid's navigation, facets and table bands. */
:root { --surface:#fff; --text:#252935; --selection:#fdf0e0; --orange:#d85e0e; }
.workspace-nav { gap: 7.2px 12.6px; }
.workspace-nav nav { gap:clamp(10.8px,2vw,27px); }
.workspace-nav a { min-height:50.4px; padding:0 2.7px; gap:10.8px; font-size:12.6px; }
.workspace-nav small { font-size:8.1px; letter-spacing:.19em; }
.page-tools {display:flex; align-items:center; gap:7.2px; margin:0 0 9.9px;}
.search-box { flex:0 1 396px; margin-right:auto; position:relative; }
.search-box .search-icon { position:absolute; left:10.8px; font-size:19.8px; line-height:1; }
.search-box kbd { position:absolute; right:9px; padding:1px 2.7px; border:1px solid var(--border); border-radius:3.6px; pointer-events:none; }
.page-search {width:100%; min-height:30.6px; padding:4.5px 37.8px 4.5px 31.5px;}
.page-tools button, .grid-tools button, .grid-tools select, .grid-picker summary { min-height:26.1px; border-radius:5.4px; white-space:nowrap; }
.facet-panel {position:relative; padding:9px 64.8px 9px 11.7px; background:var(--surface); border:1px solid var(--border); border-radius:7.2px; margin-bottom:8.1px;}
.facet-mode { position:absolute; right:9px; top:7.2px; }
.facet-row {display:flex; align-items:baseline; gap:9px; min-height:30.6px;}
.facet-label {color:var(--muted); flex:0 0 58.5px;}
.facet-values {display:flex; align-items:center; flex-wrap:wrap; gap:2.7px 4.5px;}
.facet-choice {border-color:transparent; border-radius:5.4px; min-height:27px; padding-inline:9px;}
.facet-choice small {color:var(--muted); font-size:9px; margin-left:8.1px; font-variant-numeric:tabular-nums;}
button.selected, .facet-choice.selected {background:var(--selection); color:var(--accent);}
.facet-choice.selected small {color:var(--orange);}
.grid-tools, .grid-period, .grid-actions {display:flex; flex-wrap:wrap; align-items:center; gap:3.6px;}
.grid-tools {position:relative; padding:8.1px 10.8px; gap:7.2px 10.8px; justify-content:space-between; border-bottom:1px solid var(--border);}
.lead-grid {overflow:visible; display:flex; flex-direction:column; max-height:calc(100dvh - 150.3px);}
.grid-scroll {flex:1 1 auto; max-height:none; min-height:90px;}
.lead-grid:fullscreen {border:none; border-radius:0; max-height:none; background:var(--surface);}
.lead-grid:fullscreen .grid-scroll {height:100%; }
.grid-tools .text-button {border-color:transparent; color:var(--orange);}
.muted {color:var(--muted);}
.record-stats {color:var(--accent); border:1px solid var(--border); padding:5.4px 7.2px; border-radius:5.4px; font-weight:500;}
.grid-picker {position:relative;}
.grid-picker summary {display:flex; align-items:center; cursor:pointer; list-style:none; border:1px solid var(--border); padding:3.6px 8.1px; background:var(--surface);}
.picker-panel {position:absolute; top:calc(100% + 3.6px); left:0; z-index:12; display:grid; gap:6.3px; min-width:139.5px; padding:9px; border:1px solid var(--border); border-radius:6.3px; background:var(--surface); box-shadow:0 7.2px 18px #1a2b4020;}
.column-toggle .picker-panel {left:auto; right:0; width:202.5px; max-height:58vh; overflow:auto;}
.picker-panel input[type=checkbox] {min-height:0;}
.workbench-grid {table-layout:fixed; width:max-content; min-width:100%; outline:none;}
.workbench-grid th, .workbench-grid td {padding:6.3px 8.1px; line-height:16.2px;}
.workbench-grid th {height:36px; z-index:3; background:var(--surface); user-select:none;}
.workbench-grid td {height:29.7px; overflow:hidden; text-overflow:ellipsis; background:var(--surface);}
.workbench-grid td.wrap-cell {white-space:pre-wrap; overflow-wrap:anywhere;}
.workbench-grid .frozen {position:sticky; left:0; box-shadow:2px 0 2.7px #0000000a;}
.workbench-grid td.frozen {z-index:2;}
.workbench-grid th.frozen {z-index:4;}
.workbench-grid .sold-row td {background:#fff2cb;}
.workbench-grid tbody tr:hover td {background:#f9fafb;}
.workbench-grid .sold-row:hover td {background:#fff0bf;}
.workbench-grid td.grid-selected {background:var(--selection)!important; outline:1px solid #ed8c35; outline-offset:-1px;}
.workbench-grid .column-sort {max-width:calc(100% - 18px); overflow:hidden; text-overflow:ellipsis; vertical-align:middle;}
.workbench-grid .column-filter-button {padding:0 2.7px; margin-left:3.6px;}
.workbench-grid .column-display {margin-left:6.3px; padding:0 4.5px; border:1px solid var(--border);}
.column-resize {position:absolute; right:0; top:0; bottom:0; width:6.3px; cursor:col-resize; touch-action:none;}
.column-resize:hover {background:#f3c5a4;}
.workbench-grid a, .trace-jump { color:#3e70bb; }
.lead-identity { display:flex; align-items:center; gap:4px; }
.lead-identity > a { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.lead-window-open {
  display:grid; place-items:center; flex:0 0 19px; height:19px; padding:1px;
  border:0; background:transparent; color:var(--muted);
}
.lead-window-open svg { width:15px; height:15px; }
.lead-window-open:hover, .lead-window-open:focus-visible { color:var(--accent); background:var(--selection); }
.trace-jump {margin-left:5.4px;}
.local-field {color:var(--muted);}
.value-tag {border-radius:5.4px; padding:2px 7.2px; font-weight:550;}
.value-tag[data-tone=positive] {background:#e2eee9;color:#368362;}
.value-tag[data-tone=negative] {background:#f5e6e6;color:#be4e52;}
.value-tag[data-tone=muted] {background:#ebedef;color:#728095;}
.value-tag[data-tone=rose] {background:#f4e8ed;color:#ba557c;}
.value-tag[data-tone=blue] {background:#e7ecf7;color:#4f73b8;}
.column-filter {position:fixed; inset:auto; width:234px; max-width:calc(100vw - 14.4px); z-index:15; margin:0; border:1px solid var(--border); border-radius:7.2px; box-shadow:0 9px 22.5px #1a2b4028; padding:9.9px; color:var(--text);}
.column-filter[open] {display:grid; gap:7.2px;}
.filter-values { max-height:min(270px,35dvh); display:flex; flex-wrap:wrap; gap:2.7px; overflow:auto; align-content:start; }
.filter-values button {text-align:left; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.filter-actions {display:flex; justify-content:flex-end; gap:4.5px;}
.grid-footer {border-top:1px solid var(--border); justify-content:space-between; flex-wrap:wrap; gap:7.2px; }
.page-nav {display:flex; gap:3.6px; align-items:center; margin-left:auto;}
.page-nav input { width:45px; }
.selected-summary {white-space:nowrap;}
@media (max-width:585px) {
  .workspace-nav a {font-size:10.8px; min-height:37.8px;}
  .facet-panel {padding-left:7.2px;}
  .facet-label {flex-basis:36px;}
  .lead-grid {max-height:none;}
  .grid-scroll {max-height:65dvh;}
}

.overview-view {padding:11.7px; --accent-soft:#fff7ef; --bg:#f3f4f7; --hover:#fcf7f1;}
.xhs-overview-controls,.xhs-overview-controls fieldset,.overview-tools,.overview-filters {display:flex;align-items:center;flex-wrap:wrap;gap:6.3px;}
.xhs-overview-controls {padding-bottom:10.8px;border-bottom:1px solid var(--border);margin-bottom:10.8px;justify-content:space-between;}
.xhs-overview-controls fieldset {border:0;padding:0;margin:0;}
.overview-view button,.overview-view select {min-height:28.8px;padding:3.6px 9px;}
.overview-view button.selected {background:#da640e;color:white;border-color:#da640e;}
.overview-message {margin:0;color:var(--muted);}
.overview-message:empty {display:none;}
.overview-card {border:0;overflow:visible;}
.overview-card:fullscreen {padding:12.6px;background:var(--surface);}
.overview-card:fullscreen .review-overview-scroll {max-height:calc(100dvh - 90px);}
.overview-tools {margin-bottom:9px;}
.overview-tools strong {font-size:12.6px;margin-right:auto;}
.overview-filters {margin-bottom:7.2px;}
.overview-filters button:nth-child(2) {margin-right:6.3px;}
.overview-card [hidden] {display:none!important;}
.overview-card[data-hide-previous=true] [data-compare-period=previous],
.overview-card[data-hide-previous=true] [data-compare-period=beforePrevious],
.overview-card[data-hide-same=true] [data-compare-period=sameMonth] {display:none;}
.review-overview-scroll {overflow:auto;max-height:calc(100dvh - 189px);}
.review-overview-table table {min-width:801px;table-layout:fixed;}
.review-overview-table :is(td,th) {white-space:normal;vertical-align:top;padding:9px 7.2px;overflow-wrap:anywhere;}
.review-overview-table thead th {padding-block:9.9px;background:var(--surface);color:var(--text);}
.review-overview-table tbody th {position:static;color:var(--text);background:transparent;}
.review-overview-table col:nth-child(1) {width:12%}.review-overview-table col:nth-child(2) {width:8%}.review-overview-table col:nth-child(3) {width:11%}.review-overview-table col:nth-child(4) {width:17%}.review-overview-table col:nth-child(5) {width:14%}.review-overview-table col:nth-child(6) {width:12%}.review-overview-table col:nth-child(7) {width:26%}
.review-overview-table .review-total {background:#fef8f2;}
.review-overview-table .review-previous-row {background:#f7f7f9;color:var(--muted);}
.review-overview-table .review-previous-row th {color:var(--muted);}
.review-overview-table .review-channel-name {border-left:2.7px solid #df680e;padding-left:6.3px;font-weight:650;}
.review-overview-table .review-previous-row .review-channel-name {border-color:#e0e3e8;}
.review-overview-table .review-previous-label {display:block;color:var(--muted);margin-top:3.6px;font-size:9px;}
.review-overview-table .review-metric {display:flex;align-items:baseline;flex-wrap:wrap;gap:3.6px;margin-bottom:6.3px;}
.review-overview-table .review-metric span,.review-overview-table small {color:var(--muted);}
.review-overview-table .review-ratio {display:block;flex-basis:100%;font-size:9px;}
.review-overview-table .review-breakdown {margin-top:5.4px;font-size:9px;}
.review-overview-table .review-detail-item {display:inline-block;margin-right:3.6px;}
.review-overview-table .review-change {display:inline-block;margin-left:3.6px;font-size:9px;}
.review-overview-table .review-change.up {color:#248353;}
.review-overview-table .review-change.down,.review-overview-table .review-emphasis {color:#c8333d;}
.review-overview-table .review-change.neutral {color:var(--muted);}
.review-overview-table .review-deal-toggle {border:0;color:var(--muted);min-height:0;padding:0 2.7px;background:transparent;}
.review-overview-table .meeting-product-conversion {margin-block:4.5px;}
.review-overview-table .meeting-product-conversion small {display:block;}
.review-overview-table .review-cost-line {margin-top:7.2px;}
@media (max-width:585px) {.overview-view{padding:7.2px}.xhs-overview-controls{align-items:flex-start}}

/* Contain all scrolling inside the data panes; navigation, filters and pager stay put. */
html:has(.team-workbench), body.team-workbench {height:100%;overflow:hidden;overscroll-behavior:none;}
.team-workbench {height:100dvh;display:flex;flex-direction:column;min-width:0;}
.team-workbench > .workspace-nav {flex:0 0 auto;}
.team-workbench > main {flex:1 1 0;min-height:0;min-width:0;display:flex;flex-direction:column;margin-bottom:9px;}
#channel-content:not([hidden]) {
  display:flex;flex:1 1 0;flex-direction:column;min-height:0;min-width:0;
}
#channel-content > .page-tools,#channel-content > .facet-panel {flex:0 0 auto;}
#channel-content > .lead-grid {
  flex:1 1 0;min-height:0;max-height:none;min-width:0;
}
.lead-grid > :is(.grid-tools,.grid-footer) {flex:0 0 auto;}
.lead-grid > .grid-scroll {min-height:0;max-height:none;overscroll-behavior:contain;}
#channel-content > .overview-view {
  display:flex;flex:1 1 0;flex-direction:column;min-height:0;overflow:hidden;
}
.overview-view > :is(.xhs-overview-controls,.overview-message) {flex:0 0 auto;}
.overview-view > .overview-card:not([hidden]),.overview-view > .overview-card > div:has(.review-overview-scroll),
.overview-card .meeting-linked-overview {
  display:flex;flex:1 1 0;flex-direction:column;min-width:0;min-height:0;
}
.overview-view .review-overview-scroll {flex:1 1 0;max-height:none;min-height:0;overscroll-behavior:contain;}
.overview-view .overview-tools,.overview-view .overview-filters {flex:0 0 auto;}
@media (max-height:405px) {
  .team-workbench > main {margin-top:3.6px;margin-bottom:3.6px;}
  .team-workbench .page-tools,.team-workbench .facet-panel {margin-bottom:3.6px;}
  .team-workbench .facet-panel {max-height:90px;overflow:auto;}
}

/* Overview detail tables share the workbench row and comparison styles. */
.grid-scroll .empty-cell {color:var(--muted);}
.overview-card .meeting-xhs {--accent:#df680e;--accent-soft:#fff0e2;--bg:#f5f6f8;}
.overview-view .meeting-xhs-scroll {overflow:auto;border:1px solid var(--border);border-radius:6.3px;}
.overview-card .meeting-xhs-table {width:100%;min-width:864px!important;}
.overview-card .meeting-material-table {min-width:954px!important;}
.overview-card .meeting-product-table .account-breakdown {font-size:9px;line-height:1.55;}
.overview-card .meeting-xhs-table thead th {position:sticky;top:0;z-index:1;}
.overview-card .meeting-xhs-table tbody th small {display:block;margin-top:4.5px;line-height:1.6;}
.overview-card .meeting-xhs-table tbody th a {color:#a94308;}
.overview-card .meeting-xhs-table .meeting-material-cover {cursor:default;}
.overview-card .meeting-xhs-filter {
  display:flex;flex-wrap:wrap;align-items:center;gap:5.4px;margin:0 0 9px;
  flex:0 0 auto;position:relative;padding-right:72px;
}
.overview-card .account-filter-divider {height:19.8px;border-left:1px solid var(--border);margin-inline:3.6px;}
.overview-card .meeting-xhs-filter button small {margin-inline:2.7px;font-weight:500;}
.overview-card .meeting-xhs-filter button.primary small {color:inherit;}
.overview-card .meeting-xhs-filter .meeting-deals-only {margin-left:auto;}
.overview-card .meeting-xhs-search {width:min(270px,100%);min-height:28.8px;margin-left:auto;padding:5.4px 8.1px;border:1px solid var(--border);border-radius:5.4px;}
.overview-card .overview-material-filter {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;padding-right:0;}
.overview-card .overview-material-options,.overview-card .overview-material-actions {display:flex;align-items:center;gap:5.4px;}
.overview-card .overview-material-options {flex-wrap:wrap;}
.overview-card .overview-material-actions {justify-content:flex-end;white-space:nowrap;}
@media (max-width:468px) {
  .overview-card .overview-material-filter {grid-template-columns:1fr;}
}
.overview-card .meeting-xhs-pagination {display:flex;justify-content:flex-end;align-items:center;gap:6.3px;padding-top:6.3px;}
.overview-card .meeting-material-table .meeting-cover-preview {display:inline-block;height:auto;max-width:100%;cursor:default;}
.overview-card .meeting-material-table .meeting-cover-preview img {display:block;width:auto;height:auto;max-width:100%;max-height:148.5px;object-fit:contain;}
.overview-card .meeting-material-table .meeting-cover-strip {display:flex;flex-wrap:wrap;gap:3.6px;}
.overview-card .meeting-material-table .material-browser-inline a {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.overview-card col.overview-width-8 {width:8%;}
.overview-card col.overview-width-9 {width:9%;}
.overview-card col.overview-width-10 {width:10%;}
.overview-card col.overview-width-11 {width:11%;}
.overview-card col.overview-width-12 {width:12%;}
.overview-card col.overview-width-13 {width:13%;}
.overview-card col.overview-width-16 {width:16%;}
.overview-card col.overview-width-18 {width:18%;}
.overview-card col.overview-width-26 {width:26%;}
.overview-card col.overview-width-28 {width:28%;}
.overview-card col.overview-width-35 {width:35%;}
.overview-card col.overview-width-44 {width:44%;}

.overview-period-label label {display:flex;align-items:center;gap:5.4px;}
.overview-period-label input {min-height:28.8px;padding:3.6px 7.2px;border:1px solid var(--border);border-radius:5.4px;background:var(--surface);color:var(--text);font:inherit;}
.week-period-button {white-space:nowrap;}
dialog.review-week-picker {
  position:fixed;inset:auto;margin:0;width:270px;max-width:calc(100vw - 18px);padding:10.8px;overflow:auto;
  border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text);
  box-shadow:0 7.2px 27px #20232933;z-index:200;
}
.review-week-picker .week-calendar-head {display:flex;align-items:center;justify-content:space-between;margin-bottom:9px;font-size:11.7px;}
.review-week-picker .icon-btn {width:25.2px;height:25.2px;min-height:0;padding:0;}
.review-week-picker :is(.week-calendar-days,.week-calendar-row) {display:grid;grid-template-columns:repeat(7,1fr);text-align:center;}
.review-week-picker .week-calendar-days {color:var(--muted);padding:5.4px 0;}
.review-week-picker .week-calendar-row {
  width:100%;background:transparent;border:1px solid transparent;border-radius:5.4px;padding:8.1px 0;
  cursor:pointer;color:var(--text);font:inherit;margin:2px 0;
}
.review-week-picker .week-calendar-row:enabled:is(:hover,:focus-visible,.selected) {background:var(--selection);border-color:var(--accent);color:var(--accent);}
.review-week-picker .week-calendar-row:disabled {opacity:.38;cursor:default;}
.review-week-picker .other-month {opacity:.45;}
.review-week-picker p {margin:7.2px 0 0;font-size:9.9px;color:var(--muted);text-align:center;}
