/* --- 이과대학 공통 게시판(custom_board) --- */
:root {
    --point-color: #BA0B4A;
    --point-dark: #80222F;
    --text-primary: #222222;
    --border-light: #DADADA;
    --bg-list-th: #F3F9F9;
    --bg-view-th: #F5F5F5;
}

.table-wrapper {
    margin: 20px 0;
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    border-top: 2px solid var(--point-dark);
    border-bottom: 2px solid var(--point-dark);
}

.table-wrapper table th, .table-wrapper table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    line-height: 1.5;
}

/* --- 리스트 테마 --- */
.list-table th {
    background-color: var(--bg-list-th);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}
.list-table td {
    text-align: center;
    font-size: 16px;
}
.list-table td.title {
    text-align: left;
    padding-left: 20px;
}

/* --- 읽기 및 쓰기 테마 --- */
.view-table th, .write-table th {
    background-color: var(--bg-view-th);
    width: 200px;
    font-weight: 700;
    text-align: center;
}
.view-table td, .write-table td {
    text-align: left;
}

/* --- 버튼 가이드 --- */
.btn-area {
    margin-top: 20px;
    text-align: right;
}
.btn {
    display: inline-block;
    padding: 10px 25px;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #C0C0C0;
    background: #fff;
    color: #333;
}
.btn.b_red {
    background-color: var(--point-color);
    color: #fff;
    border: none;
    padding: 16px 50px;
    font-weight: 700;
}
.btn:hover {
    opacity: 0.85;
}

/* --- 폼 --- */
.table-wrapper input[type="text"], .table-wrapper select, .table-wrapper textarea {
    width: 100%;
    height: 35px;
    padding: 0 10px;
    border: 1px solid var(--border-light);
    font-size: 13px;
    box-sizing: border-box;
}
.table-wrapper textarea {
    height: 200px;
    padding: 10px;
    resize: vertical;
}

/* --- 페이지 네이션 --- */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    list-style: none;
    padding: 0;
}
.pagination li a, .pagination li strong {
    display: block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border: 1px solid var(--border-light);
    margin: 0 2px;
    color: #666;
    text-decoration: none;
}
.pagination li strong {
    background-color: #606976;
    color: #fff;
    border-color: #606976;
}

/* --- 검색 영역 (참조 사이트 반영) --- */
.search_box {
    text-align: right;
    margin-bottom: 14px;
}
.search_box fieldset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    padding: 0;
    margin: 0;
}
.search_box .select_box {
    width: 125px;
    height: 35px;
    padding: 0 8px;
    border: 1px solid var(--border-light);
    font-size: 13px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}
.search_box .input_txt {
    width: 150px;
    height: 35px;
    padding: 0 10px;
    border: 1px solid var(--border-light);
    font-size: 13px;
    box-sizing: border-box;
}
.search_box .input_txt::placeholder {
    color: #aaa;
}
.search_box .btn_search {
    display: inline-block;
    width: 75px;
    height: 35px;
    line-height: 35px;
    background: #606976;
    color: #fff;
    font-size: 13px;
    text-align: center;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}
.search_box .btn_search:hover {
    opacity: 0.85;
}
.search_box .sch_label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-right: 6px;
}
.search_box .input_date {
    width: 120px;
    height: 35px;
    padding: 0 10px;
    border: 1px solid var(--border-light);
    font-size: 13px;
    box-sizing: border-box;
    text-align: center;
}
.search_box .btn_calendar {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    font-size: 0;
    background: #f5f5f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 0v1H1v14h14V1h-3V0h-1v1H5V0H4zm-2 5h12v9H2V5z' fill='%23666'/%3E%3Crect x='4' y='7' width='2' height='2' fill='%23666'/%3E%3Crect x='7' y='7' width='2' height='2' fill='%23666'/%3E%3Crect x='10' y='7' width='2' height='2' fill='%23666'/%3E%3Crect x='4' y='10' width='2' height='2' fill='%23666'/%3E%3Crect x='7' y='10' width='2' height='2' fill='%23666'/%3E%3C/svg%3E") no-repeat center center;
    border: 1px solid var(--border-light);
    vertical-align: middle;
    cursor: pointer;
    text-decoration: none;
}
.search_box .dash {
    display: inline-block;
    margin: 0 4px;
    font-size: 13px;
    color: #888;
    vertical-align: middle;
}

/* --- 컬럼 너비 --- */
.list-table .col-chk    { width: 50px; }
.list-table .col-no     { width: 80px; }
.list-table .col-dept   { width: 150px; }
.list-table .col-manager { width: 120px; }
.list-table .col-date   { width: 120px; }

/* --- 빈 목록 --- */
.td-empty { padding: 50px 0; }

/* --- 상태 뱃지 (비공개/삭제) --- */
.badge-status {
    display: inline-block;
    margin-right: 4px;
    padding: 1px 6px;
    font-size: 11px;
    background: #6c757d;
    color: #fff;
    border-radius: 3px;
    vertical-align: middle;
}
.badge-status.ml {
    margin-right: 0;
    margin-left: 6px;
}
.badge-status.badge-deleted {
    background: #343a40;
}

/* --- 학과 태그 (통일 디자인) --- */
.badge-dept {
    display: inline-block;
    margin: 0 2px 3px 0;
    padding: 2px 8px;
    font-size: 12px;
    color: #555;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    line-height: 1.4;
}

/* --- 버튼 영역 (split) --- */
.btn-area-split { overflow: hidden; margin-top: 20px; }
.btn-area-left  { float: left; }
.btn-area-right { float: right; }

/* --- 첨부파일 --- */
.file-list        { list-style: none; padding: 0; margin: 0; }
.file-list li     { margin-bottom: 5px; }
.file-list a      { text-decoration: none; }
.file-list .file-size { color: #888; font-size: 12px; margin-left: 5px; }
.file-list .file-download-cnt { color: #aaa; font-size: 11px; margin-left: 5px; }
.file-list .empty { color: #999; }

/* --- 이전글 / 다음글 네비게이션 --- */
.b-pager-box {
    margin-top: 30px;
    border-top: 2px solid var(--point-dark);
    border-bottom: 1px solid var(--border-light);
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
}
.b-pager-box .b-prev-box,
.b-pager-box .b-next-box {
    border-bottom: 1px solid var(--border-light);
}
.b-pager-box .b-next-box {
    border-bottom: none;
}
.b-pager-box a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.15s;
}
.b-pager-box a:hover {
    background-color: #f9f9f9;
}
.b-pager-box a span {
    display: inline-block;
    min-width: 60px;
    font-size: 14px;
    font-weight: 700;
    color: var(--point-dark);
    margin-right: 20px;
    flex-shrink: 0;
}
.b-pager-box a span::before {
    display: inline-block;
    margin-right: 6px;
    font-size: 12px;
    vertical-align: middle;
}
.b-prev-box a span::before {
    content: "▲";
    color: var(--point-dark);
}
.b-next-box a span::before {
    content: "▼";
    color: var(--point-dark);
}
.b-pager-box a p {
    margin: 0;
    font-size: 15px;
    color: #555;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- 카테고리 탭 --- */
.tab-box { position: relative; text-align: center; margin-bottom: 30px; }
.tab-box .tab-ul { display: flex; width: 100%; border-top: 1px solid #ddd; border-left: 1px solid #ddd; border-radius: 6px; overflow: hidden; list-style: none; padding: 0; margin: 0; }
.tab-box .tab-ul li { flex: 1; border-right: 1px solid #ddd; border-bottom: 1px solid #ddd; background: #fff; }
.tab-box .tab-ul li a { display: block; height: 60px; line-height: 60px; font-size: 19px; color: #000; font-weight: 500; text-decoration: none; }
.tab-box .tab-ul li.active a { background-color: #8B0029; color: #fff; }

.tab_sel { display: none; width: 100%; border: 1px solid #8B0029; padding: 0 15px; background: #8B0029; color: #fff; height: 50px; font-size: 16px; border-radius: 6px; }
@media (max-width: 1024px) {
    .tab-box .tab-ul { display: none; }
    .tab_sel { display: block; }
}
