/* /var/www/art4point/user_service/static/css/mypage.css */

/* =========================
   6. 마이페이지 전용 스타일
========================= */

.mypage {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.mypage-card {
  width: 100%;
  max-width: 480px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px 32px;
  border: 1px solid var(--color-border);
}

.mypage-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.mypage-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--color-text-main);
}

.mypage-subtitle {
  color: var(--color-text-sub);
  margin: 0;
  font-size: 16px;
}

/* 사용자 정보 섹션 */
.user-info-section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: "•";
  color: var(--color-main);
  font-size: 24px;
}

.info-grid {
  display: grid;
  gap: 16px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

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

.info-label {
  font-weight: 500;
  color: var(--color-text-main);
}

.info-value {
  color: var(--color-text-sub);
  font-weight: 500;
}

.info-value.highlight {
  color: var(--color-main);
  font-weight: 600;
}

/* 통계 카드 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.stat-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--color-border);
  transition: all 0.2s;
}

.stat-card:hover {
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-main);
  margin: 0 0 4px 0;
}

.stat-label {
  font-size: 14px;
  color: var(--color-text-sub);
  margin: 0;
}

/* 액션 버튼 */
.action-buttons {
  display: flex;
  gap: 12px;
  margin: 32px 0 0 0;
  flex-wrap: wrap;
}

.btn.secondary {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  color: var(--color-text-main);
}

.btn.secondary:hover {
  background: #f8f9fa;
  border-color: var(--color-text-light);
}

.btn.danger {
  background: #dc3545;
  border-color: #dc3545;
  color: var(--color-white);
}

.btn.danger:hover {
  background: #c82333;
  border-color: #bd2130;
}

/* 로딩 및 에러 상태 */
.mypage-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-sub);
}

.mypage-loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top: 2px solid var(--color-main);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.mypage-error {
  text-align: center;
  padding: 20px;
  color: #c62828;
  background: #ffebee;
  border-radius: var(--radius-md);
  border: 1px solid #ffcdd2;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .mypage-card {
    margin: 0 16px;
    padding: 32px 24px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .action-buttons .btn {
    justify-content: center;
  }
}

/* 프로젝트 목록이 있을 경우 */
.projects-section {
  margin-top: 40px;
}

.project-list {
  display: grid;
  gap: 16px;
}

.project-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: all 0.2s;
}

.project-item:hover {
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.project-thumbnail {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--color-border);
  margin-right: 16px;
  flex-shrink: 0;
}

.project-info {
  flex: 1;
}

.project-name {
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--color-text-main);
}

.project-status {
  font-size: 14px;
  color: var(--color-text-sub);
  margin: 0;
}

.project-amount {
  font-weight: 600;
  color: var(--color-main);
}