/* JSP 게시판 — 공용 스타일 */
* { box-sizing: border-box; }
body {
  margin: 0; background: #f0f2f6; color: #1a1a2e;
  font-family: 'Segoe UI', 'Malgun Gothic', system-ui, sans-serif;
  font-size: 14px; line-height: 1.6;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1000px; margin: 24px auto 60px; padding: 0 16px; }
.page-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.page-title { font-size: 22px; font-weight: 800; margin: 0; }
.page-sub { color: #64748b; font-size: 13px; margin: 0 0 16px; }

/* 언어 바꾸기 — 제목 줄 오른쪽 끝에 조용히 선다 */
.lang-switch {
  font-size: 12px; color: #64748b; text-decoration: none;
  border: 1px solid #dbe2ec; border-radius: 999px; padding: 2px 10px;
  background: #fff; white-space: nowrap;
}
.lang-switch:hover { color: #1e3a5f; border-color: #94a3b8; text-decoration: none; }

/* ── 상단 메뉴 — 두 게시판을 오간다 ─────────────────────────────
   통합 게시판(4제품) · 기본 게시판(Dee Editor + DEXT Image). 켜진 쪽은 파란 밑줄.
   모든 화면(목록·쓰기·보기) 맨 위에 같은 모양으로 선다 — 어느 게시판에 있는지 늘 보인다. */
.mode-nav {
  display: flex; align-items: stretch; gap: 4px;
  background: #fff; border: 1px solid #dfe6f3; border-radius: 12px;
  padding: 6px 8px; margin-bottom: 14px;
}
.mode-tab {
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  padding: 7px 16px; border-radius: 8px; text-decoration: none; color: #475569;
  border-bottom: 3px solid transparent; min-width: 0;
}
.mode-tab b { font-size: 14px; font-weight: 800; color: inherit; white-space: nowrap; }
.mode-tab small { font-size: 11px; color: #94a3b8; white-space: nowrap; letter-spacing: .01em; }
.mode-tab:hover { background: #f4f7ff; text-decoration: none; color: #1e3a5f; }
.mode-tab.on { color: #1e40af; background: #eef3ff; border-bottom-color: #2563eb; }
.mode-tab.on small { color: #3b5cb8; }
.mode-nav .spacer { flex: 1; }
.mode-nav .lang-switch { align-self: center; margin-right: 6px; }
.lite-note { margin: 12px 0 0; font-size: 12.5px; color: #475569; line-height: 1.55; }
@media (max-width: 720px) {
  .mode-tab small { display: none; }
}

/* ── 머리 카드 — 제목 · 소개 · 제품 타일 ──────────────────────
   흰 카드 위에 옅은 파란 결을 깔아 목록 카드와 구분한다. 타일(통합 다섯 · 기본 셋 — DEXT-OCR 은 엔진이
   있을 때만)은 몇 개든 한 줄에 같은 폭으로 서고, 좁은 화면에서는 둘씩 접힌다. */
.hero {
  background: linear-gradient(135deg, #ffffff 0%, #f4f7ff 100%);
  border: 1px solid #dfe6f3; border-radius: 12px;
  padding: 22px 24px 20px; margin-bottom: 16px;
}
.hero-top { display: flex; align-items: center; gap: 12px; }
.hero-heading { display: flex; align-items: baseline; gap: 10px; flex: 1; min-width: 0; }
.hero-tag {
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: #1e40af;
  background: #e8eefc; border: 1px solid #c7d7fb; border-radius: 999px; padding: 1px 9px;
  white-space: nowrap;
}

.prod-tiles {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: flex; gap: 10px;
}
.prod-tile {
  flex: 1 1 0;
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  background: #fff; border: 1px solid #e1e7f0; border-radius: 10px; padding: 12px 14px 11px;
}
.prod-tile.warn { border-color: #f0d38a; background: #fffcf3; }
.prod-tile.warn .prod-note { color: #8a5a00; font-weight: 600; }
.prod-logo { height: 20px; width: auto; max-width: 120px; object-fit: contain; object-position: left; margin-bottom: 4px; }
.prod-role { font-size: 13px; font-weight: 700; color: #0f172a; }
.prod-note { font-size: 11.5px; color: #64748b; line-height: 1.45; }

@media (max-width: 720px) {
  .hero { padding: 18px 16px 16px; }
  .prod-tiles { flex-wrap: wrap; }
  .prod-tile { flex: 1 1 calc(50% - 5px); }
}

.card { background: #fff; border: 1px solid #e1e7f0; border-radius: 8px; }
.card + .card { margin-top: 14px; }

/* 목록 */
table.board { width: 100%; border-collapse: collapse; background: #fff; font-size: 13.5px; }
table.board th, table.board td { padding: 10px 12px; border-bottom: 1px solid #eef2f7; text-align: left; }
table.board th { background: #f8fafc; color: #1e3a5f; font-weight: 700; font-size: 12.5px; }
table.board td.num, table.board th.num { text-align: center; width: 64px; color: #64748b; }
table.board td.mid, table.board th.mid { text-align: center; white-space: nowrap; }
table.board tr:last-child td { border-bottom: none; }
table.board tr:hover td { background: #f8fbff; }
/* 목록의 표식 — 첨부와 보안이 같은 모양이어야 같은 종류로 읽힌다.
 * 다른 것은 색뿐이고, 모양·크기·자리는 하나의 규칙으로 둔다. */
.mark {
  display: inline-flex; align-items: center; gap: 4px;
  height: 21px; padding: 0 9px;
  font-size: 11.5px; line-height: 1;
  border: 1px solid; border-radius: 999px;
  margin-left: 6px; white-space: nowrap; vertical-align: middle;
}
.mark b { font-weight: 700; }
/* 아이콘은 글자 흐름을 타지 않게 — 크기가 표식의 높이를 흔들면 안 된다 */
.mark-ico {
  width: 12px; height: 12px; flex: 0 0 12px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
/* 이름을 mark-- 로 갈라 둔다. 예전에는 .mark.attach 였는데, 첨부 영역 블록도
 * .attach 라서 그쪽의 padding: 14px 18px 이 표식에 얹혔다. 같은 무게(클래스 하나)라
 * 뒤에 적힌 것이 이겨, 표식만 세로로 부풀어 동그라미가 됐다. */
.mark--attach { background: #eff6ff; color: #1d4ed8; border-color: #c7d7fb; }
.mark--guard { background: #fff1f2; color: #b91c1c; border-color: #f6c9ce; }
.mark--notice { background: #fff7e6; color: #9a5b00; border-color: #f3d18e; font-weight: 700; }
/* 공지 줄 — 맨 위에 고정되는 줄이라는 것이 보이도록 바탕을 살짝 띄우고 제목을 굵게 */
tr.notice td { background: #fffdf7; }
tr.notice td a { font-weight: 700; color: #1e3a5f; }
/* 쓰기 화면의 체크 한 줄 */
label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #475569; cursor: pointer; }
label.check input { margin: 0; width: 15px; height: 15px; }
.empty { padding: 40px; text-align: center; color: #94a3b8; background: #fff; }

/* 검색·페이지 */
.toolbar { display: flex; gap: 8px; align-items: center; margin: 14px 0; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.pager { display: flex; gap: 4px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.pager a, .pager strong {
  min-width: 30px; text-align: center; padding: 4px 8px; border-radius: 5px;
  border: 1px solid #dbe2ec; background: #fff; font-size: 13px; font-weight: 500;
}
.pager strong { background: #2563eb; color: #fff; border-color: #2563eb; }

/* 입력 */
input[type=text], input[type=password], select {
  padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 5px;
  font-family: inherit; font-size: 13.5px;
}
input[type=text]:focus, select:focus { outline: 2px solid #bfd3fb; outline-offset: 0; }
.btn {
  padding: 7px 16px; border: 1px solid #1d4ed8; background: #2563eb; color: #fff;
  border-radius: 5px; cursor: pointer; font-size: 13.5px; font-weight: 700; font-family: inherit;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .25);
}
.btn:hover { background: #1d4ed8; }
.btn.ghost { background: #fff; color: #1e3a5f; border-color: #cbd5e1; font-weight: 500; }
.btn.ghost:hover { background: #f1f5f9; border-color: #94a3b8; }

/* ── 켜짐과 꺼짐이 한눈에 갈리도록 ─────────────────────────────
 * 흐리게만(opacity) 하면 색은 그대로 남아 '옅은 파랑' 이 된다. 옅어도 파랑은
 * 눌러도 되는 색이라, 꺼진 단추가 그저 멀리 있는 것처럼 보인다.
 * 그래서 꺼지면 색을 회색 쪽으로 아예 옮긴다 — 먼저 읽히는 것이 색이다. */
.btn:disabled,
.btn:disabled:hover {
  background: #eef1f5;
  border-color: #e3e8ef;
  color: #a3adbb;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 1;              /* 색으로 가르므로 흐리게 하지 않는다 */
}
.btn.danger { background: #fff; color: #b91c1c; border-color: #f2c2c2; font-weight: 500; }
.btn.sm { padding: 3px 10px; font-size: 12px; }

/* 폼 */
.form-row { display: flex; border-bottom: 1px dashed #e2e8f0; }
.form-row:last-of-type { border-bottom: none; }
.form-row .label {
  width: 120px; flex: 0 0 120px; background: #f8fafc; padding: 12px 14px;
  font-weight: 700; color: #1e3a5f; font-size: 13px; border-right: 1px dashed #e2e8f0;
}
.form-row .field { flex: 1; padding: 10px 14px; min-width: 0; }
.form-row .field .hint { color: #94a3b8; font-size: 12px; margin-left: 8px; }

/* 보기 */
.post-head { padding: 16px 18px; border-bottom: 1px solid #eef2f7; }
.post-title { font-size: 19px; font-weight: 800; margin: 0 0 6px; }
.post-meta { color: #64748b; font-size: 12.5px; display: flex; gap: 14px; flex-wrap: wrap; }
.post-body { padding: 20px 18px; min-height: 200px; }
.post-body img { max-width: 100%; height: auto; }
.post-body table { border-collapse: collapse; }
.post-body table td, .post-body table th { border: 1px solid #c0c4cc; padding: 6px 10px; }

/* 첨부 */
.attach { border-top: 1px solid #eef2f7; padding: 14px 18px; }
.attach h3 { font-size: 12.5px; color: #64748b; margin: 0 0 10px; font-weight: 700; }
.attach-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.attach-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border: 1px solid #e6ebf2; border-radius: 6px; background: #fbfcfe; min-width: 0;
}
.attach-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-item .size { color: #94a3b8; font-size: 12px; white-space: nowrap; }
.attach-actions { display: flex; gap: 6px; margin-top: 10px; align-items: center; flex-wrap: wrap; }

/* 알림 */
.notice {
  background: #f0f9ff; border-left: 4px solid #2563eb; padding: 10px 14px;
  font-size: 13px; color: #1e3a5f; border-radius: 0 4px 4px 0; margin-bottom: 14px;
}
.notice code { background: #fff; padding: 1px 5px; border-radius: 3px; color: #c026d3; font-size: 12px; }
.notice.warn { background: #fff8e6; border-left-color: #e5b74a; color: #6b4c00; }

dialog { border: 1px solid #cbd5e1; border-radius: 8px; padding: 20px 22px; min-width: 340px; }
dialog::backdrop { background: rgba(15, 23, 42, .45); }
dialog h3 { margin: 0 0 4px; font-size: 15px; }
dialog p.muted { margin: 0 0 14px; font-size: 12.5px; color: #64748b; }
dialog label { display: block; font-size: 13px; margin-bottom: 10px; }
dialog label input { width: 100%; margin-top: 4px; }
dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 10px 18px; border-radius: 6px;
  font-size: 13px; z-index: 9999; opacity: 0; transition: opacity .2s;
}
.toast.show { opacity: 1; }

/* ── 푸터 — 이 게시판이 쓰는 제품 ───────────────────────────── */
/* ── X5 목록 안의 칸 ─────────────────────────────────────────
 * [미리보기] 는 줄에서 유일하게 '누를 수 있는 것' 이라 채운 단추로 둔다.
 * 옅게 두면 파일 이름·크기 사이에 묻혀 눌러 볼 생각이 나지 않는다. */
.x5-cell-btn {
  padding: 3px 12px; border: 1px solid #1d4ed8; background: #2563eb; color: #fff;
  border-radius: 5px; cursor: pointer; font-size: 12px; font-weight: 600;
  font-family: inherit; line-height: 1.5; white-space: nowrap;
}
.x5-cell-btn:hover { background: #1d4ed8; }
/* 아직 안 올린 줄 — 있지만 지금은 누를 수 없다는 표시. 아래 단추의 꺼진 색과 같게 둔다 */
.x5-cell-btn.muted { border-color: #e3e8ef; background: #eef1f5; color: #a3adbb; cursor: not-allowed; }
.x5-cell-checkwrap {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 22px; cursor: pointer;
}
.x5-cell-check { width: 15px; height: 15px; cursor: pointer; accent-color: #2563eb; pointer-events: none; }
.x5-cell-none { color: #cbd5e1; }

/* 첨부 아래 단추 줄 — 맨 앞이 주된 일(선택 다운로드), 나머지는 곁들이 */
.attach-actions { align-items: center; }
.attach-hint { color: #94a3b8; font-size: 12px; white-space: nowrap; }
.attach-note { margin: 12px 0 0; color: #64748b; font-size: 12.5px; line-height: 1.7; }
.attach-note b { color: #334155; }

/* ── 기본 게시판의 첨부 — 배포형 데모 게시판(demo/view.html)의 목록을 따른다 ──
   쓰기 화면은 끌어다 놓는 자리(.basic-drop) 안에 같은 줄을 그린다. */
.basic-drop { border: 1.5px dashed #cbd5e1; border-radius: 8px; padding: 8px 10px; min-height: 64px; background: #fafcff; }
.basic-drop.is-over { border-color: #2563eb; background: #eef3ff; }
.basic-empty { margin: 8px 4px; color: #94a3b8; font-size: 12.5px; text-align: center; }
.basic-attach { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.basic-item {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 6px 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 13px;
}
.basic-item .ficon { flex: 0 0 auto; font-size: 15px; }
.basic-item .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1e3a5f; }
.basic-item.is-new .fname { color: #0f172a; }
.basic-item .fnew { flex: 0 0 auto; font-size: 10.5px; color: #1d4ed8; background: #dbeafe; border-radius: 8px; padding: 0 6px; }
.basic-item .fsize { flex: 0 0 auto; color: #94a3b8; font-size: 12px; white-space: nowrap; }
.basic-item .fpreview {
  flex: 0 0 auto; border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8;
  border-radius: 5px; padding: 2px 9px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.basic-item .fpreview:hover { background: #dbeafe; }
.basic-item .fremove {
  flex: 0 0 auto; border: 1px solid #e2e8f0; background: #fff; color: #94a3b8;
  border-radius: 5px; width: 24px; height: 24px; cursor: pointer; font-size: 12px; line-height: 1;
}
.basic-item .fremove:hover { color: #b91c1c; border-color: #f2c2c2; }
@media (max-width: 560px) { .basic-item .fsize { display: none; } }

@media (max-width: 720px) {
  .attach-hint { white-space: normal; }
}
