/* ===============================
   공통 레이아웃
================================= */

.board-outer {
    width:100%;
    padding:100px 20px 100px 20px;   /* 상단 100px, 하단 100px */
    background:#f4f6f8;
}

.board-wrap {
    max-width:1200px !important;
    margin:0 auto !important;
}

/* 게시판 제목 중앙 정렬 */
.board-wrap h2,
.board-title,
.sub-title {
    text-align:center;
    margin-bottom:40px;
    font-size:28px;
    font-weight:600;
}

/* 글쓰기 / 보기 박스 */
.view-box,
.write-box {
    background:#fff;
    padding:40px;
    border-radius:12px;
    box-shadow:0 6px 18px rgba(0,0,0,0.08);
}

/* 글쓰기 페이지 전용 하단 여백 */
.write-box {
    margin-bottom:100px;
}

/* 푸터와 간격 유지 */
footer {
    margin-top:100px;
}

/* ======================================
   📱 모바일 대응
====================================== */

@media (max-width:768px){

    .board-outer {
        padding:80px 15px 80px 15px;
    }

    .board-wrap {
        max-width:100%;
    }

    .board-wrap h2,
    .board-title {
        font-size:22px;
    }

    .view-box,
    .write-box {
        padding:20px;
    }
    .board-wrap {
        padding:0 10px;
    }

    .view-box {
        padding:20px;
    }

    .view-meta {
        flex-direction:column;
        gap:6px;
    }

    .board-table th:nth-child(4),
    .board-table td:nth-child(4),
    .board-table th:nth-child(5),
    .board-table td:nth-child(5) {
        display:none;
    }

    .view-footer {
        text-align:center;
    }

    .admin-login {
        justify-content:center;
    }
}


/* ===============================
   공통 버튼
================================= */

.board-btn {
    display:inline-block;
    padding:8px 16px;
    background:#0488e4;
    color:#fff;
    border-radius:6px;
    text-decoration:none;
    font-size:14px;
    transition:0.2s;
}

.board-btn:hover {
    background:#036fc2;
}


/* ===============================
   상태 뱃지
================================= */

.status-badge {
    padding:4px 10px;
    border-radius:6px;
    font-size:12px;
    font-weight:500;
}

.status-wait {
    background:#f8d7da;
    color:#721c24;
}

.status-working {
    background:#fff3cd;
    color:#856404;
}

.status-done {
    background:#e2e3e5;
    color:#6c757d;
}

/* ===============================
   상태 버튼 (관리자)
================================= */

.status-btn {
    padding:6px 14px;
    border:none;
    border-radius:6px;
    background:#333;
    color:#fff;
    cursor:pointer;
    margin-right:8px;
    transition:0.2s;
}

.status-btn:hover {
    background:#555;
}

/* ===============================
   리스트 테이블
================================= */

.board-table {
    width:100%;
    border-collapse:collapse;
    background:#fff;
    border-radius:8px;
    overflow:hidden;
}

.board-table th {
    background:#f8f9fa;
    padding:14px;
    font-weight:600;
    text-align:left;
    border-bottom:1px solid #e9ecef;
}

.board-table td {
    padding:14px;
    border-bottom:1px solid #eee;
}

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

.row-done {
    background:#edf7fe;
    color:#999;
}

.title a {
    text-decoration:none;
    color:#333;
    display:inline-flex;
    align-items:center;
    gap:6px;
}

/* NEW 뱃지 */

.new-badge {
    background:#ff3b3b;
    color:#fff;
    font-size:11px;
    padding:2px 8px;
    border-radius:20px;
    font-weight:600;
}

/* 댓글 카운트 */

.comment-count {
    color:#007bff;
    font-size:13px;
}

/* ===============================
   페이징
================================= */

.pagination-box {
    text-align:center;
    margin:30px 0;
}

.page-btn {
    display:inline-block;
    padding:6px 12px;
    margin:0 4px;
    border:1px solid #ddd;
    background:#fff;
    color:#333;
    border-radius:6px;
    text-decoration:none;
    font-size:14px;
}

.page-btn.active {
    background:#333;
    color:#fff;
    border-color:#333;
}

/* ===============================
   View 페이지
================================= */

.view-box {
    background:#fff;
    padding:40px;
    border-radius:12px;
    box-shadow:0 6px 18px rgba(0,0,0,0.08);
}

.view-header h2 {
    margin-bottom:10px;
    font-size:24px;
    font-weight:600;
}

.notice-badge {
    background:#e60023;
    color:#fff;
    font-size:12px;
    padding:4px 8px;
    border-radius:4px;
    margin-right:6px;
}

.view-meta {
    display:flex;
    gap:20px;
    flex-wrap:wrap;
    font-size:14px;
    color:#555;
    margin-top:50px;
}

.view-content {
    margin:30px 0;
    line-height:1.8;
    font-size:16px;
}

.file-box {
    margin:10px 0;
}

.admin-status-control {
    margin:20px 0;
}

.comment-section {
    margin-top:30px;
}

.comment-box {
    background:#f8f9fa;
    padding:20px;
    border-radius:8px;
    margin-top:15px;
}

.comment-content {
    margin-bottom:10px;
}

.comment-date {
    font-size:12px;
    color:#888;
}

.comment-form textarea {
    width:100%;
    height:120px;
    margin-top:12px;
    padding:10px;
    border:1px solid #ddd;
    border-radius:6px;
}

.delete-btn {
    background:none;
    color:#e60023;
    border:none;
    cursor:pointer;
    font-size:12px;
}

.view-footer {
    margin-top:40px;
    text-align:center;
}

.view-footer .board-btn {
    display:inline-block;
    margin:0 6px;
}

/* ===============================
   관리자 로그인 한줄 정렬
================================= */

.admin-login {
    display:flex;
    align-items:center;
    gap:8px;
    margin-bottom:15px;
}

.admin-login input {
    width:120px;
    padding:5px 8px;
    border:1px solid #ccc;
    border-radius:4px;
}

.admin-login button {
    padding:5px 12px;
    border:none;
    background:#333;
    color:#fff;
    border-radius:4px;
    cursor:pointer;
}

/* ===============================
   유지보수 요청하기 버튼 중앙으로 오게 하기
================================= */
.write-area .board-btn {
    display:block;
    width:fit-content;
    margin:45px auto 0 auto;
}
/* ===============================
   기본 파랑 버튼
================================= */

.board-btn {
    display:inline-block;
    padding:9px 18px;
    background:#0478c9;
    color:#fff;
    border:none;
    border-radius:8px;
    font-size:14px;
    text-decoration:none;
    box-shadow:0 4px 10px rgba(4,136,228,0.25);
    transition:all 0.2s ease;
}

/* Hover 효과 */
.board-btn:hover {
    background:#036fc2;
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(4,136,228,0.35);
}

/* ===============================
   관리자 전용 버튼 (상태 변경 등)
================================= */

.status-btn {
    padding:9px 18px;
    background:#025fa3;   /* 더 진한 파랑 */
    color:#fff;
    border:none;
    border-radius:8px;
    box-shadow:0 4px 10px rgba(2,95,163,0.35);
    transition:all 0.2s ease;
}

.status-btn:hover {
    background:#014a80;
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(2,95,163,0.45);
}

/* ===============================
   삭제 버튼 (빨강 유지)
================================= */

.board-btn.danger,
.delete-btn {
    background:#e60023;
    box-shadow:0 4px 10px rgba(230,0,35,0.3);
}

.board-btn.danger:hover,
.delete-btn:hover {
    background:#c4001e;
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(230,0,35,0.4);
}
.board-btn:active,
.status-btn:active {
    transform:translateY(0px);
    box-shadow:0 2px 6px rgba(0,0,0,0.2);
}

/* ===============================
   수정 / 글쓰기 폼 스타일
================================= */

.write-box {
    background:#fff;
    padding:40px;
    border-radius:12px;
    box-shadow:0 6px 18px rgba(0,0,0,0.08);
}

.edit-form .form-group {
    margin-bottom:20px;
}

.edit-form label {
    display:block;
    margin-bottom:8px;
    font-weight:600;
}

.edit-form input,
.edit-form textarea {
    width:100%;
    padding:12px;
    border:1px solid #ddd;
    border-radius:8px;
    font-size:14px;
}

.edit-form textarea {
    height:200px;
    resize:vertical;
}

.edit-footer {
    margin-top:30px;
    display:flex;
    justify-content:center;
    gap:12px;
    flex-wrap:wrap;
}
/* 관리자 상단 바 */
.admin-bar{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:12px;
    margin-bottom:20px;
}

.admin-badge{
    background:#025fa3;
    color:#fff;
    padding:6px 12px;
    border-radius:20px;
    font-size:13px;
    font-weight:600;
}

/* 파일 모달 */
.file-modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.8);
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.file-modal-content{
    width:90%;
    max-width:1000px;
    height:85%;
    background:#fff;
    border-radius:12px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}

.file-modal-header{
    text-align:right;
    padding:10px 15px;
    background:#f8f9fa;
}

.file-close{
    cursor:pointer;
    font-size:22px;
}

.file-modal-body{
    flex:1;
    display:flex;
    justify-content:center;
    align-items:center;
    background:#000;
}

.file-modal-body img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}

.file-modal-body iframe{
    width:100%;
    height:100%;
}

.file-modal-footer{
    padding:12px;
    text-align:center;
    background:#f8f9fa;
}

/* 📱 모바일 전체화면 */
@media (max-width:768px){
    .file-modal-content{
        width:100%;
        height:100%;
        border-radius:0;
    }
}
.slide-btn{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    background:rgba(255,255,255,0.3);
    border:none;
    font-size:22px;
    padding:10px;
    cursor:pointer;
    z-index:10;
}

.slide-btn.left{ left:10px; }
.slide-btn.right{ right:10px; }

.write-fancy-box{
    background:#fff;
    padding:60px;
    border-radius:16px;
    box-shadow:0 15px 40px rgba(0,0,0,0.1);
}

.write-title{
    text-align:center;
    font-size:32px;
    margin-bottom:10px;
}

.write-sub{
    text-align:center;
    color:#777;
    margin-bottom:40px;
}

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

.input-group label{
    display:block;
    font-weight:600;
    margin-bottom:8px;
}

.input-group input,
.input-group textarea{
    width:100%;
    padding:14px;
    border:1px solid #ddd;
    border-radius:10px;
    transition:0.2s;
}

.input-group input:focus,
.input-group textarea:focus{
    border-color:#0488e4;
    box-shadow:0 0 0 3px rgba(4,136,228,0.2);
    outline:none;
}

.input-group textarea{
    height:180px;
    resize:vertical;
}

.file-upload-area{
    margin-top:30px;
}

.preview-area{
    margin-top:15px;
    display:flex;
    gap:10px;
}

.preview-area img{
    width:80px;
    height:80px;
    object-fit:cover;
    border-radius:8px;
    border:1px solid #ddd;
}

.submit-area{
    margin-top:40px;
    display:flex;
    justify-content:center;
    gap:15px;
    flex-wrap:wrap;
}
/* ===============================
   캡차 고급 UI
================================= */

.captcha-area{
    margin-top:30px;
}

.captcha-box{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:10px;
}

.captcha-text{
    font-size:28px;
    font-weight:bold;
    letter-spacing:6px;
    padding:12px 20px;
    background:linear-gradient(135deg,#0488e4,#025fa3);
    color:#fff;
    border-radius:10px;
    position:relative;
    user-select:none;
    transform:skew(-5deg);
    box-shadow:0 5px 15px rgba(0,0,0,0.2);
}

.captcha-text::after{
    content:'';
    position:absolute;
    width:100%;
    height:2px;
    background:rgba(255,255,255,0.5);
    top:50%;
    left:0;
    transform:rotate(-5deg);
}

.captcha-refresh{
    background:#333;
    color:#fff;
    border:none;
    padding:10px 14px;
    border-radius:8px;
    cursor:pointer;
    transition:0.2s;
}

.captcha-refresh:hover{
    background:#555;
}

.captcha-area input{
    width:100%;
    padding:12px;
    border:1px solid #ddd;
    border-radius:8px;
}

@media (max-width:768px){
    .captcha-text{
        font-size:22px;
        letter-spacing:4px;
    }
}