.dashboard2-page {
	padding-bottom: 40px;
}

.dashboard2-intelligence-strip {
	display: grid;
	grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1fr) minmax(180px, 1fr);
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.dashboard2-intelligence-strip > div {
	min-height: 5rem;
	padding: 1rem;
	border: 1px solid rgba(13, 110, 253, 0.12);
	border-radius: 0.75rem;
	background: #ffffff;
	box-shadow: 0 0.125rem 0.35rem rgba(15, 23, 42, 0.05);
}

.dashboard2-strip-label {
	display: block;
	margin-bottom: 0.6rem;
	color: #495057;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.dashboard2-readiness-bar {
	height: 0.85rem;
	overflow: hidden;
	border-radius: 999px;
	background: #e9ecef;
}

.dashboard2-readiness-bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #198754, #0d6efd);
	transition: width 0.35s ease;
}

.dashboard2-risk-pill {
	display: inline-flex;
	align-items: center;
	min-height: 2rem;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	font-weight: 700;
}

.dashboard2-risk-pill-warning {
	color: #664d03;
	background: #fff3cd;
}

.dashboard2-trend-placeholder {
	display: block;
	height: 2rem;
	max-width: 12rem;
	background:
		linear-gradient(135deg, transparent 0 15%, rgba(13, 110, 253, 0.28) 15% 21%, transparent 21% 38%, rgba(25, 135, 84, 0.32) 38% 44%, transparent 44% 100%),
		linear-gradient(180deg, transparent 0 46%, #e9ecef 46% 54%, transparent 54% 100%);
	border-radius: 0.5rem;
}

.dashboard2-footer {
	margin-top: 40px;
	text-align: right;
	color: #0078d4;
}

.dashboard2-footer a {
	color: inherit;
}

.dashboard2-loading-panel,
.dashboard2-error {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 4rem;
	padding: 1rem;
	margin-top: 1rem;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	background-color: #ffffff;
	color: #495057;
}

.dashboard2-error {
	border-color: #f1aeb5;
	background-color: #f8d7da;
	color: #842029;
}

.dashboard2-spinner {
	width: 1.25rem;
	height: 1.25rem;
	border: 0.2rem solid #dee2e6;
	border-top-color: #0d6efd;
	border-radius: 50%;
	animation: dashboard2-spin 0.8s linear infinite;
	flex: 0 0 auto;
}

.dashboard2-placeholder-grid {
	margin-bottom: 1.5rem;
}

.dashboard2-skeleton-card {
	min-height: 6.5rem;
	border: 1px solid #dee2e6;
	border-radius: 0.75rem;
	padding: 1rem;
	background:
		linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0)) 0 0 / 200% 100%,
		#e9ecef;
	animation: dashboard2-shimmer 1.2s ease-in-out infinite;
}

.dashboard2-skeleton-block {
	min-height: 15rem;
	overflow: hidden;
}

.dashboard2-skeleton-status {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 1.5rem;
	margin-bottom: 1rem;
}

.dashboard2-skeleton-line,
.dashboard2-skeleton-row {
	border-radius: 999px;
	background:
		linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0)) 0 0 / 200% 100%,
		#e9ecef;
	animation: dashboard2-shimmer 1.2s ease-in-out infinite;
}

.dashboard2-skeleton-line {
	height: 0.9rem;
	margin-bottom: 0.85rem;
}

.dashboard2-skeleton-line-title {
	width: 48%;
	height: 1.25rem;
	margin-bottom: 1.25rem;
}

.dashboard2-skeleton-line-short {
	width: 68%;
}

.dashboard2-skeleton-row {
	height: 2.35rem;
	margin-top: 0.75rem;
	border-radius: 0.5rem;
}

.htmx-indicator.dashboard2-skeleton-request,
.dashboard2-skeleton-request.htmx-indicator {
	display: none;
}

.htmx-request .dashboard2-skeleton-request,
.htmx-request.dashboard2-skeleton-request {
	display: block;
}

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

@keyframes dashboard2-shimmer {
	to {
		background-position: -200% 0, 0 0;
	}
}

.dashboard2-kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
	margin-top: 20px;
	margin-bottom: 1.5rem;
}

.dashboard2-section {
	margin-bottom: 40px;
}

.kpi-card {
	border-radius: 0.75rem;
	padding: 1rem 1.25rem;
	border: 1px solid transparent;
	box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
	background-color: #ffffff;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kpi-card:hover,
.kpi-card:focus-within,
.action-item:hover,
.action-item:focus-within,
.risk-panel:hover,
.risk-panel:focus-within {
	transform: translateY(-1px);
	box-shadow: 0 0.65rem 1.2rem rgba(15, 23, 42, 0.08);
}

.kpi-title {
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.kpi-value {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.1;
}

.kpi-green {
	background-color: #d1e7dd;
	border-color: #a3cfbb;
	color: #0f5132;
}

.kpi-yellow {
	background-color: #fff3cd;
	border-color: #ffe69c;
	color: #664d03;
}

.kpi-red {
	background-color: #f8d7da;
	border-color: #f1aeb5;
	color: #842029;
}

.action-list {
	display: grid;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

.action-item {
	border: 1px solid #dee2e6;
	border-left-width: 0.375rem;
	border-radius: 0.75rem;
	padding: 1rem;
	background-color: #ffffff;
	box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.action-item.low {
	border-left-color: #198754;
}

.action-item.medium {
	border-left-color: #fd7e14;
}

.action-item.high {
	border-left-color: #dc3545;
}

.action-title {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.action-description {
	color: #6c757d;
	margin-bottom: 0.5rem;
}

.action-link {
	font-weight: 600;
	text-decoration: none;
}

.role-compliance-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5rem;
	background-color: #ffffff;
}

.role-compliance-table th,
.role-compliance-table td {
	padding: 0.75rem;
	border: 1px solid #dee2e6;
	text-align: left;
}

.role-row {
	transition: background-color 0.2s ease-in-out;
}

.risk-low {
	background-color: #d1e7dd;
}

.risk-medium {
	background-color: #fff3cd;
}

.risk-high {
	background-color: #f8d7da;
}

#trendChart,
#heatmapChart {
	width: 100%;
	max-width: 100%;
	display: block;
	margin-top: 20px;
}

#trendChart {
	min-height: 300px;
	height: 300px !important;
}

#heatmapChart {
	width: auto;
	max-width: 100%;
}

.dashboard2-section canvas {
	margin-top: 20px;
}

.risk-panel {
	margin-top: 1rem;
	background-color: #ffffff;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	padding: 1rem;
}

.risk-panel h3 {
	font-size: 1rem;
	margin-bottom: 0.75rem;
}

.risk-table {
	width: 100%;
	border-collapse: collapse;
}

.risk-table th,
.risk-table td {
	padding: 0.65rem;
	border-top: 1px solid #e9ecef;
	text-align: left;
}

.risk-table th {
	color: #495057;
	font-size: 0.875rem;
	font-weight: 700;
}

.risk-driver-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
}

.risk-driver-label {
	display: block;
	color: #6c757d;
	font-size: 0.85rem;
	margin-bottom: 0.25rem;
}

.risk-empty {
	color: #6c757d;
	margin-bottom: 0;
}

@media (max-width: 991.98px) {
	.dashboard2-intelligence-strip {
		grid-template-columns: 1fr;
	}
}
