﻿/* ══════════════════════════════════════════
   bahEMR2 — 대시보드 스타일
   다크/라이트 테마 지원 / 의료 산업적 미니멀.
══════════════════════════════════════════ */

/* ── 다크 테마 (기본) ── */
:root[data-theme="dark"] {
  --bg:        #0d1117;
  --surface:   #161b22;
  --surface2:  #1c2128;
  --border:    #30363d;
  --border2:   #21262d;
  --primary:   #00c896;
  --primary-d: #009970;
  --primary-bg:rgba(0,200,150,.08);
  --text:      #e6edf3;
  --text2:     #c9d1d9;
  --muted:     #8b949e;
  --error:     #f85149;
  --warning:   #d29922;
  --success:   #3fb950;
  --info:      #58a6ff;
  --section-title:   #58a6ff;
  --section-body:    #3fb950;
  --section-attach:  #d29922;
  --section-comment: #c678dd;
}

/* ── 라이트 테마 ── */
:root[data-theme="light"] {
  --bg:        #ffffff;
  --surface:   #f6f8fa;
  --surface2:  #eaeef2;
  --border:    #d0d7de;
  --border2:   #e1e4e8;
  --primary:   #00a574;
  --primary-d: #008c61;
  --primary-bg:rgba(0,165,116,.08);
  --text:      #24292f;
  --text2:     #57606a;
  --muted:     #6e7781;
  --error:     #cf222e;
  --warning:   #bf8700;
  --success:   #1a7f37;
  --info:      #0969da;
  --section-title:   #0969da;
  --section-body:    #1a7f37;
  --section-attach:  #9a6700;
  --section-comment: #8250df;
}

:root {
  --sb-width:  240px;
  --top-h:     56px;
  --font:      'Noto Sans KR', sans-serif;
  --mono:      'DM Mono', monospace;
  --radius:    8px;
  --shadow:    0 8px 32px rgba(0,0,0,.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }

/* ════════════════════════════════
   사이드바
════════════════════════════════ */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sb-width);
  background: var(--surface);
  border-right: 1px solid var(--border2);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}

.sb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--top-h);
  border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}

.sb-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}
.sb-logo-icon { font-size: 16px; line-height: 1; background: var(--primary); color: var(--bg); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 6px; font-weight: 700; }
.sb-logo-text { font-size: 16px; font-weight: 300; letter-spacing: .04em; }
.sb-logo-text strong { font-weight: 700; color: var(--primary); }

.sb-close {
  display: none;
  background: none;
  border: none;
  color: var(--muted);
  padding: 4px;
}
.sb-close svg { width: 18px; height: 18px; }
.sb-close:hover { color: var(--text); }

/* 사이드바 네비 */
.sb-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sb-section { padding: 4px 8px; margin-bottom: 4px; }

.sb-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 8px 4px;
}

.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 13.5px;
  font-weight: 400;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.sb-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; }
.sb-item:hover { background: rgba(128,128,128,.1); color: var(--text); }
.sb-item:hover svg { opacity: 1; }
.sb-item.active { background: var(--primary-bg); color: var(--primary); font-weight: 500; }
.sb-item.active svg { opacity: 1; }
.sb-item--home svg { color: var(--primary); opacity: 1; }

.sb-item--add {
  color: var(--muted);
  border: 1px dashed var(--border);
  margin-top: 4px;
}
.sb-item--add:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-bg);
}

/* 스켈레톤 */
.sb-skeleton {
  height: 32px;
  background: linear-gradient(90deg, var(--border2) 25%, var(--border) 50%, var(--border2) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: var(--radius);
  margin: 4px 0;
}
@keyframes skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 사이드바 푸터 (테마 스위치) */
.sb-footer {
  border-top: 1px solid var(--border2);
  padding: 12px 14px;
  flex-shrink: 0;
}

.theme-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.theme-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.theme-toggle {
  position: relative;
  width: 52px;
  height: 26px;
  background: var(--border);
  border: none;
  border-radius: 13px;
  cursor: pointer;
  transition: background .25s;
  display: flex;
  align-items: center;
  padding: 0 3px;
}

.theme-toggle:hover {
  background: var(--border2);
}

.theme-icon {
  position: absolute;
  font-size: 14px;
  transition: opacity .2s, transform .2s;
}

.theme-icon-sun {
  left: 6px;
  opacity: 0;
  transform: scale(0.8);
}

.theme-icon-moon {
  right: 6px;
  opacity: 1;
  transform: scale(1);
}

[data-theme="light"] .theme-icon-sun {
  opacity: 1;
  transform: scale(1);
}

[data-theme="light"] .theme-icon-moon {
  opacity: 0;
  transform: scale(0.8);
}

/* 오버레이 */
.sb-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 199;
}

/* ════════════════════════════════
   메인 래퍼
════════════════════════════════ */
.main-wrap {
  margin-left: var(--sb-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .28s cubic-bezier(.4,0,.2,1);
}

/* 상단 헤더 */
.top-bar {
  position: sticky;
  top: 0;
  height: var(--top-h);
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}
.top-bar-left { display: flex; align-items: center; gap: 12px; }
.top-bar-right { display: flex; align-items: center; gap: 16px; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { opacity: .4; }
.breadcrumb .current { color: var(--text); font-weight: 500; }

.company-badge {
  font-size: 11px;
  font-family: var(--mono);
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid rgba(0,165,116,.25);
  border-radius: 20px;
  padding: 3px 10px;
}

/* 오른쪽 상단 사용자 프로필 */
.top-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--bg);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}

.top-user-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.top-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-user-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-user-role { 
  font-size: 11px; 
  color: var(--muted); 
  font-family: var(--mono); 
}

.top-logout {
  background: none;
  border: none;
  color: var(--muted);
  padding: 6px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  transition: background .15s, color .15s;
}
.top-logout svg { width: 15px; height: 15px; }
.top-logout:hover { color: var(--error); background: rgba(207,34,46,.1); }

/* 콘텐츠 영역 */
.content-area { 
  flex: 1; 
  padding: 24px; 
  width: 100%; 
  max-width: 100%;
  margin: 0 auto;
  overflow-x: hidden; 
}
.view { animation: fadeIn .25s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 페이지 헤더 */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header h1 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.page-header p  { font-size: 13px; color: var(--muted); margin-top: 3px; }
.page-actions   { display: flex; gap: 8px; flex-wrap: wrap; }

/* ════════════════════════════════
   버튼
════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); border: none; border-radius: var(--radius);
  color: var(--bg); font-size: 13px; font-weight: 600; padding: 8px 16px;
  cursor: pointer; transition: background .15s, transform .1s; white-space: nowrap;
}
.btn-primary:hover { background: var(--primary-d); }
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary svg { width: 14px; height: 14px; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text2); font-size: 13px; padding: 8px 14px;
  cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap;
}
.btn-secondary:hover { background: var(--border2); border-color: var(--muted); }
.btn-secondary svg { width: 14px; height: 14px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--muted); font-size: 13px; padding: 8px 14px;
  cursor: pointer; transition: all .15s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text2); }

.btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(207,34,46,.12); border: 1px solid rgba(207,34,46,.3);
  border-radius: var(--radius); color: var(--error); font-size: 13px;
  padding: 6px 12px; cursor: pointer; transition: background .15s;
}
.btn-danger:hover { background: rgba(207,34,46,.2); }
.btn-danger svg { width: 14px; height: 14px; }

.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ════════════════════════════════
   대시보드 통계 카드
════════════════════════════════ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; padding: 18px 20px; display: flex; gap: 14px; align-items: center; transition: border-color .15s; }
.stat-card:hover { border-color: var(--border); }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 20px; height: 20px; }
.si-blue   { background: rgba(88,166,255,.15); color: var(--info); }
.si-green  { background: rgba(63,185,80,.15);  color: var(--success); }
.si-purple { background: rgba(125,95,255,.15); color: #a78bfa; }
.si-orange { background: rgba(251,146,60,.15); color: #fb923c; }
.stat-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat-val   { font-size: 26px; font-weight: 700; font-family: var(--mono); }

/* 접수 상태 현황 */
.status-panel { background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; padding: 20px; margin-bottom: 24px; }
.status-panel h3 { font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.status-bars { display: flex; flex-direction: column; gap: 10px; }
.status-row  { display: flex; align-items: center; gap: 12px; }
.status-row-label { width: 72px; font-size: 12px; color: var(--muted); text-align: right; }
.status-bar-bg { flex: 1; height: 8px; background: var(--border2); border-radius: 4px; overflow: hidden; }
.status-bar-fill { height: 100%; border-radius: 4px; transition: width .6s ease; }
.status-bar-fill.s-submitted { background: var(--info); }
.status-bar-fill.s-reviewing { background: var(--warning); }
.status-bar-fill.s-accepted  { background: var(--success); }
.status-bar-fill.s-rejected  { background: var(--error); }
.status-row-count { width: 32px; font-size: 12px; font-family: var(--mono); color: var(--text2); }

/* ════════════════════════════════
   게시판 바로가기 (드래그 가능)
════════════════════════════════ */
.board-shortcuts-panel { 
  background: var(--surface); 
  border: 1px solid var(--border2); 
  border-radius: 10px; 
  overflow: hidden; 
  margin-bottom: 24px; 
}

.board-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  padding: 16px;
}

.board-shortcut {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.board-shortcut:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
  transform: translateY(-2px);
}

.board-shortcut.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.board-shortcut-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.board-shortcut-info {
  flex: 1;
  min-width: 0;
}

.board-shortcut-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-shortcut-count {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
}

/* ════════════════════════════════
   최근 게시글 패널
════════════════════════════════ */
.recent-panel { background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; overflow: hidden; margin-bottom: 24px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border2); }
.panel-header h3 { font-size: 14px; font-weight: 600; }
.recent-list { max-height: 400px; overflow-y: auto; }
.recent-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border2); cursor: pointer; transition: background .15s; }
.recent-row:last-child { border-bottom: none; }
.recent-row:hover { background: rgba(128,128,128,.05); }
.recent-row-board { font-size: 11px; font-family: var(--mono); color: var(--muted); background: var(--border2); border-radius: 4px; padding: 2px 7px; white-space: nowrap; }
.recent-row-title { flex: 1; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-row-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.loading-row { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* ════════════════════════════════
   필터 바
════════════════════════════════ */
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.search-input { flex: 1; min-width: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 13px; padding: 8px 14px; outline: none; transition: border-color .2s; }
.search-input:focus { border-color: var(--primary); }
.search-input::placeholder { color: var(--muted); }
.filter-select { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 13px; padding: 8px 12px; outline: none; cursor: pointer; }
.filter-select option { background: var(--surface); }

/* ════════════════════════════════
   게시글 테이블
════════════════════════════════ */
.table-wrap { background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.post-table { width: 100%; border-collapse: collapse; }
.post-table th { padding: 11px 16px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface2); border-bottom: 1px solid var(--border2); text-align: left; white-space: nowrap; }
.post-table td { padding: 12px 16px; border-bottom: 1px solid var(--border2); font-size: 13.5px; vertical-align: middle; }
.post-table tbody tr:last-child td { border-bottom: none; }
.post-table tbody tr { cursor: pointer; transition: background .12s; }
.post-table tbody tr:hover { background: rgba(128,128,128,.03); }
.col-num    { width: 5%; min-width: 50px; }
.col-title  { width: 40%; }
.col-status { width: 12%; min-width: 80px; }
.col-author { width: 18%; min-width: 90px; }
.col-company{ width: 15%; min-width: 80px; }
.col-date   { width: 10%; min-width: 80px; white-space: nowrap; }
.td-num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.td-title { display: flex; align-items: center; gap: 8px; }
.td-title-text { font-weight: 500; }
.td-pinned { color: var(--primary); font-size: 12px; }
.td-meta { display: flex; gap: 6px; align-items: center; margin-top: 3px; }
.td-cmt  { font-size: 11px; color: var(--muted); }
.td-att  { font-size: 11px; color: var(--muted); }
.td-date { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.empty-td { padding: 40px; text-align: center; color: var(--muted); }

/* 상태 배지 */
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; border-radius: 20px; padding: 2px 9px; white-space: nowrap; }
.badge-submitted { background: rgba(88,166,255,.12); color: var(--info); }
.badge-reviewing { background: rgba(210,153,34,.12);  color: var(--warning); }
.badge-accepted  { background: rgba(63,185,80,.12);   color: var(--success); }
.badge-rejected  { background: rgba(207,34,46,.12);   color: var(--error); }
.badge-notice    { background: rgba(0,165,116,.1);    color: var(--primary); }
.badge-general   { background: var(--border2);         color: var(--muted); }

/* ════════════════════════════════
   페이지네이션
════════════════════════════════ */
.pagination { display: flex; justify-content: center; align-items: center; gap: 4px; margin-bottom: 24px; }
.page-btn { min-width: 32px; height: 32px; padding: 0 8px; background: var(--surface); border: 1px solid var(--border2); border-radius: 6px; color: var(--muted); font-size: 13px; font-family: var(--mono); cursor: pointer; transition: all .15s; display: flex; align-items: center; justify-content: center; }
.page-btn:hover   { border-color: var(--primary); color: var(--primary); }
.page-btn.active  { background: var(--primary); border-color: var(--primary); color: var(--bg); font-weight: 700; }
.page-btn:disabled{ opacity: .3; cursor: not-allowed; }

/* ════════════════════════════════
   게시글 상세 (반응형 전체화면)
════════════════════════════════ */
.post-detail { 
  max-width: 100%; 
  width: 100%;
}
.section-card {
  border: 1px solid var(--border2);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 18px;
}
.section-title { border-left-color: var(--section-title); }
.section-body { border-left-color: var(--section-body); }
.section-attach { border-left-color: var(--section-attach); }
.section-comment { border-left-color: var(--section-comment); }
.section-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.section-chip-title {
  color: var(--section-title);
  background: var(--primary-bg);
  border: 1px solid var(--border);
}

.post-header { border-bottom: 1px solid var(--border2); padding-bottom: 20px; margin-bottom: 24px; }
.post-title  { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.4; margin-bottom: 12px; }
.post-meta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.post-meta-item { display: flex; align-items: center; gap: 5px; }
.post-meta-item svg { width: 13px; height: 13px; }
.post-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.post-actions-bottom { margin-top: 0; margin-bottom: 4px; }

/* 접수 정보 박스 */
.reception-box {
  background: var(--surface2); border: 1px solid var(--border);
  border-left: 3px solid var(--primary); border-radius: 0 10px 10px 0;
  padding: 20px; margin-bottom: 24px;
}
.reception-box h3 { font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.reception-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.rg-item { display: flex; flex-direction: column; gap: 3px; }
.rg-label { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rg-value { font-size: 13.5px; color: var(--text); }
.rg-value:empty::after { content: '—'; color: var(--muted); }

/* 게시글 본문 */
.post-read-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.read-group { margin: 0; }
.read-group > label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.read-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13.5px;
  padding: 10px 13px;
}
.post-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 180px;
}

/* 상태 변경 바 */
.status-change-bar { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status-change-bar label { font-size: 12px; color: var(--muted); font-weight: 500; }
.status-select, .assign-select { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 13px; padding: 6px 10px; outline: none; cursor: pointer; }

/* 첨부파일 */
.attach-section { margin-bottom: 0; }
.attach-list { display: flex; flex-direction: column; gap: 6px; }
.attach-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius); transition: border-color .15s; }
.attach-item:hover { border-color: var(--border); }
.attach-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius); cursor: pointer; flex-shrink: 0; }
.attach-icon  { font-size: 18px; flex-shrink: 0; }
.attach-info  { flex: 1; min-width: 0; }
.attach-name  { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-size  { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.attach-dl { background: none; border: none; cursor: pointer; color: var(--primary); font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 5px; border: 1px solid rgba(0,165,116,.3); transition: background .15s; white-space: nowrap; }
.attach-dl:hover { background: var(--primary-bg); }
.attach-del { background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 4px; }
.attach-del:hover { color: var(--error); }
.attach-del svg { width: 14px; height: 14px; }

/* 상태 이력 */
.history-section { margin-bottom: 28px; }
.history-section h4 { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.history-list { display: flex; flex-direction: column; }
.history-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border2); font-size: 12.5px; }
.history-item:last-child { border-bottom: none; }
.history-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); margin-top: 5px; flex-shrink: 0; }
.history-dot.hd-accepted  { background: var(--success); }
.history-dot.hd-submitted { background: var(--info); }
.history-dot.hd-reviewing { background: var(--warning); }
.history-dot.hd-rejected  { background: var(--error); }
.history-text { flex: 1; color: var(--text2); }
.history-text strong { color: var(--text); }
.history-time { color: var(--muted); font-family: var(--mono); white-space: nowrap; }

/* 댓글 (반응형 전체화면) */
.comment-section { margin-bottom: 0; }
.comment-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.comment-item { background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius); padding: 14px 16px; }
.comment-item.is-reply { margin-left: 28px; border-left: 2px solid var(--primary); background: rgba(0,165,116,.03); }
.comment-item.is-deleted { opacity: .5; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.comment-author { font-size: 12px; font-weight: 600; }
.comment-role   { font-size: 10px; font-family: var(--mono); color: var(--muted); background: var(--border2); border-radius: 3px; padding: 1px 6px; }
.comment-time   { font-size: 11px; color: var(--muted); font-family: var(--mono); margin-left: auto; }
.comment-body   { font-size: 13.5px; color: var(--text2); line-height: 1.6; white-space: pre-wrap; }
.comment-actions { display: flex; gap: 8px; margin-top: 8px; }
.comment-btn { background: none; border: none; cursor: pointer; font-size: 11px; color: var(--muted); padding: 2px 6px; border-radius: 4px; transition: background .15s, color .15s; }
.comment-btn:hover { background: var(--border2); color: var(--text); }
.comment-btn.danger:hover { color: var(--error); }

/* 댓글 첨부파일 삭제 버튼 */
.comment-att-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s, background .15s;
  line-height: 1;
}
.comment-attachments > div:hover .comment-att-del {
  opacity: 1;
}
.comment-att-del:hover {
  background: var(--error);
}

/* 댓글 폼 (통합 드래그앤드롭 + 클릭) */
.comment-form { 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
  width: 100%;
}
.comment-composer{
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.comment-input { 
  width: 100%; 
  background: var(--surface); 
  border: none;
  color: var(--text); 
  font-size: 13.5px; 
  padding: 12px 14px; 
  resize: vertical; 
  min-height: 110px; 
  outline: none; 
  transition: border-color .2s; 
}
.comment-input:focus { box-shadow: inset 0 0 0 1px var(--primary); }
.comment-composer-meta{
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  padding: 0 12px 8px;
}
.comment-composer-footer{
  border-top: 1px solid var(--border2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: var(--surface2);
}
.comment-tools{ display:flex; align-items:center; gap:8px; }
.comment-tool-btn{
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.comment-tool-btn:hover{ background: var(--border2); color: var(--text); }
.comment-tool-btn input{ margin-right: 4px; }
.comment-submit-wrap{ display:flex; align-items:center; }

/* 댓글 첨부파일 드롭 영역 */
.comment-drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-top: 1px dashed var(--border);
  transition: all .2s;
  cursor: pointer;
}
.comment-drop-zone:hover,
.comment-drop-zone.dragover {
  background: var(--primary-bg);
  border-color: var(--primary);
}

#openCommentComposerBtn { align-self: flex-start; margin-bottom: 8px; }

/* 통합 파일 드롭존 */
.file-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--surface2);
}

.file-dropzone:hover,
.file-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.file-dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.file-dropzone-icon {
  font-size: 32px;
  opacity: 0.5;
}

.file-dropzone strong {
  color: var(--primary);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.file-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
}

.file-list-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-list-item-remove {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  padding: 2px;
  display: flex;
}

/* 이미지 썸네일 미리보기 */
.file-list-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s, box-shadow .15s;
}
.file-list-thumb:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.file-list-item--image {
  padding: 6px 10px;
}

.comment-form-footer { 
  display: flex; 
  justify-content: flex-end; 
  gap: 8px; 
}

/* ════════════════════════════════
   글쓰기 뷰 (반응형 전체화면)
════════════════════════════════ */
.write-wrap { 
  max-width: 100%; 
  width: 100%;
}
.write-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.form-group input, .form-group select, .form-group textarea { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 13.5px; padding: 10px 13px; outline: none; transition: border-color .2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,165,116,.08); }
.form-group textarea { min-height: 200px; resize: vertical; line-height: 1.7; }
.form-group select option { background: var(--surface); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.reception-form-box { background: var(--surface2); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: 0 var(--radius) var(--radius) 0; padding: 20px; }
.reception-form-box h3 { font-size: 13px; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.file-input-hidden { display: none; }
.write-footer { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border2); }

/* ════════════════════════════════
   관리 테이블
════════════════════════════════ */
.mgmt-table-wrap { background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; overflow: auto; }
.mgmt-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.mgmt-table th { padding: 10px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface2); border-bottom: 1px solid var(--border2); text-align: left; white-space: nowrap; }
.mgmt-table td { padding: 10px 14px; border-bottom: 1px solid var(--border2); font-size: 13px; }
.mgmt-table tbody tr:last-child td { border-bottom: none; }
.mgmt-table tbody tr:hover { background: rgba(128,128,128,.02); }

/* ════════════════════════════════
   모달
════════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  padding: 16px;
  animation: fadeIn .15s ease;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%; max-width: 520px;
  box-shadow: var(--shadow);
  animation: modalIn .2s cubic-bezier(.16,1,.3,1);
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes modalIn {
  from { transform: scale(.95); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border2); }
.modal-header h2 { font-size: 16px; font-weight: 600; }
.modal-x { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 4px; border-radius: 6px; }
.modal-x:hover { color: var(--text); background: var(--border2); }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border2); }

.mf-group { display: flex; flex-direction: column; gap: 6px; }
.mf-group label { font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.mf-group input, .mf-group select, .mf-group textarea { background: var(--bg); border: 1px solid var(--border); border-radius: 7px; color: var(--text); font-size: 13.5px; padding: 9px 12px; outline: none; transition: border-color .2s; }
.mf-group input:focus, .mf-group select:focus, .mf-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,165,116,.1); }
.mf-group select option { background: var(--surface); }
.mf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.req { color: var(--error); }

/* ════════════════════════════════
   프로필 편집 모달
════════════════════════════════ */
.modal--profile { max-width: 460px; }

.profile-image-section {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 10px;
}

.profile-image-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
}
.profile-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pf-image-placeholder {
  font-size: 28px;
  font-weight: 700;
  color: var(--bg);
  line-height: 1;
}

.profile-image-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ════════════════════════════════
   토스트
════════════════════════════════ */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; font-size: 13px; box-shadow: var(--shadow); min-width: 220px; max-width: 360px; pointer-events: all; animation: toastIn .25s cubic-bezier(.16,1,.3,1); display: flex; align-items: center; gap: 10px; }
@keyframes toastIn {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-error   { border-left: 3px solid var(--error); }
.toast.toast-info    { border-left: 3px solid var(--info); }
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-out  { animation: toastOut .2s ease forwards; }
@keyframes toastOut { to { transform: translateX(40px); opacity: 0; } }

/* ════════════════════════════════
   기타 유틸
════════════════════════════════ */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--muted); gap: 10px; text-align: center; }
.empty-state svg { width: 40px; height: 40px; opacity: .3; }
.empty-state p { font-size: 14px; }

.attachment-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.attachment-thumb   { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.attachment-file    { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--surface2); border-radius: var(--radius); font-size: 13px; color: var(--text2); }

.image-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.image-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.8); }
.image-modal-content { position: relative; max-width: 90vw; max-height: 90vh; }
.image-modal-content img { max-width: 100%; max-height: 100%; border-radius: var(--radius); }
.image-modal-close { position: absolute; top: -40px; right: 0; background: rgba(0,0,0,.5); border: none; color: white; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 16px; }

/* ════════════════════════════════
   Quill Editor 
════════════════════════════════ */
.ql-toolbar.ql-snow {
  border: 1px solid var(--border) !important;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  background: var(--surface2);
}
.ql-container.ql-snow {
  border: 1px solid var(--border) !important;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  min-height: 250px;
}
.ql-editor { min-height: 250px; }
.ql-editor img { max-width: 100%; height: auto; display: block; margin: 10px 0; border-radius: 4px; }
.ql-toolbar.ql-snow .ql-stroke { stroke: var(--text); }
.ql-toolbar.ql-snow .ql-fill { fill: var(--text); }
.ql-toolbar.ql-snow .ql-picker { color: var(--text); }

/* post-body rendering containing Quill HTML */
.post-body { white-space: pre-wrap; }
.post-body img { max-width: 100%; border-radius: 4px; display: block; margin: 16px 0; }
.post-body p { margin-bottom: 8px; }

/* ════════════════════════════════
   반응형
════════════════════════════════ */
@media (max-width: 1024px) {
  .col-company { display: none !important; }
  .top-user-info { display: none; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sb-close   { display: flex; }
  .sb-overlay.show { display: block; }
  .hamburger  { display: flex; }
  .main-wrap  { margin-left: 0; }
  .content-area { padding: 16px; }
  .stat-grid  { grid-template-columns: 1fr 1fr; }
  .form-grid  { grid-template-columns: 1fr; }
  .mf-row     { grid-template-columns: 1fr; }
  .board-shortcuts { grid-template-columns: 1fr; }

  .table-wrap { border: none; background: transparent; overflow-x: auto; }
  .post-table { display: block; }
  .post-table thead { display: none; }
  .post-table tbody { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .post-table tbody tr { display: grid; grid-template-columns: 1fr; padding: 16px; background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius); border-bottom: none; gap: 12px; cursor: pointer; transition: background .12s, border-color .12s; }
  .post-table tbody tr:hover { background: var(--surface2); border-color: var(--border); }
  .post-table td { padding: 0; border: none; border-bottom: none; }
  .post-table td::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: 11px; display: block; margin-bottom: 4px; text-transform: uppercase; }
  .post-table .td-num { font-size: 14px; color: var(--text); }
  .post-table .td-title { flex-direction: column; gap: 8px; }
  .post-table .td-title-text { font-size: 15px; }
  .post-table .td-meta { flex-wrap: wrap; }

  .profile-image-section { flex-direction: column; align-items: flex-start; }
  
  /* 반응형 댓글 */
  .comment-item.is-reply { margin-left: 12px; }
}

@media (max-width: 480px) {
  .post-table tbody tr { padding: 14px; }
  .post-table .td-title-text { font-size: 14px; }
  .stat-grid { grid-template-columns: 1fr; }
  .top-user-avatar { width: 32px; height: 32px; font-size: 12px; }
}

/* ════════════════════════════════
   듀얼 뷰 모드
════════════════════════════════ */
@media (max-width: 900px) {
  #boardListsContainer {
    grid-template-columns: 1fr !important;
  }
}

/* 게시글 상세 모달 (듀얼 뷰용) */
#modalPostView .modal {
  width: 800px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}

#modalPostView .modal-body {
  padding: 0;
}

#modalPostContent {
  border: none;
  padding: 20px;
}

/* 실시간 접속자 패널 */
.active-users-panel {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
}


/* ???????????????????????????????????????????????
   ���� ���� (Premium Style)
   ����: �����λ꺴�� ������ ���̾ƿ�
??????????????????????????????????????????????? */
.portal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 60px;
}

/* ����� ���� */
.portal-hero {
  position: relative;
  height: 480px;
  background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
  border-radius: 20px;
  margin-bottom: -40px;
  display: flex;
  align-items: center;
  padding: 0 60px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.portal-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?auto=format&fit=crop&q=80&w=1200') center/cover;
  opacity: 0.2;
  mix-blend-mode: overlay;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  color: white;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
}

.hero-btns {
  display: flex;
  gap: 12px;
}

.btn-portal-primary {
  background: #fff;
  color: #1a237e;
  border: none;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-portal-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.btn-portal-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-portal-outline:hover {
  background: rgba(255,255,255,0.1);
}

/* �� ������̼� */
.portal-quick-nav {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 0 40px;
}

.quick-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.quick-item:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.quick-icon {
  font-size: 32px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.quick-item span {
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
}

/* �Խ��� �׸��� */
.portal-boards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.portal-board-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.pb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border2);
}

.pb-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.pb-header a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.pb-header a:hover {
  color: var(--primary);
}

.pb-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pb-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
}

.pb-item:hover .pb-title {
  color: var(--primary);
}

.pb-title {
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 12px;
}

.pb-date {
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}

.pb-list .loading {
  text-align: center;
  color: var(--muted);
  padding: 20px 0;
  font-size: 13px;
}

/* ������ �ٷΰ��� ��Ÿ�� */
.top-admin-link {
  transition: all 0.2s;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--surface2);
}

.top-admin-link:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

/* ����Ʈ ��� ���� */
[data-theme="light"] .portal-hero {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

@media (max-width: 992px) {
  .portal-hero { height: 360px; padding: 0 30px; }
  .hero-title { font-size: 32px; }
  .portal-boards-grid { grid-template-columns: 1fr; }
  .portal-quick-nav { grid-template-columns: 1fr 1fr; }
}

/* ���� �ϴ� ���� �� �� ��Ÿ�� */
.portal-content-bottom {
  margin-top: 40px;
  padding: 0 40px;
}

.portal-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  overflow-x: auto;
}

.tab-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* === Responsive Overrides === */
.portal-boards-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
}



/* Ensure main content is responsive */
.content-area {
  max-width: 100%;
  padding: 16px 24px;
}

@media (max-width: 768px) {
  .portal-boards-grid {
    grid-template-columns: 1fr !important;
  }
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  padding: 16px 0;
}
.page-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.page-btn:hover:not(:disabled) {
  background: var(--border);
}
.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* === Height Reductions for Board Lists === */
.post-table td {
  padding: 6px 12px !important;
}
.post-table th {
  padding: 6px 12px !important;
}

@media (max-width: 768px) {
  .post-table tbody tr {
    padding: 8px 12px !important;
    gap: 4px !important;
  }
  .post-table td::before {
    margin-bottom: 2px !important;
  }
}
