/* ─────────────────────────────────────────────
   GLB Center — 공통 스타일
   흰 배경 + 주황 포인트 (기존 홈페이지 톤 계승)
   ───────────────────────────────────────────── */
:root {
  --orange: #d2691e;
  --orange-dark: #a9520f;
  --orange-soft: #fdf3ea;
  --ink: #1f2328;
  --ink-2: #4a5158;
  --muted: #868e96;
  --line: #e5e8eb;
  --line-2: #f1f3f5;
  --bg: #ffffff;
  --bg-soft: #fafbfc;
  --blue: #1f6feb;
  --green: #1a8754;
  --red: #d33d3d;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --max: 1120px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont,
               "Segoe UI", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.65;
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--orange); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* ───────────── 헤더 ───────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 20px;
  height: 62px; display: flex; align-items: center; gap: 28px;
}
.brand { font-size: 21px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand span { color: var(--orange); }

.gnb { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.gnb a {
  padding: 8px 12px; border-radius: 6px; font-size: 14.5px; font-weight: 500;
  color: var(--ink-2); white-space: nowrap;
}
.gnb a:hover { background: var(--orange-soft); color: var(--orange-dark); }
.gnb a.active { color: var(--orange); font-weight: 700; }

.header-right { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.header-right .who { color: var(--muted); }
.header-right .who b { color: var(--ink); font-weight: 600; }

.nav-toggle {
  display: none; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; width: 38px; height: 34px; cursor: pointer; font-size: 16px;
}

/* 게시판 드롭다운 (게시판 100개 대응) */
.dropdown { position: relative; }
.dropdown > a::after { content: " ▾"; font-size: 11px; color: var(--muted); }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; margin-top: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .10);
  min-width: 480px; max-width: 620px; max-height: 420px; overflow-y: auto;
  padding: 14px; column-count: 2; column-gap: 22px;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-group { break-inside: avoid; margin-bottom: 12px; }
.dropdown-group h5 {
  margin: 0 0 4px; font-size: 12px; color: var(--orange); font-weight: 700;
  letter-spacing: .02em;
}
.dropdown-group a { display: block; padding: 4px 6px; font-size: 13.5px; border-radius: 5px; }

/* ───────────── 히어로 ───────────── */
.hero { padding: 0 0 8px; }
/* 배너를 직접 올린 경우 — 이미지에 글자가 들어 있을 수 있으므로 자르지 않는다 */
.hero-photo { width: 100%; height: auto; border-radius: 4px; display: block; }
/* 배너가 없을 때의 자리 표시 */
.hero-img {
  width: 100%; aspect-ratio: 16 / 8;
  border-radius: 4px; background: linear-gradient(135deg, #dbeafe, #f6dfc8);
}
.hero-copy { text-align: center; padding: 38px 20px 10px; }
.hero-copy h1 { font-size: clamp(20px, 3.4vw, 30px); }
.hero-copy h1 b { color: var(--orange); }
.hero-copy p { color: var(--ink-2); margin: 0; font-size: 16px; }

/* ───────────── 섹션 ───────────── */
.section { padding: 46px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.section-head { text-align: center; margin-bottom: 26px; }
.section-head h2 { font-size: 24px; }
.section-head p { color: var(--muted); margin: 0; }

.page-head { padding: 34px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.page-head h1 { font-size: 27px; margin-bottom: 6px; }
.page-head p { color: var(--muted); margin: 0; }

/* ───────────── 카드 / 그리드 ───────────── */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden; box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s;
}
a.card:hover { box-shadow: 0 6px 18px rgba(16, 24, 40, .10); transform: translateY(-2px); }
.card-thumb { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: var(--line-2); }
.card-body { padding: 16px 18px 18px; }
.card-body h3 { font-size: 16.5px; margin-bottom: 6px; }
.card-body p { color: var(--ink-2); font-size: 14px; margin: 0 0 10px; }
.card-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }

.panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow); margin-bottom: 20px;
}
.panel-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.panel-head h3 { margin: 0; font-size: 15.5px; }
.panel-body { padding: 18px; }

/* ───────────── 통계 ───────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-align: center; background: #fff;
}
.stat .num { font-size: 26px; font-weight: 800; color: var(--orange); letter-spacing: -.02em; }
.stat .label { font-size: 13px; color: var(--muted); }
a.stat { display: block; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.stat:hover { border-color: var(--orange); box-shadow: var(--shadow); transform: translateY(-2px); }

/* ───────────── 배지 / 진행바 ───────────── */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.7; white-space: nowrap;
}
.badge-gray { background: #f1f3f5; color: #495057; }
.badge-orange { background: var(--orange-soft); color: var(--orange-dark); }
.badge-green { background: #e6f4ec; color: var(--green); }
.badge-blue { background: #e8f1fe; color: var(--blue); }
.badge-red { background: #fdeaea; color: var(--red); }

.progress { height: 7px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--orange); border-radius: 999px; }

/* ───────────── 테이블 ───────────── */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); text-align: left; }
table.tbl thead th {
  background: var(--bg-soft); color: var(--ink-2); font-weight: 600; font-size: 13px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl tbody tr:hover { background: #fcfcfd; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.ctr, table.tbl th.ctr { text-align: center; }
.tbl .title-cell { font-weight: 500; }
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }

/* ───────────── 폼 ───────────── */
.form-row { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
label.lbl { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
label.lbl .req { color: var(--red); }

input[type=text], input[type=password], input[type=email], input[type=tel],
input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d5dae0; border-radius: 8px;
  font: inherit; font-size: 14px; color: var(--ink); background: #fff;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(210, 105, 30, .12);
}
input[readonly] { background: var(--bg-soft); color: var(--muted); }
.help { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-right: 16px; }
.check input { width: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  background: var(--orange); color: #fff; white-space: nowrap;
}
.btn:hover { background: var(--orange-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: #d5dae0; }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #b32d2d; }
.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-row.right { justify-content: flex-end; }

.toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar .spacer { flex: 1; }
.toolbar form { display: flex; gap: 8px; align-items: center; }
.toolbar input[type=search], .toolbar select { width: auto; min-width: 150px; }

/* ───────────── 알림 ───────────── */
.flash-area { max-width: var(--max); margin: 14px auto 0; padding: 0 20px; }
.flash {
  padding: 11px 16px; border-radius: 8px; margin-bottom: 8px; font-size: 14px;
  border: 1px solid; display: flex; gap: 8px; align-items: flex-start;
}
.flash-info { background: #eef5ff; border-color: #cfe0fb; color: #17458f; }
.flash-success { background: #e9f7ef; border-color: #c3e9d4; color: #14663f; }
.flash-error { background: #fdeeee; border-color: #f7cccc; color: #a32626; }
.flash-warn { background: #fff7e6; border-color: #ffe0a3; color: #8a5a00; }

.notice-box {
  background: var(--orange-soft); border: 1px solid #f3ddc6; border-radius: var(--radius);
  padding: 14px 16px; font-size: 13.5px; color: #7a4310; margin-bottom: 18px;
}

/* ───────────── 페이지네이션 ───────────── */
.pager { display: flex; gap: 4px; justify-content: center; margin: 26px 0 6px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 34px; height: 34px; padding: 0 9px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); background: #fff;
}
.pager a:hover { border-color: var(--orange); color: var(--orange); }
.pager .cur { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }
.pager .off { color: #ccc; }
.pager-info { text-align: center; color: var(--muted); font-size: 13px; }

/* ───────────── 로그인 ───────────── */
.login-wrap { max-width: 400px; margin: 70px auto; padding: 0 20px; }
.login-card { border: 1px solid var(--line); border-radius: 14px; padding: 34px 30px; box-shadow: var(--shadow); }
.login-card h1 { text-align: center; font-size: 22px; margin-bottom: 4px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 26px; }
.code-input {
  text-align: center; letter-spacing: .22em; font-size: 19px !important;
  font-weight: 700; padding: 13px !important; text-transform: uppercase;
}

/* ───────────── 관리 화면 (회원/관리자) ───────────── */
.app-layout { display: flex; min-height: calc(100vh - 62px); align-items: stretch; }
.side {
  width: 224px; flex: none; border-right: 1px solid var(--line);
  background: var(--bg-soft); padding: 20px 0 40px;
}
.side h4 {
  font-size: 11.5px; color: var(--muted); letter-spacing: .05em; font-weight: 700;
  margin: 20px 0 6px; padding: 0 20px; text-transform: uppercase;
}
.side h4:first-child { margin-top: 0; }
.side a {
  display: block; padding: 8px 20px; font-size: 14px; color: var(--ink-2);
  border-left: 3px solid transparent;
}
.side a:hover { background: #fff; color: var(--orange); }
.side a.active {
  background: #fff; color: var(--orange); font-weight: 700;
  border-left-color: var(--orange);
}
.side .badge { margin-left: 6px; }
.app-main { flex: 1; min-width: 0; padding: 24px 28px 60px; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.app-head h1 { font-size: 21px; margin: 0; }
.app-head .sub { color: var(--muted); font-size: 13.5px; margin: 3px 0 0; }

/* ───────────── 결재 문서 ───────────── */
.doc {
  border: 2px solid var(--ink); padding: 30px; background: #fff; max-width: 860px;
}
.doc h2 { text-align: center; font-size: 22px; letter-spacing: .3em; margin-bottom: 24px; }
.doc-meta { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 14px; }
.doc-meta th, .doc-meta td { border: 1px solid #b9c0c7; padding: 8px 12px; }
.doc-meta th { background: var(--bg-soft); width: 110px; font-weight: 600; text-align: left; }
.doc-body { min-height: 260px; padding: 16px 4px; white-space: pre-wrap; line-height: 1.9; }
.sign-row { display: flex; gap: 0; justify-content: flex-end; margin-bottom: 18px; }
.sign-box { border: 1px solid #b9c0c7; border-left: none; width: 96px; text-align: center; font-size: 12px; }
.sign-box:first-child { border-left: 1px solid #b9c0c7; }
.sign-box .role { background: var(--bg-soft); padding: 4px; border-bottom: 1px solid #b9c0c7; }
.sign-box .who { height: 58px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; }
.sign-box .who .st { font-size: 11px; color: var(--muted); }
.sign-box .who .ok { color: var(--green); font-weight: 700; }
.sign-box .who .no { color: var(--red); font-weight: 700; }

.timeline { border-left: 2px solid var(--line); padding-left: 18px; margin-left: 6px; }
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item::before {
  content: ""; position: absolute; left: -25px; top: 6px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--orange); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--line);
}
.timeline-item .date { font-size: 12.5px; color: var(--muted); }
.timeline-item h4 { margin: 2px 0 4px; font-size: 15px; }

/* ───────────── 협력 기관 카드 ───────────── */
.partner-card { display: flex; flex-direction: column; }
.partner-logo {
  height: 112px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); border-bottom: 1px solid var(--line-2); padding: 14px;
}
.partner-logo img { max-height: 78px; max-width: 82%; object-fit: contain; }
.partner-initial { font-size: 26px; font-weight: 800; color: var(--muted); letter-spacing: -.02em; }
.partner-intro {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.65;
}

/* ───────────── 게시판 목록(그룹) ───────────── */
.board-group { margin-bottom: 26px; }
.board-group h3 {
  font-size: 15px; color: var(--orange); border-bottom: 2px solid var(--orange-soft);
  padding-bottom: 7px; margin-bottom: 12px;
}
.board-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.board-links a {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #fff;
}
.board-links a:hover { border-color: var(--orange); background: var(--orange-soft); }
.board-links .cnt { font-size: 12px; color: var(--muted); }

/* ───────────── 본문 뷰 ───────────── */
.post-head { border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 4px; }
.post-head h1 { font-size: 22px; margin-bottom: 8px; }
.post-meta { display: flex; gap: 14px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.post-body { padding: 26px 4px; min-height: 180px; line-height: 1.9; white-space: pre-wrap; }
.attach-list { border-top: 1px solid var(--line-2); padding-top: 12px; font-size: 13.5px; }
.attach-list a { display: inline-flex; gap: 6px; align-items: center; margin-right: 14px; color: var(--blue); }

.comment { border-top: 1px solid var(--line-2); padding: 12px 0; }
.comment .who { font-weight: 600; font-size: 13.5px; }
.comment .when { color: var(--muted); font-size: 12.5px; margin-left: 8px; }
.comment p { margin: 4px 0 0; font-size: 14px; white-space: pre-wrap; }

/* ───────────── 푸터 ───────────── */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 60px; padding: 30px 0 44px;
  text-align: center; color: var(--muted); font-size: 13px; background: var(--bg-soft);
}
.site-footer .fbrand { font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
.site-footer .mission { color: var(--orange-dark); font-size: 13.5px; margin-bottom: 10px; }

/* ───────────── 인쇄 ───────────── */
@media print {
  .site-header, .site-footer, .side, .no-print, .toolbar, .pager { display: none !important; }
  .app-main { padding: 0; }
  .doc { border: 1px solid #000; }
  body { font-size: 12pt; }
}

/* ───────────── 반응형 ───────────── */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .board-links { grid-template-columns: repeat(2, 1fr); }
  .side { width: 178px; }
  .app-main { padding: 20px 16px 50px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .gnb {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; background: #fff;
    border-bottom: 1px solid var(--line); padding: 8px; gap: 0;
    box-shadow: 0 8px 20px rgba(16, 24, 40, .08);
  }
  .gnb.open { display: flex; }
  .dropdown-menu { position: static; column-count: 1; min-width: 0; box-shadow: none; border: none; padding: 4px 12px; max-height: 240px; }
  .dropdown:hover .dropdown-menu { display: none; }
  .dropdown.open .dropdown-menu { display: block; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .app-layout { flex-direction: column; }
  .side {
    width: 100%; border-right: none; border-bottom: 1px solid var(--line);
    display: flex; gap: 2px; overflow-x: auto; padding: 8px; white-space: nowrap;
  }
  .side h4 { display: none; }
  .side a { border-left: none; border-bottom: 3px solid transparent; padding: 7px 12px; }
  .side a.active { border-left: none; border-bottom-color: var(--orange); }
  .board-links { grid-template-columns: 1fr; }
  .doc { padding: 18px; }
}
