:root {
	color-scheme: light;
	--ink: #202923;
	--muted: #65716a;
	--line: #dce3dd;
	--surface: #ffffff;
	--canvas: #f2f5f1;
	--green: #225c43;
	--green-dark: #194731;
	--soft-green: #eaf2ec;
	--danger: #a13d35;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 48px 20px;
	background: var(--canvas);
	color: var(--ink);
	font-family: "Segoe UI", sans-serif;
}

.container {
	max-width: 840px;
	margin: 0 auto;
}

.page-header {
	margin-bottom: 28px;
}

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

h1 {
	margin-bottom: 8px;
	font-size: 30px;
	font-weight: 650;
}

.page-header p {
	margin-bottom: 0;
	color: var(--muted);
	line-height: 1.5;
}

.panel {
	padding: 28px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
}

.upload-box {
	padding: 30px;
	border: 1px dashed #aebbb0;
	border-radius: 6px;
	background: #fbfcfa;
	text-align: center;
}

.upload-box label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
}

input,
textarea {
	width: 100%;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid #cbd5cc;
	border-radius: 5px;
	background: #fff;
	color: var(--ink);
	font: inherit;
}

input:focus,
textarea:focus {
	outline: 2px solid #8bb69a;
	outline-offset: 1px;
	border-color: var(--green);
}

input[type="file"] {
	max-width: 100%;
	margin: 8px 0 12px;
	padding: 7px;
}

button {
	min-height: 42px;
	padding: 10px 16px;
	border: 1px solid transparent;
	border-radius: 5px;
	background: var(--green);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

button:hover:not(:disabled) {
	background: var(--green-dark);
}

button:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

button.secondary {
	border-color: #b8c8bb;
	background: var(--soft-green);
	color: var(--green-dark);
}

button.secondary:hover:not(:disabled) {
	background: #dceadf;
}

button.remove-button {
	min-height: 36px;
	padding: 7px 11px;
	border-color: #e2c5c2;
	background: #fff;
	color: var(--danger);
	font-size: 14px;
}

button.remove-button:hover:not(:disabled) {
	background: #fff5f4;
}

#fileName,
#statusMessage {
	margin: 8px 0 0;
	color: var(--muted);
	font-size: 14px;
}

#fileName {
	overflow-wrap: anywhere;
}

#statusMessage[data-state="error"] {
	color: var(--danger);
}

#reviewSection {
	margin-top: 28px;
}

.review-heading,
.category-heading,
.item-heading,
.review-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.review-heading {
	margin-bottom: 22px;
}

.review-heading h2 {
	margin-bottom: 0;
	font-size: 22px;
}

.menu-details,
.item-fields {
	display: grid;
	gap: 16px;
}
.menu-notes {
	margin-bottom: 26px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--line);
}

.menu-notes-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 10px;
}

.menu-notes-heading h3 {
	margin: 0;
	font-size: 16px;
}


.menu-details {
	grid-template-columns: minmax(0, 1fr) 150px;
	margin-bottom: 26px;
}

.field {
	display: grid;
	gap: 7px;
	min-width: 0;
}

.field label {
	color: #435148;
	font-size: 14px;
	font-weight: 600;
}

.category-list {
	display: grid;
	gap: 18px;
}

.category {
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: #fcfdfb;
}

.category-heading {
	margin-bottom: 16px;
}

.category-heading .field {
	flex: 1;
}

.item-list {
	display: grid;
	gap: 12px;
}

.menu-item {
	padding: 15px;
	border: 1px solid #e3e9e3;
	border-radius: 5px;
	background: #fff;
}

.item-heading {
	margin-bottom: 12px;
}

.item-heading strong {
	font-size: 14px;
}

.review-summary {
	margin: -10px 0 20px;
	padding: 10px 12px;
	border-left: 3px solid var(--green);
	background: var(--soft-green);
	color: var(--green-dark);
	font-size: 14px;
	font-weight: 600;
}

.item-heading {
	justify-content: flex-start;
	flex-wrap: wrap;
}

.item-heading .remove-button {
	margin-left: auto;
}

.menu-item.needs-review,
.editor-entry.needs-review {
	border-color: #d8cda9;
	background: #fffdf7;
}

.menu-item.needs-review {
	border-left: 3px solid #b39c5c;
}

.review-badge {
	padding: 3px 8px;
	border-radius: 12px;
	background: #f1e9cf;
	color: #675a31;
	font-family: "Segoe UI", sans-serif;
	font-size: 12px;
	font-weight: 600;
}

.review-badge[hidden] {
	display: none;
}

.checkbox-field label {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
}

.checkbox-field input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--green);
}

.field input[readonly] {
	background: #f3f6f3;
	color: var(--muted);
}

.field select {
	width: 100%;
	min-width: 0;
	min-height: 42px;
	padding: 10px 12px;
	border: 1px solid #cbd5cc;
	border-radius: 5px;
	background: #fff;
	color: var(--ink);
	font: inherit;
}

.nested-section {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--line);
}

.nested-section-title {
	margin: 0 0 8px;
	color: var(--green-dark);
	font-size: 15px;
	font-weight: 600;
}

.nested-list {
	display: grid;
	gap: 8px;
}

.editor-entry,
.nested-group {
	min-width: 0;
	padding: 10px 0;
	border-top: 1px solid #e8ede8;
}

.nested-heading {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.nested-heading .remove-button {
	margin-left: auto;
}

.nested-fields {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nested-add-button {
	min-height: 36px;
	margin-top: 10px;
	padding: 7px 11px;
	font-size: 14px;
}

.item-fields {
	grid-template-columns: minmax(0, 1fr) 140px;
}

.item-fields .description-field {
	grid-column: 1 / -1;
}

textarea {
	min-height: 76px;
	resize: vertical;
}

.category-actions {
	display: flex;
	justify-content: flex-start;
	margin-top: 14px;
}

.review-actions {
	flex-wrap: wrap;
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
}

.export-button {
	min-height: 48px;
	padding-inline: 22px;
	background: var(--green-dark);
}

.export-message {
	margin: 12px 0 0;
	color: var(--green-dark);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.6;
	white-space: pre-line;
}

.export-message[data-state="error"] {
	padding: 10px 12px;
	border-left: 3px solid var(--danger);
	background: #fff5f4;
	color: var(--danger);
}

.export-message[data-state="success"] {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 14px;
	border-left: 3px solid var(--green);
	border-radius: 4px;
	background: var(--soft-green);
}

.export-message[hidden] {
	display: none;
}

@media (max-width: 600px) {
	body {
		padding: 24px 14px;
	}

	.panel {
		padding: 18px;
	}

	.upload-box {
		padding: 22px 14px;
	}

	.menu-details,
	.item-fields {
		grid-template-columns: 1fr;
	}

	.item-fields .description-field {
		grid-column: auto;
	}

	.category {
		padding: 14px;
	}

	.category-heading,
	.review-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.category-heading .remove-button,
	.review-actions button {
		width: 100%;
	}

	.export-message[data-state="success"] {
		align-items: stretch;
		flex-direction: column;
	}

	.nested-fields {
		grid-template-columns: 1fr;
	}

	.nested-heading {
		flex-wrap: wrap;
	}
}
