/* ========================================
   古法身韵 · 7月销售目标看板
   极简白蓝商务风
   ======================================== */

:root {
  /* 主色调 - 商务蓝 */
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --primary-bg: #eff6ff;
  --accent: #f59e0b;

  /* 语义色 */
  --success: #2563eb;
  --success-bg: #eff6ff;
  --live: #6366f1;
  --live-bg: #eef2ff;

  /* 背景 - 极简白 */
  --bg-primary: #f7f8fc;
  --bg-card: #ffffff;
  --bg-subtle: #fafbfd;

  /* 文字 */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  /* 边框 */
  --border: #e5e7eb;
  --border-light: #f1f5f9;

  /* 阴影 - 极轻 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.06);

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ========================================
   Header
   ======================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.5rem;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  font-size: 1.5rem;
}

.brand-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.update-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-bg);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: var(--radius-full);
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ========================================
   Main Layout
   ======================================== */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
  margin-bottom: 0;
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.label-icon {
  font-size: 1.125rem;
}

.hero-rate {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.hero-amount {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.hero-current {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hero-divider {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 300;
}

.hero-target {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-progress-wrap {
  margin-bottom: 2rem;
}

.hero-progress {
  height: 10px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.hero-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.625rem;
  color: var(--text-muted);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.hero-stat {
  text-align: center;
  padding: 1rem 0.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.hero-stat-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ========================================
   Dual Track
   ======================================== */
.dual-track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.track-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.track-card:first-child::before {
  background: var(--primary);
}

.track-card:last-child::before {
  background: var(--live);
}

.track-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.track-icon {
  font-size: 1.125rem;
}

.track-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.track-amount {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.track-amount span:first-child {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.track-target {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.track-progress {
  height: 7px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.track-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.regular-bar {
  background: var(--primary);
}

.live-bar {
  background: var(--live);
}

.track-rate {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.track-orders {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ========================================
   Team Section
   ======================================== */
.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.title-icon {
  font-size: 1.125rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.team-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.team-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.team-avatar.ye {
  background: var(--primary);
}

.team-avatar.wu {
  background: var(--live);
}

.team-info {
  flex: 1;
}

.team-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.team-share {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.team-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* Team Total */
.team-total-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.team-total-amount {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.team-total-target {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Progress bars */
.team-progress-bar {
  height: 7px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.team-progress-bar.total-bar {
  height: 9px;
}

.team-progress-bar.channel-bar {
  height: 5px;
  margin-top: 0.375rem;
}

.team-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.team-progress-fill.ye {
  background: var(--primary);
}

.team-progress-fill.wu {
  background: var(--live);
}

/* Channel details in team card */
.team-channel-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.team-channel-item {
  display: flex;
  gap: 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
}

.channel-icon {
  font-size: 1.125rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.channel-content {
  flex: 1;
  min-width: 0;
}

.channel-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.channel-orders {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.channel-amount-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.channel-current {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.channel-target {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ========================================
   Channels Section
   ======================================== */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.channel-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.channel-group-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.channel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

.channel-item:last-child {
  border-bottom: none;
}

.channel-name {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.channel-value {
  text-align: right;
}

.channel-amount {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ========================================
   Trend Section
   ======================================== */
.trend-section {
  margin-bottom: 1rem;
}

.trend-chart-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  min-height: 200px;
  padding-top: 1rem;
}

.trend-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 60px;
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 100%;
  justify-content: center;
  height: 160px;
}

.trend-bar {
  width: 18px;
  border-radius: 3px 3px 0 0;
  transition: height 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  cursor: pointer;
}

.trend-bar:hover {
  opacity: 0.75;
}

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

.trend-bar.regular {
  background: var(--primary);
}

.trend-bar-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.6875rem;
  color: var(--text-primary);
  white-space: nowrap;
  z-index: 10;
  box-shadow: var(--shadow-md);
}

.trend-bar:hover .trend-bar-tooltip {
  display: block;
}

.trend-date {
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
}

.trend-total {
  font-size: 0.625rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-weight: 600;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
}

.footer-inner p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-title {
    font-size: 1rem;
  }

  .hero-card {
    padding: 1.5rem;
  }

  .hero-current {
    font-size: 1.5rem;
  }

  .hero-rate {
    font-size: 1.75rem;
  }

  .dual-track {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .channels-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .hero-stat-value {
    font-size: 1.125rem;
  }

  .main {
    padding: 1rem;
    gap: 1rem;
  }

  .trend-bar {
    width: 12px;
  }
}

@media (max-width: 480px) {
  .hero-amount {
    flex-direction: column;
    gap: 0.25rem;
  }

  .hero-current {
    font-size: 1.25rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-stat {
    padding: 0.75rem 0.5rem;
  }

  .hero-stat-value {
    font-size: 1rem;
  }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-section { animation: fadeInUp 0.5s ease-out; }
.dual-track { animation: fadeInUp 0.5s ease-out 0.08s both; }
.team-section { animation: fadeInUp 0.5s ease-out 0.16s both; }
.channels-section { animation: fadeInUp 0.5s ease-out 0.24s both; }
.trend-section { animation: fadeInUp 0.5s ease-out 0.32s both; }

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
