/* ==========================================================
   Notice board (/notice, /notice/{id})
   ========================================================== */
.nb-lead { max-width: 640px; margin: 10px auto 0; font-size: 18px; color: var(--muted); }
.nb { padding-top: 34px; padding-bottom: 74px; }

.nb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    background: var(--navy);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s;
}

.nb-btn:hover { background: var(--green-btn); }
.nb-btn--ghost { background: #fff; color: var(--navy); border: 1.5px solid #cfd8e6; }
.nb-btn--ghost:hover { background: #f2f5fa; }

/* ---------- Filter bar ---------- */
.nb-filter {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 170px)) auto auto;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(13, 45, 94, .06);
}

.nb-filter__search {
    position: relative;
    display: flex;
    align-items: center;
}

.nb-filter__search svg { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--muted); }

.nb-filter input,
.nb-filter select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #d6dde9;
    border-radius: 10px;
    background: #f9fbfd;
    font: inherit;
    font-size: 15px;
    color: var(--text);
}

.nb-filter__search input { padding-left: 38px; }
.nb-filter input:focus,
.nb-filter select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(13, 45, 94, .1); background: #fff; }

/* ---------- Layout ---------- */
.nb-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
    margin-top: 22px;
    align-items: start;
}

.nb-count { margin: 0 0 12px; font-size: 15px; color: var(--muted); min-height: 1em; }

/* ---------- List item ---------- */
.nb-item {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--navy);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(13, 45, 94, .05);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.nb-item:hover { transform: translateY(-2px); border-left-color: var(--green); box-shadow: 0 12px 26px rgba(13, 45, 94, .1); }

.nb-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 78px;
    min-height: 78px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--navy), #1c58a8);
    color: #fff;
    line-height: 1.15;
}

.nb-date strong { font-size: 26px; }
.nb-date span { font-size: 13px; }
.nb-date small { font-size: 12px; opacity: .8; }

.nb-body { min-width: 0; flex: 1; }
.nb-title { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.45; }
.nb-title a { color: var(--navy); }
.nb-title a:hover { color: var(--green); }

.nb-new {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 9px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
    animation: nb-pulse 1.6s ease-in-out infinite;
}

@keyframes nb-pulse { 50% { opacity: .55; } }

.nb-excerpt { margin: 4px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

.nb-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 14px;
    color: var(--muted);
}

.nb-tag { padding: 1px 10px; border-radius: 999px; background: #f2f5fa; font-size: 13px; color: var(--navy); }
.nb-tag--file { background: #fdecec; color: #b42323; font-weight: 600; }
.nb-tag--file:hover { background: #fbd5d5; }

.nb-more { flex-shrink: 0; font-size: 15px; font-weight: 600; color: var(--green); }
.nb-more:hover { color: var(--navy); }

.nb-empty {
    padding: 50px 20px;
    border: 1px dashed #cfd8e6;
    border-radius: 14px;
    text-align: center;
    color: var(--muted);
}

.nb-empty .nb-btn { margin-top: 10px; }

/* ---------- Sidebar ---------- */
.nb-side {
    position: sticky;
    top: 20px;
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(160deg, var(--navy) 0%, #12407f 70%, #13843f 150%);
    color: #fff;
}

.nb-side h3 { margin: 0 0 12px; font-family: var(--font-title); font-size: 19px; }
.nb-side ul { margin: 0; padding: 0; list-style: none; }
.nb-side li { padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .15); }
.nb-side li:first-child { border-top: 0; padding-top: 0; }
.nb-side a { display: block; font-size: 15px; font-weight: 500; line-height: 1.5; }
.nb-side a:hover { text-decoration: underline; }
.nb-side small { font-size: 13px; opacity: .75; }

/* ---------- Pagination ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.pager__num,
.pager__btn,
.pager__dots {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
}

.pager__num,
.pager__btn { border: 1px solid var(--line); background: #fff; color: var(--navy); transition: background .2s, color .2s; }
.pager__num:hover,
.pager__btn:hover { background: #eef3fb; }
.pager__num.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager__btn.is-disabled { opacity: .45; pointer-events: none; }
.pager__dots { color: var(--muted); }

/* ---------- Detail ---------- */
.nb-detail {
    padding: 30px 34px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(13, 45, 94, .06);
}

.nb-scheduled { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; background: #fff7e6; color: #8a5a00; font-size: 15px; }
.nb-detail__date { margin: 0; font-size: 15px; font-weight: 600; color: var(--green); }

.nb-detail__title {
    margin: 6px 0 18px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--line);
    font-family: var(--font-title);
    font-size: 30px;
    line-height: 1.4;
    color: var(--navy);
}

.nb-detail__image { display: block; margin-bottom: 20px; }
.nb-detail__image img { width: 100%; height: auto; border-radius: 12px; }
.nb-detail__content { width: auto !important; }

.nb-file {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
    padding: 14px 16px;
    border: 1px solid #f3c9c9;
    border-radius: 14px;
    background: #fff7f7;
}

.nb-file__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #dc2626;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.nb-file__info { min-width: 0; flex: 1; }
.nb-file__info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-file__info small { color: var(--muted); }

.nb-links { margin-top: 22px; }
.nb-links h2 { margin: 0 0 10px; font-family: var(--font-title); font-size: 20px; color: var(--navy); }
.nb-links ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

.nb-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafd;
    font-weight: 600;
    color: #1c58a8;
    transition: background .2s, border-color .2s;
}

.nb-links a:hover { background: #eef3fb; border-color: #c9d6ea; }
.nb-links svg { width: 18px; height: 18px; flex-shrink: 0; }

.nb-detail__actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .nb-filter { grid-template-columns: 1fr 1fr 1fr; }
    .nb-filter__search { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
    .nb-layout { grid-template-columns: 1fr; }
    .nb-side { position: static; }
}

@media (max-width: 640px) {
    .nb { padding-top: 22px; padding-bottom: 48px; }
    .nb-filter { grid-template-columns: 1fr 1fr; }
    .nb-filter .nb-btn { width: 100%; }
    .nb-item { align-items: flex-start; gap: 12px; padding: 14px; }
    .nb-date { width: 62px; min-height: 66px; }
    .nb-date strong { font-size: 21px; }
    .nb-title { font-size: 17px; }
    .nb-more { display: none; }
    .nb-detail { padding: 20px 16px; }
    .nb-detail__title { font-size: 23px; }
    .nb-file { flex-wrap: wrap; }
    .nb-file .nb-btn { width: 100%; }
}

@media print {
    .site-header, .site-footer, .no-print, .to-top { display: none !important; }
    .nb-layout { display: block; }
    .nb-detail { border: 0; box-shadow: none; padding: 0; }
}
