/* 마이페이지 공통 스타일 - 심플 버전 */

.main-content {
  min-height: calc(100vh - 200px);
  padding: 40px 0 60px;
  background: #f8f9fa;
}

/* 페이지 헤더 */
.page-header {
  margin-bottom: 32px;
  padding: 24px;
  background: white;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1f2937;
}

.page-header h1 i {
  font-size: 1.25rem;
  color: var(--primary);
}

.page-header p {
  font-size: 0.875rem;
  color: #6b7280;
}

/* 마이페이지 탭 */
.mypage-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: white;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.tab-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  transition: all 0.2s;
}

.tab-item i {
  font-size: 1rem;
}

.tab-item:hover {
  background: #f3f4f6;
  color: var(--primary);
}

.tab-item.active {
  background: var(--primary);
  color: white;
}

/* 마이페이지 콘텐츠 */
.mypage-content {
  max-width: 800px;
  margin: 0 auto;
}

/* 정보 카드 */
.info-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.card-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h2 i {
  color: var(--primary);
  font-size: 1rem;
}

.card-body {
  padding: 20px;
}

/* 정보 그리드 */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
}

.info-item .label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

.info-item .value {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

/* 폼 스타일 */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.form-group input {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(65, 131, 237, 0.1);
}

.form-group input:read-only {
  background: #f3f4f6;
  color: #6b7280;
}

.form-group small {
  font-size: 12px;
  color: #9ca3af;
}

.required {
  color: #ef4444;
}

.readonly-badge {
  display: inline-block;
  padding: 2px 6px;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
}

/* 폼 액션 */
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

/* 버튼 스타일 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn i {
  font-size: 14px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #e5e7eb;
  color: #374151;
}

.btn-secondary:hover {
  background: #d1d5db;
}

.btn-danger {
  background: #fee2e2;
  color: #dc2626;
}

.btn-danger:hover {
  background: #fecaca;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* 신청내역 목록 */
.requests-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 신청 카드 */
.request-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: all 0.2s;
}

.request-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.request-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.request-number {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.request-number .label {
  font-size: 11px;
  color: #6b7280;
}

.request-number .value {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

/* 상태 뱃지 */
.status-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.pending {
  background: #fef3c7;
  color: #d97706;
}

.status-badge.contacted {
  background: #dbeafe;
  color: #2563eb;
}

.status-badge.hold {
  background: #fed7aa;
  color: #ea580c;
}

.status-badge.pickup {
  background: #e9d5ff;
  color: #9333ea;
}

.status-badge.completed {
  background: #d1fae5;
  color: #059669;
}

.status-badge.cancelled {
  background: #fee2e2;
  color: #dc2626;
}

.request-body {
  padding: 18px;
}

/* 기기 정보 */
.device-info {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.device-image {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}

.device-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.device-name {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

.device-storage {
  font-size: 13px;
  color: #6b7280;
}

/* 가격 정보 */
.price-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.price-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
}

.price-label {
  font-size: 12px;
  color: #6b7280;
}

.price-value {
  font-size: 18px;
  font-weight: 700;
}

.price-value.estimated {
  color: var(--primary);
}

.price-value.final {
  color: #059669;
}

/* 메타 정보 */
.request-meta {
  display: flex;
  gap: 16px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
}

.meta-item i {
  color: var(--primary);
}

/* 요청 액션 */
.request-actions {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

/* 로딩 상태 */
.loading-state {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

.loading-state i {
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--primary);
}

.loading-state p {
  font-size: 14px;
}

/* 빈 상태 */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.empty-state i {
  font-size: 3rem;
  color: #d1d5db;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 20px;
}

/* 모달 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-content.modal-lg {
  max-width: 700px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
}

.modal-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* 반응형 */
@media (max-width: 768px) {
  .main-content {
    padding: 20px 0 40px;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }

  .mypage-tabs {
    flex-direction: column;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .price-info {
    grid-template-columns: 1fr;
  }

  .request-actions {
    flex-direction: column;
  }
}
