body {
	margin: 0;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	-webkit-font-smoothing: antialiased;
}

#planning-app input[type='number']::-webkit-inner-spin-button,
#planning-app input[type='number']::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

#planning-app input[type='number'] {
	-moz-appearance: textfield;
}

/* Product grids — Tailwind CDN does not scan dynamically injected JS classes. */
#planning-app .prezo-product-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
}

#planning-app .prezo-product-card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.75rem;
	padding: 0.75rem;
	background: #fff;
	min-width: 0;
}

#planning-app .prezo-product-thumb {
	display: block;
	width: 100%;
	max-width: 200px;
	max-height: 200px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 0.75rem;
	background: #fffbeb;
	border: 1px solid #fef3c7;
	margin-left: auto;
	margin-right: auto;
}

#planning-app .prezo-product-thumb-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 200px;
	max-height: 200px;
	aspect-ratio: 1 / 1;
	border-radius: 0.75rem;
	background: #fde68a;
	font-size: 1.5rem;
	margin-left: auto;
	margin-right: auto;
}

#planning-app .prezo-product-heading {
	min-width: 0;
}

#planning-app .prezo-product-name {
	font-weight: 500;
	color: #111827;
	font-size: 0.875rem;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.5rem;
}

#planning-app .prezo-product-id {
	display: block;
	margin: 0 0 0.15rem;
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.02em;
	color: #6b7280;
}

#planning-app .prezo-product-likutis,
#planning-app .prezo-product-sandelis {
	margin: 0;
	text-align: center;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.2;
	color: #dc2626;
}

#planning-app .prezo-product-sandelis {
	color: #0f766e;
}

#planning-app .prezo-product-qty-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	margin-top: auto;
}

#planning-app .prezo-time-field {
	position: relative;
}

#planning-app .prezo-time-clock-btn {
	position: absolute;
	top: 50%;
	right: 0.5rem;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 0.5rem;
	background: transparent;
	color: #4b5563;
	cursor: pointer;
}

#planning-app .prezo-time-clock-btn:hover {
	background: #f3f4f6;
	color: #111827;
}

#planning-app .prezo-time-picker {
	position: absolute;
	z-index: 30;
	left: 0;
	right: 0;
	top: calc(100% + 0.35rem);
	padding: 0.75rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.75rem;
	background: #fff;
	box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

#planning-app .prezo-time-picker.hidden {
	display: none;
}

#planning-app .prezo-time-picker-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

#planning-app .prezo-time-picker-label {
	margin: 0 0 0.35rem;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #6b7280;
}

#planning-app .prezo-time-picker-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.35rem;
	max-height: 10rem;
	overflow-y: auto;
}

#planning-app .prezo-time-option {
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	background: #fff;
	padding: 0.4rem 0.25rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #111827;
	cursor: pointer;
}

#planning-app .prezo-time-option.is-active,
#planning-app .prezo-time-option:hover {
	border-color: #2563eb;
	background: #eff6ff;
	color: #1d4ed8;
}

#planning-app .prezo-time-picker-done {
	margin-top: 0.75rem;
	width: 100%;
	border: 1px solid #111827;
	border-radius: 0.65rem;
	background: #111827;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	padding: 0.55rem 0.75rem;
	cursor: pointer;
}

@media (max-width: 640px) {
	#planning-app .prezo-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Fixed logout — small, non-invasive */
.prezo-logout-btn {
	position: fixed;
	right: 0.75rem;
	bottom: 0.75rem;
	z-index: 50;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 0.4rem;
	border: 1px solid #e5e7eb;
	background: rgba(255, 255, 255, 0.92);
	color: #6b7280;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
	text-decoration: none;
	backdrop-filter: blur(4px);
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.prezo-logout-btn:hover,
.prezo-logout-btn:focus-visible {
	color: #111827;
	border-color: #d1d5db;
	background: #fff;
	outline: none;
}

.prezo-logout-btn:focus-visible {
	box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}
