@charset "UTF-8";

/* ═════════════════════════════════════════════════════════
   안개숲 도서관 - 관리자 전용 모듈 스타일 (css/admin.css)
   블로그 디자인 통일성 유지 (사이드바 카테고리 시스템과 완벽 일치)
   ═════════════════════════════════════════════════════════ */

/* ── 1. 사이드바 관리자 세션 및 카테고리 메뉴 ── */
.admin-menu-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f2f4;
}

.admin-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #333d4b;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  text-align: left;
}

.admin-menu-toggle:hover {
  background-color: #f2f6f3;
  color: #1b736e;
}

.admin-menu-toggle .toggle-icon {
  font-size: 11px;
  color: #8b95a1;
  transition: transform 0.2s ease;
  display: inline-block;
}

.admin-menu-toggle.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

/* 관리자 하위 카테고리 목록 (글 카테고리 subcategory-list와 동일한 회색선 #eef1f4 및 여백) */
.admin-submenu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 12px;
  margin: 2px 0 6px 14px;
  border-left: 2px solid #eef1f4;
  transition: all 0.2s ease;
}

.admin-submenu-list.collapsed {
  display: none;
}

.admin-sub-item a {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  color: #6b7684;
  font-size: 12.5px;
  font-weight: 400;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.15s ease;
}

.admin-sub-item a:hover {
  background-color: #f2f6f3;
  color: #1b736e;
  font-weight: 500;
  padding-left: 13px;
}

.admin-sub-item.active a {
  color: #1b736e;
  font-weight: 600;
  background-color: #e9f4f3;
}

/* ── 2. 우측 본문 영역 관리자 대시보드 뷰 컨테이너 ── */
.admin-view-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: adminFadeIn 0.2s ease-in-out;
}

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

.admin-banner {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.admin-banner-path {
  font-size: 12px;
  color: #6b7684;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-banner-path a {
  color: #6b7684;
  text-decoration: none;
}

.admin-banner-path a:hover {
  text-decoration: underline;
}

.admin-banner-path strong {
  color: #1b736e;
}

.admin-banner-title {
  font-size: 22px;
  font-weight: 700;
  color: #191f28;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.admin-banner-desc {
  font-size: 13.5px;
  color: #6b7684;
  line-height: 1.6;
}

/* ── 3. 관리자 툴바 (검색창, 개수 표시, 새로고침) ── */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.admin-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #4b5563;
}

.admin-toolbar-left strong {
  color: #1b736e;
  font-weight: 700;
}

.admin-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-search-box {
  display: flex;
  align-items: center;
  background-color: #f7f9fa;
  border: 1px solid #e5e8eb;
  border-radius: 6px;
  padding: 5px 10px;
  transition: all 0.15s ease;
}

.admin-search-box:focus-within {
  background-color: #ffffff;
  border-color: #1b736e;
  box-shadow: 0 0 0 2px rgba(27, 115, 110, 0.1);
}

.admin-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12.5px;
  color: #191f28;
  width: 180px;
  font-family: inherit;
}

.admin-search-input::placeholder {
  color: #8b95a1;
}

.btn-admin-refresh {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 6px;
  font-size: 12px;
  color: #4b5563;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-admin-refresh:hover {
  background: #f2f6f3;
  color: #1b736e;
  border-color: #cbd5e1;
}

/* ── 4. 댓글 관리 테이블 스타일 ── */
.admin-table-container {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.admin-table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.admin-table th {
  background: #f9fafb;
  color: #4b5563;
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e8eb;
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f2f4;
  vertical-align: middle;
  color: #333d4b;
}

.admin-table tbody tr:hover td {
  background-color: #f9fbf9;
}

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

.admin-author-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 90px;
}

.admin-author-name {
  font-weight: 600;
  color: #191f28;
}

.badge-admin-author {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #1b736e;
  background: #e9f4f3;
  padding: 1px 5px;
  border-radius: 3px;
  width: fit-content;
}

.admin-comment-content {
  color: #374151;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
  max-width: 440px;
}

.admin-post-link {
  color: #1b736e;
  text-decoration: none;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  max-width: 220px;
}

.admin-post-link:hover {
  text-decoration: underline;
}

.admin-ip-badge {
  font-family: monospace;
  font-size: 11px;
  color: #8b95a1;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.admin-date-text {
  font-size: 11.5px;
  color: #8b95a1;
  white-space: nowrap;
}

.btn-admin-delete-row {
  background: #ffffff;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  color: #dc2626;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}

.btn-admin-delete-row:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

/* ── 5. 빈 상태 (Empty State) ── */
.admin-empty-state {
  padding: 60px 24px;
  text-align: center;
  color: #8b95a1;
  font-size: 13.5px;
}

.admin-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #4b5563;
  margin-bottom: 6px;
}

/* ── 6. 페이지네이션 ── */
.admin-pagination-box {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  border-top: 1px solid #f0f2f4;
}

@media (max-width: 768px) {
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-search-input {
    width: 100%;
  }
}

/* ── 다음 단계 구현을 위한 준비 카드 (프리뷰 카드) ── */
.admin-card-preview {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 10px;
  padding: 48px 24px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.admin-preview-title {
  font-size: 18px;
  font-weight: 700;
  color: #191f28;
  margin-bottom: 8px;
}

.admin-preview-desc {
  font-size: 13.5px;
  color: #6b7684;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
}

.admin-preview-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  padding: 5px 14px;
  background: #f2f6f3;
  border: 1px solid #d1e2dd;
  color: #1b736e;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
}

/* ═════════════════════════════════════════════════════════
   7. 방문자 & 통계 대시보드 (css/admin.css)
   ═════════════════════════════════════════════════════════ */

/* ── 7-1. 상단 요약 KPI 지표 카드 그리드 ── */
.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

@media (max-width: 1024px) {
  .stats-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .stats-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stats-kpi-card {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 10px;
  padding: 18px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.stats-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.stats-kpi-title {
  font-size: 12px;
  font-weight: 500;
  color: #6b7684;
}

.stats-kpi-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: #1b736e;
  background: #e9f4f3;
  padding: 2px 6px;
  border-radius: 4px;
}

.stats-kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: #191f28;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stats-kpi-sub {
  font-size: 11.5px;
  color: #8b95a1;
  margin-top: 6px;
  line-height: 1.4;
}

.stats-kpi-sub strong {
  color: #4b5563;
  font-weight: 600;
}

/* ── 7-2. 범용 통계 섹션 카드 박스 ── */
.stats-section-box {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 10px;
  padding: 22px 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.stats-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f2f4;
}

.stats-section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stats-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #191f28;
  letter-spacing: -0.01em;
}

.stats-section-desc {
  font-size: 12px;
  color: #8b95a1;
}

/* 세그먼트 토글 버튼 그룹 (최근 7일 / 최근 30일) */
.stats-toggle-group {
  display: inline-flex;
  background: #f2f4f6;
  padding: 3px;
  border-radius: 6px;
  gap: 2px;
}

.stats-toggle-btn {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 500;
  color: #6b7684;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.stats-toggle-btn:hover {
  color: #191f28;
}

.stats-toggle-btn.active {
  background: #ffffff;
  color: #1b736e;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ── 7-3. 막대 차트 (CSS Flexbox 기반 경량 반응형 + 동적 세로축) ── */
.stats-chart-wrapper {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.stats-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  width: 38px;
  padding: 20px 8px 0 0;
  flex-shrink: 0;
  pointer-events: none;
  box-sizing: border-box;
}

.stats-y-tick {
  font-size: 11px;
  font-weight: 500;
  color: #8b95a1;
  line-height: 1;
}

.stats-chart-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.stats-chart-area {
  position: relative;
  height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 8px 0 8px;
  border-bottom: 1px solid #e5e8eb;
}

.stats-chart-gridlines {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stats-gridline {
  border-bottom: 1px dashed #eef1f4;
  width: 100%;
}

.stats-bars-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  gap: 4px;
}

.stats-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
  cursor: pointer;
  position: relative;
}

.stats-bar-col:hover .stats-bar-pillar {
  filter: brightness(0.92);
}

.stats-bar-col:hover .stats-bar-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-6px);
}

.stats-bar-value {
  font-size: 11px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 4px;
  white-space: nowrap;
}

.stats-bar-pillar {
  width: 75%;
  max-width: 32px;
  min-width: 4px;
  min-height: 4px;
  background: #c6e3df;
  border-radius: 4px 4px 0 0;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.stats-bar-pillar.highlight-today {
  background: #1b736e;
}

.stats-bar-labels-row {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding: 8px 8px 0 8px;
}

.stats-bar-label {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: #8b95a1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-bar-label.highlight-today {
  color: #1b736e;
  font-weight: 600;
}

/* 툴팁 */
.stats-bar-tooltip {
  position: absolute;
  bottom: calc(100% - 10px);
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #191f28;
  color: #ffffff;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s ease;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.stats-bar-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: #191f28 transparent transparent transparent;
}

/* ── 7-4. 월간 통계 아카이브 섹션 ── */
.stats-month-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-month-nav {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 6px;
  font-size: 12px;
  color: #4b5563;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-month-nav:hover:not(:disabled) {
  background: #f2f6f3;
  color: #1b736e;
  border-color: #cbd5e1;
}

.btn-month-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stats-month-select {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #191f28;
  cursor: pointer;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.stats-month-select:focus {
  border-color: #1b736e;
}

.stats-monthly-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: #f9fafb;
  border: 1px solid #f0f2f4;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .stats-monthly-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stats-monthly-metric-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-metric-label {
  font-size: 11.5px;
  color: #6b7684;
}

.stats-metric-val {
  font-size: 18px;
  font-weight: 700;
  color: #191f28;
}

.stats-metric-sub {
  font-size: 11px;
  color: #8b95a1;
}

.stats-growth-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
}

.stats-growth-up {
  color: #1b736e;
  background: #e9f4f3;
}

.stats-growth-down {
  color: #e11d48;
  background: #ffe4e6;
}

.stats-growth-same {
  color: #6b7684;
  background: #f3f4f6;
}

/* 월간 일별 흐름 미니 바 차트 (1일~말일 + 세로축) */
.stats-daily-flow-wrapper {
  margin-top: 10px;
}

.stats-flow-header {
  font-size: 12.5px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stats-flow-chart-wrapper {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.stats-y-axis.flow-y-axis {
  width: 34px;
  height: 100px;
  padding: 0 8px 6px 0;
}

.stats-flow-chart-main {
  flex: 1;
  min-width: 0;
}

.stats-daily-flow-chart {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  height: 100px;
  gap: 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e8eb;
  box-sizing: border-box;
}

.stats-daily-flow-chart .stats-chart-gridlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 6px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 0;
}

.stats-daily-flow-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.stats-daily-flow-bar {
  width: 100%;
  max-width: 14px;
  min-height: 2px;
  background: #e5e8eb;
  border-radius: 2px 2px 0 0;
  transition: all 0.2s ease;
}

.stats-daily-flow-bar.has-visits {
  background: #1b736e;
}

.stats-daily-flow-col:hover .stats-daily-flow-bar {
  background: #0f4a47;
}

.stats-daily-flow-col:hover .stats-bar-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

.stats-flow-x-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8b95a1;
  margin-top: 6px;
}

/* ── 7-5. 하단 2열 그리드: 인기 글 Top 10 & (시간대별 + 월별 방문 패턴) ── */
.stats-bottom-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .stats-bottom-grid {
    grid-template-columns: 1fr;
  }
}

.stats-right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 인기 게시글 Top 5 */
.stats-top-posts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stats-rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #f0f2f4;
  border-radius: 8px;
  transition: all 0.15s ease;
  background: #ffffff;
}

.stats-rank-item:hover {
  background: #f9fbf9;
  border-color: #d1e2dd;
}

.stats-rank-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.stats-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.stats-rank-badge.rank-1 {
  background: #1b736e;
  color: #ffffff;
}

.stats-rank-badge.rank-2 {
  background: #2e8b85;
  color: #ffffff;
}

.stats-rank-badge.rank-3 {
  background: #5fa8a3;
  color: #ffffff;
}

.stats-rank-badge.rank-other {
  background: #f0f2f4;
  color: #6b7684;
}

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

.stats-rank-title {
  font-size: 13px;
  font-weight: 600;
  color: #191f28;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-rank-title:hover {
  color: #1b736e;
  text-decoration: underline;
}

.stats-rank-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #8b95a1;
}

.stats-rank-cat {
  color: #6b7684;
}

.stats-rank-val {
  font-size: 13px;
  font-weight: 700;
  color: #1b736e;
  white-space: nowrap;
  margin-left: 12px;
  flex-shrink: 0;
}

/* 시간대별 방문 분포 (0~23시) */
.stats-hourly-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stats-hourly-summary {
  font-size: 12px;
  color: #6b7684;
  line-height: 1.5;
}

.stats-hourly-summary strong {
  color: #1b736e;
}

.stats-hourly-chart-wrapper {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.stats-y-axis.hourly-y-axis {
  width: 34px;
  height: 120px;
  padding: 10px 8px 4px 0;
}

.stats-hourly-chart-main {
  flex: 1;
  min-width: 0;
}

.stats-hourly-bars {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  height: 120px;
  gap: 3px;
  padding: 10px 4px 4px 4px;
  border-bottom: 1px solid #e5e8eb;
  box-sizing: border-box;
}

.stats-hourly-bars .stats-chart-gridlines {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  bottom: 4px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 0;
}

.stats-hourly-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.stats-hourly-bar {
  width: 100%;
  max-width: 12px;
  min-height: 2px;
  background: #e5e8eb;
  border-radius: 2px 2px 0 0;
  transition: all 0.2s ease;
}

.stats-hourly-bar.has-visits {
  background: #2e8b85;
}

.stats-hourly-bar.peak-hour {
  background: #1b736e;
}

.stats-hourly-col:hover .stats-hourly-bar {
  background: #0f4a47;
}

.stats-hourly-col:hover .stats-bar-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

.stats-hourly-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8b95a1;
}

/* ── 월별 방문 패턴 (지난 1년간 월별 통계) ── */
.stats-monthly-pattern-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stats-monthly-pattern-summary {
  font-size: 12px;
  color: #6b7684;
  line-height: 1.5;
}

.stats-monthly-pattern-summary strong {
  color: #1b736e;
}

.stats-monthly-chart-wrapper {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.stats-y-axis.monthly-y-axis {
  width: 34px;
  height: 120px;
  padding: 10px 8px 4px 0;
}

.stats-monthly-chart-main {
  flex: 1;
  min-width: 0;
}

.stats-monthly-bars {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  height: 120px;
  gap: 6px;
  padding: 10px 4px 4px 4px;
  border-bottom: 1px solid #e5e8eb;
  box-sizing: border-box;
}

.stats-monthly-bars .stats-chart-gridlines {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  bottom: 4px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 0;
}

.stats-month-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.stats-month-bar {
  width: 100%;
  max-width: 18px;
  min-height: 2px;
  background: #e5e8eb;
  border-radius: 3px 3px 0 0;
  transition: all 0.2s ease;
}

.stats-month-bar.has-visits {
  background: #2e8b85;
}

.stats-month-bar.peak-month {
  background: #1b736e;
}

.stats-month-bar.current-month-bar {
  background: #1b736e;
  box-shadow: 0 0 0 1.5px rgba(27, 115, 110, 0.25);
}

.stats-month-col:hover .stats-month-bar {
  background: #0f4a47;
}

.stats-month-col:hover .stats-bar-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

.stats-monthly-labels {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding-top: 6px;
}

.stats-month-label {
  flex: 1;
  text-align: center;
  font-size: 10.5px;
  color: #8b95a1;
  white-space: nowrap;
}

.stats-month-label.is-current {
  color: #1b736e;
  font-weight: 700;
}

@media (max-width: 600px) {
  .stats-monthly-bars {
    gap: 3px;
  }
  .stats-month-label {
    font-size: 9.5px;
  }
}

/* ══════════════════════════════════════════════
   8. 데이터 백업 & 복원 화면 스타일
   ══════════════════════════════════════════════ */
.backup-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .backup-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .backup-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.backup-kpi-card {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.backup-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7684;
}

.backup-kpi-val {
  font-size: 22px;
  font-weight: 700;
  color: #191f28;
}

.backup-kpi-sub {
  font-size: 11.5px;
  color: #8b95a1;
}

.backup-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 950px) {
  .backup-main-grid {
    grid-template-columns: 1fr;
  }
}

.backup-card {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.backup-card-header {
  border-bottom: 1px solid #f0f2f4;
  padding-bottom: 16px;
}

.backup-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #191f28;
  display: flex;
  align-items: center;
  gap: 8px;
}

.backup-card-desc {
  font-size: 12.5px;
  color: #6b7684;
  margin-top: 4px;
  line-height: 1.5;
}

.backup-option-box {
  background: #f9fbf9;
  border: 1px solid #e2ede8;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease;
}

.backup-option-box:hover {
  border-color: #b2d7cb;
}

.backup-option-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.backup-option-title {
  font-size: 14px;
  font-weight: 700;
  color: #191f28;
  display: flex;
  align-items: center;
  gap: 6px;
}

.backup-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.backup-badge.badge-recommend {
  background: #e8f5f3;
  color: #1b736e;
  border: 1px solid #c2e5de;
}

.backup-badge.badge-json {
  background: #f0f4f8;
  color: #3b6c8f;
  border: 1px solid #d0e0ed;
}

.backup-option-desc {
  font-size: 12px;
  color: #6b7684;
  line-height: 1.5;
}

.btn-backup-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  border: none;
}

.btn-backup-download.btn-download-db {
  background: #1b736e;
  color: #ffffff;
}

.btn-backup-download.btn-download-db:hover {
  background: #145b57;
  transform: translateY(-1px);
}

.btn-backup-download.btn-download-json {
  background: #ffffff;
  color: #1b736e;
  border: 1px solid #1b736e;
}

.btn-backup-download.btn-download-json:hover {
  background: #f2f8f7;
  transform: translateY(-1px);
}

.backup-tip-box {
  background: #f8fafc;
  border-left: 3px solid #1b736e;
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
}

/* 드롭존 */
.backup-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 32px 20px;
  text-align: center;
  background: #fafbfc;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.backup-dropzone:hover,
.backup-dropzone.dragover {
  border-color: #1b736e;
  background: #f0f8f6;
}

.backup-dropzone-icon {
  width: 44px;
  height: 44px;
  color: #1b736e;
}

.backup-dropzone-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #191f28;
}

.backup-dropzone-sub {
  font-size: 11.5px;
  color: #8b95a1;
}

.backup-selected-panel {
  background: #f9fbf9;
  border: 1px solid #bfe0d8;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.backup-selected-file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.backup-selected-file-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.backup-file-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #191f28;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-file-meta {
  font-size: 11.5px;
  color: #8b95a1;
}

.btn-backup-restore-action {
  width: 100%;
  padding: 11px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  background: #d94b41;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-backup-restore-action:hover {
  background: #be3b32;
  transform: translateY(-1px);
}

.backup-notice-box {
  background: #fff9f6;
  border: 1px solid #fed7c7;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: #9c3c1e;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.backup-rollback-card {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.backup-rollback-info {
  font-size: 12px;
  color: #4b5563;
  line-height: 1.4;
}

.btn-backup-rollback {
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #4b5563;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}

.btn-backup-rollback:hover {
  background: #f1f5f9;
  color: #191f28;
}

/* 모달 */
.backup-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.backup-modal-card {
  background: #ffffff;
  border-radius: 14px;
  max-width: 480px;
  width: 90%;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.backup-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #191f28;
  display: flex;
  align-items: center;
  gap: 8px;
}

.backup-modal-desc {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.6;
}

.backup-modal-file-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.backup-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.btn-modal-cancel {
  padding: 9px 16px;
  border-radius: 7px;
  border: 1px solid #e5e8eb;
  background: #ffffff;
  color: #6b7684;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-modal-confirm {
  padding: 9px 18px;
  border-radius: 7px;
  border: none;
  background: #d94b41;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn-modal-confirm:hover {
  background: #be3b32;
}


