/* ============================================
   RATING PAGE — 多维度评价系统样式
   ============================================ */

.rating-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

/* ── Header ── */
.rating-header {
  text-align: center;
  margin-bottom: 36px;
}

.rating-header h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.rating-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ── Order Context Card ── */
.rating-order-context {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 28px;
}

.rating-order-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--bg-primary);
  flex-shrink: 0;
}

.rating-order-info {
  flex: 1;
}

.rating-order-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.rating-order-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.rating-order-amount {
  font-size: 16px;
  font-weight: 800;
  color: var(--acid);
}

/* ── Blind Notice ── */
.rating-blind-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(0, 255, 209, 0.05);
  border: 1px solid rgba(0, 255, 209, 0.2);
  border-radius: 12px;
  margin-bottom: 28px;
  font-size: 13px;
  color: var(--text-secondary);
}

.rating-blind-notice svg {
  flex-shrink: 0;
}

.rating-blind-notice strong {
  color: var(--cyan);
}

/* ── Countdown ── */
.rating-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 229, 0, 0.05);
  border: 1px solid rgba(255, 229, 0, 0.2);
  border-radius: 10px;
  margin-bottom: 28px;
  font-size: 13px;
  color: var(--text-secondary);
}

.rating-countdown .countdown-value {
  font-weight: 800;
  color: var(--yellow);
}

/* ── Main Rating Form Card ── */
.rating-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
}

.rating-form-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

.rating-form-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ── Dimension Row ── */
.dimension-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dimension-row:last-child {
  border-bottom: none;
}

.dimension-info {
  flex: 1;
  min-width: 0;
}

.dimension-label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dimension-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-subjective {
  background: rgba(236, 72, 153, 0.12);
  color: #C8FF00;
  border: 1px solid rgba(236, 72, 153, 0.25);
}

.badge-objective {
  background: rgba(0, 255, 209, 0.08);
  color: var(--cyan);
  border: 1px solid rgba(0, 255, 209, 0.2);
}

.badge-mixed {
  background: rgba(139, 92, 246, 0.1);
  color: #C8FF00;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.dimension-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.dimension-weight {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Star Rating ── */
.dimension-rating {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.star-group {
  display: flex;
  gap: 4px;
}

.star-group .star {
  cursor: pointer;
  transition: transform 0.15s;
  opacity: 0.25;
}

.star-group .star.active {
  opacity: 1;
}

.star-group .star:hover {
  transform: scale(1.15);
}

.star-group .star svg {
  width: 26px;
  height: 26px;
  stroke: #C8FF00;
}

.star-group .star.active svg {
  fill: #C8FF00;
}

.star-score-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ── Objective Score Display ── */
.objective-score {
  display: flex;
  align-items: center;
  gap: 10px;
}

.objective-score-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--acid);
}

.objective-score-detail {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Sub-items (optional, for D1 feedback) ── */
.dimension-subitems {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.subitem {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.subitem .mini-stars {
  display: flex;
  gap: 2px;
}

.subitem .mini-stars svg {
  width: 14px;
  height: 14px;
  stroke: #C8FF00;
  opacity: 0.3;
}

.subitem .mini-stars svg.active {
  fill: #C8FF00;
  opacity: 1;
}

/* ── Text Review Area ── */
.rating-text-area {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rating-text-area label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.rating-textarea {
  width: 100%;
  min-height: 100px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s;
}

.rating-textarea:focus {
  outline: none;
  border-color: var(--border-active);
}

.rating-textarea::placeholder {
  color: var(--text-muted);
}

/* ── Submit Actions ── */
.rating-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rating-actions-right {
  display: flex;
  gap: 12px;
}

.rating-modify-note {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Radar Chart ── */
.radar-chart-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
}

.radar-chart-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.radar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.radar-svg-wrap {
  width: 260px;
  height: 260px;
  flex-shrink: 0;
}

.radar-svg-wrap svg {
  width: 100%;
  height: 100%;
}

.radar-legend {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.radar-legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.radar-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.radar-legend-label {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 80px;
}

.radar-legend-score {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.radar-legend-bar {
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.radar-legend-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ── Dimension Breakdown (Profile Page) ── */
.dimension-breakdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dim-break-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dim-break-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 80px;
}

.dim-break-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.dim-break-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.dim-break-bar-avg {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 1px;
}

.dim-break-score {
  font-size: 14px;
  font-weight: 800;
  min-width: 32px;
  text-align: right;
}

.dim-break-vs {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 60px;
}

/* ── Composite Score Big Display ── */
.composite-score-display {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 24px;
}

.composite-score-big {
  font-size: 48px;
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.composite-score-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.composite-score-stars {
  display: flex;
  gap: 3px;
}

.composite-score-stars svg {
  width: 18px;
  height: 18px;
}

.composite-score-sample {
  font-size: 12px;
  color: var(--text-muted);
}

.composite-score-badge {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.badge-stable {
  background: rgba(0, 255, 209, 0.08);
  color: var(--cyan);
  border: 1px solid rgba(0, 255, 209, 0.2);
}

.badge-forming {
  background: rgba(255, 229, 0, 0.08);
  color: var(--yellow);
  border: 1px solid rgba(255, 229, 0, 0.2);
}

.badge-new {
  background: rgba(139, 92, 246, 0.1);
  color: #C8FF00;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

/* ── Trend Mini Chart ── */
.trend-mini {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
}

.trend-bar {
  width: 4px;
  border-radius: 2px;
  background: rgba(200, 255, 0, 0.3);
  transition: height 0.3s ease;
}

.trend-bar.current {
  background: var(--acid);
}

/* ── KPI Dimension Drill-down ── */
.kpi-drilldown {
  display: none;
  padding: 14px 0 0;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.kpi-drilldown.active {
  display: block;
}

.kpi-dim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.kpi-dim-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.kpi-dim-score {
  font-size: 12px;
  font-weight: 700;
}

.kpi-dim-bar {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.kpi-dim-bar-fill {
  height: 100%;
  border-radius: 2px;
}

/* ── Bid Card Dimension Tooltip ── */
.bid-dim-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.bid-dim-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.bid-dim-chip .dim-val {
  font-weight: 800;
  color: var(--text-primary);
}

.bid-dim-chip.highlight {
  border-color: rgba(200, 255, 0, 0.25);
  background: rgba(200, 255, 0, 0.06);
}

.bid-dim-chip.highlight .dim-val {
  color: var(--acid);
}

/* ── Hover Radar Tooltip ── */
.bid-radar-tooltip {
  position: absolute;
  z-index: 100;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  display: none;
  width: 280px;
}

.bid-radar-tooltip.show {
  display: block;
}

/* ── Review Item Enhanced (with dimensions) ── */
.review-dim-scores {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.review-dim-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.review-dim-tag .rdim-val {
  color: var(--text-primary);
  font-weight: 700;
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
  .rating-page {
    padding: 80px 16px 40px;
  }

  .rating-form-card {
    padding: 20px;
  }

  .dimension-row {
    flex-direction: column;
    gap: 12px;
  }

  .dimension-rating {
    align-items: flex-start;
  }

  .radar-container {
    flex-direction: column;
    gap: 24px;
  }

  .radar-svg-wrap {
    width: 220px;
    height: 220px;
  }

  .composite-score-display {
    flex-wrap: wrap;
    gap: 16px;
  }

  .rating-actions {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .rating-actions-right {
    justify-content: stretch;
  }

  .rating-actions-right .btn {
    flex: 1;
    justify-content: center;
  }

  .rating-order-context {
    flex-wrap: wrap;
    gap: 12px;
  }
}


/* ══════════════════════════════════════
   LIGHT THEME OVERRIDES (auto-generated)
   ══════════════════════════════════════ */
[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea,
[data-theme="light"] .form-select { 
  background: var(--bg-input) !important; 
  color: var(--text-primary) !important; 
  border-color: var(--border) !important; 
}
[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-textarea:focus,
[data-theme="light"] .form-select:focus { 
  border-color: var(--acid) !important; 
  box-shadow: 0 0 0 3px var(--acid-bg) !important; 
}
[data-theme="light"] .form-input::placeholder,
[data-theme="light"] .form-textarea::placeholder { 
  color: var(--text-muted) !important; 
}

/* ── Rating light patches ── */
[data-theme="light"] .rating-card { 
  background: rgba(255,255,255,0.85) !important; 
  border-color: var(--border) !important;
}
[data-theme="light"] .rating-title { color: var(--text-primary) !important; }
