/* Home's right-hand Tasks Overview / Recent Records column (neo/js/home/zpHomeSidebar.js) */
.zp-home-has-sidebar { display: flex; flex-direction: row; }
.zp-home-has-sidebar > #recordListContainer { flex: 1 1 auto; min-width: 0; }
.zp-home-sidebar {
	display: flex; /* a flex column, so the margins align() sets never collapse into the title's */
	flex-direction: column;
	flex: 0 0 390px;
	width: 390px;
	box-sizing: border-box;
	padding: 20px 16px; /* bottom = the catalog's (#recordListContainer .main-container pb-5), so both boxes end level */
	background: #f3f3f6;
	border-left: 1px solid #e4e4ea;
	overflow: hidden; /* the Recent Records list scrolls, not the column */
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.zp-hs-title {
	margin: 0 0 12px; /* margin-top / .zp-hs-stats margin-top are set by zpHomeSidebar.js#align */
	/* the same type as the page title beside it ("Home" - #recordListContainer .object-title) */
	font-size: 20px;
	font-weight: 700;
	line-height: 26px;
	letter-spacing: -0.2px;
	color: #1c1b22;
}
.zp-hs-stats { display: flex; flex-direction: column; gap: 8px; }

.zp-hs-stat {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 11px 14px; /* ~30% shorter than the first cut (88px -> ~62px) */
	border: 1px solid #e4e4ea;
	border-radius: 10px;
	background: #fff;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}
.zp-hs-stat:hover { border-color: #d6cdf7; box-shadow: 0 2px 8px rgba(91, 33, 182, .06); }
.zp-hs-stat:focus-visible { outline: 2px solid #7c3aed; outline-offset: 2px; }
.zp-hs-stat-icon {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.zp-hs-stat-today .zp-hs-stat-icon { background: #f3effe; color: #7c3aed; }
.zp-hs-stat-soon .zp-hs-stat-icon { background: #fef8e7; color: #b45309; }
.zp-hs-stat-overdue .zp-hs-stat-icon { background: #fdeeee; color: #b91c1c; }
.zp-hs-stat-icon svg { width: 16px; height: 16px; }
.zp-hs-stat-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.zp-hs-stat-label { font-size: 12px; line-height: 15px; color: #555; }
.zp-hs-stat-count { font-size: 18px; line-height: 22px; font-weight: 700; color: #1a1a1a; }
.zp-hs-stat-overdue.zp-hs-stat-has .zp-hs-stat-count { color: #b91c1c; }
.zp-hs-stat-chev { flex: 0 0 auto; color: #6b6b75; display: flex; }
.zp-hs-stat-chev svg { width: 14px; height: 14px; }

.zp-hs-recent {
	/* shrinks to the column's leftover height (never grows past its rows); its list scrolls */
	flex: 0 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	padding: 16px;
	border: 1px solid #e4e4ea;
	border-radius: 12px;
	background: #fff;
}
/* above the box: the heading (keeps .zp-hs-title's type) with "View all" at the right of the same line */
.zp-hs-recent-head { flex: 0 0 auto; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 24px 0 12px; }
.zp-hs-recent-head .zp-hs-recent-title { margin: 0; }
.zp-hs-view-all { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: #7c3aed; text-decoration: none; }
.zp-hs-view-all:hover { text-decoration: underline; }
/* scrolls up and down only; the list (not each row) takes the 4px bleed the rows' hover needs, so nothing overflows sideways */
.zp-hs-recent-list { list-style: none; margin: 0 -4px; padding: 0 4px; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; }
.zp-hs-recent-item {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	padding: 6px 4px;
	margin: 0 -4px;
	border-radius: 8px;
	cursor: pointer;
}
.zp-hs-recent-item:hover { background: #f7f5fe; }
.zp-hs-avatar {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ede9fe;
	color: #6d28d9;
	font-size: 11px;
	font-weight: 700;
}
.zp-hs-recent-name { min-width: 0; font-size: 14px; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zp-hs-recent-empty { font-size: 13px; color: #8b8b95; padding: 4px 0; }

/* narrow screens (and the phone layer, zpPortalMobile.css): the catalog keeps the whole width */
@media (max-width: 1023px) {
	.zp-home-sidebar { display: none; }
	.zp-home-has-sidebar { flex-direction: column; }
}
