/* ── 토큰 (기존 동일) ── */
    :root {
      --brick: #A84E34;
      --brick-dark: #74321F;
      --orange: #D8824A;
      --cream: #FDFBF7;
      --cream-deep: #F7EEE3;
      --paper: #FFFFFF;
      --charcoal: #2C3E50;
      --muted: #6A7682;
      --line: rgba(44,62,80,.12);
      --shadow: 0 20px 60px rgba(65,35,20,.12);
      --round-xl: 32px;
      --round-lg: 24px;
      --round-md: 18px;
      --sidebar-w: 240px;
      --header-h: 68px;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body {
      font-family: "Noto Sans KR", system-ui, sans-serif;
      color: var(--charcoal);
      background: var(--cream);
      word-break: keep-all;
      overflow-x: hidden;
    }
    a { color: inherit; text-decoration: none; }
    button, input, textarea, select { font: inherit; }
    img { max-width: 100%; display: block; }

    /* ══════════════════════════════════════
       HEADER (기존 디자인 그대로)
    ══════════════════════════════════════ */
    .site-header {
      position: fixed; top: 0; left: 0;
      width: 100%; z-index: 200; padding: 10px 0;
      background: rgba(253,251,247,.92);
      backdrop-filter: blur(16px);
      box-shadow: 0 2px 12px rgba(44,62,80,.08);
      height: var(--header-h);
      display: flex; align-items: center;
    }
    .nav {
      width: min(calc(100% - 28px), 1400px);
      margin: 0 auto; min-height: 48px;
      border: 1px solid rgba(255,255,255,.42);
      background: rgba(255,255,255,.54);
      backdrop-filter: blur(18px); border-radius: 999px;
      display: flex; align-items: center; justify-content: space-between;
      padding: 0 16px 0 18px;
      box-shadow: 0 8px 24px rgba(65,35,20,.07);
    }
    .brand {
      display: flex; align-items: center; gap: 10px;
      font-weight: 800; letter-spacing: -0.03em; color: var(--brick-dark);
      font-size: 15px;
    }
    .brand-mark {
      width: 36px; height: 36px; border-radius: 12px;
      display: grid; place-items: center;
      background: linear-gradient(145deg, var(--brick), var(--orange));
      color: #fff; font-weight: 800; font-size: 14px;
      box-shadow: 0 6px 16px rgba(168,78,52,.28); flex-shrink: 0;
    }
    .brand-text small {
      display: block; font-size: 10px; color: var(--muted);
      letter-spacing: .02em; font-weight: 700;
    }
    .admin-badge {
      padding: 4px 10px; border-radius: 999px;
      background: rgba(168,78,52,.12); color: var(--brick);
      font-size: 12px; font-weight: 900; letter-spacing: .04em;
    }
    .nav-right { display: flex; align-items: center; gap: 10px; }
    .nav-home {
      font-size: 13px; font-weight: 800; color: var(--muted);
      padding: 8px 14px; border-radius: 999px;
      border: 1px solid var(--line); background: var(--paper);
      transition: .15s;
    }
    .nav-home:hover { color: var(--brick); border-color: var(--brick); }
    .menu-btn {
      display: none; width: 36px; height: 36px;
      border: 0; border-radius: 50%;
      background: rgba(168,78,52,.1); color: var(--brick-dark); cursor: pointer;
      font-size: 18px;
    }

    /* ══════════════════════════════════════
       LAYOUT: SIDEBAR + CONTENT
    ══════════════════════════════════════ */
    .admin-wrap {
      display: grid;
      grid-template-columns: var(--sidebar-w) 1fr;
      grid-template-rows: 1fr auto;
      min-height: 100vh;
      padding-top: var(--header-h);
    }

    /* ── SIDEBAR ── */
    .sidebar {
      position: sticky;
      top: var(--header-h);
      height: calc(100vh - var(--header-h));
      background: var(--paper);
      border-right: 1px solid var(--line);
      overflow-y: auto;
      display: flex; flex-direction: column;
    }
    .sidebar-inner { padding: 24px 16px; flex: 1; }
    .sidebar-label {
      font-size: 11px; font-weight: 900; letter-spacing: .1em;
      color: var(--muted); padding: 0 8px; margin: 0 0 8px;
      text-transform: uppercase;
    }
    .sidebar-menu { list-style: none; display: grid; gap: 2px; }
    .sidebar-menu li button {
      width: 100%; text-align: left;
      padding: 11px 12px; border-radius: 12px;
      border: 0; background: transparent; cursor: pointer;
      font-size: 14px; font-weight: 700; color: var(--charcoal);
      display: flex; align-items: center; gap: 10px;
      transition: .15s;
    }
    .sidebar-menu li button:hover { background: var(--cream); color: var(--brick); }
    .sidebar-menu li button.active {
      background: rgba(168,78,52,.1); color: var(--brick-dark); font-weight: 800;
    }
    .sidebar-menu li button .menu-icon {
      width: 24px; height: 24px; border-radius: 8px;
      display: grid; place-items: center;
      background: var(--cream-deep); font-size: 13px; flex-shrink: 0;
    }
    .sidebar-menu li button.active .menu-icon { background: rgba(168,78,52,.15); }
    .sidebar-divider {
      height: 1px; background: var(--line); margin: 16px 0;
    }

    /* ── MAIN CONTENT ── */
    .admin-content {
      min-height: calc(100vh - var(--header-h));
      padding: 32px 28px;
      background: var(--cream);
    }

    /* ══════════════════════════════════════
       SHARED COMPONENTS
    ══════════════════════════════════════ */
    .page-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 24px; gap: 12px; flex-wrap: wrap;
    }
    .page-header h2 {
      font-size: 22px; font-weight: 800; letter-spacing: -0.04em;
    }

    /* 버튼 */
    .btn {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 10px 18px; border-radius: 999px;
      font-size: 14px; font-weight: 800; cursor: pointer;
      border: 1px solid transparent; transition: .15s;
    }
    .btn-primary {
      background: var(--brick); color: #fff; border-color: var(--brick);
      box-shadow: 0 6px 16px rgba(168,78,52,.22);
    }
    .btn-primary:hover { background: var(--brick-dark); border-color: var(--brick-dark); }
    .btn-ghost {
      background: var(--paper); color: var(--charcoal); border-color: var(--line);
    }
    .btn-ghost:hover { border-color: var(--brick); color: var(--brick); }
    .btn-danger {
      background: transparent; color: #c0392b; border-color: rgba(192,57,43,.25);
      font-size: 13px; padding: 6px 12px;
    }
    .btn-danger:hover { background: rgba(192,57,43,.08); }
    .btn-edit {
      background: transparent; color: var(--muted); border-color: var(--line);
      font-size: 13px; padding: 6px 12px;
    }
    .btn-edit:hover { border-color: var(--brick); color: var(--brick); }
    .btn-sm { padding: 7px 14px; font-size: 13px; }

    /* 카드 */
    .card {
      background: var(--paper); border: 1px solid var(--line);
      border-radius: var(--round-lg); padding: 22px;
      box-shadow: 0 4px 20px rgba(44,62,80,.06);
    }

    /* 테이블 */
    .tbl-wrap {
      background: var(--paper); border: 1px solid var(--line);
      border-radius: var(--round-lg); overflow: hidden;
      box-shadow: 0 4px 20px rgba(44,62,80,.06);
    }
    table { width: 100%; border-collapse: collapse; }
    thead th {
      padding: 13px 16px; background: var(--cream-deep);
      font-size: 12px; font-weight: 900; letter-spacing: .06em;
      color: var(--muted); text-align: left;
      border-bottom: 1px solid var(--line);
    }
    thead th:first-child { width: 56px; text-align: center; }
    thead th.col-date { width: 110px; }
    thead th.col-act  { width: 120px; text-align: center; }
    tbody tr { border-bottom: 1px solid var(--line); transition: .12s; }
    tbody tr:last-child { border-bottom: 0; }
    tbody tr:hover { background: var(--cream); }
    tbody td { padding: 14px 16px; font-size: 14px; vertical-align: middle; }
    tbody td:first-child { text-align: center; color: var(--muted); font-size: 13px; }
    tbody td.col-date { color: var(--muted); font-size: 13px; white-space: nowrap; }
    tbody td.col-act  { text-align: center; }
    .act-btns { display: flex; justify-content: center; gap: 6px; }

    /* 폼 */
    .form-group { margin-bottom: 18px; }
    .form-label {
      display: block; font-size: 13px; font-weight: 800;
      margin-bottom: 7px; color: var(--charcoal);
    }
    .form-label .req { color: var(--brick); margin-left: 2px; }
    .form-input, .form-textarea, .form-select {
      width: 100%; padding: 11px 14px;
      border: 1px solid var(--line); border-radius: 12px;
      background: var(--paper); color: var(--charcoal);
      font-size: 14px; transition: .15s;
      outline: 0;
    }
    .form-input:focus, .form-textarea:focus, .form-select:focus {
      border-color: var(--brick);
      box-shadow: 0 0 0 3px rgba(168,78,52,.1);
    }
    .form-textarea { min-height: 280px; resize: vertical; line-height: 1.7; }
    .form-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
    .form-file-wrap {
      border: 2px dashed var(--line); border-radius: 14px;
      padding: 28px; text-align: center; cursor: pointer;
      transition: .15s; background: var(--cream);
      position: relative;
    }
    .form-file-wrap:hover { border-color: var(--brick); }
    .form-file-wrap input[type=file] {
      position: absolute; inset: 0; opacity: 0; cursor: pointer;
    }
    .form-file-icon { font-size: 28px; margin-bottom: 8px; }
    .form-file-label { font-size: 14px; font-weight: 700; color: var(--muted); }
    .form-file-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
    .form-actions {
      display: flex; gap: 10px; padding-top: 8px; flex-wrap: wrap;
    }

    /* 토스트 */
    #toast {
      position: fixed; bottom: 28px; right: 28px; z-index: 9999;
      background: var(--charcoal); color: #fff;
      padding: 14px 22px; border-radius: 14px;
      font-size: 14px; font-weight: 700;
      box-shadow: 0 12px 32px rgba(44,62,80,.22);
      transform: translateY(20px); opacity: 0;
      transition: .25s ease; pointer-events: none;
    }
    #toast.show { transform: translateY(0); opacity: 1; }
    #toast.success { border-left: 4px solid #27ae60; }
    #toast.error   { border-left: 4px solid #c0392b; }

    /* 로딩 오버레이 */
    .loading-overlay {
      display: none; position: absolute; inset: 0;
      background: rgba(253,251,247,.72); border-radius: inherit;
      place-items: center; z-index: 10; font-size: 13px;
      color: var(--muted); font-weight: 700; gap: 8px;
    }
    .loading-overlay.active { display: grid; }
    .spinner {
      width: 20px; height: 20px; border-radius: 50%;
      border: 2px solid var(--line); border-top-color: var(--brick);
      animation: spin .7s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ══════════════════════════════════════
       DASHBOARD
    ══════════════════════════════════════ */
    .stat-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px; margin-bottom: 28px;
    }
    .stat-card {
      background: var(--paper); border: 1px solid var(--line);
      border-radius: var(--round-md); padding: 20px 22px;
      box-shadow: 0 4px 20px rgba(44,62,80,.05);
      display: flex; flex-direction: column; gap: 8px;
    }
    .stat-label {
      font-size: 12px; font-weight: 900; letter-spacing: .06em;
      color: var(--muted); text-transform: uppercase;
    }
    .stat-num {
      font-size: 36px; font-weight: 800; letter-spacing: -0.05em;
      color: var(--charcoal); line-height: 1;
    }
    .stat-sub { font-size: 13px; color: var(--muted); }
    .stat-card .stat-icon {
      font-size: 22px; margin-bottom: 2px;
    }

    .dash-recent-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px;
    }
    .recent-card .card-title {
      font-size: 15px; font-weight: 800; margin-bottom: 14px;
      padding-bottom: 10px; border-bottom: 1px solid var(--line);
      display: flex; align-items: center; gap: 8px;
    }
    .recent-list { list-style: none; display: grid; gap: 0; }
    .recent-list li {
      padding: 10px 0; border-top: 1px solid var(--line);
      font-size: 13px;
    }
    .recent-list li:first-child { border-top: 0; padding-top: 0; }
    .recent-list li .r-title {
      font-weight: 700; margin-bottom: 3px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .recent-list li .r-date { color: var(--muted); font-size: 12px; }

    /* ══════════════════════════════════════
       PHOTO GALLERY (카드형)
    ══════════════════════════════════════ */
    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 14px;
    }
    .gallery-card {
      background: var(--paper); border: 1px solid var(--line);
      border-radius: var(--round-md); overflow: hidden;
      box-shadow: 0 4px 12px rgba(44,62,80,.06);
    }
    .gallery-thumb {
      height: 130px; background: var(--cream-deep);
      display: flex; align-items: center; justify-content: center;
      font-size: 32px; color: var(--muted);
      position: relative; overflow: hidden;
    }
    .gallery-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
    .gallery-info { padding: 12px 14px; }
    .gallery-info .g-title {
      font-size: 13px; font-weight: 800;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      margin-bottom: 4px;
    }
    .gallery-info .g-date { font-size: 12px; color: var(--muted); }
    .gallery-info .g-actions { display: flex; gap: 6px; margin-top: 10px; }

    /* ══════════════════════════════════════
       FOOTER (기존 디자인)
    ══════════════════════════════════════ */
    .admin-footer {
      grid-column: 1 / -1;
      padding: 30px 28px;
      background: var(--charcoal);
      color: rgba(255,255,255,.6);
      font-size: 13px;
      display: flex; align-items: center; justify-content: space-between;
      flex-wrap: wrap; gap: 12px;
    }
    .admin-footer .footer-brand {
      display: flex; align-items: center; gap: 10px;
      color: #fff; font-weight: 900; font-size: 16px;
    }

    /* ══════════════════════════════════════
       SECTION VISIBILITY
    ══════════════════════════════════════ */
    .view { display: none; }
    .view.active { display: block; }

    /* ══════════════════════════════════════
       RESPONSIVE
    ══════════════════════════════════════ */
    @media (max-width: 1024px) {
      .stat-grid, .dash-recent-grid { grid-template-columns: 1fr 1fr; }
    }
    @media (max-width: 768px) {
      :root { --sidebar-w: 0px; }
      .admin-wrap { grid-template-columns: 1fr; }
      .sidebar {
        position: fixed; top: var(--header-h); left: 0; bottom: 0;
        width: 240px; z-index: 150;
        transform: translateX(-100%); transition: transform .25s ease;
        height: calc(100vh - var(--header-h));
      }
      .sidebar.open { transform: translateX(0); }
      .sidebar-backdrop {
        display: none; position: fixed; inset: 0; z-index: 140;
        background: rgba(44,62,80,.3); backdrop-filter: blur(2px);
      }
      .sidebar-backdrop.active { display: block; }
      .admin-content { padding: 20px 16px; }
      .menu-btn { display: grid; place-items: center; }
      .stat-grid { grid-template-columns: 1fr; }
      .dash-recent-grid { grid-template-columns: 1fr; }
      .admin-footer { grid-column: 1; }
    }
    @media (max-width: 480px) {
      .page-header { flex-direction: column; align-items: flex-start; }
      .gallery-grid { grid-template-columns: 1fr 1fr; }
    }

/* ══════════════════════════════════════
   분리 작업용 유틸리티 / 동적 UI
══════════════════════════════════════ */
.is-hidden { display: none !important; }
.is-muted { color: var(--muted) !important; }
.has-overlay { position: relative; }
.form-card { margin-bottom: 24px; }
.form-section-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--charcoal);
}
.empty-cell {
  text-align: center !important;
  padding: 36px !important;
  color: var(--muted) !important;
}
.empty-grid {
  color: var(--muted);
  font-size: 14px;
  grid-column: 1 / -1;
  padding: 20px 0;
  text-align: center;
}
.gallery-table-wrap { padding: 20px; }
.file-preview-img {
  max-height: 120px;
  border-radius: 10px;
  margin: 0 auto;
}
.file-preview-meta { margin-top: 8px; }
.file-name-brick { color: var(--brick); }

/* 공지사항 제목 클릭 상세 펼침 */
.notice-title-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
  padding: 2px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .15s ease;
}
.notice-title-btn::before {
  content: "＋";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--cream-deep);
  color: var(--brick);
  font-size: 12px;
  flex-shrink: 0;
}
.notice-title-btn[aria-expanded="true"] { color: var(--brick-dark); }
.notice-title-btn[aria-expanded="true"]::before { content: "－"; }
.notice-title-btn:hover { color: var(--brick); }
.notice-detail-row { background: rgba(247,238,227,.58); }
.notice-detail-row[hidden] { display: none; }
.notice-detail-cell { padding: 0 16px 18px !important; }
.notice-detail-box {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.notice-detail-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  color: var(--brick);
  margin-bottom: 10px;
}
.notice-detail-body {
  line-height: 1.8;
  color: var(--charcoal);
  font-size: 14px;
}
.notice-detail-body p { margin: 0 0 10px; }
.notice-detail-body ul,
.notice-detail-body ol { margin: 8px 0 8px 22px; }
.notice-detail-empty { color: var(--muted); }

@media (max-width: 768px) {
  .notice-detail-cell { padding: 0 10px 14px !important; }
  .notice-detail-box { padding: 15px; }
}
