/* 그룹 멤버 관리 페이지 스타일 */

/* 필터 패널 */
.filter-panel {
  background: #fff;
  margin-bottom: 16px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-label {
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
}

.filter-select {
  padding: 8px 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
  background: #fff;
  cursor: pointer;
  min-width: 120px;
}

.filter-select:focus {
  outline: none;
  border-color: #4facfe;
}

.intro-panel .intro-text {
  color: #495057;
  margin-bottom: 16px;
  line-height: 1.6;
}

.intro-panel .summary-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.intro-panel .summary-bullets li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: #6c757d;
  font-size: 0.9rem;
}

.intro-panel .summary-bullets li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: #28a745;
  font-weight: bold;
}

.badge-soft {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e6fcf5;
  color: #0b7285;
}

/* 하위 탭 (기능 탭) */
.sub-tabs {
  display: flex;
  align-items: stretch;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 20px;
  border-radius: 0;
  position: relative;
  z-index: 2;
  gap: 0;
}

.sub-tab {
  flex: 1 1 0%;
  margin: 0;
  padding: 12px 8px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 600;
  color: #6c757d;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  min-height: 48px;
  text-align: center;
  position: relative;
  z-index: 3;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.sub-tab:hover {
  color: #28a745;
  background: rgba(40, 167, 69, 0.08);
}

.sub-tab.active {
  color: #28a745;
  border-bottom-color: #28a745;
  background: #fff;
}

/* 탭 콘텐츠 */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 업로드 메타 정보 */
.upload-meta {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.upload-meta__title {
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.upload-meta__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.upload-meta__list li {
  background: #fff;
  border: 1px solid #dee2e6;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #6c757d;
}

/* 정책 정보 */
.policy-info {
  background: #e7f5ff;
  border: 1px solid #74c0fc;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.policy-info--warning {
  background: #fff9db;
  border-color: #fcc419;
}

.policy-info__title {
  font-weight: 600;
  color: #1971c2;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.policy-info--warning .policy-info__title {
  color: #e67700;
}

.policy-info__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.policy-info__list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: #495057;
  line-height: 1.5;
}

.policy-info__list li::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: #1971c2;
  font-weight: bold;
}

.policy-info--warning .policy-info__list li::before {
  color: #e67700;
}

.policy-info__list li:last-child {
  margin-bottom: 0;
}

.policy-info__list li strong {
  color: #1971c2;
}

.policy-info--warning .policy-info__list li strong {
  color: #e67700;
}

/* 업로드 드롭존 */
.upload-dropzone {
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fafbfc;
}

.upload-dropzone.locked {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: #4facfe;
  background: #f0f9ff;
}

.upload-dropzone input[type="file"] {
  display: none;
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dropzone-icon {
  font-size: 2.5rem;
}

.dropzone-inner p {
  color: #6c757d;
  margin: 0;
  line-height: 1.5;
}

.upload-description {
  color: #6c757d;
  margin-bottom: 12px;
}

/* 업로드 푸터 */
.upload-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.file-info {
  font-size: 0.85rem;
  color: #6c757d;
}

.file-info.has-file {
  color: #28a745;
  font-weight: 500;
}

.upload-actions {
  display: flex;
  gap: 8px;
}

/* 버튼 스타일 */
.secondary-btn {
  padding: 10px 18px;
  border: 2px solid #dee2e6;
  background: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  border-color: #adb5bd;
  background: #f8f9fa;
}

.primary-btn {
  padding: 10px 24px;
  border: none;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 진행률 패널 */
.progress-panel {
  background: #f8f9fa;
}

.progress-bar-container {
  margin-bottom: 16px;
}

.progress-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-bar-label {
  font-weight: 500;
  color: #495057;
}

.progress-bar-percentage {
  font-weight: 600;
  color: #4facfe;
}

.progress-bar-track {
  height: 12px;
  background: #dee2e6;
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border-radius: 6px;
  transition: width 0.3s ease;
}

.progress-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

.stat-item {
  font-size: 0.9rem;
  color: #6c757d;
}

.stat-item strong {
  color: #495057;
}

.progress-log {
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.8rem;
  font-family: monospace;
}

.progress-log .log-item {
  padding: 4px 0;
  border-bottom: 1px solid #f1f3f5;
}

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

.progress-log .log-success {
  color: #28a745;
}

.progress-log .log-error {
  color: #dc3545;
}

.progress-log .log-info {
  color: #6c757d;
}

/* 결과 패널 */
.result-panel {
  background: #e6fcf5;
  border-color: #38d9a9;
}

.result-summary {
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.result-summary p {
  margin: 8px 0;
}

.result-actions {
  display: flex;
  gap: 12px;
}

/* 신규 유저 결과 다운로드 버튼 */
.phase-result-actions .download-btn {
  padding: 10px 24px;
  border: none;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.phase-result-actions .download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* 신규 유저 추가 타임라인 */
.new-user-progress {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.timeline-steps {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  position: relative;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  position: relative;
  opacity: 0.4;
}

.timeline-step--active {
  opacity: 1;
}

.timeline-step--active .timeline-dot {
  background: #4facfe;
  box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.2);
}

.timeline-step--completed {
  opacity: 1;
}

.timeline-step--completed .timeline-dot {
  background: #28a745;
}

.timeline-step--failed {
  opacity: 1;
}

.timeline-step--failed .timeline-dot {
  background: #dc3545;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #dee2e6;
  transition: all 0.3s ease;
}

.timeline-label {
  font-size: 0.75rem;
  text-align: center;
  color: #6c757d;
  max-width: 100px;
}

.timeline-step--active .timeline-label,
.timeline-step--completed .timeline-label {
  color: #495057;
  font-weight: 600;
}

/* 신규 유저 추가 업로드 카드 */
.upload-card {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.upload-card .panel-header {
  margin-bottom: 0.5rem;
}

/* 실행 버튼 바 */
.action-bar {
  display: flex;
  justify-content: flex-end;
  margin: 1rem 0;
}

/* 텍스트 버튼 (지우기) */
.text-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  font-size: 0.8rem;
  color: #6c757d;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.text-btn:hover {
  color: #dc3545;
}

/* 신규 유저 추가 - 2단계 액션 바 */
.phase-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #dee2e6;
}

.phase-action-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.phase-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6c757d;
  white-space: nowrap;
}

.phase-arrow {
  font-size: 1.5rem;
  color: #dee2e6;
  flex-shrink: 0;
}

.phase-status {
  font-size: 0.8rem;
}

.phase-status.completed {
  color: #28a745;
  font-weight: 600;
}

/* 결과 배너 */
.phase-result-banner {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.phase-result-banner.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.phase-result-banner.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.phase-result-banner p {
  margin: 0 0 0.5rem;
  font-weight: 500;
}

.phase-result-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* 2단계 버튼 강조 (1단계 완료 후) */
.primary-btn.highlight {
  animation: pulse 2s infinite;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* 1단계 완료 버튼 */
.primary-btn.phase-done {
  background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%);
  cursor: default;
}

/* 반응형 */
@media (max-width: 600px) {
  .upload-footer {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .upload-actions {
    justify-content: center;
  }

  .progress-stats {
    flex-wrap: wrap;
    gap: 12px;
  }

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