/*
=====================================================
 (manual_board_style.css)
=====================================================
*/

/* --- 0. 기본 레이아웃 및 폰트 --- */
html {
	font-size: 16px;
}
body {
    font-size: 0.9rem;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4; /* 페이지 배경색 */
}
#gnbwrap {
    
}
.logo {
	display: flex;
	align-items: center;
}

#gnb {
	width: 100%;
    padding-left: 0;
    list-style: none;
    display: flex;
    justify-content: space-around;
    gap: 20px;
    border-bottom: 1px solid #2a6ec8;
}

#gnb li {
    margin: 0;
    padding: 0;
    flex: 1;
    text-align: center;
}

#gnb li a {
    display: block;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    color: #333; /* 기본 글자색 */
    text-decoration: none;
    background-color: #f0f0f0; /* 기본 배경색 */
    border-radius: 6px 6px 0 0; /* 위쪽 모서리만 둥글게 (탭 모양) */
    transition: background-color 0.2s, color 0.2s;
    user-select: none;
}

/* 마우스 올렸을 때 */
#gnb li a:hover {
    background-color: #e0e0e0;
    color: #000;
}

/* 현재 활성화된 메뉴 (active 클래스) */
#gnb li a.active {
    background-color: #2a6ec8; /* 활성 메뉴 배경색 (기존 색상 재활용) */
    color: #ffffff; /* 활성 메뉴 글자색 */
}
#wrapper {
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    position: relative; /* z-index 컨텍스트용 */
    max-width: 1300px;
}

#header {
    position: relative;
    z-index: 10;
}
#contents_wrap {
    display: flex;
    position: relative; /* z-index 컨텍스트용 */
}
.board-layout-container {
    display: flex;
    margin-top: 10px;
}
.list-area {
	margin-top: 10px;
    flex: 1 1 auto; /* 남은 공간 모두 차지 */
    min-width: 0; /* flex item이 넘칠 경우 대비 */
}
#contents {
    float: none;
    width: 100%;
}
h1, h2, h3, p {
    margin: 0;
    padding: 0;
}
a {
    color: #333;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
table {
    border-collapse: collapse;
    width: 100%;
}
.btn {
    padding: 7px 14px;
    background-color: #2a6ec8;
    color: #fff !important; /* (a 태그 스타일 오버라이드) */
    border: 1px solid #2a6ec8;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}
.btn:hover {
    background-color: #286090;
    text-decoration: none;
    color: #fff !important;
}
.select, .line {
    padding: 5px;
    border: 1px solid #ccc;
    font-size: 13px;
    vertical-align: middle;
}
#header .line {
    padding: 5px 10px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #2a6ec8;
    background-color: #ffffff;
    border: 1px solid #2a6ec8;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

#header .line:hover {
    background-color: #2a6ec8;
    color: #ffffff;
}

input[type="submit"] {
    padding: 5px 10px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    cursor: pointer;
}


/* top_menu.php */
.gnb-link {
	display: flex;
    align-items: center;
}
.go-home {
	margin-left: 10px;
  	color: #2563eb;
  	font-weight: 600;
  	cursor: pointer;
  	text-decoration: underline;
}
.go-home:hover {
  	color: #1e40af;
}
.log {
	display: flex;
	justify-content: space-between;
	margin-bottom: 15px;
}
.log_2 {
	display: flex;
	align-items: center
}

#write-button-container {
	display: flex;
    justify-content: end;
    margin-top: 20px;
}

/* --- 1. 페이지네이션 --- */
.pagination-container {
    margin-top: 15px;
}


/* 왼쪽 메뉴 */
#leftmenu {
    float: none; /* 기존 float 해제 */
    margin-right: 20px;
    margin-top: 39px;
    white-space: nowrap;   /* 줄바꿈 없음 */
  	flex-grow: 0;          /* 남는 공간 있어도 안 늘어남 */
  	flex-shrink: 0;        /* 공간 부족해도 안 줄어듦 */
  	flex-basis: 200px;      /* 콘텐츠(텍스트) 크기 기준으로 폭 결정 */
}
#leftmenu .left_wrap {
    border: 1px solid #ddd;
    border-top: 1px solid black;
}
#leftmenu h1 {
    padding: 10px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #ddd;
}
#leftmenu h1 img {
    max-width: 100%;
    height: auto;
}
#leftmenu .loading-text {
    padding: 20px;
    color: #888;
    text-align: center;
    font-size: 14px;
}
#leftmenu .left_submenu {
    list-style: none;
    margin: 0;
    padding: 0;
}
#leftmenu .left_submenu .comm1 {
    list-style: none;
    margin: 0;
    padding: 0;
}
#leftmenu .left_submenu .comm1 > li {
    list-style: none;
}

/* 게시판 이름 (예: 교육연수보고서) */
#leftmenu .left_submenu .comm1 > li > a.board-menu-item {
    display: block;
    font-weight: bold;
    color: #333;
    background-color: #f9f9f9;
    padding: 14px 12px;
    border-bottom: 1px solid #e9e9e9;
    text-decoration: none;
}
#leftmenu .left_submenu .comm1 > li > a.board-menu-item:hover {
    background-color: #f0f0f0;
}
#leftmenu .left_submenu .comm1 > li > a.board-menu-item.active {
    background-color: #2a6ec8;
    color: #ffffff;
}

/* 팀 메뉴 (comm2) */
#leftmenu .left_submenu .comm2 {
    display: block; /* (항상 보이도록) */
    background-color: #ffffff;
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e9e9e9;
}
#leftmenu .left_submenu .comm2 li {
    list-style: none;
}
#leftmenu .left_submenu .comm2 li a {
    display: block;
    padding: 10px 12px 10px 22px; /* 들여쓰기 */
    font-weight: normal;
    font-size: 13px;
    border-bottom: 1px dotted #f0f0f0;
    text-decoration: none;
}
#leftmenu .left_submenu .comm2 li a:hover {
    background-color: #f9f9f9;
}
#leftmenu .left_submenu .comm2 li.m_cl a {
    /* 현재 선택된 팀 */
    font-weight: bold;
    color: #d9534f;
    background-color: #fef9f9;
}
#leftmenu .left_submenu .comm2 li a.dept-title {
    font-weight: bold; 
    background-color: #fafafa;
    padding-left: 15px;
}
#leftmenu .left_submenu .comm2 li a.dept-title:hover {
    background-color: #fafafa;
}
/* LNB 메뉴 토글 스타일
/* 부서명 (클릭 트리거) */
.dept-title {
    position: relative;
    /* 기존 'comm1 > li > a' 스타일이 있다면 상속받음 */
    /* 아이콘을 위한 왼쪽 여백 확보 */
    padding-left: 20px !important; 
    cursor: pointer;
    transition: color 0.2s;
}

/* 토글 아이콘 (기본: 닫힘 ▷) */
.dept-title::before {
    content: '▷';
    position: absolute;
    left: 5px; /* 왼쪽 여백 */
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7em; /* 아이콘 크기 */
    color: #555;
    transition: transform 0.2s ease; /* 부드러운 회전 효과 */
}

/* 열렸을 때 (active 클래스): (열림 ▽) */
.dept-title.active::before {
    transform: translateY(-50%) rotate(90deg);
    color: #2a6ec8;
}
.dept-title.active {
    color: #2a6ec8;
    font-weight: bold;
}

/* 팀 목록 (토글 대상) */
ul.comm3 {
    padding: 0;
    margin: 0;
}

/* comm3 안의 팀 링크 (들여쓰기) */
ul.comm3 li a {
    /* 기존 스타일보다 한 단계 더 들어갔음을 표시 */
    padding-left: 25px !important; 
}

/* comm3 안의 활성 팀(m_cl) 링크 */
ul.comm3 li.m_cl a {
    font-weight: bold;
    color: #2a6ec8;
}
/* 팀 목록 (comm3) */
#leftmenu .left_submenu .comm3 {
    list-style: none;
    margin: 0;
    padding: 0;
}
#leftmenu .left_submenu .comm3 li a {
    padding-left: 30px; /* 한번 더 들여쓰기 */
    font-size: 13px;
    color: #444;
}


/* 컨텐츠 */
#contents h2 {
    font-size: 1.5rem;
    color: #222;
    margin-top: 10px;
}
.filter-search-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9f9f9;
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid #eee;
}
.filter-search-box .find {
    margin: 0;
    padding: 0;
}
.filter-search-box .find fieldset {
    border: none;
    padding: 0;
    margin: 0;
}
.filter-search-box .find legend {
    display: none; /* '리스트내 검색' 텍스트 숨기기 */
}

/* 검색 폼 내부 (Flexbox) */
#search-form {
    display: flex;
    gap: 5px; /* 요소간 간격 */
    align-items: center;
}

/* 필터(연/월)와 검색(select, input) 공통 스타일 */
#filter-container select,
#search-select,
#term1 {
    height: 36px;
    padding: 0 10px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    vertical-align: middle;
    background-color: #fff;
    transition: border-color 0.2s;
    margin-right: 5px;
}
/*#filter-container select:focus,
#search-select:focus,
#term1:focus {
    border-color: #2a6ec8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(42, 110, 200, 0.2);
}*/

/* 검색어 입력창 */
#term1 {
    width: 200px; /* 검색창 너비 (조절 가능) */
    margin-right: 0; /* 검색창 다음엔 버튼이 오므로 간격 제거 */
}

/* 검색 버튼 스타일 */
#search-form input[type="submit"] {
    height: 36px;
    padding: 0 18px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
    background-color: #555;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    line-height: normal;
}

#search-form input[type="submit"]:hover {
    background-color: #666;
}


.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.list-header p {
    font-size: 0.9rem;
    color: #555;
}
#board-container .loading-text,
#board-tbody .loading-text {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* 테이블 헤더 */
#board-thead tr {
    background-color: #f8f8f8;
    border-top: 2px solid #333;
    border-bottom: 1px solid #ddd;
}
#board-thead th {
    padding: 12px 5px;
    font-size: 0.8rem;
    color: #333;
    text-align: center;
}

/* 테이블 바디 */
#board-tbody tr {
    border-bottom: 1px solid #f0f0f0;
}
#board-tbody tr:hover {
    background-color: #f9f9f9;
}
#board-tbody td {
    padding: 12px 5px;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    vertical-align: middle;
}
#board-tbody td.con {
    text-align: left;
    padding-left: 10px;
}
#board-tbody td.con a {
    color: #333;
    text-decoration: none;
}
#board-tbody td.con a:hover {
    text-decoration: underline;
}

/* 공지사항 행 스타일 */
#board-tbody tr.tr-notice {
    background-color: #fffaf0;
}
#board-tbody tr.tr-notice td {
    color: #444;
}
#board-tbody tr.tr-notice td:nth-child(1) { /* 공지 */
    color: #d9534f;
    font-weight: bold;
}
.tr-notice:hover {
    background-color: #fff5e6 !important; /* 마우스 올리면 진한 파란색 배경 */
}

/* 비밀글 스타일 */
.icon-secret {
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
    font-style: normal;
    color: #a94442;
}

/* 파일 아이콘 */
.file-icon {
    font-size: 1.2em;
    line-height: 1;
    display: inline-block;
    color: #888;
    margin: 0 2px;
}
.file-icon.active {
    color: #2a6ec8;
}

/* 클릭 가능한 행에 마우스 커서 변경 */
.clickable-row {
    cursor: pointer;
}

/* 클릭 가능한 행에 마우스 호버 시 배경색 변경 */
.clickable-row:hover {
    background-color: #f5f5f5;
}

/* 제목 셀 스타일 (기존 <a> 태그와 유사하게) */
.subject-cell {
    color: #333;
}

/* 행 호버 시 제목 셀 스타일 변경 (링크처럼 보이게) */
.clickable-row:hover .subject-cell {
    color: #2a6ec8;
}

/* 파일 아이콘 래퍼 (기준점) */
.file-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

/* 파일 아이콘 버튼 스타일 */
.file-icon-btn {
    cursor: pointer;
    font-size: 1.2em;
    border: none;
    background: none;
}
.file-icon-btn:hover {
    transform: scale(1.1);
}

/* 드롭다운 메뉴 (평소엔 숨김) */
.file-dropdown-menu {
    display: none; /* 기본 숨김 */
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 5px 0;
    z-index: 1000;
    min-width: 160px;
    text-align: left;
}

/* 말풍선 꼬리 (선택사항) */
.file-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
}

/* 파일 링크 스타일 */
.file-dropdown-menu a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
}

.file-dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: #007bff;
}

/* 활성화 클래스 */
.file-dropdown-wrapper.active .file-dropdown-menu {
    display: block;
}


/* ======================================= */
/* 3. 상세보기 페이지 (manual_view.php) 스타일
/* ======================================= */

/* 스크린 리더 전용 (화면에는 안 보임) */
.blind {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 상세보기 테이블 레이아웃 */
.view_table {
    border-top: 1px solid #333; /* 목록 테이블과 구분 */
}

.view_table th,
.view_table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
}

.view_table th {
    background-color: #f9f9f9;
    width: 15%;
    font-weight: bold;
    color: #333;
}

.view_table td {
    width: 35%;
    color: #555;
}

/* 제목 행 */
#view-header #view-subject {
    font-size: 1.3em;
    font-weight: bold;
    color: #000;
}

/* 첨부파일 행 */
#view-file-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#view-file-list li {
    margin-bottom: 5px;
}
#view-file-list li a {
    text-decoration: none;
    color: #333;
}
#view-file-list li a:hover {
    text-decoration: underline;
    color: #2a6ec8;
}

/* '사업자료' 전용 파일 목록 */
.work-manual-files span {
    display: inline-block;
    width: 80px;
    font-weight: bold;
    color: #111;
}
.work-manual-files a {
    text-decoration: none;
    color: #333;
}
.work-manual-files a:hover {
    text-decoration: underline;
    color: #2a6ec8;
}

/* 본문 내용 영역 */
.view-content {
    min-height: 250px;
    padding: 25px;
    font-size: 1.1em;
    line-height: 1.7;
    color: #333;
    /* (중요) API가 nl2br로 <br>을 넣어주므로 pre-wrap 불필요 */
}
.view-content .loading-text {
    text-align: center;
    color: #999;
}

/* 버튼 컨테이너 */
.view-button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}
.view-button-container .left-buttons,
.view-button-container .right-buttons {
    display: flex;
    gap: 5px;
}

/* 버튼 공통 스타일 (list.php의 .btn과 동일해야 함) */
.view-button-container .btn,
.view-button-container .btn-list,
.view-button-container .btn-edit,
.view-button-container .btn-delete {
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

/* 목록 버튼 */
.view-button-container .btn-list {
    background-color: #6c757d; /* 짙은 회색 */
    color: #ffffff;
    border-color: #6c757d;
}
.view-button-container .btn-list:hover {
    background-color: #5a6268;
}

.view-button-container .btn-submit {
    background-color: #2a6ec8;
    color: #fff;
    border-color: #2a6ec8;
}
.view-button-container .btn-submit:hover {
    background-color: #245da1;
}

/* 수정 버튼 */
.view-button-container .btn-edit {
    background-color: #28a745; /* 짙은 초록색 (Bootstrap 'success' 색상) */
    color: #fff;
    border-color: #28a745;
}
.view-button-container .btn-edit:hover {
    background-color: #218838; /* 호버: 더 짙은 초록색 */
}

/* 삭제 버튼 */
.view-button-container .btn-delete {
    background-color: #d9534f; /* 기존 빨간색 */
    color: #fff;
    border-color: #d9534f;
}
.view-button-container .btn-delete:hover {
    background-color: #c82333; /* 호버: 더 짙은 빨간색 */
}


/* ======================================= */
/* 4. 삽입 수정 페이지 (manual_editor.php) 스타일
/* ======================================= */

/* 폼 테이블 레이아웃 */
.form_table {
    border-top: 2px solid #333;
}
#form-subject {
	width: 100%;
	box-sizing: border-box;
}
.check_notice {
	margin-bottom: 5px;
}
.check_notice label {
	font-weight:bold;
	color:#d9534f;
	cursor: pointer;
	user-select: none;
}
#form-memo {
	width: 100%;
	height: 250px;
	resize: vertical;
	box-sizing: border-box;
}

.form_table th,
.form_table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.form_table th {
    background-color: #f9f9f9;
    width: 15%;
    font-weight: bold;
    color: #333;
    vertical-align: middle;
    white-space: nowrap;
}

.form_table td {
    width: 100%;
    color: #555;
}

/* 폼 입력 요소 */
.form_table input[type="text"].line,
.form_table input[type="number"].line,
.form_table select,
.form_table textarea {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 14px;
}
/*.form_table input[type="text"].line:focus,
.form_table select:focus,
.form_table textarea:focus {
    border-color: #2a6ec8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(42, 110, 200, 0.2);
}*/
#form-p-name {
	width: 100%;
    box-sizing: border-box;
}

/* 파일 입력란 */
.file-input-wrapper {
    margin-bottom: 8px;
    padding: 5px;
    background: #fafafa;
    border-radius: 3px;
}
.file-input-wrapper label {
    font-weight: bold;
    margin-right: 5px;
}
.file-input-wrapper input[type="file"] {
    font-size: 13px;
}
.file-input-wrapper .existing-file {
    font-size: 0.9em;
    color: #555;
}
.file-input-wrapper .existing-file input[type="checkbox"] {
    vertical-align: middle;
    margin-left: 5px;
}

.file-input-wrapper .remove-file-btn {
    margin-left: 5px;
    background: #eee;
    border: 1px solid #ccc;
    color: #f00;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 6px;
}
.file-input-wrapper.existing-file {
    background-color: transparent;
}

/* ======================================= */
/* 5. 동적 파일 입력 (manual_editor.js)
/* ======================================= */
.file-input-wrapper.existing-file {
    background-color: transparent;
    padding: 3px 0;
}
.file-input-wrapper.existing-file label {
    font-weight: normal;
    color: #333;
    cursor: pointer;
}
.file-input-wrapper.dynamic-row {
    margin-top: 5px;
}
.file-input-wrapper .remove-file-btn {
    margin-left: 5px;
    background: #eee;
    border: 1px solid #ccc;
    color: #f00;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 6px;
}
.file-input-wrapper .remove-file-btn:hover {
    background: #ddd;
}


/* ======================================= */
/* 6. 파일 미리보기 (file_viewer_module) 스타일
/* ======================================= */
.file-preview {
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    margin: 20px 0;
}

.file-preview .download-link-wrapper {
    background-color: #f9f9f9;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-weight: bold;
}
.file-preview .download-link-wrapper a {
    text-decoration: none;
    color: #000;
    font-size: 1rem;
}
.file-preview .download-link-wrapper a:hover {
    text-decoration: underline;
}
.file-preview .download-link-wrapper font {
    font-size: 0.9em;
    font-weight: normal;
}

.file-preview .image-scroll-container {
    padding: 15px;
    max-height: 700px;
    overflow-y: auto;
    text-align: center;
    background: #f3f3f3;
}
.file-preview .image-scroll-container img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
}

.file-preview .unsupported-preview {
    padding: 40px 15px;
    text-align: center;
    color: #777;
    font-size: 1.1em;
    line-height: 1.6;
    background-color: #f8f9fa;
}

.file-preview iframe {
    /* 높이는 get_post_details.php의 $iframe_height 변수로 제어 */
    border: none;
    width: 100%;
    display: block; /* iframe 하단 공백 제거 */
}

/* '사업자료'의 경우 카테고리명 */
#view-file-list h3 {
    padding: 10px 15px;
    background-color: #f0f0f0;
    margin: 10px 0 0 0;
    border-bottom: 1px solid #ddd;
}
#view-file-list h3:first-child {
    margin-top: 0;
}


/* 각 카테고리(계획서, 평가서...)를 감싸는 박스 */
.category-section {
    background-color: #fff;
    border: 1px solid #cce0ff; /* 연한 파란색 테두리 */
    border-radius: 8px; /* 둥근 모서리 */
    padding: 20px;
    margin-bottom: 30px; /* 박스 간 간격 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* 살짝 그림자 */
}

/* 카테고리 제목 (예: 📄 계획서) */
.category-header {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2a6ec8; /* 제목 아래 굵은 파란 줄 */
    color: #2a6ec8;
    font-size: 1.1rem;
    font-weight: bold;
}

/* 등록된 파일이 없을 때 메시지 */
.no-file-msg {
    color: #999;
    font-style: italic;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    text-align: center;
}

/* (기존 스타일 덮어쓰기) 파일 미리보기 박스 간격 조정 */
.category-section .file-preview {
    margin-bottom: 15px;
    border: 1px solid #ddd; /* 미리보기 자체 테두리는 연하게 */
}
.category-section .file-preview:last-child {
    margin-bottom: 0;
}


/* 반응형 */
@media (max-width: 768px) {
	html {
		font-size: 14px;
	}
	

    /* 1. 메인 레이아웃 (LNB + 목록) */
    .board-layout-container {
        flex-direction: column; /* 가로(row) -> 세로(column)로 변경 */
        flex-wrap: wrap;
    }

    #leftmenu {
        width: 100%; /* 너비 100% */
        flex: 0 0 100%; /* Flex 너비 100% */
        margin-right: 0; /* 오른쪽 여백 제거 */
        margin-bottom: 20px; /* 목록과의 아래쪽 간격 */
    }
    
    .list-area {
        width: 100%;
        flex: 0 0 100%;
        min-width: 0;
    }
    
    
    /* 2. 상단 헤더 (top_menu.php) */
    #header {
        height: auto !important; /* 고정 높이 강제 제거 */
        padding-bottom: 10px;
    }
    #header .log {
        float: none; /* float 해제 */
        text-align: center;
        width: 100%;
        padding: 10px 0;
    }
    /* 로고와 GNB 정렬 (flex-direction 사용) */
    #gnbwrap .logo {
        display: flex;
        flex-direction: column; /* 세로로 쌓기 */
        align-items: center; /* 가운데 정렬 */
    }
    #gnb {
        position: static; /* absolute 해제 */
        flex-wrap: wrap; /* 메뉴 줄바꿈 허용 */
        justify-content: center; /* 가운데 정렬 */
        width: 100%;
        margin-top: 10px;
    }
    #gnb li {
        margin: 2px;
    }
    #gnb li a {
        padding: 8px 12px;
        border-radius: 4px; /* 모바일에서는 탭 모양보다 버튼 모양이 나음 */
    }

    /* 3. 필터 및 검색 (manual_list.php) */
    .filter-search-box {
        flex-direction: column; /* 세로로 쌓기 */
        gap: 15px; /* 필터-검색 간격 */
    }
    .filter-search-box .find {
        width: 100%; /* 너비 100% */
    }
    #search-form {
        flex-wrap: wrap; /* 검색 폼 내부 요소 줄바꿈 */
        gap: 5px;
    }
    #term1 {
        flex-grow: 1; /* 검색어가 남은 공간을 채움 */
    }

    /* 4. 목록 테이블 (manual_list.php) */
    /* #altable 안의 .b_table로 명시성 강화 */
    #altable .b_table {
        width: 100%;
        overflow-x: auto; /* 가로 스크롤 생성 */
        white-space: nowrap; /* 내용 줄바꿈 방지 */
        border-left: 1px solid #ddd;
        border-right: 1px solid #ddd;
    }
    /* 스크롤바 생성을 위한 최소 너비 (테이블 자체) */
    .b_table .b_tablein {
        min-width: 700px;
    }

    /* 5. 상세보기/글쓰기 폼 (view/editor) */
    /* .view-mode와 .form-mode로 더 강력하게 선택 */
    #altable.view-mode .view_table th,
    #altable.view-mode .view_table td,
    #altable.form-mode .form_table th,
    #altable.form-mode .form_table td {
        display: block; /* 테이블 셀 -> 블록 요소로 변경 */
        width: 100%;
        box-sizing: border-box; /* 패딩 포함 100% */
        border-bottom: none; /* 하단 테두리 제거 */
        text-align: left; /* th 왼쪽 정렬 */
    }

    /* 레이블(th) 스타일 */
    #altable .view_table th,
    #altable .form_table th {
        padding-bottom: 5px;
        background-color: #f9f9f9;
        font-weight: 600;
        border-top: 1px solid #ddd; /* 각 항목 시작마다 줄 추가 */
    }
    
    /* 내용(td) 스타일 */
    #altable .view_table td,
    #altable .form_table td {
        padding-top: 5px;
        padding-bottom: 15px;
        border-bottom: 1px solid #eee; /* 내용 끝에 줄 추가 */
    }

    /* 첫 번째 항목의 상단 테두리 제거 */
    #altable .b_tablein tr:first-child th {
        border-top: none;
    }

    /* 폼 요소 100% */
    .form_table input[type="text"].line,
    .form_table select,
    .form_table textarea {
        width: 100%;
        box-sizing: border-box;
    }

    /* 6. 하단 버튼 (view/editor) */
    .view-button-container {
        flex-direction: column-reverse; /* 목록 버튼이 위로 오도록 역순 */
        gap: 10px;
    }
    .view-button-container .left-buttons,
    .view-button-container .right-buttons {
        width: 100%;
        justify-content: center;
        display: flex;
        gap: 5px;
    }
    /* 상세페이지에서 버튼 꽉 차게 */
    .view-button-container a.btn,
    .view-button-container button.btn,
    .view-button-container .btn-list,
    .view-button-container .btn-edit,
    .view-button-container .btn-delete {
        flex-grow: 1;
        text-align: center;
        width: 100%;
    }

    /* 7. 사업자료 미리보기 (view) */
    .category-section {
         padding: 15px;
         margin-bottom: 20px;
    }
    
    #gnb {
		padding-left: 0;
	}
	
}