:root {
	--sidebar-width: 280px;
	--sidebar-bg: #0f172a;
	--sidebar-hover: rgba(255, 255, 255, 0.06);
	--sidebar-active: #059669;
	--topbar-height: 64px;
	/* TheraBook marketing / WordPress kleuren */
	--tb-primary: #2d6a4f;
	--tb-primary-dark: #1b4332;
	--tb-primary-light: #40916c;
	--tb-accent: #95d5b2;
	--tb-accent-soft: #d8f3dc;
	--tb-bg: #f7faf8;
	--tb-bg-soft: #eef5f0;
	--tb-text: #1a2e24;
	--tb-muted: #5c6b62;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	font-family: Inter, system-ui, -apple-system, sans-serif;
	margin: 0;
}

img,
svg {
	max-width: 100%;
	height: auto;
}

/* Auth, boeking & cliëntportaal — foto-achtergrond */
.auth-body,
.portal-body.tb-meadow-bg {
	position: relative;
	min-height: 100vh;
	background-color: var(--tb-bg-soft);
	background-image: url('../images/auth-bg.jpg');
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	background-attachment: fixed;
}

.auth-body::before,
.portal-body.tb-meadow-bg::before {
	content: '';
	position: fixed;
	inset: 0;
	/* Lichter overlay zodat de foto zichtbaar blijft */
	background: linear-gradient(
		115deg,
		rgba(247, 250, 248, 0.82) 0%,
		rgba(238, 245, 240, 0.68) 42%,
		rgba(216, 243, 220, 0.42) 68%,
		rgba(149, 213, 178, 0.18) 100%
	);
	pointer-events: none;
	z-index: 0;
}

.auth-body > .container,
.portal-body.tb-meadow-bg > .navbar,
.portal-body.tb-meadow-bg > main {
	position: relative;
	z-index: 1;
}

.auth-brand__logo {
	display: block;
	max-width: min(320px, 90vw);
	height: auto;
	margin: 0 auto;
}

.auth-brand__link {
	text-decoration: none;
}

.auth-brand__link:hover {
	opacity: 0.92;
}

.auth-brand__subtitle {
	font-size: 0.95rem;
}

.portal-body.tb-meadow-bg > .navbar {
	background: rgba(45, 106, 79, 0.88) !important;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-brand-logo {
	height: 40px;
	width: auto;
	max-width: 220px;
	object-fit: contain;
	display: block;
}

.booking-brand {
	margin-bottom: 1.25rem;
}

.booking-brand .auth-brand__logo {
	max-width: min(260px, 78vw);
}

@media (max-width: 767.98px) {
	.auth-body,
	.portal-body.tb-meadow-bg {
		background-attachment: scroll;
		background-position: 65% center;
	}

	.auth-body::before,
	.portal-body.tb-meadow-bg::before {
		background: linear-gradient(
			180deg,
			rgba(247, 250, 248, 0.86) 0%,
			rgba(238, 245, 240, 0.72) 55%,
			rgba(216, 243, 220, 0.48) 100%
		);
	}
}

.auth-body .card,
.portal-body.tb-meadow-bg main .card {
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(45, 106, 79, 0.1) !important;
	box-shadow: 0 18px 48px rgba(27, 67, 50, 0.12);
}

.auth-body a:not(.btn),
.portal-body.tb-meadow-bg main a:not(.btn) {
	color: var(--tb-primary);
}

.auth-body a:not(.btn):hover,
.portal-body.tb-meadow-bg main a:not(.btn):hover {
	color: var(--tb-primary-dark);
}

.auth-body .btn-success,
.portal-body.tb-meadow-bg .btn-success {
	background: linear-gradient(135deg, var(--tb-primary), var(--tb-primary-light));
	border-color: var(--tb-primary);
}

.auth-body .btn-success:hover,
.portal-body.tb-meadow-bg .btn-success:hover {
	background: linear-gradient(135deg, var(--tb-primary-dark), var(--tb-primary));
	border-color: var(--tb-primary-dark);
}

.auth-body .text-muted,
.portal-body.tb-meadow-bg .text-muted {
	color: var(--tb-muted) !important;
}

.auth-card,
.stat-card {
	border-radius: 16px;
}

.account-type-card {
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
}

.account-type-card:has(input:checked) {
	border-color: var(--tb-primary) !important;
	background: var(--tb-accent-soft);
}

/* Dashboard layout */
.dashboard-body {
	background: #f4f7fb;
	min-height: 100vh;
	overflow-x: hidden;
}

.dashboard-wrapper {
	display: flex;
	min-height: 100vh;
	align-items: stretch;
}

.sidebar-overlay {
	display: none;
}

.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
	color: #111827;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.menu-toggle:hover {
	background: #f8fafc;
	border-color: #cbd5e1;
}

.menu-toggle__icon {
	position: relative;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}

.menu-toggle__icon::before,
.menu-toggle__icon::after {
	content: '';
	position: absolute;
	left: 0;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.2s ease, top 0.2s ease;
}

.menu-toggle__icon::before {
	top: -6px;
}

.menu-toggle__icon::after {
	top: 6px;
}

body.sidebar-open .menu-toggle__icon {
	background: transparent;
}

body.sidebar-open .menu-toggle__icon::before {
	top: 0;
	transform: rotate(45deg);
}

body.sidebar-open .menu-toggle__icon::after {
	top: 0;
	transform: rotate(-45deg);
}

.sidebar {
	width: var(--sidebar-width);
	min-width: var(--sidebar-width);
	background: var(--sidebar-bg);
	color: #fff;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	position: sticky;
	top: 0;
	align-self: flex-start;
	z-index: 1050;
	flex-shrink: 0;
}

.sidebar-brand {
	font-weight: 700;
	font-size: 1.05rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.sidebar-brand__logo {
	height: 38px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	display: block;
}

.sidebar-menu {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 0.65rem 0.75rem;
	flex: 1 1 auto;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.portal-body {
	min-height: 100vh;
}

.sidebar-fold {
	margin-top: 0.5rem;
	padding-top: 0.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-fold {
	display: block;
}

.sidebar-fold-summary {
	display: block;
	margin: 0;
	padding: 0.35rem 0.85rem 0.3rem;
	list-style: none;
	cursor: pointer;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	color: rgba(255, 255, 255, 0.5);
	background: transparent;
	border: none;
	font: inherit;
	transition: color 0.15s ease;
}

.sidebar-fold-summary::-webkit-details-marker {
	display: none;
}

.sidebar-fold-summary::marker {
	content: '';
}

.sidebar-fold-summary:hover {
	color: rgba(255, 255, 255, 0.82);
}

.sidebar-fold-label {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.2;
}

.sidebar-fold-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 0.15rem 0 0.1rem;
}

.sidebar-section-label {
	margin: 0 0 0.35rem 0.85rem;
	padding: 0;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
	line-height: 1.3;
}

.sidebar-section-items {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.sidebar-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 0.65rem 0.85rem;
	border-radius: 0;
	border: none;
	background: transparent;
	color: rgba(255, 255, 255, 0.82);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.9rem;
	line-height: 1.2;
	transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-btn i {
	font-size: 1rem;
	width: 1.2rem;
	text-align: center;
	flex-shrink: 0;
}

.sidebar-btn:hover {
	background: var(--sidebar-hover);
	color: #fff;
}

.sidebar-btn.active {
	background: var(--sidebar-active);
	color: #fff;
}

.sidebar-footer {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	flex-shrink: 0;
	margin-top: auto;
}

.dashboard-main {
	flex: 1 1 auto;
	min-width: 0;
}

.dashboard-topbar {
	background: #fff;
	border-bottom: 1px solid #e5e7eb;
	min-height: var(--topbar-height);
}

.topbar-title-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.topbar-title-wrap h1 {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dashboard-content {
	max-width: 1200px;
}

.role-badge {
	background: #059669 !important;
	font-size: 0.8rem;
	font-weight: 600;
	padding: 0.45em 0.75em;
}

/* Abonnement / pricing */
.pricing-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
	align-items: stretch;
}

.pricing-card {
	position: relative;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-card--featured {
	border: 2px solid #0d6efd !important;
	transform: translateY(-4px);
}

.pricing-card--current {
	box-shadow: inset 0 0 0 2px #198754;
}

.pricing-card__badge {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #0d6efd;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	white-space: nowrap;
}

.pricing-card__name {
	font-size: 1.15rem;
	font-weight: 700;
}

.pricing-card__amount {
	font-size: 2rem;
	font-weight: 800;
	line-height: 1;
}

.pricing-card__period {
	color: #6b7280;
	font-size: 0.9rem;
}

.pricing-card__limits li {
	margin-bottom: 0.35rem;
}

.pricing-feature--off {
	opacity: 0.45;
}

@media (max-width: 991.98px) {
	.pricing-grid {
		grid-template-columns: 1fr;
	}

	.pricing-card--featured {
		transform: none;
	}
}

pre {
	overflow-x: auto;
}

.table-responsive {
	-webkit-overflow-scrolling: touch;
}

/* Mobile & tablet */
@media (max-width: 991.98px) {
	.menu-toggle {
		display: inline-flex;
	}

	.sidebar-overlay {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(15, 23, 42, 0.55);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s ease, visibility 0.25s ease;
		z-index: 1040;
	}

	body.sidebar-open .sidebar-overlay {
		opacity: 1;
		visibility: visible;
	}

	.sidebar {
		position: fixed;
		top: 0;
		left: 0;
		height: 100vh;
		min-height: 100vh;
		transform: translateX(-100%);
		transition: transform 0.28s ease;
		box-shadow: 8px 0 32px rgba(0, 0, 0, 0.18);
	}

	body.sidebar-open .sidebar {
		transform: translateX(0);
	}

	.dashboard-topbar {
		position: sticky;
		top: 0;
		z-index: 1030;
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}

	.dashboard-content {
		padding: 1rem !important;
	}

	.sidebar-btn:hover {
		transform: none;
	}
}

@media (max-width: 575.98px) {
	.dashboard-topbar .h4 {
		font-size: 1.1rem;
	}

	.role-badge {
		font-size: 0.7rem;
	}
}

@media (min-width: 992px) {
	body.sidebar-open .sidebar {
		transform: none;
	}
}
