:root {
	--color-bg: #86c9ef;
	--color-surface: #ffffff;
	--color-text: #444444;
	--color-muted: #6e6e6e;
	--color-border: rgba(68, 68, 68, 0.18);
	--color-card-border: #f5a138;
	--color-accent: #0082bf;
	--color-confirm: #2f7d32;
	--color-warning: #f5a138;
	--color-danger: #c0392b;
	--shadow-soft: 0 6px 18px rgba(68, 68, 68, 0.15);
	--radius-lg: 16px;
	--radius-md: 12px;
	--space-1: 0.5rem;
	--space-2: 0.875rem;
	--space-3: 1.25rem;
	--space-4: 1.75rem;
	--space-5: 2.5rem;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
	font-family: "Trebuchet MS", Helvetica, sans-serif;
	color: var(--color-text);
	background: var(--color-bg);
}

body {
	padding: var(--space-4);
}

.app-shell {
	max-width: 1600px;
	margin: 0 auto;
	display: grid;
	gap: var(--space-4);
}

.app-shell--narrow {
	max-width: 800px;
}

.card {
	background: var(--color-surface);
	border: 3px solid var(--color-card-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
	padding: var(--space-4);
}

h1,
h2,
h3,
h4,
h5 {
	color: var(--color-accent);
	font-weight: bold;
}

.hero h1,
.hero p {
	margin: 0;
}

.hero h1 {
	font-size: clamp(2rem, 4vw, 3.5rem);
	line-height: 1.05;
	margin-top: 0.35rem;
	color: var(--color-accent);
}

.eyebrow {
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.78rem;
	color: var(--color-accent);
	font-weight: 700;
}

.toolbar {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-3);
}

.field-group {
	display: grid;
	gap: 0.55rem;
	font-weight: 600;
	color: var(--color-text);
}

.field-group span {
	font-size: 0.92rem;
}

.inline-fields,
.search-row {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.field-group input,
.field-group select,
.ghost-button {
	border-radius: 14px;
	border: 1px solid var(--color-border);
	padding: 0.9rem 1rem;
	font: inherit;
	background: #fff;
	color: var(--color-text);
}

.field-group input,
.field-group select {
	width: 100%;
}

.field-group--checkbox {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.55rem;
}

.field-group--checkbox input {
	width: auto;
}

.inline-fields input {
	flex: 1 1 160px;
}

.ghost-button {
	white-space: nowrap;
	background: rgba(0, 130, 191, 0.08);
	cursor: pointer;
}

.ghost-button:hover {
	background: rgba(0, 130, 191, 0.16);
}

.grid-layout {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
	gap: var(--space-4);
	align-items: start;
}

.overview-row {
	display: flex;
	justify-content: space-between;
	gap: var(--space-3);
	flex-wrap: wrap;
	align-items: end;
	margin-bottom: var(--space-4);
}

.overview-row h2,
.overview-row p,
.sidebar-panel h2,
.sidebar-panel p {
	margin: 0;
}

.section-label,
.product-category {
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--color-accent);
}

.overview-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.overview-stats span,
.sidebar-box {
	border-radius: 999px;
	background: rgba(0, 130, 191, 0.08);
	padding: 0.55rem 0.9rem;
	font-size: 0.92rem;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: var(--space-3);
}

.product-card {
	display: grid;
	grid-template-rows: auto 1fr;
	overflow: hidden;
	padding: 0;
}

.product-media {
	height: 150px;
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, rgba(0, 130, 191, 0.16), rgba(245, 161, 56, 0.22));
	font-size: 2.2rem;
	font-weight: 800;
	color: rgba(68, 68, 68, 0.55);
	overflow: hidden;
}

.product-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.product-body {
	padding: var(--space-4);
	display: grid;
	gap: var(--space-3);
}

.product-header {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: start;
}

.product-header h3,
.empty-state h3 {
	margin: 0.2rem 0 0;
	font-size: 1.2rem;
	color: var(--color-accent);
}

.product-description {
	margin: 0;
	color: var(--color-muted);
	line-height: 1.5;
}

.product-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem 0.85rem;
	font-size: 0.92rem;
	color: var(--color-muted);
}

.status-pill {
	display: inline-flex;
	align-items: center;
	border-radius: 999px;
	padding: 0.45rem 0.75rem;
	font-weight: 700;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	white-space: nowrap;
}

.status-pill--beschikbaar {
	background: rgba(47, 125, 50, 0.12);
	color: var(--color-confirm);
}

.status-pill--onder-voorbehoud {
	background: rgba(245, 161, 56, 0.2);
	color: #a86414;
}

.status-pill--verhuurd {
	background: rgba(192, 57, 43, 0.12);
	color: var(--color-danger);
}

.muted {
	color: var(--color-muted);
}

.error-message {
	color: var(--color-danger);
}

.empty-state {
	padding: var(--space-5);
	text-align: center;
	border: 1px dashed var(--color-border);
	border-radius: var(--radius-md);
	color: var(--color-muted);
}

.sidebar-panel {
	display: grid;
	gap: var(--space-3);
}

.sidebar-box {
	border-radius: var(--radius-md);
	padding: var(--space-3);
	background: rgba(0, 130, 191, 0.06);
}

.status-legend {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 0.75rem;
}

.status-legend li {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	align-items: center;
}

#product-list,
#booking-panel {
	min-height: 240px;
}

.product-list {
	display: grid;
	gap: var(--space-3);
	grid-template-columns: repeat(2, 1fr);
}

.product-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.product-actions .ghost-button {
	flex: 1 1 140px;
	text-align: center;
}

.ghost-button {
	transition: background 0.15s ease, opacity 0.15s ease;
}

.ghost-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ghost-button--outline {
	background: transparent;
	border: 1px solid var(--color-border);
}

.ghost-button--outline:hover {
	background: rgba(68, 68, 68, 0.06);
}

.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: grid;
	place-items: center;
	padding: var(--space-3);
	z-index: 1000;
}

.modal-overlay[hidden] {
	display: none;
}

.modal-box {
	background: var(--color-surface);
	border: 3px solid var(--color-card-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
	max-width: 600px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	padding: var(--space-4);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--space-2);
	margin-bottom: var(--space-3);
}

.modal-title {
	margin: 0;
	color: var(--color-accent);
}

.modal-close {
	border: none;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: var(--color-text);
	padding: 0 0.4rem;
}

.modal-close:hover {
	color: var(--color-danger);
}

.photo-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
	gap: 0.6rem;
}

.photo-gallery-grid a {
	display: block;
	aspect-ratio: 1 / 1;
	border-radius: var(--radius-md);
	overflow: hidden;
}

.photo-gallery-grid img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.calendar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.6rem;
	font-size: 0.9rem;
}

.calendar-nav {
	border: 1px solid var(--color-border);
	background: #fff;
	border-radius: 999px;
	width: 1.9rem;
	height: 1.9rem;
	cursor: pointer;
	line-height: 1;
}

.calendar-nav:hover {
	background: rgba(68, 68, 68, 0.08);
}

.calendar-weekdays,
.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0.3rem;
	text-align: center;
}

.calendar-weekdays {
	margin-bottom: 0.3rem;
	font-size: 0.75rem;
	color: var(--color-muted);
	text-transform: uppercase;
}

.calendar-cell {
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	font-size: 0.8rem;
}

.calendar-cell--empty {
	background: transparent;
}

.calendar-cell--free {
	background: rgba(47, 125, 50, 0.14);
	color: var(--color-confirm);
}

.calendar-cell--partial {
	background: rgba(245, 161, 56, 0.22);
	color: #a86414;
}

.calendar-cell--booked {
	background: rgba(192, 57, 43, 0.14);
	color: var(--color-danger);
}

.calendar-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
	margin-top: 0.6rem;
	font-size: 0.78rem;
	color: var(--color-muted);
	align-items: center;
}

.calendar-legend span {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.calendar-legend .calendar-cell {
	width: 0.85rem;
	height: 0.85rem;
	border-radius: 4px;
	aspect-ratio: unset;
}

.booking-products {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.6rem;
}

.booking-product-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	background: rgba(68, 68, 68, 0.05);
	border-radius: var(--radius-md);
	padding: 0.6rem 0.8rem;
}

.qty-controls {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.qty-btn {
	width: 1.8rem;
	height: 1.8rem;
	border-radius: 999px;
	border: 1px solid var(--color-border);
	background: #fff;
	cursor: pointer;
	font: inherit;
}

.qty-btn:hover {
	background: rgba(68, 68, 68, 0.08);
}

.qty-btn--remove {
	border-radius: 999px;
	width: auto;
	padding: 0 0.75rem;
	color: var(--color-danger);
}

.contract-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.contract-table th,
.contract-table td {
	text-align: left;
	padding: 0.5rem 0.6rem;
	border-bottom: 1px solid var(--color-border);
}

.contract-terms {
	padding-left: 1.2rem;
	line-height: 1.6;
}

#signature-pad {
	width: 100%;
	max-width: 600px;
	height: 200px;
	display: block;
	border: 1px dashed var(--color-border);
	border-radius: var(--radius-md);
	background: #fff;
	touch-action: none;
	cursor: crosshair;
}

@media (max-width: 900px) {
	body {
		padding: var(--space-3);
	}

	.toolbar,
	.grid-layout,
	.product-list {
		grid-template-columns: 1fr;
	}

	.product-header,
	.overview-row {
		align-items: start;
	}
}
