:root {
	--bg-body: #f4f7f6;
	--bg-card: #ffffff;
	--bg-card-hover: #f9fafb;
	--text-main: #000000;
	--text-muted: #051124;
	--text-placeholder: #9b8f89;
	/* Màu Đỏ Chủ Đạo */
	--primary: #da251d;
	--primary-hover: #b51e18;
	--success: #10b981;
	--warning: #f59e0b;
	--danger: #ef4444;
	--border-color: #e5e7eb;
	--task-status-draft-bg: #f3f4f6;
	--task-status-draft-border: #d1d5db;
	--task-status-draft-text: #374151;
	--task-status-intermediate-bg: #fffbeb;
	--task-status-intermediate-border: #fcd34d;
	--task-status-intermediate-text: #92400e;
	--task-status-active-bg: #eff6ff;
	--task-status-active-border: #93c5fd;
	--task-status-active-text: #1d4ed8;
	--task-status-done-bg: #ecfdf5;
	--task-status-done-border: #86efac;
	--task-status-done-text: #047857;
	--task-rating-excellent-bg: #f5f3ff;
	--task-rating-excellent-border: #c4b5fd;
	--task-rating-excellent-text: #6d28d9;
	--task-rating-good-bg: #ecfdf5;
	--task-rating-good-border: #86efac;
	--task-rating-good-text: #047857;
	--task-rating-complete-bg: #eff6ff;
	--task-rating-complete-border: #93c5fd;
	--task-rating-complete-text: #1d4ed8;
	--task-rating-fail-bg: #fef2f2;
	--task-rating-fail-border: #fecaca;
	--task-rating-fail-text: #b91c1c;
	--font-size-caption: 14px;
	--font-size-badge-xs: 0.6875rem;
	--font-size-body: 14px;
	--font-size-title-sm: 16px;
	--font-size-title-md: 18px;
	--font-size-title-lg: 20px;
	--font-size-title-xl: 22px;
	--font-size-heading-sm: 24px;
	--font-size-heading-md: 28px;
	--font-size-heading-lg: 32px;
	--font-size-display-md: 36px;
	--font-size-display-lg: 48px;
	--task-wide-modal-width: min(96vw, 82.5rem);
	--task-wide-modal-max-height: min(94vh, 53.75rem);
	--task-table-col-stt: 5%;
	--task-table-col-content: 27%;
	--task-table-col-assignee: 13%;
	--task-table-col-drafter: 9%;
	--task-table-col-doc: 11%;
	--task-table-col-deadline: 10%;
	--task-table-col-status: 13%;
	--task-table-col-actions: 12%;
	--task-process-line: #e8d8d3;
	--task-process-marker: #aa7a70;
	--task-process-text: #111111;
	--task-process-card-border: #eadbd7;
	--task-process-card-bg: #ffffff;
	--notification-button-bg: #ffffff;
	--notification-button-bg-active: #ffffff;
	--notification-button-border: #fecaca;
	--notification-button-border-active: #fca5a5;
	--notification-button-shadow: 0 0.15rem 0.45rem rgba(218, 37, 29, 0.16);
	--notification-button-shadow-active: 0 0.2rem 0.65rem rgba(218, 37, 29, 0.22);
	--notification-ring-border: rgba(218, 37, 29, 0.3);
	--notification-badge-shadow: 0 0.12rem 0.35rem rgba(218, 37, 29, 0.28);
	--task-detail-font-size: var(--font-size-body);
	--task-detail-line-height: 1.45;
	--task-detail-label-font-weight: 700;
	--task-detail-value-font-weight: 500;
	--font-family: Arial, Helvetica, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--sidebar-width: 13.75rem;
	--sidebar-collapsed-width: 4.375rem;
	--sidebar-mobile-width: 17.5rem;
}

@media (max-width: 900px) {
	:root {
		--task-wide-modal-width: calc(100vw - 1.5rem);
		--task-wide-modal-max-height: calc(100vh - 1.5rem);
	}
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.is-hidden {
	display: none !important;
}

/* Rule #12: Never use default browser spin arrows on input type="number" */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

input[type="number"] {
	-moz-appearance: textfield;
	/* Firefox */
}

input::placeholder,
textarea::placeholder {
	color: var(--text-placeholder);
	opacity: 1;
}

.task-status-pill,
.task-status-badge,
.task-handoff-status-badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	padding: 5px 10px;
	border: 1px solid var(--task-status-intermediate-border);
	border-radius: 999px;
	background: var(--task-status-intermediate-bg);
	color: var(--task-status-intermediate-text);
	font-size: var(--font-size-body);
	font-weight: 800;
	line-height: 1.2;
	white-space: nowrap;
}

.task-handoff-status-badge {
	font-size: var(--font-size-body);
}

.task-status-pill.draft,
.task-status-badge.draft,
.task-handoff-status-badge.draft {
	border-color: var(--task-status-draft-border);
	background: var(--task-status-draft-bg);
	color: var(--task-status-draft-text);
}

.task-status-pill.intermediate,
.task-status-badge.intermediate,
.task-handoff-status-badge.intermediate,
.task-status-pill.pending,
.task-status-badge.pending,
.task-handoff-status-badge.pending,
.task-status-pill.report,
.task-status-badge.report,
.task-handoff-status-badge.report,
.task-status-pill.score,
.task-status-badge.score,
.task-handoff-status-badge.score,
.task-status-pill.returned,
.task-status-badge.returned,
.task-handoff-status-badge.returned,
.task-status-pill.approved,
.task-status-badge.approved,
.task-handoff-status-badge.approved {
	border-color: var(--task-status-intermediate-border);
	background: var(--task-status-intermediate-bg);
	color: var(--task-status-intermediate-text);
}

.task-status-pill.active,
.task-status-badge.active,
.task-handoff-status-badge.active {
	border-color: var(--task-status-active-border);
	background: var(--task-status-active-bg);
	color: var(--task-status-active-text);
}

.task-status-pill.done,
.task-status-badge.done,
.task-handoff-status-badge.done {
	border-color: var(--task-status-done-border);
	background: var(--task-status-done-bg);
	color: var(--task-status-done-text);
}

.task-rating-badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	padding: 5px 10px;
	border: 1px solid var(--task-rating-complete-border);
	border-radius: 999px;
	background: var(--task-rating-complete-bg);
	color: var(--task-rating-complete-text);
	font-size: var(--font-size-body);
	font-weight: 800;
	line-height: 1.2;
	white-space: nowrap;
}

.task-rating-badge.rating-excellent,
.task-status-badge.rating-excellent {
	border-color: var(--task-rating-excellent-border);
	background: var(--task-rating-excellent-bg);
	color: var(--task-rating-excellent-text);
}

.task-rating-badge.rating-good,
.task-status-badge.rating-good {
	border-color: var(--task-rating-good-border);
	background: var(--task-rating-good-bg);
	color: var(--task-rating-good-text);
}

.task-rating-badge.rating-complete,
.task-status-badge.rating-complete {
	border-color: var(--task-rating-complete-border);
	background: var(--task-rating-complete-bg);
	color: var(--task-rating-complete-text);
}

.task-rating-badge.rating-fail,
.task-status-badge.rating-fail {
	border-color: var(--task-rating-fail-border);
	background: var(--task-rating-fail-bg);
	color: var(--task-rating-fail-text);
}

.task-source-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	width: fit-content;
	max-width: 100%;
	padding: 0.22rem 0.45rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-family: var(--font-family);
	font-size: var(--font-size-caption);
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
	vertical-align: middle;
}

.task-source-badge--compact {
	padding: 0.18rem 0.38rem;
}

.task-source-badge--directive {
	border-color: #fecaca;
	background: #fff1f2;
	color: #b71914;
}

.task-source-badge--normal {
	border-color: #bbf7d0;
	background: #ecfdf5;
	color: #047857;
}

.task-source-badge-icon {
	width: 0.88rem;
	height: 0.88rem;
	flex: 0 0 auto;
	stroke-width: 2.4;
}

.task-source-badge span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.task-table-title .task-source-badge,
.report-task-detail-link .task-source-badge,
.dashboard-active-content .task-source-badge,
.approval-modal-head h3 .task-source-badge,
.scoring-modal-head h3 .task-source-badge,
.report-task-content .task-source-badge {
	margin-left: 0.4rem;
}

.task-management-table tbody tr:not(.task-table-group-row)>td {
	text-align: center;
	vertical-align: middle;
}

.task-management-table tbody tr:not(.task-table-group-row)>td .task-table-title {
	display: block;
	width: 100%;
	text-align: left;
}

.task-management-table tbody tr:not(.task-table-group-row)>td.task-content-cell {
	text-align: left;
}

.task-management-table tbody tr:not(.task-table-group-row)>td.task-content-cell .task-title-wrap {
	justify-content: flex-start;
}

.task-management-table tbody tr:not(.task-table-group-row)>td .task-status-stack {
	align-items: center;
}

.notification-root {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.notification-button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid var(--notification-button-border);
	border-radius: 999px;
	background: var(--notification-button-bg);
	color: var(--primary);
	cursor: pointer;
	box-shadow: var(--notification-button-shadow);
	transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.notification-button:hover,
.notification-root.has-unread .notification-button {
	background: var(--notification-button-bg-active);
	border-color: var(--notification-button-border-active);
	box-shadow: var(--notification-button-shadow-active);
	transform: translateY(-0.0625rem);
}

.notification-button svg {
	width: 1.25rem;
	height: 1.25rem;
	stroke-width: 2.35;
	transform-box: fill-box;
	transform-origin: 50% 10%;
}

.notification-root.has-unread .notification-button::after {
	content: "";
	position: absolute;
	inset: -0.28rem;
	border: 1px solid var(--notification-ring-border);
	border-radius: 999px;
	animation: notification-attention-ring 1.8s ease-out infinite;
	pointer-events: none;
}

.notification-root.has-unread .notification-button svg {
	animation: notification-bell-ring 1.1s ease-in-out infinite;
}

.notification-count {
	position: absolute;
	top: -0.15rem;
	right: -0.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.2rem;
	height: 1.2rem;
	padding: 0 5px;
	border: 0.1rem solid #ffffff;
	border-radius: 999px;
	background: var(--primary);
	color: #ffffff;
	font-size: var(--font-size-caption);
	font-weight: 800;
	line-height: 1;
	box-shadow: var(--notification-badge-shadow);
}

.notification-count[hidden] {
	display: none;
}

@keyframes notification-bell-ring {

	0%,
	100% {
		transform: rotate(0deg);
	}

	12% {
		transform: rotate(14deg);
	}

	24% {
		transform: rotate(-12deg);
	}

	36% {
		transform: rotate(9deg);
	}

	48% {
		transform: rotate(-6deg);
	}

	60% {
		transform: rotate(3deg);
	}

	72% {
		transform: rotate(0deg);
	}
}

@keyframes notification-attention-ring {
	0% {
		opacity: 0.72;
		transform: scale(0.9);
	}

	100% {
		opacity: 0;
		transform: scale(1.18);
	}
}

@media (prefers-reduced-motion: reduce) {

	.notification-root.has-unread .notification-button svg,
	.notification-root.has-unread .notification-button::after {
		animation: none;
	}
}

.onboarding-help-button,
.onboarding-context-help-button {
	align-items: center;
	background: #fff;
	border: 1px solid #fecaca;
	border-radius: 999px;
	box-shadow: 0 0.15rem 0.45rem rgba(218, 37, 29, 0.16);
	color: var(--primary);
	cursor: pointer;
	display: inline-flex;
	height: 2rem;
	justify-content: center;
	width: 2rem;
}

.onboarding-help-button:hover,
.onboarding-help-button:focus-visible,
.onboarding-context-help-button:hover,
.onboarding-context-help-button:focus-visible {
	background: #fff7f6;
	border-color: #fca5a5;
	box-shadow: 0 0.2rem 0.65rem rgba(218, 37, 29, 0.22);
	outline: none;
}

.onboarding-help-button svg,
.onboarding-context-help-button svg {
	fill: none;
	height: 1.15rem;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2.2;
	width: 1.15rem;
}

.onboarding-screen-help-button-inline {
	align-self: center;
	flex: 0 0 2rem;
	margin-left: auto;
}

.task-management-tabs:not(.directive-tabs) .onboarding-screen-help-button-inline {
	align-self: center;
	flex: 0 0 1.75rem;
	height: 1.75rem;
	margin-left: auto;
	width: 1.75rem;
}

.directive-tabs .onboarding-screen-help-button-inline {
	align-self: center;
	flex-basis: 1.75rem;
	height: 1.75rem;
	margin-left: -0.45rem;
	width: 1.75rem;
}

.task-management-tabs .onboarding-screen-help-button-inline svg,
.directive-tabs .onboarding-screen-help-button-inline svg {
	height: 1rem;
	width: 1rem;
}

.report-export-field .onboarding-report-help-button {
	align-self: flex-end;
	flex: 0 0 2rem;
	margin-left: 0.35rem;
}

.header-actions .onboarding-screen-help-button-header {
	flex: 0 0 2rem;
	order: -1;
}

.onboarding-screen-help-scope {
	position: relative;
}

.onboarding-screen-help-button-floating {
	position: absolute;
	right: 0.65rem;
	top: 0.65rem;
	z-index: 18;
}

.onboarding-modal-help-button {
	flex: 0 0 2rem;
	margin-left: auto;
	margin-right: 0.45rem;
}

.report-page .onboarding-screen-help-button-floating {
	top: 3.15rem;
}

.dashboard-shell .onboarding-screen-help-button-floating,
.org-tree-shell .onboarding-screen-help-button-floating {
	top: 0.5rem;
}

.onboarding-guide-root {
	--onboarding-progress: 0%;
	inset: 0;
	pointer-events: none;
	position: fixed;
	z-index: 11000;
}

.onboarding-guide-spotlight {
	border: 2px solid rgba(255, 221, 87, 0.96);
	border-radius: 0.8rem;
	box-shadow: 0 0 0 999rem rgba(7, 9, 18, 0.6), 0 0 0.9rem rgba(255, 221, 87, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.85);
	height: var(--onboarding-spotlight-height, 0);
	left: var(--onboarding-spotlight-left, 50%);
	pointer-events: none;
	position: fixed;
	top: var(--onboarding-spotlight-top, 50%);
	transition: top 0.24s ease, left 0.24s ease, width 0.24s ease, height 0.24s ease, opacity 0.18s ease;
	width: var(--onboarding-spotlight-width, 0);
}

.onboarding-guide-bubble {
	background: #fff;
	border: 1px solid #f1c9c5;
	border-radius: 0.5rem;
	box-shadow: 0 1.2rem 3rem rgba(7, 9, 18, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.78);
	color: var(--text-main);
	display: flex;
	flex-direction: column;
	left: var(--onboarding-bubble-left, 50%);
	max-height: min(78vh, 34rem);
	max-width: min(38rem, calc(100vw - 2rem));
	overflow: hidden;
	pointer-events: auto;
	position: fixed;
	top: var(--onboarding-bubble-top, 50%);
	transform: translateY(0) scale(1);
	transition: left 0.24s ease, top 0.24s ease, transform 0.18s ease, opacity 0.18s ease;
	width: min(38rem, calc(100vw - 2rem));
}

.onboarding-guide-bubble::before {
	display: none;
}

.onboarding-guide-root.is-center .onboarding-guide-bubble {
	transform: translate(-50%, -50%);
}

.onboarding-guide-root.is-moving .onboarding-guide-bubble {
	transform: translateY(0.15rem) scale(0.99);
}

.onboarding-guide-root.is-center.is-moving .onboarding-guide-bubble {
	transform: translate(-50%, -50%) scale(0.99);
}

.onboarding-guide-root.is-center .onboarding-guide-spotlight {
	background: rgba(7, 9, 18, 0.58);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	height: auto;
	inset: 0;
	width: auto;
}

.onboarding-guide-head {
	align-items: center;
	background: #fffafa;
	border-bottom: 1px solid #f5d5d1;
	border-radius: 0.5rem 0.5rem 0 0;
	display: flex;
	flex-shrink: 0;
	gap: 0.6rem;
	justify-content: space-between;
	padding: 0.8rem 1rem;
}

.onboarding-guide-speaker {
	display: block;
}

.onboarding-guide-speaker span {
	color: var(--primary);
	font-size: var(--font-size-title-sm);
	font-weight: 800;
	line-height: 1.25;
}

.onboarding-guide-count {
	align-items: center;
	background: #fff;
	border: 1px solid #ffd4d0;
	border-radius: 0.4rem;
	color: var(--primary);
	display: inline-flex;
	font-size: var(--font-size-caption);
	font-weight: 900;
	justify-content: center;
	line-height: 1;
	min-height: 1.6rem;
	min-width: 2.6rem;
	padding: 0 0.45rem;
}

.onboarding-guide-progress {
	background: #ffe4e1;
	flex-shrink: 0;
	height: 0.25rem;
	overflow: hidden;
}

.onboarding-guide-progress span {
	background: linear-gradient(90deg, var(--primary), #f59e0b);
	display: block;
	height: 100%;
	transition: width 0.22s ease;
	width: var(--onboarding-progress, 0%);
}

.onboarding-guide-copy {
	background: #fff;
	min-height: 0;
	overflow-y: auto;
	padding: 1rem;
}

.onboarding-guide-copy h3 {
	color: var(--text-main);
	font-size: var(--font-size-title-md);
	font-weight: 800;
	line-height: 1.3;
}

.onboarding-guide-document {
	border-left: 0.18rem solid #f2a29b;
	display: grid;
	gap: 0.55rem;
	margin-top: 0.75rem;
	padding-left: 0.85rem;
}

.onboarding-guide-document p {
	color: var(--text-main);
	font-size: var(--font-size-body);
	font-weight: 500;
	line-height: 1.65;
	overflow-wrap: break-word;
}

.onboarding-guide-actions {
	align-items: center;
	background: #fffafa;
	border-top: 1px solid #f5d5d1;
	display: flex;
	flex-shrink: 0;
	gap: 0.5rem;
	justify-content: space-between;
	padding: 0.75rem 1rem;
}

.onboarding-guide-step-actions {
	display: inline-flex;
	gap: 0.45rem;
}

.onboarding-guide-primary,
.onboarding-guide-secondary,
.onboarding-guide-ghost {
	align-items: center;
	border-radius: 0.4rem;
	cursor: pointer;
	display: inline-flex;
	font-family: var(--font-family);
	font-size: var(--font-size-body);
	font-weight: 800;
	justify-content: center;
	line-height: 1.2;
	min-height: 2rem;
	padding: 0.42rem 0.75rem;
}

.onboarding-guide-primary {
	background: var(--primary);
	border: 1px solid var(--primary);
	color: #fff;
}

.onboarding-guide-secondary,
.onboarding-guide-ghost {
	background: #fff;
	border: 1px solid #f5b4ae;
	color: var(--primary);
}

.onboarding-guide-primary:hover,
.onboarding-guide-primary:focus-visible {
	background: var(--primary-hover);
	border-color: var(--primary-hover);
	outline: none;
}

.onboarding-guide-secondary:hover,
.onboarding-guide-secondary:focus-visible,
.onboarding-guide-ghost:hover,
.onboarding-guide-ghost:focus-visible {
	background: #fff7f6;
	outline: none;
}

.onboarding-guide-ghost:disabled {
	cursor: default;
	opacity: 0.45;
}

.onboarding-guide-character {
	left: var(--onboarding-character-left, 1rem);
	pointer-events: none;
	position: fixed;
	top: var(--onboarding-character-top, 1rem);
	transition: top 0.24s ease, left 0.24s ease, transform 0.2s ease, opacity 0.18s ease;
	width: 8.75rem;
}

.onboarding-character-stage {
	filter: drop-shadow(0 0.7rem 1.15rem rgba(7, 9, 18, 0.22));
	transform-origin: center bottom;
}

.onboarding-character-svg {
	display: block;
	overflow: visible;
	width: 100%;
}

.onboarding-character-shadow {
	fill: rgba(7, 9, 18, 0.16);
}

.onboarding-character-float {
	animation: onboarding-character-float 3.2s ease-in-out infinite;
}

.onboarding-character-cape {
	fill: #7f1d1d;
	opacity: 0.14;
}

.onboarding-character-glow {
	fill: url(#onboardingCharacterGlow);
	opacity: 0.85;
}

.onboarding-character-jacket {
	fill: url(#onboardingCharacterJacket);
}

.onboarding-character-shirt {
	fill: url(#onboardingCharacterShirt);
}

.onboarding-character-lapel {
	fill: rgba(127, 29, 29, 0.32);
	stroke: rgba(255, 255, 255, 0.28);
	stroke-linejoin: round;
	stroke-width: 1.2;
}

.onboarding-character-collar {
	fill: #fffaf4;
	stroke: #ffe0c2;
	stroke-linejoin: round;
	stroke-width: 1.4;
}

.onboarding-character-tie,
.onboarding-character-badge circle {
	fill: #ffd84d;
}

.onboarding-character-badge-ring {
	fill: #fffaf4;
}

.onboarding-character-neck,
.onboarding-character-ear,
.onboarding-character-hand {
	fill: #ffd6a5;
	stroke: #ffbf7a;
	stroke-width: 2;
}

.onboarding-character-head {
	fill: url(#onboardingCharacterFace);
	stroke: #ffbf7a;
	stroke-width: 2;
}

.onboarding-character-hair {
	fill: url(#onboardingCharacterHair);
}

.onboarding-character-hair-side {
	fill: #3a1212;
	opacity: 0.92;
}

.onboarding-character-hair-shine,
.onboarding-character-brow {
	fill: none;
	stroke: rgba(20, 20, 19, 0.55);
	stroke-linecap: round;
	stroke-width: 3;
}

.onboarding-character-hair-shine {
	stroke: rgba(255, 255, 255, 0.34);
}

.onboarding-character-cheek {
	fill: #ff9f88;
	opacity: 0.24;
}

.onboarding-character-eye {
	animation: onboarding-character-blink 4.8s ease-in-out infinite;
	fill: #141413;
	transform-box: fill-box;
	transform-origin: center;
}

.onboarding-character-smile,
.onboarding-character-badge path {
	fill: none;
	stroke: #141413;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 3.6;
}

.onboarding-character-arm {
	transform-box: fill-box;
	transform-origin: center center;
}

.onboarding-character-arm path:first-child {
	fill: none;
	stroke: #b91c1c;
	stroke-linecap: round;
	stroke-width: 10.5;
}

.onboarding-character-pointer {
	stroke: #ffd84d;
	stroke-width: 4;
}

.onboarding-character-sparkles {
	fill: #ffd84d;
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
}

.onboarding-guide-root[data-character-state="welcome"] .onboarding-character-arm-right {
	animation: onboarding-character-wave 1.2s ease-in-out infinite;
}

.onboarding-guide-root[data-character-state="point"] .onboarding-character-arm-right {
	transform: rotate(-8deg) translateY(-0.25rem);
}

.onboarding-guide-root[data-character-state="explain"] .onboarding-character-arm-left {
	animation: onboarding-character-explain 1.8s ease-in-out infinite;
}

.onboarding-guide-root[data-character-state="success"] .onboarding-character-sparkles {
	animation: onboarding-character-sparkle 1.2s ease-in-out infinite;
	opacity: 1;
}

.onboarding-guide-root[data-character-state="success"] .onboarding-character-arm-right {
	animation: onboarding-character-celebrate 1.1s ease-in-out infinite;
}

.onboarding-guide-root[data-gesture="left"] .onboarding-character-stage {
	transform: scaleX(-1);
}

.onboarding-guide-root[data-gesture="up"] .onboarding-character-arm-right {
	transform: rotate(-18deg) translateY(-0.45rem);
}

.onboarding-guide-root[data-gesture="down"] .onboarding-character-arm-right {
	transform: rotate(16deg) translateY(0.25rem);
}

@keyframes onboarding-character-float {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-0.3rem);
	}
}

@keyframes onboarding-character-wave {
	0%,
	100% {
		transform: rotate(-10deg);
	}

	50% {
		transform: rotate(13deg) translateY(-0.25rem);
	}
}

@keyframes onboarding-character-explain {
	0%,
	100% {
		transform: rotate(0deg);
	}

	50% {
		transform: rotate(-8deg) translateY(-0.2rem);
	}
}

@keyframes onboarding-character-celebrate {
	0%,
	100% {
		transform: rotate(-12deg) translateY(-0.25rem);
	}

	50% {
		transform: rotate(8deg) translateY(-0.55rem);
	}
}

@keyframes onboarding-character-sparkle {
	0%,
	100% {
		opacity: 0.35;
		transform: scale(0.88);
	}

	50% {
		opacity: 1;
		transform: scale(1.08);
	}
}

@keyframes onboarding-character-blink {
	0%,
	92%,
	100% {
		transform: scaleY(1);
	}

	95% {
		transform: scaleY(0.15);
	}
}

@media (prefers-reduced-motion: reduce) {
	.onboarding-guide-spotlight,
	.onboarding-guide-bubble,
	.onboarding-guide-character,
	.onboarding-guide-progress span,
	.onboarding-character-float,
	.onboarding-character-arm,
	.onboarding-character-sparkles,
	.onboarding-character-eye {
		animation: none !important;
		transition: none !important;
	}
}

@media (max-width: 720px) {
	.onboarding-guide-bubble {
		bottom: 1rem;
		left: 1rem;
		max-height: calc(100vh - 8.25rem);
		max-width: calc(100vw - 2rem);
		overflow-y: auto;
		right: 1rem;
		top: auto;
		transform: none;
		width: calc(100vw - 2rem);
	}

	.onboarding-guide-bubble::before {
		display: none;
	}

	.onboarding-guide-root.is-center .onboarding-guide-bubble {
		transform: none;
	}

	.onboarding-guide-character {
		left: 0.8rem;
		top: 0.8rem;
		width: 6rem;
	}

	.onboarding-guide-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.onboarding-guide-step-actions {
		justify-content: flex-end;
	}
}

.notification-panel {
	position: absolute;
	top: calc(100% + 0.6rem);
	right: 0;
	z-index: 1200;
	width: min(24rem, calc(100vw - 2rem));
	max-height: min(70vh, 30rem);
	overflow: hidden;
	border: 1px solid #f3c7c3;
	border-radius: 0.5rem;
	background: #ffffff;
	box-shadow: 0 1.5rem 4rem rgba(17, 17, 17, 0.18);
}

.notification-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 10px;
	border-bottom: 1px solid #f8d9d6;
	color: var(--text-main);
}

.notification-panel-head strong {
	font-size: var(--font-size-title-sm);
	font-weight: 800;
}

.notification-read-all {
	border: 0;
	background: transparent;
	color: var(--primary);
	font-size: var(--font-size-body);
	font-weight: 700;
	cursor: pointer;
}

.notification-list {
	max-height: min(60vh, 25rem);
	overflow: auto;
}

.notification-item {
	display: grid;
	grid-template-columns: 0.55rem minmax(0, 1fr);
	gap: 0.65rem;
	width: 100%;
	border: 0;
	border-bottom: 1px solid #f6e5e2;
	background: #ffffff;
	padding: 10px;
	color: var(--text-main);
	text-align: left;
	cursor: pointer;
}

.notification-item:hover,
.notification-item.unread {
	background: #fff8f7;
}

.notification-dot {
	width: 0.5rem;
	height: 0.5rem;
	margin-top: 0.4rem;
	border-radius: 999px;
	background: #f0b9b4;
}

.notification-item.unread .notification-dot {
	background: var(--primary);
}

.notification-content {
	display: grid;
	gap: 0.2rem;
	min-width: 0;
}

.notification-content strong {
	color: var(--text-main);
	font-size: var(--font-size-body);
	font-weight: 800;
}

.notification-content span,
.notification-content time {
	color: var(--text-main);
	font-size: var(--font-size-body);
	line-height: 1.35;
}

.notification-content time {
	color: #8f3b35;
}

.notification-empty {
	padding: 10px;
	color: var(--text-main);
	font-size: var(--font-size-body);
}

.task-process-timeline {
	width: 100%;
	min-width: 0;
}

.task-process-group-list {
	display: grid;
	gap: 10px;
	width: 100%;
	min-width: 0;
}

.task-process-group {
	display: grid;
	gap: 10px;
	min-width: 0;
	padding: 10px;
	border: 1px solid var(--task-process-card-border);
	border-radius: 8px;
	background: var(--task-process-card-bg);
}

.task-process-group-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-width: 0;
}

.task-process-group-title {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	color: var(--task-process-text);
	font-size: var(--task-detail-font-size);
	font-weight: var(--task-detail-label-font-weight);
	line-height: var(--task-detail-line-height);
}

.task-process-group-title strong {
	min-width: 0;
	color: var(--task-process-text);
	font-size: var(--task-detail-font-size);
	font-weight: var(--task-detail-label-font-weight);
	line-height: var(--task-detail-line-height);
	word-break: break-word;
}

.task-process-group-index {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border: 1px solid #f1c9c2;
	border-radius: 999px;
	background: #fff8f7;
	color: var(--primary);
	font-size: var(--task-detail-font-size);
	font-weight: 800;
	line-height: 1;
}

.task-process-group-index.is-common {
	width: auto;
	min-width: 54px;
	padding: 0 8px;
}

.task-process-group-summary {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
}

.task-process-list {
	position: relative;
	display: grid;
	gap: 8px;
	width: 100%;
	min-width: 0;
	padding: 6px 0;
}

.task-process-list::before {
	content: '';
	position: absolute;
	left: 5px;
	top: 12px;
	bottom: 12px;
	width: 1px;
	background: var(--task-process-line);
}

.task-process-item {
	position: relative;
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr);
	column-gap: 10px;
	width: 100%;
	min-width: 0;
	padding: 0;
}

.task-process-item:last-child {
	padding-bottom: 0;
}

.task-process-marker {
	position: relative;
	z-index: 1;
	width: 7px;
	height: 7px;
	margin-top: 10px;
	margin-left: 2px;
	border: 0;
	border-radius: 999px;
	background: var(--task-process-marker);
}

.task-process-item.done .task-process-marker {
	background: var(--task-process-marker);
}

.task-process-item.latest .task-process-marker {
	width: 7px;
	height: 7px;
	margin-top: 10px;
	margin-left: 2px;
	border: 0;
	background: var(--task-process-marker);
	box-shadow: none;
	animation: taskProcessBlink 1.15s ease-in-out infinite;
}

.task-process-item.is-return .task-process-marker,
.task-process-item.is-reject .task-process-marker {
	background: var(--task-process-marker);
}

.task-process-item.latest.is-return .task-process-marker,
.task-process-item.latest.is-reject .task-process-marker {
	background: var(--task-process-marker);
	box-shadow: none;
}

@keyframes taskProcessBlink {

	0%,
	100% {
		opacity: 1;
		transform: scale(1);
	}

	50% {
		opacity: 0.35;
		transform: scale(1.35);
	}
}

@media (prefers-reduced-motion: reduce) {
	.task-process-item.latest .task-process-marker {
		animation: none;
	}
}

.task-process-content {
	display: grid;
	gap: 6px;
	min-width: 0;
	width: 100%;
	padding: 10px;
	border: 1px solid var(--task-process-card-border);
	border-radius: 8px;
	background: var(--task-process-card-bg);
}

.task-process-headline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	min-width: 0;
}

.task-process-headline>strong {
	color: var(--task-process-text);
	font-size: var(--task-detail-font-size);
	font-weight: var(--task-detail-value-font-weight);
	line-height: var(--task-detail-line-height);
	word-break: break-word;
}

.task-process-action {
	color: var(--task-process-text);
	font-size: var(--task-detail-font-size);
	font-weight: var(--task-detail-value-font-weight);
	line-height: var(--task-detail-line-height);
	word-break: break-word;
}

.task-process-content>span,
.task-process-meta {
	color: var(--task-process-text);
	font-size: var(--task-detail-font-size);
	font-weight: var(--task-detail-value-font-weight);
	line-height: var(--task-detail-line-height);
}

.task-process-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
}

.task-process-meta-person {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 5px;
}

.task-process-meta strong {
	font-weight: var(--task-detail-label-font-weight);
}

.task-process-meta span {
	font-weight: var(--task-detail-value-font-weight);
}

.task-process-item.latest .task-process-headline>strong {
	color: var(--task-process-text);
}

.task-process-detail {
	display: grid;
	gap: 5px;
	min-width: 0;
	margin-top: 0;
	padding: 0;
}

.task-process-detail div {
	display: grid;
	grid-template-columns: minmax(80px, max-content) minmax(0, 1fr);
	gap: 8px;
	min-width: 0;
	color: var(--task-process-text);
	font-size: var(--task-detail-font-size);
	line-height: var(--task-detail-line-height);
}

.task-process-detail span {
	color: var(--task-process-text);
	font-weight: var(--task-detail-label-font-weight);
}

.task-process-detail strong {
	color: var(--task-process-text);
	font-size: var(--task-detail-font-size);
	font-weight: var(--task-detail-value-font-weight);
	line-height: var(--task-detail-line-height);
	word-break: break-word;
}

@media (max-width: 640px) {
	.task-process-detail div {
		grid-template-columns: 1fr;
		gap: 2px;
	}
}


body {
	font-size: var(--font-size-body);
	font-family: var(--font-family);
	background-color: var(--bg-body);
	color: var(--text-main);
	height: 100vh;
	display: flex;
	overflow: hidden;
}

/* Sidebar (Light version) */
.sidebar {
	width: var(--sidebar-width);
	background: var(--bg-card);
	border-right: 1px solid var(--border-color);
	display: flex;
	flex-direction: column;
	transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	overflow: hidden;
}

.sidebar.collapsed {
	width: var(--sidebar-collapsed-width);
}

.sidebar-header {
	height: 45px;
	padding: 0 10px;
	font-size: var(--font-size-title-md);
	font-weight: 700;
	color: var(--primary);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	box-shadow: 0 1px 0 var(--border-color);
	white-space: nowrap;
	flex-shrink: 0;
}

.sidebar-brand {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.sidebar-logo-mark {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--primary);
	color: #ffeb3b;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.sidebar-logo-mark svg {
	width: 16px;
	height: 16px;
}

.sidebar-brand-text {
	font-size: var(--font-size-title-xl);
	font-weight: 800;
	color: var(--primary);
	letter-spacing: 0;
}

.sidebar-toggle {
	background: transparent;
	border: none;
	color: var(--text-main);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	transition: background 0.2s;
}

.sidebar-toggle:hover {
	background: var(--bg-card-hover);
}

.sidebar-scope {
	background: var(--primary);
	color: #fff;
	margin: 7px;
	padding: 8px 10px;
	border-radius: 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-shrink: 0;
}

.sidebar-scope-year {
	font-size: var(--font-size-caption);
	font-weight: 600;
	opacity: 0.85;
	margin-bottom: 2px;
}

.sidebar-scope-name {
	font-size: var(--font-size-body);
	font-weight: 700;
	line-height: 1.25;
}

.sidebar-scope svg {
	width: 16px;
	height: 16px;
	opacity: 0.85;
	flex: 0 0 auto;
}

.sidebar.collapsed .sidebar-header {
	padding: 10px 0;
	justify-content: center;
}

.sidebar.collapsed .sidebar-header .sidebar-brand {
	display: none;
}

.sidebar.collapsed .sidebar-scope,
.sidebar.collapsed .nav-group,
.sidebar.collapsed .nav-chevron {
	display: none;
}

.nav-links {
	padding: 10px 0;
	flex: 1;
	overflow-y: auto;
}

.nav-group {
	padding: 5px 10px;
	font-size: var(--font-size-caption);
	font-weight: 700;
	color: var(--primary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-top: 10px;
}

.nav-group:first-child {
	margin-top: 0;
}

.nav-item {
	padding: 8px 10px;
	color: var(--text-main);
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 10px;
	transition: all 0.2s;
	font-size: var(--font-size-body);
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-decoration: none;
	justify-content: flex-start;
	position: relative;
}

.nav-item.has-chevron {
	justify-content: space-between;
}

.nav-item-main {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.nav-item-main span {
	overflow: hidden;
	text-overflow: ellipsis;
}

.nav-count-badge {
	box-sizing: border-box;
	min-width: 1.5rem;
	height: 1.5rem;
	padding: 0 5px;
	border-radius: 999px;
	border: 1px solid #ffc7c7;
	background: #fff5f5;
	color: var(--primary);
	font-size: var(--font-size-caption);
	font-weight: 700;
	line-height: 1;
	text-align: center;
	margin-left: auto;
	flex: 0 0 auto;
	font-family: var(--font-family);
	display: inline-grid;
	place-items: center;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.nav-count-badge.is-zero {
	background: #fff;
}

.nav-count-badge:not(.is-zero) {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
	animation: navCountPulse 1.8s ease-in-out infinite;
}

.nav-item:hover .nav-count-badge:not(.is-zero) {
	transform: scale(1.06);
}

@keyframes navCountPulse {

	0%,
	100% {
		box-shadow: 0 0 0 0 rgba(218, 37, 29, 0.18);
	}

	50% {
		box-shadow: 0 0 0 4px rgba(218, 37, 29, 0);
	}
}

.nav-item svg,
.nav-item i {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

.nav-chevron {
	width: 14px !important;
	height: 14px !important;
	color: #87867f;
	margin-left: auto;
}

.sidebar.collapsed .nav-item {
	padding: 8px 0;
	justify-content: center;
}

.sidebar.collapsed .nav-item span {
	display: none;
}

.sidebar.collapsed .nav-item .nav-item-main {
	display: flex;
}

.sidebar.collapsed .nav-item .nav-item-main span {
	display: none;
}

.sidebar.collapsed .nav-item-main {
	gap: 0;
}

.sidebar.collapsed .nav-count-badge {
	position: absolute;
	top: 0.3rem;
	right: 0.6rem;
	min-width: 1.15rem;
	height: 1.15rem;
	padding: 0 4px;
	font-size: var(--font-size-caption);
	line-height: 1;
	margin-left: 0;
}

.task-state-tab b {
	box-sizing: border-box;
	min-width: 1.5rem;
	height: 1.5rem;
	padding: 0 5px;
	display: inline-grid;
	place-items: center;
	border-radius: 999px;
	background: #fff1f0;
	border: 1px solid #fecaca;
	color: var(--primary);
	font-family: var(--font-family);
	font-size: var(--font-size-body);
	font-weight: 800;
	line-height: 1;
	text-align: center;
}

.nav-item:hover {
	background: var(--bg-card-hover);
}

.nav-item.active {
	background: #fee2e2;
	color: var(--primary);
	box-shadow: inset -4px 0 0 var(--primary);
	font-weight: 700;
}

.nav-item i {
	color: var(--text-muted);
}

.nav-item.active i {
	color: var(--primary);
}

/* Main Content & Header */
.main-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: relative;
}

.header {
	height: 56px;
	position: relative;
	background: var(--bg-card);
	box-shadow: 0 1px 0 var(--border-color);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 10px;
	z-index: 10;
	flex-shrink: 0;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

.global-search {
	flex: 1;
	max-width: 40rem;
	display: flex;
	align-items: center;
	border: 1px solid var(--primary);
	border-radius: 24px;
	background: #fff;
	padding: 4px 8px;
	transition: box-shadow 0.2s;
}

.global-search:focus-within {
	box-shadow: 0 0 0 2px rgba(218, 37, 29, 0.1);
}

.scope-pill {
	display: flex;
	align-items: center;
	background: #fff5f5;
	border: 1px solid #fecaca;
	border-radius: 20px;
	padding: 5px 10px;
	gap: 8px;
	cursor: pointer;
	white-space: nowrap;
}

.scope-pill span {
	font-size: var(--font-size-body);
	font-weight: 600;
	color: var(--primary);
}

.scope-pill i,
.scope-pill svg {
	width: 14px;
	height: 14px;
	color: var(--primary);
}

.search-divider {
	width: 1px;
	height: 20px;
	background: #e8e6dc;
	margin: 0 10px;
}

.search-input-wrap {
	flex: 1;
	position: relative;
	display: flex;
	align-items: center;
	min-width: 0;
}

.search-input-wrap input {
	width: 100%;
	border: none;
	background: transparent;
	font-size: var(--font-size-body);
	outline: none;
	padding-right: 2rem;
	color: var(--text-main);
	font-family: var(--font-family);
}

.search-input-wrap input::placeholder {
	color: var(--text-placeholder);
	font-weight: 500;
}

.search-input-wrap i,
.search-input-wrap svg {
	position: absolute;
	right: 8px;
	width: 16px;
	height: 16px;
	color: var(--primary);
}

@media (max-width: 720px) {
	.global-search {
		max-width: none;
	}

	.scope-pill,
	.search-divider {
		display: none;
	}
}

.header-icon {
	width: 20px;
	height: 20px;
	color: var(--primary);
	cursor: pointer;
}

.header-actions .btn-primary {
	border-radius: 20px;
	padding: 5px 10px;
	font-weight: 600;
	box-shadow: 0 2px 4px rgba(218, 37, 29, 0.18);
}

.header-actions .btn-primary i,
.header-actions .btn-primary svg {
	width: 1rem;
	height: 1rem;
}

.header-user-menu-head {
	padding: 10px;
	border-bottom: 1px solid var(--border-color);
	margin-bottom: 4px;
}

.header-user-name {
	font-size: var(--font-size-body);
	font-weight: 600;
	color: var(--text-main);
}

.header-active-position-chip {
	border: 1px solid rgba(218, 37, 29, 0.18);
	background: #fff;
	border-radius: 999px;
	color: var(--text-main);
	cursor: pointer;
	display: inline-grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.45rem;
	font-family: var(--font-family);
	max-width: min(20rem, 30vw);
	min-height: 2rem;
	padding: 0.25rem 0.6rem;
	box-shadow: none;
}

.header-active-position-chip.has-position-title {
	border-radius: 0.65rem;
	min-height: 2.35rem;
	padding: 0.22rem 0.58rem;
}

.header-active-position-chip:hover,
.header-active-position-chip:focus-visible {
	border-color: var(--primary);
	background: #fff7f6;
	outline: none;
}

.header-active-position-chip::after {
	border-bottom: 2px solid var(--primary);
	border-right: 2px solid var(--primary);
	content: "";
	flex: 0 0 auto;
	height: 0.4rem;
	transform: rotate(45deg) translateY(-0.1rem);
	width: 0.4rem;
}

.header-active-position-main {
	color: var(--text-main);
	font-size: var(--font-size-body);
	font-weight: 700;
	line-height: 1.1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.header-active-position-copy {
	display: flex;
	flex-direction: column;
	gap: 0.08rem;
	min-width: 0;
	overflow: hidden;
}

.header-active-position-title-badge {
	align-self: flex-start;
	background: #fef2f2;
	border-radius: 999px;
	color: var(--primary);
	font-size: var(--font-size-badge-xs);
	font-weight: 800;
	line-height: 1.05;
	max-width: 100%;
	overflow: hidden;
	padding: 0.08rem 0.32rem;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.header-position-switcher {
	padding: 0.7rem;
	border-bottom: 1px solid rgba(218, 37, 29, 0.18);
	margin-bottom: 4px;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	background: linear-gradient(180deg, #fff7f6 0%, #fff 42%);
}

.header-position-menu .header-position-switcher {
	border-bottom: 0;
	margin-bottom: 0;
}

.header-position-label {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: var(--font-size-body);
	color: var(--primary);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0;
}

.header-position-label::before {
	content: "";
	display: block;
	width: 0.28rem;
	height: 1.25rem;
	border-radius: 999px;
	background: var(--primary);
	box-shadow: 0 0.25rem 0.7rem rgba(218, 37, 29, 0.28);
}

.header-position-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.header-position-option {
	width: 100%;
	border: 1px solid #f5b4ae;
	background: #fff;
	border-radius: 8px;
	padding: 0.62rem 0.72rem;
	text-align: left;
	font-family: var(--font-family);
	color: var(--text-main);
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.65rem;
	min-width: 0;
	box-shadow: 0 0.25rem 0.75rem rgba(123, 38, 30, 0.08);
	transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.header-position-option-check {
	width: 1.45rem;
	height: 1.45rem;
	border: 1px solid #fecaca;
	border-radius: 50%;
	color: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 1.45rem;
	font-size: var(--font-size-caption);
	font-weight: 800;
	background: #fff;
}

.header-position-option-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.125rem;
	min-width: 0;
}

.header-position-option-title {
	color: var(--text-main);
	font-size: var(--font-size-body);
	font-weight: 800;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.header-position-option:hover {
	border-color: var(--primary);
	background: #fff7f6;
	color: var(--primary);
	box-shadow: 0 0.45rem 1rem rgba(218, 37, 29, 0.16);
}

.header-position-option.is-active {
	border-color: var(--primary);
	background: var(--primary);
	color: #fff;
	box-shadow: 0 0.55rem 1.25rem rgba(218, 37, 29, 0.28);
}

.header-position-option.is-active .header-position-option-title {
	color: #fff;
}

.header-position-option.is-active .header-position-option-check {
	background: #fff;
	border-color: #fff;
	color: var(--primary);
}

@media (max-width: 960px) {
	.header-active-position-chip {
		max-width: 12rem;
	}
}

.header-logout,
.header-logout i,
.header-logout svg {
	color: var(--danger);
}

.icon-sm,
.icon-sm svg,
.icon-sm i {
	width: 1rem;
	height: 1rem;
}

.month-picker-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	padding: 6px 10px;
	border-radius: 6px;
	border: 1px solid var(--border-color);
}

.month-picker-wrapper input {
	background: transparent;
	border: none;
	color: var(--text-main);
	outline: none;
	font-family: var(--font-family);
	cursor: pointer;
	font-size: var(--font-size-body);
	width: 70px;
	font-weight: 500;
}

.user-profile {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--primary);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: var(--font-size-body);
	cursor: pointer;
}

/* Views */
.view {
	display: none;
	padding: 10px;
	height: calc(100vh - 60px);
	overflow-y: auto;
}

.view.active {
	display: block;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(5px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Global Buttons */
.btn {
	padding: 8px 10px;
	border-radius: 4px;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid transparent;
	transition: 0.2s;
	font-family: inherit;
	font-size: var(--font-size-body);
	height: 36px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	justify-content: center;
	white-space: nowrap;
}

.btn[hidden] {
	display: none;
}

.btn-primary {
	background: var(--primary);
	color: white;
}

.btn-primary:hover {
	background: var(--primary-hover);
}

.btn-outline {
	background: white;
	color: var(--text-main);
	border-color: var(--border-color);
}

.btn-outline:hover {
	background: var(--bg-card-hover);
}

/* Controls Bar (Like the Image) */
.controls-bar {
	margin-bottom: 5px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.controls-title {
	font-size: var(--font-size-title-md);
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--primary);
}

/* Datagrid / Table */
.data-table-container {
	background: var(--bg-card);
	border-radius: 8px;
	border: 1px solid var(--border-color);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	margin-bottom: 10px;
}

.table-wrapper {
	overflow-x: auto;
}

.data-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	font-size: var(--font-size-body);
}

.data-table th,
.data-table td {
	padding: 5px 8px;
	border-bottom: 1px solid var(--border-color);
}

.data-table th {
	white-space: nowrap;
}

.data-table td {
	white-space: normal;
	word-break: break-word;
	line-height: 1.5;
	vertical-align: middle;
}

.data-table th {
	background: var(--primary);
	position: sticky;
	top: 0;
	font-weight: 600;
	color: white;
	z-index: 10;
	text-transform: uppercase;
	font-size: var(--font-size-caption);
	letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
	background: var(--bg-card-hover);
}

.col-sticky {
	position: sticky;
	left: 0;
	background: inherit;
	z-index: 5;
}

/* inherited from tr */
.data-table tbody tr {
	background: white;
}

/* ensuring it's white for sticky */
.data-table th.col-sticky {
	z-index: 15;
	background: var(--primary);
}

.data-table.bordered-grid th,
.data-table.bordered-grid td {
	border: 1px solid var(--border-color);
}

.td-money {
	text-align: right;
	font-variant-numeric: tabular-nums;
	font-weight: 500;
}

/* Pagination footer */
.pagination {
	display: flex;
	justify-content: space-between;
	padding: 10px 10px;
	align-items: center;
	font-size: var(--font-size-body);
	color: var(--text-main);
	background: white;
	border-top: 1px solid var(--border-color);
}

.pg-controls {
	display: flex;
	gap: 4px;
	align-items: center;
}

.page-btn {
	padding: 4px 10px;
	border-radius: 4px;
	border: 1px solid transparent;
	cursor: pointer;
	background: transparent;
}

.page-btn.active {
	background: var(--primary);
	color: white;
}

.page-btn:hover:not(.active) {
	background: var(--bg-card-hover);
}

/* Status Labels */
.status-warning {
	color: var(--warning);
	display: flex;
	align-items: center;
	gap: 4px;
	font-weight: 600;
	font-size: var(--font-size-body);
}

.status-success {
	color: var(--success);
	display: flex;
	align-items: center;
	gap: 4px;
	font-weight: 600;
	font-size: var(--font-size-body);
}

/* Action Icons */
.action-btn {
	background: transparent;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	padding: 4px;
	cursor: pointer;
	color: #3b82f6;
	display: inline-flex;
	transition: 0.2s;
}

.action-btn.delete {
	color: var(--danger);
	margin-left: 4px;
}

.action-btn:hover {
	background: var(--bg-card-hover);
}

/* Formula Component */
.formula-container {
	display: flex;
	gap: 24px;
	height: calc(100% - 60px);
}

.formula-sidebar {
	width: 20rem;
	background: var(--bg-card);
	border-radius: 8px;
	padding: 10px;
	border: 1px solid var(--border-color);
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.variable-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
	overflow-y: auto;
}

.variable-item {
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	padding: 10px 10px;
	border-radius: 6px;
	font-family: var(--font-family);
	font-size: var(--font-size-body);
	color: var(--primary);
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: 0.2s;
}

.variable-item:hover {
	background: #eef7f6;
	border-color: var(--primary);
	color: var(--primary-hover);
}

.variable-item span.source {
	font-size: var(--font-size-caption);
	color: var(--text-muted);
	font-family: var(--font-family);
}

.formula-main {
	flex: 1;
	background: var(--bg-card);
	border-radius: 8px;
	padding: 10px;
	border: 1px solid var(--border-color);
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.formula-editor-area {
	flex: 1;
	background: #f9fafb;
	border-radius: 6px;
	margin-top: 8px;
	border: 1px solid var(--border-color);
	padding: 10px;
	font-family: var(--font-family);
	font-size: var(--font-size-body);
	line-height: 1.6;
	color: var(--primary);
	outline: none;
	resize: none;
	width: 100%;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.formula-editor-area:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 2px rgba(18, 107, 96, 0.2);
}

.formula-status {
	margin-top: 10px;
	padding: 10px;
	border-radius: 6px;
	background: #ecfdf5;
	color: var(--success);
	font-size: var(--font-size-body);
	border: 1px solid #a7f3d0;
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
}

/* Standardized Forms */
.form-label {
	font-weight: 600;
	font-size: var(--font-size-body);
	color: var(--text-main);
}

.form-label-uppercase {
	display: block;
	font-size: var(--font-size-caption);
	font-weight: 600;
	color: var(--text-muted);
	margin-bottom: 6px;
	text-transform: uppercase;
}

.form-control {
	padding: 8px 10px;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	outline: none;
	font-family: var(--font-family);
	font-size: var(--font-size-body);
	color: var(--text-main);
	background: #ffffff;
	transition: all 0.2s;
	height: 36px;
}

.form-control:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 2px rgba(18, 107, 96, 0.1);
}

.form-control:disabled,
.form-control[readonly] {
	background: #f1f5f9;
}

/* Module Tabs MISA Style */
.module-tabs {
	display: flex;
	background: var(--bg-card);
	border-bottom: 1px solid var(--border-color);
	padding: 0 10px;
	gap: 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.module-tab {
	padding: 8px 10px;
	color: var(--text-main);
	font-size: var(--font-size-body);
	font-weight: 500;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	transition: 0.2s;
	text-decoration: none;
}

.module-tab:hover {
	color: var(--primary);
}

.module-tab.active {
	color: var(--primary);
	border-bottom-color: var(--primary);
	font-weight: 600;
}

/* Dropdown Menu MISA Style */
.dropdown-container {
	position: relative;
	display: inline-block;
}

.dropdown-container.has-position-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.dropdown-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 4px;
	background: white;
	min-width: 12.5rem;
	border: 1px solid var(--border-color);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	border-radius: 6px;
	z-index: 100;
}

.dropdown-menu.header-user-menu,
.dropdown-menu.directive-user-menu {
	right: 0;
	left: auto;
	margin-top: 8px;
	min-width: min(12rem, calc(100vw - 2rem));
	z-index: 1200;
}

.dropdown-menu.header-position-menu {
	border: 2px solid rgba(218, 37, 29, 0.48);
	box-shadow:
		0 1rem 2rem rgba(123, 38, 30, 0.22),
		0 0 0 0.2rem rgba(218, 37, 29, 0.08);
	left: var(--header-position-menu-left, auto);
	margin-top: 8px;
	min-width: 0;
	position: fixed;
	right: auto;
	top: var(--header-position-menu-top, 3.5rem);
	width: var(--header-position-menu-width, min(18rem, calc(100vw - 2rem)));
	z-index: 1200;
}

.dropdown-menu.active {
	display: block;
	animation: fadeIn 0.2s ease;
}

.dropdown-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 10px;
	color: var(--text-main);
	text-decoration: none;
	font-size: var(--font-size-body);
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s;
}

.dropdown-item i {
	color: var(--text-muted);
}

.dropdown-item:hover {
	background: #f1f5f9;
	color: var(--primary);
}

.dropdown-item:hover i {
	color: var(--primary);
}

.dropdown-divider {
	height: 1px;
	background: var(--border-color);
	margin: 4px 0;
}

/* Modal Fullscreen & Standard */
.modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 1000;
	align-items: center;
	justify-content: center;
}

.modal-overlay.active {
	display: flex;
}

.modal {
	background: #fff;
	width: min(95vw, 30rem);
	max-width: 95vw;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	animation: zoomIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	overflow: hidden;
}

.modal-lg {
	background: #fff;
	width: min(98vw, 75rem);
	max-width: 98vw;
	height: 96vh;
	display: flex;
	flex-direction: column;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	animation: zoomIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	overflow: hidden;
}

.modal .modal-body {
	padding: 10px 10px;
}

.modal .modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 8px 10px;
	border-top: 1px solid var(--border-color);
	background: #f8fafc;
}

.modal-fullscreen {
	width: 100%;
	height: 100%;
	background: #f1f5f9;
	display: flex;
	flex-direction: column;
	animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 10px;
	background: #fff;
	border-bottom: 1px solid var(--border-color);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.modal-header-title {
	font-size: var(--font-size-title-sm);
	font-weight: 700;
	color: var(--text-main);
	display: flex;
	align-items: center;
	gap: 12px;
}

.modal-body {
	flex: 1;
	overflow: auto;
	padding: 6px 10px;
}

/* Biến thể Compact cho Bảng lương trong Modal */
.modal-fullscreen .controls-bar {
	margin-bottom: 8px !important;
}

.modal-fullscreen .data-table th,
.modal-fullscreen .data-table td {
	padding: 6px 8px;
	white-space: nowrap;
}

.modal-fullscreen .data-table th {
	background: #115e59;
	/* Xanh két MISA */
	color: #fff;
	border-color: #0f514d;
	font-weight: 600;
}

.modal-fullscreen .data-table .col-sticky {
	background: #fff;
}

.modal-fullscreen .data-table th.col-sticky {
	background: #115e59;
}

/* Fix khoảng trắng hở lưng do thead1 bị giảm chiều cao trong chế độ compact */
.modal-fullscreen .data-table thead tr:nth-child(2) th {
	top: 27px !important;
}

.modal-fullscreen .action-btn {
	padding: 4px;
}

@keyframes slideInUp {
	from {
		transform: translateY(20px);
		opacity: 0;
	}

	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Modal Standard Misa */
.modal-standard {
	background: #eaf3f5;
	width: min(95vw, 56.25rem);
	max-width: 95vw;
	border-radius: 4px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	animation: zoomIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	overflow: hidden;
}

.modal-standard .modal-header {
	background: transparent;
	padding: 5px 10px;
	border-bottom: none;
	box-shadow: none;
	align-items: center;
	display: flex;
}

.modal-standard-title {
	font-size: var(--font-size-heading-sm);
	font-weight: 700;
	color: var(--text-main);
	margin-right: 16px;
}

.modal-standard-group {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: var(--font-size-body);
	color: var(--text-muted);
}

.modal-standard .modal-body {
	padding: 5px 10px;
	overflow: visible;
}

.grid-form {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 8px;
}

.form-group {
	display: flex;
	flex-direction: column;
}

.form-group label {
	font-size: var(--font-size-body);
	font-weight: 600;
	color: var(--text-main);
}

/* Custom Checkbox */
.custom-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: var(--font-size-body);
	color: var(--text-main);
	cursor: pointer;
}

.custom-checkbox input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--primary);
	cursor: pointer;
}

@keyframes zoomIn {
	from {
		transform: scale(0.95);
		opacity: 0;
	}

	to {
		transform: scale(1);
		opacity: 1;
	}
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
	.sidebar {
		width: var(--sidebar-collapsed-width);
	}

	.sidebar .sidebar-header span,
	.sidebar .nav-item span {
		display: none;
	}

	.sidebar .nav-item {
		padding: 10px 0;
		justify-content: center;
	}

	.sidebar .sidebar-header {
		padding: 10px 0;
		justify-content: center;
	}
}

@media (max-width: 768px) {

	/* 1. Header Truncation */
	.header {
		padding: 0 10px;
		height: 50px;
		width: 100%;
		min-width: 0;
	}

	.header-title {
		max-width: 8.75rem;
		/* Reduce title max width on mobile to make room for actions */
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		font-size: var(--font-size-body) !important;
	}

	#headerRoleSwitcher {
		max-width: 6.875rem;
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
		font-size: var(--font-size-caption) !important;
		padding: 4px !important;
	}

	/* 2. Off-canvas Sidebar */
	.sidebar {
		position: fixed;
		top: 0;
		left: calc(-1 * var(--sidebar-mobile-width));
		/* Hidden by default */
		width: var(--sidebar-mobile-width) !important;
		/* Fixed size on mobile */
		height: 100vh;
		z-index: 2000;
		box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
		transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
		display: flex !important;
		/* Override the previous none if any */
	}

	.sidebar.mobile-active {
		left: 0;
	}

	.sidebar .sidebar-header span,
	.sidebar .nav-item span {
		display: block;
		/* Ensure text is visible in off-canvas mode */
	}

	.sidebar .nav-item {
		justify-content: flex-start;
		padding: 5px 10px;
	}

	.sidebar .sidebar-header {
		justify-content: flex-start;
		padding: 10px 10px;
	}

	/* Mobile Sidebar Overlay */
	.mobile-sidebar-overlay {
		position: fixed;
		inset: 0;
		background: rgba(15, 23, 42, 0.4);
		backdrop-filter: blur(2px);
		z-index: 1999;
		opacity: 0;
		visibility: hidden;
		transition: all 0.3s;
	}

	.mobile-sidebar-overlay.active {
		opacity: 1;
		visibility: visible;
	}

	/* 3. Swipeable Module Tabs */
	.module-tabs {
		overflow-x: auto;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
		/* Smooth iOS scrolling */
		scrollbar-width: none;
		/* Firefox */
		padding: 0 8px;
	}

	.module-tabs::-webkit-scrollbar {
		display: none;
		/* Chrome/Safari */
	}

	.module-tab {
		font-size: var(--font-size-body);
		padding: 10px 10px;
	}

	/* 4. Controls Bar (Filters & Actions) */
	.controls-bar {
		flex-direction: column;
		align-items: stretch !important;
		gap: 12px;
	}

	.controls-bar>div {
		flex-direction: column;
		align-items: stretch !important;
		width: 100%;
	}

	.filter-group {
		width: 100%;
		display: flex;
		gap: 8px;
	}

	.filter-group .filter-select {
		flex: 1;
		min-width: 0;
	}

	#btnAddTask {
		width: 100%;
		height: 40px;
		/* Better touch target */
	}

	/* 5. Responsive Data Table (Horizontal Scroll trap) */
	.main-content {
		width: 100vw;
		overflow-x: hidden;
		/* Prevent page-level horizontal scrolling */
		min-width: 0;
	}

	.view {
		width: 100%;
		min-width: 0;
		overflow-x: hidden;
	}

	.data-table-container {
		border-radius: 0;
		/* Remove border radius on mobile for edge-to-edge feel */
		border-left: none;
		border-right: none;
		width: 100%;
		min-width: 0;
	}

	.table-wrapper {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		width: 100%;
		min-width: 0;
	}

	.data-table {
		min-width: 100%;
		/* Force table to maintain width so it scrolls */
	}

	/* 6. Modals & Side Panels (Full screen) */
	.modal {
		width: 100vw !important;
		max-width: 100vw !important;
		height: 100vh;
		border-radius: 0;
		margin: 0;
	}

	.side-panel {
		width: 100vw !important;
		right: -100vw;
		max-width: 100vw;
	}

	.side-panel-lg {
		width: 100vw !important;
		right: -100vw;
	}

	/* Form layouts */
	.form-section-title {
		margin-top: 8px;
	}

	.side-panel-body>div[style*="display: flex; gap: 16px"] {
		flex-direction: column;
		gap: 16px;
	}
}

/* Modern Side Panel (Drawer) */
.side-panel-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.4);
	backdrop-filter: blur(2px);
	z-index: 1000;
	visibility: hidden;
	opacity: 0;
	transition: all 0.3s ease;
}

.side-panel-overlay.active {
	visibility: visible;
	opacity: 1;
}

.side-panel {
	position: fixed;
	top: 0;
	right: calc(-1 * min(90vw, 37.5rem));
	width: min(90vw, 37.5rem);
	max-width: 90vw;
	height: 100vh;
	background: #fff;
	box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
	z-index: 1001;
	display: flex;
	flex-direction: column;
	transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.side-panel.active {
	right: 0;
}

.side-panel-header {
	padding: 10px 10px;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #f8fafc;
}

.side-panel-title {
	font-size: var(--font-size-title-lg);
	font-weight: 700;
	color: var(--text-main);
}

.side-panel-body {
	flex: 1;
	padding: 10px;
	overflow-y: auto;
}

.side-panel-footer {
	padding: 10px 10px;
	border-top: 1px solid var(--border-color);
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	background: #f8fafc;
}

/* Enhanced Form Inputs inside Side Panel */
.side-panel .form-control {
	padding: 10px 10px;
	font-size: var(--font-size-body);
	border-radius: 6px;
	border: 1px solid #cbd5e1;
	transition: all 0.2s;
}

.side-panel .form-control:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(18, 107, 96, 0.1);
}

.side-panel .form-label-uppercase {
	font-size: var(--font-size-caption);
	font-weight: 600;
	color: #475569;
	margin-bottom: 8px;
	display: block;
}

/* Update Side Panel to NOT block background */
.side-panel-overlay {
	display: none !important;
	/* Completely remove overlay so user can see/interact with background */
}

.side-panel {
	box-shadow: -15px 0 50px rgba(0, 0, 0, 0.08);
	/* Softer, larger shadow */
	border-left: 1px solid var(--border-color);
}

/* Enhanced Form Groups */
.form-section-title {
	font-size: var(--font-size-body);
	font-weight: 700;
	color: var(--primary);
	margin-top: 10px;
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 1px dashed var(--border-color);
	display: flex;
	align-items: center;
	gap: 8px;
}

/* File Upload Zone */
.file-upload-zone {
	border: 2px dashed #cbd5e1;
	border-radius: 8px;
	padding: 10px;
	text-align: center;
	background: #f8fafc;
	cursor: pointer;
	transition: all 0.2s ease;
}

.file-upload-zone:hover {
	border-color: var(--primary);
	background: #f0fdfa;
}

.file-upload-icon {
	width: 40px;
	height: 40px;
	background: #e2e8f0;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 10px auto;
	color: #64748b;
}

.file-upload-zone:hover .file-upload-icon {
	background: #ccfbf1;
	color: var(--primary);
}

.file-upload-text {
	font-size: var(--font-size-body);
	color: var(--text-main);
	font-weight: 500;
}

.file-upload-hint {
	font-size: var(--font-size-caption);
	color: var(--text-muted);
	margin-top: 4px;
}


/* Large Side Panel cho form phức tạp, chiếm hết phần main-content chừa lại sidebar */
.side-panel-lg {
	width: calc(100vw - var(--sidebar-width));
	right: calc(-100vw + var(--sidebar-width));
}

.side-panel-lg.active {
	right: 0;
}

/* Two-column layout for Large Side Panel */
.side-panel-body-no-padding {
	padding: 0 !important;
}

.task-form-layout {
	display: flex;
	flex-direction: row;
	height: 100%;
}

.task-form-left {
	flex: 65;
	padding: 10px 10px;
	overflow-y: auto;
	border-right: 1px solid var(--border-color);
}

.task-form-right {
	flex: 35;
	padding: 10px 10px;
	background: #f8fafc;
	overflow-y: auto;
}

@media (max-width: 768px) {
	.task-form-layout {
		flex-direction: column;
	}

	.task-form-left {
		border-right: none;
		border-bottom: 1px solid var(--border-color);
	}
}

/* Global Modal Styles */
.global-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(20, 20, 19, 0.45);
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
}

.global-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

.global-modal {
	background: #fff;
	width: min(90%, 25rem);
	max-width: 90%;
	border-radius: 8px;
	border: 1px solid rgba(218, 37, 29, 0.1);
	box-shadow: 0 1rem 2.5rem rgba(20, 20, 19, 0.18);
	transform: translateY(20px);
	transition: all 0.2s;
	display: flex;
	flex-direction: column;
}

.global-dialog-modal {
	width: min(28rem, calc(100vw - 2rem));
	overflow: hidden;
}

.global-modal-overlay.active .global-modal {
	transform: translateY(0);
}

.global-modal-header {
	padding: 10px 10px;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.global-modal-header h3 {
	margin: 0;
	font-size: var(--font-size-title-sm);
	font-weight: 600;
	color: var(--text-main);
}

.global-modal-close {
	background: none;
	border: none;
	color: var(--text-muted);
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.global-modal-close:hover {
	background: #f1f5f9;
	color: var(--danger);
}

.global-modal-body {
	padding: 10px;
}

.global-dialog-modal-body {
	align-items: flex-start;
	background: linear-gradient(180deg, #fffafa 0%, #fff 100%);
	display: flex;
	gap: 10px;
	padding: 10px;
	text-align: left;
}

.global-modal-footer {
	padding: 10px 10px;
	border-top: 1px solid var(--border-color);
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

.global-dialog-modal .global-modal-footer {
	background: #fff;
	border-top-color: rgba(218, 37, 29, 0.12);
}

.global-form-group {
	margin-bottom: 8px;
}

.global-form-group.is-compact {
	margin-bottom: 0;
}

.global-password-username {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

.global-form-group label {
	display: block;
	font-size: var(--font-size-body);
	font-weight: 500;
	color: var(--text-main);
	margin-bottom: 6px;
}

.global-form-input {
	width: 100%;
	height: 32px;
	padding: 0 10px;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	font-size: var(--font-size-body);
	transition: border-color 0.2s;
}

.global-form-input:focus {
	outline: none;
	border-color: var(--primary);
}

.global-password-guidance {
	display: grid;
	gap: 0.25rem;
	margin-top: 0.45rem;
	padding: 0.5rem 0.6rem;
	border: 1px solid rgba(218, 37, 29, 0.18);
	border-radius: 6px;
	background: #fff7f6;
	color: var(--text-main);
	font-size: var(--font-size-caption);
	line-height: 1.35;
}

.global-password-guidance strong,
.global-password-guidance span {
	color: var(--text-main);
}

.global-password-guidance strong {
	font-weight: 700;
}

.global-password-guidance span::before {
	content: "•";
	color: var(--primary);
	font-weight: 800;
	margin-right: 0.35rem;
}

.global-btn {
	height: 32px;
	padding: 0 10px;
	border-radius: 4px;
	font-size: var(--font-size-body);
	font-weight: 500;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.global-btn:focus-visible {
	outline: 2px solid rgba(218, 37, 29, 0.26);
	outline-offset: 2px;
}

.global-btn.cancel {
	background: #fff;
	border-color: var(--border-color);
	color: var(--text-main);
}

.global-btn.cancel:hover {
	background: #f8fafc;
}

.global-btn.primary {
	background: var(--primary);
	color: #fff;
}

.global-btn.primary:hover {
	background: var(--primary-dark, #b91c1c);
}

.global-btn.danger {
	background: var(--danger, #dc2626);
	color: #fff;
}

.global-btn.danger:hover {
	background: #b91c1c;
}

/* Confirm/Alert Dialog */
.global-dialog-icon {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 2.5rem;
	margin-bottom: 0;
	box-shadow: inset 0 0 0 1px currentColor;
}

.global-dialog-icon svg {
	width: 1.125rem;
	height: 1.125rem;
	stroke-width: 2.4;
}

.global-dialog-icon.warning {
	background: #fff7ed;
	color: #d97706;
}

.global-dialog-icon.error {
	background: #fef2f2;
	color: #dc2626;
}

.global-dialog-icon.info {
	background: #eff6ff;
	color: #1d4ed8;
}

.global-dialog-icon.success {
	background: #ecfdf5;
	color: #059669;
}

.global-dialog-message {
	font-size: var(--font-size-body);
	color: var(--text-main);
	font-weight: 500;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.global-dialog-content {
	display: grid;
	gap: 0.25rem;
	min-width: 0;
}

.global-dialog-title {
	color: var(--text-main);
	font-size: var(--font-size-title-sm);
	font-weight: 700;
	line-height: 1.3;
}

.global-dialog-modal[data-dialog-type="warning"] {
	border-color: rgba(217, 119, 6, 0.18);
}

.global-dialog-modal[data-dialog-type="error"] {
	border-color: rgba(220, 38, 38, 0.18);
}

.global-dialog-modal[data-dialog-type="info"] {
	border-color: rgba(37, 99, 235, 0.16);
}

.global-dialog-modal[data-dialog-type="success"] {
	border-color: rgba(5, 150, 105, 0.18);
}

.global-dialog-modal .global-btn {
	min-width: 5.5rem;
}

@media (max-width: 480px) {
	.global-dialog-modal .global-modal-footer {
		flex-direction: column-reverse;
	}

	.global-dialog-modal .global-btn {
		width: 100%;
	}
}

.global-empty-row {
	text-align: center;
	padding: 10px;
	color: var(--text-muted);
	font-style: italic;
}

.global-alert {
	display: none;
	padding: 10px;
	margin-bottom: 10px;
	border-radius: 4px;
	font-size: var(--font-size-body);
	font-weight: 600;
}

.global-alert.is-visible {
	display: block;
}

.global-alert.error {
	background: #fef2f2;
	color: #dc2626;
	border: 1px solid #fca5a5;
}

.global-alert.success {
	background: #ecfdf5;
	color: #059669;
	border: 1px solid #6ee7b7;
}

/* Shared Toast Notifications */
.toast-container {
	position: fixed;
	top: 70px;
	right: 20px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 8px;
	pointer-events: none;
}

.toast-item {
	background: #fff;
	border-left: 4px solid var(--primary);
	border-radius: 6px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	padding: 10px 10px;
	width: min(90vw, 18.75rem);
	display: flex;
	align-items: center;
	gap: 8px;
	pointer-events: auto;
	animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
	font-size: var(--font-size-body);
	font-weight: 600;
	color: #111827;
}

.toast-item.success {
	border-left-color: #10b981;
}

.toast-item.error {
	border-left-color: #ef4444;
}

.toast-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.toast-item.success .toast-icon {
	color: #10b981;
}

.toast-item.error .toast-icon {
	color: #ef4444;
}

.toast-msg {
	flex: 1;
	line-height: 1.35;
}

.toast-item.fade-out {
	animation: toastOut 0.3s ease-in forwards;
}

.sidebar-empty-menu {
	color: var(--text-muted);
	font-size: var(--font-size-body);
	padding: 8px 10px;
}

@keyframes toastIn {
	from {
		transform: translateX(100%);
		opacity: 0;
	}

	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes toastOut {
	from {
		opacity: 1;
		transform: translateY(0);
	}

	to {
		opacity: 0;
		transform: translateY(-10px);
	}
}
