.stat-search-wrapper {
	margin-bottom: 1rem;
}

.stat-search-body {
	padding: 1.25rem 1.5rem;
	background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
	border-top: 1px solid #dbeafe;
}

.stat-search-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .875rem 1rem;
}

.stat-search-group {
	display: flex;
	flex-direction: column;
	gap: .375rem;
}

.stat-search-label {
	font-size: .75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #1d4ed8;
}

.stat-search-input,
.stat-search-select {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 2.5rem;
	padding: .5rem .75rem;
	border-radius: .5rem;
	border: 1px solid #bfdbfe !important;
	background-color: #fff;
	font-size: .875rem;
	color: #1f2937;
	box-shadow: none !important;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.stat-search-group input[type="text"].stat-search-input,
.stat-search-group select.stat-search-select {
	border-color: #bfdbfe !important;
	box-shadow: none !important;
}

.stat-search-group input[type="text"].stat-search-input:hover,
.stat-search-group select.stat-search-select:hover {
	border-color: #93c5fd !important;
}

.stat-search-input::placeholder {
	color: #9ca3af;
}

.stat-search-input:focus,
.stat-search-select:focus {
	outline: none;
	border-color: #3b82f6 !important;
	background-color: #f8fbff;
	box-shadow: 0 0 0 3px rgb(59 130 246 / .16) !important;
}

.stat-search-actions {
	display: flex;
	justify-content: flex-end;
	align-items: flex-end;
	gap: .5rem;
	min-height: 100%;
}

.stat-search-button {
	height: 2.5rem;
	padding: 0 1rem;
	border-radius: .5rem;
	font-size: .813rem;
	font-weight: 600;
	letter-spacing: .02em;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
}

.stat-search-button:hover {
	transform: translateY(-1px);
}

.stat-search-button-primary {
	color: #fff;
	background-color: #2563eb;
	box-shadow: 0 4px 10px rgb(37 99 235 / .28);
}

.stat-search-button-primary:hover {
	background-color: #1d4ed8;
}

.stat-search-button-secondary {
	color: #1d4ed8;
	background-color: #eff6ff;
	border-color: #bfdbfe;
}

.stat-search-button-secondary:hover {
	background-color: #dbeafe;
}

@media (max-width: 768px) {
	.stat-search-body {
		padding: 1rem;
	}

	.stat-search-grid {
		grid-template-columns: 1fr;
	}

	.stat-search-actions {
		justify-content: stretch;
	}

	.stat-search-button {
		flex: 1 1 0;
	}
}

.stat-table-wrapper {
	background: #fff;
	border-radius: .75rem;
	box-shadow: 0 1px 2px 0 rgb(0 0 0/.05);
	border: 1px solid #f3f4f6;
	overflow: hidden
}

.stat-table-title-bar {
	padding: 1rem 1.5rem;
	background-color: #3b82f6;
	border-bottom: 1px solid #bfdbfe
}

.stat-table-title-bar h3 {
	font-size: .875rem;
	font-weight: 600;
	color: #fff;
	letter-spacing: .05em;
	text-transform: uppercase;
	margin: 0
}

.stat-table-scroll {
	overflow-x: auto
}

.stat-table {
	width: 100%;
	font-size: .875rem;
	border-collapse: collapse
}

.stat-table thead tr {
	background-color: #eff6ff
}

.stat-table thead th {
	padding: .75rem 1.25rem;
	font-size: .75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #1d4ed8;
	border-bottom: 2px solid #bfdbfe;
	white-space: nowrap
}

.stat-table tbody tr {
	transition: background-color .15s ease
}

.stat-table tbody tr:hover {
	background-color: #eff6ff
}

.stat-table tbody tr.stat-row-even {
	background-color: #fff
}

.stat-table tbody tr.stat-row-odd {
	background-color: rgba(239, 246, 255, .4)
}

.stat-table td {
	padding: .75rem 1.25rem;
	border-bottom: 1px solid #f3f4f6
}

.stat-cell-num {
	color: #9ca3af;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: .75rem;
	width: 2.5rem
}

.stat-cell-name {
	font-weight: 500;
	color: #374151
}

.stat-cell-count {
	text-align: right;
	font-weight: 600;
	color: #2563eb
}

.stat-cell-pct {
	text-align: right
}

.stat-pct-inner {
	display: inline-flex;
	align-items: center;
	gap: .375rem;
	justify-content: flex-end
}

.stat-pct-text {
	color: #6b7280
}

.stat-pct-bar {
	display: block;
	height: 8px;
	border-radius: 9999px;
	background-color: #3b82f6;
	opacity: .7;
	flex-shrink: 0
}

.stat-table tfoot tr {
	background-color: #1d4ed8
}

.stat-table tfoot td {
	padding: .75rem 1.25rem;
	color: #fff;
	font-weight: 700;
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .05em;
	border-bottom: none
}

.stat-foot-count {
	text-align: right
}

.stat-foot-pct {
	text-align: right;
	color: #bfdbfe;
	font-weight: 600
}

.stat-tabbar-wrapper {
	padding: .375rem;
	border: 1px solid #dbeafe;
	border-radius: 1rem;
	background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
	box-shadow: 0 10px 30px rgb(15 23 42 / .05);
}

.stat-tabbar {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .625rem;
}

.stat-tab-button {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: .125rem;
	min-height: 4rem;
	padding: .85rem 1rem;
	border-radius: .875rem;
	border: 1px solid transparent;
	text-align: left;
	transition: transform .12s ease, border-color .12s ease, background-color .12s ease, color .12s ease, box-shadow .12s ease;
}

.stat-tab-button:hover {
	transform: translateY(-1px);
}

.stat-tab-button:disabled {
	cursor: wait;
	opacity: .6;
	transform: none;
}

.stat-tab-button-active {
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
	color: #fff;
	border-color: #1d4ed8;
	box-shadow: 0 12px 24px rgb(37 99 235 / .22);
}

.stat-tab-button-inactive {
	background: #f8fafc;
	color: #334155;
	border-color: #e2e8f0;
}

.stat-tab-button-inactive:hover {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #1e3a8a;
}

.stat-tab-button-title {
	font-size: .9375rem;
	font-weight: 700;
	line-height: 1.2;
}

.stat-tab-button-state {
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .02em;
	opacity: .85;
}

.stat-loading-wrapper {
	width: 100%;
}

.stat-loading-panel {
	width: 100%;
	border: 1px solid #dbeafe;
	border-radius: 1.5rem;
	background: linear-gradient(180deg, rgb(255 255 255 / .98) 0%, #f8fbff 100%);
	box-shadow: 0 18px 45px rgb(15 23 42 / .08);
}

.stat-loading-body {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.5rem;
}

.stat-loading-spinner-shell {
	width: 3rem;
	height: 3rem;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 1rem;
	background: #eff6ff;
	color: #2563eb;
	box-shadow: inset 0 0 0 1px #dbeafe;
}

.stat-loading-spinner {
	width: 1.25rem;
	height: 1.25rem;
	animation: stat-loading-spin 1s linear infinite;
}

.stat-loading-spinner-track {
	opacity: .2;
}

.stat-loading-spinner-head {
	opacity: 1;
}

.stat-loading-content {
	min-width: 0;
	flex: 1 1 auto;
}

.stat-loading-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .875rem;
}

.stat-loading-kicker {
	margin: 0;
	font-size: .6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .24em;
	color: #2563eb;
}

.stat-loading-title {
	margin: .25rem 0 0;
	font-size: 1rem;
	font-weight: 700;
	color: #0f172a;
}

.stat-loading-description {
	margin: .25rem 0 0;
	font-size: .875rem;
	color: #64748b;
}

.stat-loading-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .5rem .875rem;
	border-radius: 9999px;
	background: #eff6ff;
	color: #1d4ed8;
	font-size: .75rem;
	font-weight: 600;
	box-shadow: inset 0 0 0 1px #dbeafe;
	white-space: nowrap;
}

.stat-loading-pills {
	margin-top: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.stat-loading-pill {
	height: 2rem;
	border-radius: 9999px;
	background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 45%, #f1f5f9 100%);
}

.stat-loading-pill-short {
	width: 6rem;
}

.stat-loading-pill-medium {
	width: 7.5rem;
}

.stat-loading-pill-long {
	width: 8.75rem;
}

@keyframes stat-loading-spin {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

.stat-multiselect-group {
	position: relative;
	overflow: visible;
}

.stat-multiselect {
	position: relative;
	width: 100%;
	overflow: visible;
}

.stat-multiselect.stat-multiselect-open {
	z-index: 9998;
	isolation: isolate;
}

.stat-multiselect-trigger {
	width: 100%;
	min-height: 2.75rem;
	padding: .5rem 2.5rem .5rem .75rem;
	border-radius: .5rem;
	border: 1px solid #bfdbfe;
	background-color: #fff;
	color: #1f2937;
	cursor: pointer;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .375rem;
	position: relative;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.stat-multiselect-trigger:hover {
	border-color: #93c5fd;
}

.stat-multiselect-trigger.active {
	border-color: #3b82f6;
	background-color: #f8fbff;
	box-shadow: 0 0 0 3px rgb(59 130 246 / .16);
}

.stat-multiselect-placeholder {
	color: #9ca3af;
	font-size: .875rem;
}

.stat-multiselect-arrow {
	position: absolute;
	right: .875rem;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid #6b7280;
	transition: transform .2s ease;
}

.stat-multiselect-trigger.active .stat-multiselect-arrow {
	transform: translateY(-50%) rotate(180deg);
}

.stat-multiselect-tag {
	display: inline-flex;
	align-items: center;
	gap: .25rem;
	padding: .25rem .5rem;
	border-radius: 9999px;
	background: #dbeafe;
	color: #1d4ed8;
	font-size: .75rem;
	font-weight: 600;
	line-height: 1;
}

.stat-multiselect-tag-remove {
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1rem;
	height: 1rem;
	border-radius: 9999px;
	transition: background-color .15s ease, color .15s ease;
}

.stat-multiselect-tag-remove:hover {
	background-color: rgb(37 99 235 / .12);
	color: #1e3a8a;
}

.stat-multiselect-dropdown {
	position: fixed;
	background: #fff;
	border: 1px solid #bfdbfe;
	border-radius: .75rem;
	box-shadow: 0 20px 40px rgb(37 99 235 / .15), 0 8px 16px rgb(15 23 42 / .08);
	z-index: 9999;
	max-height: 320px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.stat-multiselect-search {
	padding: .75rem;
	background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
	border-bottom: 1px solid #dbeafe;
}

.stat-multiselect-search-input {
	height: 2.5rem;
}

.stat-multiselect-options {
	overflow-y: auto;
	max-height: 220px;
	background-color: #fff;
}

.stat-multiselect-option {
	padding: .75rem 1rem;
	display: flex;
	align-items: center;
	gap: .625rem;
	cursor: pointer;
	transition: background-color .15s ease;
	font-size: .875rem;
	color: #374151;
	border-bottom: 1px solid #eff6ff;
}

.stat-multiselect-option:last-child {
	border-bottom: none;
}

.stat-multiselect-option:hover {
	background-color: #eff6ff;
}

.stat-multiselect-option.selected {
	background-color: #dbeafe;
}

.stat-multiselect-checkbox {
	width: 18px;
	height: 18px;
	border: 2px solid #93c5fd;
	border-radius: .25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: all .2s ease;
	background-color: #fff;
}

.stat-multiselect-option.selected .stat-multiselect-checkbox {
	background-color: #2563eb;
	border-color: #2563eb;
}

.stat-multiselect-checkbox::after {
	content: '';
	width: 5px;
	height: 10px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	opacity: 0;
	transition: opacity .2s ease;
}

.stat-multiselect-option.selected .stat-multiselect-checkbox::after {
	opacity: 1;
}

.stat-multiselect-footer {
	padding: .625rem .875rem;
	border-top: 1px solid #dbeafe;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: #f8fbff;
	font-size: .75rem;
}

.stat-multiselect-count {
	color: #6b7280;
	font-weight: 600;
}

.stat-multiselect-clear {
	color: #1d4ed8;
	cursor: pointer;
	font-weight: 600;
	padding: .25rem .5rem;
	border-radius: .375rem;
	transition: background-color .15s ease, color .15s ease;
}

.stat-multiselect-clear:hover {
	background-color: #dbeafe;
	color: #1e3a8a;
}

.stat-multiselect-no-results {
	padding: 1.25rem 1rem;
	text-align: center;
	color: #9ca3af;
	font-size: .875rem;
	font-style: italic;
}

@media (max-width: 768px) {
	.stat-tabbar {
		grid-template-columns: 1fr;
	}

	.stat-tab-button {
		min-height: 3.5rem;
	}

	.stat-loading-body {
		flex-direction: column;
		align-items: flex-start;
		padding: 1.25rem;
	}

	.stat-loading-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.stat-loading-badge {
		white-space: normal;
	}
}