/* ══════════════════════════════════════════════
   식물아카데미 리스트 — dg-info 디자인 시스템
   ══════════════════════════════════════════════ */

.dg-info-page {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

/* ── 카드 공통 ── */
.dg-info-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  overflow: hidden;
  min-width: 0;
  margin-bottom: 1.5rem;
}

/* ── 카드 헤드 (세이지 그린 파스텔) ── */
.dg-info-card__head {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .5rem 1.25rem;
  background: var(--dg-primary-gradient);
  border-radius: 16px 16px 0 0;
}
.dg-info-card__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(45,74,30,.10);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  color: #2d4a1e; font-size: 1.05rem; flex-shrink: 0;
}
.dg-info-card__title {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.05rem; font-weight: 700;
  color: #2d4a1e; margin: 0;
}
.dg-info-card__badge {
  margin-left: auto;
  font-size: .75rem;
  color: rgba(45,74,30,.6);
  white-space: nowrap;
}

/* ── 카드 바디 ── */
.dg-info-card__body {
  padding: 1.25rem 1.5rem;
  min-width: 0;
  overflow: hidden;
}

/* ── 카드 토글 ── */
.dg-card-toggle {
  margin-left: auto;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: none;
  background: rgba(45,74,30,.08);
  color: #2d4a1e;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  cursor: pointer;
  transition: transform .25s ease, background .15s ease;
  flex-shrink: 0;
}
.dg-card-toggle:hover { background: rgba(45,74,30,.15); }
.is-collapsed .dg-card-toggle { transform: rotate(180deg); }
.is-collapsed .dg-info-card__body { display: none; }

/* ── 탭 네비게이션 ── */
.dg-tab-nav {
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  margin-bottom: 1.5rem;
}
.dg-tab-nav__item {
  flex: 1;
  text-align: center;
  padding: .7rem 1rem;
  font-size: .95rem;
  font-weight: 700;
  color: #555;
  background: #fff;
  text-decoration: none;
  border-right: 1px solid #e0e0e0;
  transition: background .15s, color .15s;
}
.dg-tab-nav__item:last-child { border-right: none; }
.dg-tab-nav__item.is-active {
  background: linear-gradient(135deg, #8ca078, #3d5a2e);
  color: #fff; font-weight: 800;
}
.dg-tab-nav__item:hover { background: rgba(61,90,46,.1); color: #2d4a1e; }
.dg-tab-nav__item.is-active:hover { background: linear-gradient(135deg, #8ca078, #3d5a2e); color: #fff; }

/* ── 툴바 ── */
.dg-board-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.dg-btn-write {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  background: var(--dg-primary, #19b36a);
  color: #fff;
  border: none; border-radius: 8px;
  font-size: .85rem; font-weight: 600;
  text-decoration: none;
  transition: background .2s;
  white-space: nowrap;
  margin-left: auto;
}
.dg-btn-write:hover { background: var(--dg-primary-dark, #0a5c38); color: #fff; }

/* ── 안내사항 배너 ── */
.acad-warn-card {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.acad-warn-card__title {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 700;
  color: #c62828;
  margin-bottom: .5rem;
}
.acad-warn-list {
  list-style: none; padding: 0; margin: 0;
}
.acad-warn-list li {
  position: relative;
  padding: 3px 0 3px 14px;
  font-size: .84rem; font-weight: 500;
  line-height: 1.7; color: #c62828;
}
.acad-warn-list li::before {
  content: '※';
  position: absolute;
  left: 0; top: 3px;
  color: #e53935; font-size: .78rem;
}

/* ══════════════════════════════════════════════
   강좌 테이블
   ══════════════════════════════════════════════ */
.acad-table-wrap {
  width: 0;
  min-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}
.acad-table-wrap::-webkit-scrollbar { height: 4px; }
.acad-table-wrap::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.acad-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: .88rem;
}
.acad-table thead th {
  background: rgba(140,176,120,.18);
  color: #2d4a1e;
  font-weight: 700;
  font-size: .82rem;
  padding: 12px 16px;
  text-align: center;
  border: 1px solid rgba(0,0,0,.08);
  white-space: nowrap;
}
.acad-table tbody td {
  padding: 14px 16px;
  border: 1px solid rgba(0,0,0,.06);
  vertical-align: middle;
  color: #333;
  line-height: 1.7;
}
.acad-table tbody tr:hover {
  background: rgba(140,176,120,.04);
}

/* 상태 셀 */
.acad-table .td-status {
  text-align: center;
  white-space: nowrap;
  width: 120px;
}

/* 강좌정보 셀 */
.acad-table .td-info {
  min-width: 280px;
}
.acad-table .td-info .info-title {
  font-size: .92rem;
  font-weight: 700;
  color: #2d4a1e;
  margin-bottom: .35rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.acad-table .td-info .info-title a {
  color: #2d4a1e;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.acad-table .td-info .info-title a:hover {
  color: #8ca078;
}
.acad-table .td-info .info-detail {
  font-size: .82rem;
  color: #666;
  line-height: 1.8;
}
.acad-table .td-info .info-detail strong {
  color: #333;
  font-weight: 600;
}

/* 기간 셀 */
.acad-table .td-period {
  text-align: center;
  white-space: nowrap;
  font-size: .84rem;
  line-height: 1.8;
  min-width: 180px;
}

/* 노출여부 셀 */
.acad-table .td-action {
  text-align: center;
  white-space: nowrap;
  width: 140px;
}

/* ── 상태 배지 ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  border: none;
  text-decoration: none;
  line-height: 1.3;
}
.status-badge i { font-size: .65rem; }
.status-badge.is-open {
  background: #e8f5e9; color: #2e7d32;
}
.status-badge.is-open.clickable {
  cursor: pointer;
  transition: background .2s;
}
.status-badge.is-open.clickable:hover {
  background: #c8e6c9;
}
.status-badge.is-progress {
  background: rgba(140,176,120,.12); color: #3d5a2e;
}
.status-badge.is-ended {
  background: #f5f5f5; color: #999;
}
.status-badge.is-wait {
  background: #fff3e0; color: #e65100;
}
.status-badge.is-wait.clickable {
  cursor: pointer;
}
.status-badge.is-closed {
  background: #f5f5f5; color: #999;
}
.status-badge.is-preparing {
  background: #fffde7; color: #f57f17;
}
.status-badge.is-admin {
  background: #e3f2fd; color: #1565c0;
  cursor: pointer;
}

/* ── 노출/삭제 버튼 ── */
.acad-action-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.acad-chk-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  color: #666;
  cursor: pointer;
}
.acad-chk-label input[type="checkbox"] {
  accent-color: #8ca078;
}
.acad-btn-del {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  font-size: .75rem;
  font-weight: 600;
  color: #c62828;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 5px;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
}
.acad-btn-del:hover {
  background: #fee2e2;
  color: #b71c1c;
}

/* ── 빈 목록 ── */
.acad-empty {
  text-align: center;
  padding: 50px 20px;
  color: #94a3b8;
  font-size: .92rem;
}
.acad-empty i {
  display: block;
  font-size: 36px;
  color: rgba(140,176,120,.25);
  margin-bottom: 12px;
}

/* ── 커리큘럼 (하단) ── */
.acad-curriculum {
  margin-top: 1.5rem;
}

/* ── 하단 버튼 ── */
.dg-pagination-btns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}


/* ══════════════════════════════════════════════
   모바일 대응
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .dg-info-card__head { gap: .6rem; padding: .7rem .9rem; }
  .dg-info-card__icon { width: 32px; height: 32px; font-size: .9rem; border-radius: 8px; }
  .dg-info-card__title { font-size: .92rem; white-space: normal; word-break: keep-all; }
  .dg-card-toggle { width: 26px; height: 26px; font-size: .65rem; border-radius: 6px; }
  .dg-info-card__body { padding: 1rem .85rem; }
  .dg-tab-nav__item { padding: .55rem .5rem; font-size: .85rem; }

  .acad-table { min-width: 600px; font-size: .82rem; }
  .acad-table thead th { padding: 10px 8px; }
  .acad-table tbody td { padding: 10px 8px; }
}


/* ══════════════════════════════════════════════
   식물아카데미 글쓰기/수정 — dg-info 디자인 시스템
   ══════════════════════════════════════════════ */

/* ── 폼 래퍼 ── */
.dg-write-page {
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  letter-spacing: -0.02em;
  color: var(--dg-text, #1e293b);
}
.dg-write-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

/* ── 카드 헤드 (세이지 그린 파스텔) ── */
.dg-write-card__head {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .5rem 1.25rem;
  background: var(--dg-primary-gradient);
  border-radius: 16px 16px 0 0;
}
.dg-write-card__head .head-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: rgba(45,74,30,.10);
  border-radius: 10px;
  font-size: 1.05rem;
  flex-shrink: 0;
  color: #2d4a1e;
}
.dg-write-card__head .head-label {
  display: inline-block;
  font-size: .62rem;
  font-weight: 600;
  color: #2d4a1e;
  background: rgba(45,74,30,.12);
  padding: .12rem .5rem;
  border-radius: 4px;
  margin-bottom: .15rem;
  letter-spacing: 0.02em;
}
.dg-write-card__head .head-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #2d4a1e;
  margin: 0;
}

/* ── 카드 바디 ── */
.dg-write-card__body {
  padding: 28px;
}

/* ══════════════════════════════════════════════
   이전 강좌 복사 패널
   ══════════════════════════════════════════════ */
.dg-prev-panel {
  background: #f8faf5;
  border: 1px solid rgba(140,176,120,.25);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.dg-prev-panel__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 700;
  color: #3d5a2e;
  margin-bottom: .75rem;
}
.dg-prev-panel__title i {
  color: #8ca078;
}
.dg-prev-panel__desc {
  font-size: .78rem;
  color: #888;
  margin-bottom: .75rem;
}
.dg-prev-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dg-prev-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: .75rem 1rem;
  background: #fff;
  border: 1px solid rgba(140,176,120,.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
}
.dg-prev-item:hover {
  border-color: #8ca078;
  background: rgba(140,176,120,.06);
  box-shadow: 0 2px 8px rgba(140,176,120,.15);
}
.dg-prev-item.is-selected {
  border-color: #3d5a2e;
  background: rgba(140,176,120,.1);
}
.dg-prev-item__icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(140,176,120,.15);
  display: flex; align-items: center; justify-content: center;
  color: #3d5a2e; font-size: .8rem; flex-shrink: 0;
}
.dg-prev-item__info {
  flex: 1; min-width: 0;
}
.dg-prev-item__name {
  font-size: .88rem;
  font-weight: 700;
  color: #2d4a1e;
  margin-bottom: 2px;
}
.dg-prev-item__meta {
  font-size: .75rem;
  color: #888;
  line-height: 1.5;
}
.dg-prev-item__btn {
  padding: 5px 12px;
  font-size: .75rem;
  font-weight: 600;
  color: #3d5a2e;
  background: rgba(140,176,120,.15);
  border: 1px solid rgba(140,176,120,.3);
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  pointer-events: none;
}
.dg-prev-item:hover .dg-prev-item__btn {
  background: #3d5a2e;
  color: #fff;
  border-color: #3d5a2e;
}

/* ── 섹션 구분 ── */
.dg-form-section {
  margin-bottom: 28px;
}
.dg-form-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--dg-text, #1e293b);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(140,176,120,.3);
}
.dg-form-section__title i {
  width: 26px; height: 26px;
  background: rgba(140,176,120,.15);
  color: #3d5a2e;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  flex-shrink: 0;
}

/* ── 폼 행 ── */
.dg-form-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.dg-form-row:last-child {
  margin-bottom: 0;
}
.dg-form-label {
  flex-shrink: 0;
  width: 100px;
  padding-top: 8px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--dg-text-sub, #64748b);
  text-align: right;
}
.dg-form-label.required::after {
  content: '*';
  color: #e53935;
  margin-left: 2px;
}
.dg-form-field {
  flex: 1;
  min-width: 0;
}

/* ── 인풋 공통 ── */
.dg-form-field .form-control,
.dg-form-field .form-select {
  font-family: 'Pretendard', sans-serif;
  font-size: .88rem;
  border: 1px solid rgba(2,6,23,.12);
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--dg-text, #1e293b);
  transition: border-color .2s, box-shadow .2s;
}
.dg-form-field .form-control:focus,
.dg-form-field .form-select:focus {
  border-color: #8ca078;
  box-shadow: 0 0 0 3px rgba(140,176,120,.15);
  outline: none;
}
.dg-form-field .form-control::placeholder {
  color: var(--dg-text-muted, #94a3b8);
}

/* ── 인라인 날짜 그룹 ── */
.dg-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dg-date-range .sep {
  color: var(--dg-text-muted, #94a3b8);
  font-weight: 600;
  font-size: .88rem;
}
.dg-date-range .form-control {
  flex: 1;
  min-width: 0;
}

/* ── 인라인 2열 ── */
.dg-form-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.dg-form-cols .col-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--dg-text-muted, #94a3b8);
  margin-bottom: 5px;
}

/* ── 체크박스 / 라디오 그룹 ── */
.dg-check-group {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 6px;
}
.dg-check-group label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .84rem;
  font-weight: 500;
  color: var(--dg-text, #1e293b);
  cursor: pointer;
}
.dg-check-group input[type="checkbox"],
.dg-check-group input[type="radio"] {
  accent-color: #8ca078;
  width: 16px; height: 16px;
}

/* ── 안내 텍스트 ── */
.dg-form-hint {
  font-size: .78rem;
  color: var(--dg-text-muted, #94a3b8);
  margin-top: 5px;
  line-height: 1.5;
}
.dg-form-hint i {
  margin-right: 3px;
  color: #8ca078;
}

/* ── 에디터 영역 ── */
.dg-editor-wrap {
  border: 1px solid rgba(2,6,23,.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.dg-editor-wrap iframe {
  display: block;
  width: 100%;
  border: none;
}

/* ── 하단 버튼 ── */
.dg-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid rgba(2,6,23,.06);
  margin-top: 28px;
}
.dg-form-actions .btn-cancel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 20px;
  background: #fff;
  color: var(--dg-text-sub, #64748b);
  border: 1px solid rgba(2,6,23,.12);
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.dg-form-actions .btn-cancel:hover {
  background: #f8fafc;
  border-color: rgba(2,6,23,.2);
}
.dg-form-actions .btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 24px;
  background: #3d5a2e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.dg-form-actions .btn-submit:hover {
  background: #2d4a1e;
  box-shadow: 0 2px 8px rgba(61,90,46,.25);
}

/* ── 이동 옵션 ── */
.dg-after-action {
  background: #f8fafc;
  border: 1px solid rgba(2,6,23,.06);
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 14px;
}
.dg-after-action .after-title {
  font-size: .78rem;
  font-weight: 600;
  color: var(--dg-text-muted, #94a3b8);
  margin-bottom: 8px;
}

.dg-prev-reset {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: .75rem;
  font-weight: 600;
  color: #c62828;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
}
.dg-prev-reset:hover {
  background: #fee2e2;
  color: #b71c1c;
}

/* ── 글쓰기 폼 필드 크기 조절 (PC) ── */
@media (min-width: 768px) {
  .dg-write-card__body .dg-form-field .form-control,
  .dg-write-card__body .dg-form-field .form-select {
    max-width: 400px;
  }

  /* 교육명, 교육장소 — 넓게 */
  .dg-write-card__body .dg-form-field .form-control[name="subject"],
  .dg-write-card__body .dg-form-field .form-control[name="add6"] {
    max-width: 600px;
  }

  /* 숫자 필드 — 좁게 */
  .dg-write-card__body .dg-form-field .form-control[name="add5"],
  .dg-write-card__body .dg-form-field .form-control[name="add9"] {
    max-width: 200px;
  }

  /* 요일, 교육시간, 교육과정 — 중간 */
  .dg-write-card__body .dg-form-field .form-control[name="add1"],
  .dg-write-card__body .dg-form-field .form-control[name="add4"],
  .dg-write-card__body .dg-form-field .form-control[name="add10"] {
    max-width: 300px;
  }

  /* 날짜 범위 — 컴팩트 */
  .dg-write-card__body .dg-date-range {
    max-width: 380px;
  }
  .dg-write-card__body .dg-date-range .form-control {
    max-width: none;
  }

  /* 카테고리 셀렉트 */
  .dg-write-card__body .dg-form-field .form-select[name="category"] {
    max-width: 250px;
  }
}

/* ── 모바일 반응형 (글쓰기) ── */
@media (max-width: 767px) {
  .dg-write-card__head { gap: .6rem; padding: .7rem .9rem; }
  .dg-write-card__head .head-icon { width: 32px; height: 32px; font-size: .9rem; border-radius: 8px; }
  .dg-write-card__head .head-title { font-size: .92rem; }
  .dg-write-card__body { padding: 18px 16px; }
  .dg-form-row { flex-direction: column; gap: 4px; }
  .dg-form-label { width: auto; text-align: left; padding-top: 0; }
  .dg-form-cols { grid-template-columns: 1fr; }
  .dg-form-actions { flex-direction: column-reverse; }
  .dg-form-actions .btn-cancel,
  .dg-form-actions .btn-submit { width: 100%; justify-content: center; }
  .dg-date-range {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .dg-date-range .sep {
    display: inline;
    font-size: .8rem;
  }
  .dg-date-range .form-control {
    min-width: 0;
    flex: 1;
    padding: 9px 8px;
    font-size: .82rem;
  }
  .dg-prev-item { flex-wrap: wrap; }
  .dg-prev-item__meta { font-size: .7rem; }
}