/**
 * 공통 컴포넌트 CSS
 * APT Mail Training Platform
 *
 * 이 파일은 여러 페이지에서 공통으로 사용되는 컴포넌트 스타일을 포함합니다.
 */

/* ===== 상태 배지 ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.status-badge .status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
}

.status-badge.status-active .status-dot {
  background: var(--success);
}

.status-badge.status-inactive .status-dot {
  background: var(--text-muted);
}

.status-badge.status-warning .status-dot {
  background: var(--warning);
}

.status-badge.status-danger .status-dot {
  background: var(--danger);
}

/* 대기(pending) 상태 - 주황색 */
.status-badge.status-pending .status-dot {
  background: var(--warning);
}

/* 거절(rejected) 상태 - 빨간색 */
.status-badge.status-rejected .status-dot {
  background: var(--danger);
}

/* ===== 승인/거절 액션 버튼 그룹 ===== */
.approval-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.approval-actions .btn {
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: all 0.2s ease;
  cursor: pointer;
  height: 32px;
  min-width: 32px;
}

.approval-actions .btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.approval-actions .btn .btn-text {
  display: none;
}

/* 승인 버튼 - Ghost 스타일 */
.btn-approve {
  background: transparent;
  color: var(--success);
  border: none;
}

.btn-approve:hover {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.btn-approve:active {
  background: rgba(16, 185, 129, 0.15);
}

/* 거절 버튼 - Ghost 스타일 */
.btn-reject {
  background: transparent;
  color: var(--danger);
  border: none;
}

.btn-reject:hover {
  background: rgba(199, 84, 84, 0.1);
  color: var(--danger);
}

.btn-reject:active {
  background: rgba(199, 84, 84, 0.15);
}

/* 일괄 작업 버튼 (bulk-actions 내) */
.bulk-actions .btn-approve,
.bulk-actions .btn-reject {
  padding: 6px 14px;
  height: auto;
  min-width: auto;
  gap: 6px;
}

.bulk-actions .btn-approve .btn-text,
.bulk-actions .btn-reject .btn-text,
.bulk-actions .btn-approve:not(:has(.btn-text)),
.bulk-actions .btn-reject:not(:has(.btn-text)) {
  display: inline;
}

/* 모달 푸터 버튼 */
.modal-footer .btn-approve,
.modal-footer .btn-reject {
  padding: 8px 16px;
  height: auto;
  min-width: auto;
  gap: 6px;
}

/* 카드 푸터 버튼 (테넌트 승인 카드) */
.approval-card-footer .btn-approve,
.approval-card-footer .btn-reject {
  padding: 6px 14px;
  height: auto;
  min-width: auto;
  gap: 6px;
}

/* ===== 페이지 헤더 ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header-title h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.page-header-title p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== 필터 바 ===== */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.search-box input {
  padding-left: 40px;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ===== 진행바 (Progress Bar) ===== */
/* 진행바 배경 트랙 */
.progress-bar,
.progress-track {
  width: 100%;
  height: 10px;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
}

/* 진행바 채워지는 부분 */
.progress-bar-fill,
.progress-fill {
  height: 100%;
  background: #4a7c91;
  border-radius: 6px;
  transition: width 0.3s ease;
}

/* 진행중 상태 - 빗살무늬 애니메이션 */
.progress-bar-fill.active,
.progress-fill.active {
  background-color: #4a7c91;
  background-image: linear-gradient(
    45deg,
    rgba(255,255,255,0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255,255,255,0.15) 50%,
    rgba(255,255,255,0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 20px 20px;
  animation: stripeRight 1s linear infinite;
}

/* 오른쪽으로 이동하는 애니메이션 */
@keyframes stripeRight {
  0% { background-position: 0 0; }
  100% { background-position: 20px 0; }
}

/* 캠페인 진행바 정보 (대시보드 테이블용) */
.campaign-progress-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.campaign-progress-info span {
  font-size: 0.875rem;
}

/* 캠페인 카드 진행바 */
.campaign-progress {
  margin-bottom: 16px;
}

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

.campaign-progress-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.campaign-progress-value {
  font-size: 13px;
  font-weight: 600;
}

/* ===== 캠페인 카드 ===== */
.campaign-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.campaign-card:hover {
  box-shadow: var(--shadow-md);
}

.campaign-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.campaign-card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.campaign-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.campaign-card-title h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.campaign-card-desc {
  margin: 6px 0 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

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

.campaign-card-body {
  padding: 20px;
}

/* 캠페인 통계 그리드 */
.campaign-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.campaign-stat {
  text-align: center;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
}

.campaign-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.campaign-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* 캠페인 정보 */
.campaign-info {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 13px;
  color: var(--text-secondary);
}

.campaign-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== 위저드 모달 ===== */
.wizard-modal .modal {
  max-width: 700px;
}

/* 위저드 모달 - 상단 고정 */
.wizard-modal {
  align-items: flex-start !important; /* 상단 정렬 */
  padding-top: 60px; /* 상단 여백 */
}

/* 위저드 모달 - 고정 높이 */
.wizard-modal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px); /* 상하 여백 고려 */
  height: 620px; /* 고정 높이로 모달 크기 일정하게 유지 */
}

.wizard-modal .modal-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  padding: 24px;
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 0 40px;
  flex-shrink: 0; /* 스텝 인디케이터는 크기 고정 */
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
}

.wizard-step::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border-color);
  z-index: 0;
}

.wizard-step:last-child::before {
  display: none;
}

.wizard-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.wizard-step.active .wizard-step-number {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.wizard-step.completed .wizard-step-number {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.wizard-step-label {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.wizard-step.active .wizard-step-label {
  color: var(--primary);
  font-weight: 500;
}

/* 위저드 컨텐츠 영역 - 스크롤 가능 */
.wizard-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0; /* flexbox에서 overflow 작동을 위해 필요 */
  padding-right: 8px; /* 스크롤바 공간 확보 */
}

/* 스크롤바 스타일링 */
.wizard-content::-webkit-scrollbar {
  width: 6px;
}

.wizard-content::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}

.wizard-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.wizard-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.wizard-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  margin-top: auto; /* 하단 고정 */
  border-top: 1px solid var(--border-color);
  flex-shrink: 0; /* 푸터는 크기 고정 */
}

/* ===== 발송 방식 선택 카드 ===== */
.send-type-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.send-type-card {
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.send-type-card:hover {
  border-color: var(--primary-light);
}

.send-type-card.selected {
  border-color: var(--primary);
  background: rgba(74, 124, 145, 0.05);
}

.send-type-card-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--text-secondary);
}

.send-type-card.selected .send-type-card-icon {
  background: var(--primary);
  color: white;
}

.send-type-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.send-type-card-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== 발송 유형 라디오 옵션 (수정 모달용) ===== */
.send-type-options {
  display: flex;
  gap: 12px;
}

.radio-option {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  flex: 1;
  transition: all var(--transition-fast);
}

.radio-option:hover {
  border-color: var(--primary-light);
}

.radio-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(74, 124, 145, 0.05);
}

.radio-option input[type="radio"] {
  margin-bottom: 8px;
}

.radio-option .radio-label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

.radio-option .radio-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== SMTP 모드 선택 카드 ===== */
.smtp-mode-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.smtp-mode-card {
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.smtp-mode-card:hover {
  border-color: var(--primary-light);
}

.smtp-mode-card.selected {
  border-color: var(--primary);
  background: rgba(74, 124, 145, 0.05);
}

.smtp-mode-card-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.smtp-mode-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===== SMTP 계정 선택 아이템 ===== */
.smtp-account-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.smtp-account-item:hover {
  border-color: var(--primary-light);
}

.smtp-account-item.selected {
  border-color: var(--primary);
  background: rgba(74, 124, 145, 0.05);
}

.smtp-account-item .smtp-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.smtp-account-item-info {
  flex: 1;
}

.smtp-account-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.smtp-account-item-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ===== 태그 입력 ===== */
.tag-input-container {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-card);
  height: 42px;
  transition: border-color var(--transition-fast);
  overflow-x: auto;
  overflow-y: hidden;
}

.tag-input-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 124, 145, 0.1);
}

.tag-input-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  flex-shrink: 0;
}

.tag-input-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  background: #f1f5f9;
  color: var(--text-secondary);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.5;
}

.tag-input-tag:hover {
  background: #e2e8f0;
  color: var(--text-secondary);
  border-color: #cbd5e1;
}

.tag-input-tag::after {
  content: '×';
  font-size: 14px;
  font-weight: 600;
  margin-left: 2px;
  opacity: 0.7;
}

.tag-input-tag:hover::after {
  opacity: 1;
}

.tag-input-field {
  flex: 1;
  min-width: 80px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  padding: 0;
  height: 28px;
  line-height: 28px;
}

.tag-input-field::placeholder {
  color: var(--text-muted);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== 템플릿 선택 그리드 ===== */
.template-select-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* 템플릿 선택 그리드 내 빈 상태 */
.template-select-grid .empty-state {
  grid-column: 1 / -1;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.template-select-grid .empty-state-icon {
  margin-bottom: 12px;
}

.template-select-grid .empty-state-title {
  margin-bottom: 4px;
}

.template-select-grid .empty-state-desc {
  margin-bottom: 0;
}

.template-select-item {
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.template-select-item:hover {
  border-color: var(--primary-light);
}

.template-select-item.selected {
  border-color: var(--primary);
  background: rgba(74, 124, 145, 0.05);
}

.template-select-item-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.template-select-item-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== 수신자 선택 요약 ===== */
.recipient-summary {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 16px;
  margin-bottom: 16px;
}

.recipient-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.recipient-summary-row:last-child {
  border-bottom: none;
  font-weight: 600;
}

/* ===== 관리자 사이드바 ===== */
.sidebar-admin {
  background: var(--bg-sidebar);
}

/* ===== 업로드 영역 ===== */
.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 40px;
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.upload-area:hover {
  border-color: var(--primary);
  background: rgba(74, 124, 145, 0.05);
}

.upload-area-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: rgba(74, 124, 145, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.upload-area-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.upload-area-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== 제외 배지 ===== */
.excluded-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(199, 84, 84, 0.1);
  color: var(--danger);
  border-radius: 4px;
  font-size: 12px;
}

/* ===== 템플릿 카드 그리드 ===== */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.template-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.template-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

/* 미리보기 없는 카드 (리스트 형식) */
.template-card.no-preview {
  min-height: 340px;
  display: flex;
  flex-direction: column;
}

.template-card.no-preview .template-card-body {
  flex: 1;
  padding: 16px;
  min-height: auto;
}

.template-card.no-preview .template-type-badge {
  position: static;
  display: inline-flex;
}

.template-card-preview {
  height: 180px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

/* HTML 썸네일 미리보기 */
.template-card-thumbnail {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  display: flex;
  justify-content: center;
}

.template-card-thumbnail-content {
  transform: scale(0.45);
  transform-origin: top center;
  width: 222%;
  height: 222%;
  pointer-events: none;
  user-select: none;
  padding: 8px 40px;
  font-size: 14px;
  line-height: 1.5;
}

/* 썸네일 하단 그라데이션 오버레이 */
.template-card-thumbnail::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.9));
  pointer-events: none;
}

/* ===== 타입별 카드 배경색 ===== */
.template-card.type-education .template-card-preview {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
}

.template-card.type-quiz .template-card-preview {
  background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
}

.template-card.type-alert .template-card-preview {
  background: linear-gradient(135deg, #fceaea 0%, #fceaea 100%);
}

.template-card.type-hybrid .template-card-preview {
  background: linear-gradient(135deg, #fce7f3 0%, #fdf2f8 100%);
}

/* 유형 배지 (하단 오버레이) */
.template-type-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.template-type-badge.email {
  background: rgba(74, 124, 145, 0.85);
  color: white;
}

.template-type-badge.email svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.template-type-badge.sms {
  background: rgba(16, 185, 129, 0.85);
  color: white;
}

.template-type-badge.sms svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* 시나리오 템플릿 배지 */
.template-type-badge.scenario {
  background: rgba(199, 84, 84, 0.85);
  color: white;
}

.template-type-badge.scenario svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* 교육 콘텐츠 배지 */
.template-type-badge.education {
  background: rgba(74, 124, 145, 0.85);
  color: white;
}

.template-type-badge.education svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* 퀴즈 레이아웃 배지 */
.template-type-badge.quiz {
  background: rgba(16, 185, 129, 0.85);
  color: white;
}

.template-type-badge.quiz svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* 경각심 시나리오 배지 */
.template-type-badge.alert {
  background: rgba(199, 84, 84, 0.85);
  color: white;
}

.template-type-badge.alert svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* 혼합형 배지 */
.template-type-badge.hybrid {
  background: rgba(168, 85, 247, 0.85);
  color: white;
}

.template-type-badge.hybrid svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* 첨부파일 배지 */
.template-attachment-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  background: rgba(148, 163, 184, 0.8);
  color: white;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  backdrop-filter: blur(4px);
}

.template-attachment-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* 기존 아이콘 스타일 (본문 없을 때 폴백) */
.template-card-preview-icon {
  width: 60px;
  height: 60px;
  background: var(--bg-card);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  margin-top: 30px;
}

.template-card-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
}

.template-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-card-subject {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 18px;
}

.template-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 16px;
}

.template-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 20px;
}

.template-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: #e0e7ff;
  color: #4338ca;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  height: 21px;
  box-sizing: border-box;
}

.template-card-smtp {
  display: inline-flex;
  align-items: center;
}

.template-card-smtp .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px !important;
  font-size: 11px !important;
  font-weight: 500;
  border-radius: 12px !important;
  line-height: 1.4;
  height: 21px;
  box-sizing: border-box;
}

.template-card-smtp .badge svg {
  flex-shrink: 0;
}

.template-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.template-card-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===== 공통 카드 액션 스타일 ===== */
.card-actions,
.template-card-actions,
.education-card-actions,
.quiz-layout-actions {
  display: flex;
  gap: 8px;
}

.card-actions button:not(.btn),
.template-card-actions button:not(.btn),
.education-card-actions button:not(.btn),
.quiz-layout-actions button:not(.btn) {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.card-actions button:not(.btn):hover,
.template-card-actions button:not(.btn):hover,
.education-card-actions button:not(.btn):hover,
.quiz-layout-actions button:not(.btn):hover {
  background: var(--primary);
  color: white;
}

.card-actions button.danger:hover,
.template-card-actions button.danger:hover,
.education-card-actions button.danger:hover,
.quiz-layout-actions button.danger:hover {
  background: var(--danger);
}

.card-actions button:not(.btn):disabled,
.template-card-actions button:not(.btn):disabled,
.education-card-actions button:not(.btn):disabled,
.quiz-layout-actions button:not(.btn):disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.card-actions button:not(.btn):disabled:hover,
.template-card-actions button:not(.btn):disabled:hover,
.education-card-actions button:not(.btn):disabled:hover,
.quiz-layout-actions button:not(.btn):disabled:hover {
  background: var(--bg-primary);
  color: var(--text-secondary);
}

/* ===== 교육 관리 카드 푸터 ===== */
.education-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border-color);
}

.education-card-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===== 리포트 요약 카드 ===== */
.report-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  border: 1px solid var(--border-color);
}

.summary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.summary-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-card-icon.blue { background: rgba(74, 124, 145, 0.1); color: var(--primary); }
.summary-card-icon.green { background: rgba(72, 166, 124, 0.1); color: var(--success); }
.summary-card-icon.orange { background: rgba(199, 138, 58, 0.1); color: var(--warning); }
.summary-card-icon.red { background: rgba(199, 84, 84, 0.1); color: var(--danger); }

.summary-card-trend {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
}

.summary-card-trend.up { background: rgba(72, 166, 124, 0.1); color: var(--success); }
.summary-card-trend.down { background: rgba(199, 84, 84, 0.1); color: var(--danger); }

.summary-card-value {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 4px;
}

.summary-card-label {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== 차트 카드 ===== */
.chart-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  padding: 20px;
  margin-bottom: 24px;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.chart-card-title {
  font-size: 16px;
  font-weight: 600;
}

.chart-container {
  position: relative;
  height: 300px;
}

/* ===== 부서별 테이블 ===== */
.dept-table {
  width: 100%;
}

.dept-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.dept-row:last-child {
  border-bottom: none;
}

.dept-name {
  width: 100px;
  font-weight: 500;
}

.dept-bar-container {
  flex: 1;
  margin: 0 16px;
}

.dept-bar {
  height: 24px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.dept-bar-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 12px;
  font-weight: 500;
  color: white;
  transition: width 0.5s ease;
}

.dept-bar-fill.low { background: var(--success); }
.dept-bar-fill.medium { background: var(--warning); }
.dept-bar-fill.high { background: var(--danger); }

/* 다크모드: --success/--warning/--danger 는 글자·아이콘용으로 밝게 잡혀 있어
   바를 가득 채우는 면색으로 쓰면 주변 다크 UI 대비 너무 밝게 튄다.
   바 채움에 한해 한 톤 가라앉힌 전용 색을 사용 (텍스트용 변수는 그대로). */
[data-theme="dark"] .dept-bar-fill.low { background: #479b73; }
[data-theme="dark"] .dept-bar-fill.medium { background: #bd8a44; }
[data-theme="dark"] .dept-bar-fill.high { background: #c46060; }

.dept-stats {
  width: 120px;
  text-align: right;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== 위험 지표 ===== */
.risk-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.risk-indicator.low { background: rgba(72, 166, 124, 0.1); color: var(--success); }
.risk-indicator.medium { background: rgba(199, 138, 58, 0.1); color: var(--warning); }
.risk-indicator.high { background: rgba(199, 84, 84, 0.1); color: var(--danger); }

/* ===== 훈련 카드 ===== */
.training-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin-bottom: 20px;
  transition: all var(--transition-fast);
}

.training-card:hover {
  box-shadow: var(--shadow-md);
}

.training-card-header {
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.training-card-info {
  flex: 1;
}

.training-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.training-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.training-card-meta {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

.training-card-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.training-card-body {
  padding: 20px 24px;
}

.training-progress {
  margin-bottom: 20px;
}

.training-progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}

.training-progress-label {
  color: var(--text-secondary);
}

.training-progress-value {
  font-weight: 600;
}

.training-campaigns {
  margin-top: 16px;
}

.training-campaigns-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== 캠페인 미니 카드 ===== */
.campaign-mini-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  margin-bottom: 8px;
  transition: background 0.15s, box-shadow 0.15s;
}

.campaign-mini-card:hover {
  background: var(--bg-tertiary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.campaign-mini-card:last-child {
  margin-bottom: 0;
}

.campaign-mini-info {
  display: flex;
  align-items: center;
  gap: 12px;
  /* 자식 요소(.campaign-mini-name)가 컬럼 폭을 초과하면 … 처리되도록 min-width:0 허용 */
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

/* 상태 뱃지(완료/진행 등)는 고정 크기 유지 — flex 축소 시 두 줄로 깨지는 현상 방지 */
.campaign-mini-info > .badge {
  flex: 0 0 auto;
  white-space: nowrap;
}

.campaign-mini-name {
  font-size: 14px;
  font-weight: 500;
  /* 긴 캠페인명 한 줄 말줄임 */
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-mini-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.campaign-mini-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== 훈련 통계 ===== */
.training-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.training-stat {
  text-align: center;
}

.training-stat-value {
  font-size: 24px;
  font-weight: 700;
}

.training-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== 날짜 범위 ===== */
.date-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  font-size: 13px;
}

/* ===== 빈 캠페인 ===== */
.empty-campaigns {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
}

.empty-campaigns svg {
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ===== 설정 레이아웃 ===== */
.settings-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

.settings-nav {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  padding: 8px;
  height: fit-content;
  position: sticky;
  top: 88px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--border-radius);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  margin-bottom: 4px;
}

.settings-nav-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

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

.settings-nav-item svg {
  width: 20px;
  height: 20px;
}

.settings-section {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.settings-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  min-height: 80px;
}

.settings-section-header-info {
  flex: 1;
  min-width: 0;
}

.settings-section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.settings-section-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.settings-section-body {
  padding: 24px;
}

.settings-row {
  display: flex;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.settings-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.settings-row:first-child {
  padding-top: 0;
}

.settings-row-label h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.settings-row-label p {
  font-size: 12px;
  color: var(--text-muted);
}

.settings-row-content {
  flex: 1;
}

/* ===== 시간 범위 ===== */
.time-range {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-range span {
  color: var(--text-muted);
}

/* ===== 화이트리스트 정보 ===== */
.whitelist-info {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 16px;
  margin-top: 16px;
}

.whitelist-info-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.whitelist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}

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

.whitelist-item code {
  background: var(--bg-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.copy-btn {
  padding: 4px 8px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* ===== Input Group ===== */
.input-group {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
}

.input-group .form-input {
  width: 100px;
  flex: none;
  border-radius: var(--border-radius) !important;
}

.input-group-addon {
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
  padding-bottom: 4px;
}

/* ===== Checkbox Group ===== */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ===== Backup List ===== */
.backup-list {
  width: 100%;
  min-width: 400px;
}

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

.backup-item:first-child {
  padding-top: 0;
}

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

.backup-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.backup-name {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 13px;
  color: var(--text-primary);
}

.backup-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.backup-actions {
  display: flex;
  gap: 4px;
}

/* ===== Settings Subtitle ===== */
.settings-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* ===== Form Row ===== */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* ===== Card Animation ===== */
.card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card.animated {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 공통 애니메이션 ===== */
.summary-card,
.chart-card,
.stat-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.summary-card.animated,
.chart-card.animated,
.stat-card.animated {
  opacity: 1;
  transform: translateY(0);
}

.health-item {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.health-item.animated {
  opacity: 1;
  transform: translateX(0);
}

.alert-item {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.alert-item.animated {
  opacity: 1;
  transform: translateX(0);
}

/* 회전 애니메이션 */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== 반응형 스타일 ===== */
@media (max-width: 1024px) {
  #menuToggle {
    display: flex !important;
  }

  .campaign-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .report-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .training-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 8px;
  }

  .settings-nav-item {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .page-header-actions {
    width: 100%;
  }

  .page-header-actions .btn {
    flex: 1;
  }

  .campaign-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .send-type-cards {
    grid-template-columns: 1fr;
  }

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

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

  /* 위저드 모달 반응형 */
  .wizard-modal {
    padding-top: 20px;
  }

  .wizard-modal .modal-content {
    height: auto;
    max-height: calc(100vh - 40px);
  }

  .wizard-steps {
    padding: 0 10px;
  }

  .wizard-step-label {
    display: none; /* 모바일에서 레이블 숨김 */
  }

  .smtp-mode-cards {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
  }

  .search-box {
    max-width: 100%;
  }

  .report-summary {
    grid-template-columns: 1fr;
  }

  .report-filters {
    flex-direction: column;
  }

  .report-filters .form-select {
    width: 100% !important;
  }

  .training-card-header {
    flex-direction: column;
    gap: 16px;
  }

  .training-card-actions {
    width: 100%;
  }

  .training-card-actions .btn {
    flex: 1;
  }

  .training-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .campaign-mini-card {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .settings-row {
    flex-direction: column;
    gap: 12px;
  }

  .settings-row-label {
    width: 100%;
  }

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

/* ===== Step Indicator ===== */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  border: 2px solid var(--border-color);
  transition: all 0.3s;
}

.step.active .step-number {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.step.completed .step-number {
  background: var(--success-color);
  color: white;
  border-color: var(--success-color);
}

.step.completed .step-number::after {
  content: '✓';
}

.step-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.step.active .step-label {
  color: var(--primary-color);
  font-weight: 500;
}

.step-line {
  width: 60px;
  height: 2px;
  background: var(--border-color);
  margin-bottom: 1.5rem;
}

/* ===== Form Title & Description ===== */
.form-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.form-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

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

.form-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ===== Input with Suffix ===== */
.input-with-suffix {
  display: flex;
  align-items: stretch;
}

.input-with-suffix .form-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-suffix {
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: none;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.id-check-result {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

/* ===== Password Strength Indicator ===== */
.password-strength {
  margin-bottom: 1.5rem;
}

.strength-bar {
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.strength-fill {
  height: 100%;
  width: 0;
  transition: all 0.3s;
}

.strength-text {
  font-size: 0.75rem;
}

/* ===== Checkbox Group ===== */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-label.agreement {
  font-size: 0.875rem;
}

.checkbox-label a {
  color: var(--primary-color);
}

/* ===== Form Actions ===== */
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-actions .btn {
  flex: 1;
}

/* ===== Complete Step ===== */
.complete-icon {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 1rem;
}

.request-summary {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.request-summary h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.summary-label {
  color: var(--text-secondary);
}

.summary-value {
  font-weight: 500;
}

.next-steps {
  margin: 1.5rem 0;
}

.next-steps h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.step-list {
  list-style: none;
  padding: 0;
}

.step-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border-color);
}

.step-list li:last-child {
  border-bottom: none;
}

.step-list .step-icon {
  font-size: 1.25rem;
}

/* ===== Terms Modal Content ===== */
.terms-content {
  max-height: 60vh;
  overflow-y: auto;
}

.terms-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.terms-content h4:first-child {
  margin-top: 0;
}

.terms-content p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.terms-content ul {
  margin: 0.5rem 0 1rem 1.5rem;
}

.terms-content li {
  margin-bottom: 0.25rem;
}

/* ===== Auth Features Panel ===== */
.auth-features {
  flex: 1;
  background: linear-gradient(135deg, var(--primary-color), #1e40af);
  color: white;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-features h2 {
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.feature-content h3 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.feature-content p {
  font-size: 0.875rem;
  opacity: 0.9;
  line-height: 1.5;
}

/* ===== Text Utilities ===== */
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }

/* ===== Register Page Responsive ===== */
@media (max-width: 992px) {
  .auth-container {
    flex-direction: column;
  }

  .auth-card {
    max-width: none;
  }

  .auth-features {
    padding: 2rem;
  }
}

@media (max-width: 576px) {
  .auth-card {
    padding: 1.5rem;
  }

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

  .step-indicator {
    flex-wrap: wrap;
  }

  .step-line {
    width: 30px;
  }
}

/* ===== Data Table ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
  border-bottom: 1px solid var(--border-color);
}

.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--bg-secondary);
}

/* Data table cell content alignment */
.data-table td {
  text-align: left;
  vertical-align: middle;
}

/* Data table badge alignment - offset left padding for visual alignment */
.data-table td .badge {
  margin-left: -10px;
}

/* Data table action buttons container alignment */
.data-table td .action-buttons,
.data-table td .btn-group {
  margin-left: -6px;
}

/* Data table code/ip-address alignment */
.data-table td code,
.data-table td .ip-address {
  margin-left: -8px;
}

/* ===== Chart Container ===== */
.chart-container {
  position: relative;
  height: 220px;
  overflow: hidden; /* canvas 축소 시 넘침 방지 */
}

.chart-container-sm {
  height: 180px;
  overflow: hidden;
}

.chart-container canvas {
  max-width: 100%;
  max-height: 100%;
}

/* Chart Stats Grid */
.chart-stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.chart-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 60px;
}

.chart-stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.chart-stat-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-stat-percent {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Chart Legend */
.chart-legend {
  display: flex;
  gap: 12px;
  font-size: 12px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chart-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* ===== Auto Refresh Toggle ===== */
.auto-refresh-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.toggle-label input[type="checkbox"] {
  position: relative;
  width: 40px;
  height: 22px;
  appearance: none;
  background: var(--bg-tertiary);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.toggle-label input[type="checkbox"]::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--bg-card);
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-label input[type="checkbox"]:checked {
  background: var(--primary);
}

.toggle-label input[type="checkbox"]:checked::before {
  transform: translateX(18px);
}

.toggle-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.toggle-label input[type="checkbox"]:checked ~ .toggle-text {
  color: var(--primary);
  font-weight: 500;
}

/* ===== Notification Center ===== */
.notification-center {
  position: relative;
}

.notification-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.notification-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.notification-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 사이드바 헤더에 배치된 알림 벨 — 라이트 사이드바 대응 + 드롭다운 우측(콘텐츠 위) 전개 */
.notification-center-sidebar .notification-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--text-muted);
}

.notification-center-sidebar .notification-btn:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-primary);
}

.notification-center-sidebar .notification-badge {
  top: 2px;
  right: 2px;
}

.notification-center-sidebar .notification-dropdown {
  left: 0;
  right: auto;
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.notification-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.notification-list {
  flex: 1;
  overflow-y: auto;
  max-height: 360px;
}

.notification-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.notification-empty svg {
  margin-bottom: 12px;
  opacity: 0.5;
}

.notification-empty p {
  margin: 0;
  font-size: 14px;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.notification-item:hover {
  background: var(--bg-secondary);
}

.notification-item.unread {
  background: rgba(74, 124, 145, 0.04);
}

.notification-item.unread:hover {
  background: rgba(74, 124, 145, 0.08);
}

.notification-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-icon.icon-blue {
  background: rgba(74, 124, 145, 0.1);
  color: #4a7c91;
}

.notification-icon.icon-purple {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.notification-icon.icon-red {
  background: rgba(199, 84, 84, 0.1);
  color: #c75454;
}

.notification-icon.icon-gray {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.notification-content {
  flex: 1;
  min-width: 0;
}

/* 알림 개별 삭제(×) 버튼 — 항목 hover 시 노출 */
.notification-delete {
  flex-shrink: 0;
  align-self: flex-start;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.notification-item:hover .notification-delete {
  opacity: 1;
}

.notification-delete:hover {
  background: var(--bg-tertiary);
  color: var(--danger);
}

.notification-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-message {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-time {
  font-size: 12px;
  color: var(--text-muted);
}

.notification-dot {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

.notification-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.notification-footer a {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}

.notification-footer a:hover {
  text-decoration: underline;
}

/* ===== Back Link ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--primary);
}

/* ===== Page Title Row ===== */
.page-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.page-title-row h2 {
  margin: 0;
}

/* ===== Content Grid Layout ===== */
.content-grid {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 360px);
  gap: 1.5rem;
  min-width: 0;
}

.content-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
  overflow: hidden;
}

.content-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ===== Info List ===== */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

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

.info-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  flex-shrink: 0;
  min-width: 80px;
}

.info-value {
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  word-break: break-word;
}

/* ===== Tag List ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.375rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ===== Risk Summary ===== */
.risk-summary {
  text-align: center;
}

.risk-score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-weight: 600;
}

.risk-score-circle.warning {
  background: rgba(199, 138, 58, 0.1);
  color: var(--warning-color);
  border: 3px solid var(--warning-color);
}

.risk-score-circle.danger {
  background: rgba(199, 84, 84, 0.1);
  color: var(--danger-color);
  border: 3px solid var(--danger-color);
}

.risk-score-circle.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border: 3px solid var(--success-color);
}

.risk-score-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.risk-breakdown {
  text-align: left;
}

.risk-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.risk-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.risk-count {
  font-weight: 600;
}

.risk-depts {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ===== Action Buttons ===== */
.action-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ===== Link Styles ===== */
.link-primary {
  color: var(--primary-color);
  text-decoration: none;
}

.link-primary:hover {
  text-decoration: underline;
}

/* ===== Radio Group ===== */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* ===== Content Grid Responsive ===== */
@media (max-width: 1400px) {
  .content-grid {
    grid-template-columns: 1fr 260px;
  }
}

@media (max-width: 1200px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .content-sidebar {
    order: -1;
  }
}

@media (max-width: 768px) {
  .page-title-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =====================================================
   AUTH PAGES - Unified Components for Login/Register/Password
   ===================================================== */

/* ===== Auth Page Layout (2-Column for Register) ===== */
.auth-page-split {
  min-height: 100vh;
  display: flex;
  background: var(--bg-primary);
}

.auth-form-section {
  flex: 1;
  max-width: 600px;
  padding: 48px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.auth-feature-section {
  flex: 1;
  background: linear-gradient(135deg, #4a7c91 0%, #33596a 100%);
  color: white;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===== Auth Brand ===== */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.auth-brand-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.auth-brand-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ===== Auth Step Indicator ===== */
.auth-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
}

.auth-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.auth-step.active .auth-step-number {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.auth-step.completed .auth-step-number {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.auth-step.completed .auth-step-number::after {
  content: '✓';
}

.auth-step-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.auth-step.active .auth-step-label {
  color: var(--primary);
}

.auth-step-line {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  margin: 0 4px;
}

/* ===== Auth Form Container ===== */
.auth-form-container {
  flex: 1;
}

.auth-form-header {
  margin-bottom: 24px;
}

.auth-form-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-form-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== Auth Form Elements ===== */
.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form .form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-form .form-input,
.auth-form .form-select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.auth-form .form-input:focus,
.auth-form .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 124, 145, 0.1);
}

.auth-form .form-input::placeholder {
  color: var(--text-muted);
}

.auth-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.auth-form .form-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.auth-form .required {
  color: var(--danger);
}

/* ===== Input with Domain Suffix ===== */
.input-with-domain {
  display: flex;
  align-items: stretch;
}

.input-with-domain .form-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.domain-suffix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: none;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  color: var(--text-secondary);
  font-size: 14px;
  white-space: nowrap;
}

.id-check-result {
  margin-top: 8px;
  font-size: 13px;
}

/* ===== Password Strength Indicator ===== */
.password-strength-bar {
  margin-top: 8px;
}

.strength-track {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.strength-label {
  font-size: 12px;
  margin-top: 6px;
  display: block;
}

/* ===== Password Toggle ===== */
.form-input-wrapper {
  position: relative;
}

.form-input-wrapper .form-input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}

.password-toggle:hover {
  color: var(--text-secondary);
}

/* ===== Auth Checkbox Group ===== */
.auth-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.auth-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}

.auth-checkbox span {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

.auth-checkbox a {
  color: var(--primary);
  text-decoration: none;
}

.auth-checkbox a:hover {
  text-decoration: underline;
}

/* ===== Remember & Forgot Password Row ===== */
.remember-forgot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

/* ===== Auth Form Actions ===== */
.auth-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.auth-form-actions .btn {
  flex: 1;
  height: 46px;
  font-size: 15px;
  font-weight: 600;
}

.btn-auth {
  width: 100%;
  height: 46px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
}

/* ===== Auth Alert Messages ===== */
.auth-alert {
  padding: 12px 16px;
  border-radius: var(--border-radius);
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-alert.error {
  background: rgba(199, 84, 84, 0.1);
  color: var(--danger);
  border: 1px solid rgba(199, 84, 84, 0.2);
}

.auth-alert.success {
  background: rgba(72, 166, 124, 0.1);
  color: var(--success);
  border: 1px solid rgba(72, 166, 124, 0.2);
}

.auth-alert.info {
  background: rgba(74, 124, 145, 0.1);
  color: var(--primary);
  border: 1px solid rgba(74, 124, 145, 0.2);
}

/* Auth Alert Animation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ===== Auth Success View ===== */
.auth-success-view {
  text-align: center;
  padding: 20px 0;
}

.auth-success-icon {
  width: 64px;
  height: 64px;
  background: rgba(72, 166, 124, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--success);
}

.auth-success-icon.lg {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
}

.auth-success-view h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.auth-success-view p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== Auth Complete Section (Register) ===== */
.auth-complete-section {
  text-align: center;
  padding: 24px 0;
}

.auth-complete-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.auth-complete-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

/* ===== Auth Summary Card ===== */
.auth-summary-card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.auth-summary-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.auth-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}

.auth-summary-label {
  color: var(--text-secondary);
}

.auth-summary-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* ===== Auth Next Steps Card ===== */
.auth-next-steps-card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.auth-next-steps-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.auth-next-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 14px;
  color: var(--text-primary);
}

.auth-next-step-item:last-child {
  border-bottom: none;
}

.auth-next-step-icon {
  font-size: 20px;
}

/* ===== Auth Page Footer ===== */
.auth-page-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-page-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-page-footer a:hover {
  text-decoration: underline;
}

/* ===== Auth Feature Panel (Right Side) ===== */
.feature-header {
  margin-bottom: 40px;
}

.feature-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-header p {
  font-size: 15px;
  opacity: 0.9;
  line-height: 1.6;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-item-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.feature-item-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-item-content p {
  font-size: 14px;
  opacity: 0.85;
  line-height: 1.5;
}

.feature-stats {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-stat {
  text-align: center;
}

.feature-stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.feature-stat-label {
  font-size: 13px;
  opacity: 0.8;
}

/* ===== Auth Security Notice ===== */
.auth-security-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}

.auth-security-notice svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

/* ===== Auth Back Link ===== */
.auth-back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin-bottom: 24px;
  text-decoration: none;
}

.auth-back-link:hover {
  color: white;
  text-decoration: none;
}

/* ===== Auth Pages Responsive ===== */
@media (max-width: 1024px) {
  .auth-feature-section {
    display: none;
  }

  .auth-form-section {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .auth-form-section {
    padding: 24px;
  }

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

  .auth-steps {
    flex-wrap: wrap;
    gap: 12px;
  }

  .auth-step-line {
    display: none;
  }
}

/* ===== 날짜/시간 표시 ===== */
.datetime {
  white-space: nowrap;
}

.datetime .time {
  color: var(--text-secondary);
  margin-left: 4px;
}

/* ===== 감사 로그 테이블 (공통 스타일) ===== */

/* 감사 로그 필터 영역 */
.audit-filter-row {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.audit-filter-row .form-select {
  width: auto;
  min-width: 140px;
}

/* 감사 로그 테이블 */
.audit-log-table {
  overflow-x: auto;
}

.audit-log-table .table {
  margin-bottom: 0;
  min-width: 800px;
}

.audit-log-table .table th {
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.audit-log-table .table td {
  padding: 10px 12px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}

.audit-log-table .table tbody tr:last-child td {
  border-bottom: none;
}

.audit-log-table .table tbody tr:hover {
  background: var(--bg-secondary);
}

.audit-log-table .table tbody tr.animated {
  opacity: 1;
}

/* 감사 로그 일시 컬럼 */
.audit-log-table .audit-datetime {
  white-space: nowrap;
  font-size: 12px;
}

.audit-log-table .audit-datetime .date {
  font-weight: 500;
  color: var(--text-primary);
}

.audit-log-table .audit-datetime .time {
  color: var(--text-muted);
  margin-left: 4px;
}

/* 감사 로그 상태 점 */
.audit-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.audit-status-dot.status-success {
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.audit-status-dot.status-failure {
  background: var(--danger);
  box-shadow: 0 0 0 2px rgba(199, 84, 84, 0.2);
}

/* 감사 로그 카테고리/작업 배지 */
.audit-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.audit-badge-auth { background: rgba(139, 92, 246, 0.15); color: #7c3aed; }
.audit-badge-user { background: rgba(74, 124, 145, 0.15); color: #3d6a7d; }
.audit-badge-tenant { background: rgba(72, 166, 124, 0.15); color: #2f7a55; }
.audit-badge-campaign { background: rgba(236, 72, 153, 0.15); color: #db2777; }
.audit-badge-template { background: rgba(199, 138, 58, 0.15); color: #a8721e; }
.audit-badge-training { background: rgba(20, 184, 166, 0.15); color: #0d9488; }
.audit-badge-recipient { background: rgba(95, 106, 204, 0.15); color: #404a9e; }
.audit-badge-settings { background: rgba(107, 114, 128, 0.15); color: var(--text-secondary); }
.audit-badge-system { background: rgba(199, 84, 84, 0.15); color: #9c3a3a; }

.audit-action-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.audit-action-create { background: rgba(72, 166, 124, 0.12); color: #2f7a55; }
.audit-action-update { background: rgba(74, 124, 145, 0.12); color: #3d6a7d; }
.audit-action-delete { background: rgba(199, 84, 84, 0.12); color: #9c3a3a; }
.audit-action-login { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.audit-action-logout { background: rgba(107, 114, 128, 0.12); color: var(--text-secondary); }
.audit-action-login_failed { background: rgba(199, 84, 84, 0.15); color: #9c3a3a; }
.audit-action-approve { background: rgba(16, 185, 129, 0.12); color: #059669; }
.audit-action-reject { background: rgba(199, 138, 58, 0.12); color: #a8721e; }
.audit-action-import { background: rgba(95, 106, 204, 0.12); color: #404a9e; }
.audit-action-export { background: rgba(20, 184, 166, 0.12); color: #0d9488; }
.audit-action-bulk_delete { background: rgba(199, 84, 84, 0.12); color: #9c3a3a; }
.audit-action-bulk_update { background: rgba(74, 124, 145, 0.12); color: #3d6a7d; }
.audit-action-start { background: rgba(72, 166, 124, 0.12); color: #2f7a55; }
.audit-action-otp_verify { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }

/* 감사 로그 텍스트 셀 */
.audit-log-table .audit-tenant,
.audit-log-table .audit-user {
  font-size: 12px;
  color: var(--text-primary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-log-table .audit-description {
  font-size: 12px;
  color: var(--text-primary);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-log-table .audit-target {
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-log-table .audit-ip code {
  font-family: var(--font-mono, 'SF Mono', Monaco, monospace);
  font-size: 11px;
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--text-secondary);
}

/* 감사 로그 페이지네이션 */
.audit-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

/* 감사 로그 반응형 */
@media (max-width: 1200px) {
  .audit-log-table .audit-description {
    max-width: 150px;
  }
}

@media (max-width: 768px) {
  .audit-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .audit-filter-row .form-select {
    width: 100%;
  }

  .audit-log-table .table {
    min-width: 800px;
  }
}

/* ===== Info Box (정보 안내 박스) ===== */
.info-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(74, 124, 145, 0.08);
  border: 1px solid rgba(74, 124, 145, 0.2);
  border-radius: var(--border-radius);
  margin-bottom: 20px;
}

.info-box svg {
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 2px;
}

.info-box-content {
  flex: 1;
}

.info-box-content strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.info-box-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.info-box.warning {
  background: rgba(199, 138, 58, 0.08);
  border-color: rgba(199, 138, 58, 0.2);
}

.info-box.warning svg {
  color: var(--warning);
}

.info-box.success {
  background: rgba(72, 166, 124, 0.08);
  border-color: rgba(72, 166, 124, 0.2);
}

.info-box.success svg {
  color: var(--success);
}

.info-box.danger {
  background: rgba(199, 84, 84, 0.08);
  border-color: rgba(199, 84, 84, 0.2);
}

.info-box.danger svg {
  color: var(--danger);
}

/* ===== Existing User Alert (기존 사용자 알림) ===== */
.existing-user-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(199, 138, 58, 0.1);
  border: 1px solid rgba(199, 138, 58, 0.3);
  border-radius: var(--border-radius);
  margin-top: 12px;
}

.existing-user-alert svg {
  flex-shrink: 0;
  color: var(--warning);
  margin-top: 2px;
}

.existing-user-alert-content {
  flex: 1;
}

.existing-user-alert-content strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.existing-user-alert-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.existing-user-alert-content .btn {
  margin-top: 4px;
}

/* ===== Super Admin 테넌트 선택 (사이드바) ===== */
.sidebar-tenant-select {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.1);
}

.tenant-select-label {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.tenant-dropdown {
  width: 100%;
  font-size: 13px;
  padding: 8px 12px;
  padding-right: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.tenant-dropdown:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background-color: rgba(255, 255, 255, 0.15);
}

.tenant-dropdown:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 124, 145, 0.2);
}

.tenant-dropdown option {
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 8px;
}

/* 시스템 옵션 강조 */
.tenant-dropdown option[value="system"] {
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 현재 선택된 테넌트 표시 */
.sidebar-tenant-select .selected-tenant-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 6px;
}

.sidebar-tenant-select .selected-tenant-name::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

/* 테넌트 선택 시 애니메이션 */
@keyframes tenantSelectPulse {
  0% { box-shadow: 0 0 0 0 rgba(95, 106, 204, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(95, 106, 204, 0); }
  100% { box-shadow: 0 0 0 0 rgba(95, 106, 204, 0); }
}

.tenant-dropdown.changed {
  animation: tenantSelectPulse 0.5s ease;
}

/* ===== 카운트다운 타이머 ===== */
.countdown-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #4a7c91 0%, #33596a 100%);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin: 12px 16px;
  box-shadow: 0 2px 8px rgba(74, 124, 145, 0.3);
}

.countdown-timer .countdown-icon {
  font-size: 18px;
}

.countdown-timer .countdown-text {
  flex: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-timer.countdown-expired {
  background: linear-gradient(135deg, #48a67c 0%, #2f7a55 100%);
  box-shadow: 0 2px 8px rgba(72, 166, 124, 0.3);
}

/* 1시간 이내 긴급 스타일 */
.countdown-timer.countdown-urgent {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
  animation: pulseUrgent 2s ease-in-out infinite;
}

@keyframes pulseUrgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* ===== 캠페인 수정 모달 수신자 선택 ===== */
.recipient-info-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.recipient-info-box .recipient-count {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.recipient-info-box .recipient-count svg {
  color: var(--primary-color);
}

.recipient-selector-box {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.recipient-filter {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.recipient-filter .form-input,
.recipient-filter .form-select {
  flex: 1;
}

.recipient-list-container {
  max-height: 300px;
  overflow-y: auto;
}

.recipient-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-tertiary, #f8fafc);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1;
}

.recipient-list-header .selected-count {
  font-size: 13px;
  color: var(--primary-color);
  font-weight: 500;
}

.recipient-list {
  padding: 4px;
}

.recipient-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.recipient-item:hover {
  background: var(--bg-hover, #f1f5f9);
}

.recipient-item.selected {
  background: rgba(95, 106, 204, 0.08);
}

.recipient-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.recipient-item .recipient-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.recipient-item .recipient-name {
  font-weight: 500;
  color: var(--text-primary);
}

.recipient-item .recipient-email {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipient-item .recipient-dept {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.empty-state-small {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* 수신자 섹션 헤더 */
.recipient-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.recipient-section-header:first-child {
  margin-top: 0;
}

/* 4가지 상태별 섹션 헤더 */
.recipient-section-header.kept-header {
  background: rgba(72, 166, 124, 0.1);
  color: #2f7a55;
  border-left: 3px solid #48a67c;
}

.recipient-section-header.added-header {
  background: rgba(74, 124, 145, 0.1);
  color: #3d6a7d;
  border-left: 3px solid #4a7c91;
}

.recipient-section-header.removed-header {
  background: rgba(199, 84, 84, 0.1);
  color: #9c3a3a;
  border-left: 3px solid #c75454;
}

.recipient-section-header.available-header {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
  border-left: 3px solid var(--border-color);
}

.recipient-section-header .section-icon {
  font-size: 14px;
}

.recipient-section-divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 0;
}

/* 수신자 아이템 4가지 상태별 스타일 */
.recipient-item.recipient-kept {
  background: rgba(72, 166, 124, 0.05);
  border-left: 3px solid #48a67c;
  padding-left: 9px;
}

.recipient-item.recipient-kept .recipient-name {
  color: #2f7a55;
}

.recipient-item.recipient-added {
  background: rgba(74, 124, 145, 0.05);
  border-left: 3px solid #4a7c91;
  padding-left: 9px;
}

.recipient-item.recipient-added .recipient-name {
  color: #3d6a7d;
}

.recipient-item.recipient-removed {
  background: rgba(199, 84, 84, 0.05);
  border-left: 3px solid #c75454;
  padding-left: 9px;
  opacity: 0.7;
}

.recipient-item.recipient-removed .recipient-name,
.recipient-item.recipient-removed .recipient-email {
  text-decoration: line-through;
  color: #9c3a3a;
}

.recipient-item.recipient-available {
  background: transparent;
  border-left: 3px solid transparent;
  padding-left: 9px;
}

/* 상태 배지 */
.status-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  margin-left: auto;
  flex-shrink: 0;
}

.badge-added {
  background: rgba(74, 124, 145, 0.2);
  color: #3d6a7d;
}

.badge-removed {
  background: rgba(199, 84, 84, 0.2);
  color: #9c3a3a;
}

/* ===== Tab Content Animation (v3.7.0) ===== */
/* Note: .tabs 컨테이너와 .tab-btn 스타일은 styles.css에 정의됨 */

.tab-content {
  display: none;
  animation: tabFadeIn 0.2s ease;
}

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

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Note: 사이드바 .nav-item 스타일은 styles.css에서 정의됨 (어두운 테마) */

/* ===== Enhanced Nav Badge (v3.7.0) ===== */
.nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-badge.warning {
  background: var(--warning, #c78a3a);
}

.nav-badge.muted {
  background: var(--text-tertiary, #9ca3af);
}

.nav-badge.success {
  background: var(--success, #10b981);
}

/* ===== Section Header Enhancement (v3.7.0) ===== */
.sidebar .nav-section {
  padding: 0px 8px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Empty State Container (v3.9.0) ===== */
.empty-state-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  padding: 48px 24px;
}

.empty-state-content {
  text-align: center;
  max-width: 400px;
}

.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-secondary);
  margin-bottom: 24px;
}

.empty-state-icon svg {
  color: var(--text-muted);
}

.empty-state-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.empty-state-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ===== Field Item (입력 양식 필드 리스트) ===== */
/* 혼합형 페이지의 step-item 디자인과 동일한 공통 컴포넌트 */
.field-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: grab;
  transition: all 0.15s;
}

.field-item:hover {
  border-color: var(--primary);
}

.field-item.dragging {
  opacity: 0.5;
}

.field-item-handle {
  color: var(--text-muted);
  cursor: grab;
  display: flex;
  align-items: center;
}

.field-item-handle:active {
  cursor: grabbing;
}

.field-item-number {
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3d6a7d;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.field-item-type {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
}

.field-item-content {
  flex: 1;
  min-width: 0;
}

.field-item-title {
  font-weight: 500;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field-item-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field-item-actions {
  display: flex;
  gap: 2px;
}

.field-item-actions button {
  padding: 4px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.field-item-actions button:hover {
  background: #f1f5f9;
  color: var(--text-secondary);
}

.field-item-actions button.danger:hover {
  background: #fceaea;
  color: #9c3a3a;
}
