/* ===================== Chung ===================== */
.min-w-0 { min-width: 0; }

.stat-card { transition: transform .15s ease, box-shadow .15s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.08) !important; }
.stat-number { font-size: 1.75rem; line-height: 1.2; }
.stat-icon   { font-size: 1.75rem; }

/* Tab loc: vuot ngang khi khong du cho, an thanh cuon */
.filter-tabs {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	gap: .25rem;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tabs .nav-link { padding: .4rem .75rem; font-size: .9rem; white-space: nowrap; }
.nav-pills .nav-link.active .badge { background: rgba(255,255,255,.85) !important; color: var(--bs-primary) !important; }

/* ===================== Dong cong viec ===================== */
.task-item { border-left: 4px solid transparent; }
.task-item.status-pending     { border-left-color: var(--bs-secondary); }
.task-item.status-in_progress { border-left-color: var(--bs-warning); }
.task-item.status-done        { border-left-color: var(--bs-success); background: #f8fdf9; }
.task-item.status-done .task-title { text-decoration: line-through; color: var(--bs-secondary-color); }

.task-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: .75rem;
}
.task-check { flex: 0 0 auto; line-height: 1; }
.task-check .btn { font-size: 1.6rem; line-height: 1; }
.task-body  { flex: 1 1 0; min-width: 0; }
.task-title { word-break: break-word; }

/* Dien thoai: hang nut thao tac rong, deu nhau, nam duoi noi dung */
.task-actions {
	flex: 0 0 100%;
	display: flex;
	gap: .5rem;
	padding-left: calc(1.6rem + .75rem); /* thang hang voi noi dung */
}
.task-actions > * { flex: 1 1 0; }
.task-actions .btn { width: 100%; padding-top: .45rem; padding-bottom: .45rem; }

.note {
	font-size: .875rem;
	padding: .5rem .75rem;
	border-radius: .375rem;
	border-left: 3px solid;
}
.note-pending { background: #f1f3f5; border-color: var(--bs-secondary); }
.note-blocker { background: #fff8e1; border-color: var(--bs-warning); }

/* Nut them noi (chi tren dien thoai) */
.fab {
	position: fixed;
	right: 1rem;
	bottom: calc(1rem + env(safe-area-inset-bottom));
	width: 3.5rem;
	height: 3.5rem;
	font-size: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1030;
}

/* ===================== Dien thoai (< 768px) ===================== */
@media (max-width: 767.98px) {
	/* 16px de iPhone khong tu phong to khi cham vao o nhap */
	.form-control, .form-select { font-size: 16px; }

	.stat-number { font-size: 1.35rem; }
	.stat-icon   { font-size: 1.35rem; }

	.dropdown-menu .dropdown-item { padding-top: .6rem; padding-bottom: .6rem; }

	/* Chua cho nut noi khong che noi dung cuoi trang */
	.app-footer { padding-bottom: 5.5rem !important; }

	.breadcrumb { font-size: .875rem; margin-bottom: .75rem; }
	.status-options .btn { padding-top: .6rem; padding-bottom: .6rem; text-align: left; }
}

/* ===================== May tinh (>= 768px) ===================== */
@media (min-width: 768px) {
	.task-row { flex-wrap: nowrap; gap: 1rem; }
	.task-actions {
		flex: 0 0 auto;
		padding-left: 0;
		gap: .25rem;
	}
	.task-actions > * { flex: 0 0 auto; }
	.task-actions .btn { width: auto; padding-top: .25rem; padding-bottom: .25rem; }
	.task-actions .dropdown .btn { width: auto; }
}

/* ===================== % hoan thanh ===================== */
.task-progress {
	display: flex;
	align-items: center;
	gap: .5rem;
	width: 100%;
	max-width: 420px;
	padding: .25rem 0;
	background: none;
	border: 0;
	cursor: pointer;
	text-align: left;
}
.task-progress .progress { height: .6rem; }
.task-progress-label { font-weight: 600; font-size: .875rem; min-width: 2.75rem; text-align: right; }
.task-progress:hover .progress { box-shadow: 0 0 0 2px rgba(13,110,253,.25); }
.progress-number { width: 7rem; flex: 0 0 auto; }

/* ===================== Dang nhap ===================== */
.auth-page main { min-height: 100vh; }
.login-wrap { min-height: calc(100vh - 8rem); }
.login-logo { width: 3.5rem; height: 3.5rem; font-size: 1.75rem; }
.auth-page .app-footer { padding-bottom: 1.5rem !important; }
