/* 推广人中心专用样式：延续站点专业可信的 B2B 风格 */

[data-promoter-nav][hidden] {
  display: none !important;
}

.promoter-page [hidden] {
  display: none !important;
}

/* 顶部身份条 */
.promoter-hero {
  padding: 34px 0 28px;
  background:
    radial-gradient(circle at 88% 10%, rgba(31, 99, 255, 0.12) 0, rgba(31, 99, 255, 0) 42%),
    linear-gradient(180deg, #f5f9ff 0%, #eef5ff 100%);
  border-bottom: 1px solid var(--line);
}

.promoter-id-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 26px 30px;
  background: #fff;
  border: 1px solid rgba(220, 229, 242, 0.9);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(25, 62, 126, 0.08);
}

.promoter-id-main h1 {
  margin: 8px 0 10px;
  font-size: 30px;
  line-height: 1.3;
  color: var(--ink);
}

.promoter-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.rate-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 13px;
  font-weight: 700;
}

.promoter-benefit {
  margin: 0;
  color: #3f67a8;
  font-size: 14px;
  font-weight: 600;
}

.promoter-id-side {
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: 220px;
}

.promoter-id-side span {
  color: var(--muted);
  font-size: 13px;
}

.promoter-id-side strong {
  color: var(--brand-dark);
  font-size: 34px;
  line-height: 1.1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.copy-link-box {
  position: relative;
}

.copy-link-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 180px;
  padding: 6px;
  border: 1px solid #e8eef8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 32, 51, 0.14);
}

.copy-link-menu button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  color: #1f2d3d;
  background: transparent;
  font-size: 13px;
  text-align: left;
}

.copy-link-menu button:hover {
  color: #1f63ff;
  background: #f4f8ff;
}

.copy-link-menu .empty {
  padding: 8px 12px;
  color: #98a2b3;
  font-size: 12px;
}

/* 主体 */
.promoter-main {
  padding: 24px 0 72px;
  background: var(--surface);
}

/* 推广人页单独加宽容器：顶部身份条与下方内容区保持同宽 */
.promoter-hero .container,
.promoter-main .container {
  width: min(1320px, calc(100% - 40px));
}

.promoter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.soft-switch {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  padding-bottom: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.soft-switch button {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.soft-switch button:hover {
  color: var(--brand);
  border-color: rgba(31, 99, 255, 0.35);
}

.soft-switch button.is-active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 8px 18px rgba(31, 99, 255, 0.24);
}

/* 左侧菜单 + 内容区 */
.promoter-layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.promoter-sidebar {
  position: sticky;
  top: 96px;
  flex-shrink: 0;
  width: 168px;
}

.promoter-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(25, 62, 126, 0.06);
}

.promoter-nav button {
  position: relative;
  padding: 11px 16px;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition: color 0.18s ease, background 0.18s ease;
}

.promoter-nav button:hover {
  color: var(--brand);
  background: #f4f8ff;
}

.promoter-nav button.is-active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 800;
}

.promoter-nav button.is-active::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 6px;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--brand);
  transform: translateY(-50%);
}

.promoter-content {
  flex: 1;
  min-width: 0;
}

/* Tab（旧版保留） */
.promoter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  margin-bottom: 22px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.promoter-tabs button {
  flex: 1 1 140px;
  padding: 10px 16px;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.promoter-tabs button:hover {
  color: var(--brand);
}

.promoter-tabs button.is-active {
  color: var(--brand);
  background: #fff;
  box-shadow: 0 4px 12px rgba(25, 62, 126, 0.08);
}

.promoter-panel {
  animation: promoter-fade 0.18s ease;
}

@keyframes promoter-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 总览：参考后台总览的 Hero + 卡片布局 */
.ov-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
  margin-bottom: 6px;
  border-radius: 18px;
  background: linear-gradient(120deg, #4a76f0 0%, #4e8cf5 55%, #5ca8f5 100%);
  box-shadow: 0 12px 30px rgba(74, 118, 240, 0.28);
  color: #fff;
}

.ov-hero-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  min-width: 132px;
}

.ov-hero-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
}

.ov-hero-date {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.ov-refresh {
  align-self: flex-start;
  margin-top: 6px;
  padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  transition: background 0.2s ease;
}

.ov-refresh:hover {
  background: rgba(255, 255, 255, 0.26);
}

.ov-hero-stats {
  flex: 1;
  display: flex;
  gap: 16px;
  min-width: 0;
}

.ov-hero-group {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.ov-hero-group-title {
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.ov-hero-group-items {
  display: flex;
  flex-direction: column;
}

.ov-hero-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.ov-hero-stat:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.ov-hero-stat .label {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  white-space: nowrap;
}

.ov-hero-stat .value {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ov-hero-stat .value.is-money {
  font-size: 18px;
}

.ov-hero-stat .value .yen {
  margin-right: 2px;
  font-size: 13px;
  font-weight: 600;
}

.ov-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 12px;
}

.ov-bar {
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4a76f0, #5ca8f5);
}

.ov-section-name {
  color: #1f2d3d;
  font-size: 15px;
  font-weight: 700;
}

.ov-section-desc {
  color: #98a2b3;
  font-size: 12px;
}

.ov-month-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.ov-month-group {
  padding: 16px 20px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(31, 45, 61, 0.05);
}

.ov-month-group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: #1f2d3d;
  font-size: 13px;
  font-weight: 700;
}

.ov-month-group-title::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: #4a76f0;
}

.ov-month-group.is-amount .ov-month-group-title::before {
  background: #e8912d;
}

.ov-month-group-items {
  display: flex;
  flex-direction: column;
}

.ov-month-card {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #eef2f8;
  background: transparent;
}

.ov-month-card:first-child {
  padding-top: 0;
}

.ov-month-card:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.ov-month-card .m-label {
  color: #5a6478;
  font-size: 13px;
  white-space: nowrap;
}

.ov-month-card .m-value {
  margin-top: 0;
  color: #4a76f0;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ov-month-card .m-value .yen {
  margin-right: 1px;
  font-size: 13px;
  font-weight: 600;
}

.ov-month-card .m-value.warn {
  color: #d93f3f;
}

.ov-month-card .m-value.accent {
  color: #17a76f;
}

.ov-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ov-total-group {
  padding: 16px 20px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(31, 45, 61, 0.05);
}

.ov-total-items {
  display: flex;
  flex-direction: column;
}

.ov-total-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed #eef2f8;
}

.ov-total-row:first-child {
  padding-top: 0;
}

.ov-total-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.ov-total-row .total-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #edf2fe;
  color: #4a76f0;
}

.ov-total-row .total-icon svg {
  width: 16px;
  height: 16px;
}

.ov-total-row .total-icon.warn {
  background: #fdecec;
  color: #d93f3f;
}

.ov-total-row .total-icon.accent {
  background: #e9f8f1;
  color: #17a76f;
}

.ov-total-row .total-label {
  flex: 1;
  color: #5a6478;
  font-size: 13px;
  white-space: nowrap;
}

.ov-total-row .total-value {
  color: #1f2d3d;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ov-total-row .total-value .yen {
  margin-right: 1px;
  font-size: 12px;
  font-weight: 600;
}

.ov-total-row .total-value.warn {
  color: #d93f3f;
}

.ov-total-row .total-value.accent {
  color: #17a76f;
}

.ov-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(31, 45, 61, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ov-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(74, 118, 240, 0.12);
}

.ov-stat-card .stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #edf2fe;
  color: #4a76f0;
}

.ov-stat-card .stat-icon svg {
  width: 22px;
  height: 22px;
}

.ov-stat-card .stat-icon.warn {
  background: #fdecec;
  color: #d93f3f;
}

.ov-stat-card .stat-icon.accent {
  background: #e9f8f1;
  color: #17a76f;
}

.ov-stat-card .stat-body {
  flex: 1;
  min-width: 0;
}

.ov-stat-card .s-label {
  overflow: hidden;
  color: #5a6478;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-stat-card .s-value {
  margin-top: 4px;
  color: #1f2d3d;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ov-stat-card .s-value .yen {
  margin-right: 1px;
  font-size: 13px;
  font-weight: 600;
}

.ov-stat-card .s-value.warn {
  color: #d93f3f;
}

.ov-stat-card .s-value.accent {
  color: #17a76f;
}

.chart-canvas {
  position: relative;
  width: 100%;
  height: 100%;
}

.chart-canvas svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 148px;
  padding: 10px 12px;
  border: 1px solid #e8eef8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(31, 45, 61, 0.14);
  color: #1f2d3d;
  font-size: 12px;
  pointer-events: none;
}

.chart-tooltip .tt-date {
  margin-bottom: 6px;
  color: #5a6478;
  font-weight: 700;
}

.chart-tooltip .tt-row {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.8;
}

.chart-tooltip .tt-row i {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.chart-tooltip .tt-row span {
  flex: 1;
  color: #5a6478;
  white-space: nowrap;
}

.chart-tooltip .tt-row b {
  color: #1f2d3d;
  font-variant-numeric: tabular-nums;
}

/* 总览（旧版样式保留，兼容未使用类） */
.overview-block {
  margin-bottom: 26px;
}

.block-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.metric-card .metric-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.metric-card .metric-value {
  display: block;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.metric-card .metric-sub {
  display: block;
  margin-top: 6px;
  color: #8a97a8;
  font-size: 12px;
  line-height: 1.5;
}

.metric-card.is-warn .metric-value {
  color: #d93f3f;
}

.metric-card.is-primary {
  border-color: rgba(31, 99, 255, 0.25);
  background: linear-gradient(180deg, #f7faff 0%, #fff 100%);
}

.metric-extra {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.metric-extra .metric-card {
  background: var(--surface-blue);
}

.metric-extra .metric-card .metric-value {
  font-size: 20px;
}

/* 趋势 */
.trend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.trend-card {
  display: flex;
  flex-direction: column;
  height: 360px;
  padding: 18px 22px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(31, 45, 61, 0.05);
}

.trend-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.trend-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.trend-head span {
  color: var(--muted);
  font-size: 12px;
}

.trend-canvas {
  flex: 1;
  min-height: 0;
}

.trend-canvas svg {
  display: block;
  width: 100%;
  height: 100%;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.trend-legend i {
  display: inline-block;
  width: 14px;
  height: 3px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: middle;
}

/* 表格 */
.table-card {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: auto;
}

/* 推广明细 / 佣金结算记录：固定高度，默认约 10 行，超出内部滚动 */
.table-card.table-card-fixed {
  height: 470px;
  overflow-y: auto;
}

.promoter-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-size: 13px;
}

.promoter-table th,
.promoter-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #eef2f8;
  text-align: left;
  white-space: nowrap;
}

.promoter-table th {
  color: #5a6b82;
  background: #f7faff;
  font-weight: 700;
}

.promoter-table tbody tr:hover {
  background: #fbfdff;
}

.promoter-table td.is-number {
  font-variant-numeric: tabular-nums;
}

.promoter-table .is-warn {
  color: #d93f3f;
}

.promoter-table .is-muted {
  color: var(--muted);
}

.promoter-table .is-link {
  color: var(--brand);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.status-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-tag.is-pending {
  color: #9a5b00;
  background: #fff5e6;
}

.status-tag.is-paid {
  color: #0f7a52;
  background: #e7f7f0;
}

.status-tag.is-off {
  color: #6b7a90;
  background: #f0f3f8;
}

.expand-row td {
  background: #fbfdff;
}

.sub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.sub-table th,
.sub-table td {
  padding: 8px 10px;
  border-bottom: 1px dashed #e6edf7;
  text-align: left;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text);
}

.filter-bar select {
  min-width: 140px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.pager div {
  display: flex;
  gap: 8px;
}

.pager button {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.pager button:disabled {
  color: #b7c0ce;
  cursor: not-allowed;
}

.panel-hint {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--brand);
  background: var(--surface-blue);
  color: #3f67a8;
  font-size: 13px;
}

.empty-state {
  padding: 42px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.table-card-fixed .empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  padding: 0;
}

/* 信息维护 */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
  align-items: start;
}

.profile-card {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.profile-card h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.profile-card h3:not(:first-child) {
  margin-top: 22px;
}

.profile-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-card dl > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  font-size: 14px;
}

.profile-card dt {
  color: var(--muted);
}

.profile-card dd {
  margin: 0;
  color: var(--ink);
  word-break: break-all;
}

.code-item {
  padding: 12px 14px;
  border: 1px solid #e8eef8;
  border-radius: 8px;
  background: #fbfdff;
}

.code-item + .code-item {
  margin-top: 10px;
}

.code-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.code-item-link {
  display: block;
  overflow: hidden;
  color: var(--brand);
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.7;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.code-item-actions button {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--brand);
  font-size: 12px;
}

.code-item-actions button:hover {
  border-color: rgba(31, 99, 255, 0.4);
  background: #f4f8ff;
}

.profile-form {
  display: grid;
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.form-field label em {
  margin-left: 4px;
  color: var(--muted);
  font-style: normal;
  font-weight: 400;
}

.form-field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.form-field input:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 99, 255, 0.12);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.form-tip {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.form-message {
  font-size: 13px;
}

.form-message.is-ok {
  color: #0f7a52;
}

.form-message.is-error {
  color: #d93f3f;
}

/* 无权限 / 未登录 */
.promoter-empty-card {
  max-width: 620px;
  margin: 0 auto;
  padding: 44px 34px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(25, 62, 126, 0.08);
}

.promoter-empty-card h1 {
  margin: 10px 0 12px;
  font-size: 28px;
  color: var(--ink);
}

.promoter-empty-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
}

.loading-tip {
  padding: 60px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* 页面级轻提示（复制链接等跨面板场景） */
.page-toast {
  position: fixed;
  top: 86px;
  left: 50%;
  z-index: 80;
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(16, 32, 51, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 12px 28px rgba(16, 32, 51, 0.24);
  transform: translateX(-50%);
}

.page-toast.is-error {
  background: rgba(217, 63, 63, 0.94);
}

/* 响应式 */
@media (max-width: 980px) {
  .metric-grid,
  .metric-extra {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .promoter-layout {
    flex-direction: column;
  }

  .promoter-sidebar {
    position: static;
    width: 100%;
  }

  .promoter-nav {
    flex-direction: row;
    overflow-x: auto;
  }

  .promoter-nav button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .promoter-nav button.is-active::before {
    display: none;
  }

  .ov-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .ov-hero-stats {
    flex-direction: column;
    gap: 12px;
  }

  .ov-hero-stat {
    padding: 6px 0;
  }

  .ov-month-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .ov-stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .trend-grid,
  .profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .promoter-id-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .promoter-id-side {
    justify-items: start;
  }
}

@media (max-width: 620px) {
  .promoter-hero {
    padding: 20px 0;
  }

  .promoter-id-card {
    padding: 20px;
  }

  .promoter-id-main h1 {
    font-size: 24px;
  }

  .promoter-id-side strong {
    font-size: 28px;
  }

  .metric-grid,
  .metric-extra {
    grid-template-columns: minmax(0, 1fr);
  }

  .ov-hero-stat {
    padding: 6px 0;
  }

  .ov-hero-stat .value,
  .ov-hero-stat .value.is-money {
    font-size: 17px;
  }

  .ov-month-card {
    padding: 8px 0;
  }

  .ov-month-card .m-value {
    font-size: 18px;
  }

  .ov-total-row .total-value {
    font-size: 16px;
  }

  .ov-stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .trend-card {
    height: auto;
  }

  .trend-canvas {
    height: 260px;
  }

  .promoter-tabs button {
    flex: 1 1 100%;
  }
}
