/* HVG — domain styles (layout follows Metronic Demo1 / Sổ 133 patterns) */

/* Native date/time: custom calendar icon aligned with kt-input right padding */
.kt-input[type="date"],
.kt-input[type="time"],
.kt-input[type="datetime-local"] {
	position: relative;
	min-width: 0;
	text-align: start;
	padding-inline-end: calc(var(--spacing) * 8);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right calc(var(--spacing) * 3) center;
	background-size: 1rem 1rem;
}

.kt-input[type="date"]::-webkit-calendar-picker-indicator,
.kt-input[type="time"]::-webkit-calendar-picker-indicator,
.kt-input[type="datetime-local"]::-webkit-calendar-picker-indicator {
	position: absolute;
	inset-block: 0;
	inset-inline-end: 0;
	width: calc(var(--spacing) * 8);
	height: 100%;
	margin: 0;
	padding: 0;
	opacity: 0;
	cursor: pointer;
}

.kt-input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.kt-input[type="time"]::-webkit-datetime-edit-fields-wrapper,
.kt-input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
	max-width: 100%;
}

/* Brand primary from HVG logo */
:root {
	--hvg-brand: #136443;
	--hvg-brand-soft: #e8f5ef;
	--primary: #136443;
	--primary-foreground: #ffffff;
	--ring: #136443;
	--color-primary: #136443;
	--color-primary-foreground: #ffffff;
}

.dark {
	--primary: #1a8a5c;
	--primary-foreground: #ffffff;
	--ring: #1a8a5c;
	--color-primary: #1a8a5c;
	--color-primary-foreground: #ffffff;
}

/* Fixed header / sidebar header — opaque brand-tinted background */
#header,
.kt-header.fixed,
#sidebar_header {
	background-color: color-mix(in oklab, var(--background) 88%, transparent);
	background-image: linear-gradient(
		180deg,
		color-mix(in oklab, var(--primary) 14%, transparent) 0%,
		color-mix(in oklab, var(--primary) 6%, transparent) 100%
	);
	backdrop-filter: blur(12px) saturate(1.12);
	-webkit-backdrop-filter: blur(12px) saturate(1.12);
}

#header,
.kt-header.fixed {
	border-bottom: 1px solid color-mix(in oklab, var(--primary) 14%, var(--border));
}

#sidebar_header {
	border-bottom: 1px solid color-mix(in oklab, var(--primary) 14%, var(--border));
	align-content: center;
}

.kt-container-fixed {
	max-width: 100%;
}

.hvg-logo-sidebar {
	max-height: 40px;
	margin: 5px 0;
	width: auto;
	height: auto;
}

.hvg-logo-sidebar-icon {
	display: none;
	width: 32px;
	height: 32px;
	margin: 5px auto;
	object-fit: contain;
	flex-shrink: 0;
}

@media (width >= 1024px) {
	.hvg-logo-sidebar {
		max-height: 52px;
	}

	.hvg-logo-sidebar-icon {
		width: 36px;
		height: 36px;
	}
}

.demo1.kt-sidebar-collapse .kt-sidebar:not(:hover) .hvg-logo-sidebar {
	display: none;
}

.demo1.kt-sidebar-collapse .kt-sidebar:not(:hover) .hvg-logo-sidebar-icon {
	display: block;
}

.demo1.kt-sidebar-collapse .kt-sidebar:not(:hover) .kt-sidebar-logo {
	justify-content: center;
	width: 100%;
}

.hvg-user-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 9999px;
	background: color-mix(in oklab, var(--primary) 14%, var(--background));
	color: var(--primary);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.hvg-dashboard-kpis {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}

@media (width >= 640px) {
	.hvg-dashboard-kpis {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (width >= 1024px) {
	.hvg-dashboard-kpis {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.875rem;
	}
}

.hvg-dashboard-kpis--ops {
	margin-bottom: 1.25rem;
}

@media (width >= 640px) {
	.hvg-dashboard-kpis--ops {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (width >= 1024px) {
	.hvg-dashboard-kpis--ops {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.hvg-dashboard-meta {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (width >= 768px) {
	.hvg-dashboard-meta {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (width >= 1024px) {
	.hvg-dashboard-meta {
		gap: 1.875rem;
	}
}

.hvg-dashboard-meta__card {
	min-width: 0;
	height: 100%;
}

.hvg-dashboard-kpi {
	overflow: hidden;
	background: linear-gradient(180deg,
		color-mix(in oklab, var(--primary) 11%, var(--background)) 0%,
		color-mix(in oklab, var(--muted) 62%, var(--background)) 100%);
}

.hvg-dashboard-kpi__value {
	overflow-wrap: anywhere;
	word-break: break-word;
	line-height: 1.15;
}

.hvg-table {
	border-collapse: collapse;
	border-spacing: 0;
	border: 1px solid color-mix(in oklab, var(--hvg-brand, #136443) 18%, var(--border));
	border-radius: 0.5rem;
	overflow: hidden;
}

.kt-table.hvg-table tr {
	border-bottom: 0;
}

.hvg-table td,
.hvg-table th {
	font-size: 0.875rem;
	border: 1px solid color-mix(in oklab, var(--border) 88%, var(--hvg-brand, #136443));
}

.hvg-table tbody td {
	vertical-align: top;
}

.kt-table.hvg-table thead tr {
	border-bottom: 0;
}

.kt-table.hvg-table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	height: auto;
	min-height: 2.75rem;
	padding: 0.75rem 1rem;
	vertical-align: middle;
	white-space: nowrap;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--hvg-brand, #136443);
	background-color: var(--hvg-brand-soft, #e8f5ef) !important;
	border-color: color-mix(in oklab, var(--hvg-brand, #136443) 22%, var(--border));
	border-bottom-width: 1px;
	box-shadow: none;
}

.dark .kt-table.hvg-table thead th {
	color: color-mix(in oklab, #1a8a5c 85%, white);
	background-color: color-mix(in oklab, #136443 28%, var(--background)) !important;
	border-color: color-mix(in oklab, #1a8a5c 35%, var(--border));
}

.kt-table.hvg-table tbody td {
	padding: 0.75rem 1rem;
	vertical-align: top;
}

.kt-table.hvg-table tbody tr:hover td {
	background-color: color-mix(in oklab, var(--hvg-brand, #136443) 4%, transparent);
}

/* Tables inside p-0 card: flush edge borders with card */
.kt-card-content.p-0 .kt-table.hvg-table {
	border-left: 0;
	border-right: 0;
	border-bottom: 0;
	border-radius: 0;
}

.kt-card-content.p-0 .kt-table.hvg-table thead th:first-child,
.kt-card-content.p-0 .kt-table.hvg-table tbody td:first-child {
	border-left: 0;
}

.kt-card-content.p-0 .kt-table.hvg-table thead th:last-child,
.kt-card-content.p-0 .kt-table.hvg-table tbody td:last-child {
	border-right: 0;
}

/* ApexCharts legend — keep on one horizontal row */
#ops-chart .apexcharts-legend,
.hvg-chart .apexcharts-legend,
.apexcharts-legend.apexcharts-align-center.apx-legend-position-bottom {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	height: auto !important;
	inset: auto !important;
	position: relative !important;
	padding: 0.25rem 0 !important;
}

#ops-chart .apexcharts-legend-series,
.hvg-chart .apexcharts-legend-series,
.apexcharts-legend.apexcharts-align-center.apx-legend-position-bottom .apexcharts-legend-series {
	display: inline-flex !important;
	align-items: center;
	flex: 0 0 auto !important;
	margin: 0 !important;
	padding: 0 0.25rem !important;
	white-space: nowrap;
}

/* Login */
.hvg-login-page {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 100%;
	overflow: hidden;
	background:
		radial-gradient(ellipse at 20% 20%, color-mix(in oklab, var(--primary) 18%, transparent), transparent 55%),
		radial-gradient(ellipse at 80% 80%, color-mix(in oklab, #5b9e7a 20%, transparent), transparent 50%),
		linear-gradient(160deg, color-mix(in oklab, var(--background) 88%, #e8f5ef), var(--background));
}

.hvg-login-ambient {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
}

.hvg-login-orb {
	position: absolute;
	border-radius: 9999px;
	filter: blur(60px);
	opacity: 0.4;
	animation: hvg-login-orb-float 12s ease-in-out infinite;
}

.hvg-login-orb--1 {
	top: 8%;
	left: 12%;
	width: 280px;
	height: 280px;
	background: color-mix(in oklab, var(--primary) 55%, white);
}

.hvg-login-orb--2 {
	right: 10%;
	bottom: 12%;
	width: 320px;
	height: 320px;
	background: color-mix(in oklab, #5b9e7a 55%, var(--primary));
	animation-delay: -4s;
}

.hvg-login-orb--3 {
	top: 42%;
	left: 48%;
	width: 180px;
	height: 180px;
	background: color-mix(in oklab, white 70%, var(--primary));
	animation-delay: -7s;
}

.hvg-login-shell {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr;
	justify-items: center;
	align-items: center;
	gap: clamp(1rem, 3vw, 2.5rem);
	width: min(1100px, 100%);
	padding: clamp(1.25rem, 3vw, 2.5rem);
}

.hvg-login-animate-in {
	animation: hvg-login-fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
	animation-delay: var(--hvg-delay, 0ms);
}

.hvg-login-brand {
	display: none;
	flex-direction: column;
	gap: 0.75rem;
	max-width: 360px;
}

.hvg-login-brand-logo {
	display: block;
	max-height: 72px;
	width: auto;
	border-radius: 0.75rem;
	filter: drop-shadow(0 8px 24px color-mix(in oklab, var(--primary) 25%, transparent));
}

.hvg-login-brand-title {
	margin: 0;
	font-size: clamp(1.75rem, 3.5vw, 2.35rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.03em;
	color: color-mix(in oklab, var(--primary) 85%, #0f172a);
}

.hvg-login-brand-desc {
	margin: 0;
	max-width: 32ch;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: color-mix(in oklab, var(--foreground) 72%, transparent);
}

.hvg-login-features {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.hvg-login-feature {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 0.875rem;
	border: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
	border-radius: 0.875rem;
	background: color-mix(in oklab, white 70%, transparent);
	backdrop-filter: blur(8px);
}

.hvg-login-feature-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 0.75rem;
	background: color-mix(in oklab, var(--primary) 12%, white);
	color: var(--primary);
	flex-shrink: 0;
}

.hvg-login-feature-text {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	min-width: 0;
}

.hvg-login-feature-text strong {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--foreground);
}

.hvg-login-feature-text span {
	font-size: 0.75rem;
	color: var(--muted-foreground);
}

.hvg-login-card-wrap {
	width: 100%;
	max-width: 420px;
	margin-inline: auto;
}

.hvg-login-card {
	position: relative;
	padding: clamp(1.5rem, 3vw, 2rem);
	border: 1px solid color-mix(in oklab, white 70%, var(--border));
	border-radius: 1.5rem;
	background: color-mix(in oklab, white 88%, transparent);
	backdrop-filter: blur(18px);
	box-shadow:
		0 24px 60px color-mix(in oklab, var(--primary) 12%, transparent),
		0 1px 0 color-mix(in oklab, white 80%, transparent) inset;
}

.hvg-login-card-head {
	margin-bottom: 1.5rem;
	text-align: center;
}

.hvg-login-card-logo {
	display: inline-block;
	max-height: 52px;
	width: auto;
	border-radius: 0.625rem;
	margin-bottom: 1rem;
}

.hvg-login-card-title {
	margin: 0 0 0.375rem;
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.2;
	color: color-mix(in oklab, var(--primary) 82%, #0f172a);
}

.hvg-login-card-subtitle {
	margin: 0;
	font-size: 0.875rem;
	color: var(--muted-foreground);
}

.hvg-login-form {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
}

.hvg-login-field {
	position: relative;
}

.hvg-login-field-icon {
	position: absolute;
	top: 50%;
	left: 0.95rem;
	z-index: 1;
	transform: translateY(-50%);
	font-size: 1rem;
	color: color-mix(in oklab, var(--primary) 70%, var(--muted-foreground));
	pointer-events: none;
}

.hvg-login-input {
	width: 100%;
	min-height: 3rem;
	padding-inline-start: 2.75rem !important;
	border-radius: 0.875rem !important;
}

.hvg-login-submit {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	min-height: 3rem;
	margin-top: 0.35rem;
	overflow: hidden;
	border: 0;
	border-radius: 0.875rem;
	background: linear-gradient(135deg, #1a8a5c 0%, var(--hvg-brand, #136443) 55%, #0f4f34 100%);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	cursor: pointer;
	box-shadow:
		0 1px 0 color-mix(in oklab, white 22%, transparent) inset,
		0 12px 28px color-mix(in oklab, var(--hvg-brand, #136443) 32%, transparent);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.hvg-login-submit:hover {
	transform: translateY(-1px);
	filter: brightness(1.04);
	box-shadow:
		0 1px 0 color-mix(in oklab, white 28%, transparent) inset,
		0 16px 34px color-mix(in oklab, var(--hvg-brand, #136443) 40%, transparent);
}

.hvg-login-submit:active {
	transform: translateY(0);
	filter: brightness(0.98);
}

.hvg-login-submit:focus-visible {
	outline: 2px solid color-mix(in oklab, var(--hvg-brand, #136443) 55%, white);
	outline-offset: 2px;
}

.hvg-login-submit > i {
	font-size: 1.05rem;
	opacity: 0.95;
}

.hvg-login-submit-shine {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		110deg,
		transparent 28%,
		color-mix(in oklab, white 42%, transparent) 48%,
		transparent 68%
	);
	transform: translateX(-120%);
	animation: hvg-login-shine 4.2s ease-in-out infinite;
	pointer-events: none;
}

.hvg-login-hint {
	margin: 1rem 0 0;
	font-size: 0.75rem;
	line-height: 1.45;
	color: var(--muted-foreground);
	text-align: center;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hvg-login-error {
	margin: 0 0 0.75rem;
	padding: 0.625rem 0.75rem;
	border-radius: 0.75rem;
	border: 1px solid color-mix(in oklab, var(--destructive) 30%, transparent);
	background: color-mix(in oklab, var(--destructive) 8%, white);
	color: var(--destructive);
	font-size: 0.8125rem;
}

@keyframes hvg-login-fade-up {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes hvg-login-orb-float {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(12px, -16px) scale(1.05); }
}

@keyframes hvg-login-shine {
	0%, 55% { transform: translateX(-120%); }
	75%, 100% { transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
	.hvg-login-submit-shine {
		animation: none;
	}

	.hvg-login-submit:hover {
		transform: none;
	}
}

@media (width >= 1024px) {
	.hvg-login-shell {
		grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
		justify-items: stretch;
	}

	.hvg-login-brand {
		display: flex;
	}

	.hvg-login-card-wrap {
		margin-inline: 0;
	}

	.hvg-login-card-logo {
		display: none;
	}
}

/* —— Period switcher (mine / summary) —— */
.hvg-period-switcher {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
}

.hvg-period-switcher__tabs {
	display: inline-flex;
	padding: 0.2rem;
	border-radius: 0.5rem;
	border: 1px solid var(--border, #e2e8f0);
	background: var(--muted, #f8fafc);
	gap: 0.15rem;
}

.hvg-period-switcher__tab {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 0.45rem 1rem;
	border-radius: 0.375rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--secondary-foreground, #64748b);
	text-decoration: none;
	line-height: 1.2;
	transition: background 0.15s ease, color 0.15s ease;
}

.hvg-period-switcher__tab:hover {
	color: var(--foreground, #0f172a);
	background: color-mix(in oklab, var(--background, #fff) 70%, transparent);
}

.hvg-period-switcher__tab.is-active {
	background: var(--background, #fff);
	color: #136443;
	box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
	font-weight: 600;
}

.hvg-period-switcher__period {
	flex: 1 1 16rem;
	min-width: 14rem;
	max-width: 28rem;
}

.hvg-period-switcher__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media print {
	.no-print { display: none !important; }
	.kt-sidebar, .kt-header { display: none !important; }
	.kt-wrapper { padding: 0 !important; margin: 0 !important; }
}

/* —— Summary report layout (screen + print) —— */
.hvg-summary-body {
	display: grid;
	gap: 1.25rem;
}

.hvg-summary-head {
	display: grid;
	gap: 0.75rem;
}

.hvg-summary-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.hvg-summary-logo {
	height: 2.5rem;
	width: auto;
}

.hvg-summary-title {
	font-weight: 700;
	font-family: var(--font-mono, ui-monospace, monospace);
	line-height: 1.2;
}

.hvg-summary-subtitle {
	font-size: 0.875rem;
	color: var(--secondary-foreground, #64748b);
}

.hvg-summary-meta,
.hvg-summary-kpis {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	font-size: 0.875rem;
	align-items: center;
}

.hvg-summary-section-title {
	font-weight: 600;
	font-family: var(--font-mono, ui-monospace, monospace);
	margin-bottom: 0.5rem;
	font-size: 0.95rem;
}

.hvg-summary-section-row td {
	font-weight: 600;
	background: color-mix(in oklab, var(--accent, #f1f5f9) 40%, transparent);
}

.hvg-summary-footnote {
	font-size: 0.75rem;
	color: var(--muted-foreground, #94a3b8);
	margin: 0;
}

.hvg-summary-table-wrap {
	overflow-x: auto;
	border-radius: 0.5rem;
	border: 1px solid var(--border, #e2e8f0);
}

/* Print preview (print=1) + @media print — weekly = 1 landscape page */
.hvg-summary-print--week {
	box-shadow: none !important;
	border: 1px solid #cbd5e1;
}

.hvg-summary-print--week .hvg-summary-body {
	gap: 0.35rem;
}

.hvg-summary-print--week .hvg-summary-head {
	gap: 0.25rem;
}

.hvg-summary-print--week .hvg-summary-logo {
	height: 1.35rem;
}

.hvg-summary-print--week .hvg-summary-title {
	font-size: 11pt;
}

.hvg-summary-print--week .hvg-summary-subtitle,
.hvg-summary-print--week .hvg-summary-meta,
.hvg-summary-print--week .hvg-summary-kpis {
	font-size: 8pt;
	gap: 0.25rem 0.6rem;
}

.hvg-summary-print--week .hvg-summary-kpis .kt-badge {
	padding: 0.05rem 0.35rem;
	font-size: 7.5pt;
	line-height: 1.2;
}

.hvg-summary-print--week .hvg-summary-section-title {
	font-size: 9pt;
	margin-bottom: 0.2rem;
}

.hvg-summary-print--week .hvg-summary-table-wrap {
	border-radius: 0;
	overflow: visible;
}

.hvg-summary-print--week .hvg-summary-table {
	font-size: 7.5pt;
	line-height: 1.2;
	width: 100%;
	border-collapse: collapse;
}

.hvg-summary-print--week .hvg-summary-table th,
.hvg-summary-print--week .hvg-summary-table td {
	padding: 0.12rem 0.25rem !important;
	vertical-align: top;
	border-color: #cbd5e1 !important;
}

.hvg-summary-print--week .hvg-summary-table th {
	font-size: 7pt;
	white-space: nowrap;
	background: #f1f5f9 !important;
	print-color-adjust: exact;
	-webkit-print-color-adjust: exact;
}

.hvg-summary-print--week .hvg-cell-wrap {
	max-width: 12rem;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.hvg-summary-print--week .hvg-summary-footnote {
	font-size: 7pt;
	margin-top: 0.2rem;
}

.hvg-summary-print--week .kt-badge {
	box-shadow: none;
}

@media print {
	body.hvg-print-week {
		padding: 0 !important;
		background: #fff !important;
	}

	@page hvg-week {
		size: A4 landscape;
		margin: 6mm 7mm;
	}

	body.hvg-print-week {
		page: hvg-week;
	}

	.hvg-summary-print--week {
		border: none !important;
		page-break-inside: avoid;
		break-inside: avoid;
	}

	.hvg-summary-print--week .hvg-summary-page2 {
		display: none !important;
	}

	.hvg-summary-print--month .hvg-summary-page2 {
		page-break-before: always;
		break-before: page;
	}
}

/* —— KT modal fit+center fix ——
   Base .kt-modal sets inset:0. kt-modal-fit.kt-modal-center only overrides
   top + inset-inline-start, so bottom/end stay 0 and the shell stretches to
   half the viewport. Reset inset before centering. */
.kt-modal.kt-modal-fit.kt-modal-center {
	inset: auto;
	top: 50%;
	inset-inline-start: 50%;
	inset-inline-end: auto;
	bottom: auto;
	width: auto;
	max-width: calc(100vw - 2rem);
	max-height: min(90vh, 48rem);
	overflow: visible;
	--tw-translate-x: -50%;
	--tw-translate-y: -50%;
	translate: var(--tw-translate-x) var(--tw-translate-y);
}

/* Shared dialog content — size in CSS (arbitrary Tailwind max-w-[640px] may be missing from Metronic build) */
.hvg-modal-content {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(40rem, calc(100vw - 2rem));
	max-width: min(40rem, calc(100vw - 2rem));
	max-height: min(90vh, 48rem);
	overflow: hidden;
}

.hvg-modal-content > form {
	display: flex;
	flex-direction: column;
	min-height: 0;
	flex: 1 1 auto;
}

.hvg-modal-content .kt-modal-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.hvg-modal-content .kt-modal-header,
.hvg-modal-content .kt-modal-footer {
	flex-shrink: 0;
}

/* —— Global search modal —— */
#search_modal {
	z-index: 110;
}

/* Command palette: neo gần đỉnh viewport — chỉnh trên .kt-modal, không gắn top-* lên .kt-modal-content */
#search_modal.kt-modal-fit.kt-modal-center {
	top: max(1.25rem, 12%);
	--tw-translate-y: 0;
	translate: var(--tw-translate-x) 0;
	max-height: min(85vh, 32rem);
}

#search_modal .hvg-search-modal-content {
	display: flex;
	flex-direction: column;
	width: min(42.5rem, calc(100vw - 2rem));
	max-width: min(42.5rem, calc(100vw - 2rem));
	max-height: min(85vh, 32rem);
	overflow: hidden;
	position: relative;
}

.hvg-search-modal-body {
	flex: 1 1 auto;
	min-height: 10rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.hvg-search-results {
	display: none;
	flex-direction: column;
}

.hvg-search-results:not(.hidden) {
	display: flex;
}

.hvg-search-group + .hvg-search-group {
	border-top: 1px solid var(--border);
}

.hvg-kbd {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.35rem;
	height: 1.35rem;
	padding: 0 0.35rem;
	border: 1px solid var(--border);
	border-radius: 0.3rem;
	background: color-mix(in oklab, var(--muted) 80%, transparent);
	font-family: inherit;
	font-size: 0.625rem;
	font-weight: 600;
	line-height: 1;
	color: var(--muted-foreground);
	text-transform: lowercase;
}

.hvg-search-hint {
	padding: 1.75rem 1rem 1.25rem;
}

.hvg-search-hint__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.875rem;
	max-width: 24rem;
	margin: 0 auto;
	text-align: center;
}

.hvg-search-hint__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 1rem;
	background: color-mix(in oklab, var(--primary) 10%, transparent);
	color: var(--primary);
}

.hvg-search-hint__icon i {
	font-size: 1.25rem;
}

.hvg-search-hint__copy {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.hvg-search-hint__title {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--foreground);
}

.hvg-search-hint__message {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--secondary-foreground);
}

.hvg-search-hint__shortcuts {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem 1rem;
	margin-top: 0.25rem;
}

.hvg-search-hint__shortcut {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.75rem;
	color: var(--muted-foreground);
}

.hvg-search-hint--compact .hvg-search-hint__icon,
.hvg-search-hint--compact .hvg-search-hint__shortcuts {
	display: none;
}

.hvg-search-hint--compact {
	padding: 1rem;
}

.hvg-search-hint--compact .hvg-search-hint__inner {
	max-width: none;
}

.hvg-search-empty,
.hvg-search-loading {
	padding: 2rem 1rem;
}

.hvg-search-empty__inner,
.hvg-search-loading__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.875rem;
	max-width: 22rem;
	margin: 0 auto;
	text-align: center;
}

.hvg-search-empty__icon,
.hvg-search-loading__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 1rem;
	background: color-mix(in oklab, var(--muted) 70%, transparent);
	color: var(--muted-foreground);
}

.hvg-search-empty--error .hvg-search-empty__icon {
	background: color-mix(in oklab, var(--destructive, #dc2626) 12%, transparent);
	color: var(--destructive, #dc2626);
}

.hvg-search-empty__title,
.hvg-search-loading__title {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--foreground);
}

.hvg-search-empty__message,
.hvg-search-loading__message {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--secondary-foreground);
}

.hvg-search-loading__spinner {
	font-size: 1.25rem;
	animation: hvg-spin 1s linear infinite;
}

@keyframes hvg-spin {
	to { transform: rotate(360deg); }
}

.hvg-search-result--active,
.hvg-search-result:focus-visible {
	background: color-mix(in oklab, var(--accent) 60%, transparent);
	outline: none;
}

/* —— Help layout —— */
.hvg-help-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	padding-bottom: 1.5rem;
}

@media (width >= 1024px) {
	.hvg-help-layout {
		grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
		gap: 1.875rem;
	}

	.hvg-help-nav__card {
		position: sticky;
		top: 6rem;
	}
}

.hvg-meetings-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (width >= 1024px) {
	.hvg-meetings-layout {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.875rem;
	}
}

.hvg-meeting-datetime-grid,
.hvg-form-grid-2 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (width >= 640px) {
	.hvg-meeting-datetime-grid,
	.hvg-form-grid-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.hvg-form-grid-3 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.hvg-form-grid-3.gap-2 {
	gap: 0.5rem;
}

/* User form: khi sửa ẩn username → mật khẩu full hàng */
[data-hvg-user-credentials].is-edit [data-hvg-user-password-wrap] {
	grid-column: 1 / -1;
}

@media (width >= 640px) {
	.hvg-form-grid-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.hvg-form-grid-metrics {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

@media (width >= 768px) {
	.hvg-form-grid-metrics {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Report edit — fullscreen focus mode */
.hvg-report-workspace__toolbar {
	position: relative;
}

body.hvg-report-focus {
	overflow: hidden;
}

body.hvg-report-focus .kt-sidebar,
body.hvg-report-focus .kt-header {
	visibility: hidden;
	pointer-events: none;
}

body.hvg-report-focus .hvg-report-workspace {
	position: fixed;
	inset: 0;
	z-index: 90;
	overflow: auto;
	overscroll-behavior: contain;
	background: var(--background, #fff);
	padding: 1.25rem clamp(1rem, 3vw, 2rem) 2rem;
	display: grid;
	gap: 1.25rem;
	align-content: start;
}

body.hvg-report-focus .hvg-report-workspace__toolbar {
	position: sticky;
	top: 0;
	z-index: 2;
	background: color-mix(in oklab, var(--background, #fff) 92%, transparent);
	backdrop-filter: blur(8px);
	padding-block: 0.75rem;
	margin-block: -0.25rem 0;
	border-bottom: 1px solid var(--border, #e2e8f0);
}

body.hvg-report-focus .hvg-report-workspace__nav {
	display: none;
}

body.hvg-report-focus .hvg-report-workspace__actions {
	position: sticky;
	bottom: 0;
	z-index: 2;
	margin-top: 0.5rem;
	padding: 0.85rem 1rem;
	border-radius: 0.5rem;
	border: 1px solid var(--border, #e2e8f0);
	background: color-mix(in oklab, var(--background, #fff) 94%, transparent);
	backdrop-filter: blur(8px);
	box-shadow: 0 -4px 16px rgb(15 23 42 / 0.06);
}

body.hvg-report-focus #hvg_report_expand_btn {
	color: #136443;
	border-color: color-mix(in oklab, #136443 35%, var(--border, #e2e8f0));
	background: var(--hvg-brand-soft, #e8f5ef);
}

/* Form / detail modals */
#meeting_form_modal,
#meeting_view_modal {
	z-index: 110;
}

