:root {
	--fm-background: #ffffff;
	--fm-surface: #f7f7f7;
	--fm-border: #e6e4e0;
	--fm-foreground: #1f1f1f;
	--fm-muted: #666666;
	--fm-radius-control: 6px;
	--fm-radius-panel: 10px;
}

html,
body,
#dashboard-app,
#macaw-ui-root {
	min-height: 100%;
}

body {
	background: var(--fm-background);
	color: var(--fm-foreground);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif !important;
	-webkit-font-smoothing: antialiased;
}

.fm-wordmark {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	color: var(--fm-foreground);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.16em;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

.fm-wordmark::before {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: currentColor;
	content: "";
}

[data-macaw-ui-component="Button"],
button,
input,
textarea,
select {
	border-radius: var(--fm-radius-control) !important;
}

[data-macaw-ui-component="Button"][data-variant="primary"],
[data-test-id="submit"] {
	background: var(--fm-foreground) !important;
	border-color: var(--fm-foreground) !important;
	color: #ffffff !important;
}

[data-macaw-ui-component="Button"][data-variant="primary"]:hover,
[data-test-id="submit"]:hover {
	background: #383838 !important;
}

html[data-fm-login="true"] #macaw-ui-root > div:has(form) {
	display: grid !important;
	grid-template-columns: minmax(32rem, 0.9fr) minmax(32rem, 1.1fr) !important;
	min-height: 100vh;
	background: var(--fm-background) !important;
}

html[data-fm-login="true"] #macaw-ui-root > div:has(form) > div:has(form) {
	display: flex !important;
	min-height: 100vh;
	box-sizing: border-box;
	flex-direction: column;
	justify-content: center;
	padding: 72px clamp(40px, 6vw, 96px) !important;
	background: var(--fm-background) !important;
}

html[data-fm-login="true"] #macaw-ui-root > div:has(form) > div:has(form) > .fm-wordmark,
html[data-fm-login="true"] #macaw-ui-root > div:has(form) > div:has(form) > *:has(.fm-wordmark) {
	align-self: flex-start;
	margin-bottom: 64px !important;
}

html[data-fm-login="true"] #macaw-ui-root form {
	width: 100% !important;
	max-width: 440px !important;
	margin: 0 !important;
}

html[data-fm-login="true"] #macaw-ui-root .fm-login-title {
	font-size: clamp(28px, 3vw, 42px) !important;
	font-weight: 500 !important;
	letter-spacing: -0.035em !important;
	line-height: 1.08 !important;
}

html[data-fm-login="true"] #macaw-ui-root form h1,
html[data-fm-login="true"] #macaw-ui-root form h2,
html[data-fm-login="true"] #macaw-ui-root form > div:first-child {
	color: var(--fm-foreground) !important;
}

html[data-fm-login="true"] #macaw-ui-root input {
	background: #ffffff !important;
	border-color: var(--fm-border) !important;
}

html[data-fm-login="true"] #macaw-ui-root > div:has(form) > div:not(:has(form)) {
	position: relative;
	display: block !important;
	min-height: 100vh;
	overflow: hidden;
	background: url("/dashboard/fish-market-dashboard-hero.png") center / cover no-repeat !important;
}

html[data-fm-login="true"] #macaw-ui-root > div:has(form) > div:not(:has(form)) > svg {
	display: none !important;
}

html[data-fm-login="true"] #macaw-ui-root > div:has(form) > div:not(:has(form))::after {
	position: absolute;
	right: 48px;
	bottom: 42px;
	left: 48px;
	max-width: 520px;
	color: #ffffff;
	content: "Управление каталогом Fish Marketplace";
	font-size: clamp(24px, 2.3vw, 38px);
	font-weight: 500;
	letter-spacing: -0.03em;
	line-height: 1.08;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

@media (max-width: 900px) {
	html[data-fm-login="true"] #macaw-ui-root > div:has(form) {
		display: block !important;
	}

	html[data-fm-login="true"] #macaw-ui-root > div:has(form) > div:has(form) {
		min-height: 100vh;
		padding: 40px 24px !important;
	}

	html[data-fm-login="true"] #macaw-ui-root > div:has(form) > div:not(:has(form)) {
		display: none !important;
	}
}
