:root {
	/* Theme Tokens */
	--UI-Theme-Color: #6b4ae2;
	--UI-Theme-Focus-Ring: 0 0 0 2px rgba(118, 121, 228, 0.28);

	/* Radius Scale */
	--UI-Radius-XS: 4px;
	--UI-Radius-SM: 6px;
	--UI-Radius-MD: 8px;
	--UI-Radius-LG: 10px;
	--UI-Radius-XL: 12px;
	--UI-Radius-Full: 999px;

	/* Border Colors */
	--UI-Border-Color: #d3d3d3;
	--UI-Border-Color-Light: #e2e2e2;

	/* Background Colors */
	--UI-BG-White: #ffffff;
	--UI-BG-Light: #fbfbfb;
	--UI-BG-Light-2: #f6f6f6;
	--UI-BG-Medium: #f3f3f3;
	--UI-BG-Medium-Light: #f1efef;
	--UI-BG-Dark: #2c2c2c;
	--UI-BG-Muted: #e5e2e2;

	/* Cards & Sections */
	--UI-Section-Light-Background: var(--UI-BG-Medium);
	--UI-Section-Dark-Background: #f1efef;
	--UI-Card-Light: var(--UI-BG-Light);
	--UI-Card-Soft: var(--UI-BG-Medium-Light);
	--UI-Card-Medium: var(--UI-BG-Muted);
	--UI-Card-Dark: var(--UI-BG-Dark);
	--UI-Card-Border-Color: var(--UI-Border-Color);
	--UI-Card-Border-Width: 0.5px;
	--UI-Card-Radius: var(--UI-Radius-XL);

	/* Buttons */
	--UI-Button-Theme: var(--UI-Theme-Color);
	--UI-Button-Theme-Hover: #6442e2;
	--UI-Button-Dark: var(--UI-BG-Dark);
	--UI-Button-Dark-Hover: #3a3a3c;
	--UI-Button-Light: var(--UI-BG-Light);
	--UI-Button-Light-Hover: #f5f5f5;
	--UI-Button-Light-Border: var(--UI-Border-Color-Light);
	--UI-Button-Theme-Text: #f1efef;
	--UI-Button-Dark-Text: #f1efef;
	--UI-Button-Light-Text: #2c2c2c;
	--UI-Button-Destructive: #e5534b;
	--UI-Button-Destructive-Hover: #d0312d;
	--UI-Button-Destructive-Text: #ffffff;
	--UI-Button-Small-Height: 26px;
	--UI-Button-Default-Height: 32px;
	--UI-Button-Large-Height: 40px;
	--UI-Button-Padding-X: 14px;
	--UI-Button-Gap: 8px;
	--UI-Button-Border: 1px solid var(--UI-Border-Color);
	--UI-Button-Shadow: 0 1px 3px -1px rgba(18, 18, 20, 0.12);
	--UI-Button-Focus-Ring: var(--UI-Theme-Focus-Ring);
	--UI-Button-Count-Size: 18px;
	--UI-Button-Count-BG: var(--UI-Button-Theme);
	--UI-Button-Count-Text: #fff;

	/* Inputs */
	--UI-Input-Height: 32px;
	--UI-Input-Height-Small: 26px;
	--UI-Input-Height-Large: 40px;
	--UI-Input-Padding-X: 10px;
	--UI-Input-Padding-Y: 6px;
	--UI-Input-Border: var(--UI-Border-Color-Light);
	--UI-Input-BG: var(--UI-BG-White);
	--UI-Input-Text: #1f2937;
	--UI-Input-Placeholder: #94a3b8;
	--UI-Input-Focus-Border: var(--UI-Theme-Color);
	--UI-Input-Focus-Ring: 0 0 0 3px rgba(118, 121, 228, 0.15);
	--UI-Input-Disabled-BG: var(--UI-BG-Medium);
	--UI-Input-Disabled-Text: #94a3b8;
	--UI-Input-Readonly-BG: var(--UI-BG-Light);
	--UI-Input-Error-Border: #ef4444;
	--UI-Input-Error-Ring: 0 0 0 3px rgba(239, 68, 68, 0.15);
	--UI-Textarea-Min-Height: 96px;
	--UI-Textarea-Padding-Y: 10px;
	--UI-Textarea-Padding-X: 12px;

	/* Tags & Chips */
	--UI-Tag-Radius: var(--UI-Radius-SM);
	--UI-Chip-Radius: var(--UI-Radius-Full);
	--UI-Chip-BG: #ececec;
	--UI-Chip-Text: #6a6a6a;
	--UI-Chip-Active-BG: var(--UI-BG-Light);
	--UI-Chip-Active-Text: #3b3b3b;
	--UI-Chip-Active-Border: #8b8ff4;

	/* Badges */
	--UI-Badge-Alert: #ff8e7d;
	--UI-Badge-Warning: #ffdc6b;
	--UI-Badge-Success: #add5b3;
	--UI-Badge-Secondary: #565656;
	--UI-Badge-Outline-BG: var(--UI-BG-Light);
	--UI-Badge-Outline-Border: var(--UI-Border-Color);
	--UI-Badge-Outline-Active-Border: #7679e4;
	--UI-Badge-Active-Text: #2c2c2c;
	--UI-Badge-Default-Text: #565656;

	/* Tooltip */
	--UI-Tooltip-BG: #2c2c2c;
	--UI-Tooltip-Text: #f7f7f7;
	--UI-Tooltip-Radius: var(--UI-Radius-SM);
	--UI-Tooltip-Padding-Y: 8px;
	--UI-Tooltip-Padding-X: 10px;
	--UI-Tooltip-Max-Width: 280px;
	--UI-Tooltip-Shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.35);
	--UI-Tooltip-Arrow-Size: 6px;

	/* Typography Colors */
	--UI-Text-Light-Primary: #fbfbfb;
	--UI-Text-Light-Secondary: #dfdfdf;
	--UI-Text-Dark-Primary: #424242;
	--UI-Text-Dark-Secondary: #6c6c6c;
	--UI-Text-Dark-Tertiary: #989898;

	/* Typography Sizes */
	--UI-Font-Size-Xtra-Large: 33px;
	--UI-Font-Size-Large: 26px;
	--UI-Font-Size-Medium: 20px;
	--UI-Font-Size-Small: 16px;
	--UI-Font-Size-Xtra-Small: 13px;
}

/* ========================================
   UI Buttons
   ======================================== */

.UI-Button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--UI-Button-Gap);
	margin: 0;
	width: auto;
	height: var(--UI-Button-Default-Height);
	padding: 0 var(--UI-Button-Padding-X);
	border: var(--UI-Button-Border);
	border-radius: var(--UI-Radius-MD);
	background-color: var(--UI-Button-Light);
	font-size: 12px;
	line-height: 1;
	font-weight: 400;
	letter-spacing: -0.01em;
	color: var(--UI-Button-Light-Text);
	box-shadow: none;
	transition:
		background-color 140ms ease,
		border-color 140ms ease,
		color 140ms ease,
		box-shadow 140ms ease,
		transform 80ms ease;
	user-select: none;
	cursor: pointer;
}

.UI-Button:hover {
	background-color: var(--UI-Button-Light-Hover);
}
.UI-Button:focus-visible {
	outline: none;
	box-shadow: var(--UI-Button-Focus-Ring);
}
.UI-Button:active {
	transform: translateY(1px);
}

.UI-Button[disabled] {
	background-color: #e5e7eb !important;
	box-shadow: none !important;
	color: #9ca3af !important;
	border-color: var(--UI-Input-Border);
	color: var(--UI-Input-Disabled-Text);
	cursor: not-allowed;
	pointer-events: none;
	box-shadow: none;
}

/* Button Sizes */
.UI-Button[size="small"] {
	height: var(--UI-Button-Small-Height);
	padding: 0 10px;
	font-size: 12px;
}
.UI-Button[size="large"] {
	height: var(--UI-Button-Large-Height);
	padding: 0 18px;
	font-size: 14px;
}
.UI-Button-Block {
	display: flex;
	width: 100%;
}

/* Button Themes */
.UI-Button[theme="theme"] {
	border-color: transparent;
	background-color: var(--UI-Button-Theme);
	color: var(--UI-Button-Theme-Text);
	box-shadow: var(--UI-Button-Shadow);
}
.UI-Button[theme="theme"]:hover {
	background-color: var(--UI-Button-Theme-Hover);
}
.UI-Button[theme="dark"] {
	border-color: transparent;
	background-color: var(--UI-Button-Dark);
	color: var(--UI-Button-Dark-Text);
}
.UI-Button[theme="dark"]:hover {
	background-color: var(--UI-Button-Dark-Hover);
}
.UI-Button[theme="light"] {
	border-color: var(--UI-Button-Light-Border);
}
.UI-Button[theme="ghost"] {
	border-color: transparent;
	background-color: transparent;
	color: var(--UI-Text-Dark-Primary);
}
.UI-Button[theme="ghost"]:hover {
	background-color: var(--UI-BG-Muted);
}
.UI-Button[theme="destructive"] {
	border-color: transparent;
	background-color: var(--UI-Button-Destructive);
	color: var(--UI-Button-Destructive-Text);
	box-shadow: var(--UI-Button-Shadow);
}
.UI-Button[theme="destructive"]:hover {
	background-color: var(--UI-Button-Destructive-Hover);
}

/* Button with Icon */
.UI-Button[icon] {
	padding: 0 12px;
}
/* Icon Only Square Shape */
.UI-Button[icon]:not(:has(span:not(.UI-Button-Icon))) {
	width: var(--UI-Button-Default-Height);
	padding: 0;
}

.UI-Button[size="small"][icon] {
	padding: 0 8px;
}
.UI-Button[size="small"][icon]:not(:has(span:not(.UI-Button-Icon))) {
	width: var(--UI-Button-Small-Height);
	padding: 0;
}

.UI-Button[size="large"][icon] {
	padding: 0 16px;
}
.UI-Button[size="large"][icon]:not(:has(span:not(.UI-Button-Icon))) {
	width: var(--UI-Button-Large-Height);
	padding: 0;
}

.UI-Button[size="large"][icon] .UI-Button-Icon {
	height: 20px;
	width: 20px;
}

.UI-Button-Icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	font-size: 15px;
	line-height: 1;
	font-weight: 500;
}

.UI-Button-Icon > img {
	height: 100%;
	width: 100%;
}

/* Loading state: replace icon with CSS spinner when loading="true" */
.UI-Button[loading="true"] {
	pointer-events: none;
}
.UI-Button[loading="true"] .UI-Button-Icon,
.UI-Button[loading="true"] .UI-Button-Icon > img {
	display: none;
}
.UI-Button[loading="true"]::after {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	vertical-align: middle;
	border: 2px solid rgba(0, 0, 0, 0.08);
	border-top-color: currentColor;
	border-radius: 50%;
	animation: ui-spinner 0.8s linear infinite;
}

@keyframes ui-spinner {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.UI-Button-Count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--UI-Button-Count-Size);
	height: var(--UI-Button-Count-Size);
	padding: 0;
	border-radius: var(--UI-Radius-Full);
	border: 1px solid var(--UI-Button-Count-BG);
	color: var(--UI-Button-Count-BG);
	font-size: 11px;
	line-height: 1;
	font-weight: 500;
}

/* ========================================
   UI Inputs
   ======================================== */

.UI-Input,
.UI-Native-Select,
.UI-Textarea {
	margin: 0;
	border: 1px solid var(--UI-Input-Border);
	border-radius: var(--UI-Radius-MD);
	background-color: var(--UI-Input-BG);
	color: var(--UI-Input-Text);
	font-size: var(--UI-Font-Size-Xtra-Small);
	line-height: 20px;
	font-weight: 400;
	box-sizing: border-box;
	outline: none;
	transition:
		border-color 140ms ease,
		background-color 140ms ease,
		color 140ms ease,
		box-shadow 140ms ease;
}

.UI-Input {
	height: var(--UI-Input-Height);
	padding: var(--UI-Input-Padding-Y) var(--UI-Input-Padding-X);
	width: 100%;
}

.UI-Native-Select {
	height: var(--UI-Input-Height);
	padding: var(--UI-Input-Padding-Y) 32px var(--UI-Input-Padding-Y) var(--UI-Input-Padding-X);
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 5.5L8 10.5L12.5 5.5' stroke='%23989898' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-position: calc(100% - 9px) 50%;
	background-size: 12px 12px;
	background-repeat: no-repeat;
	cursor: pointer;
	width: 100%;
}

.UI-Textarea {
	min-height: var(--UI-Textarea-Min-Height);
	padding: var(--UI-Textarea-Padding-Y) var(--UI-Textarea-Padding-X);
	resize: vertical;
	width: 100%;
}

.UI-Input[size="small"] {
	height: var(--UI-Input-Height-Small);
	font-size: var(--UI-Font-Size-Xtra-Small);
}

.UI-Native-Select[size="small"] {
	height: var(--UI-Input-Height-Small);
	font-size: var(--UI-Font-Size-Xtra-Small);
	line-height: normal;
	padding-top: 0;
	padding-bottom: 0;
}

.UI-Input[size="large"] {
	height: var(--UI-Input-Height-Large);
	font-size: var(--UI-Font-Size-Xtra-Small);
}

.UI-Native-Select[size="large"] {
	height: var(--UI-Input-Height-Large);
	font-size: var(--UI-Font-Size-Xtra-Small);
}

.UI-Native-Select option {
	font-size: var(--UI-Font-Size-Xtra-Small);
}

.UI-Textarea[size="small"] {
	min-height: 72px;
	font-size: var(--UI-Font-Size-Xtra-Small);
}

.UI-Textarea[size="large"] {
	min-height: 132px;
	font-size: var(--UI-Font-Size-Xtra-Small);
}

.UI-Input::placeholder,
.UI-Textarea::placeholder {
	color: var(--UI-Input-Placeholder);
	font-size: var(--UI-Font-Size-Xtra-Small);
}

.UI-Input:is(:focus, :focus-visible),
.UI-Native-Select:is(:focus, :focus-visible),
.UI-Textarea:is(:focus, :focus-visible) {
	border-color: var(--UI-Input-Focus-Border);
	box-shadow: var(--UI-Input-Focus-Ring);
}

.UI-Input:is(:disabled, [disabled]),
.UI-Native-Select:is(:disabled, [disabled]),
.UI-Textarea:is(:disabled, [disabled]) {
	background-color: var(--UI-Input-Disabled-BG);
	border-color: var(--UI-Input-Border);
	color: var(--UI-Input-Disabled-Text);
	cursor: not-allowed;
	opacity: 1;
}

.UI-Input:is(:disabled, [disabled])::placeholder,
.UI-Textarea:is(:disabled, [disabled])::placeholder {
	color: var(--UI-Input-Disabled-Text);
}

.UI-Input[readonly],
.UI-Textarea[readonly] {
	background-color: var(--UI-Input-Readonly-BG);
	box-shadow: none;
	cursor: default;
}

.UI-Native-Select[readonly] {
	background-color: var(--UI-Input-Readonly-BG);
	box-shadow: none;
	cursor: default;
}

.UI-Input:is([state="error"], [aria-invalid="true"]),
.UI-Native-Select:is([state="error"], [aria-invalid="true"]),
.UI-Textarea:is([state="error"], [aria-invalid="true"]) {
	border-color: var(--UI-Input-Error-Border);
}

.UI-Input:is([state="error"], [aria-invalid="true"]):is(:focus, :focus-visible),
.UI-Native-Select:is([state="error"], [aria-invalid="true"]):is(:focus, :focus-visible),
.UI-Textarea:is([state="error"], [aria-invalid="true"]):is(:focus, :focus-visible) {
	box-shadow: var(--UI-Input-Error-Ring);
}

input.UI-Input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

input.UI-Input[type="date"] {
	cursor: text;
}

input.UI-Input[type="date"]::-webkit-calendar-picker-indicator {
	cursor: pointer;
	filter: opacity(0.6);
	transition: filter 140ms ease;
}

input.UI-Input[type="date"]:hover::-webkit-calendar-picker-indicator {
	filter: opacity(1);
}

.UI-Form-Stack {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.UI-Form-Grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.UI-Input-Label {
	display: block;
	margin: 0 0 6px 0;
	font-size: 12px;
	line-height: 1;
	font-weight: 600;
	color: var(--UI-Text-Dark-Secondary);
}

.UI-Form-Grid .UI-Input,
.UI-Form-Grid .UI-Native-Select,
.UI-Form-Grid .UI-Textarea,
.UI-Form-Stack .UI-Input,
.UI-Form-Stack .UI-Native-Select,
.UI-Form-Stack .UI-Textarea {
	width: 100%;
}

/* ========================================
	UI Selects (Custom)
   ======================================== */

.UI-Select {
	position: relative;
	width: 100%;
}

.UI-Select-Trigger {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	height: var(--UI-Input-Height);
	padding: var(--UI-Input-Padding-Y) var(--UI-Input-Padding-X);
	margin: 0;
	border: 1px solid var(--UI-Input-Border);
	border-radius: var(--UI-Radius-MD);
	background-color: var(--UI-Input-BG);
	color: var(--UI-Input-Text);
	font-size: var(--UI-Font-Size-Xtra-Small);
	line-height: 1;
	font-weight: 400;
	text-align: left;
	box-sizing: border-box;
	outline: none;
	cursor: pointer;
	transition:
		border-color 140ms ease,
		box-shadow 140ms ease,
		background-color 140ms ease;
}

.UI-Select-Trigger:focus-visible {
	border-color: var(--UI-Input-Focus-Border);
	box-shadow: var(--UI-Input-Focus-Ring);
}

.UI-Select[data-open="true"] .UI-Select-Trigger {
	border-color: var(--UI-Input-Focus-Border);
	box-shadow: var(--UI-Input-Focus-Ring);
}

.UI-Select-Trigger-Label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.UI-Select:not([data-has-selection]) .UI-Select-Trigger-Label {
	color: var(--UI-Input-Placeholder);
}

.UI-Select-Trigger-Icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 12px;
	height: 12px;
	flex-shrink: 0;
	color: var(--UI-Text-Dark-Tertiary);
	transition: transform 140ms ease;
}

.UI-Select-Trigger-Icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.UI-Select[data-open="true"] .UI-Select-Trigger-Icon {
	transform: rotate(180deg);
}

.UI-Select-Menu {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 60;
	display: none;
	flex-direction: column;
	gap: 2px;
	max-height: 240px;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 4px;
	border: 1px solid var(--UI-Border-Color-Light);
	border-radius: var(--UI-Radius-MD);
	background-color: var(--UI-BG-White);
	box-shadow:
		0 4px 16px rgba(0, 0, 0, 0.08),
		0 1px 4px rgba(0, 0, 0, 0.04);
	box-sizing: border-box;
}

.UI-Select[data-open="true"] .UI-Select-Menu {
	display: flex;
}

.UI-Select-Item {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	min-height: 32px;
	padding: 6px 8px;
	margin: 0;
	border: none;
	border-radius: var(--UI-Radius-SM);
	background: transparent;
	color: var(--UI-Text-Dark-Primary);
	font-family: inherit;
	font-size: var(--UI-Font-Size-Xtra-Small);
	line-height: 1.3;
	font-weight: 400;
	text-align: left;
	appearance: none;
	-webkit-appearance: none;
	outline: none;
	cursor: pointer;
	transition:
		background-color 120ms ease,
		color 120ms ease;
}

.UI-Select-Item:hover,
.UI-Select-Item[state="active"],
.UI-Select-Item.active {
	background-color: var(--UI-BG-Medium);
	color: var(--UI-Text-Dark-Primary);
}

.UI-Select-Item[aria-selected="true"],
.UI-Select-Item[state="selected"],
.UI-Select-Item.selected {
	background-color: var(--UI-BG-Medium-Light);
	color: var(--UI-Text-Dark-Primary);
	font-weight: 500;
}

.UI-Select-Item:focus-visible {
	outline: none;
	background-color: var(--UI-BG-Medium);
}

.UI-Select-Item:is(:disabled, [disabled], [aria-disabled="true"]) {
	color: var(--UI-Input-Disabled-Text);
	background: transparent;
	cursor: not-allowed;
}

.UI-Select[size="small"] .UI-Select-Trigger {
	height: var(--UI-Input-Height-Small);
	font-size: 12px;
}

.UI-Select[size="large"] .UI-Select-Trigger {
	height: var(--UI-Input-Height-Large);
	font-size: 14px;
}

.UI-Select[state="error"] .UI-Select-Trigger,
.UI-Select[aria-invalid="true"] .UI-Select-Trigger {
	border-color: var(--UI-Input-Error-Border);
}

.UI-Select[state="error"] .UI-Select-Trigger:focus-visible,
.UI-Select[aria-invalid="true"] .UI-Select-Trigger:focus-visible,
.UI-Select[state="error"][data-open="true"] .UI-Select-Trigger,
.UI-Select[aria-invalid="true"][data-open="true"] .UI-Select-Trigger {
	box-shadow: var(--UI-Input-Error-Ring);
}

.UI-Select:is([disabled], [disabled="disabled"]) .UI-Select-Trigger,
.UI-Select .UI-Select-Trigger:is(:disabled, [disabled]) {
	background-color: var(--UI-Input-Disabled-BG);
	border-color: var(--UI-Input-Border);
	color: var(--UI-Input-Disabled-Text);
	cursor: not-allowed;
}

.UI-Select:is([disabled], [disabled="disabled"]) .UI-Select-Trigger-Icon,
.UI-Select .UI-Select-Trigger:is(:disabled, [disabled]) .UI-Select-Trigger-Icon {
	color: var(--UI-Input-Disabled-Text);
}

.UI-Select[data-select-mode="multiple"][data-select-display="chips"][data-has-selection="true"] .UI-Select-Trigger {
	height: auto;
	min-height: var(--UI-Input-Height);
	padding-top: 4px;
	padding-bottom: 4px;
	align-items: center;
}

.UI-Select[data-select-mode="multiple"][data-select-display="chips"][data-has-selection="true"][size="small"] .UI-Select-Trigger {
	min-height: var(--UI-Input-Height-Small);
}

.UI-Select[data-select-mode="multiple"][data-select-display="chips"][data-has-selection="true"][size="large"] .UI-Select-Trigger {
	min-height: var(--UI-Input-Height-Large);
}

.UI-Select[data-select-mode="multiple"][data-select-display="chips"][data-has-selection="true"] .UI-Select-Trigger-Label {
	display: block;
	min-height: 20px;
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
}

.UI-Select-Trigger-Chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
	max-width: 100%;
	padding-top: 1px;
	padding-bottom: 1px;
}

.UI-Select-Trigger-Chip {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	height: 20px;
	padding: 0 8px;
	border: 1px solid var(--UI-Border-Color-Light);
	border-radius: var(--UI-Radius-SM);
	background-color: var(--UI-BG-Medium);
	color: var(--UI-Text-Dark-Primary);
	font-size: 11px;
	line-height: 1;
	font-weight: 500;
	box-sizing: border-box;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.UI-Select-Trigger-Chip[state="overflow"] {
	background-color: var(--UI-BG-Medium-Light);
	color: var(--UI-Text-Dark-Tertiary);
}

.UI-Select[data-select-mode="multiple"][data-select-display="chips"][data-has-selection="true"] .UI-Select-Trigger-Icon {
	align-self: center;
}

/* ========================================
	UI Autocomplete
   ======================================== */

.UI-Autocomplete {
	position: relative;
	width: 100%;
}

.UI-Autocomplete[data-open="true"] {
	z-index: 70;
}

.UI-Autocomplete-Input {
	width: 100%;
}

.UI-Autocomplete[size="small"] .UI-Autocomplete-Input {
	height: var(--UI-Input-Height-Small);
}

.UI-Autocomplete[size="large"] .UI-Autocomplete-Input {
	height: var(--UI-Input-Height-Large);
}

.UI-Autocomplete[state="error"] .UI-Autocomplete-Input,
.UI-Autocomplete[aria-invalid="true"] .UI-Autocomplete-Input {
	border-color: var(--UI-Input-Error-Border);
}

.UI-Autocomplete[state="error"] .UI-Autocomplete-Input:is(:focus, :focus-visible),
.UI-Autocomplete[aria-invalid="true"] .UI-Autocomplete-Input:is(:focus, :focus-visible) {
	box-shadow: var(--UI-Input-Error-Ring);
}

.UI-Autocomplete:is([disabled], [disabled="disabled"]) .UI-Autocomplete-Input,
.UI-Autocomplete .UI-Autocomplete-Input:is(:disabled, [disabled]) {
	background-color: var(--UI-Input-Disabled-BG);
	border-color: var(--UI-Input-Border);
	color: var(--UI-Input-Disabled-Text);
	cursor: not-allowed;
}

.UI-Autocomplete-Menu {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 4000;
	display: none;
	flex-direction: column;
	gap: 2px;
	max-height: 150px;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 4px;
	border: 1px solid var(--UI-Border-Color-Light);
	border-radius: var(--UI-Radius-MD);
	background-color: var(--UI-BG-White);
	box-shadow:
		0 4px 16px rgba(0, 0, 0, 0.08),
		0 1px 4px rgba(0, 0, 0, 0.04);
	box-sizing: border-box;
}

.UI-Autocomplete[data-open="true"] .UI-Autocomplete-Menu {
	display: flex;
}

.UI-Autocomplete-Menu[data-open="true"] {
	display: flex;
}

.UI-Autocomplete-Item {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	min-height: 32px;
	padding: 6px 8px;
	margin: 0;
	border: none;
	border-radius: var(--UI-Radius-SM);
	background: transparent;
	color: var(--UI-Text-Dark-Primary);
	font-family: inherit;
	font-size: var(--UI-Font-Size-Xtra-Small);
	line-height: 1.3;
	font-weight: 400;
	text-align: left;
	appearance: none;
	-webkit-appearance: none;
	outline: none;
	cursor: pointer;
	transition:
		background-color 120ms ease,
		color 120ms ease;
}

.UI-Autocomplete-Item:hover,
.UI-Autocomplete-Item[state="active"],
.UI-Autocomplete-Item.active {
	background-color: var(--UI-BG-Medium);
	color: var(--UI-Text-Dark-Primary);
}

.UI-Autocomplete-Item[aria-selected="true"]:not(:hover):not([state="active"]):not(.active),
.UI-Autocomplete-Item[state="selected"]:not(:hover):not([state="active"]):not(.active),
.UI-Autocomplete-Item.selected:not(:hover):not([state="active"]):not(.active) {
	background-color: transparent;
	color: var(--UI-Text-Dark-Primary);
	font-weight: 400;
}

.UI-Autocomplete-Item:focus-visible {
	outline: none;
	background-color: transparent;
}

.UI-Autocomplete-Item:is(:disabled, [disabled], [aria-disabled="true"]) {
	color: var(--UI-Input-Disabled-Text);
	background: transparent;
	cursor: not-allowed;
}

.UI-Autocomplete-Item[hidden],
.UI-Autocomplete-Item:is([hidden="hidden"]) {
	display: none;
}

.UI-Autocomplete-Menu[data-has-results="false"]::after {
	content: "No results";
	display: block;
	padding: 8px;
	color: var(--UI-Text-Dark-Tertiary);
	font-size: var(--UI-Font-Size-Xtra-Small);
	line-height: 1.3;
}

@media (max-width: 700px) {
	.UI-Form-Grid {
		grid-template-columns: 1fr;
	}
}

/* ========================================
   UI Checkboxes
   ======================================== */

.UI-Checkbox {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
	font-size: var(--UI-Font-Size-Xtra-Small);
	line-height: 1;
	color: var(--UI-Text-Dark-Primary);
}

.UI-Checklist-Item {
	position: relative;
	width: 100%;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.UI-Checklist-Item .UI-Checklist-Label::before {
	content: "";
	position: absolute;
	height: 1px;
	background: var(--UI-Text-Dark-Secondary);
	top: 50%;
	left: 0;
	width: 0;
	transition: width 0.2s ease;
}

.UI-Checklist-Label {
	position: relative;
	line-height: 1.2;
	width: fit-content;
	max-width: 100%;
	margin: 0;
}

.UI-Checklist-Item:has(input:checked) .UI-Checklist-Label::before {
	width: 100%;
}

.UI-Checklist-Item:has(input:checked) .UI-Checklist-Label {
	color: var(--UI-Text-Dark-Tertiary) !important;
}

.UI-Checkbox input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1px solid var(--UI-Input-Border);
	border-radius: var(--UI-Radius-XS);
	background-color: var(--UI-Input-BG);
	cursor: pointer;
	transition:
		background-color 140ms ease,
		border-color 140ms ease,
		box-shadow 140ms ease;
}

.UI-Checkbox input[type="checkbox"]:checked {
	background-color: var(--UI-Theme-Color);
	border-color: var(--UI-Theme-Color);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' fill='none'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-position: center;
	background-size: 10px 8px;
	background-repeat: no-repeat;
}

.UI-Checkbox input[type="checkbox"]:focus-visible {
	outline: none;
	box-shadow: var(--UI-Input-Focus-Ring);
}

.UI-Checkbox input[type="checkbox"]:checked:focus-visible {
	box-shadow: var(--UI-Theme-Focus-Ring);
}

.UI-Checkbox input[type="checkbox"]:disabled {
	background-color: var(--UI-Input-Disabled-BG);
	border-color: var(--UI-Input-Border);
	cursor: not-allowed;
}

.UI-Checkbox:has(input:disabled) {
	cursor: not-allowed;
	color: var(--UI-Input-Disabled-Text);
}

.UI-Checkbox input[type="checkbox"]:disabled:checked {
	background-color: var(--UI-Theme-Color);
	border-color: var(--UI-Theme-Color);
	opacity: 0.4;
}

.UI-Checkbox input[type="checkbox"]:is([state="error"], [aria-invalid="true"]) {
	border-color: var(--UI-Input-Error-Border);
}

.UI-Checkbox input[type="checkbox"]:is([state="error"], [aria-invalid="true"]):focus-visible {
	box-shadow: var(--UI-Input-Error-Ring);
}

/* Checkbox Sizes */
.UI-Checkbox[size="small"] {
	font-size: 12px;
	gap: 6px;
}

.UI-Checkbox[size="small"] input[type="checkbox"] {
	width: 15px;
	height: 15px;
	background-size: 8px 6px;
}

.UI-Checkbox[size="large"] {
	font-size: 14px;
	gap: 10px;
}

.UI-Checkbox[size="large"] input[type="checkbox"] {
	width: 20px;
	height: 20px;
	background-size: 12px 10px;
}

/* Checkbox Group */
.UI-Checkbox-Group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* ========================================
   UI Radios
   ======================================== */

.UI-Radio {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
	font-size: var(--UI-Font-Size-Xtra-Small);
	line-height: 1;
	color: var(--UI-Text-Dark-Primary);
}

.UI-Radio input[type="radio"] {
	appearance: none;
	-webkit-appearance: none;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1px solid var(--UI-Input-Border);
	border-radius: var(--UI-Radius-Full);
	background-color: var(--UI-Input-BG);
	cursor: pointer;
	transition:
		background-color 140ms ease,
		border-color 140ms ease,
		box-shadow 140ms ease;
}

.UI-Radio input[type="radio"]:checked {
	background-color: var(--UI-Theme-Color);
	border-color: var(--UI-Theme-Color);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='3.5' fill='white'/%3E%3C/svg%3E");
	background-position: center;
	background-repeat: no-repeat;
}

.UI-Radio input[type="radio"]:focus-visible {
	outline: none;
	box-shadow: var(--UI-Input-Focus-Ring);
}

.UI-Radio input[type="radio"]:checked:focus-visible {
	box-shadow: var(--UI-Theme-Focus-Ring);
}

.UI-Radio input[type="radio"]:disabled {
	background-color: var(--UI-Input-Disabled-BG);
	border-color: var(--UI-Input-Border);
	cursor: not-allowed;
}

.UI-Radio:has(input:disabled) {
	cursor: not-allowed;
	color: var(--UI-Input-Disabled-Text);
}

.UI-Radio input[type="radio"]:disabled:checked {
	background-color: var(--UI-Theme-Color);
	border-color: var(--UI-Theme-Color);
	opacity: 0.4;
}

.UI-Radio input[type="radio"]:is([state="error"], [aria-invalid="true"]) {
	border-color: var(--UI-Input-Error-Border);
}

.UI-Radio input[type="radio"]:is([state="error"], [aria-invalid="true"]):focus-visible {
	box-shadow: var(--UI-Input-Error-Ring);
}

/* Radio Sizes */
.UI-Radio[size="small"] {
	font-size: 12px;
	gap: 6px;
}

.UI-Radio[size="small"] input[type="radio"] {
	width: 15px;
	height: 15px;
}

.UI-Radio[size="large"] {
	font-size: 14px;
	gap: 10px;
}

.UI-Radio[size="large"] input[type="radio"] {
	width: 20px;
	height: 20px;
}

/* Radio Group */
.UI-Radio-Group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* ========================================
   UI Toggles
   ======================================== */

.UI-Toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
	font-size: var(--UI-Font-Size-Xtra-Small);
	line-height: 1;
	color: var(--UI-Text-Dark-Primary);
}

.UI-Toggle input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	flex-shrink: 0;
	width: 34px;
	height: 20px;
	margin: 0;
	border: 1px solid var(--UI-Input-Border);
	border-radius: var(--UI-Radius-Full);
	background-color: var(--UI-BG-Muted);
	cursor: pointer;
	transition:
		background-color 160ms ease,
		border-color 160ms ease,
		box-shadow 160ms ease;
}

.UI-Toggle input[type="checkbox"]::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 14px;
	height: 14px;
	border-radius: var(--UI-Radius-Full);
	background-color: var(--UI-BG-White);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
	transition: transform 160ms ease;
}

.UI-Toggle input[type="checkbox"]:checked {
	background-color: var(--UI-Theme-Color);
	border-color: var(--UI-Theme-Color);
}

.UI-Toggle input[type="checkbox"]:checked::before {
	transform: translateX(14px);
}

.UI-Toggle input[type="checkbox"]:focus-visible {
	outline: none;
	box-shadow: var(--UI-Input-Focus-Ring);
}

.UI-Toggle input[type="checkbox"]:checked:focus-visible {
	box-shadow: var(--UI-Theme-Focus-Ring);
}

.UI-Toggle input[type="checkbox"]:disabled {
	background-color: var(--UI-Input-Disabled-BG);
	border-color: var(--UI-Input-Border);
	cursor: not-allowed;
}

.UI-Toggle:has(input:disabled) {
	cursor: not-allowed;
	color: var(--UI-Input-Disabled-Text);
}

.UI-Toggle input[type="checkbox"]:disabled:checked {
	background-color: var(--UI-Theme-Color);
	border-color: var(--UI-Theme-Color);
	opacity: 0.4;
}

.UI-Toggle input[type="checkbox"]:is([state="error"], [aria-invalid="true"]) {
	border-color: var(--UI-Input-Error-Border);
}

.UI-Toggle input[type="checkbox"]:is([state="error"], [aria-invalid="true"]):focus-visible {
	box-shadow: var(--UI-Input-Error-Ring);
}

/* Toggle Sizes */
.UI-Toggle[size="small"] {
	font-size: 12px;
	gap: 8px;
}

.UI-Toggle[size="small"] input[type="checkbox"] {
	width: 28px;
	height: 16px;
}

.UI-Toggle[size="small"] input[type="checkbox"]::before {
	width: 10px;
	height: 10px;
}

.UI-Toggle[size="small"] input[type="checkbox"]:checked::before {
	transform: translateX(12px);
}

.UI-Toggle[size="large"] {
	font-size: 14px;
	gap: 12px;
}

.UI-Toggle[size="large"] input[type="checkbox"] {
	width: 44px;
	height: 26px;
}

.UI-Toggle[size="large"] input[type="checkbox"]::before {
	width: 20px;
	height: 20px;
}

.UI-Toggle[size="large"] input[type="checkbox"]:checked::before {
	transform: translateX(18px);
}

/* Toggle Group */
.UI-Toggle-Group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* ========================================
   UI Tags & Chips
   ======================================== */

.UI-Tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--UI-Button-Small-Height);
	padding: 0 18px;
	border: var(--UI-Button-Border);
	border-radius: var(--UI-Tag-Radius);
	font-size: var(--UI-Font-Size-Small);
	line-height: 16px;
	font-weight: 500;
	color: var(--UI-Badge-Active-Text);
	background-color: var(--UI-Badge-Alert);
}

.UI-Tag-Today {
	background-color: var(--UI-Badge-Alert);
}
.UI-Tag-Tomorrow {
	background-color: var(--UI-Badge-Warning);
}

.UI-Chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--UI-Button-Small-Height);
	padding: 0 24px;
	border: var(--UI-Button-Border);
	border-radius: var(--UI-Chip-Radius);
	font-size: var(--UI-Font-Size-Small);
	line-height: 16px;
	font-weight: 400;
	background-color: var(--UI-Chip-BG);
	color: var(--UI-Chip-Text);
	cursor: pointer;
	transition:
		background-color 160ms ease,
		color 160ms ease,
		border-color 160ms ease;
}

.UI-Chip-Active {
	background-color: var(--UI-Chip-Active-BG);
	border-color: var(--UI-Chip-Active-Border);
	color: var(--UI-Chip-Active-Text);
	font-weight: 500;
}

/* ========================================
   UI Cards
   ======================================== */

.UI-Card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: var(--UI-Card-Border-Width) solid var(--UI-Card-Border-Color);
	border-radius: var(--UI-Card-Radius);
	background-color: var(--UI-Card-Light);
	color: var(--UI-Text-Dark-Primary);
}

.UI-Card[theme="soft"] {
	background-color: var(--UI-Card-Soft);
}
.UI-Card[theme="medium"] {
	background-color: var(--UI-Card-Medium);
}
.UI-Card[theme="dark"] {
	background-color: var(--UI-Card-Dark);
	border-color: transparent;
	color: var(--UI-Text-Light-Primary);
}

.UI-Card-Header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: var(--UI-Card-Border-Width) solid var(--UI-Card-Border-Color);
}

.UI-Card-Header-Title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 14px;
	line-height: 1;
	font-weight: 500;
	color: inherit;
}

.UI-Card-Header-Icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	font-size: 16px;
	line-height: 1;
}

.UI-Card-Header-Action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: var(--UI-Radius-SM);
	background: transparent;
	font-size: 18px;
	line-height: 1;
	color: inherit;
	cursor: pointer;
	transition: background-color 140ms ease;
}

.UI-Card-Header-Action:hover {
	background-color: rgba(0, 0, 0, 0.06);
}

.UI-Card-Body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px 16px;
}

.UI-Card-Meta {
	font-size: 11px;
	line-height: 1;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--UI-Text-Dark-Tertiary);
}

.UI-Card-Content {
	font-size: 13px;
	line-height: 1.5;
	font-weight: 400;
	color: var(--UI-Text-Dark-Secondary);
}

.UI-Card-Footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	border-top: var(--UI-Card-Border-Width) solid var(--UI-Card-Border-Color);
}

.UI-Card-Author {
	font-size: 12px;
	line-height: 1;
	font-weight: 500;
	color: var(--UI-Text-Dark-Tertiary);
}

/* Dark Card Overrides */
.UI-Card[theme="dark"] .UI-Card-Header {
	border-bottom-color: rgba(255, 255, 255, 0.1);
}
.UI-Card[theme="dark"] .UI-Card-Footer {
	border-top-color: rgba(255, 255, 255, 0.1);
}
.UI-Card[theme="dark"] .UI-Card-Header-Action:hover {
	background-color: rgba(255, 255, 255, 0.1);
}
.UI-Card[theme="dark"] .UI-Card-Meta,
.UI-Card[theme="dark"] .UI-Card-Content,
.UI-Card[theme="dark"] .UI-Card-Author {
	color: var(--UI-Text-Light-Secondary);
}

/* ========================================
   UI Sections
   ======================================== */

.UI-Section {
	padding: 24px;
	border-radius: var(--UI-Card-Radius);
	color: var(--UI-Text-Dark-Primary);
}

.UI-Section[theme="light"] {
	background-color: var(--UI-Section-Light-Background);
}
.UI-Section[theme="dark"] {
	background-color: var(--UI-Section-Dark-Background);
}

/* ========================================
   UI Badges
   ======================================== */

.UI-Badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 22px;
	padding: 0 8px;
	border: 1px solid transparent;
	border-radius: var(--UI-Radius-XS);
	font-size: 11px;
	line-height: 1;
	font-weight: 400;
	letter-spacing: 0.01em;
	color: var(--UI-Badge-Active-Text);
	background-color: var(--UI-Badge-Alert);
}

.UI-Badge[theme="alert"] {
	background-color: var(--UI-Badge-Alert);
}
.UI-Badge[theme="warning"] {
	background-color: var(--UI-Badge-Warning);
}
.UI-Badge[theme="success"] {
	background-color: var(--UI-Badge-Success);
}
.UI-Badge[theme="secondary"] {
	background-color: var(--UI-Badge-Secondary);
	color: var(--UI-Text-Light-Primary);
}
.UI-Badge[theme="outline"] {
	background-color: var(--UI-Badge-Outline-BG);
	border-color: var(--UI-Badge-Outline-Border);
	color: var(--UI-Badge-Default-Text);
}
.UI-Badge[theme="outline"][state="active"] {
	border-color: var(--UI-Badge-Outline-Active-Border);
	color: var(--UI-Badge-Active-Text);
}
