/* 자료게시판 — 가독성·신뢰감 중심 UI */
.board-shell {
    background: linear-gradient(180deg, #f4f6f9 0%, #ffffff 12rem);
    padding-bottom: 3.5rem;
}

.board-layout {
    gap: 0;
    align-items: stretch;
}

/* 사이드바 */
.board-aside {
    width: 100%;
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}
@media (min-width: 768px) {
    .board-aside {
        width: 15.5rem;
        border-bottom: none;
        border-right: 1px solid #e2e8f0;
        box-shadow: 4px 0 24px -20px rgba(11, 37, 69, 0.18);
    }
}

.board-aside__head {
    padding: 0.9rem 1.15rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fff;
    background: linear-gradient(135deg, #0b2545 0%, #1b5e9c 100%);
    text-align: center;
}

.board-aside__nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.75rem;
}
@media (min-width: 768px) {
    .board-aside__nav {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0.25rem;
        padding: 0.85rem 0.65rem 1rem;
    }
}

.board-side-link {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    padding: 0.65rem 0.85rem;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    color: #334155;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
.board-side-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.board-side-link.is-active {
    color: #fff;
    background: linear-gradient(135deg, #0b2545 0%, #163d6b 100%);
    border-color: rgba(11, 37, 69, 0.2);
    box-shadow: 0 4px 14px -6px rgba(11, 37, 69, 0.45);
    font-weight: 600;
}

/* 본문 */
.board-main {
    min-width: 0;
    flex: 1;
    padding: 1.35rem 1rem 1.75rem;
    background: #fff;
}
@media (min-width: 640px) {
    .board-main {
        padding: 1.75rem 1.75rem 2rem;
    }
}

.board-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.35rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e8edf3;
}
@media (min-width: 640px) {
    .board-toolbar {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.board-toolbar__title-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.board-title {
    margin: 0;
    font-family: "Noto Serif KR", "Noto Sans KR", serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0b2545;
    line-height: 1.25;
}

.board-total {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
}
.board-total::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #b8956c;
}

.board-search {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
}
@media (min-width: 640px) {
    .board-search {
        flex-direction: row;
        align-items: center;
        width: auto;
        gap: 0.5rem;
    }
}

.board-search__input {
    min-width: 0;
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.board-search__input::placeholder {
    color: #94a3b8;
}
.board-search__input:focus {
    outline: none;
    border-color: #1b5e9c;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(27, 94, 156, 0.12);
}

.board-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    border: none;
}
.board-btn--ghost {
    padding: 0.5rem 1rem;
    color: #fff;
    background: #0f172a;
}
.board-btn--ghost:hover {
    background: #1e293b;
}
.board-btn--search {
    flex-shrink: 0;
    padding: 0.55rem 1.1rem;
    color: #fff;
    background: #0b2545;
    box-shadow: 0 4px 12px -6px rgba(11, 37, 69, 0.5);
}
.board-btn--search:hover {
    background: #163d6b;
    transform: translateY(-1px);
}
.board-btn--primary {
    padding: 0.6rem 1.35rem;
    color: #fff;
    background: linear-gradient(135deg, #0b2545 0%, #1b5e9c 100%);
    box-shadow: 0 6px 18px -8px rgba(11, 37, 69, 0.55);
}
.board-btn--primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* 테이블 카드 */
.board-table-card {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 12px 40px -28px rgba(15, 23, 42, 0.14);
}

.board-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.board-table {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.board-table thead {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.board-table th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    white-space: nowrap;
}
.board-table th.board-th-num {
    width: 4.5rem;
    text-align: center;
}
.board-table th.board-th-date {
    width: 7.5rem;
    text-align: center;
}
.board-table th.board-th-author {
    text-align: right;
    min-width: 9rem;
    padding-right: 1.25rem;
}

.board-table tbody tr.board-row {
    border-bottom: 1px solid #eef2f6;
    cursor: pointer;
    transition: background 0.15s ease;
}
.board-table tbody tr.board-row:hover {
    background: #f8fafc;
}
.board-table tbody tr.board-row:last-child {
    border-bottom: none;
}

.board-table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    color: #334155;
}
.board-table td.board-cell-num {
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}
.board-table td.board-cell-date {
    text-align: center;
    font-size: 0.8125rem;
    color: #64748b;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.board-table td.board-cell-title {
    color: #0f172a;
    font-weight: 500;
    line-height: 1.45;
}
.board-table td.board-cell-author {
    text-align: right;
    font-size: 0.8125rem;
    color: #64748b;
    white-space: nowrap;
    padding-right: 1.25rem;
}

.board-table .board-reply-mark {
    display: inline-block;
    margin-right: 0.25rem;
    font-weight: 700;
    color: #b8956c;
}

.board-cell-empty,
.board-cell-loading {
    padding: 2.5rem 1rem !important;
    text-align: center;
    font-size: 0.9375rem;
    color: #64748b;
    background: #fafbfc;
}

.board-row-detail td {
    padding: 0.75rem 1rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

/* 하단 액션 */
.board-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e8edf3;
}

.board-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.board-page-btn {
    min-width: 2.125rem;
    height: 2.125rem;
    padding: 0 0.5rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    background: transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}
.board-page-btn:hover:not(:disabled) {
    background: #f1f5f9;
    color: #0f172a;
}
.board-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.board-page-btn.is-active {
    color: #fff;
    font-weight: 700;
    background: #0b2545;
    border-color: #0b2545;
    box-shadow: 0 4px 12px -6px rgba(11, 37, 69, 0.45);
}

#board-api-banner:not(:empty) {
    margin: 0.75rem 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.8125rem;
    line-height: 1.5;
}

#board-modal .board-modal-panel {
    border-radius: 0.85rem;
    overflow: hidden;
    box-shadow: 0 24px 64px -24px rgba(15, 23, 42, 0.35);
}
