@charset "utf-8";

:root {
    --brand: #4f46e5;
    --brand-dark: #312e81;
    --brand-light: #eef2ff;
    --brand-hover: #4338ca;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --bg-white: #ffffff;
    --success: #16a34a;
    --danger: #ef4444;
}

/* ===== 공통 ===== */
#bo_list, #bo_v, #bo_w { max-width: 900px; margin: 0 auto; padding: 24px 20px 100px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600;
    text-decoration: none; cursor: pointer; border: none; transition: all 0.2s;
}
.btn_b01 { background: var(--brand); color: #fff; }
.btn_b01:hover { background: var(--brand-hover); }
.btn_b02 { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn_b02:hover { background: var(--border); }
.btn_admin { background: var(--danger); color: #fff; }
.btn_admin:hover { background: #dc2626; }

.frm_input {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 14px; transition: border-color 0.2s, box-shadow 0.2s;
}
.frm_input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }

/* ===== 목록 ===== */
#bo_btn_top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
#bo_list_total { font-size: 14px; color: var(--text-muted); }
#bo_list_total strong { color: var(--brand); font-weight: 700; }
.btn_bo_user { display: flex; gap: 8px; }

.tbl_wrap { overflow-x: auto; }
.tbl_wrap table { width: 100%; border-collapse: collapse; background: var(--bg-white); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.tbl_wrap thead { background: var(--brand); }
.tbl_wrap th { padding: 14px 12px; font-size: 13px; font-weight: 600; color: #fff; text-align: center; white-space: nowrap; }
.tbl_wrap td { padding: 14px 12px; font-size: 14px; border-bottom: 1px solid var(--border); text-align: center; vertical-align: middle; }
.tbl_wrap tr:hover td { background: var(--brand-light); }
.tbl_wrap tr.bo_notice td { background: #fef3c7; }
.tbl_wrap tr.bo_notice:hover td { background: #fde68a; }

.tbl_wrap .no { width: 60px; color: var(--text-muted); font-size: 13px; }
.tbl_wrap .chk { width: 40px; }
.tbl_wrap .chk input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.tbl_wrap .subject { text-align: left; max-width: 400px; }
.tbl_wrap .name { width: 100px; }
.tbl_wrap .date { width: 90px; color: var(--text-muted); font-size: 13px; }
.tbl_wrap .hit { width: 70px; color: var(--text-muted); font-size: 13px; }
.tbl_wrap .good { width: 60px; }

.notice_txt { display: inline-block; padding: 3px 8px; background: var(--brand); color: #fff; border-radius: 4px; font-size: 11px; font-weight: 600; }
.bo_tit a { color: var(--text); text-decoration: none; font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo_tit a:hover { color: var(--brand); }
.cnt_cmt { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; background: var(--brand); color: #fff; border-radius: 10px; font-size: 11px; font-weight: 600; margin-left: 6px; }
.new_icon { display: inline-block; padding: 2px 6px; background: var(--danger); color: #fff; border-radius: 4px; font-size: 10px; font-weight: 700; margin-left: 6px; }
.secret_icon, .reply_icon { width: 14px; height: 14px; margin-right: 4px; vertical-align: middle; }
.bo_info_m { display: none; }

.empty_table { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 14px; }

/* 관리자 글번호 */
.admin-wr-id { display: inline-block; padding: 2px 6px; background: var(--text-light); color: #fff; border-radius: 4px; font-size: 10px; font-weight: 600; margin-left: 6px; }

/* 검색 */
.bo_sch { background: var(--bg); padding: 20px; border-radius: 12px; margin-top: 20px; }
.bo_sch form { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.bo_sch select { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff; }
.bo_sch .sch_input { max-width: 250px; }
.bo_sch .sch_btn { padding: 10px 20px; background: var(--brand); color: #fff; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }
.bo_sch .sch_btn:hover { background: var(--brand-hover); }

/* 페이지네이션 */
.pg_wrap { text-align: center; margin: 24px 0; }
.pg { display: inline-flex; gap: 4px; align-items: center; }
.pg a, .pg strong { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; }
.pg a { background: var(--bg-white); color: var(--text-muted); border: 1px solid var(--border); }
.pg a:hover { background: var(--brand-light); color: var(--brand); border-color: var(--brand); }
.pg strong { background: var(--brand); color: #fff; border: 1px solid var(--brand); }
.pg .pg_start, .pg .pg_prev, .pg .pg_next, .pg .pg_end { font-size: 12px; }

/* ===== 읽기 ===== */
#bo_v_header { border-bottom: 2px solid var(--brand); padding-bottom: 20px; margin-bottom: 24px; }
#bo_v_title { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.5; margin-bottom: 12px; word-break: keep-all; }
#bo_v_info { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-muted); }
#bo_v_info span { display: flex; align-items: center; gap: 4px; }
#bo_v_info strong { color: var(--text); font-weight: 500; }

#bo_v_atc { padding: 24px 0; border-bottom: 1px solid var(--border); }
#bo_v_con { font-size: 15px; line-height: 1.8; color: var(--text); word-break: keep-all; }
#bo_v_con img { max-width: 100%; height: auto; border-radius: 8px; }

#bo_v_act { display: flex; justify-content: center; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.bo_v_good, .bo_v_nogood { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 32px; border-radius: 12px; text-decoration: none; transition: all 0.2s; }
.bo_v_good { background: var(--brand-light); color: var(--brand); border: 2px solid transparent; }
.bo_v_good:hover { border-color: var(--brand); }
.bo_v_nogood { background: #fef2f2; color: var(--danger); border: 2px solid transparent; }
.bo_v_nogood:hover { border-color: var(--danger); }
.bo_v_good span, .bo_v_nogood span { font-size: 12px; font-weight: 500; }
.bo_v_good strong, .bo_v_nogood strong { font-size: 24px; font-weight: 800; }

#bo_v_file, #bo_v_link { background: var(--bg); padding: 16px 20px; border-radius: 10px; margin: 20px 0; }
#bo_v_file h2, #bo_v_link h2 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
#bo_v_file ul, #bo_v_link ul { list-style: none; }
#bo_v_file li, #bo_v_link li { margin-bottom: 6px; }
#bo_v_file a, #bo_v_link a { color: var(--brand); font-size: 14px; text-decoration: none; }
#bo_v_file a:hover, #bo_v_link a:hover { text-decoration: underline; }

#bo_v_nb { list-style: none; margin: 20px 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
#bo_v_nb li { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
#bo_v_nb li:last-child { border-bottom: none; }
#bo_v_nb span { width: 60px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
#bo_v_nb a { color: var(--text); font-size: 14px; text-decoration: none; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#bo_v_nb a:hover { color: var(--brand); }

#bo_v_btn { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 24px 0; }

/* ===== 댓글 ===== */
#bo_vc { margin-top: 32px; border-top: 2px solid var(--brand); padding-top: 24px; }
#bo_vc h2 { font-size: 16px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
#bo_vc h2 span { color: var(--brand); }

#bo_vc article { background: var(--bg); padding: 16px; border-radius: 10px; margin-bottom: 12px; }
#bo_vc article.reply { margin-left: 24px; background: #fff; border: 1px solid var(--border); }
#bo_vc header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; color: var(--text-muted); }
#bo_vc header strong { color: var(--text); font-weight: 600; }
.cmt_content { font-size: 14px; line-height: 1.7; color: var(--text); }
.btn_cmt { padding: 4px 10px; font-size: 12px; background: var(--bg-white); border: 1px solid var(--border); border-radius: 4px; color: var(--text-muted); text-decoration: none; }
.btn_cmt:hover { background: var(--brand-light); color: var(--brand); border-color: var(--brand); }

#bo_vc_w { background: var(--bg); padding: 20px; border-radius: 12px; margin-top: 20px; }
#bo_vc_w h2 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
#bo_vc_w textarea { min-height: 100px; resize: vertical; }
.cmt_btn_area { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 12px; }
.cmt_btn_area .btn_submit { background: var(--brand); color: #fff; padding: 12px 24px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }
.cmt_btn_area .btn_submit:hover { background: var(--brand-hover); }

/* ===== 글쓰기 ===== */
#bo_w h2 { font-size: 20px; font-weight: 700; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--brand); }
.write_div { margin-bottom: 16px; }
.write_div label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.write_div textarea { min-height: 300px; resize: vertical; }
.write_div select { padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }

.write_option { display: flex; flex-wrap: wrap; gap: 16px; padding: 16px 0; }
.chk_label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.chk_label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); }

.btn_confirm { display: flex; justify-content: center; gap: 12px; padding: 24px 0; }
.btn_confirm .btn { min-width: 120px; padding: 14px 24px; font-size: 15px; }

/* ===== 반응형 ===== */
@media (max-width: 768px) {
    #bo_list, #bo_v, #bo_w { padding: 10px; }
    
    .tbl_wrap table { display: block; }
    .tbl_wrap thead { display: none; }
    .tbl_wrap tbody { display: block; }
    .tbl_wrap tr { display: block; padding: 12px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; position: relative; }
    .tbl_wrap tr.bo_notice { background: #fef3c7; border-color: #fde68a; }
    .tbl_wrap td { display: block; padding: 0; border: none; text-align: left !important; width: 100% !important; }
    .tbl_wrap td.chk { position: absolute; top: 12px; right: 12px; width: auto !important; }
    .tbl_wrap td.no { display: inline-block; width: auto !important; margin-bottom: 6px; font-size: 12px; color: var(--text-muted); }
    .tbl_wrap td.no .notice_txt { font-size: 11px; padding: 2px 6px; }
    .tbl_wrap td.subject { font-size: 15px; line-height: 1.4; margin-bottom: 8px; }
    .tbl_wrap td.name, .tbl_wrap td.date, .tbl_wrap td.hit, .tbl_wrap td.good { display: none; }
    .tbl_wrap .empty_table { display: block; padding: 40px 20px; }
    .bo_info_m { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-muted); margin-top: 8px; }
    .bo_info_m span { margin: 0; }
    .bo_tit { display: block; font-weight: 500; }
    
    #bo_btn_top { flex-direction: column; align-items: stretch; gap: 10px; }
    #bo_list_total { font-size: 13px; }
    .btn_bo_user { width: 100%; justify-content: flex-end; }
    .btn_bo_user .btn { padding: 8px 12px; font-size: 13px; }
    
    .bo_sch { padding: 12px; }
    .bo_sch form { display: flex; flex-direction: column; gap: 8px; }
    .bo_sch select { width: 100%; }
    .bo_sch .sch_input { width: 100%; max-width: none; }
    .bo_sch .sch_btn { width: 100%; padding: 10px; }
    
    .pg_wrap { margin: 15px 0; }
    .pg a, .pg strong { min-width: 28px; height: 28px; line-height: 28px; font-size: 12px; }
    
    #bo_v_header { padding-bottom: 12px; margin-bottom: 15px; }
    #bo_v_title { font-size: 17px; line-height: 1.5; }
    #bo_v_info { font-size: 12px; }
    #bo_v_info span { display: inline-block; margin-right: 12px; margin-bottom: 4px; }
    
    #bo_v_atc { padding: 15px 0; }
    #bo_v_con { font-size: 14px; line-height: 1.7; }
    
    #bo_v_act { padding: 15px 0; gap: 10px; }
    .bo_v_good, .bo_v_nogood { padding: 12px 20px; flex-direction: row; gap: 10px; }
    .bo_v_good span, .bo_v_nogood span { font-size: 12px; }
    .bo_v_good strong, .bo_v_nogood strong { font-size: 16px; margin: 0; }
    
    #bo_v_file, #bo_v_link { padding: 12px; margin: 15px 0; }
    #bo_v_file h2, #bo_v_link h2 { font-size: 13px; }
    #bo_v_file a, #bo_v_link a { font-size: 13px; word-break: break-all; }
    
    #bo_v_nb li { padding: 10px 12px; }
    #bo_v_nb span { width: 50px; font-size: 12px; }
    #bo_v_nb a { font-size: 13px; }
    
    #bo_v_btn { gap: 6px; padding: 15px 0; }
    #bo_v_btn .btn { flex: 1; min-width: calc(33% - 6px); padding: 10px 8px; font-size: 13px; text-align: center; }
    
    #bo_vc { margin-top: 20px; padding-top: 15px; }
    #bo_vc h2 { font-size: 14px; margin-bottom: 15px; }
    #bo_vc article { padding: 12px; margin-bottom: 8px; }
    #bo_vc article.reply { margin-left: 12px; }
    #bo_vc header { font-size: 12px; }
    .cmt_content { font-size: 14px; }
    .btn_cmt { padding: 3px 8px; font-size: 11px; }
    
    #bo_vc_w { padding: 15px; margin-top: 15px; }
    #bo_vc_w h2 { font-size: 14px; }
    #bo_vc_w .frm_input { padding: 8px 10px; font-size: 14px; }
    #bo_vc_w textarea { min-height: 80px; }
    .cmt_btn_area { flex-direction: column; gap: 10px; align-items: stretch; }
    .cmt_btn_area .btn_submit { width: 100%; padding: 12px; }
    
    #bo_w h2 { font-size: 16px; margin-bottom: 15px; padding-bottom: 12px; }
    .write_div { margin-bottom: 12px; }
    .write_div label { font-size: 13px; margin-bottom: 5px; }
    .write_div .frm_input, .write_div select { padding: 10px; font-size: 14px; }
    .write_div textarea { min-height: 200px; }
    .write_option { gap: 10px; }
    .chk_label { font-size: 13px; }
    .btn_confirm { padding: 15px 0; gap: 8px; }
    .btn_confirm .btn { flex: 1; padding: 12px; font-size: 14px; }
}

@media (max-width: 480px) {
    .tbl_wrap td.subject { font-size: 14px; }
    .bo_info_m { font-size: 11px; }
    .cnt_cmt, .new_icon { font-size: 10px; }
    
    #bo_v_title { font-size: 16px; }
    #bo_v_btn .btn { min-width: calc(50% - 6px); font-size: 12px; padding: 8px 6px; }
    
    .pg a, .pg strong { min-width: 26px; height: 26px; line-height: 26px; font-size: 11px; padding: 0 4px; }
}
