.home-page {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 0.25rem 0 0.5rem;
}

.home-block {
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	padding: 0.85rem 1rem;
}

.home-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
	flex-wrap: wrap;
}

.home-header h1,
.home-block h2 {
	margin-bottom: 0.5rem;
}

.home-header p,
.home-block p,
.home-link-list li {
	color: #6c757d;
}

.home-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.user-summary {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 0.75rem;
	padding: 0.75rem 1rem;
	min-width: 220px;
}

.user-summary-link {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: inherit;
}

.user-summary-link:hover {
	background: #eef2ff;
	border-color: rgba(13, 110, 253, 0.25);
}

.user-summary small {
	display: block;
	color: #6c757d;
	margin-bottom: 0.25rem;
}

.metrics-grid,
.sections-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, 250px);
	gap: 0.75rem;
	justify-content: flex-start;
}

.admin-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, 250px);
	gap: 0.75rem;
	justify-content: flex-start;
	align-items: start;
}

.metric-item,
.section-item {
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	padding: 0.85rem;
	background: #fff;
}

.metric-item strong {
	display: block;
	font-size: 1.3rem;
	margin: 0.25rem 0;
}

.metric-item span,
.section-item span {
	display: inline-block;
	font-size: 0.85rem;
	color: #6c757d;
	margin-bottom: 0.35rem;
}

.section-item {
	display: flex;
	gap: 0.75rem;
	text-decoration: none;
	color: inherit;
	width: 250px;
}

.section-item:hover {
	background: #f8f9fa;
}

.section-icon {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
}

.section-icon svg {
	width: 20px;
	height: 20px;
}

.section-content h3 {
	font-size: 1rem;
	margin-bottom: 0.25rem;
}

.home-link-list {
	margin: 0;
	padding-left: 1.1rem;
}

.empty-state {
	padding: 1rem;
	border: 1px dashed #ced4da;
	border-radius: 0.5rem;
	background: #f8f9fa;
}

.permissions-panel {
	border: 1px solid #dee2e6;
	border-radius: 0.75rem;
	padding: 0.75rem;
	background: #f8f9fa;
	width: 100%;
	max-width: 510px;
	grid-column: span 2;
}

.permissions-panel-header h3 {
	margin-bottom: 0.2rem;
	font-size: 1rem;
}

.permissions-list {
	margin-top: 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	max-height: 220px;
	overflow-y: auto;
	padding-right: 0.25rem;
}

.permission-item {
	border: 1px solid #dee2e6;
	border-radius: 0.75rem;
	padding: 0.75rem;
	background: #fff;
}

.permission-item-enabled {
	border-color: rgba(25, 135, 84, 0.35);
}

.permission-item-disabled {
	border-color: rgba(220, 53, 69, 0.35);
}

.permission-item-header {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: flex-start;
	flex-wrap: wrap;
}

.permission-item-header h4 {
	margin-bottom: 0.2rem;
	font-size: 0.95rem;
}

.permission-state {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
}

.permission-state-enabled {
	background: rgba(25, 135, 84, 0.12);
	color: #198754;
}

.permission-state-disabled {
	background: rgba(220, 53, 69, 0.12);
	color: #dc3545;
}

.permission-meta {
	margin-top: 0.6rem;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0.5rem;
}

.permission-meta-group {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.permission-meta-group > span {
	font-size: 0.8rem;
	color: #6c757d;
}

.permission-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.permission-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.5rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
}

.permission-badge-granted {
	background: rgba(13, 110, 253, 0.1);
	color: #0d6efd;
}

.permission-badge-denied {
	background: rgba(220, 53, 69, 0.12);
	color: #dc3545;
}

.home-block-admin > p {
	margin-bottom: 0.5rem;
}

@media (max-width: 767.98px) {
	.admin-grid,
	.sections-grid {
		grid-template-columns: 1fr;
	}

	.section-item {
		flex-direction: column;
		width: 100%;
	}

	.permission-item-header {
		flex-direction: column;
	}

	.permissions-panel {
		max-width: 100%;
		grid-column: auto;
	}
}
