*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	font-family: var(--font-sans);
	font-size: var(--text-base);
	line-height: var(--leading-normal);
	color: var(--foreground);
	background: var(--canvas);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body {
	margin: 0;
	background: var(--canvas);
	color: var(--foreground);
}

h1,
h2,
h3,
h4,
p {
	margin: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

[hidden] {
	display: none !important;
}

@keyframes fade-in {
	from {
		opacity: 0;
	}
}

@keyframes fade-out {
	to {
		opacity: 0;
	}
}

@keyframes rise-in {
	from {
		opacity: 0;
		translate: 0 var(--space-2);
	}
}

@keyframes pop-in {
	from {
		opacity: 0;
		scale: 0.98;
	}
}

@keyframes pop-out {
	to {
		opacity: 0;
		scale: 0.98;
	}
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

.num {
	font-variant-numeric: tabular-nums;
	font-family: var(--font-en), var(--font-ar), sans-serif;
}

.muted {
	color: var(--muted-foreground);
}

.subtle {
	color: var(--subtle-foreground);
}

.icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.icon-sm {
	width: 14px;
	height: 14px;
}

.icon-lg {
	width: 18px;
	height: 18px;
}

[dir="rtl"] .flip {
	transform: scaleX(-1);
}

h1,
h2,
h3 {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

.sheet:focus {
	outline: none;
}

:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: 2px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	height: var(--control-h);
	padding-inline: var(--space-3);
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
	transition:
		background-color var(--duration-fast) var(--ease-out),
		border-color var(--duration-fast) var(--ease-out),
		box-shadow var(--duration-fast) var(--ease-out),
		transform var(--duration-fast) var(--ease-out);
}

.btn:active {
	transform: scale(0.98);
}

.btn:disabled,
.btn[aria-disabled="true"] {
	opacity: 0.5;
	pointer-events: none;
}

.btn-primary {
	background: var(--primary);
	color: var(--primary-foreground);
	box-shadow: var(--shadow-xs), var(--shadow-inset);
}

.btn-primary:hover {
	background: var(--primary-hover);
}

.btn-primary:active {
	background: var(--primary-active);
}

.btn-outline {
	background: var(--background);
	border-color: var(--border-strong);
	box-shadow: var(--shadow-xs);
}

.btn-outline:hover,
.btn-outline[aria-expanded="true"] {
	background: var(--hover);
}

.btn-secondary {
	background: var(--secondary);
}

.btn-secondary:hover {
	background: var(--selected);
}

.btn-ghost {
	background: transparent;
	color: var(--muted-foreground);
}

.btn-ghost:hover {
	background: var(--hover);
	color: var(--foreground);
}

.btn-destructive {
	background: var(--destructive);
	color: var(--destructive-foreground);
	box-shadow: var(--shadow-xs), var(--shadow-inset);
}

.btn-destructive:hover {
	background: var(--destructive-hover);
}

.btn-link {
	height: auto;
	padding: 0;
	color: var(--primary);
}

.btn-link:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.btn-xs {
	height: var(--control-h-xs);
	padding-inline: var(--space-2);
	gap: var(--space-1);
	font-size: var(--text-xs);
	border-radius: var(--radius-sm);
}

.btn-sm {
	height: var(--control-h-sm);
	padding-inline: 10px;
	gap: 6px;
}

.btn-lg {
	height: var(--control-h-lg);
	padding-inline: var(--space-4);
	font-size: var(--text-base);
}

.btn-icon {
	width: var(--control-h);
	padding: 0;
}

.btn-icon.btn-sm {
	width: var(--control-h-sm);
}

.btn-icon.btn-xs {
	width: var(--control-h-xs);
}

.segmented {
	display: inline-flex;
	gap: 2px;
	padding: 2px;
	background: var(--muted);
	border-radius: var(--radius-lg);
}

.segmented button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: var(--control-h-sm);
	padding-inline: 10px;
	border: 0;
	border-radius: var(--radius-md);
	background: transparent;
	color: var(--muted-foreground);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
	cursor: pointer;
	transition: background-color var(--duration-fast), color var(--duration-fast);
}

.segmented button:hover {
	color: var(--foreground);
}

.segmented button[aria-pressed="true"],
.segmented button[aria-selected="true"] {
	background: var(--background);
	color: var(--foreground);
	box-shadow: var(--shadow-sm);
}

.tabs {
	display: flex;
	gap: var(--space-5);
	border-block-end: 1px solid var(--border);
}

.tabs a {
	position: relative;
	padding-block: 10px;
	color: var(--muted-foreground);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
}

.tabs a:hover {
	color: var(--foreground);
}

.tabs a[aria-current="page"] {
	color: var(--foreground);
}

.tabs a[aria-current="page"]::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-end: -1px;
	height: 2px;
	border-radius: 2px;
	background: var(--primary);
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 22px;
	max-width: 100%;
	padding-inline: 8px;
	border-radius: var(--radius-md);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
	line-height: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	background: var(--pill-bg, var(--pill-neutral-bg));
	color: var(--pill-fg, var(--pill-neutral-fg));
	vertical-align: middle;
}

.pill .icon {
	width: 12px;
	height: 12px;
	flex: none;
}

.pill-round {
	padding-inline: 9px;
	border-radius: var(--radius-full);
}

.pill-dot::before {
	content: "";
	width: 6px;
	height: 6px;
	flex-shrink: 0;
	border-radius: var(--radius-full);
	background: currentColor;
}

.pill-tag {
	height: 22px;
	padding-inline: var(--space-1-5);
	border-radius: var(--radius-sm);
	font-size: var(--text-sm);
	font-weight: var(--weight-regular);
}

.pill-outline {
	background: var(--card);
	border: 0;
	color: var(--muted-foreground);
	box-shadow: inset 0 0 0 1px var(--border);
}

.pill-outline .icon {
	color: var(--subtle-foreground);
}

.pill-x {
	display: inline-grid;
	place-items: center;
	width: 16px;
	height: 16px;
	margin-inline: 0 -4px;
	padding: 0;
	border: 0;
	border-radius: var(--radius-full);
	background: transparent;
	color: var(--subtle-foreground);
	cursor: pointer;
}

.pill-x:hover {
	background: var(--hover);
	color: var(--foreground);
}

.pill-x .icon {
	width: 10px;
	height: 10px;
}

.pill-lg {
	height: 28px;
	padding-inline: 10px;
	font-size: var(--text-sm);
}

.tone-neutral { --pill-bg: var(--pill-neutral-bg); --pill-fg: var(--pill-neutral-fg); }
.tone-green { --pill-bg: var(--pill-green-bg); --pill-fg: var(--pill-green-fg); }
.tone-teal { --pill-bg: var(--pill-teal-bg); --pill-fg: var(--pill-teal-fg); }
.tone-blue { --pill-bg: var(--pill-blue-bg); --pill-fg: var(--pill-blue-fg); }
.tone-indigo { --pill-bg: var(--pill-indigo-bg); --pill-fg: var(--pill-indigo-fg); }
.tone-violet { --pill-bg: var(--pill-violet-bg); --pill-fg: var(--pill-violet-fg); }
.tone-pink { --pill-bg: var(--pill-pink-bg); --pill-fg: var(--pill-pink-fg); }
.tone-orange { --pill-bg: var(--pill-orange-bg); --pill-fg: var(--pill-orange-fg); }
.tone-amber { --pill-bg: var(--pill-amber-bg); --pill-fg: var(--pill-amber-fg); }
.tone-red { --pill-bg: var(--pill-red-bg); --pill-fg: var(--pill-red-fg); }
.tone-brand { --pill-bg: var(--primary-soft); --pill-fg: var(--primary-soft-foreground); }
.tone-saffron { --pill-bg: var(--accent-brand-soft); --pill-fg: var(--accent-brand-foreground); }

.count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 18px;
	padding-inline: 5px;
	border-radius: var(--radius-sm);
	background: var(--muted);
	color: var(--muted-foreground);
	font-size: 11px;
	font-weight: var(--weight-medium);
	font-variant-numeric: tabular-nums;
}

.count-brand {
	background: var(--primary);
	color: var(--primary-foreground);
}

.kbd {
	display: inline-flex;
	align-items: center;
	height: 20px;
	padding-inline: 6px;
	border: 1px solid var(--border);
	border-block-end-width: 2px;
	border-radius: var(--radius-sm);
	background: var(--background);
	color: var(--muted-foreground);
	font-family: var(--font-en), sans-serif;
	font-size: 11px;
}

.delta {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-size: var(--text-xs);
	font-weight: var(--weight-semibold);
	font-variant-numeric: tabular-nums;
	direction: ltr;
}

.delta-up {
	color: var(--success);
}

.delta-down {
	color: var(--destructive-text);
}

.field {
	display: grid;
	gap: 6px;
}

.label {
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
}

.hint {
	font-size: var(--text-xs);
	color: var(--muted-foreground);
}

.error-text {
	font-size: var(--text-xs);
	color: var(--destructive-text);
}

.input,
.select,
.textarea {
	width: 100%;
	height: var(--control-h);
	padding-inline: 10px;
	border: 1px solid var(--input);
	border-radius: var(--radius-md);
	background: var(--background);
	font-size: var(--text-sm);
	box-shadow: var(--shadow-xs);
	transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.input::placeholder,
.textarea::placeholder {
	color: var(--subtle-foreground);
}

.input:hover,
.select:hover,
.textarea:hover {
	border-color: var(--border-strong);
}

.input:focus,
.select:focus,
.textarea:focus,
.input-group:focus-within,
.slug-group:focus-within {
	outline: none;
	border-color: var(--ring);
	box-shadow: 0 0 0 var(--ring-width) color-mix(in oklch, var(--ring), transparent 80%);
}

.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"],
.input-group:has([aria-invalid="true"]),
.slug-group:has([aria-invalid="true"]) {
	border-color: var(--destructive);
	box-shadow: 0 0 0 var(--ring-width) color-mix(in oklch, var(--destructive), transparent 85%);
}

.input:disabled {
	background: var(--muted);
	opacity: 0.7;
	cursor: not-allowed;
}

.textarea {
	height: auto;
	min-height: 88px;
	padding-block: 8px;
	resize: vertical;
}

.select {
	appearance: none;
	padding-inline-end: 30px;
	background-image: linear-gradient(45deg, transparent 50%, var(--muted-foreground) 50%),
		linear-gradient(135deg, var(--muted-foreground) 50%, transparent 50%);
	background-size: 4px 4px;
	background-repeat: no-repeat;
	background-position:
		calc(100% - 16px) 50%,
		calc(100% - 12px) 50%;
}

[dir="rtl"] .select {
	background-position:
		12px 50%,
		16px 50%;
}

.input-group {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	height: var(--control-h);
	padding-inline: 10px;
	border: 1px solid var(--input);
	border-radius: var(--radius-md);
	background: var(--background);
	color: var(--muted-foreground);
	box-shadow: var(--shadow-xs);
}

.input-group input {
	flex: 1;
	min-width: 0;
	height: 100%;
	border: 0;
	background: transparent;
	outline: none;
	font-size: var(--text-sm);
	color: var(--foreground);
}

.input-group input::placeholder {
	color: var(--subtle-foreground);
}

.pw-wrap {
	display: grid;
	align-items: center;
}

.pw-wrap > * {
	grid-area: 1 / 1;
}

.pw-wrap .input {
	padding-inline-end: calc(var(--control-h-sm) + var(--space-2));
}

.pw-toggle {
	justify-self: end;
	margin-inline-end: var(--space-1);
}

.strength {
	display: grid;
	gap: var(--space-1);
}

.strength-bar {
	display: flex;
	gap: var(--space-1);
}

.strength-bar i {
	flex: 1;
	height: var(--space-1);
	border-radius: var(--radius-sm);
	background: var(--muted);
	transition: background-color var(--duration) var(--ease-out);
}

.strength-label {
	min-height: var(--space-4);
	color: var(--muted-foreground);
	font-size: var(--text-xs);
}

.strength[data-level="1"] .strength-bar i:nth-child(-n + 1) {
	background: var(--destructive);
}

.strength[data-level="2"] .strength-bar i:nth-child(-n + 2) {
	background: var(--warning);
}

.strength[data-level="3"] .strength-bar i:nth-child(-n + 3),
.strength[data-level="4"] .strength-bar i {
	background: var(--primary);
}

.strength[data-level="1"] .strength-label {
	color: var(--destructive-text);
}

.btn[data-loading],
.btn[aria-busy="true"] {
	opacity: 1;
	cursor: progress;
}

.spin {
	animation: spin var(--duration-spin) linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.spin {
		animation-duration: var(--duration-spin-slow);
	}
}

.checkbox {
	appearance: none;
	display: inline-grid;
	place-content: center;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--background);
	cursor: pointer;
	transition: background-color var(--duration-fast), border-color var(--duration-fast);
}

.checkbox:checked {
	border-color: var(--primary);
	background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.switch {
	appearance: none;
	position: relative;
	width: 32px;
	height: 18px;
	margin: 0;
	border-radius: var(--radius-full);
	background: var(--border-strong);
	cursor: pointer;
	transition: background-color var(--duration);
}

.switch::after {
	content: "";
	position: absolute;
	inset-block-start: 2px;
	inset-inline-start: 2px;
	width: 14px;
	height: 14px;
	border-radius: var(--radius-full);
	background: #ffffff;
	box-shadow: var(--shadow-sm);
	transition: translate var(--duration) var(--ease-out);
}

.switch:checked {
	background: var(--primary);
}

.switch:checked::after {
	translate: 14px 0;
}

[dir="rtl"] .switch:checked::after {
	translate: -14px 0;
}

.card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-xs);
}

.card-header {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-4) var(--space-5);
}

.card-title {
	font-size: var(--text-md);
	font-weight: var(--weight-semibold);
	letter-spacing: -0.01em;
}

.card-body {
	padding: 0 var(--space-5) var(--space-5);
}

.card-actions {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	margin-inline-start: auto;
}

.icon-tile {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	border-radius: var(--radius-lg);
	background: var(--pill-bg, var(--muted));
	color: var(--pill-fg, var(--foreground));
}

.icon-tile-sm {
	width: 20px;
	height: 20px;
	border-radius: var(--radius-sm);
}

.icon-tile-sm .icon {
	width: 12px;
	height: 12px;
}

.stat {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: var(--space-4);
	padding: var(--space-5);
}

.stat-head {
	display: flex;
	align-items: center;
	gap: 10px;
	grid-column: 1 / -1;
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
}

.stat-head .btn {
	margin-inline-start: auto;
}

.stat .icon-tile {
	background: var(--muted);
	color: var(--muted-foreground);
}

@media (hover: hover) {
	.stat .stat-open {
		opacity: 0;
		transition: opacity var(--duration-fast) var(--ease-out);
	}

	.stat:hover .stat-open,
	.stat:focus-within .stat-open {
		opacity: 1;
	}
}

.stat-value {
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-tight);
	letter-spacing: -0.02em;
}

.stat-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-block-start: 6px;
	font-size: var(--text-xs);
	color: var(--muted-foreground);
}

.dots {
	display: grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(8, 4px);
	gap: 3px;
	align-self: end;
}

.dots i {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--chart-empty);
}

.dots i.on {
	background: color-mix(in oklch, var(--subtle-foreground) 45%, var(--chart-empty));
}

.dots i.on.now {
	background: var(--chart-1);
}

.avatar {
	display: inline-grid;
	place-items: center;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	border-radius: var(--radius-full);
	background: var(--pill-bg, var(--muted));
	color: var(--pill-fg, var(--muted-foreground));
	font-size: 11px;
	font-weight: var(--weight-semibold);
	overflow: hidden;
}

.avatar-lg {
	width: 40px;
	height: 40px;
	font-size: var(--text-base);
}

.avatar-xl {
	width: 56px;
	height: 56px;
	border-radius: var(--radius-xl);
	font-size: var(--text-lg);
}

.avatar-stack {
	display: inline-flex;
}

.avatar-stack .avatar {
	box-shadow: 0 0 0 2px var(--card);
}

.avatar-stack .avatar + .avatar {
	margin-inline-start: -6px;
}

.entity {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	font-weight: var(--weight-medium);
}

.entity > span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.logo-chip {
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	border-radius: var(--radius-sm);
	background: var(--pill-fg, var(--foreground));
	color: var(--card);
	font-size: 10px;
	font-weight: var(--weight-semibold);
}

.progress {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	font-size: var(--text-xs);
	color: var(--muted-foreground);
}

.progress-track {
	flex: 1;
	height: 4px;
	min-width: 48px;
	border-radius: var(--radius-full);
	background: var(--muted);
	overflow: hidden;
}

.progress-track > i {
	display: block;
	height: 100%;
	width: var(--value);
	border-radius: inherit;
	background: var(--primary);
}

.table-wrap {
	position: relative;
	overflow-x: auto;
	scroll-padding-inline-start: 280px;
	scroll-padding-block-start: 40px;
}

.table {
	--check-w: 44px;
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: var(--text-sm);
}

.table:not(:has(td.cell-check:first-child)) {
	--check-w: 0px;
}

.table th {
	position: sticky;
	inset-block-start: 0;
	z-index: 2;
	height: 36px;
	padding-inline: var(--space-3);
	border-block-end: 1px solid var(--border);
	border-inline-end: 1px solid transparent;
	background: var(--card);
	color: var(--muted-foreground);
	font-size: var(--text-xs);
	font-weight: var(--weight-regular);
	text-align: start;
	white-space: nowrap;
}

.table th:last-child,
.table td:last-child {
	border-inline-end: 0;
}

.table th .th {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.table td {
	position: relative;
	height: 44px;
	padding-inline: var(--space-3);
	border-block-end: 1px solid var(--border);
	border-inline-end: 1px solid transparent;
	background: var(--card);
	white-space: nowrap;
}

.table th.cell-check:first-child,
.table td.cell-check:first-child {
	position: sticky;
	inset-inline-start: 0;
	z-index: 1;
}

.table th.cell-check:first-child {
	z-index: 4;
}

.table th[data-title],
.table td[data-title] {
	position: sticky;
	inset-inline-start: var(--check-w);
	z-index: 1;
}

.table th[data-title] {
	z-index: 4;
}

.table tbody tr {
	transition: background-color var(--duration-fast);
}

.table tbody tr:not(.group-row):hover > td {
	background: var(--hover);
}

.table tbody tr[aria-selected="true"] > td,
.table tbody tr.selected > td,
.table tbody tr[data-open] > td {
	background: var(--selected);
}

.table tbody tr[aria-selected="true"] .plain,
.table tbody tr.selected .plain,
.table tbody tr[data-open] .plain,
.table tbody tr[data-panel-open] .plain {
	color: var(--foreground);
}

.table-wrap[data-scrolled] .table th[data-title],
.table-wrap[data-scrolled] .table td[data-title] {
	border-inline-end-color: var(--border-strong);
}

.table .cell-check {
	width: var(--check-w, 44px);
	min-width: var(--check-w, 44px);
	padding-inline-end: 0;
}

.table tbody td.cell-check:first-child .checkbox {
	opacity: 0;
	transition: opacity var(--duration-fast);
}

.table tbody tr:hover td.cell-check:first-child .checkbox,
.table tbody td.cell-check:first-child .checkbox:checked,
.table tbody td.cell-check:first-child .checkbox:focus-visible,
.table:has(tbody tr[aria-selected="true"]) tbody td.cell-check:first-child .checkbox {
	opacity: 1;
}

@media (hover: none) {
	.table tbody td.cell-check:first-child .checkbox {
		opacity: 1;
	}
}

.table .cell-end {
	text-align: end;
}

.table .cell-truncate {
	max-width: 220px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.table .group-row td {
	height: 36px;
	background: var(--card);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
}

.group-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.group-label .icon {
	color: var(--muted-foreground);
}

.table-footer {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	padding: 10px var(--space-5);
	font-size: var(--text-xs);
	color: var(--muted-foreground);
}

.table-footer .pager {
	display: flex;
	gap: 4px;
	margin-inline-start: auto;
}

.menu {
	display: grid;
	gap: 1px;
	min-width: 220px;
	padding: 4px;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--popover);
	box-shadow: var(--shadow-lg);
}

.menu-item {
	display: flex;
	align-items: center;
	gap: 10px;
	height: var(--control-h);
	padding-inline: 8px;
	border-radius: var(--radius-md);
	font-size: var(--text-sm);
	cursor: pointer;
}

button.menu-item {
	width: 100%;
	border: 0;
	background: transparent;
	text-align: start;
}

.menu-item:hover,
.menu-item:focus-visible,
.menu-item[data-highlighted] {
	background: var(--hover);
}

.menu-item:focus-visible {
	outline-offset: -2px;
}

.menu-check {
	margin-inline-start: auto;
	color: var(--primary);
	visibility: hidden;
}

.menu-item[aria-checked="true"] .menu-check {
	visibility: visible;
}

.menu-item .icon {
	color: var(--muted-foreground);
}

.menu-item .kbd,
.menu-item .count {
	margin-inline-start: auto;
}

.menu-item-danger {
	color: var(--destructive-text);
}

.menu-item-danger .icon {
	color: currentColor;
}

.menu-label {
	padding: 6px 8px 4px;
	font-size: 11px;
	font-weight: var(--weight-medium);
	color: var(--subtle-foreground);
}

.menu-sep {
	height: 1px;
	margin: 4px -4px;
	background: var(--border);
}

.dialog {
	width: min(480px, 100%);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--popover);
	box-shadow: var(--shadow-lg);
}

.dialog-header {
	display: grid;
	gap: 4px;
	padding: var(--space-5) var(--space-5) 0;
}

.dialog-header:has(+ .dialog-footer) {
	padding-block-end: var(--space-5);
}

.dialog-title {
	font-size: var(--text-md);
	font-weight: var(--weight-semibold);
}

.dialog-body {
	display: grid;
	gap: var(--space-4);
	padding: var(--space-5);
}

.dialog-footer {
	display: flex;
	justify-content: flex-end;
	gap: var(--space-2);
	padding: var(--space-3) var(--space-5);
	border-block-start: 1px solid var(--border);
	background: var(--canvas);
	border-end-start-radius: var(--radius-xl);
	border-end-end-radius: var(--radius-xl);
}

.tooltip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 8px;
	border-radius: var(--radius-md);
	background: var(--foreground);
	color: var(--background);
	font-size: var(--text-xs);
	box-shadow: var(--shadow-md);
}

.tooltip .kbd {
	border-color: transparent;
	background: color-mix(in oklch, var(--background), transparent 80%);
	color: inherit;
}

.alert {
	display: flex;
	gap: var(--space-3);
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-lg);
	background: var(--pill-bg);
	color: var(--pill-fg);
	font-size: var(--text-sm);
}

.alert strong {
	display: block;
	font-weight: var(--weight-semibold);
}

.alert p {
	opacity: 0.9;
}

.empty {
	display: grid;
	justify-items: center;
	gap: var(--space-2);
	padding: var(--space-10) var(--space-6);
	text-align: center;
}

.empty .icon-tile {
	width: 44px;
	height: 44px;
	margin-block-end: var(--space-2);
	border-radius: var(--radius-xl);
}

.empty-title {
	font-weight: var(--weight-semibold);
}

.empty p {
	max-width: 320px;
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.toast {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	width: min(360px, 100%);
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--popover);
	box-shadow: var(--shadow-lg);
	font-size: var(--text-sm);
}

.toast .btn {
	margin-inline-start: auto;
}

.toast-text {
	flex: 1;
	min-width: 0;
}

.toast[data-state="open"] {
	animation: rise-in var(--duration) var(--ease-out);
}

.toast[data-state="closing"] {
	animation: fade-out var(--duration) var(--ease-out) forwards;
}

.table-empty {
	padding: var(--space-6) var(--space-4);
	color: var(--muted-foreground);
	font-size: var(--text-sm);
	text-align: center;
}

.skeleton {
	display: block;
	height: 12px;
	border-radius: var(--radius-sm);
	background: linear-gradient(90deg, var(--muted), var(--hover), var(--muted));
	background-size: 200% 100%;
	animation: shimmer 1.6s linear infinite;
}

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

.sep {
	height: 1px;
	background: var(--border);
	border: 0;
	margin: 0;
}

.legend {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
	font-size: var(--text-xs);
	color: var(--muted-foreground);
}

.legend span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.legend span::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--swatch);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}

.avatar-md {
	width: 32px;
	height: 32px;
	font-size: var(--text-sm);
}

.row-between {
	justify-content: space-between;
}

.text-warning {
	color: var(--warning);
	font-weight: var(--weight-semibold);
}

.unit {
	margin-inline-end: 4px;
	font-size: 0.5em;
	font-weight: var(--weight-medium);
	color: var(--muted-foreground);
	letter-spacing: 0;
}

.stat-meta span {
	white-space: nowrap;
}

:root[data-theme="dark"] .logo-chip {
	background: var(--pill-bg, var(--muted));
	color: var(--pill-fg, var(--foreground));
}

.icon-tile-lg {
	width: 44px;
	height: 44px;
	border-radius: var(--radius-xl);
}

.spacer {
	flex: 1;
}

.select-sm {
	width: auto;
	height: var(--control-h-sm);
	box-shadow: none;
}

.pill {
	justify-self: start;
}

.segmented a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: var(--control-h-sm);
	padding-inline: 10px;
	border-radius: var(--radius-md);
	color: var(--muted-foreground);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
	transition: background-color var(--duration-fast), color var(--duration-fast);
}

.segmented a:hover {
	color: var(--foreground);
}

.segmented a[aria-current="page"] {
	background: var(--background);
	color: var(--foreground);
	box-shadow: var(--shadow-sm);
}

.native-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip-path: inset(50%) !important;
	border: 0 !important;
	white-space: nowrap !important;
}

.select-trigger {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	width: 100%;
	min-width: 0;
	height: var(--control-h);
	padding-inline: 10px;
	border: 1px solid var(--input);
	border-radius: var(--radius-md);
	background: var(--background);
	color: var(--foreground);
	font-size: var(--text-sm);
	text-align: start;
	box-shadow: var(--shadow-xs);
	cursor: pointer;
	transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.select-trigger:hover {
	border-color: var(--border-strong);
}

.select-trigger:focus-visible,
.select-trigger[aria-expanded="true"] {
	outline: none;
	border-color: var(--ring);
	box-shadow: 0 0 0 var(--ring-width) color-mix(in oklch, var(--ring), transparent 80%);
}

.select-trigger[aria-invalid="true"] {
	border-color: var(--destructive);
	box-shadow: 0 0 0 var(--ring-width) color-mix(in oklch, var(--destructive), transparent 85%);
}

.select-trigger:disabled {
	background: var(--muted);
	opacity: 0.7;
	cursor: not-allowed;
}

.select-trigger-sm {
	width: auto;
	height: var(--control-h-sm);
	box-shadow: none;
}

.select-value {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.select-placeholder .select-value {
	color: var(--subtle-foreground);
}

.select-chevron,
.date-icon {
	flex: none;
	color: var(--muted-foreground);
	transition: transform var(--duration) var(--ease-out);
}

.select-trigger[aria-expanded="true"] .select-chevron {
	transform: rotate(180deg);
}

.select-menu {
	max-height: min(320px, calc(100dvh - var(--space-8)));
	padding: 4px;
}

.select-search {
	position: sticky;
	inset-block-start: -4px;
	z-index: 1;
	margin: -4px -4px 4px;
	padding: var(--space-2);
	border-block-end: 1px solid var(--border);
	background: var(--popover);
}

.select-search .input-group {
	width: 100%;
	min-width: 0;
	box-shadow: none;
}

.select-options {
	display: grid;
	gap: 1px;
}

.menu-item-label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.menu-item[aria-disabled="true"] {
	color: var(--subtle-foreground);
	cursor: not-allowed;
}

.select-menu .dot {
	width: 8px;
	height: 8px;
	flex: none;
	border-radius: var(--radius-full);
	background: var(--pill-fg);
}

.date-pop {
	display: grid;
	gap: var(--space-2);
	width: 296px;
	padding: var(--space-3);
}

.cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
}

.cal-month {
	font-size: var(--text-sm);
	font-weight: var(--weight-semibold);
}

.cal-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 2px;
}

.cal-week span {
	display: grid;
	place-items: center;
	height: 24px;
	color: var(--subtle-foreground);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
}

.cal-day {
	display: grid;
	place-items: center;
	height: 36px;
	border: 0;
	border-radius: var(--radius-md);
	background: transparent;
	color: var(--foreground);
	font-size: var(--text-sm);
	cursor: pointer;
	transition: background-color var(--duration-fast), color var(--duration-fast);
}

.cal-day:hover {
	background: var(--hover);
}

.cal-day:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: -2px;
}

.cal-outside {
	color: var(--subtle-foreground);
}

.cal-today {
	font-weight: var(--weight-semibold);
	box-shadow: inset 0 0 0 1px var(--border-strong);
}

.cal-day[aria-pressed="true"] {
	background: var(--primary);
	color: var(--primary-foreground);
	box-shadow: var(--shadow-inset);
}

.cal-time {
	display: grid;
	gap: var(--space-2);
	padding-block-start: var(--space-2);
	border-block-start: 1px solid var(--border);
}

.cal-time .chip {
	height: var(--control-h-xs);
	padding-inline: 10px;
	font-size: var(--text-xs);
}

.cal-foot {
	display: flex;
	justify-content: space-between;
	padding-block-start: var(--space-2);
	border-block-start: 1px solid var(--border);
}

.ask-thread {
	display: grid;
	gap: var(--space-4);
	padding-block-start: var(--space-3);
	border-block-start: 1px solid color-mix(in oklch, var(--primary), transparent 80%);
}

.ask-turn {
	display: grid;
	gap: var(--space-2);
	animation: rise-in var(--duration) var(--ease-out);
}

.ask-q {
	justify-self: end;
	max-width: 85%;
	margin: 0;
	padding: 6px var(--space-3);
	border-radius: var(--radius-lg);
	background: var(--muted);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
}

.ask-a {
	display: grid;
	gap: var(--space-2);
	font-size: var(--text-sm);
	line-height: 1.6;
}

.ask-a p {
	margin: 0;
}

.ask-a ul {
	display: grid;
	gap: 4px;
	margin: 0;
	padding-inline-start: 18px;
	color: var(--foreground);
}

.ask-thinking {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--muted-foreground);
}

.ask-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-1);
	padding-block-start: var(--space-1);
}

.ask-form .input-group {
	padding-inline-end: 4px;
	background: var(--card);
}

.ask-form .input-group > .icon {
	color: var(--primary);
}

.ask-send {
	flex: none;
	border-radius: var(--radius-full);
}

@media (prefers-reduced-motion: reduce) {
	.ask-turn,
	.select-chevron {
		animation: none;
		transition: none;
	}
}

.input-xs {
	width: 72px;
	height: var(--control-h-xs);
	padding-inline: var(--space-2);
	font-size: var(--text-xs);
}

.cal-time .row {
	flex-wrap: wrap;
	gap: var(--space-1);
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
	appearance: none;
}

.strength-label:empty {
	display: none;
}

.card-header-stack .hint {
	font-size: var(--text-sm);
}

a.pill:hover {
	border-color: var(--border-strong);
	color: var(--foreground);
}

.agent-box {
	grid-template-columns: minmax(0, 1fr);
}

.ask-form .input-group input {
	min-width: 0;
}

.grid-2 > .field {
	align-content: start;
}

.agent-box .chip {
	height: auto;
	min-height: var(--control-h-sm);
	padding-block: var(--space-1);
	white-space: normal;
	text-align: start;
}

.card .table th:first-child,
.card .table td:first-child {
	padding-inline-start: var(--space-5);
}

.card .table th:last-child,
.card .table td:last-child {
	padding-inline-end: var(--space-5);
}

.unit.unit-symbol {
	font-size: 0.72em;
	font-weight: var(--weight-regular);
}

@media (max-width: 640px) {
	.table-footer {
		gap: var(--space-3);
		padding-inline: var(--space-4);
	}

	.table-footer > span {
		white-space: nowrap;
	}
}

.dialog-header:has(> .dialog-icon) {
	grid-template-columns: 40px minmax(0, 1fr);
	column-gap: var(--space-4);
	align-items: start;
}

.dialog-header:has(> .dialog-icon) > :not(.dialog-icon) {
	grid-column: 2;
}

.dialog-header > .dialog-icon {
	grid-row: 1 / span 4;
	margin: 0;
}

.dialog-header:has(> .dialog-icon) > .dialog-title {
	align-self: center;
	min-height: 40px;
	display: flex;
	align-items: center;
}

.dialog-header:has(> .dialog-icon) > .dialog-title:has(+ *) {
	min-height: 0;
	padding-block-start: var(--space-2);
}

.step-chain {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	align-content: start;
	gap: var(--space-2);
	min-width: 0;
}

.step-chain .pill {
	flex: none;
}

.chain-step {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	min-width: 0;
}

.step-wait {
	color: var(--subtle-foreground);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
}

.card-stats-block {
	display: grid;
	gap: var(--space-3);
	padding-block-start: var(--space-4);
	border-block-start: 1px solid var(--border);
}

.card-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-3);
	margin: 0;
}

.card-stats-meta {
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1.5fr);
}

.card-stats > div {
	display: grid;
	align-content: start;
	gap: 2px;
	min-width: 0;
}

.card-stats dt {
	color: var(--muted-foreground);
	font-size: var(--text-xs);
}

.card-stats dd {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 var(--space-1);
	margin: 0;
	font-size: var(--text-sm);
	font-weight: var(--weight-semibold);
}

.card-stats dd > .num:first-child {
	font-size: var(--text-md);
}

.card-stats-meta dd > .num:first-child {
	font-size: var(--text-sm);
}

.card-stat-pct {
	color: var(--muted-foreground);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
}

.funnel-bar {
	display: flex;
	gap: 2px;
	height: 4px;
	border-radius: var(--radius-full);
	background: var(--muted);
	overflow: hidden;
}

.funnel-bar > i {
	width: var(--value);
	transition: width var(--duration) var(--ease-out);
}

.funnel-bar > i:first-child {
	background: var(--primary);
}

.funnel-bar > i + i {
	background: var(--border-strong);
}

.card-switch {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	min-height: var(--control-h-sm);
	color: var(--muted-foreground);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
	cursor: pointer;
}

.card-switch:has(.switch:disabled) {
	cursor: default;
	opacity: 0.6;
}

.card-switch:has(.switch:disabled) + [data-card-action]:not([hidden]) {
	margin-inline-start: var(--space-1);
}

.stat-grid > a {
	display: grid;
	align-content: start;
	gap: var(--space-1);
	min-width: 0;
	padding: var(--space-4) var(--space-5);
	border-inline-start: 1px solid var(--border);
	color: var(--muted-foreground);
	font-size: var(--text-xs);
	text-decoration: none;
	transition: background-color var(--duration-fast);
}

.stat-grid > a:hover {
	background: var(--hover);
}

.stat-grid > a:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: -2px;
}

.stat-grid > a > span {
	text-decoration: underline;
	text-decoration-color: var(--border-strong);
	text-underline-offset: 3px;
}

.stat-grid > a strong {
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-tight);
	letter-spacing: -0.02em;
	color: var(--foreground);
}

.spark {
	align-self: end;
	inline-size: 88px;
	block-size: 32px;
}

.spark svg {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	overflow: visible;
}

[dir="rtl"] .spark svg {
	transform: scaleX(-1);
}

.spark-area {
	fill: var(--chart-tint);
	stroke: none;
}

.spark-line {
	fill: none;
	stroke: var(--chart-1);
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

.spark-dot {
	fill: none;
	stroke: var(--chart-1);
	stroke-width: 6;
	stroke-linecap: round;
	vector-effect: non-scaling-stroke;
}

.stat[data-inverse] .delta-up {
	color: var(--destructive-text);
}

.stat[data-inverse] .delta-down {
	color: var(--success);
}

.stat-label {
	color: var(--muted-foreground);
	font-size: var(--text-sm);
	margin-block-end: var(--space-1);
}

.chart-note {
	color: var(--muted-foreground);
	font-size: var(--text-xs);
	margin-inline-start: auto;
}

.chart-figure {
	align-items: flex-end;
}

.chart-figure .legend {
	gap: var(--space-4);
	color: var(--muted-foreground);
}

.chart-figure .legend span::before {
	width: 8px;
	height: 8px;
	border-radius: var(--radius-sm);
}

.bars,
[dir="rtl"] .bars {
	--bars-label: 44px;
	display: block;
	position: relative;
	height: var(--bars-h, 220px);
	padding-block-start: var(--bars-top, 8px);
	direction: inherit;
	transform: none;
}

.bars.dash-bars {
	--bars-h: var(--dash-bars-h);
}

.chart-card .bars {
	--bars-top: 24px;
}

.bars.bars-xlabels {
	padding-block-end: 24px;
}

.bars.bars-xlabels .bars-grid {
	inset-block-end: 24px;
}

.bars-xaxis {
	position: absolute;
	inset-block-end: 0;
	inset-inline: 0;
	display: grid;
	grid-template-columns: repeat(var(--cols, 24), minmax(0, 1fr));
	gap: var(--gap, 6px);
	margin-inline-start: var(--bars-label);
}

.bars-xaxis span {
	overflow: hidden;
	color: var(--chart-axis);
	font-size: var(--text-xs);
	line-height: 16px;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bars:not(.bars-labelled) {
	--bars-label: 0px;
}

.bars-grid {
	position: absolute;
	inset-block: var(--bars-top, 8px) 0;
	inset-inline: 0;
	pointer-events: none;
}

.bars-tick {
	position: absolute;
	inset-inline: var(--bars-label) 0;
	inset-block-end: var(--p);
	border-block-start: 1px solid var(--chart-grid);
}

.bars-base {
	border-block-start-color: var(--border-strong, var(--chart-grid));
}

.bars-tick em {
	position: absolute;
	inset-block-start: -8px;
	inset-inline-start: calc(var(--bars-label) * -1);
	inline-size: calc(var(--bars-label) - 8px);
	color: var(--chart-axis);
	font-size: var(--text-xs);
	font-style: normal;
	line-height: 14px;
	text-align: start;
}

.bars-plot {
	position: relative;
	display: grid;
	grid-template-columns: repeat(var(--cols, 24), minmax(0, 1fr));
	gap: var(--gap, 6px);
	block-size: 100%;
	margin-inline-start: var(--bars-label);
}

.bars-plot > i.col {
	position: relative;
	display: flex;
	align-items: stretch;
	justify-content: center;
	min-inline-size: 0;
	block-size: 100%;
	border-radius: var(--radius-sm);
	outline: none;
	cursor: default;
}

.bars-plot > i.col:hover,
.bars-plot > i.col.is-active {
	background: var(--hover);
}

.bars-plot > i.col:focus-visible {
	box-shadow: 0 0 0 2px var(--ring);
}

.bars-plot .stack {
	display: flex;
	flex-direction: column-reverse;
	gap: 2px;
	inline-size: min(100%, 26px);
	block-size: 100%;
}

.bars-plot .stack > b {
	display: block;
	flex: none;
	inline-size: 100%;
	border-radius: 0;
	background: var(--swatch);
}

.bars-plot .stack > b:last-child {
	border-start-start-radius: 4px;
	border-start-end-radius: 4px;
}

.bars-plot .stack > b.projected {
	background: var(--chart-projected);
	box-shadow: none;
}

.bars-plot .marker {
	position: absolute;
	inset-block: calc(var(--bars-top, 8px) * -1) 0;
	inset-inline-start: calc(var(--frac) * 100% + var(--gap) * (var(--frac) - 0.5));
	inline-size: 0;
	border-inline-start: 1px dashed var(--chart-axis);
	pointer-events: none;
}

.bars-plot .marker::before {
	content: none;
}

.bars-plot .marker em {
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 6px;
	color: var(--muted-foreground);
	font-size: var(--text-xs);
	font-style: normal;
	line-height: 16px;
	white-space: nowrap;
}

.chart-tip {
	position: absolute;
	z-index: 2;
	display: grid;
	gap: var(--space-1);
	min-inline-size: 168px;
	padding: var(--space-2) var(--space-3);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--popover);
	box-shadow: var(--shadow-md);
	color: var(--popover-foreground);
	font-size: var(--text-xs);
	pointer-events: none;
}

.chart-tip[hidden] {
	display: none;
}

.chart-tip-head {
	font-weight: var(--weight-semibold);
}

.chart-tip-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	color: var(--muted-foreground);
}

.chart-tip-row[style*="--swatch"] > span:first-child::before {
	content: "";
	display: inline-block;
	inline-size: 8px;
	block-size: 8px;
	margin-inline-end: 6px;
	border-radius: var(--radius-sm);
	background: var(--swatch);
}

.chart-tip-row .num {
	color: var(--popover-foreground);
	font-weight: var(--weight-medium);
}

.chart-tip-total {
	padding-block-start: var(--space-1);
	border-block-start: 1px solid var(--border);
}
