﻿/* Tra cứu Niên giám thống kê - vn/NienGiam.aspx */
.ng-app { --ng-xanh: var(--primary, #1B6B2A); --ng-xanh-dam: var(--primary-dark, #0D4A1A); --ng-vien: #e3e8e4; --ng-nen: #f6f8f6; color: #1f2a22; }
.ng-app [hidden] { display: none !important; }

.ng-dau { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem; border-radius: 14px; color: #fff; margin-bottom: 1rem;
    background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.14), transparent 45%), linear-gradient(135deg, #0D4A1A 0%, #1B6B2A 55%, #2E7D32 100%); }
.ng-dau h1 { font-size: 1.45rem; font-weight: 700; margin: .2rem 0 .3rem; }
.ng-dau-nhan { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.ng-dau-nguon { margin: 0; font-size: .85rem; opacity: .85; }
.ng-dau-so { display: flex; gap: .75rem; flex-wrap: wrap; }
.ng-dau-so > div { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 10px; padding: .5rem .9rem; min-width: 7.5rem; }
.ng-dau-so b { display: block; font-size: 1.35rem; line-height: 1.2; }
.ng-dau-so span { font-size: .78rem; opacity: .85; }

.ng-luu-y { display: flex; gap: .6rem; align-items: flex-start; background: #fff8e1; border: 1px solid #f3dd9b; color: #6d5200;
    border-radius: 10px; padding: .65rem .9rem; font-size: .86rem; margin-bottom: 1rem; }
.ng-luu-y i { margin-top: .1rem; }

.ng-tab { display: flex; gap: .4rem; border-bottom: 2px solid var(--ng-vien); margin-bottom: 1rem; }
.ng-tab-nut { border: 0; background: none; padding: .6rem 1rem; font-weight: 600; color: #5b6b5f; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.ng-tab-nut.dang-chon { color: var(--ng-xanh); border-bottom-color: var(--ng-xanh); }
.ng-tab-nut:focus-visible { outline: 2px solid var(--ng-xanh); outline-offset: 2px; }

.ng-khung { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 1rem; align-items: start; }
.ng-khung[data-khung="dp"] { display: block; }

/* ----- cột trái ----- */
.ng-trai { position: sticky; top: .75rem; max-height: calc(100vh - 1.5rem); display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--ng-vien); border-radius: 12px; overflow: hidden; }
.ng-tim { position: relative; padding: .75rem .75rem .5rem; }
.ng-tim i { position: absolute; left: 1.35rem; top: 1.35rem; color: #8a988e; }
.ng-tim input { width: 100%; padding: .55rem .75rem .55rem 2.1rem; border: 1px solid var(--ng-vien); border-radius: 8px; font-size: .92rem; }
.ng-tim input:focus { outline: none; border-color: var(--ng-xanh); box-shadow: 0 0 0 3px rgba(27,107,42,.15); }
.ng-goiy { position: absolute; left: .75rem; right: .75rem; top: calc(100% - .35rem); z-index: 20; list-style: none; margin: 0; padding: .25rem 0;
    background: #fff; border: 1px solid var(--ng-vien); border-radius: 8px; box-shadow: 0 8px 24px rgba(20,40,25,.14); max-height: 60vh; overflow-y: auto; }
.ng-goiy li a { display: flex; gap: .55rem; padding: .45rem .7rem; font-size: .84rem; color: #2b3a2f; text-decoration: none; line-height: 1.35; }
.ng-goiy li small { display: block; color: #7a887e; font-size: .72rem; }
.ng-goiy li.dang-chon a, .ng-goiy li a:hover, .ng-goiy li.dang-chon .ng-goiy-tatca, .ng-goiy-tatca:hover { background: #eef6ef; color: var(--ng-xanh-dam); }
.ng-goiy-tatca { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid #eef1ee; background: none; padding: .5rem .7rem;
    font-size: .8rem; font-weight: 600; color: var(--ng-xanh); }
.ng-goiy mark, .ng-kq-tim mark { background: #fff2b3; color: inherit; padding: 0 1px; border-radius: 2px; }
.ng-phan { display: flex; gap: .35rem; padding: 0 .75rem .6rem; }
.ng-phan button { flex: 1; border: 1px solid var(--ng-vien); background: var(--ng-nen); border-radius: 8px; padding: .4rem .3rem; font-size: .8rem; font-weight: 600; color: #4b5b50; }
.ng-phan button.dang-chon { background: var(--ng-xanh); border-color: var(--ng-xanh); color: #fff; }
.ng-mucluc, .ng-kq-tim { overflow-y: auto; border-top: 1px solid var(--ng-vien); flex: 1; }
.ng-chuong summary { list-style: none; display: flex; gap: .5rem; align-items: center; padding: .6rem .75rem; cursor: pointer;
    font-weight: 600; font-size: .88rem; border-bottom: 1px solid #eef1ee; }
.ng-chuong summary::-webkit-details-marker { display: none; }
.ng-chuong summary:hover { background: var(--ng-nen); }
.ng-chuong[open] summary { background: #eef6ef; color: var(--ng-xanh-dam); }
.ng-chuong-so { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--ng-xanh); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; }
.ng-chuong-ten { flex: 1; line-height: 1.3; }
.ng-chuong-dem { flex: none; font-size: .72rem; color: #6b7a6f; background: #fff; border: 1px solid var(--ng-vien); border-radius: 99px; padding: 0 .45rem; }
.ng-mucluc ul, .ng-kq-tim ul { list-style: none; margin: 0; padding: .25rem 0; }
.ng-mucluc li a, .ng-kq-tim li a { display: flex; gap: .55rem; padding: .4rem .75rem .4rem 1rem; font-size: .84rem; color: #2b3a2f; text-decoration: none; line-height: 1.35; }
.ng-mucluc li a:hover, .ng-kq-tim li a:hover { background: var(--ng-nen); color: var(--ng-xanh-dam); }
.ng-mucluc li a.dang-xem { background: #e4f2e6; color: var(--ng-xanh-dam); font-weight: 600; box-shadow: inset 3px 0 0 var(--ng-xanh); }
.ng-so { flex: none; min-width: 2.3rem; color: var(--ng-xanh); font-weight: 700; font-variant-numeric: tabular-nums; }
.ng-co-dp { color: #8a988e; font-size: .75rem; }
.ng-kq-tim small { display: block; color: #7a887e; font-size: .74rem; margin-top: .1rem; }
.ng-kq-dau { display: flex; justify-content: space-between; align-items: center; padding: .5rem .75rem; font-size: .8rem; color: #5b6b5f; background: var(--ng-nen); }
.ng-kq-dau button { border: 0; background: none; color: var(--ng-xanh); font-weight: 600; font-size: .8rem; }

/* ----- biểu ----- */
.ng-phai { min-width: 0; }
.ng-bieu { background: #fff; border: 1px solid var(--ng-vien); border-radius: 12px; padding: 1.1rem 1.25rem; min-height: 320px; }
.ng-trong { text-align: center; color: #7a887e; padding: 3rem 1rem; }
.ng-trong i { font-size: 2.5rem; color: #b9c6bc; }
.ng-cho { padding: 1.5rem; color: #6b7a6f; text-align: center; }
.ng-loi { color: #b3261e; }
.ng-bieu-vt { font-size: .78rem; color: #6b7a6f; text-transform: uppercase; letter-spacing: .03em; }
.ng-bieu-dau h2 { font-size: 1.2rem; font-weight: 700; margin: .3rem 0 .2rem; line-height: 1.35; color: #15301c; }
.ng-bieu-so { display: inline-block; background: var(--ng-xanh); color: #fff; border-radius: 6px; padding: .05rem .45rem; font-size: .8em; margin-right: .2rem; vertical-align: .08em; }
.ng-bieu-en { color: #6b7a6f; font-style: italic; font-size: .9rem; }
.ng-bieu-cc { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; margin: .75rem 0 .6rem; }
.ng-dv { font-size: .85rem; color: #3f5045; background: var(--ng-nen); border-radius: 6px; padding: .25rem .6rem; }
.ng-cc-phai { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-left: auto; }
.ng-cc-phai input[type=search] { border: 1px solid var(--ng-vien); border-radius: 7px; padding: .3rem .6rem; font-size: .85rem; width: 11rem; }
.ng-cc-phai button { border: 1px solid var(--ng-vien); background: #fff; border-radius: 7px; padding: .3rem .6rem; font-size: .85rem; color: #2b3a2f; }
.ng-cc-phai button:hover { border-color: var(--ng-xanh); color: var(--ng-xanh); }
.ng-an-cu { font-size: .82rem; color: #4b5b50; display: inline-flex; gap: .3rem; align-items: center; margin: 0; }
.ng-ghi { font-size: .82rem; background: var(--ng-nen); border-left: 3px solid #9fb8a5; padding: .45rem .7rem; border-radius: 0 6px 6px 0; margin-bottom: .6rem; color: #3f5045; }
.ng-ghi-cu { background: #fff8e1; border-left-color: #e0b84a; color: #6d5200; }

.ng-bang-boc { overflow: auto; max-height: 70vh; border: 1px solid var(--ng-vien); border-radius: 8px; margin-bottom: .8rem; }
.ng-bang { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.ng-bang th { position: sticky; top: 0; z-index: 2; background: #eef4ef; color: #23402b; font-weight: 600; font-size: .8rem;
    text-align: right; padding: .5rem .6rem; border-bottom: 1px solid #d5dfd7; vertical-align: bottom; min-width: 5.5rem; }
.ng-bang th.ng-c0 { text-align: left; left: 0; z-index: 3; min-width: 14rem; }
.ng-bang td { padding: .32rem .6rem; border-bottom: 1px solid #f0f3f0; text-align: right; white-space: nowrap; }
.ng-bang td.ng-c0 { text-align: left; white-space: normal; position: sticky; left: 0; background: #fff; z-index: 1; min-width: 14rem; max-width: 26rem; }
.ng-bang td.ng-so-o { font-variant-numeric: tabular-nums; }
.ng-bang tr.ng-dam td { font-weight: 700; background: #f7faf7; }
.ng-bang tr.ng-dam td.ng-c0 { background: #f7faf7; }
.ng-bang tr.ng-cu td.ng-c0 { color: #6b7a6f; }
.ng-bang tbody tr[tabindex] { cursor: pointer; }
.ng-bang tbody tr[tabindex]:hover td, .ng-bang tbody tr[tabindex]:hover td.ng-c0 { background: #eef6ef; }
.ng-bang tbody tr.dang-chon td, .ng-bang tbody tr.dang-chon td.ng-c0 { background: #dcefdf; }
.ng-bang tbody tr:focus-visible { outline: 2px solid var(--ng-xanh); outline-offset: -2px; }

.ng-dothi { border: 1px solid var(--ng-vien); border-radius: 10px; padding: .75rem 1rem; margin-bottom: .8rem; background: #fcfdfc; }
.ng-dothi-dau { display: flex; gap: .6rem; align-items: baseline; margin-bottom: .5rem; }
.ng-dothi-dau span { font-size: .8rem; color: #6b7a6f; }
.ng-dothi-dau button { margin-left: auto; border: 0; background: none; color: #6b7a6f; }
.ng-cot-dong { display: grid; grid-template-columns: minmax(6rem, 14rem) 1fr 6.5rem; gap: .6rem; align-items: center; font-size: .82rem; padding: .15rem 0; }
.ng-cot-nhan { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3f5045; }
.ng-cot-ray { background: #eef1ee; border-radius: 4px; height: .8rem; overflow: hidden; }
.ng-cot-thanh { display: block; height: 100%; background: linear-gradient(90deg, #2E7D32, #66BB6A); border-radius: 4px; }
.ng-cot-thanh.am { background: linear-gradient(90deg, #c62828, #ef9a9a); }
.ng-cot-gt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.ng-gc { font-size: .8rem; color: #5b6b5f; border-top: 1px dashed var(--ng-vien); padding-top: .5rem; }
.ng-gc p { margin: 0 0 .25rem; }
.ng-nguon-bieu { font-size: .78rem; color: #8a988e; margin-top: .4rem; }

/* ----- theo địa phương ----- */
.ng-dp-loc { display: flex; flex-wrap: wrap; gap: .75rem; background: #fff; border: 1px solid var(--ng-vien); border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; }
.ng-dp-loc label { display: flex; flex-direction: column; gap: .25rem; font-size: .78rem; font-weight: 600; color: #4b5b50; margin: 0; }
.ng-dp-loc select, .ng-dp-loc input { border: 1px solid var(--ng-vien); border-radius: 8px; padding: .45rem .6rem; font-size: .9rem; min-width: 15rem; font-weight: 400; }
.ng-dp-tu { flex: 1; }
.ng-dp-tu input { width: 100%; }
.ng-dp-xoa { align-self: flex-end; display: inline-flex; align-items: center; gap: .35rem; border: 1px solid #e3b4b4; background: #fff5f5; color: #a12a2a; border-radius: 8px; padding: .45rem .8rem; font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ng-dp-xoa:hover, .ng-dp-xoa:focus-visible { background: #fde8e8; border-color: #d48f8f; }
.ng-dp-xoa[hidden] { display: none; }
.ng-dp-dem { font-size: .9rem; margin-bottom: .6rem; color: #3f5045; }
.ng-the { background: #fff; border: 1px solid var(--ng-vien); border-radius: 12px; padding: .8rem 1rem; margin-bottom: .8rem; }
.ng-the header { margin-bottom: .5rem; }
.ng-the-ten { font-weight: 600; color: #15301c; text-decoration: none; }
.ng-the-ten:hover { color: var(--ng-xanh); text-decoration: underline; }
.ng-the small { display: block; color: #7a887e; font-size: .76rem; margin-top: .15rem; }
.ng-bang-nho th { position: static; }
.ng-bang-nho .ng-dong-tde th { background: #eef4ef; }
.ng-the .ng-bang-boc { max-height: none; margin-bottom: 0; }

.ng-bao { position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%); background: #1B5E20; color: #fff; padding: .5rem 1rem;
    border-radius: 8px; font-size: .85rem; z-index: 9999; transition: opacity .4s; }
.ng-bao.an { opacity: 0; }

@media (max-width: 991.98px) {
    .ng-khung { grid-template-columns: 1fr; }
    .ng-trai { position: static; max-height: 60vh; }
    .ng-cc-phai { margin-left: 0; }
}
@media (max-width: 575.98px) {
    .ng-dau { padding: 1rem; }
    .ng-dau-so > div { min-width: 0; flex: 1; }
    .ng-bieu { padding: .8rem; }
    .ng-bang th.ng-c0, .ng-bang td.ng-c0 { min-width: 9rem; }
    .ng-cot-dong { grid-template-columns: 6rem 1fr 5rem; }
    .ng-dp-loc select, .ng-dp-loc input { min-width: 0; width: 100%; }
    .ng-dp-loc label { width: 100%; }
}
@media print {
    .site-header, .ng-dau, .ng-luu-y, .ng-tab, .ng-trai, .ng-cc-phai, .ng-dothi, footer { display: none !important; }
    .ng-khung { display: block; }
    .ng-bieu { border: 0; padding: 0; }
    .ng-bang-boc { max-height: none; overflow: visible; border: 0; }
    .ng-bang th { position: static; }
    .ng-bang td.ng-c0 { position: static; }
}
