/* 메인 콘텐츠 */
.board-main {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    padding: 40px 0;
}

.board-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}
/* 테이블 */
.board-table-wrap {
    padding: 0;
    overflow: hidden;
}

.board-table {
    width: 100%;
    border-collapse: collapse;
}

.board-table th,
.board-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.board-table th {
    background: #f9f9f9;
    font-weight: 600;
    font-size: 0.9rem;
    color: #666;
}

.board-table td {
    font-size: 0.95rem;
    color: #222;
}

.board-table tbody tr:hover {
    background: #fafafa;
}

.board-table__empty {
    text-align: center !important;
    color: #999 !important;
    padding: 40px 20px !important;
}

.text-ellipsis {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 기본 레이아웃 확장 */
.board-header { margin-bottom: 20px; border-bottom: 2px solid #333; padding-bottom: 10px; }
.board-header h2 { font-size: 1.2rem; color: #222; margin: 0; }

/* 상세 및 쓰기 테이블 공통 */
.board-table-view, .board-table-write {
    width: 100%;
    border-top: 1px solid #333;
    border-collapse: collapse;
}

.board-table-view th, .board-table-view td,
.board-table-write th, .board-table-write td {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.board-table-view th, .board-table-write th {
    background: #f9f9f9;
    font-weight: 600;
    font-size: 0.9rem;
    color: #666;
    text-align: left;
}

/* 상세페이지 전용 */
.view-title { font-weight: 700; font-size: 1.1rem; }
.view-content { min-height: 300px; vertical-align: top; line-height: 1.6; }

/* 입력 폼 전 style */
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    box-sizing: border-box; /* 패딩 포함 크기 계산 */
}

.form-control:focus {
    outline: none;
    border-color: #666;
}

textarea.form-control { resize: vertical; }

/* 버튼 그룹 */
.board-btn-group button {
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #ddd;
    background: #fff;
}

.btn-submit { background: #333 !important; color: #fff; border-color: #333 !important; }
.btn-edit { background: #666 !important; color: #fff; border-color: #666 !important; }
.btn-delete { color: #d9534f; }
.btn-list, .btn-cancel { background: #f5f5f5; }

/* 상하단 컨트롤러 레이아웃 */
.table-top-ctrl, .table-bottom-ctrl {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.total-count { font-size: 0.9rem; color: #666; }
.total-count strong { color: #222; font-weight: 600; }

/* 검색창 스타일 */
.search-box { display: flex; gap: 5px; }
.select-sm { width: 100px !important; padding: 5px !important; font-size: 0.85rem !important; }
.input-sm { width: 200px !important; padding: 5px 10px !important; font-size: 0.85rem !important; }
.btn-search { 
    background: #666; color: #fff; border: none; padding: 5px 15px; 
    border-radius: 4px; cursor: pointer; font-size: 0.85rem;
}

/* 테이블 내부 요소 디테일 */
.board-table th { border-top: 2px solid #333; } /* 헤더 강조 */
.board-table td { vertical-align: middle; }
.board-table a { text-decoration: none; color: inherit; display: block; }
.board-table a:hover { text-decoration: underline; color: #000; }
.bold { font-weight: 600; }

/* 공지사항 스타일 */
.row-notice { background-color: #fdfdfd; }
.badge-notice { 
    background: #e74c3c; color: #fff; font-size: 0.75rem; 
    padding: 2px 8px; border-radius: 12px; font-weight: 500;
}

/* 페이지네이션 */
.pg-num, .pg-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border: 1px solid #eee;
    font-size: 0.85rem; color: #666; text-decoration: none; border-radius: 4px;
}
.pg-num.active { background: #333; color: #fff; border-color: #333; }
.pg-num:hover:not(.active) { background: #f5f5f5; }

/* 엘리프시스(말줄임) 보완 */
.text-ellipsis {
    max-width: 450px; /* 제목 영역은 좀 더 넓게 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* 하단 컨트롤러 레이아웃 수정 */
.table-bottom-ctrl {
	display: grid;
    grid-template-columns: 1fr auto 1fr; /* 좌(비움), 중(번호), 우(버튼) */
    align-items: center;
    margin-top: 20px;
}

/* 페이지네이션을 정중앙으로 */
.pagination {
    grid-column: 2; /* 두 번째 칸(가운데) 차지 */
    display: flex;
    gap: 5px;
}

/* 버튼을 오른쪽 끝으로 */
.right-btns {
    grid-column: 3; /* 세 번째 칸 차지 */
    display: flex;
	text-align: right;
    justify-content: flex-end; /* 오른쪽 정렬 */
}

.right-btns > button {
	max-width:100px;
}


/* 삭제 페이지 컨테이너 */
.board-delete-wrap {
    max-width: 600px; /* 삭제 확인은 너무 넓지 않게 집중도 조절 */
    margin: 50px auto;
    padding: 20px;
}

/* 삭제 정보 카드 */
.delete-content-card {
    background: #fff;
    border: 1px solid #eee;
    border-top: 3px solid #d9534f; /* 상단에 빨간색 강조선 */
    padding: 40px 30px;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* 경고 아이콘 */
.warning-icon {
    width: 50px;
    height: 50px;
    line-height: 50px;
    background: #fdf2f2;
    color: #d9534f;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.main-msg {
    font-size: 1.2rem;
    color: #222;
    margin-bottom: 25px;
}

/* 타겟 정보 박스 */
.target-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: left;
}

.info-row {
    display: flex;
    margin-bottom: 8px;
}

.info-row:last-child { margin-bottom: 0; }

.info-row .label {
    width: 80px;
    color: #888;
    font-size: 0.9rem;
}

.info-row .value {
    color: #333;
    font-weight: 500;
}

.sub-msg {
    color: #d9534f;
    font-size: 0.85rem;
    margin-top: 10px;
}


/* 반응형 스타일 정의 */
@media (max-width: 768px) {
    /* 1. 테이블 구조 변경 */
    .board-table, 
    .board-table thead, 
    .board-table tbody, 
    .board-table th, 
    .board-table td, 
    .board-table tr {
        display: block; /* 모든 요소를 블록으로 변경 */
    }

    /* 헤더 숨기기 */
    .board-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .board-table tr {
        border: 1px solid #eee;
        margin-bottom: 10px;
        padding: 10px;
        background: #fff;
        border-radius: 8px;
    }

    .board-table td {
        border: none;
        padding: 5px 10px 5px 100px; /* 라벨 공간 확보 */
        position: relative;
        font-size: 0.85rem;
        text-align: right; /* 데이터는 오른쪽 정렬 */
    }

    /* 데이터 앞에 라벨 삽입 (선택적) */
    .board-table td::before {
        content: attr(data-label); /* HTML의 data-label 속성 사용 */
        position: absolute;
        left: 10px;
        width: 80px;
        font-weight: 600;
        text-align: left;
        color: #888;
    }

    /* 제목 열은 특별하게 강조 */
    .board-table td:nth-of-type(3) {
        padding-left: 10px;
        text-align: left;
        font-size: 1rem;
        font-weight: 700;
        border-bottom: 1px solid #f5f5f5;
        margin-bottom: 5px;
        padding-bottom: 10px;
    }
    .board-table td:nth-of-type(3)::before { display: none; } /* 제목 앞엔 라벨 제거 */

    /* 2. 상단 검색바 변경 */
    .table-top-ctrl {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .search-box { width: 100%; }
    .input-sm { flex: 1; }

    /* 3. 하단 컨트롤 변경 (중앙 정렬) */
    .table-bottom-ctrl {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .board-btn-group {
        justify-content: center; /* 모바일에서도 버튼들을 중앙으로 */
        flex-wrap: wrap;         /* 공간 부족 시 다음줄로 */
    }

    .right-btns {
        justify-content: center; /* 목록 페이지 글쓰기 버튼도 중앙으로 */
        width: 100%;
        margin-top: 15px;
    }

    .btn-base {
        padding: 0 15px;         /* 모바일에서는 여백을 살짝 줄임 */
        font-size: 0.85rem;
    }
	
	.board-delete-wrap {
        margin: 20px auto;
        padding: 15px;
    }
    
    .delete-content-card {
        padding: 30px 15px;
    }

    .board-btn-group {
        flex-direction: column; /* 모바일에서 버튼 세로 정렬(선택사항) */
    }
    
    .board-btn-group .btn-base {
        width: 100% !important; /* 모바일 삭제 페이지는 실수 방지를 위해 버튼 크게 */
    }	

    .board-login-wrap {
        margin: 20px auto;
        padding: 15px;
    }

}

.btn-base {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;           /* 높이 고정 */
    padding: 0 20px;        /* 좌우 여백 */
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-sizing: border-box;
    vertical-align: middle;
    width: auto !important; /* 가로로 늘어나는 현상 방지 */
}

.btn-base:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.btn-primary {
    background: #333 !important;
    color: #fff !important;
    border-color: #333 !important;
}
.btn-primary:hover {
    background: #000 !important;
}

/* 삭제, 취소 (경고/취소 버튼) */
.btn-danger {
    color: #d9534f !important;
    border-color: #d9534f !important;
}
.btn-danger:hover {
    background: #fdf2f2 !important;
}

/* 목록, 취소 (일반 버튼) */
.btn-secondary {
    background: #f8f9fa;
    color: #666;
}

.board-btn-group {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

/* 목록 하단 우측 버튼 정렬 */
.right-btns {
    display: flex;
    justify-content: flex-end;
}


.board-login-wrap {
    max-width: 450px; /* 로그인 폼 형태이므로 폭을 좀 더 좁게 조절 */
    margin: 60px auto;
    padding: 20px;
}

/* 삭제 카드 디자인 */
.login-content-card {
    background: #fff;
    border: 1px solid #eee;
    border-top: 3px solid #d9534f;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 입력 폼 레이아웃 */
.login-auth-form {
    margin: 25px 0;
    text-align: left;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

/* 입력창 스타일 (쓰기 페이지와 일관성 유지) */
.login-auth-form .form-control {
    width: 100%;
    height: 45px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.login-auth-form .form-control:focus {
    outline: none;
    border-color: #d9534f; /* 삭제 페이지이므로 포인트 컬러를 레드 계열로 변경 */
    box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.1);
}

/* 하단 경고 메시지 */
.sub-msg {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 25px;
    text-align: center;
}