/**
 * 세미나/이벤트 CSS
 * AI Link Platform — Design System Aligned
 */

:root {
  --primary: #6C5CE7;
  --primary-dark: #5A4BD1;
  --primary-light: #A29BFE;
  --primary-bg: #F0EEFF;
  --success: #00B894;
  --success-bg: #E8FBF5;
  --warning: #FDCB6E;
  --warning-dark: #E67E22;
  --warning-bg: #FFF8E7;
  --danger: #FF6B6B;
  --danger-bg: #FFE8E8;
  --info: #74B9FF;
  --info-bg: #EBF5FF;
  --gray-50: #F4F5FA;
  --gray-100: #ECEDF4;
  --gray-200: #E0E2ED;
  --gray-300: #CDD0DE;
  --gray-400: #9CA0B3;
  --gray-500: #6B7085;
  --gray-600: #4E5268;
  --gray-700: #363A4F;
  --gray-800: #1A1D2E;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --shadow-xs: 0 1px 2px rgba(26,29,46,0.04);
  --shadow-sm: 0 2px 8px rgba(26,29,46,0.06);
  --shadow: 0 4px 16px rgba(26,29,46,0.08);
  --shadow-lg: 0 8px 32px rgba(26,29,46,0.10);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   Layout
   ============================================ */
.ev-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 60px;
  padding-top: 90px;
}

/* ============================================
   Hero
   ============================================ */
.ev-hero {
  background: linear-gradient(135deg, #E67E22 0%, #F39C12 40%, #FDCB6E 100%);
  border-radius: var(--radius-2xl);
  padding: 40px 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.ev-hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -15%;
  width: 460px; height: 460px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
  pointer-events: none;
}

.ev-hero-content { position: relative; z-index: 1; }

.ev-hero-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
  margin: 0 0 8px;
}

.ev-hero-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  margin: 0;
}

.ev-hero-write-btn {
  margin-top: 16px;
  padding: 10px 24px;
  background: white;
  color: var(--warning-dark);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ev-hero-write-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.ev-hero-stats {
  display: flex;
  gap: 36px;
  position: relative;
  z-index: 1;
}

.ev-hero-stat { text-align: center; position: relative; }

.ev-hero-stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -18px; top: 15%;
  height: 70%; width: 1px;
  background: rgba(255,255,255,0.2);
}

.ev-hero-stat-num {
  display: block;
  font-size: 1.65rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.ev-hero-stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
  display: block;
  font-weight: 500;
}

/* ============================================
   Toolbar
   ============================================ */
.ev-toolbar {
  background: white;
  border-radius: var(--radius-xl);
  padding: 16px 24px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ev-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ev-view-toggle {
  display: flex;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.ev-view-btn {
  padding: 8px 12px;
  background: white;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  transition: var(--transition);
  font-size: 0.85rem;
}

.ev-view-btn:not(:last-child) { border-right: 1px solid var(--gray-200); }
.ev-view-btn.active { background: var(--primary); color: white; }
.ev-view-btn:hover:not(.active) { background: var(--gray-50); color: var(--gray-600); }

.ev-tabs { display: flex; gap: 6px; }

.ev-tab {
  padding: 7px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  background: white;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.ev-tab:hover { border-color: var(--primary-light); color: var(--primary); background: var(--primary-bg); }
.ev-tab.active { background: var(--primary); border-color: var(--primary); color: white; }

.ev-search { position: relative; }
.ev-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 0.8rem; }
.ev-search input {
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 0.82rem;
  width: 220px;
  outline: none;
  transition: var(--transition);
  background: var(--gray-50);
  font-family: inherit;
  color: var(--gray-800);
}
.ev-search input::placeholder { color: var(--gray-400); }
.ev-search input:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(108,92,231,0.1); }

/* Type chips */
.ev-type-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ev-chip {
  padding: 5px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  background: white;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.ev-chip:hover { border-color: var(--primary-light); background: var(--primary-bg); color: var(--primary); }
.ev-chip.active { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); font-weight: 600; }

/* ============================================
   List View
   ============================================ */
.ev-list { display: flex; flex-direction: column; gap: 12px; }

.ev-loading { text-align: center; padding: 40px; color: var(--gray-400); font-size: 0.88rem; }

.ev-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 0;
  display: flex;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
  animation: evCardIn 0.3s ease-out both;
}

@keyframes evCardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ev-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.ev-card.ended { opacity: 0.6; }
.ev-card.ended:hover { opacity: 0.8; }

/* 날짜 블록 */
.ev-card-date {
  flex-shrink: 0;
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  border-right: 1px solid var(--gray-100);
}

.ev-card-date-month {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ev-card-date-day {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-800);
  line-height: 1.1;
}

.ev-card-date-weekday {
  font-size: 0.68rem;
  color: var(--gray-400);
  font-weight: 500;
}

/* 내용 */
.ev-card-body {
  flex: 1;
  padding: 18px 20px;
  min-width: 0;
}

.ev-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.ev-card-type {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.ev-card-type.seminar { background: var(--primary-bg); color: var(--primary); }
.ev-card-type.webinar { background: var(--info-bg); color: #2E86DE; }
.ev-card-type.education { background: var(--success-bg); color: var(--success); }
.ev-card-type.promotion { background: var(--warning-bg); color: var(--warning-dark); }
.ev-card-type.survey { background: #F3E8FF; color: #8B5CF6; }
.ev-card-type.meetup { background: #FFE8F0; color: #E91E8B; }

.ev-card-status {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
}

.ev-card-status.upcoming { background: var(--info-bg); color: #2E86DE; }
.ev-card-status.ongoing { background: var(--success-bg); color: var(--success); }
.ev-card-status.ended { background: var(--gray-100); color: var(--gray-400); }

.ev-card-dday {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--danger);
}

.ev-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ev-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.75rem;
  color: var(--gray-400);
  flex-wrap: wrap;
}

.ev-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ev-card-meta .free { color: var(--success); font-weight: 700; }

/* 이미지 (선택) */
.ev-card-image {
  flex-shrink: 0;
  width: 160px;
  background-size: cover;
  background-position: center;
  border-left: 1px solid var(--gray-100);
}

/* ============================================
   Calendar View
   ============================================ */
.ev-calendar {
  background: white;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--gray-200);
}

.ev-cal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.ev-cal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
  min-width: 160px;
  text-align: center;
}

.ev-cal-nav {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  cursor: pointer;
  color: var(--gray-500);
  transition: var(--transition);
  font-size: 0.85rem;
}

.ev-cal-nav:hover { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-light); }

.ev-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  overflow: hidden;
}

/* ── 요일 헤더 강화 (Step6) ── */
.ev-cal-dow {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-500);
  padding: 10px 0;
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  border-radius: var(--radius) var(--radius) 0 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ev-cal-dow:first-child { color: #E74C3C; }
.ev-cal-dow:last-child { color: #2E86DE; }

/* ── 캘린더 셀 고정 높이 (Step1) ── */
.ev-cal-day {
  height: 100px;
  min-height: 100px;
  max-height: 100px;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 6px;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ev-cal-day:hover { border-color: var(--primary-light); background: #FAFAFE; }

.ev-cal-day.other-month { opacity: 0.3; }
.ev-cal-day.today { border-color: var(--primary); background: var(--primary-bg); }

.ev-cal-day-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 2px;
  flex-shrink: 0;
  line-height: 1.2;
}
.ev-cal-day.today .ev-cal-day-num {
  background: var(--primary);
  color: white;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
}

/* 이벤트 컨테이너 */
.ev-cal-day-events {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ev-cal-event {
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  flex-shrink: 0;
  max-width: 100%;
  line-height: 1.5;
}

.ev-cal-event:hover { filter: brightness(0.9); }
.ev-cal-event.seminar { background: var(--primary-bg); color: var(--primary); }
.ev-cal-event.webinar { background: var(--info-bg); color: #2E86DE; }
.ev-cal-event.education { background: var(--success-bg); color: var(--success); }
.ev-cal-event.promotion { background: var(--warning-bg); color: var(--warning-dark); }
.ev-cal-event.survey { background: #F3E8FF; color: #8B5CF6; }
.ev-cal-event.meetup { background: #FFE8F0; color: #E91E8B; }

.ev-cal-day-more {
  font-size: 0.58rem;
  color: var(--primary);
  padding-left: 4px;
  flex-shrink: 0;
  line-height: 1.4;
  font-weight: 700;
  cursor: pointer;
}
.ev-cal-day-more:hover { text-decoration: underline; }

/* ── 캘린더 호버 팝오버 (Step1) ── */
.ev-cal-popover {
  position: fixed;
  z-index: 999;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  min-width: 260px;
  max-width: 320px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.ev-cal-popover.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.ev-cal-popover-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ev-cal-popover-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--gray-500);
}
.ev-cal-popover-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ev-cal-popover-meta i {
  width: 14px;
  text-align: center;
  color: var(--primary);
  font-size: 0.7rem;
}
.ev-cal-popover-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  margin-top: 8px;
}

/* ── 이번 주 하이라이트 배너 (Step2) ── */
.ev-week-banner {
  background: linear-gradient(135deg, #F0EEFF 0%, #EBF5FF 100%);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.ev-week-banner-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.ev-week-banner-content { flex: 1; min-width: 0; }
.ev-week-banner-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 4px;
}
.ev-week-banner-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ev-week-banner-item {
  font-size: 0.78rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.15s;
}
.ev-week-banner-item:hover { color: var(--primary); }
.ev-week-banner-item .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ev-week-banner-empty {
  font-size: 0.78rem;
  color: var(--gray-400);
}

/* ── 빠른 공유 버튼 (Step3) ── */
.ev-card-share-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.ev-share-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  background: white;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 0.7rem;
  transition: var(--transition);
}
.ev-share-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--primary-bg);
  transform: scale(1.1);
}
.ev-share-btn.kakao:hover {
  border-color: #FEE500;
  color: #3C1E1E;
  background: #FEE500;
}

/* ── 컴팩트 테이블 뷰 (Step4) ── */
.ev-compact-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}
.ev-compact-table thead th {
  background: var(--gray-50);
  color: var(--gray-500);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
  position: sticky;
  top: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.ev-compact-table tbody tr {
  cursor: pointer;
  transition: var(--transition);
}
.ev-compact-table tbody tr:hover {
  background: var(--primary-bg);
}
.ev-compact-table tbody tr.ended { opacity: 0.5; }
.ev-compact-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}
.ev-compact-title-cell {
  font-weight: 600;
  color: var(--gray-800);
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-compact-type {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
  display: inline-block;
}
.ev-compact-status {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
  display: inline-block;
}
.ev-compact-attendees {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}
.ev-compact-share {
  display: flex; gap: 4px;
}
.ev-compact-share .ev-share-btn {
  width: 24px; height: 24px;
  font-size: 0.62rem;
}

/* ── 추천 배지 (Step5) ── */
.ev-recommend-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
  white-space: nowrap;
  animation: evRecommendPulse 2s ease-in-out infinite;
}
@keyframes evRecommendPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,165,0,0.3); }
  50% { box-shadow: 0 0 0 4px rgba(255,165,0,0); }
}

/* ============================================
   Empty / Load More
   ============================================ */
.ev-empty { text-align: center; padding: 60px 20px; }
.ev-empty-icon { font-size: 3rem; margin-bottom: 16px; }
.ev-empty h3 { font-size: 1rem; color: var(--gray-700); margin: 0 0 8px; font-weight: 700; }
.ev-empty p { font-size: 0.85rem; color: var(--gray-400); margin: 0 0 16px; }

.ev-empty-btn {
  padding: 12px 28px;
  background: var(--warning-dark);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.ev-empty-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }

.ev-load-more { text-align: center; margin-top: 20px; }

.ev-load-more-btn {
  padding: 12px 40px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: white;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.ev-load-more-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ============================================
   Modal
   ============================================ */
.ev-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.ev-modal-overlay.active { display: flex; }

.ev-modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(26,29,46,0.5);
  backdrop-filter: blur(4px);
}

.ev-modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius-2xl);
  max-width: 620px;
  width: 90%;
  max-height: 85vh;
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: evModalIn 0.3s ease;
}

.ev-modal-wide { max-width: 800px; }

@keyframes evModalIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.ev-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
}

.ev-modal-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--gray-800); }

.ev-modal-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  cursor: pointer;
  color: var(--gray-500);
  transition: var(--transition);
  font-size: 0.85rem;
}

.ev-modal-close:hover { background: var(--gray-100); color: var(--gray-800); }

.ev-modal-body {
  padding: 20px 24px;
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
  box-sizing: border-box;
  max-width: 100%;
}
/* 모달 내부 모든 이미지 크기 제한 */
.ev-modal-body img,
.ev-modal-content img {
  max-width: 100% !important;
  height: auto !important;
  box-sizing: border-box;
}

.ev-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--gray-100);
}

.ev-modal-btn {
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ev-modal-btn.primary { background: var(--primary); color: white; }
.ev-modal-btn.primary:hover { background: var(--primary-dark); }
.ev-modal-btn.secondary { background: var(--gray-100); color: var(--gray-600); }
.ev-modal-btn.secondary:hover { background: var(--gray-200); }

/* Form Fields */
.ev-field { margin-bottom: 16px; }
.ev-field-row { display: flex; gap: 16px; }

.ev-field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.ev-required { color: var(--danger); }

.ev-field input,
.ev-field textarea,
.ev-field-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--gray-800);
  transition: var(--transition);
  line-height: 1.6;
}

.ev-field input:focus,
.ev-field textarea:focus,
.ev-field-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.ev-field textarea { min-height: 120px; resize: vertical; }

/* Date + Time Group */
.ev-datetime-group {
  display: flex;
  gap: 8px;
}
.ev-date-input {
  flex: 1.2;
}
.ev-time-input {
  flex: 0.8;
}

.ev-field-select {
  appearance: none;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239CA0B3' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
  cursor: pointer;
}

/* Detail */
.ev-detail-banner {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.ev-detail-type {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.ev-detail-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0 0 16px;
  line-height: 1.5;
}

.ev-detail-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.ev-detail-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--gray-600);
  overflow-wrap: anywhere;
  min-width: 0;
}

.ev-detail-info-item i {
  width: 20px;
  text-align: center;
  color: var(--primary);
}

/* Detail Actions (수정/삭제) */
.ev-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-100);
}
.ev-detail-action-btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--gray-200);
  background: white;
  color: var(--gray-600);
}
.ev-detail-action-btn:hover { background: var(--gray-50); }
.ev-detail-action-btn.edit { color: var(--primary); border-color: var(--primary-light); }
.ev-detail-action-btn.edit:hover { background: var(--primary-bg); }
.ev-detail-action-btn.delete { color: #E74C3C; border-color: #FFCDD2; }
.ev-detail-action-btn.delete:hover { background: #FFF5F5; }

/* Rich Editor */
.ev-editor-wrap {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.ev-editor-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}
.ev-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  flex-wrap: wrap;
}
.ev-tb-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--gray-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  transition: var(--transition);
}
.ev-tb-btn:hover { background: var(--gray-200); color: var(--gray-800); }
.ev-tb-divider {
  width: 1px;
  height: 20px;
  background: var(--gray-200);
  margin: 0 4px;
}
.ev-editor-body {
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--gray-800);
  outline: none;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.ev-editor-body:empty::before {
  content: attr(placeholder);
  color: var(--gray-300);
  pointer-events: none;
}
.ev-editor-body img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px;
  margin: 8px 0;
  display: block;
}
.ev-editor-body h3 {
  font-size: 1.05rem;
  margin: 12px 0 6px;
  color: var(--gray-800);
}

/* Detail Desc (rich HTML) */
.ev-detail-desc {
  line-height: 1.8;
  font-size: 0.88rem;
  color: var(--gray-700);
  margin: 20px 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: hidden;
  max-width: 100%;
}
.ev-detail-desc img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
  display: block;
}
/* 설명 내 table, pre, iframe 등 넓은 요소도 제한 */
.ev-detail-desc table,
.ev-detail-desc pre,
.ev-detail-desc iframe,
.ev-detail-desc video {
  max-width: 100% !important;
  overflow-x: auto;
}
.ev-detail-desc h3 {
  font-size: 1.05rem;
  margin: 16px 0 8px;
  color: var(--gray-800);
}
.ev-detail-desc a {
  color: var(--primary);
  text-decoration: underline;
}
.ev-detail-desc ul, .ev-detail-desc ol {
  margin: 8px 0;
  padding-left: 24px;
}

/* Detail CTA */
.ev-detail-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-lg);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  margin-top: 10px;
}
.ev-detail-cta:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); }

/* Comments */
.ev-detail-comments {
  padding: 20px 24px;
  border-top: 1px solid var(--gray-100);
}
.ev-comments-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-700);
  margin: 0 0 16px;
}
.ev-comments-title span {
  color: var(--primary);
  font-size: 0.85rem;
}
.ev-comments-empty {
  text-align: center;
  padding: 20px;
  color: var(--gray-400);
  font-size: 0.82rem;
}
.ev-comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.ev-comment-item {
  display: flex;
  gap: 10px;
}
.ev-comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}
.ev-comment-body { flex: 1; }
.ev-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ev-comment-author {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-700);
}
.ev-comment-time {
  font-size: 0.72rem;
  color: var(--gray-400);
}
.ev-comment-del {
  background: none;
  border: none;
  color: var(--gray-300);
  cursor: pointer;
  font-size: 0.72rem;
  padding: 2px;
  margin-left: auto;
}
.ev-comment-del:hover { color: #E74C3C; }
.ev-comment-text {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ev-comment-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.ev-comment-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
  resize: none;
  line-height: 1.5;
  transition: var(--transition);
}
.ev-comment-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}
.ev-comment-submit {
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.ev-comment-submit:hover { background: var(--primary-dark); }
.ev-comment-login {
  text-align: center;
  font-size: 0.82rem;
  color: var(--gray-400);
  padding: 8px;
}
.ev-comment-login a {
  color: var(--primary);
  text-decoration: underline;
}

/* ═══ Card Bottom (Attendee Count) ═══ */
.ev-card-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--gray-100);
}
.ev-card-attendees {
  font-size: 0.78rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 4px;
}
.ev-card-attendees.has-attendees {
  color: var(--primary);
  font-weight: 600;
}
.ev-card-attendees small {
  color: var(--gray-400);
  font-weight: 400;
}
.ev-card-rsvp-badge {
  font-size: 0.68rem;
  background: var(--primary-bg);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-left: auto;
}

/* ═══ Registration Type Radio ═══ */
.ev-reg-type-row {
  display: flex;
  gap: 16px;
}
.ev-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--gray-600);
  cursor: pointer;
}
.ev-radio-label input[type="radio"] {
  accent-color: var(--primary);
}

/* ═══ RSVP Section (Detail Modal) ═══ */
.ev-rsvp-section {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 20px 0;
  border: 1px solid var(--gray-100);
}
.ev-rsvp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.ev-rsvp-count {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ev-rsvp-count i {
  color: var(--primary);
}
.ev-rsvp-count span {
  color: var(--primary);
  font-size: 1.1rem;
}
.ev-rsvp-capacity {
  font-weight: 400;
  color: var(--gray-400);
  font-size: 0.82rem;
}
.ev-rsvp-actions {
  display: flex;
  gap: 8px;
}
.ev-rsvp-btn {
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--primary);
  background: white;
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s;
}
.ev-rsvp-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.ev-rsvp-btn.active {
  background: var(--primary);
  color: white;
}
.ev-rsvp-btn.active:hover {
  background: #C0392B;
  border-color: #C0392B;
}
.ev-cal-download-btn {
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  background: white;
  color: var(--gray-600);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.ev-cal-download-btn:hover {
  background: var(--gray-50);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* Progress Bar */
.ev-rsvp-progress {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}
.ev-rsvp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Attendee Avatars */
.ev-rsvp-attendees {
  min-height: 20px;
}
.ev-rsvp-empty {
  text-align: center;
  font-size: 0.82rem;
  color: var(--gray-400);
  padding: 10px;
}
.ev-rsvp-avatar-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 6px;
}
.ev-rsvp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid white;
  margin-left: -8px;
  cursor: default;
  position: relative;
  transition: var(--transition);
}
.ev-rsvp-avatar:first-child {
  margin-left: 0;
}
.ev-rsvp-avatar:hover {
  z-index: 2;
  transform: translateY(-2px);
}
.ev-rsvp-avatar.me {
  background: linear-gradient(135deg, #F39C12, #E67E22);
  box-shadow: 0 0 0 2px #F39C12;
}
.ev-rsvp-avatar.more {
  background: var(--gray-200);
  color: var(--gray-500);
  font-size: 0.68rem;
}
.ev-rsvp-names {
  font-size: 0.78rem;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ═══ Reminder Section ═══ */
.ev-reminder-section {
  background: linear-gradient(135deg, #FFF9E6 0%, #FFF3CD 100%);
  border: 1px solid #FFE69C;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 20px 0;
}
.ev-reminder-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gray-700);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ev-reminder-title i {
  color: #F59E0B;
}
.ev-reminder-status-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ev-reminder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
}
.ev-reminder-item.sent {
  background: #F0FDF4;
  border-color: #BBF7D0;
}
.ev-reminder-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-500);
}
.ev-reminder-badge.sent {
  color: #16A34A;
}
.ev-reminder-badge.pending i {
  color: #F59E0B;
}
.ev-reminder-sent-at {
  font-size: 0.78rem;
  color: #16A34A;
  font-weight: 500;
}
.ev-reminder-send-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--primary);
  background: white;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
}
.ev-reminder-send-btn:hover {
  background: var(--primary);
  color: white;
}
.ev-reminder-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.ev-reminder-note {
  margin: 12px 0 0;
  font-size: 0.75rem;
  color: var(--gray-400);
  line-height: 1.4;
}

/* ═══ Responsive ═══ */
@media (max-width: 640px) {
  .ev-rsvp-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .ev-rsvp-actions {
    width: 100%;
  }
  .ev-rsvp-btn, .ev-cal-download-btn {
    flex: 1;
    justify-content: center;
  }
  .ev-reg-type-row {
    flex-direction: column;
    gap: 8px;
  }
  .ev-reminder-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .ev-reminder-send-btn {
    width: 100%;
    justify-content: center;
  }
  .ev-week-banner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .ev-card-share-row { display: none; }
  .ev-compact-table { font-size: 0.75rem; }
  .ev-compact-table thead th,
  .ev-compact-table tbody td { padding: 8px 6px; }
  .ev-compact-title-cell { max-width: 150px; }
}

/* Toast */
.ev-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--gray-800);
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.ev-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .ev-container { padding: 16px 12px 40px; padding-top: 80px; }
  .ev-hero { flex-direction: column; text-align: center; padding: 28px 20px; gap: 20px; }
  .ev-hero-title { font-size: 1.3rem; }
  .ev-toolbar { flex-direction: column; align-items: stretch; }
  .ev-toolbar-left { flex-direction: column; gap: 8px; }
  .ev-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .ev-search input { width: 100%; }
  .ev-type-chips { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .ev-card { flex-direction: column; }
  .ev-card-date { width: auto; flex-direction: row; gap: 8px; padding: 12px 16px; border-right: none; border-bottom: 1px solid var(--gray-100); }
  .ev-card-image { width: auto; height: 140px; border-left: none; border-top: 1px solid var(--gray-100); }
  .ev-field-row { flex-direction: column; gap: 0; }
  .ev-modal-content { width: 95%; max-height: 90vh; }
  .ev-cal-day { height: 70px; min-height: 70px; max-height: 70px; }
  .ev-compact-table { display: block; overflow-x: auto; }
}