/* GMV 业绩中心 */
.gmv-view {
  display: none;
  min-width: 0;
}

.gmv-view.visible {
  display: block;
}

.gmv-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.gmv-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.gmv-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.01em;
}

.gmv-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-secondary);
}

.gmv-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}

.gmv-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gmv-field > span {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.gmv-field select,
.gmv-field input {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  outline: none;
}

.gmv-field select:focus,
.gmv-field input:focus {
  border-color: var(--a-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
}

.gmv-field input[type="month"],
.gmv-field input[type="date"] {
  min-width: 132px;
}

.gmv-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.gmv-tab {
  padding: 7px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.gmv-tab:hover {
  color: var(--text-primary);
  background: rgba(59, 130, 246, .06);
}

.gmv-tab.active {
  color: var(--a-color);
  background: var(--a-light);
}

.gmv-body {
  min-width: 0;
}

.gmv-section {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.gmv-section + .gmv-section {
  margin-top: 12px;
}

.gmv-section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.gmv-section-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.gmv-section-head span {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.gmv-card-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.gmv-kpi {
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(59, 130, 246, .045), rgba(59, 130, 246, 0));
  min-width: 0;
}

.gmv-kpi-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.gmv-kpi-value {
  display: block;
  margin-top: 5px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gmv-kpi-value.is-accent { color: var(--a-color); }

.gmv-kpi-sub {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gmv-note {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.gmv-note strong { color: var(--text-primary); }

.gmv-section > .gmv-note { margin-top: 12px; }

.gmv-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.gmv-badge.deal { color: #047857; background: #ecfdf5; }
.gmv-badge.intent { color: #b45309; background: #fffbeb; }
.gmv-badge.none { color: #64748b; background: #f1f5f9; }

.gmv-trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 210px;
  padding: 10px 2px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.gmv-trend-col {
  display: flex;
  flex: 1 0 38px;
  min-width: 38px;
  max-width: 74px;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.gmv-trend-bar-wrap {
  display: flex;
  width: 100%;
  flex: 1;
  align-items: flex-end;
  justify-content: center;
}

.gmv-trend-bar {
  width: 56%;
  min-height: 2px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
  transition: height .2s ease;
}

.gmv-trend-col.is-zero .gmv-trend-bar {
  background: var(--border);
}

.gmv-trend-value {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.gmv-trend-label {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.gmv-nob {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 16px;
}

.gmv-nob-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface);
}

.gmv-nob-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.gmv-nob-head strong {
  font-size: 13px;
  color: var(--text-primary);
}

.gmv-nob-head span {
  font-size: 10.5px;
  color: var(--text-muted);
}

.gmv-nob-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 100px;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
}

.gmv-nob-name {
  overflow: hidden;
  font-size: 11px;
  color: var(--text-secondary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmv-nob-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .18);
}

.gmv-nob-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 999px;
}

.gmv-nob-fill.is-new { background: linear-gradient(90deg, #4ade80, #22c55e); }
.gmv-nob-fill.is-old { background: linear-gradient(90deg, #60a5fa, #3b82f6); }

.gmv-nob-target {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--text-secondary);
  opacity: .75;
}

.gmv-nob-value {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.gmv-nob-value em {
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  color: var(--text-muted);
}

.gmv-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.gmv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.gmv-table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  background: rgba(241, 245, 249, .5);
}

.gmv-table th.is-num,
.gmv-table td.is-num {
  text-align: right;
}

.gmv-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

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

.gmv-table tbody tr:hover td {
  background: rgba(59, 130, 246, .035);
}

.gmv-table tfoot td {
  background: rgba(241, 245, 249, .5);
  border-top: 1px solid var(--border);
  border-bottom: 0;
  font-weight: 700;
}

.gmv-table .is-mono {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gmv-rank-no {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #f1f5f9;
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 700;
}

.gmv-rank-no.is-top {
  background: var(--a-light);
  color: var(--a-color);
}

.gmv-owner-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.gmv-owner-btn:hover { color: var(--a-color); }

.gmv-target-input {
  width: 92px;
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-primary);
  font: inherit;
  font-size: 11.5px;
  text-align: right;
}

.gmv-progress {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.gmv-progress-track {
  display: inline-block;
  width: 56px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.gmv-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #10b981;
}

.gmv-progress-fill.is-low { background: #f59e0b; }

.gmv-share {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 130px;
}

.gmv-share-track {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.gmv-share-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

.gmv-person-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.gmv-person-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.gmv-person-title span {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.gmv-back-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.gmv-back-btn:hover {
  border-color: #93c5fd;
  color: var(--a-color);
}

.gmv-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.gmv-search {
  min-width: 200px;
  flex: 1 1 200px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  outline: none;
}

.gmv-search:focus {
  border-color: var(--a-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
}

.gmv-btn {
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.gmv-btn:hover { border-color: #93c5fd; color: var(--a-color); }

.gmv-btn.primary {
  border-color: var(--a-color);
  background: var(--a-color);
  color: #fff;
}

.gmv-btn.primary:hover { filter: brightness(1.05); color: #fff; }

.gmv-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.gmv-page-info { margin-right: auto; }

.gmv-page-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}

.gmv-page-btn:hover:not(:disabled) { border-color: #93c5fd; color: var(--a-color); }

.gmv-page-btn.active {
  border-color: var(--a-color);
  background: var(--a-light);
  color: var(--a-color);
  font-weight: 700;
}

.gmv-page-btn:disabled { opacity: .45; cursor: default; }

.gmv-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
}

.gmv-page-jump input {
  width: 42px;
  height: 28px;
  padding: 0 4px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-primary);
  font: inherit;
  font-size: 11.5px;
  text-align: center;
}

.gmv-empty {
  padding: 42px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
}

.gmv-empty strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-secondary);
  font-size: 13.5px;
}

.gmv-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.view-gmv .workbench-layout {
  grid-template-columns: 190px minmax(0, 1fr);
}

body.view-gmv .workbench-tools {
  display: none;
}

@media (min-width: 1181px) {
  body.view-gmv .workbench-content { grid-column: 2; }
}

@media (max-width: 1180px) {
  body.view-gmv .workbench-layout {
    grid-template-columns: 1fr;
  }
  .gmv-card-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .gmv-card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gmv-head { flex-direction: column; align-items: stretch; }
  .gmv-toolbar { width: 100%; }
  .gmv-field { flex: 1 1 130px; }
  .gmv-field select,
  .gmv-field input { width: 100%; }
  .gmv-section { padding: 12px; }
  .gmv-trend-chart { height: 170px; }
  .gmv-trend-col { min-width: 32px; }
  .gmv-nob { grid-template-columns: 1fr; gap: 12px; }
  .gmv-nob-row { grid-template-columns: 56px minmax(0, 1fr) 92px; gap: 8px; }
}

@media print {
  .gmv-card-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
