@import url("/shared/dashboard.css?v=20260727-douyin-ad-finance-compact-v1");

#overviewPanel .metric-card.live {
  --overview-kpi-accent: #36cbb8;
  --overview-kpi-accent-deep: #148f80;
}

#overviewPanel .metric-card.short_video {
  --overview-kpi-accent: #5aaee7;
  --overview-kpi-accent-deep: #2c7fb8;
}

#overviewPanel .metric-card.product_card {
  --overview-kpi-accent: #ff9d76;
  --overview-kpi-accent-deep: #d9603d;
}

#overviewPanel .metric-card {
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: start;
  gap: 8px;
  padding: 14px 16px 12px;
  overflow: hidden;
}

#overviewPanel .metric-card strong {
  margin-bottom: 4px;
}

#overviewPanel .metric-card dl {
  gap: 5px 12px;
}

#overviewPanel .metric-card dd {
  margin-top: 1px;
}

#overviewPanel .metric-card:is(.live, .short_video, .product_card) {
  border: 1px solid #e8dfd1;
  border-top: 4px solid var(--overview-kpi-accent);
  background: #fffdf8;
  color: #17231f;
  box-shadow: 0 8px 18px rgba(43, 36, 25, 0.065);
}

#overviewPanel .metric-card:is(.live, .short_video, .product_card) :is(h3, dd) {
  color: #17231f;
}

#overviewPanel .metric-card:is(.live, .short_video, .product_card) strong {
  color: var(--overview-kpi-accent-deep);
}

#overviewPanel .metric-card:is(.live, .short_video, .product_card) dt {
  color: #6d766f;
}

#overviewPanel .metric-card.unassigned {
  --overview-kpi-accent: #c8892f;
  --overview-kpi-accent-deep: #865b18;
  border: 1px solid #ecd8ad;
  border-top: 4px solid #c8892f;
  background: #fff8e8;
  color: #382a16;
  box-shadow: 0 8px 18px rgba(133, 91, 24, 0.07);
}

#overviewPanel .metric-card.unassigned :is(h3, strong) {
  color: #865b18;
}

#overviewPanel .metric-card.unassigned :is(dt, dd) {
  color: #49391f;
}

#overviewPanel .metric-card.total {
  --overview-kpi-accent: #0e7366;
  --overview-kpi-accent-deep: #0b4f47;
  border: 1px solid #cfe0d7;
  border-top: 4px solid #0e7366;
  background: #fffdf8;
  color: #0b4f47;
  box-shadow: 0 8px 18px rgba(8, 70, 63, 0.08);
}

#overviewPanel .metric-card.total h3 {
  color: #0b4f47;
}

#overviewPanel .metric-card.total :is(strong, dd) {
  color: #0b4f47;
}

#overviewPanel .metric-card.total :is(dt, .status, .field-status, .zero-note) {
  color: #6b7a73;
}

#overviewPanel .metric-card.total :is(.status, .field-status, .zero-note):is(.is-partial, .is-pending) {
  color: #8a6418;
}

#overviewPanel .metric-card.total :is(.status, .field-status, .zero-note).is-true-zero {
  color: #2f7d5c;
}

#overviewPanel .metric-progress {
  height: 5px;
  margin: 0 0 9px;
  border-radius: 999px;
  background: #efe7d8;
  overflow: hidden;
}

#overviewPanel .metric-progress > i {
  display: block;
  width: var(--metric-share);
  min-width: 4px;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--overview-kpi-accent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32) inset;
}

#overviewPanel .metric-risk-row {
  width: 128px;
  max-width: 100%;
  height: 26px;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 0;
  padding: 0 8px;
  box-sizing: border-box;
  border: 1px solid #eee6da;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.72);
}

#overviewPanel .metric-risk-row .gap-wrap,
#overviewPanel .metric-risk-row .gap-trigger,
#overviewPanel .metric-risk-row .field-status {
  width: 100%;
  max-width: 100%;
  height: 100%;
}

#overviewPanel .metric-risk-row .gap-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

#overviewPanel .metric-risk-row .gap-trigger {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6f7a77;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  box-shadow: none;
}

#overviewPanel .metric-risk-row .field-status {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a8581;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

#overviewPanel .metric-risk-row.is-pending {
  border-color: #f1e7d2;
  background: rgba(255, 250, 240, 0.74);
}

#overviewPanel .metric-risk-row.is-pending .gap-trigger,
#overviewPanel .metric-risk-row.is-pending .field-status {
  color: #9a762a;
}

#overviewPanel .metric-risk-row.is-exception {
  border-color: #efd9aa;
  background: rgba(255, 248, 233, 0.78);
}

#overviewPanel .metric-risk-row.is-exception .gap-trigger,
#overviewPanel .metric-risk-row.is-exception .field-status {
  color: #70490f;
}

#overviewPanel .metric-risk-row.is-ok {
  border-color: #e7eee6;
  background: rgba(248, 252, 247, 0.72);
}

#overviewPanel .metric-risk-row.is-ok .field-status {
  color: #54705d;
}

@media (hover: hover) {
  #overviewPanel .metric-card:hover {
    transform: translateY(-2px);
  }
}

#overviewPanel .shop-sales-panel {
  grid-column: span 4;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  margin-top: 0;
}

#overviewPanel .trend-panel {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

#overviewPanel .trend-panel .chart-frame {
  flex: 1 1 360px;
  min-height: 360px;
}

@media (min-width: 981px) and (max-width: 1180px) {
  #overviewPanel .trend-panel {
    grid-column: span 7;
  }

  #overviewPanel .shop-sales-panel {
    grid-column: span 5;
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  #overviewPanel .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.shop-sales-panel .section-head {
  margin-bottom: 8px;
}

.shop-sales-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.shop-sales-card {
  --shop-sales-accent: var(--live);
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--shop-sales-accent) 18%, var(--border));
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fffdf8 100%);
  box-shadow: var(--commerce-card-shadow);
}

.shop-sales-card:nth-child(2n) {
  --shop-sales-accent: var(--short);
}

.shop-sales-card:nth-child(3n) {
  --shop-sales-accent: var(--product);
}

.shop-sales-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.shop-sales-rank {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--shop-sales-accent) 26%, #ffffff);
  border-radius: 999px;
  background: color-mix(in srgb, var(--shop-sales-accent) 14%, #ffffff);
  color: color-mix(in srgb, var(--shop-sales-accent) 72%, #16231f);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.shop-sales-store {
  min-width: 0;
}

.shop-sales-store b {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: #17202a;
  font-size: 13px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.shop-sales-store small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--type-support);
  line-height: 1.35;
}

.shop-sales-gmv {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.shop-sales-gmv-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf0f5;
}

.shop-sales-gmv-fill {
  display: block;
  width: calc(var(--shop-sales-gmv-ratio) * 1%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--shop-sales-accent), color-mix(in srgb, var(--shop-sales-accent) 62%, #ffffff));
}

.shop-sales-gmv-caption,
.shop-sales-values {
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.shop-sales-gmv-caption {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px;
}

.shop-sales-gmv-caption strong {
  display: block;
  min-width: 0;
  color: #17202a;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: normal;
  text-align: right;
  white-space: nowrap;
  word-break: keep-all;
}

.shop-sales-gmv-caption span,
.shop-sales-value > span,
.shop-sales-value em {
  min-width: 0;
  color: var(--muted);
  font-size: var(--type-support);
  font-style: normal;
  line-height: 1.35;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.shop-sales-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
}

.shop-sales-value {
  display: grid;
  gap: 3px;
  align-items: start;
  justify-items: start;
  min-width: 0;
  padding: 6px 5px;
  border: 1px solid #eef2f5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.shop-sales-value > span {
  color: #63736e;
  font-weight: 720;
}

.shop-sales-value strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: #17202a;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: normal;
  text-align: left;
  white-space: nowrap;
  word-break: keep-all;
}

.shop-sales-value em {
  text-align: left;
}

.shop-sales-value .delta-up,
.shop-sales-value .delta-down,
.shop-sales-value .delta-flat,
.shop-sales-value .delta-missing {
  font-weight: 800;
}

.shop-sales-value .delta-up {
  color: #128666;
}

.shop-sales-value .delta-down {
  color: #d55345;
}

.shop-sales-value .delta-flat {
  color: #5c6b66;
}

.shop-sales-value .delta-missing {
  color: var(--muted);
}

.shop-sales-skeleton {
  padding: 13px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.tree-panel {
  --attribution-card-surface: #ffffff;
  --attribution-card-border: #eadfce;
  --attribution-live-accent: #20bfa6;
  --attribution-short-accent: #3c9ddd;
  --attribution-product-accent: #ff8555;
  --attribution-neutral-accent: #607080;
  --attribution-ink: #17231f;
  background: linear-gradient(180deg, #fffdf8 0%, #fff 100%);
  border: 1px solid var(--attribution-card-border);
}

.tree-panel .section-head {
  margin-bottom: 8px;
}

.tree-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  grid-auto-flow: row dense;
}

.tree-card {
  --tree-accent: var(--attribution-neutral-accent);
  --tree-soft: #f7fafc;
  --tree-ink: #263445;
  --tree-gradient: linear-gradient(135deg, #607080 0%, #8a99a8 100%);
  position: relative;
  border: 1px solid var(--attribution-card-border);
  border-radius: 12px;
  background: var(--attribution-card-surface);
  box-shadow: 0 10px 24px rgba(43, 36, 25, 0.055);
  display: grid;
  align-content: start;
}

.tree-card.live {
  --tree-accent: var(--attribution-live-accent);
  --tree-soft: #e8fbf7;
  --tree-ink: #0f6559;
  --tree-gradient: linear-gradient(135deg, var(--attribution-live-accent) 0%, #0a9f8c 100%);
}

.tree-card.short_video {
  --tree-accent: var(--attribution-short-accent);
  --tree-soft: #edf7ff;
  --tree-ink: #17679a;
  --tree-gradient: linear-gradient(135deg, var(--attribution-short-accent) 0%, #237fc4 100%);
}

.tree-card.product_card {
  --tree-accent: var(--attribution-product-accent);
  --tree-soft: #fff3ea;
  --tree-ink: #9a4e2d;
  --tree-gradient: linear-gradient(135deg, var(--attribution-product-accent) 0%, #ee683f 100%);
}

.tree-card > header {
  position: relative;
  align-items: flex-start;
  min-height: 82px;
  gap: 10px;
  padding: 12px 14px;
  background: var(--tree-gradient);
  border-bottom-color: color-mix(in srgb, var(--tree-accent) 20%, #e5dfd3);
}

.tree-card > header::before {
  content: "";
  position: absolute;
  top: auto;
  left: 14px;
  right: 14px;
  bottom: 0;
  width: auto;
  height: 1px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.tree-card h3 {
  color: #ffffff;
  font-size: 15px;
}

.tree-card p {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.25;
}

.issue-card h3 {
  color: var(--tree-ink);
  font-size: 15px;
}

.issue-card p {
  margin-top: 3px;
  line-height: 1.35;
}

.issues-panel--commerce {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 252, 244, 0.86) 100%);
}

.issues-panel--commerce .section-head {
  margin-bottom: 6px;
}

.issue-list--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.issue-list--compact > .empty {
  grid-column: 1 / -1;
}

.issues-panel--commerce .issue-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: hidden;
  padding: 8px;
  border: 1px solid #e7e0d2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(43, 36, 25, 0.048);
}

.issues-panel--commerce .issue-card header {
  display: grid;
  gap: 2px;
  margin: 0;
  padding-left: 3px;
}

.issues-panel--commerce .issue-card h3 {
  color: #1f3445;
  font-size: 13px;
  line-height: 1.15;
}

.issues-panel--commerce .issue-card p {
  min-height: 0;
  max-height: 30px;
  overflow: hidden;
  margin: 0;
  color: #6b7680;
  font-size: 12px;
  line-height: 1.25;
}

.issues-panel--commerce .issue-total {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  justify-items: stretch;
  gap: 1px 6px;
  padding: 6px 8px;
  border: 1px solid #e7e0d2;
  border-radius: 7px;
  background: #f8f5ee;
  text-align: left;
  white-space: normal;
}

.issues-panel--commerce .issue-total span {
  color: #6a7682;
  font-size: 12px;
  line-height: 1.1;
}

.issues-panel--commerce .issue-total strong,
.issues-panel--commerce .issue-total b {
  color: #1f3445;
  font-size: 14px;
  line-height: 1.12;
  text-align: right;
}

.issues-panel--commerce .issue-total b {
  font-weight: 780;
}

.issue-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding-left: 3px;
  color: #6b7680;
  font-size: 12px;
  line-height: 1.15;
}

.issue-meta-row span,
.issue-meta-row i {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue-meta-row i {
  max-width: 108px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(31, 52, 69, 0.06);
  color: #495867;
  font-style: normal;
}

.issue-action-band {
  display: flex;
  min-width: 0;
  padding-left: 3px;
}

.issues-panel--commerce .gap-wrap,
.issues-panel--commerce .gap-trigger {
  width: 100%;
}

.issues-panel--commerce .gap-trigger {
  min-height: 26px;
  padding: 0 8px;
  border-color: #d8d0c2;
  background: #f8f5ee;
  color: #263445;
}

.tree-total,
.issue-total {
  gap: 3px;
}

.tree-total {
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.tree-total strong,
.issue-total strong {
  font-size: 16px;
}

.tree-total strong {
  color: var(--tree-ink);
}

.tree-total span {
  color: color-mix(in srgb, var(--tree-ink) 68%, #fff);
}

.group-list {
  gap: 6px;
  padding: 8px;
  align-content: start;
}

.group-block > header,
.node-row,
.subject-row {
  grid-template-columns: minmax(128px, 1fr) minmax(74px, auto) minmax(48px, auto) minmax(44px, auto);
  gap: 5px;
}

.group-block > header {
  min-height: 28px;
  padding: 5px 8px;
  border-left: 0;
  border-radius: 7px;
  background: color-mix(in srgb, var(--tree-soft) 72%, #fff);
  color: var(--tree-ink);
}

.node-row {
  min-height: 27px;
  padding: 4px 8px;
}

.tree-card .node-row:hover,
.tree-card .subject-row:hover {
  background: color-mix(in srgb, var(--tree-soft) 58%, #fff);
}

.subject-row i {
  border-color: color-mix(in srgb, var(--tree-accent) 24%, #d7e0ea);
  background: color-mix(in srgb, var(--tree-soft) 68%, #fff);
  color: var(--tree-ink);
}

.subject-list {
  padding: 0 8px 4px 16px;
}

.subject-row {
  min-height: 25px;
  padding: 4px 0;
}

.node-issue-list {
  align-items: center;
  padding: 4px 8px 5px 16px;
}

.node-issue-list article {
  padding: 7px 8px;
}

.drilldown-trigger {
  width: auto;
  min-height: 26px;
  margin: 0 8px 5px 16px;
  padding: 4px 10px;
  justify-self: start;
  border-radius: 999px;
}

.tree-card .gap-wrap {
  width: auto;
}

.tree-card .gap-trigger {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
}

@media (max-width: 1180px) {
  .tree-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .tree-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .issue-list--compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .tree-card > header {
    display: grid;
  }

  .tree-total,
  .issue-total {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .shop-sales-card-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .shop-sales-values {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sku-profit-workbench {
  --sku-profit-accent: #1d8c72;
  --sku-refund-accent: #b24a54;
  --sku-cost-accent: #9b6a20;
  --sku-sales-accent: #1769aa;
  --sku-gap-accent: #8f4a2a;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 252, 250, 0.96) 100%),
    linear-gradient(90deg, rgba(29, 140, 114, 0.12), rgba(23, 105, 170, 0.08));
}

.sku-profit-workbench .section-head {
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(220, 227, 234, 0.78);
}

.sku-profit-workbench .profit-status {
  border-color: rgba(29, 140, 114, 0.2);
  background: #f2faf7;
  color: #176d5d;
}

.sku-profit-workbench .profit-controls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 12px;
  border-color: #d7e8e3;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(241, 248, 246, 0.9) 100%);
}

.sku-profit-workbench .profit-controls label {
  color: #46524c;
  font-weight: 720;
}

.sku-profit-workbench .profit-controls input {
  border-color: #d5e4df;
  background: rgba(255, 255, 255, 0.92);
}

.sku-profit-workbench .profit-controls button {
  border-color: rgba(20, 115, 102, 0.26);
  background: #147366;
  color: #fff;
  font-weight: 780;
}

.sku-profit-workbench .profit-controls--compact {
  grid-template-columns: minmax(170px, 1.25fr) 72px repeat(2, minmax(128px, 0.9fr)) minmax(112px, 0.75fr) minmax(112px, 0.75fr) 88px;
  align-items: end;
  gap: 8px;
  padding: 8px 10px;
}

.sku-profit-workbench .profit-controls--compact label {
  gap: 4px;
  font-size: 12px;
  letter-spacing: 0;
}

.sku-profit-workbench .profit-controls--compact input {
  min-height: 36px;
  padding: 7px 10px;
}

.sku-profit-workbench .profit-controls--compact button {
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.sku-profit-workbench .profit-controls--compact .profit-search-input {
  grid-column: auto;
}

.sku-profit-workbench .profit-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sku-profit-workbench .profit-option {
  min-height: 70px;
  grid-template-columns: minmax(220px, 1.5fr) 68px 102px 112px auto;
  border-color: #d7e6e1;
  background: linear-gradient(180deg, #fff 0%, #f9fcfb 100%);
  box-shadow: 0 6px 18px rgba(25, 48, 38, 0.05);
}

.sku-profit-workbench .profit-option:hover {
  border-color: rgba(29, 140, 114, 0.36);
  background: #f7fcfa;
}

.sku-profit-workbench .profit-summary,
.sku-profit-workbench .refund-detail-summary {
  gap: 9px;
}

.sku-profit-workbench .profit-kpi {
  position: relative;
  overflow: hidden;
  min-height: 88px;
  border-color: #dce8e4;
  background: #fff;
  box-shadow: 0 6px 18px rgba(24, 39, 75, 0.04);
}

.sku-profit-workbench .profit-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--sku-sales-accent);
}

.sku-profit-workbench .profit-kpi strong {
  font-size: 20px;
}

.profit-kpi[data-profit-metric="paid-gmv"]::before,
.profit-kpi[data-profit-metric="order-count"]::before {
  background: var(--sku-sales-accent);
}

.profit-kpi[data-profit-metric="refund-amount"]::before,
.profit-kpi[data-profit-metric="refund-rate"]::before {
  background: var(--sku-refund-accent);
}

.profit-kpi[data-profit-metric="product-cost"]::before {
  background: var(--sku-cost-accent);
}

.profit-kpi[data-profit-metric="gross-profit"]::before,
.profit-kpi[data-profit-metric="gross-margin"]::before {
  background: var(--sku-profit-accent);
}

.profit-kpi[data-profit-metric="issue-count"]::before {
  background: var(--sku-gap-accent);
}

.sku-profit-workbench .profit-kpi.is-sales strong,
.sku-profit-workbench .profit-kpi.is-volume strong {
  color: #1769aa;
}

.sku-profit-workbench .profit-kpi.is-refund strong {
  color: #a83f49;
}

.sku-profit-workbench .profit-kpi.is-cost strong {
  color: #8b611c;
}

.sku-profit-workbench .profit-kpi.is-profit strong {
  color: #176d5d;
}

.sku-profit-workbench .profit-kpi.is-gap strong {
  color: #8f4a2a;
}

.sku-profit-workbench .profit-note-card {
  border-color: #efd9bd;
  background: #fff8ee;
}

.profit-table-wrap--sku,
.profit-table-wrap--refund {
  border-color: #dbe8e4;
  background: #fff;
  box-shadow: 0 6px 18px rgba(24, 39, 75, 0.045);
}

.profit-table-wrap--sku .profit-table th,
.profit-table-wrap--refund .profit-table th {
  background: #f4f9f7;
  color: #3f4d47;
}

.profit-table-wrap--sku .profit-table td:nth-child(5),
.profit-table-wrap--sku .profit-table td:nth-child(6),
.profit-table-wrap--sku .profit-table td:nth-child(8),
.profit-table-wrap--sku .profit-table td:nth-child(9),
.profit-table-wrap--sku .profit-table td:nth-child(10) {
  font-weight: 720;
}

.profit-table-wrap--sku .profit-table td:nth-child(5) {
  color: #1769aa;
}

.profit-table-wrap--sku .profit-table td:nth-child(6) {
  color: #a83f49;
}

.profit-table-wrap--sku .profit-table td:nth-child(8) {
  color: #8b611c;
}

.profit-table-wrap--sku .profit-table td:nth-child(9),
.profit-table-wrap--sku .profit-table td:nth-child(10) {
  color: #176d5d;
}

.profit-table-wrap--refund .profit-table td:nth-child(5) b {
  color: #a83f49;
}

.net-profit-panel {
  padding: 16px;
  border-color: #eadfce;
  background: linear-gradient(180deg, #ffffff 0%, #fffdf8 100%);
}

.net-profit-panel .section-head {
  align-items: center;
  margin-bottom: 8px;
}

.net-profit-panel .section-head p {
  margin-top: 2px;
}

.net-profit-panel .profit-status {
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
}

.net-profit-panel .profit-status.is-warn {
  border-color: #ebe4d6;
  background: #fcfaf5;
  color: #806b4f;
  font-weight: 500;
}

.net-profit-controls {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1.4fr) 116px;
  align-items: end;
  gap: 8px;
  margin-top: 6px;
  padding: 8px;
  border-color: #eadfce;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf8 0%, #f8f5ee 100%);
}

.net-profit-controls label {
  gap: 3px;
}

.net-profit-search {
  grid-column: auto;
}

.net-profit-controls input {
  height: 30px;
  padding: 0 9px;
  border-radius: 8px;
}

.net-profit-controls button {
  height: 30px;
  border-radius: 8px;
}

.net-profit-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.net-profit-panel .profit-kpi {
  position: relative;
  overflow: hidden;
  min-height: 62px;
  align-content: start;
  gap: 2px;
  padding: 9px 10px;
  border-color: #e4ded2;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(43, 36, 25, 0.045);
}

.net-profit-panel .profit-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #879287;
}

.net-profit-panel .profit-kpi span {
  font-size: 12px;
  line-height: 1.12;
}

.net-profit-panel .profit-kpi strong {
  font-size: 17px;
  line-height: 1.12;
}

.net-profit-panel .profit-kpi small {
  color: #6d7770;
  font-size: 12px;
  line-height: 1.18;
}

.net-profit-panel .net-profit-data-note {
  color: #806b4f;
  font-weight: 500;
}

.net-profit-table tr.has-data-issue td {
  background: #fffdf7;
}

.net-profit-kpi.is-sales::before,
.net-profit-kpi.is-volume::before {
  background: #3c9ddd;
}

.net-profit-kpi.is-base::before {
  background: #20bfa6;
}

.net-profit-kpi.is-cost::before {
  background: #c58a2a;
}

.net-profit-kpi.is-gap::before {
  background: #a56a38;
}

.net-profit-kpi.is-profit::before {
  background: #0f7664;
}

.net-profit-kpi.is-profit strong {
  color: #0f6559;
}

.net-profit-kpi.is-cost strong {
  color: #7a551c;
}

.net-profit-kpi.is-gap strong {
  color: #8a4f26;
}

.net-profit-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 8px;
  color: #5f6d65;
  font-size: 12px;
}

.net-profit-secondary span {
  display: flex;
  gap: 4px;
  align-items: baseline;
}

.net-profit-waterfall {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 7px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #e4ded2;
  border-radius: 10px;
  background: #fbfaf7;
}

.net-profit-formula-node {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
  align-content: start;
  padding: 8px 9px;
  border: 1px solid #e2ded5;
  border-radius: 9px;
  background: #fff;
}

.net-profit-formula-term {
  display: flex;
  flex: 1 1 170px;
  min-width: 0;
  gap: 7px;
  align-items: stretch;
}

.net-profit-formula-node span,
.net-profit-formula-node small {
  color: #66726b;
  font-size: 12px;
  line-height: 1.28;
}

.net-profit-formula-node strong {
  color: #263c34;
  font-size: 15px;
}

.net-profit-formula-node.is-cost {
  border-color: #e8dbc0;
  background: #fffaf0;
}

.net-profit-formula-node.is-result {
  border-color: #cbe2d8;
  background: #f2faf6;
}

.net-profit-formula-operator {
  align-self: center;
  color: #8b7760;
  font-size: 18px;
  font-weight: 800;
}

.net-profit-loss {
  display: inline-flex;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #fce8ea;
  color: #a43d49;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.net-profit-reconciliation {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #e1ded5;
  border-radius: 9px;
  background: #fbfaf7;
  color: #55635b;
  font-size: 12px;
}

.net-profit-reconciliation .is-ready {
  color: #19735e;
  font-weight: 700;
}

.net-profit-reconciliation .is-gap {
  color: #9a5f18;
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.net-profit-table-wrap {
  margin-top: 8px;
  border-color: #e4ded2;
  border-radius: 10px;
}

.net-profit-table {
  width: max-content;
  min-width: 0;
}

.net-profit-table th,
.net-profit-table td {
  padding: 7px 8px;
}

.net-profit-table th {
  background: #f8f5ee;
  color: #4f5c55;
}

.net-profit-table td small {
  margin-top: 1px;
  line-height: 1.18;
}

.net-profit-table th:nth-child(n + 3):nth-child(-n + 13),
.net-profit-table td:nth-child(n + 3):nth-child(-n + 13) {
  text-align: right;
}

/* Keep row identity visible while financial columns scroll inside this table. */
#netProfitPanel .net-profit-table {
  border-collapse: separate;
  border-spacing: 0;
}

#netProfitPanel .net-profit-table-wrap {
  max-width: 100%;
}

#netProfitPanel .net-profit-table :is(th, td):first-child:not([colspan]),
#netProfitPanel .net-profit-table :is(th, td):nth-child(2) {
  position: sticky;
  z-index: 2;
  box-sizing: border-box;
  background: #fff;
}

#netProfitPanel .net-profit-table :is(th, td):first-child:not([colspan]) {
  left: 0;
  width: 132px;
  min-width: 132px;
  max-width: 132px;
}

#netProfitPanel .net-profit-table :is(th, td):nth-child(2) {
  left: 132px;
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  box-shadow: 2px 0 0 #e4ded2;
}

#netProfitPanel .net-profit-table th:nth-child(-n + 2) {
  z-index: 3;
  background: #eff6f3;
}

#netProfitPanel .net-profit-table tr.has-data-issue td:nth-child(-n + 2) {
  background: #fffdf7;
}

#netProfitPanel .net-profit-table td {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#netProfitPanel .net-profit-table td small {
  font-size: 12px;
}

#netProfitPanel .finance-identity {
  width: 116px;
}

#netProfitPanel td:nth-child(2) .finance-identity {
  width: 152px;
}

#netProfitPanel .finance-cell-detail {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
}

#netProfitPanel .finance-cell-detail > :not(summary) {
  width: 152px;
  margin: 4px 0 0 auto;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-align: left;
  color: #66726b;
}

#netProfitPanel .finance-cell-detail > :not(summary) :is(small, span, b) {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

:is(#netProfitPanel, #profitPanel) .finance-identity :is(summary, .finance-identity-name, div, code) {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

:is(#netProfitPanel, #profitPanel) .finance-identity .finance-identity-name {
  display: inline;
}

:is(#netProfitPanel, #profitPanel) .finance-identity > div {
  margin-top: 4px;
  color: #66726b;
  font-size: 12px;
  user-select: text;
}

#profitPanel .finance-identity {
  max-width: 180px;
}

:is(#netProfitPanel, #creatorCommissionPanel) .finance-rule-details,
#adCostConversionModule .ad-conversion-rules {
  min-width: 0;
  margin-top: 8px;
  color: #66726b;
  font-size: 12px;
  line-height: 1.6;
  white-space: normal;
}

:is(#netProfitPanel, #profitPanel) :is(.finance-cell-detail, .finance-identity) > summary,
:is(#netProfitPanel, #creatorCommissionPanel) .finance-rule-details > summary,
#adCostConversionModule .ad-conversion-rules > summary {
  cursor: pointer;
  color: #456355;
  font-size: 12px;
  line-height: 1.5;
}

#netProfitPanel .finance-cell-detail.net-profit-data-note > summary {
  color: inherit;
}

:is(#netProfitPanel, #profitPanel) :is(.finance-cell-detail, .finance-identity) > summary:focus-visible,
:is(#netProfitPanel, #creatorCommissionPanel) .finance-rule-details > summary:focus-visible,
#adCostConversionModule .ad-conversion-rules > summary:focus-visible {
  outline: 2px solid #2179bd;
  outline-offset: 2px;
  border-radius: 2px;
}

#netProfitCalculationDetails {
  padding: 8px 10px;
  border: 1px solid #e4ded2;
  border-radius: 10px;
  background: #fbfaf7;
}

#netProfitPanel .net-profit-rules {
  margin: 8px 0 0;
  padding-left: 20px;
}

#adCostConversionModule .ad-conversion-rules p,
#creatorCommissionPanel .finance-rule-details p {
  margin: 5px 0 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.net-profit-panel .cost-badge.ready {
  background: #edf9f3;
  color: #287154;
}

.net-profit-panel .cost-badge.has-warning {
  background: #fff6e8;
  color: #8a6418;
}

.net-profit-panel .cost-badge.error {
  background: #fff1f3;
  color: #9a3440;
}

.sku-profit-workbench .refund-detail-panel {
  border-top-color: rgba(178, 74, 84, 0.18);
}

.sku-profit-workbench .refund-detail-head h3 {
  color: #7f3440;
}

.sku-profit-workbench .refund-type-badge {
  border-color: #f0d4d8;
  background: #fff6f7;
}

@media (max-width: 1180px) {
  .sku-profit-workbench .profit-controls--compact {
    grid-template-columns: minmax(170px, 1fr) 72px repeat(2, minmax(128px, 1fr));
  }

  .sku-profit-workbench .profit-options {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .sku-profit-workbench .profit-option {
    grid-template-columns: minmax(220px, 1fr) repeat(2, auto);
  }
}

@media (max-width: 680px) {
  .sku-profit-workbench .profit-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .sku-profit-workbench .profit-search-input {
    grid-column: auto;
  }

  .sku-profit-workbench .profit-option {
    grid-template-columns: minmax(0, 1fr);
  }

  .sku-profit-workbench .profit-option > span:nth-child(n+2) {
    justify-self: start;
  }
}

.creator-commission-workbench {
  --commission-accent: #207f68;
  --commission-green: #168766;
  --commission-blue: #226d9f;
  --commission-amber: #b7791f;
  --commission-red: #b94a58;
  --commission-ink: #17202a;
  --commission-soft: #f4faf7;
  --commission-border: #d8e9e2;
  padding: 16px;
  border-color: var(--commission-border);
  background: linear-gradient(180deg, #f7fcfa 0%, #fff 48%, #fbfdfc 100%);
}

.creator-commission-workbench .section-head {
  margin-bottom: 8px;
}

.creator-commission-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.creator-commission-kpi {
  position: relative;
  min-width: 0;
  min-height: 76px;
  align-content: start;
  gap: 3px;
  padding: 10px 11px 9px;
  overflow: hidden;
  border-radius: 10px;
  border-color: color-mix(in srgb, var(--commission-tone, var(--commission-accent)) 22%, #e6edf1);
  background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--commission-tone, var(--commission-accent)) 7%, #fff) 100%);
  box-shadow: 0 8px 22px rgba(24, 39, 75, 0.045);
}

.creator-commission-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--commission-tone, var(--commission-accent));
}

.creator-commission-kpi[data-commission-tone="alliance-gmv"],
.creator-commission-kpi[data-commission-tone="alliance-cost"] {
  --commission-tone: var(--commission-accent);
}

.creator-commission-kpi[data-commission-tone="order-count"],
.creator-commission-kpi[data-commission-tone="rate"] {
  --commission-tone: var(--commission-blue);
}

.creator-commission-kpi[data-commission-tone="creator-cost"],
.creator-commission-kpi[data-commission-tone="external"] {
  --commission-tone: var(--commission-green);
}

.creator-commission-kpi[data-commission-tone="group-leader-cost"],
.creator-commission-kpi[data-commission-tone="internal"],
.creator-commission-kpi[data-commission-tone="pending"] {
  --commission-tone: var(--commission-amber);
}

.creator-commission-kpi[data-commission-tone="issues"] {
  --commission-tone: var(--commission-red);
}

.creator-commission-kpi span {
  color: color-mix(in srgb, var(--commission-tone, var(--commission-accent)) 72%, #516173);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}

.creator-commission-kpi strong {
  color: var(--commission-ink);
  font-size: 18px;
  line-height: 1.12;
}

.creator-commission-kpi small {
  font-size: 12px;
  line-height: 1.18;
}

.creator-commission-note {
  margin: 8px 0 10px;
}

.creator-commission-ledger-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 8px;
  padding: 9px 12px;
  border-radius: 10px;
  border-color: var(--commission-border);
  background: linear-gradient(90deg, #eff8f4, #fffaf0);
}

.creator-commission-ledger-note small {
  grid-column: 1 / -1;
  line-height: 1.24;
}

.creator-commission-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(420px, 1fr);
  gap: 10px;
  align-items: start;
}

.creator-commission-main {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
}

.creator-commission-table-wrap--nodes {
  border-color: var(--commission-border);
  background: #fff;
  box-shadow: 0 10px 24px rgba(24, 39, 75, 0.05);
  align-self: start;
  overflow: hidden;
  border-radius: 10px;
}

.creator-commission-table th,
.creator-commission-table td {
  padding: 8px 10px;
  vertical-align: middle;
}

.creator-commission-table thead th {
  background: #f3faf7;
  color: #23463e;
}

.creator-commission-node-row {
  border-left: 4px solid transparent;
}

.creator-commission-node-row[data-commission-node-status="actual"] {
  border-left-color: var(--commission-green);
  background: #f7fcfa;
}

.creator-commission-node-row[data-commission-node-status="pending"] {
  border-left-color: var(--commission-amber);
  background: #fffaf1;
}

.creator-commission-node-row[data-commission-node-status="conflict"] {
  border-left-color: var(--commission-red);
  background: #fff7f8;
}

.creator-commission-node-row.is-selected {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--commission-accent) 30%, transparent);
}

.creator-commission-node-row td:first-child b {
  display: block;
  color: var(--commission-ink);
  line-height: 1.25;
}

.creator-commission-node-row td:first-child small,
.creator-commission-status-note,
.creator-commission-meta {
  color: var(--muted);
  font-size: var(--type-support);
  line-height: 1.35;
}

.creator-commission-money {
  color: #176d5d;
}

.creator-commission-rate {
  color: #516173;
  font-weight: 800;
}

.creator-commission-issues {
  display: grid;
  gap: 6px;
  margin-top: 0;
}

.creator-commission-issue-head,
.creator-commission-issue-card {
  border: 1px solid #ead8bb;
  border-radius: 8px;
  background: #fffaf1;
}

.creator-commission-issue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  gap: 8px;
  padding: 8px 10px;
}

.creator-commission-issue-list {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.creator-commission-issue-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto;
  gap: 4px 10px;
  padding: 8px 10px;
}

.creator-commission-issue-card span,
.creator-commission-issue-card small {
  min-width: 0;
  color: var(--muted);
  line-height: 1.35;
}

.creator-commission-issue-card b {
  color: #8a5518;
  text-align: right;
}

.creator-commission-issue-card small {
  grid-column: 1 / -1;
}

.creator-commission-ledger {
  min-width: 0;
  align-self: start;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: 430px;
  overflow: hidden;
  padding: 9px;
  border: 1px solid var(--commission-border);
  border-color: var(--commission-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f7fbfa 100%);
  box-shadow: 0 10px 24px rgba(24, 39, 75, 0.05);
}

.creator-commission-detail-head {
  padding-bottom: 7px;
  margin-bottom: 7px;
  border-bottom: 1px solid var(--commission-border);
}

.creator-commission-detail-head h3 {
  color: var(--commission-ink);
  font-size: var(--type-card-title);
}

.creator-commission-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}

.creator-commission-filters button {
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #d6e8e1;
  border-radius: 999px;
  background: #fff;
  color: #315247;
  font-weight: 800;
}

.creator-commission-filters button.is-active {
  border-color: #b8ded1;
  background: #eaf7f2;
  color: #176d5d;
}

.creator-commission-ledger-list {
  display: grid;
  gap: 6px;
  overflow-y: auto;
  padding-right: 2px;
}

.creator-commission-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 52px;
  padding: 8px 9px;
  border: 1px solid rgba(209, 225, 221, 0.78);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 12px rgba(24, 39, 75, 0.035);
  row-gap: 5px;
  column-gap: 8px;
}

.creator-commission-ledger-row:nth-child(even) {
  background: rgba(249, 245, 238, 0.82);
}

.creator-commission-ledger-account {
  align-self: center;
}

.creator-commission-ledger-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.creator-commission-ledger-metrics span {
  min-width: 0;
  display: grid;
  gap: 1px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(242, 248, 246, 0.86);
}

.creator-commission-ledger-metrics small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.creator-commission-ledger-metrics strong {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-commission-ledger-meta {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-display-cell {
  min-width: 0;
}

.creator-name,
.creator-id {
  display: block;
}

.creator-id {
  color: var(--muted);
  font-size: var(--type-support);
  line-height: 1.35;
}

#creatorCommissionCreatorRows.creator-commission-creators .creator-table {
  table-layout: auto;
}

#creatorCommissionCreatorRows.creator-commission-creators .creator-table th:nth-child(1),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table td:nth-child(1) {
  min-width: 190px;
  width: 24%;
}

#creatorCommissionCreatorRows.creator-commission-creators .creator-table th:nth-child(2),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table td:nth-child(2) {
  min-width: 92px;
  width: 10%;
  text-align: center;
}

#creatorCommissionCreatorRows.creator-commission-creators .creator-table th:nth-child(3),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table td:nth-child(3),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table th:nth-child(5),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table td:nth-child(5),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table th:nth-child(7),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table td:nth-child(7),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table th:nth-child(8),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table td:nth-child(8) {
  min-width: 104px;
  width: 11%;
  text-align: right;
}

#creatorCommissionCreatorRows.creator-commission-creators .creator-table th:nth-child(4),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table td:nth-child(4),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table th:nth-child(6),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table td:nth-child(6),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table th:nth-child(9),
#creatorCommissionCreatorRows.creator-commission-creators .creator-table td:nth-child(9) {
  min-width: 82px;
  width: 8%;
  text-align: right;
}

@media (max-width: 1180px) {
  .creator-commission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .creator-commission-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Douyin ad-cost visual polish: scoped to this module so shared and sibling panels stay unchanged. */
#adCostPanel {
  border-color: #e7dfd4;
  background: linear-gradient(180deg, #ffffff 0%, #fffdf9 100%);
  box-shadow: 0 10px 24px rgba(52, 45, 34, 0.07);
}

#adCostPanel .ad-cost-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin: 0;
}

#adCostPanel .ad-cost-grid .metric-card {
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: start;
  gap: 8px;
  padding: 14px 16px 12px;
  overflow: hidden;
  border: 1px solid var(--douyin-border);
  border-top: 4px solid var(--ad-kpi-accent, var(--douyin-border-strong));
  background: #fffdf8;
  box-shadow: var(--douyin-shadow-card);
}

#adCostPanel .ad-cost-grid .metric-card:nth-child(1) {
  --ad-kpi-accent: var(--douyin-source-product);
}

#adCostPanel .ad-cost-grid .metric-card:nth-child(2) {
  --ad-kpi-accent: var(--douyin-state-success);
}

#adCostPanel .ad-cost-grid .metric-card:nth-child(3) {
  --ad-kpi-accent: var(--douyin-state-info);
}

#adCostPanel .ad-cost-grid .metric-card:nth-child(4) {
  --ad-kpi-accent: var(--douyin-state-warning);
}

#adCostPanel .ad-cost-grid .metric-card strong {
  margin-bottom: 4px;
  color: #3d544c;
}

#adCostPanel .ad-cost-grid .metric-card dl {
  gap: 5px 12px;
}

#adCostPanel .ad-cost-grid .metric-card dd {
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#adCostPanel .metric-progress {
  display: flex;
  height: 5px;
  margin: 0 0 9px;
  border-radius: 999px;
  background: #efe7d8;
  overflow: hidden;
}

#adCostPanel .metric-progress > i {
  display: block;
  min-width: 0;
  height: 100%;
}

#adCostPanel .metric-progress > i.is-live {
  background: #36cbb8;
}

#adCostPanel .metric-progress > i.is-goods {
  background: #ff9d76;
}

#adCostPanel .ad-cost-meta-strip {
  margin-bottom: 0;
}

#adCostPanel .ad-cost-meta-strip .dot.is-ok {
  background: #2d8f74;
}

#adCostPanel .ad-cost-meta-strip .dot.is-warn {
  background: var(--douyin-state-warning);
}

#adCostPanel .ad-cost-meta-strip .dot.is-bad {
  background: var(--douyin-state-danger);
}

#adCostPanel .ad-cost-meta-details {
  min-width: 0;
  border: 1px solid var(--douyin-border);
  border-radius: 12px;
  background: var(--douyin-surface);
}

#adCostPanel .ad-cost-meta-details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  color: var(--douyin-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

#adCostPanel .ad-cost-meta-details-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 0 14px 14px;
}

#adCostPanel .ad-cost-meta-details-body .ad-quality-chips {
  justify-content: flex-start;
}

#adCostPanel .ad-cost-meta-details-body .ad-cost-reconcile,
#adCostPanel .ad-cost-meta-details-body .ad-cost-availability {
  margin-top: 0;
  margin-bottom: 0;
}

#adCostPanel .ad-quality-chip {
  background: #f0efeb;
  color: #68736e;
}

#adCostPanel .profit-note-card {
  border-color: #eadfc9;
  background: #fffbf4;
  color: #6f624b;
}

#adCostPanel .profit-note-card b,
#adCostPanel .profit-note-card small {
  color: #806a42;
}

#adCostPanel .ad-cost-reconcile {
  border-color: #e4ded4;
  background: #faf9f5;
  color: #586760;
}

#adCostPanel .ad-cost-plan-drilldown {
  grid-column: 1 / -1;
  min-width: 0;
  max-width: 100%;
  padding: 14px;
  border: 1px solid #bfd4e2;
  border-radius: 14px;
  background: #faf9f5;
  box-shadow: var(--douyin-shadow-card);
}

#adCostPanel .ad-cost-account-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  justify-content: stretch;
  gap: 14px;
  width: 100%;
  max-width: none;
  min-width: 0;
}

#adCostPanel .ad-cost-account-list > .empty {
  grid-column: 1 / -1;
  border: 1px dashed #ded8cf;
  border-radius: 12px;
  background: #faf9f5;
}

#adCostPanel .ad-cost-account-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #e2ddd5;
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: 0 5px 14px rgba(52, 45, 34, 0.045);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

#adCostPanel .ad-cost-account-card:hover {
  border-color: #cfdcd6;
  box-shadow: 0 8px 18px rgba(52, 45, 34, 0.07);
  transform: translateY(-1px);
}

#adCostPanel .ad-cost-account-card.is-selected {
  border-color: #80afd0;
  box-shadow: 0 0 0 3px rgba(128, 175, 208, 0.16);
}

#adCostPanel .ad-cost-account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#adCostPanel .ad-cost-account-head h4 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #304a43;
  font-size: 16px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#adCostPanel .ad-cost-account-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f6f8f6;
}

#adCostPanel .ad-cost-identity-item {
  display: block;
  min-width: 0;
  color: #40534c;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#adCostPanel .ad-cost-identity-item b {
  margin-right: 6px;
  color: #77827d;
  font-size: 12px;
  font-weight: 600;
}

#adCostPanel .ad-cost-account-total {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ece7df;
}

#adCostPanel .ad-cost-account-total span {
  color: #66736e;
  font-size: 13px;
}

#adCostPanel .ad-cost-account-total strong {
  color: #4b675e;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

#adCostPanel .ad-cost-account-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin: 0;
}

#adCostPanel .ad-cost-account-metrics > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: #f6f8f6;
}

#adCostPanel .ad-cost-account-metrics dt {
  color: #77827d;
  font-size: 12px;
}

#adCostPanel .ad-cost-account-metrics dd {
  margin: 0;
  color: #40534c;
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#adCostPanel .ad-cost-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#adCostPanel .ad-cost-account-actions button {
  min-height: 36px;
  padding: 7px 12px;
  border-color: #d9e1dd;
  background: #f8faf9;
  color: #46645b;
  white-space: nowrap;
}

#adCostPanel .ad-cost-account-actions button:hover {
  border-color: #bfcfc8;
  background: #f1f6f3;
}

#adCostPanel .ad-cost-account-actions .ad-cost-plan-toggle {
  border-color: #6f9fc2;
  background: var(--douyin-state-info);
  color: #ffffff;
  font-weight: 700;
}

#adCostPanel .ad-cost-account-actions .ad-cost-plan-toggle:hover {
  border-color: #5f8fb2;
  background: #6f9fc2;
}

#adCostPanel .ad-cost-account-actions .ad-cost-plan-toggle[aria-expanded="true"] {
  border-color: #4f7fa2;
  background: #5f8fb2;
}

#adCostPanel .ad-cost-account-detail-toggle {
  color: #66736e;
}

#adCostPanel .ad-cost-account-actions button:focus-visible {
  outline: 2px solid #80afd0;
  outline-offset: 2px;
}

#adCostPanel .ad-cost-account-detail {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid #ece7df;
}

#adCostPanel .ad-cost-account-detail[hidden] {
  display: none;
}

#adCostPanel .ad-cost-account-detail dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

#adCostPanel .ad-cost-account-detail dl > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
}

#adCostPanel .ad-cost-account-detail dt {
  color: #7a857f;
  font-size: 12px;
}

#adCostPanel .ad-cost-account-detail dd {
  margin: 0;
  color: #4f5f59;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#adCostPanel .ad-cost-plan-table small {
  display: block;
  margin-top: 3px;
  color: #7a857f;
  font-size: 12px;
}

#adCostPanel .ad-cost-account-toolbar {
  align-items: end;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 0;
}

#adCostPanel .ad-cost-account-toolbar h3 {
  margin: 0;
  color: #304a43;
  font-size: 16px;
}

#adCostPanel .ad-cost-account-toolbar p {
  margin: 4px 0 0;
  color: #6d7974;
  font-size: 12px;
}

#adCostPanel .ad-cost-account-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

#adCostPanel .ad-cost-account-controls .ghost {
  width: auto;
  min-width: 0;
  padding: 0 10px;
}

#adCostPanel .ad-cost-sort-toggle {
  min-width: 76px;
}

#adCostPanel .ad-cost-account-list[hidden],
#adCostPanel .ad-cost-account-table-wrap[hidden] {
  display: none;
}

#adCostPanel .ad-cost-account-table-wrap {
  min-width: 0;
  max-width: 100%;
  margin-top: 0;
}

#adCostPanel .ad-cost-account-table {
  min-width: 940px;
}

#adCostPanel .ad-cost-account-table .ad-cost-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#adCostPanel .ad-cost-account-table td.ad-cost-num b {
  font-weight: 750;
}

#adCostPanel .ad-cost-account-name-cell {
  min-width: 180px;
  max-width: 240px;
}

#adCostPanel .ad-cost-account-name-cell b,
#adCostPanel .ad-cost-account-name-cell small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#adCostPanel .ad-cost-account-row.is-selected > td {
  background: #f2f7fb;
}

#adCostPanel .ad-cost-table-plan-toggle {
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid #6f9fc2;
  border-radius: 8px;
  background: var(--douyin-state-info);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

#adCostPanel .ad-cost-table-plan-toggle:hover {
  border-color: #5f8fb2;
  background: #6f9fc2;
}

#adCostPanel .ad-cost-table-plan-toggle[aria-expanded="true"] {
  border-color: #4f7fa2;
  background: #5f8fb2;
}

#adCostPanel .ad-cost-table-drilldown-row > td {
  padding: 0;
  border-left: 3px solid #80afd0;
  background: #faf9f5;
}

#adCostPanel .ad-cost-table-drilldown-cell .ad-cost-plan-drilldown {
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#adCostPanel .ad-cost-plan-table td:nth-child(3) {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

#adCostPanel .ad-cost-availability {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#adCostPanel .ad-cost-availability article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 14px;
  border: 1px solid #eadfc9;
  border-radius: 12px;
  background: #fffbf4;
}

#adCostPanel .ad-cost-availability p {
  grid-column: 1 / -1;
  margin: 0;
  color: #6f624b;
  line-height: 1.55;
}

#adCostPanel .ad-cost-plan-panel {
  outline: none;
}

#adCostPanel .ad-cost-plan-panel:focus-visible {
  border-radius: 12px;
  box-shadow: 0 0 0 3px rgba(128, 175, 208, 0.28);
}

#adCostPanel .ad-cost-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: #3f5f56;
}

#adCostPanel .ad-cost-plan-head div {
  display: grid;
  gap: 4px;
}

#adCostPanel .ad-cost-plan-head span {
  color: #6d7974;
  font-size: 13px;
}

#adCostPanel .ad-cost-plan-table {
  width: 100%;
  min-width: 640px;
}

#adCostPanel .ad-cost-plan-table td:first-child {
  min-width: 200px;
}

@media (max-width: 1024px) {
  #adCostPanel .ad-cost-plan-drilldown {
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  #adCostPanel .ad-cost-plan-panel,
  #adCostPanel .ad-cost-availability {
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
}

#adCostPanel .ad-stage2-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

#adCostPanel .ad-cost-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--douyin-border);
  border-radius: 16px;
  background: var(--douyin-surface-soft);
  box-shadow: var(--douyin-shadow-card);
}

#adCostPanel .ad-cost-module--formal {
  border-color: #dccdbd;
}

#adCostPanel .ad-cost-module--live {
  border-color: #e2c899;
  background: #fffdf8;
}

#adCostPanel .ad-observation-object-controls {
  justify-self: start;
}

#adCostPanel .ad-observation-object-controls .ghost {
  width: auto;
  min-width: 0;
  padding: 0 12px;
}

#adCostPanel .ad-cost-module-head {
  margin: 0;
  align-items: center;
}

#adCostPanel .ad-cost-module-head h3 {
  margin: 0;
  font-size: 20px;
}

#adCostPanel .ad-stage2-subsection {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--douyin-border);
  border-radius: 14px;
  background: var(--douyin-surface);
}

#adCostPanel .ad-stage2-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#adCostPanel .ad-stage2-subhead h4 {
  margin: 0;
  font-size: 16px;
}

#adCostPanel .ad-stage2-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

#adCostPanel .ad-stage2-grid .profit-kpi {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--douyin-border);
  border-radius: 12px;
  background: var(--douyin-surface);
}

#adCostPanel .ad-stage2-grid strong,
#adCostPanel .ad-stage2-table td {
  font-variant-numeric: tabular-nums;
}

#adCostPanel .ad-stage2-table td:nth-child(n + 2) {
  text-align: right;
}

#adCostPanel .ad-stage2-table td:first-child,
#adCostPanel .ad-stage2-table td:last-child {
  text-align: left;
}

#adCostPanel .ad-stage2-caveat {
  margin: 0;
  color: #675f55;
  font-size: 13px;
  line-height: 1.6;
}

#adCostPanel .ad-stage2-caveat--warning {
  padding: 12px 14px;
  border-left: 3px solid #c78a2c;
  background: #fff8e8;
  color: #6f4a14;
  font-weight: 600;
}

#adCostPanel .ad-conversion-funnel {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

#adCostPanel .ad-conversion-node {
  --ad-conversion-value-size: 18px;
  position: relative;
  display: grid;
  grid-template-rows: minmax(30px, auto) minmax(32px, auto) minmax(30px, auto);
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 108px;
  padding: 12px 8px;
  border: 1px solid var(--douyin-border);
  border-radius: 11px;
  background: #fffdf9;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

#adCostPanel .ad-conversion-node:not(:last-child)::after {
  content: "›";
  position: absolute;
  z-index: 1;
  top: 50%;
  right: -7px;
  color: #9a8f80;
  transform: translateY(-50%);
}

#adCostPanel .ad-conversion-node > span,
#adCostPanel .ad-conversion-node > strong,
#adCostPanel .ad-conversion-node > small {
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

#adCostPanel .ad-conversion-node > span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: center;
  justify-content: center;
  gap: 4px;
  color: var(--douyin-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

#adCostPanel .ad-conversion-node > strong {
  align-self: center;
  color: #312b25;
  font-size: var(--ad-conversion-value-size);
  line-height: 1.25;
}

#adCostPanel .ad-conversion-node > small {
  align-self: center;
  color: var(--douyin-muted);
  font-size: 12px;
  line-height: 1.35;
}

#adCostPanel .ad-conversion-node[data-kind="rate"] {
  background: var(--douyin-state-success-soft);
}

#adCostPanel .ad-conversion-kind {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 0 5px;
  border: 1px solid var(--douyin-state-success);
  border-radius: 999px;
  color: #2f6d59;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
}

#adCostPanel .ad-conversion-node[data-kind="rate"] > strong {
  color: #255e4d;
}

#adCostPanel .ad-conversion-node[data-value-size="compact"] > strong {
  --ad-conversion-value-size: 12px;
  letter-spacing: -1px;
  white-space: nowrap;
}

#adCostPanel .ad-conversion-node[data-value-size="tight"] > strong {
  --ad-conversion-value-size: 12px;
}

#adCostPanel .ad-conversion-node[data-group="traffic"] {
  border-top-color: #8ba9c1;
}

#adCostPanel .ad-conversion-node[data-group="conversion"] {
  border-top-color: #9dbb9a;
}

#adCostPanel .ad-conversion-node[data-group="efficiency"] {
  border-top-color: #d1a36f;
}

#adCostPanel .ad-conversion-node[data-state="partial"],
#adCostPanel .ad-conversion-node[data-state="missing"],
#adCostPanel .ad-conversion-node[data-state="unavailable"],
#adCostPanel .ad-conversion-node[data-state="zero_denominator"] {
  background: #f7f4ef;
}

#adCostPanel .ad-timeslot-trend {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  max-width: 100%;
  padding: 14px;
  border: 1px solid var(--douyin-border);
  border-radius: var(--douyin-radius-card);
  background: var(--douyin-surface);
  box-shadow: var(--douyin-shadow-card);
}

#adCostPanel .ad-timeslot-trend__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  min-width: 0;
}

#adCostPanel .ad-timeslot-trend__header > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#adCostPanel .ad-timeslot-trend__header h4 {
  margin: 0;
  color: var(--douyin-ink);
  font-size: 16px;
  line-height: 1.3;
}

#adCostPanel .ad-timeslot-trend__header p {
  margin: 0;
  color: var(--douyin-muted);
  font-size: 12px;
  line-height: 1.4;
}

#adCostPanel .ad-timeslot-range {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  padding: 3px;
  overflow-x: auto;
  border: 1px solid var(--douyin-border);
  border-radius: 8px;
  background: var(--douyin-surface-soft);
  overscroll-behavior-inline: contain;
}

#adCostPanel .ad-timeslot-range .ghost {
  width: 44px;
  height: 28px;
  min-height: 28px;
  padding: 0 2px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--douyin-muted);
  font-size: 12px;
  box-shadow: none;
  white-space: nowrap;
}

#adCostPanel .ad-timeslot-range .ghost.is-active {
  border-color: var(--douyin-border-strong);
  background: var(--douyin-surface);
  color: #315f51;
  box-shadow: 0 1px 4px rgba(38, 63, 55, 0.08);
}

#adCostPanel .ad-timeslot-trend__scroll {
  min-width: 0;
  max-width: 100%;
}

#adCostPanel .ad-timeslot-trend__body {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

#adCostPanel #adCostTimeslotMetricList {
  display: grid;
  grid-template-rows: repeat(9, minmax(0, 1fr));
  gap: 2px;
  width: 86px;
  height: 300px;
  padding: 3px;
  border: 1px solid var(--douyin-border);
  border-radius: 10px;
  background: var(--douyin-surface-soft);
}

#adCostPanel #adCostTimeslotMetricList button {
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 2px 4px;
  overflow: visible;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--douyin-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: normal;
  text-align: center;
  text-overflow: clip;
  transform: none;
  white-space: normal;
}

#adCostPanel #adCostTimeslotMetricList button:hover {
  border-color: color-mix(in srgb, var(--douyin-border-strong) 72%, transparent);
  background: var(--douyin-surface);
  color: var(--douyin-ink);
  box-shadow: none;
  transform: none;
}

#adCostPanel #adCostTimeslotMetricList button.is-active {
  border-color: var(--douyin-border-strong);
  background: var(--douyin-surface);
  color: #275f50;
  box-shadow: inset 3px 0 0 var(--douyin-state-success), 0 1px 4px rgba(38, 63, 55, 0.07);
}

#adCostPanel #adCostTimeslotMetricList button[data-ad-timeslot-metric="ctr"],
#adCostPanel #adCostTimeslotMetricList button[data-ad-timeslot-metric="cvr"] {
  color: #477665;
}

#adCostPanel #adCostTimeslotMetricList button[data-ad-timeslot-metric="cost"],
#adCostPanel #adCostTimeslotMetricList button[data-ad-timeslot-metric="roas"] {
  border-inline-end-color: color-mix(in srgb, var(--douyin-state-warning) 55%, transparent);
  color: #75603a;
}

#adCostPanel .ad-timeslot-chart-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
  height: 300px;
}

#adCostPanel .ad-timeslot-chart-toolbar {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 32px;
}

#adCostPanel .ad-timeslot-chart-toolbar > strong {
  color: #344a43;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.3;
  white-space: nowrap;
}

#adCostPanel #adCostTimeslotSlotList {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
  min-width: 0;
}

#adCostPanel #adCostTimeslotSlotList button {
  width: 100%;
  height: 27px;
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 4px;
  border: 1px solid color-mix(in srgb, var(--trend-color) 34%, var(--douyin-border));
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: color-mix(in srgb, var(--trend-color) 76%, #27352f);
  font-size: 12px;
  font-weight: 730;
  line-height: 1;
  transform: none;
  white-space: nowrap;
}

#adCostPanel #adCostTimeslotSlotList button > span:first-child {
  color: var(--trend-color);
  font-size: 12px;
  font-weight: 900;
}

#adCostPanel #adCostTimeslotSlotList button:hover {
  border-color: color-mix(in srgb, var(--trend-color) 58%, var(--douyin-border));
  background: color-mix(in srgb, var(--trend-color) 5%, var(--douyin-surface));
  box-shadow: none;
  transform: none;
}

#adCostPanel #adCostTimeslotSlotList button.is-active {
  border-color: color-mix(in srgb, var(--trend-color) 62%, var(--douyin-border));
  background: color-mix(in srgb, var(--trend-color) 7%, var(--douyin-surface));
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--trend-color) 70%, transparent);
}

#adCostPanel .ad-timeslot-chart-frame {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--douyin-border);
  border-radius: 9px;
  background: linear-gradient(180deg, var(--douyin-surface) 0%, var(--douyin-surface-soft) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

#adCostPanel #adCostTimeslotChart {
  display: block;
  width: 100%;
  height: 100%;
}

#adCostPanel #adCostTimeslotChart .grid {
  stroke: color-mix(in srgb, var(--douyin-border) 82%, transparent);
  stroke-width: 1;
}

#adCostPanel #adCostTimeslotChart .axis {
  stroke: var(--douyin-border-strong);
  stroke-width: 1;
}

#adCostPanel #adCostTimeslotChart .trend-line {
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

#adCostPanel #adCostTimeslotChart .trend-area {
  opacity: 0.72;
  pointer-events: none;
}

#adCostPanel #adCostTimeslotChart .trend-hover-rule {
  stroke: color-mix(in srgb, var(--douyin-ink) 28%, transparent);
  stroke-dasharray: 3 4;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

#adCostPanel #adCostTimeslotChart .trend-hover-layer circle {
  stroke: var(--douyin-surface);
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 4px rgba(38, 63, 55, 0.16));
}

#adCostPanel #adCostTimeslotChart .axis-label {
  fill: var(--douyin-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#adCostPanel #adCostTimeslotChart .timeslot-hover-surface {
  cursor: crosshair;
}

#adCostPanel #adCostTimeslotChart .timeslot-hover-surface:focus-visible {
  outline: none;
  stroke: rgba(43, 105, 170, 0.5);
  stroke-width: 2;
}

#adCostPanel .ad-timeslot-chart-frame .trend-tooltip {
  width: 286px;
  max-width: calc(100% - 16px);
  padding: 9px 10px;
  border: 1px solid var(--douyin-border-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 28px rgba(38, 63, 55, 0.13);
}

#adCostPanel .ad-timeslot-chart-frame .trend-tooltip-title {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--douyin-border);
}

#adCostPanel .ad-timeslot-chart-frame .trend-tooltip-title span {
  overflow: hidden;
  color: var(--douyin-muted);
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#adCostPanel .ad-timeslot-chart-frame .trend-tooltip-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  margin-top: 7px;
}

#adCostPanel .ad-timeslot-chart-frame .trend-tooltip-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 1px 8px;
  color: var(--douyin-muted);
  font-size: 12px;
}

#adCostPanel .ad-timeslot-chart-frame .trend-tooltip-row > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

#adCostPanel .ad-timeslot-chart-frame .trend-tooltip-row i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: var(--trend-color);
}

#adCostPanel .ad-timeslot-chart-frame .trend-tooltip-row strong {
  color: var(--douyin-ink);
  font-variant-numeric: tabular-nums;
}

#adCostPanel .ad-timeslot-chart-frame .trend-tooltip-row small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--douyin-muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#adCostPanel #adCostTimeslotStatus {
  min-height: 18px;
  margin: 0;
  color: var(--douyin-muted);
  font-size: 12px;
  line-height: 1.5;
}

#adCostPanel #adCostTimeslotDefinition {
  margin: 0;
  padding-top: 7px;
  border-top: 1px solid color-mix(in srgb, var(--douyin-border) 76%, transparent);
  color: var(--douyin-muted);
  font-size: 12px;
  line-height: 1.55;
}

#adCostPanel #adCostTimeslotRetry {
  justify-self: start;
  width: auto;
  min-width: 72px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--douyin-border-strong);
  background: var(--douyin-surface);
  color: #315f51;
}

#adCostPanel .ad-timeslot-trend [hidden] {
  display: none !important;
}

#adCostPanel .ad-timeslot-range .ghost:focus-visible,
#adCostPanel #adCostTimeslotMetricList button:focus-visible,
#adCostPanel #adCostTimeslotSlotList button:focus-visible {
  outline: 3px solid rgba(43, 105, 170, 0.38);
  outline-offset: 2px;
}

#adCostPanel .ad-conversion-data-through,
#adCostPanel .ad-conversion-definition {
  margin: 0;
  color: var(--douyin-muted);
  font-size: 12px;
  line-height: 1.5;
}

#adCostPanel .ad-finance-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  min-width: 0;
}

#adCostPanel .ad-finance-workspace > .ad-stage2-subsection {
  min-width: 0;
  align-self: start;
}

#adCostPanel .ad-stage2-grid--compensation {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#adCostPanel .ad-stage2-compensation {
  scroll-margin-top: 24px;
}

#adCostPanel .ad-stage2-compensation.is-anchor-target {
  animation: ad-cost-anchor-flash 1.6s ease-out;
}

@keyframes ad-cost-anchor-flash {
  0% {
    box-shadow: 0 0 0 3px rgba(217, 142, 43, 0.65);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(217, 142, 43, 0);
  }
}

#adCostPanel .ad-comp-source {
  display: inline-block;
  min-width: 0;
  padding: 2px 8px;
  border: 1px solid var(--douyin-border);
  border-radius: 999px;
  color: var(--douyin-muted);
  font-size: var(--type-support);
  font-weight: 700;
  line-height: 1.4;
}

#adCostPanel .ad-comp-source--standard {
  border-color: color-mix(in srgb, #2b69aa 45%, transparent);
  color: #2b69aa;
}

#adCostPanel .ad-finance-comp-link {
  color: #2b69aa;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

#adCostPanel .ad-finance-comp-link:hover {
  color: #1f4f84;
}

#adCostPanel .ad-finance-comp-link:focus-visible {
  outline: 3px solid rgba(43, 105, 170, 0.35);
  outline-offset: 2px;
}

#adCostPanel .ad-stage2-legacy-rows {
  min-width: 0;
  border: 1px solid var(--douyin-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--douyin-surface) 78%, transparent);
}

#adCostPanel .ad-stage2-legacy-rows > summary {
  min-height: 40px;
  padding: 8px 14px;
  color: var(--douyin-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

#adCostPanel .ad-stage2-legacy-rows > summary::marker {
  color: var(--douyin-muted);
}

#adCostPanel .ad-stage2-legacy-rows > .ad-stage2-table-wrap {
  margin: 0 10px 10px;
}

#adCostPanel .ad-observation-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

#adCostPanel .ad-observation-workspace > * {
  min-width: 0;
}

#adCostPanel .ad-observation-list-wrap {
  box-sizing: border-box;
  height: 260px;
  padding: 12px;
  border: 1px solid var(--douyin-border);
  border-radius: 12px;
  background: var(--douyin-surface-soft);
  overflow-x: visible;
  overflow-y: auto;
}

#adCostPanel .ad-observation-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dfd3bd;
  border-radius: 12px;
  background: #fffdf9;
  scroll-margin-top: 24px;
}

#adCostPanel .ad-observation-detail-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-width: 0;
}

#adCostPanel .ad-observation-detail-head .ghost {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

#adCostPanel .ad-observation-detail-heading {
  flex: 1 1 auto;
  min-width: 0;
}

#adCostPanel .ad-observation-detail-heading h4 {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

#adCostPanel .ad-room-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 6px;
  min-width: 0;
  margin-top: 6px;
}

#adCostPanel .ad-room-context__tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid color-mix(in srgb, var(--douyin-state-success) 34%, var(--douyin-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--douyin-state-success-soft) 72%, var(--douyin-surface));
  color: #315f51;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#adCostPanel #adCostObservationDetailMeta {
  margin: 2px 0 0;
  color: var(--douyin-muted);
  font-size: var(--type-support);
  line-height: 1.4;
}

#adCostPanel .ad-observation-data-through {
  margin: 2px 0 0;
  color: var(--douyin-muted);
  font-size: var(--type-support);
  line-height: 1.4;
}

#adCostPanel .ad-observation-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}

#adCostPanel .ad-observation-detail-grid > * {
  min-width: 0;
}

#adCostPanel .ad-observation-detail-grid > [hidden] {
  display: none;
}

#adCostPanel .ad-observation-chart-panel {
  display: grid;
  gap: 6px;
  align-content: start;
  box-sizing: border-box;
  height: 260px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--douyin-border);
  border-radius: 12px;
  background: var(--douyin-surface-soft);
}

#adCostPanel .ad-observation-chart-panel .legend {
  justify-content: flex-start;
  gap: 12px;
}

#adCostPanel .ad-observation-chart-frame {
  height: 212px;
}

#adCostPanel .ad-observation-point-details {
  min-width: 0;
}

#adCostPanel .ad-observation-point-details > summary {
  cursor: pointer;
  padding: 2px 0;
  color: var(--douyin-muted);
  font-size: 12px;
}

#adCostPanel .ad-observation-point-details[open] > summary {
  margin-bottom: 6px;
}

#adCostPanel .ad-observation-detail-table {
  padding: 6px 8px;
  border: 1px solid var(--douyin-border);
  border-radius: 10px;
  background: var(--douyin-surface);
  overflow-x: auto;
}

#adCostPanel .ad-observation-detail .ad-observation-detail-table .ad-stage2-table {
  display: table;
  width: 100%;
  border-collapse: collapse;
}

#adCostPanel .ad-observation-detail .ad-observation-detail-table .ad-stage2-table tbody {
  display: table-row-group;
}

#adCostPanel .ad-observation-detail .ad-observation-detail-table .ad-stage2-table thead {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border: 0;
}

#adCostPanel .ad-observation-detail .ad-observation-detail-table .ad-stage2-table tr {
  display: table-row;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#adCostPanel .ad-observation-detail .ad-observation-detail-table .ad-stage2-table th,
#adCostPanel .ad-observation-detail .ad-observation-detail-table .ad-stage2-table td {
  display: table-cell;
  padding: 5px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--douyin-border) 72%, transparent);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  white-space: normal;
}

#adCostPanel .ad-observation-detail .ad-observation-detail-table .ad-stage2-table th {
  color: var(--douyin-muted);
  font-size: 12px;
  font-weight: 700;
}

#adCostPanel .ad-observation-detail .ad-observation-detail-table .ad-stage2-table tr:last-child td {
  border-bottom: 0;
}

#adCostPanel .ad-observation-detail .ad-observation-detail-table .ad-stage2-table td::before {
  content: none;
}

#adCostPanel .ad-observation-detail .ad-observation-detail-table .ad-stage2-table td small {
  display: block;
  color: var(--douyin-muted);
  font-size: var(--type-support);
}

#adCostPanel .ad-observation-list-more {
  width: 100%;
  margin-top: 10px;
}

#adCostPanel .ad-observation-list-more[hidden],
#adCostPanel #adCostObservationBreakdownWrap[hidden] {
  display: none;
}

#adCostPanel .ad-observation-workspace .ad-stage2-table {
  display: table;
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

#adCostPanel .ad-observation-workspace .ad-stage2-table tbody {
  display: table-row-group;
}

#adCostPanel .ad-observation-workspace .ad-stage2-table thead {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border: 0;
}

#adCostPanel .ad-observation-list-wrap .ad-stage2-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--douyin-surface-soft);
}

#adCostPanel .ad-observation-list-wrap .ad-stage2-table {
  table-layout: fixed;
}

#adCostPanel .ad-observation-list-wrap .ad-stage2-table .ad-observation-cell-cost {
  width: 92px;
}

#adCostPanel .ad-observation-list-wrap .ad-stage2-table .ad-observation-cell-money {
  width: 84px;
}

#adCostPanel .ad-observation-list-wrap .ad-stage2-table :is(th, td):not(:first-child):not(.ad-observation-cell-cost):not(.ad-observation-cell-money):not(.empty) {
  width: 48px;
}

#adCostPanel .ad-observation-workspace .ad-stage2-table tr {
  display: table-row;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#adCostPanel .ad-observation-workspace .ad-stage2-table th,
#adCostPanel .ad-observation-workspace .ad-stage2-table td {
  display: table-cell;
  padding: 5px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--douyin-border) 72%, transparent);
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

#adCostPanel .ad-observation-workspace .ad-stage2-table th {
  color: var(--douyin-muted);
  font-weight: 700;
}

#adCostPanel .ad-observation-workspace .ad-stage2-table tbody tr:last-child td {
  border-bottom: 0;
}

#adCostPanel .ad-observation-workspace .ad-stage2-table td::before {
  content: none;
}

#adCostPanel .ad-observation-list-wrap .ad-stage2-table :is(th, td):not(:first-child):not(.empty) {
  text-align: right;
}

#adCostPanel .ad-observation-list-wrap .ad-stage2-table tbody tr[data-ad-observation-id] {
  cursor: pointer;
}

#adCostPanel .ad-observation-list-wrap .ad-stage2-table tbody tr[data-ad-observation-id]:hover {
  background: rgba(217, 142, 43, 0.08);
}

#adCostPanel .ad-observation-list-wrap .ad-stage2-table tbody tr:focus-visible {
  outline: 3px solid rgba(43, 105, 170, 0.35);
  outline-offset: -2px;
}

#adCostPanel .ad-observation-workspace .ad-stage2-table tr.is-selected {
  box-shadow: inset 3px 0 0 #d98e2b;
  background: rgba(217, 142, 43, 0.12);
}

#adCostPanel .ad-observation-list-wrap .ad-stage2-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

#adCostPanel .ad-observation-workspace .ad-stage2-table .ad-observation-cell-name small {
  display: block;
  margin: 0;
  overflow: hidden;
  color: var(--douyin-muted);
  font-size: var(--type-support);
  line-height: 1.2;
  text-overflow: ellipsis;
}

#adCostPanel .ad-observation-workspace .ad-stage2-table .ad-observation-cell-cost {
  font-weight: 700;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table-wrap {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--douyin-border);
  border-radius: 12px;
  background: var(--douyin-surface-soft);
  overflow-x: visible;
}

#adCostPanel .ad-finance-workspace .ad-finance-table-wrap {
  max-height: 300px;
  overflow-y: auto;
}

#adCostPanel .ad-finance-workspace .ad-stage2-grid {
  gap: 8px;
}

#adCostPanel .ad-finance-workspace .ad-stage2-grid .profit-kpi {
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  padding: 8px 12px;
}

#adCostPanel .ad-finance-workspace .ad-stage2-grid .profit-kpi > strong {
  font-size: 15px;
}

#adCostPanel .ad-finance-workspace .ad-stage2-grid .profit-kpi > small {
  flex-basis: 100%;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table {
  display: table;
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table tbody {
  display: table-row-group;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table thead {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border: 0;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--douyin-surface-soft);
}

#adCostPanel .ad-finance-workspace .ad-stage2-table tr {
  display: table-row;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table th,
#adCostPanel .ad-finance-workspace .ad-stage2-table td {
  display: table-cell;
  padding: 5px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--douyin-border) 72%, transparent);
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table th {
  color: var(--douyin-muted);
  font-weight: 700;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table tbody tr:last-child td {
  border-bottom: 0;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table td::before {
  content: none;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table .ad-finance-col-source {
  width: 64px;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table .ad-finance-col-money {
  width: 96px;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table .ad-finance-col-status {
  width: 76px;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table .ad-finance-cell-money {
  font-weight: 700;
  text-align: right;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table .ad-finance-cell-name,
#adCostPanel .ad-finance-workspace .ad-stage2-table .ad-finance-cell-source,
#adCostPanel .ad-finance-workspace .ad-stage2-table .ad-finance-cell-status {
  text-align: left;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table .ad-finance-cell-name small {
  display: block;
  margin: 0;
  overflow: hidden;
  color: var(--douyin-muted);
  font-size: var(--type-support);
  line-height: 1.2;
  text-overflow: ellipsis;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table tbody tr[data-ad-finance-row-id],
#adCostPanel .ad-finance-workspace .ad-stage2-table tbody tr[data-ad-comp-row-id] {
  cursor: pointer;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table tbody tr[data-ad-finance-row-id]:hover,
#adCostPanel .ad-finance-workspace .ad-stage2-table tbody tr[data-ad-comp-row-id]:hover {
  background: rgba(217, 142, 43, 0.08);
}

#adCostPanel .ad-finance-workspace .ad-stage2-table tbody tr:focus-visible {
  outline: 3px solid rgba(43, 105, 170, 0.35);
  outline-offset: -2px;
}

#adCostPanel .ad-finance-workspace .ad-stage2-table tr.is-selected,
#adCostPanel .ad-finance-workspace .ad-stage2-table tr.is-expanded {
  box-shadow: inset 3px 0 0 #d98e2b;
  background: rgba(217, 142, 43, 0.12);
}

#adCostPanel .ad-finance-workspace .ad-stage2-table .ad-finance-detail-cell {
  padding: 8px 10px;
  overflow: visible;
  background: color-mix(in srgb, var(--douyin-surface) 82%, transparent);
  text-overflow: clip;
  white-space: normal;
}

#adCostPanel .ad-finance-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  margin: 0;
}

#adCostPanel .ad-finance-detail-grid dt {
  color: var(--douyin-muted);
  font-size: var(--type-support);
  font-weight: 700;
  line-height: 1.3;
}

#adCostPanel .ad-finance-detail-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.35;
}

#adCostPanel .ad-finance-detail-grid dd small {
  color: var(--douyin-muted);
  font-size: var(--type-support);
}

#adCostPanel .ad-live-point-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#adCostPanel :is(button, select, input):focus-visible {
  outline: 3px solid rgba(43, 105, 170, 0.35);
  outline-offset: 2px;
}

#adCostPanel .ad-live-point-actions button {
  flex: 0 1 auto;
  width: auto;
  height: auto;
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: normal;
}

#adCostPanel > .section-head,
#adCostPanel > .section-head > *,
#adCostPanel .ad-stage2-stack,
#adCostPanel .ad-cost-module,
#adCostPanel .ad-cost-module-head,
#adCostPanel .ad-cost-module-head > *,
#adCostPanel .ad-stage2-subsection,
#adCostPanel .ad-stage2-subhead,
#adCostPanel .ad-stage2-subhead > *,
#adCostPanel .ad-stage2-grid,
#adCostPanel .ad-stage2-table-wrap,
#adCostPanel .ad-live-point-actions {
  min-width: 0;
  max-width: 100%;
}

#adCostPanel .ad-observation-workspace,
#adCostPanel .ad-observation-detail {
  min-width: 0;
  max-width: 100%;
}

#adCostPanel .ad-cost-module-head p,
#adCostPanel .ad-stage2-table td,
#adCostPanel .ad-live-point-actions button {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 1320px) {
  #adCostPanel .ad-conversion-funnel {
    gap: 6px;
  }

  #adCostPanel .ad-conversion-node {
    --ad-conversion-value-size: 16px;
    min-height: 104px;
    padding: 10px 2px;
  }

  #adCostPanel .ad-conversion-node > strong {
    font-size: 16px;
  }

  #adCostPanel .ad-conversion-node:not(:last-child)::after {
    right: -5px;
  }
}

#adCostPanel .ad-stage2-table td,
#adCostPanel .ad-cost-plan-table td {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 1180px) {
  #adCostPanel .ad-cost-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #adCostPanel .ad-finance-workspace,
  #adCostPanel .ad-observation-workspace,
  #adCostPanel .ad-observation-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #adCostPanel .ad-stage2-table-wrap,
  #adCostPanel .ad-cost-plan-panel > .profit-table-wrap {
    min-width: 0;
    max-width: 100%;
    overflow-x: visible;
  }

  #adCostPanel .ad-stage2-table thead,
  #adCostPanel .ad-cost-plan-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  #adCostPanel .ad-stage2-table,
  #adCostPanel .ad-stage2-table tbody,
  #adCostPanel .ad-cost-plan-table,
  #adCostPanel .ad-cost-plan-table tbody {
    display: grid;
    width: 100%;
    min-width: 0;
  }

  #adCostPanel .ad-stage2-table tr,
  #adCostPanel .ad-cost-plan-table tr {
    display: grid;
    gap: 2px;
    min-width: 0;
    margin: 0 0 12px;
    padding: 14px;
    border: 1px solid var(--douyin-border);
    border-radius: var(--douyin-radius-card);
    background: var(--douyin-surface);
    box-shadow: var(--douyin-shadow-card);
  }

  #adCostPanel .ad-stage2-table td,
  #adCostPanel .ad-cost-plan-table td {
    display: grid;
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 9px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--douyin-border) 72%, transparent);
    overflow-wrap: anywhere;
    text-align: left;
    white-space: normal;
  }

  #adCostPanel .ad-stage2-table td:last-child,
  #adCostPanel .ad-cost-plan-table td:last-child {
    border-bottom: 0;
  }

  #adCostPanel .ad-stage2-table td::before,
  #adCostPanel .ad-cost-plan-table td::before {
    content: attr(data-label);
    min-width: 0;
    color: var(--douyin-muted);
    font-size: var(--type-support);
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 1100px) {
  .net-profit-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #adCostPanel .ad-stage2-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  #adCostPanel .ad-cost-module {
    gap: 14px;
    padding: 16px;
  }

  #adCostPanel .ad-cost-account-list {
    grid-template-columns: minmax(0, 1fr);
  }

  #adCostPanel .ad-stage2-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #adCostPanel .ad-stage2-subhead {
    align-items: flex-start;
    flex-direction: column;
  }

  #adCostPanel .ad-stage2-table td,
  #adCostPanel .ad-cost-plan-table td {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  #adCostPanel .ad-live-point-actions {
    width: 100%;
  }

  #adCostPanel .ad-live-point-actions button {
    min-height: 44px;
  }

  #adCostPanel .ad-cost-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #adCostPanel .ad-cost-meta-strip,
  #adCostPanel .ad-cost-meta-details {
    min-width: 0;
    max-width: 100%;
  }

  #adCostPanel .ad-cost-plan-drilldown {
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  #adCostPanel .ad-cost-availability {
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  #adCostPanel .ad-cost-availability article {
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  #adCostPanel .ad-stage2-table-wrap {
    overflow-x: visible;
  }

  #adCostPanel .ad-stage2-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  #adCostPanel .ad-stage2-table,
  #adCostPanel .ad-stage2-table tr,
  #adCostPanel .ad-stage2-table td {
    box-sizing: border-box;
  }

  #adCostPanel .ad-stage2-table,
  #adCostPanel .ad-stage2-table tbody,
  #adCostPanel .ad-stage2-table tr,
  #adCostPanel .ad-stage2-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #adCostPanel .ad-stage2-table tr {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #ebe5dd;
    border-radius: 12px;
  }

  #adCostPanel .ad-stage2-table td {
    display: grid;
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    overflow-wrap: anywhere;
    text-align: right;
  }

  #adCostPanel .ad-stage2-table td::before {
    content: attr(data-label);
    color: #72695f;
    text-align: left;
    font-weight: 600;
  }
}

@media (prefers-reduced-motion: reduce) {
  #adCostPanel * {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
  }
}

/* Douyin pastel semantic visual system v1 */
body {
  --douyin-page-bg: #f3f6f5;
  --douyin-surface: #ffffff;
  --douyin-surface-soft: #f7faf9;
  --douyin-surface-muted: #f0f5f3;
  --douyin-border: #dce6e2;
  --douyin-border-strong: #cad9d4;
  --douyin-ink: #1b2a26;
  --douyin-muted: #64736d;
  --douyin-source-live: #6fcbbd;
  --douyin-source-live-soft: #edf9f7;
  --douyin-source-short: #83bde5;
  --douyin-source-short-soft: #f0f7fc;
  --douyin-source-product: #efa98d;
  --douyin-source-product-soft: #fdf4f0;
  --douyin-source-unassigned: #aab6c5;
  --douyin-source-unassigned-soft: #f3f6f9;
  --douyin-state-success: #72b99a;
  --douyin-state-success-soft: #eef8f3;
  --douyin-state-warning: #d7b36a;
  --douyin-state-warning-soft: #fbf7eb;
  --douyin-state-danger: #d99094;
  --douyin-state-danger-soft: #fcf2f3;
  --douyin-state-info: #80afd0;
  --douyin-state-info-soft: #f0f6fa;
  --douyin-radius-panel: 16px;
  --douyin-radius-card: 12px;
  --douyin-shadow-panel: 0 8px 24px rgba(38, 63, 55, 0.055);
  --douyin-shadow-card: 0 4px 14px rgba(38, 63, 55, 0.04);
  --bg: var(--douyin-page-bg);
  --surface-2: var(--douyin-surface-soft);
  --border: var(--douyin-border);
  --commerce-card-shadow: var(--douyin-shadow-panel);
  --commerce-card-shadow-hover: 0 12px 28px rgba(38, 63, 55, 0.08);
  background: var(--douyin-page-bg);
}

.topbar::before {
  background: linear-gradient(180deg, rgba(243, 246, 245, 0.98), rgba(243, 246, 245, 0.84));
}

.topbar,
.status-meta-strip {
  border-color: var(--douyin-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--douyin-shadow-panel);
}

.module-tabs {
  border-color: var(--douyin-border);
  background: var(--douyin-surface-soft);
}

.module-tabs a:hover {
  background: var(--douyin-state-success-soft);
}

.module-tabs a.is-active {
  background: var(--douyin-state-success-soft);
}

.customer-retention-panel {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--douyin-border);
  border-radius: var(--douyin-radius-panel);
  background: var(--douyin-surface);
  box-shadow: var(--douyin-shadow-panel);
}

.customer-retention-header {
  align-items: end;
  gap: 16px;
}

.customer-retention-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.customer-retention-filters label {
  display: grid;
  gap: 4px;
  min-width: 138px;
}

.customer-retention-filters input {
  min-height: 36px;
}

.customer-retention-follow {
  border-color: transparent;
}

.customer-retention-status,
.customer-retention-footnote,
.customer-retention-detail-heading p {
  margin: 0;
  color: var(--muted);
}

.customer-retention-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
}

.customer-retention-shop-card {
  display: grid;
  gap: 10px;
  min-height: 188px;
  padding: 14px 16px;
  border: 1px solid var(--douyin-border);
  border-radius: var(--douyin-radius-card);
  background: var(--douyin-surface);
  box-shadow: var(--douyin-shadow-card);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.customer-retention-shop-card strong {
  color: var(--text);
}

.customer-retention-shop-card.is-selected {
  border-color: var(--douyin-state-success);
  background: var(--douyin-state-success-soft);
}

.customer-retention-card-head,
.customer-retention-customer-mix {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.customer-retention-card-head > span,
.customer-retention-metrics small {
  color: var(--muted);
}

.customer-retention-customer-mix > span,
.customer-retention-metrics > span {
  display: grid;
  gap: 3px;
}

.customer-retention-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.customer-retention-metrics > span {
  padding: 8px;
  border-radius: 8px;
  background: var(--douyin-surface-soft);
  text-align: left;
}

.customer-retention-detail {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.customer-retention-detail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.customer-retention-detail-heading h3 {
  margin: 0;
}

.customer-retention-table-wrap {
  border: 1px solid var(--douyin-border);
  border-radius: var(--douyin-radius-card);
}

.customer-retention-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.customer-retention-table-wrap th,
.customer-retention-table-wrap td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--douyin-border);
  text-align: left;
  white-space: nowrap;
}

.customer-retention-table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.trend-panel,
.shop-sales-panel,
#treePanel,
#profitPanel,
#adCostPanel,
#creatorCommissionPanel,
#netProfitPanel,
#issuesPanel {
  border-color: var(--douyin-border);
  border-radius: var(--douyin-radius-panel);
  background: var(--douyin-surface);
  box-shadow: var(--douyin-shadow-panel);
}

.trend-panel .chart-frame,
.profit-controls,
.creator-commission-table-wrap--nodes,
.creator-commission-ledger,
.net-profit-controls,
.profit-table-wrap {
  border-color: var(--douyin-border);
  background: var(--douyin-surface-soft);
}

.shop-sales-card,
.profit-kpi,
.creator-commission-kpi,
.creator-commission-ledger-row,
.issues-panel--commerce .issue-card {
  border-color: var(--douyin-border);
  border-radius: var(--douyin-radius-card);
  background: var(--douyin-surface);
  box-shadow: var(--douyin-shadow-card);
}

/* Business-source colors are reserved for source identity. */
#overviewPanel .metric-card.live {
  --overview-kpi-accent: var(--douyin-source-live);
  --overview-kpi-accent-deep: #347e72;
}

#overviewPanel .metric-card.short_video {
  --overview-kpi-accent: var(--douyin-source-short);
  --overview-kpi-accent-deep: #477f9f;
}

#overviewPanel .metric-card.product_card {
  --overview-kpi-accent: var(--douyin-source-product);
  --overview-kpi-accent-deep: #9a624e;
}

#overviewPanel .metric-card:is(.live, .short_video, .product_card) {
  border-color: var(--douyin-border);
  border-top-color: var(--overview-kpi-accent);
  background: color-mix(in srgb, var(--overview-kpi-accent) 7%, var(--douyin-surface));
  box-shadow: var(--douyin-shadow-card);
}

#overviewPanel .metric-card.unassigned {
  --overview-kpi-accent: var(--douyin-source-unassigned);
  --overview-kpi-accent-deep: #5d6f82;
  border-color: #dce3ea;
  border-top-color: var(--douyin-source-unassigned);
  background: var(--douyin-source-unassigned-soft);
  color: var(--douyin-ink);
  box-shadow: var(--douyin-shadow-card);
}

#overviewPanel .metric-card.unassigned :is(h3, strong) {
  color: #526579;
}

#overviewPanel .metric-card.unassigned :is(dt, dd) {
  color: var(--douyin-ink);
}

#overviewPanel .metric-card.total {
  --overview-kpi-accent: var(--douyin-state-success);
  --overview-kpi-accent-deep: #286c58;
  border-color: #d3e6dd;
  border-top-color: var(--douyin-state-success);
  background: var(--douyin-state-success-soft);
  box-shadow: var(--douyin-shadow-card);
}

#overviewPanel .metric-progress {
  background: var(--douyin-surface-muted);
}

#overviewPanel .metric-risk-row {
  border-color: var(--douyin-border);
  background: var(--douyin-surface-soft);
}

#overviewPanel .metric-risk-row.is-ok {
  border-color: #d7e9e0;
  background: var(--douyin-state-success-soft);
}

#overviewPanel .metric-risk-row.is-pending {
  border-color: #eadcb9;
  background: var(--douyin-state-warning-soft);
}

#overviewPanel .metric-risk-row.is-exception {
  border-color: #eccfd2;
  background: var(--douyin-state-danger-soft);
}

.shop-sales-card,
.shop-sales-card:nth-child(2n),
.shop-sales-card:nth-child(3n) {
  --shop-sales-accent: var(--douyin-state-success);
}

.shop-sales-value,
.shop-sales-skeleton {
  border-color: var(--douyin-border);
  background: var(--douyin-surface-soft);
}

/* Attribution keeps source identity without saturated title blocks. */
.tree-panel {
  --attribution-card-surface: var(--douyin-surface);
  --attribution-card-border: var(--douyin-border);
  --attribution-live-accent: var(--douyin-source-live);
  --attribution-short-accent: var(--douyin-source-short);
  --attribution-product-accent: var(--douyin-source-product);
  --attribution-neutral-accent: var(--douyin-source-unassigned);
  --attribution-ink: var(--douyin-ink);
}

.tree-card {
  border-color: var(--douyin-border);
  box-shadow: var(--douyin-shadow-card);
}

.tree-card.live {
  --tree-soft: var(--douyin-source-live-soft);
  --tree-ink: #286f65;
}

.tree-card.short_video {
  --tree-soft: var(--douyin-source-short-soft);
  --tree-ink: #416f8d;
}

.tree-card.product_card {
  --tree-soft: var(--douyin-source-product-soft);
  --tree-ink: #8d5945;
}

.tree-card > header {
  background: var(--tree-soft);
  color: var(--tree-ink);
  border-bottom-color: color-mix(in srgb, var(--tree-accent) 26%, var(--douyin-border));
}

.tree-card > header::before {
  height: 3px;
  background: var(--tree-accent);
  opacity: 0.68;
}

.tree-card h3 {
  color: var(--tree-ink);
}

.tree-card p {
  color: color-mix(in srgb, var(--tree-ink) 74%, #ffffff);
}

.tree-total {
  border-color: color-mix(in srgb, var(--tree-accent) 20%, var(--douyin-border));
  background: rgba(255, 255, 255, 0.74);
}

.group-block > header,
.tree-card .node-row:hover,
.tree-card .subject-row:hover {
  background: color-mix(in srgb, var(--tree-soft) 82%, #ffffff);
}

/* Metric colors describe sales, refund, cost, profit and data-state roles. */
.sku-profit-workbench {
  --sku-profit-accent: var(--douyin-state-success);
  --sku-refund-accent: var(--douyin-state-danger);
  --sku-cost-accent: var(--douyin-state-warning);
  --sku-sales-accent: var(--douyin-state-info);
  --sku-gap-accent: var(--douyin-state-danger);
}

.sku-profit-workbench .profit-controls,
.net-profit-controls {
  border-color: var(--douyin-border);
  background: var(--douyin-surface-soft);
}

.sku-profit-workbench .profit-kpi {
  background: color-mix(in srgb, var(--sku-sales-accent) 5%, #ffffff);
}

.sku-profit-workbench .profit-kpi.is-refund {
  background: var(--douyin-state-danger-soft);
}

.sku-profit-workbench .profit-kpi.is-cost {
  background: var(--douyin-state-warning-soft);
}

.sku-profit-workbench .profit-kpi.is-profit {
  background: var(--douyin-state-success-soft);
}

.sku-profit-workbench .profit-kpi.is-gap {
  background: var(--douyin-state-danger-soft);
}

.sku-profit-workbench .profit-note-card,
.net-profit-panel .profit-note-card,
#adCostPanel .profit-note-card,
.creator-commission-ledger-note {
  border-color: #eadfbe;
  background: var(--douyin-state-warning-soft);
}

.profit-table-wrap--sku .profit-table th,
.profit-table-wrap--refund .profit-table th,
.net-profit-table th,
.creator-commission-table thead th {
  background: var(--douyin-surface-muted);
  color: #40534c;
}

#adCostPanel {
  box-shadow: var(--douyin-shadow-panel);
}

#adCostPanel .ad-cost-reconcile,
#adCostPanel .ad-cost-meta-details {
  box-shadow: var(--douyin-shadow-card);
}

#adCostPanel .ad-quality-chip.actual {
  background: var(--douyin-state-success-soft);
  color: #43725f;
}

#adCostPanel .ad-quality-chip.estimated,
#adCostPanel .ad-quality-chip.pending,
#adCostPanel .profit-status.is-warn {
  border-color: #e8d9b4;
  background: var(--douyin-state-warning-soft);
  color: #7c6637;
}

#adCostPanel .ad-quality-chip.missing,
#adCostPanel .ad-quality-chip.conflict {
  background: var(--douyin-state-danger-soft);
  color: #87575c;
}

.creator-commission-workbench {
  --commission-accent: var(--douyin-state-success);
  --commission-green: var(--douyin-state-success);
  --commission-blue: var(--douyin-state-info);
  --commission-amber: var(--douyin-state-warning);
  --commission-red: var(--douyin-state-danger);
  --commission-ink: var(--douyin-ink);
  --commission-soft: var(--douyin-surface-soft);
  --commission-border: var(--douyin-border);
}

.creator-commission-kpi {
  background: color-mix(in srgb, var(--commission-tone, var(--commission-accent)) 7%, #ffffff);
  box-shadow: var(--douyin-shadow-card);
}

.creator-commission-ledger,
.creator-commission-ledger-row,
.creator-commission-ledger-row:nth-child(even) {
  background: var(--douyin-surface);
}

.creator-commission-ledger-metrics span {
  background: var(--douyin-surface-soft);
}

.creator-commission-issue-head,
.creator-commission-issue-card {
  border-color: #eadfbe;
  background: var(--douyin-state-warning-soft);
}

.creator-commission-node-row[data-commission-node-status="actual"] {
  border-left-color: var(--douyin-state-success);
  background: var(--douyin-state-success-soft);
}

.creator-commission-node-row[data-commission-node-status="pending"] {
  border-left-color: var(--douyin-state-warning);
  background: var(--douyin-state-warning-soft);
}

.creator-commission-node-row[data-commission-node-status="conflict"] {
  border-left-color: var(--douyin-state-danger);
  background: var(--douyin-state-danger-soft);
}

.net-profit-panel {
  border-color: var(--douyin-border);
  background: var(--douyin-surface);
}

.net-profit-panel .profit-kpi {
  border-color: var(--douyin-border);
  border-radius: var(--douyin-radius-card);
  background: var(--douyin-surface);
  box-shadow: var(--douyin-shadow-card);
}

.net-profit-kpi.is-sales,
.net-profit-kpi.is-volume {
  background: var(--douyin-state-info-soft);
}

.net-profit-kpi.is-base,
.net-profit-kpi.is-profit {
  background: var(--douyin-state-success-soft);
}

.net-profit-kpi.is-cost,
.net-profit-kpi.is-gap {
  background: var(--douyin-state-warning-soft);
}

.net-profit-kpi.is-sales::before,
.net-profit-kpi.is-volume::before {
  background: var(--douyin-state-info);
}

.net-profit-kpi.is-base::before,
.net-profit-kpi.is-profit::before {
  background: var(--douyin-state-success);
}

.net-profit-kpi.is-cost::before,
.net-profit-kpi.is-gap::before {
  background: var(--douyin-state-warning);
}

.issues-panel--commerce {
  background: var(--douyin-surface);
}

.issues-panel--commerce .issue-card {
  background: var(--douyin-source-unassigned-soft);
}

.issues-panel--commerce .issue-total,
.issues-panel--commerce .gap-trigger {
  border-color: var(--douyin-border);
  background: var(--douyin-surface);
}

.issue-meta-row i {
  background: var(--douyin-state-info-soft);
  color: #536f82;
}

/* Desktop profit composition: fixed vertical bars, no mobile chart variant. */
.profit-composition { margin: 18px 0; padding: 20px; border: 1px solid var(--douyin-border, #e2e6eb); border-radius: 12px; background: #fff; }
.profit-composition-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.profit-composition h3 { margin: 0; font-size: 17px; color: #25354a; }
.profit-composition-head p { margin: 7px 0 0; font-size: 12px; color: #68778a; line-height: 1.6; }
.profit-composition-ranges { display: flex; gap: 4px; padding: 3px; border: 1px solid #e3e8ee; border-radius: 8px; background: #f4f7fa; flex-shrink: 0; }
.profit-composition-ranges button { min-width: 62px; height: 30px; padding: 0 10px; border: 0; border-radius: 5px; color: #536579; background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.profit-composition-ranges button[aria-pressed="true"] { color: #1767a9; background: #fff; box-shadow: 0 1px 4px #243b5320; font-weight: 650; }
.profit-composition button:focus-visible { outline: 2px solid #2179bd; outline-offset: 2px; }
#profitCompositionSummary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin: 18px 0 4px; font-size: 12px; color: #657589; font-variant-numeric: tabular-nums; }
#profitCompositionSummary b { margin-left: 6px; font-size: 16px; font-weight: 650; color: #25354a; }
#profitCompositionChart { width: 100%; min-width: 0; min-height: 320px; }
#profitCompositionChart svg { display: block; overflow: visible; font-family: inherit; font-variant-numeric: tabular-nums; }
.profit-chart-grid { stroke: #e9edf2; stroke-width: 1; }
.profit-chart-zero { stroke: #aebbc9; stroke-width: 1; }
.profit-chart-tick { fill: #718093; font-size: 12px; }
.profit-chart-label { fill: #415269; font-size: 12px; }
.profit-chart-value { fill: #263a50; font-size: 15px; font-weight: 650; }
.profit-chart-empty { min-height: 320px; display: grid; place-items: center; color: #708095; font-size: 13px; }
#profitCompositionStatus { margin: 10px 0 0; color: #80633b; font-size: 12px; line-height: 1.6; }
#profitCompositionStatus.is-error { color: #b8424d; }
#profitCompositionNotes { margin-top: 8px; color: #68778a; font-size: 12px; line-height: 1.7; }
#profitCompositionNotes summary { cursor: pointer; width: fit-content; }
#profitCompositionNotes ul { margin: 6px 0; padding-left: 20px; }
#profitCompositionRetry { margin-top: 8px; }

.net-profit-controls select { height: 30px; min-width: 0; width: 100%; padding: 0 9px; border: 1px solid var(--douyin-border, #dce2e8); border-radius: 8px; font: inherit; color: inherit; background: #fff; }

.net-profit-panel .section-head { flex-wrap: wrap; }
.net-profit-panel .profit-status { max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
