/* FitPro — 跨页面共享组件 */

.sport-icon-img {
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(84%) sepia(98%) saturate(1352%)
    hue-rotate(12deg) brightness(103%) contrast(104%);
}

.screen-title {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.screen-subtitle {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.page-top {
  margin-bottom: 16px;
  padding: 4px 4px 0;
}

.segment-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-section);
  border: 1px solid var(--border-subtle);
}

.segment-item {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.segment-item.active {
  background: var(--surface-card);
  color: var(--brand);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.plan-card {
  position: relative;
  margin-bottom: 12px;
  padding: 18px;
  border-radius: 20px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.plan-card:active {
  transform: scale(0.99);
}

.plan-card.active {
  border-color: var(--brand);
  box-shadow:
    0 0 0 1px rgba(217, 255, 0, 0.2),
    0 8px 24px rgba(217, 255, 0, 0.1);
}

.plan-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.plan-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.plan-card .plan-desc {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.plan-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-badge--active {
  background: var(--brand-muted);
  color: var(--brand);
}

.plan-badge--default {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.plan-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.plan-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-section);
  font-size: 11px;
  color: var(--text-muted);
}

.plan-meta-chip i {
  font-size: 10px;
  color: var(--brand);
}

.plan-card-actions {
  display: flex;
  gap: 10px;
}

.btn-ghost,
a.btn-ghost {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border-default);
  background: transparent;
  color: #ffffff;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-ghost:active {
  transform: scale(0.97);
}

.btn-accent-sm {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  background: var(--brand);
  color: var(--text-on-primary);
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  box-shadow: var(--shadow-cta);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-accent-sm:active {
  transform: scale(0.97);
}

a.btn-accent-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.surface-card {
  margin-bottom: 16px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
}

.surface-card h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-box {
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-section);
  border: 1px solid var(--border-subtle);
}

.stat-box .stat-value {
  display: block;
  margin-bottom: 4px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1;
}

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

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  height: 100px;
  padding-top: 8px;
}

.bar-chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.bar-chart-col .bar-fill {
  width: 100%;
  max-width: 28px;
  margin-top: auto;
  border-radius: 6px 6px 4px 4px;
  background: rgba(255, 255, 255, 0.1);
  min-height: 8px;
}

.bar-chart-col.highlight .bar-fill {
  background: var(--brand);
  box-shadow: 0 0 14px rgba(217, 255, 0, 0.35);
}

.bar-chart-col span {
  font-size: 10px;
  color: var(--text-muted);
}

.bar-chart-col.highlight span {
  color: var(--brand);
  font-weight: 700;
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 72px;
}

.trend-bar {
  flex: 1;
  border-radius: 4px 4px 2px 2px;
  background: rgba(255, 255, 255, 0.12);
  min-height: 12px;
}

.trend-bar.is-high {
  background: linear-gradient(180deg, var(--brand) 0%, rgba(217, 255, 0, 0.35) 100%);
}

.streak-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.streak-dot {
  aspect-ratio: 1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.streak-dot.done {
  background: var(--brand);
  box-shadow: 0 0 8px rgba(217, 255, 0, 0.3);
}

.streak-dot.today {
  background: linear-gradient(135deg, var(--brand) 50%, rgba(255, 255, 255, 0.1) 50%);
  border: 1px solid var(--brand);
}

.profile-header {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: rgba(26, 26, 26, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(217, 255, 0, 0.24);
  box-shadow:
    0 0 0 1px rgba(217, 255, 0, 0.1),
    0 12px 40px rgba(217, 255, 0, 0.1),
    var(--shadow-card);
}

.profile-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    145deg,
    rgba(217, 255, 0, 0.16) 0%,
    rgba(217, 255, 0, 0.04) 32%,
    transparent 58%
  );
  pointer-events: none;
  z-index: 0;
}

.profile-header::after {
  content: "";
  position: absolute;
  top: -56px;
  right: -32px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(217, 255, 0, 0.42) 0%,
    rgba(217, 255, 0, 0.12) 42%,
    transparent 72%
  );
  filter: blur(32px);
  opacity: 0.88;
  pointer-events: none;
  z-index: 0;
}

.profile-header .profile-avatar,
.profile-header .profile-info,
.profile-header .profile-edit {
  position: relative;
  z-index: 1;
}

.profile-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-section);
  border: 2px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--brand);
}

.profile-info h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.profile-info p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.profile-edit {
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.menu-item:active {
  transform: scale(0.98);
}

.menu-item .menu-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-item .menu-icon i {
  font-size: 17px;
  color: var(--brand);
}

.menu-item .menu-text {
  flex: 1;
  min-width: 0;
}

.menu-item .menu-text strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.menu-item .menu-text small {
  font-size: 12px;
  color: var(--text-secondary);
}

.menu-item .chevron {
  color: var(--text-muted);
  font-size: 12px;
}

.menu-item.danger .menu-text strong {
  color: #f87171;
}

.menu-item.danger .menu-icon i {
  color: #f87171;
}

.brand-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 11px;
  color: #4b5563;
  letter-spacing: 0.08em;
}

.brand-footer strong {
  color: var(--brand);
  font-weight: 900;
}
