* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: "Trebuchet MS", "Segoe UI", sans-serif;
	background: linear-gradient(135deg, #f8fbff, #eef4ff);
	color: #1f2937;
}

.main {
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	gap: 2rem;
	width: min(1200px, calc(100% - 2rem));
	margin: 3rem auto;
	padding: 0 1rem;
}

.left,
.right {
	background: #ffffff;
	border: 1px solid #dbe4f2;
	border-radius: 14px;
	padding: 1.5rem;
	box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
}

.full {
	margin: 20px;
	background: #ffffff;
	border: 1px solid #dbe4f2;
	border-radius: 14px;
	box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
	flex: 1;
	width: min(1200px, calc(100% - 2rem));
	max-width: none;
	box-sizing: border-box;
	padding: 24px;
	display: flex;
	flex-direction: column;
}

.edit-container {
	display: flex;
	gap: 1.5rem;
	width: 100%;
	flex-wrap: wrap;
}

.page-title,
.preview-title {
	margin-top: 0;
	margin-bottom: 1rem;
}

.item-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.field-group {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.field-group label {
	font-weight: 600;
	font-size: 0.95rem;
}

input {
	width: 100%;
	border: 1px solid #c7d2e3;
	border-radius: 8px;
	padding: 0.7rem 0.8rem;
	font-size: 1rem;
}

input:focus {
	border-color: #0a7f6f;
	outline: none;
	box-shadow: 0 0 0 3px rgba(10, 127, 111, 0.15);
}

.dynamic-fields {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.field-row {
	width: 100%;
	display: flex;
	flex-direction: column;
}

.add-field-btn {
	width: 42px;
	height: 42px;
	border: none;
	border-radius: 999px;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #ffffff;
	background: linear-gradient(135deg, #0a7f6f, #0891b2);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.add-field-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 16px rgba(8, 145, 178, 0.3);
}

.submit-btn {
	border: none;
	border-radius: 8px;
	padding: 0.8rem 1rem;
	color: #ffffff;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	background: #1f2937;
	text-decoration: none;
}

.preview-note {
	margin: 0;
	line-height: 1.55;
	color: #4b5563;
}

.margin-btn {
	margin-top: 1rem;
}

.a-button {
	text-decoration: none;
	display: inline-block;
	text-align: center;
	margin-top: 1rem;
}

.full-main {
	display: flex;
	justify-content: center;
	width: min(1200px, calc(100% - 2rem));
	margin: auto;
}

.sucess-message {
	background: #d1fae5;
	color: #065f46;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	margin-bottom: 1rem;
	text-align: center;
	font-weight: 600;
	box-shadow: 0 4px 12px rgba(6, 95, 70, 0.2);
}

.checkbox-group {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.checkbox-group #is_barcoded {
	width: auto;
	flex: 0 0 auto;
	margin: 0;
}

.checkbox-group label {
	flex: 1;
	margin: 0;
}

@media (max-width: 760px) {
	.main {
		grid-template-columns: 1fr;
		margin: 1.2rem auto;
	}

	.field-row {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch;
		gap: 0.35rem;
		border: solid 1px lightgrey;
		border-radius: 10px;
    padding: 10px;
	}
	
	.field-row * {
		width: 100%;
	}
}
