/* 게시판 스타일 */

body:not(.dark-mode) {
    background: #ffffff !important;
}

body:not(.dark-mode) .lx_app_wrap {
    background: #ffffff !important;
}

.board-container {
    width: 100%;
    max-width: 1200px;
    margin: 100px auto 60px;
    padding: 0 20px;
    box-sizing: border-box;
    background: white;
}

@media (max-width: 768px) {
    .board-container {
        padding: 0 16px;
    }
}

.page-title {
    font-size: 38px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: -0.3px;
}

.page-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 48px;
    text-align: center;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* 검색 및 필터 영역 */
.board-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.board-search {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.board-search input {
    width: 100%;
    height: 47px;
    padding: 0 50px 0 20px;
    border: 1px solid #E5E7EB;
    border-radius: 24px;
    font-size: 15px;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.board-search input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.board-search i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
}

.board-write-btn {
    height: 47px;
    padding: 0 28px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 게시판 테이블 */
.board-table-wrapper {
    background: white;
    border-radius: 0;
    padding: 0;
    border: none !important;
    box-shadow: none;
    outline: none;
}

/* 카테고리 탭 */
.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.category-tab {
    height: 44px;
    padding: 0 24px;
    border: 1px solid #E5E7EB;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    align-items: center;
    gap: 8px;
}

.category-tab.active {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border-color: #4f46e5;
    color: white;
}


.board-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    border: none !important;
    outline: none !important;
}

.board-table thead {
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

.board-table thead tr {
    height: 42.5px;
}

.board-table th {
    padding: 0 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: relative;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.board-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    padding-right: 30px;
}

.board-table th.sortable:hover {
    background: #F3F4F6;
    color: #4f46e5;
}

.board-table th.sortable .sort-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #999;
    transition: color 0.2s ease;
}

.board-table th.sortable:hover .sort-icon {
    color: #4f46e5;
}

.board-table th.sortable.sort-asc .sort-icon {
    color: #4f46e5;
}

.board-table th.sortable.sort-asc .sort-icon i {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.board-table th.sortable.sort-asc .sort-icon i::before {
    content: '\f0de';
}

.board-table th.sortable.sort-desc .sort-icon {
    color: #4f46e5;
}

.board-table th.sortable.sort-desc .sort-icon i {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.board-table th.sortable.sort-desc .sort-icon i::before {
    content: '\f0dd';
}

.board-table th:first-child {
    width: 90px;
    white-space: nowrap;
}

.board-table th:nth-child(2) {
    width: 80px;
}

.board-table th:nth-child(3) {
    width: 330px;
}

.board-table th:nth-child(4) {
    width: 200px;
}

.board-table th:nth-child(5) {
    width: 160px;
}

.board-table th:nth-child(6) {
    width: 60px;
}

.board-table th:last-child {
    width: 100px;
}

.board-table tbody tr {
    height: 55px;
    border-bottom: 1px solid #F3F4F6;
    transition: all 0.15s ease;
    cursor: pointer;
}

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

/* 공지사항 게시글 강조 */
.board-table tbody tr.notice-row {
    background: #FAFAFA;
    font-weight: 500;
}

.board-table tbody tr.notice-row:hover {
    background: #F5F5F5;
}

.board-table tbody tr.notice-row .board-title {
    font-weight: 600;
    color: #1a1a2e;
}

.board-table tbody tr.notice-row:hover .board-title {
    color: #1a1a2e;
}

.board-table td {
    padding: 12px 8px;
    font-size: 15px;
    color: #1a1a2e;
    vertical-align: middle;
    text-align: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.board-table td:first-child {
    color: #999;
    font-size: 15px;
    white-space: nowrap;
}

.board-table td:nth-child(3) {
    text-align: left;
    padding-left: 12px;
}

.board-category {
    display: inline-block;
    padding: 6px 14px;
    background: #F3F4F6;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    letter-spacing: 0.2px;
}

.board-category.notice {
    background: white;
    color: #4f46e5;
    border: 1px solid #E5E7EB;
    border-radius: 50px;
}

.board-category.question {
    background: white;
    color: #3B82F6;
    border: 1px solid #E5E7EB;
    border-radius: 50px;
}

.board-category.payment {
    background: white;
    color: #10B981;
    border: 1px solid #E5E7EB;
    border-radius: 50px;
}

.board-category.refund {
    background: white;
    color: #F59E0B;
    border: 1px solid #E5E7EB;
    border-radius: 50px;
}

.board-title {
    font-weight: 500;
    color: #1a1a2e;
    transition: color 0.2s ease;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.board-table tbody tr:hover .board-title {
    color: #3b82f6;
}

.board-author {
    color: #666;
    font-size: 14px;
}

.board-date {
    color: #999;
    font-size: 14px;
}

.board-views {
    color: #999;
    font-size: 14px;
    text-align: center;
}

.board-status {
    text-align: center;
}

.status-badge {
    display: inline-block;
    padding: 0;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.2px;
    background: transparent;
    border: none;
}

.status-badge.completed {
    background: transparent;
    color: #666;
}

.status-badge.pending {
    background: transparent;
    color: #666;
}

.status-badge.received {
    background: transparent;
    color: #666;
}

.status-badge.none {
    background: transparent;
    color: #999;
}

/* 페이지네이션 */
.board-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 16px;
    border: 1px solid #E5E7EB;
    background: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    border-color: #4f46e5;
    color: #4f46e5;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border-color: #4f46e5;
    color: white;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 빈 상태 */
.board-empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.board-empty i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.board-empty p {
    font-size: 18px;
    margin-bottom: 8px;
}

.board-empty span {
    font-size: 14px;
    color: #999;
}

/* 글쓰기 폼 스타일 */
.board-write-form {
    background: white;
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.form-label.required::after {
    content: ' *';
    color: #4f46e5;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    background: white;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: #4f46e5;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234f46e5' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.form-textarea {
    min-height: 300px;
    resize: vertical;
    line-height: 1.6;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #E5E7EB;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
}

.btn-secondary {
    background: #F3F4F6;
    color: #666;
}

.btn-secondary:hover {
    background: #E5E7EB;
}

.btn-secondary:active {
    background: #D1D5DB;
}

/* 반응형 */
@media (max-width: 768px) {
    .board-container {
        margin-top: 80px;
    }

    .page-title {
        font-size: 32px;
    }

    .board-controls {
        flex-direction: column;
    }

    .board-search {
        width: 100%;
    }

    .board-write-btn {
        width: 100%;
        justify-content: center;
    }

    .board-table-wrapper,
    .board-write-form {
        padding: 20px;
        overflow-x: auto;
    }

    .board-table {
        min-width: 600px;
    }

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

    .form-actions {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 다크 모드 스타일 */
body.dark-mode {
    background: rgb(32, 33, 37) !important;
    color: #ffffff;
}

body.dark-mode .board-container {
    background: rgb(32, 33, 37);
    color: #ffffff;
}

body.dark-mode .page-title {
    color: #ffffff;
}

body.dark-mode .page-subtitle {
    color: #cbd5e1;
}

/* 검색 바 */
body.dark-mode .board-search input {
    background: rgb(42, 42, 45);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body.dark-mode .board-search input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

body.dark-mode .board-search i {
    color: #94a3b8;
}

/* 글쓰기 버튼 */
body.dark-mode .board-write-btn {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
}

body.dark-mode .board-write-btn:hover {
    background: linear-gradient(135deg, #4338ca, #5b21b6);
}

/* 카테고리 탭 */
body.dark-mode .category-tab {
    background: rgb(42, 42, 45);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

body.dark-mode .category-tab:hover {
    border-color: #4f46e5;
    color: #818cf8;
}

body.dark-mode .category-tab.active {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border-color: #4f46e5;
    color: white;
}

/* 테이블 */
body.dark-mode .board-table-wrapper {
    background: rgb(32, 33, 37);
}

body.dark-mode .board-table thead {
    background: rgb(42, 42, 45);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .board-table th {
    color: #cbd5e1;
}

body.dark-mode .board-table th.sortable:hover {
    background: rgb(55, 65, 81);
    color: #818cf8;
}

body.dark-mode .board-table th.sortable .sort-icon {
    color: #94a3b8;
}

body.dark-mode .board-table th.sortable:hover .sort-icon {
    color: #818cf8;
}

body.dark-mode .board-table th.sortable.sort-asc .sort-icon,
body.dark-mode .board-table th.sortable.sort-desc .sort-icon {
    color: #818cf8;
}

body.dark-mode .board-table tbody tr {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .board-table tbody tr:hover {
    background: rgb(42, 42, 45);
}

body.dark-mode .board-table tbody tr.notice-row {
    background: rgb(42, 42, 45);
}

body.dark-mode .board-table tbody tr.notice-row:hover {
    background: rgb(55, 65, 81);
}

body.dark-mode .board-table td {
    color: #e2e8f0;
}

body.dark-mode .board-table td:first-child {
    color: #94a3b8;
}

body.dark-mode .board-title {
    color: #e2e8f0;
}

body.dark-mode .board-table tbody tr:hover .board-title {
    color: #818cf8;
}

body.dark-mode .board-table tbody tr.notice-row .board-title {
    color: #ffffff;
}

body.dark-mode .board-author {
    color: #94a3b8;
}

body.dark-mode .board-date {
    color: #94a3b8;
}

body.dark-mode .board-views {
    color: #94a3b8;
}

/* 배지 */
body.dark-mode .board-category {
    background: rgb(55, 65, 81);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .board-category.notice {
    background: rgba(79, 70, 229, 0.2);
    color: #818cf8;
    border-color: rgba(79, 70, 229, 0.3);
}

body.dark-mode .board-category.question {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

body.dark-mode .board-category.payment {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

body.dark-mode .board-category.refund {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

/* 상태 배지 */
body.dark-mode .status-badge {
    color: #94a3b8;
}

body.dark-mode .status-badge.completed,
body.dark-mode .status-badge.pending,
body.dark-mode .status-badge.received {
    color: #94a3b8;
}

body.dark-mode .status-badge.none {
    color: #6b7280;
}

/* 페이지네이션 */
body.dark-mode .pagination-btn {
    background: rgb(42, 42, 45);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

body.dark-mode .pagination-btn:hover:not(.disabled):not(.active) {
    border-color: #4f46e5;
    color: #818cf8;
}

body.dark-mode .pagination-btn.active {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border-color: #4f46e5;
    color: white;
}

/* 빈 상태 */
body.dark-mode .board-empty {
    color: #94a3b8;
}

body.dark-mode .board-empty span {
    color: #6b7280;
}

/* 글쓰기 폼 */
body.dark-mode .board-write-form {
    background: rgb(42, 42, 45);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .form-label {
    color: #e2e8f0;
}

body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .form-textarea {
    background: rgb(55, 65, 81);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body.dark-mode .form-input:focus,
body.dark-mode .form-select:focus,
body.dark-mode .form-textarea:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2) !important;
}

body.dark-mode .form-input:hover,
body.dark-mode .form-select:hover,
body.dark-mode .form-textarea:hover {
    border-color: #4f46e5;
}

body.dark-mode .form-actions {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .btn-secondary {
    background: rgb(55, 65, 81);
    color: #cbd5e1;
}

body.dark-mode .btn-secondary:hover {
    background: rgb(71, 85, 105);
}
