/**
 * 天偌装修平台 - 用户中心样式
 * Uses design-system.css tokens
 */

/* =============================================
   Profile Header
   ============================================= */
.profile-header {
  background: linear-gradient(135deg, var(--dark) 0%, #0d1b33 50%, #132744 100%);
  border-radius: var(--radius-lg); padding: var(--space-xl);
  display: flex; align-items: center; gap: var(--space-lg);
  color: var(--white); position: relative; overflow: hidden;
}
.profile-header::before {
  content: ''; position: absolute; top: -30%; right: -10%; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(224,123,57,.2) 0%, transparent 70%);
  border-radius: 50%;
}
.profile-header .profile-avatar {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  border: 3px solid rgba(255,255,255,.3); object-fit: cover;
  position: relative; z-index: 1;
  background: var(--primary-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 700;
}
.profile-header .profile-info { position: relative; z-index: 1; }
.profile-header .profile-name {
  font-size: 1.2rem; font-weight: 700; margin-bottom: 2px;
  display: flex; align-items: center; gap: 8px;
}
.profile-header .profile-phone { font-size: .85rem; opacity: .75; }
.profile-header .profile-actions { margin-left: auto; position: relative; z-index: 1; }

/* =============================================
   Tabs (in user center)
   ============================================= */
.uc-tabs {
  display: flex; gap: 2px; background: var(--white);
  border-radius: var(--radius); padding: 4px; margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-xs); border: 1px solid var(--border-light);
}
.uc-tab {
  flex: 1; padding: 10px 16px; text-align: center; font-size: .85rem;
  font-weight: 600; color: var(--text-secondary); border: none;
  background: transparent; cursor: pointer; border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}
.uc-tab:hover { color: var(--text); }
.uc-tab.active { background: var(--primary); color: var(--white); }

/* =============================================
   Info Card
   ============================================= */
.info-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
  overflow: hidden;
}
.info-card-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  font-weight: 700; font-size: .95rem;
  display: flex; align-items: center; justify-content: space-between;
}
.info-card-body { padding: var(--space-lg); }
.info-row {
  display: flex; align-items: center; padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.info-row:last-child { border-bottom: none; }
.info-label {
  width: 90px; font-size: .85rem; color: var(--text-muted); flex-shrink: 0;
}
.info-value { font-size: .9rem; font-weight: 500; flex: 1; }

/* =============================================
   Project Card
   ============================================= */
.project-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
  padding: var(--space-lg); transition: var(--transition);
}
.project-card:hover { box-shadow: var(--shadow); }
.project-card .project-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: var(--space-md);
}
.project-card .project-title { font-weight: 700; font-size: 1rem; }
.project-card .project-status { margin-bottom: var(--space-sm); }
.project-card .project-meta {
  display: flex; gap: var(--space-lg); font-size: .82rem; color: var(--text-muted);
}
.project-card .project-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: var(--space-md); padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

/* =============================================
   Progress Steps
   ============================================= */
.progress-steps {
  display: flex; justify-content: space-between; position: relative;
  margin: var(--space-lg) 0;
}
.progress-steps::before {
  content: ''; position: absolute; top: 16px; left: 0; right: 0;
  height: 2px; background: var(--border);
}
.progress-step {
  display: flex; flex-direction: column; align-items: center;
  position: relative; z-index: 1; flex: 1;
}
.progress-step .step-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: var(--text-muted);
  margin-bottom: 6px; transition: var(--transition-fast);
}
.progress-step.active .step-dot {
  background: var(--primary); border-color: var(--primary); color: var(--white);
}
.progress-step.done .step-dot {
  background: var(--success); border-color: var(--success); color: var(--white);
}
.progress-step .step-label {
  font-size: .72rem; color: var(--text-muted); text-align: center;
}
.progress-step.active .step-label { color: var(--primary); font-weight: 600; }

/* =============================================
   Edit Form
   ============================================= */
.edit-section { margin-bottom: var(--space-lg); }
.edit-section-title {
  font-size: .95rem; font-weight: 700; margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border-light);
}
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
  .profile-header {
    flex-direction: column; text-align: center; padding: var(--space-lg);
  }
  .profile-header .profile-avatar { margin: 0 auto; }
  .profile-header .profile-actions { margin: var(--space-md) auto 0; }
  .uc-tabs { flex-wrap: wrap; }
  .uc-tab { flex: none; font-size: .8rem; padding: 8px 12px; }
  .progress-steps { overflow-x: auto; justify-content: flex-start; gap: var(--space-md); }
  .progress-step { min-width: 60px; }
}

/* =============================================
   Milestone Timeline (for progress modal)
   ============================================= */
.milestone-list { position: relative; padding-left: 24px; }
.milestone-list::before {
  content: ''; position: absolute; left: 8px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.milestone-item { position: relative; padding-bottom: var(--space-lg); }
.milestone-item:last-child { padding-bottom: 0; }
.milestone-item::before {
  content: ''; position: absolute; left: -20px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--border);
}
.milestone-item.done::before { background: var(--success); border-color: var(--success); }
.milestone-item.active::before { background: var(--primary); border-color: var(--primary); }
.milestone-item .milestone-title { font-weight: 600; font-size: .9rem; }
.milestone-item .milestone-date { font-size: .78rem; color: var(--text-muted); }

/* =============================================
   Project list wrapper
   ============================================= */
.project-list { display: flex; flex-direction: column; gap: var(--space-md); }

/* Status color overrides for profile header button */
.profile-header .btn-outline { color: var(--white); border-color: rgba(255,255,255,.3); }
.profile-header .btn-outline:hover { background: rgba(255,255,255,.1); }
