:root {
	--bg: #f6f3ef;
	--card: #ffffff;
	--ink: #111827;
	--muted: #6b7280;
	--line: #e5e7eb;
	--brand: #ef4444;
	--brand-dark: #b91c1c;
	--soft: #fff7ed;
	--ok: #059669;
	--warn: #d97706;
	--danger: #dc2626;
	--shadow: 0 20px 60px rgba(17, 24, 39, .08);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	background: radial-gradient(circle at top left, #fff7ed 0, #f6f3ef 34%, #eef2ff 100%);
	color: var(--ink);
}

button,
input,
select {
	font: inherit;
}

.container {
	width: min(1120px, calc(100% - 32px));
	margin: 0 auto;
}

.site-header {
	padding: 48px 0 24px;
}

.header-inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
}

.eyebrow {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--brand-dark);
}

h1,
h2,
h3,
p {
	margin-top: 0;
}

h1 {
	max-width: 740px;
	margin-bottom: 12px;
	font-size: clamp(34px, 6vw, 62px);
	line-height: .95;
	letter-spacing: -.055em;
}

.lead {
	max-width: 720px;
	font-size: 18px;
	line-height: 1.6;
	color: var(--muted);
}

.main-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
	gap: 24px;
	padding-bottom: 64px;
}

.workspace,
.side-column {
	display: grid;
	align-content: start;
	gap: 18px;
}

.card {
	border: 1px solid rgba(229, 231, 235, .9);
	border-radius: 28px;
	background: rgba(255, 255, 255, .88);
	box-shadow: var(--shadow);
	padding: 28px;
	backdrop-filter: blur(18px);
}

.card-head h2 {
	margin-bottom: 8px;
	font-size: 28px;
	letter-spacing: -.03em;
}

.card-head p {
	color: var(--muted);
	line-height: 1.55;
}

.user-panel {
	min-width: 270px;
}

.user-card,
.login-card {
	display: grid;
	gap: 10px;
	align-items: center;
	padding: 14px;
	border-radius: 22px;
	background: rgba(255, 255, 255, .92);
	border: 1px solid var(--line);
	box-shadow: 0 10px 30px rgba(17, 24, 39, .06);
}

.user-card {
	grid-template-columns: 44px minmax(0, 1fr) auto;
}

.avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--line);
}

.user-card strong,
.user-card small {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.user-card small {
	color: var(--muted);
}

.tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .68);
	border: 1px solid rgba(229, 231, 235, .9);
}

.tab-btn {
	min-height: 48px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	font-weight: 900;
	cursor: pointer;
	color: var(--muted);
}

.tab-btn.active {
	background: var(--ink);
	color: #fff;
	box-shadow: 0 12px 28px rgba(17, 24, 39, .18);
}

.tab-panel {
	display: none;
}

.tab-panel.active {
	display: block;
}

.field {
	display: block;
	margin-bottom: 18px;
}

.field span {
	display: block;
	margin-bottom: 8px;
	font-weight: 900;
}

input[type="text"],
input[type="email"],
.select {
	width: 100%;
	min-height: 48px;
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 0 14px;
	background: #fff;
}

.drop-zone {
	border: 2px dashed #fecaca;
	border-radius: 24px;
	padding: 32px 20px;
	background: linear-gradient(180deg, #fff7ed, #fff);
	text-align: center;
	outline: none;
	transition: .2s ease;
}

.drop-zone.dragover,
.drop-zone:focus {
	border-color: var(--brand);
	box-shadow: 0 0 0 4px rgba(239, 68, 68, .12);
}

.drop-icon {
	font-size: 48px;
	margin-bottom: 12px;
}

.drop-zone h3 {
	margin-bottom: 8px;
	font-size: 22px;
}

.drop-zone p {
	color: var(--muted);
}

.button-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 18px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	border: 0;
	border-radius: 999px;
	padding: 0 18px;
	font: inherit;
	font-weight: 900;
	cursor: pointer;
	text-decoration: none;
	transition: transform .15s ease, opacity .15s ease;
}

.btn:hover {
	transform: translateY(-1px);
}

.btn:disabled {
	cursor: not-allowed;
	opacity: .55;
	transform: none;
}

.primary {
	background: var(--brand);
	color: #fff;
}

.secondary {
	background: #111827;
	color: #fff;
}

.full-width {
	width: 100%;
}

.link-btn {
	border: 0;
	background: transparent;
	color: var(--brand-dark);
	font-weight: 900;
	cursor: pointer;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.preview {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr);
	gap: 16px;
	align-items: center;
	margin-top: 18px;
	padding: 14px;
	border-radius: 20px;
	background: #fff;
	border: 1px solid var(--line);
}

.preview img {
	width: 112px;
	height: 112px;
	object-fit: cover;
	border-radius: 16px;
	background: var(--line);
}

.preview p,
.small-muted {
	color: var(--muted);
	font-size: 13px;
	line-height: 1.5;
}

.status,
.notice {
	margin-top: 16px;
	padding: 14px 16px;
	border-radius: 16px;
	background: #eff6ff;
	color: #1d4ed8;
	font-weight: 750;
	line-height: 1.5;
}

.status.error,
.notice.error {
	background: #fef2f2;
	color: var(--danger);
}

.status.success,
.notice.success {
	background: #ecfdf5;
	color: var(--ok);
}

.result-card {
	position: sticky;
	top: 18px;
}

.result-title {
	font-size: 30px;
	letter-spacing: -.03em;
	margin-bottom: 4px;
}

.result-ko {
	font-size: 18px;
	font-weight: 900;
	color: var(--brand-dark);
}

.result-grid,
.detail-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 16px 0;
}

.info-tile,
.detail-tile {
	padding: 12px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid var(--line);
}

.info-tile small,
.detail-tile small {
	display: block;
	margin-bottom: 4px;
	color: var(--muted);
	font-weight: 900;
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: .05em;
}

.info-tile strong,
.detail-tile strong {
	font-size: 15px;
}

.chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0;
}

.chip {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	border-radius: 999px;
	padding: 0 10px;
	background: var(--soft);
	color: var(--brand-dark);
	font-size: 12px;
	font-weight: 900;
}

.menu-summary {
	margin-top: 18px;
	padding: 14px 16px;
	border-radius: 18px;
	background: #fff;
	border: 1px solid var(--line);
	color: var(--muted);
	line-height: 1.55;
}

.menu-results {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-top: 18px;
}

.menu-card {
	position: relative;
	display: grid;
	gap: 8px;
	padding: 18px;
	border-radius: 22px;
	background: #fff;
	border: 1px solid var(--line);
	box-shadow: 0 10px 30px rgba(17, 24, 39, .05);
}

.menu-card h3 {
	margin-bottom: 0;
	font-size: 20px;
	letter-spacing: -.02em;
}

.menu-card p {
	margin: 0;
	color: var(--muted);
	line-height: 1.45;
}

.menu-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.menu-price {
	font-weight: 950;
	color: var(--ink);
}

.menu-card .btn {
	justify-self: start;
	margin-top: 6px;
}

.placeholder-image {
	display: grid;
	place-items: center;
	min-height: 160px;
	border-radius: 22px;
	background: linear-gradient(135deg, #fff7ed, #eef2ff);
	border: 1px solid var(--line);
	font-size: 42px;
}

.modal {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: grid;
	place-items: center;
	padding: 24px;
}

.modal.hidden {
	display: none;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, .48);
	backdrop-filter: blur(4px);
}

.modal-card {
	position: relative;
	z-index: 1;
	width: min(680px, 100%);
	max-height: 85vh;
	overflow-y: auto;
	border-radius: 28px;
	background: #fff;
	padding: 28px;
	box-shadow: 0 30px 90px rgba(17, 24, 39, .28);
}

.language-card {
	width: min(760px, 100%);
}

.language-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-top: 18px;
}

.language-option {
	min-height: 72px;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: #fff;
	cursor: pointer;
	text-align: left;
	padding: 12px;
}

.language-option:hover,
.language-option.active {
	border-color: var(--brand);
	box-shadow: 0 0 0 4px rgba(239, 68, 68, .12);
}

.language-option span,
.language-option small {
	display: block;
}

.language-option span {
	font-weight: 950;
}

.language-option small {
	color: var(--muted);
	margin-top: 4px;
}

.modal-close {
	position: absolute;
	right: 18px;
	top: 14px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #f3f4f6;
	font-size: 24px;
	cursor: pointer;
}

.loading {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: grid;
	place-items: center;
	align-content: center;
	gap: 12px;
	background: rgba(255, 255, 255, .72);
	backdrop-filter: blur(5px);
	font-weight: 900;
}

.spinner {
	width: 52px;
	height: 52px;
	border: 5px solid #fee2e2;
	border-top-color: var(--brand);
	border-radius: 50%;
	animation: spin .8s linear infinite;
}

.hidden {
	display: none !important;
}

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

@media (max-width: 900px) {
	.header-inner,
	.main-grid {
		display: block;
	}

	.user-panel,
	.side-column {
		margin-top: 18px;
	}

	.side-column {
		display: grid;
		gap: 18px;
	}

	.result-card {
		position: static;
	}

	.menu-results,
	.result-grid,
	.detail-grid,
	.language-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	.container {
		width: min(100% - 20px, 1120px);
	}

	.site-header {
		padding-top: 28px;
	}

	.card {
		padding: 20px;
		border-radius: 22px;
	}

	.preview {
		grid-template-columns: 84px minmax(0, 1fr);
	}

	.preview img {
		width: 84px;
		height: 84px;
	}

	.modal {
		place-items: end center;
		padding: 12px;
	}

	.modal-card {
		width: 100%;
		max-height: 88vh;
		border-radius: 26px 26px 18px 18px;
		padding: 24px 18px;
	}
}
