@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&display=swap');

:root {
	color-scheme: dark;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	min-width: 20rem;
	scrollbar-color: rgb(71 85 105) rgb(2 6 23);
	scrollbar-width: thin;
}

* {
	scrollbar-color: rgb(71 85 105) rgb(2 6 23);
	scrollbar-width: thin;
}

*::-webkit-scrollbar {
	width: 0.6rem;
	height: 0.6rem;
}

*::-webkit-scrollbar-track {
	background: rgb(2 6 23);
}

*::-webkit-scrollbar-thumb {
	border: 2px solid rgb(2 6 23);
	border-radius: 999px;
	background: rgb(71 85 105);
}

*::-webkit-scrollbar-thumb:hover {
	background: rgb(100 116 139);
}

body {
	min-height: 100vh;
	margin: 0;
	overflow-x: hidden;
	font-family: 'Inter', sans-serif;
	line-height: 1.5;
	text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

button,
input,
select,
textarea {
	max-width: 100%;
	font: inherit;
}

input,
select,
textarea {
	min-width: 0;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.admin-ui button {
	min-height: 2rem;
	border-radius: 0.5rem !important;
	padding: 0.25rem 0.55rem !important;
	line-height: 1.15;
	letter-spacing: 0.06em !important;
}

.admin-ui button.w-full {
	min-height: 2.5rem;
	padding: 0.55rem 0.75rem !important;
}

.admin-ui button[class*="bg-rose-500"] {
	border: 1px solid rgb(190 24 93) !important;
	background: rgb(76 5 25) !important;
	color: rgb(253 164 175) !important;
}

.admin-ui button[class*="bg-rose-500"]:hover {
	background: rgb(136 19 55) !important;
	color: rgb(255 228 230) !important;
}

.admin-ui input:not([type="checkbox"]),
.admin-ui select {
	min-height: 2.25rem;
	padding-top: 0.4rem;
	padding-bottom: 0.4rem;
}

.admin-ui .admin-inline-action {
	display: flex;
	align-items: end;
	gap: 0.5rem;
}

.admin-ui .admin-inline-action > input,
.admin-ui .admin-inline-action > select {
	flex: 1 1 auto;
}

.admin-ui .admin-inline-action > button {
	flex: 0 0 auto;
	min-height: 2.25rem;
	white-space: nowrap;
}

.admin-ui .admin-compact-action {
	min-height: 2rem;
	padding: 0.25rem 0.55rem !important;
	white-space: nowrap;
}

.admin-ui .admin-micro-action {
	min-height: 1.875rem;
	padding: 0.2rem 0.5rem !important;
	font-size: 0.6875rem !important;
	white-space: nowrap;
}

.admin-ui .admin-primary-action {
	min-height: 2.125rem;
	padding: 0.35rem 0.7rem !important;
	font-size: 0.75rem !important;
	white-space: nowrap;
}

.admin-ui form[action*="inventory-management/clear"] button,
.admin-ui form[action*="inventory-management/delete"] button {
	min-height: 1.875rem;
	padding: 0.2rem 0.5rem !important;
	font-size: 0.6875rem !important;
	white-space: nowrap;
}

.admin-ui form[action*="/admin/products/"] button,
.admin-ui button[formaction*="/admin/products/"] {
	min-height: 2rem;
	padding: 0.25rem 0.55rem !important;
	font-size: 0.75rem !important;
	white-space: nowrap;
}

.admin-ui form[action*="/delete"] button,
.admin-ui form[action*="/clear"] button,
.admin-ui button[formaction*="/delete"] {
	border-color: rgb(153 27 27) !important;
	background: rgb(69 10 10) !important;
	color: rgb(254 202 202) !important;
}

.admin-ui form[action*="/delete"] button:hover,
.admin-ui form[action*="/clear"] button:hover,
.admin-ui button[formaction*="/delete"]:hover {
	border-color: rgb(220 38 38) !important;
	background: rgb(127 29 29) !important;
	color: rgb(254 242 242) !important;
}

.admin-auth-action {
	min-height: 2.25rem;
	padding: 0.45rem 0.75rem !important;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
	letter-spacing: normal !important;
	line-height: 1.15;
}

/* Admin pages use utility-heavy markup; reset its display hierarchy here. */
.admin-ui .uppercase {
	text-transform: capitalize !important;
}

.admin-ui [class*="tracking-"] {
	letter-spacing: normal !important;
}

.admin-ui h1 {
	font-size: 1.75rem !important;
	font-weight: 700 !important;
	line-height: 1.2;
}

.admin-ui button,
.admin-ui input[type="submit"] {
	font-weight: 700 !important;
}

.admin-ui p.text-xs.uppercase,
.admin-ui th.uppercase,
.admin-ui label.uppercase,
.admin-ui .uppercase.text-xs {
	font-weight: 600 !important;
}

:focus-visible {
	outline: 2px solid rgb(245 158 11);
	outline-offset: 3px;
}

[hidden] {
	display: none !important;
}

dialog {
	max-width: calc(100vw - 2rem);
}

.page-shell {
	width: min(100% - 2rem, 80rem);
	margin-inline: auto;
}

.content-shell {
	width: min(100% - 2rem, 68rem);
	margin-inline: auto;
}

.content-flow > * + * {
	margin-top: 1.5rem;
}

.inventory-sort-menu {
	position: relative;
	min-width: 12rem;
}

.inventory-sort-menu summary {
	display: flex;
	min-height: 3rem;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	border: 1px solid rgb(71 85 105);
	border-radius: 0.75rem;
	background: rgb(15 23 42);
	color: rgb(248 250 252);
	cursor: pointer;
	padding: 0.75rem 0.9rem;
	font-size: 0.75rem;
	font-weight: 700;
	list-style: none;
}

.inventory-sort-menu summary::-webkit-details-marker {
	display: none;
}

.inventory-sort-menu summary::after {
	content: '';
	width: 0.45rem;
	height: 0.45rem;
	border-right: 2px solid rgb(251 191 36);
	border-bottom: 2px solid rgb(251 191 36);
	transform: rotate(45deg) translateY(-0.15rem);
}

.inventory-sort-menu[open] summary {
	border-color: rgb(245 158 11);
}

.inventory-sort-options {
	position: absolute;
	z-index: 60;
	top: calc(100% + 0.4rem);
	right: 0;
	width: max-content;
	min-width: 100%;
	max-height: 16rem;
	overflow-y: auto;
	border: 1px solid rgb(71 85 105);
	border-radius: 0.75rem;
	background: rgb(2 6 23);
	box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
	padding: 0.25rem;
}

.inventory-sort-option {
	display: block;
	width: 100%;
	border: 0;
	border-radius: 0.5rem;
	background: transparent;
	color: rgb(226 232 240);
	padding: 0.65rem 0.75rem;
	text-align: left;
	font-size: 0.75rem;
	font-weight: 700;
}

.inventory-sort-option:hover,
.inventory-sort-option:focus {
	background: rgb(30 41 59);
	color: rgb(252 211 77);
}

.card {
	border: 1px solid rgba(51, 65, 85, 0.8);
	background: rgba(2, 6, 23, 0.72);
	border-radius: 1rem;
	padding: 1rem;
	margin-bottom: 1rem;
}

.row {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.muted {
	color: rgb(148 163 184);
}

.success {
	color: rgb(74 222 128);
}

.error {
	color: rgb(248 113 113);
}

input,
select,
textarea {
	border-radius: 0.75rem;
	border: 1px solid rgb(71 85 105);
	background: rgb(15 23 42);
	color: rgb(248 250 252);
	padding: 0.75rem 0.9rem;
}

input,
select,
textarea {
	width: 100%;
	display: block;
	min-height: 3rem;
}

select {
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, rgb(245 158 11) 50%), linear-gradient(135deg, rgb(245 158 11) 50%, transparent 50%), linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.94));
	background-position: calc(100% - 1.2rem) calc(50% - 0.18rem), calc(100% - 0.85rem) calc(50% - 0.18rem), 0 0;
	background-size: 0.4rem 0.4rem, 0.4rem 0.4rem, 100% 100%;
	background-repeat: no-repeat;
	padding-right: 3rem;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
	transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, transform 160ms ease;
}

select:hover {
	border-color: rgb(148 163 184);
	background-image: linear-gradient(45deg, transparent 50%, rgb(251 191 36) 50%), linear-gradient(135deg, rgb(251 191 36) 50%, transparent 50%), linear-gradient(180deg, rgba(15, 23, 42, 1), rgba(15, 23, 42, 1));
}

select option {
	background: rgb(15 23 42);
	color: rgb(248 250 252);
}

input[type="file"] {
	padding: 0.65rem;
	line-height: 1.2;
}

input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="time"] {
	color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
	filter: invert(79%) sepia(79%) saturate(488%) hue-rotate(340deg) brightness(102%) contrast(96%);
	cursor: pointer;
}

input[type="checkbox"] {
	appearance: none;
	display: grid;
	place-content: center;
	width: 1rem;
	height: 1rem;
	min-height: 1rem;
	border: 1px solid rgb(100 116 139);
	border-radius: 0.25rem;
	background: rgb(15 23 42);
	padding: 0;
}

input[type="checkbox"]::before {
	content: '';
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 0.125rem;
	background: rgb(15 23 42);
	transform: scale(0);
	transition: transform 120ms ease, background-color 120ms ease;
}

input[type="checkbox"]:checked {
	border-color: rgb(245 158 11);
	background: rgb(245 158 11);
}

input[type="checkbox"]:checked::before {
	background: rgb(2 6 23);
	transform: scale(1);
}

input::placeholder,
textarea::placeholder {
	color: rgb(100 116 139);
}

input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: rgb(245 158 11);
	box-shadow: 0 0 0 1px rgb(245 158 11 / 35%);
}

textarea {
	min-height: 7.5rem;
	resize: vertical;
}

button {
	cursor: pointer;
}

form {
	max-width: 100%;
}

.prose-brand p {
	margin: 0;
}

.form-copy {
	max-width: 38rem;
}

.section-copy {
	max-width: 44rem;
}

.field-note {
	font-size: 0.875rem;
	line-height: 1.6;
	color: rgb(148 163 184);
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	border-bottom: 1px solid rgb(51 65 85);
	padding: 0.6rem;
	text-align: left;
}

@media (max-width: 40rem) {
	.page-shell,
	.content-shell {
		width: min(100% - 1.25rem, 80rem);
	}
}
