/*
 * Khung giao diện: đầu trang, điều hướng, chân trang, tiêu đề trang.
 * Phần bảng số liệu và thẻ dữ liệu nằm trong plugin sis-data (assets/sis.css).
 */

:root {
	--ndv-border: #e2e8f0;
	--ndv-muted: #64748b;
	--ndv-brand: #1d4ed8;
	--ndv-surface: #f8fafc;
	--ndv-header-h: 60px;
}

/* Chữ số trong toàn trang dùng bề rộng cố định để các cột không nhấp nhô. */
body {
	font-variant-numeric: tabular-nums;
	-webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- Đầu trang */

.ndv-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--ndv-border);
	backdrop-filter: saturate(180%) blur(8px);
	background: rgba(255, 255, 255, 0.92) !important;
}

.ndv-header-inner {
	gap: 16px;
	min-height: var(--ndv-header-h);
}

.ndv-brand .wp-block-site-title a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.ndv-header-right {
	gap: 14px;
	flex: 1 1 auto;
	justify-content: flex-end;
	min-width: 0;
}

/* Ô tìm mã trên đầu trang */
.ndv-header .sis-search {
	flex: 0 1 300px;
	min-width: 0;
}

.ndv-nav .wp-block-navigation__container {
	gap: 18px;
}

.ndv-nav a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
	padding: 6px 0;
	border-bottom: 2px solid transparent;
}

.ndv-nav a:hover {
	color: var(--ndv-brand);
	border-bottom-color: var(--ndv-brand);
	text-decoration: none;
}

.ndv-nav .current-menu-item > a,
.ndv-nav .wp-block-navigation-item.current-menu-item a {
	color: var(--ndv-brand);
	border-bottom-color: var(--ndv-brand);
}

/* ------------------------------------------------------------ Thân trang */

.ndv-main {
	min-height: 50vh;
}

.ndv-page-title {
	margin-bottom: var(--wp--preset--spacing--40);
}

/* Trang dữ liệu: tiêu đề gọn, không chiếm nguyên màn hình như theme blog. */
.ndv-data-page .ndv-page-title {
	font-size: 1.5rem;
	margin-bottom: 18px;
}

/* ---------------------------------------------------------- Chân trang */

.ndv-footer {
	border-top: 1px solid var(--ndv-border);
	font-size: 0.875rem;
}

.ndv-footer .wp-block-group {
	gap: 40px;
}

.ndv-footer a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	line-height: 2;
}

.ndv-footer a:hover {
	color: var(--ndv-brand);
	text-decoration: underline;
}

.ndv-foot-h {
	margin-bottom: 4px !important;
}

.ndv-disclaimer {
	border-top: 1px solid var(--ndv-border);
	padding-top: 16px;
	line-height: 1.6;
}

/* --------------------------------------------------------------- Mobile */

@media (max-width: 860px) {
	.ndv-header-inner {
		flex-wrap: wrap;
		gap: 10px;
	}

	.ndv-header-right {
		order: 3;
		flex: 1 1 100%;
		justify-content: space-between;
	}

	.ndv-header .sis-search {
		flex: 1 1 auto;
	}

	.ndv-data-page .ndv-page-title {
		font-size: 1.25rem;
	}
}

/* Nút mở menu trên mobile của block navigation */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--contrast);
}
