/* WordPress theme token integration */
[class*="rv-"] {
	--mhm-primary: var(--wp--preset--color--primary, #2271b1);
	--mhm-font-base: var(--wp--preset--font-size--normal, 1rem);
	--mhm-radius: var(--wp--preset--border-radius, 4px);
	--mhm-text: var(--wp--preset--color--foreground, #1d2327);
}

.rv-shortcode-wrapper,
[class*="rv-"] {
	white-space: normal;
}

/* Panel page container â€” match My Account width (1200px) for consistency */
body.rentiva-panel-page .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: 1200px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

body.rentiva-panel-page .entry-content > * {
	max-width: 1200px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

.mhm-rentiva-dashboard {
	display: flex;
	background: #f6f8fc;
	border: 1px solid #e4e8f2;
	border-radius: 14px;
	overflow: hidden;
	min-height: 100vh;
	width: 100%;
	max-width: 1200px;
	margin: 40px auto;
	padding: 0 0;
	box-sizing: border-box;
}

.mhm-rentiva-dashboard__sidebar {
	width: 260px;
	flex-shrink: 0;
	background: #ffffff;
	border-right: 1px solid #e4e8f2;
	display: flex;
	flex-direction: column;
	padding: 18px 14px;
}

.mhm-rentiva-dashboard__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
}

.mhm-rentiva-dashboard__brand-logo {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: #2f54ff;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
}

.mhm-rentiva-dashboard__brand-title {
	font-size: 15px;
	font-weight: 700;
	color: #1d2538;
}

.mhm-rentiva-dashboard__nav {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mhm-rentiva-dashboard__nav-item {
	display: block;
	padding: 11px 12px;
	border-radius: 10px;
	text-decoration: none;
	color: #3c4560;
	font-size: 14px;
	font-weight: 600;
	border: 1px solid transparent;
}

.mhm-rentiva-dashboard__nav-item:hover {
	background: #f1f4fb;
}

.mhm-rentiva-dashboard__nav-item.is-active {
	background: #e9edff;
	color: #263b9e;
	border-color: #d5dcff;
}

.mhm-rentiva-dashboard__user {
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid #edf1f8;
}

.mhm-rentiva-dashboard__user-card {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	background: linear-gradient(180deg, #f7f9ff 0%, #eef2ff 100%);
	border: 1px solid #e4e7ef;
	border-radius: 10px;
	margin-bottom: 10px;
}

.mhm-rentiva-dashboard__user-avatar {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
	background: #e9edff;
	box-shadow: 0 2px 6px rgba(79, 70, 229, 0.15);
	border: 2px solid #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mhm-rentiva-dashboard__user-avatar img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	border-radius: 50%;
}

.mhm-rentiva-dashboard__user-avatar-initials {
	color: var(--mhm-primary);
	font-size: 1rem;
	font-weight: 600;
}

.mhm-rentiva-dashboard__user-info {
	flex: 1;
	min-width: 0;
}

.mhm-rentiva-dashboard__user-name {
	font-size: 13px;
	font-weight: 700;
	color: #1f293d;
	margin: 0 0 2px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mhm-rentiva-dashboard__user-meta {
	font-size: 11px;
	font-weight: 500;
	color: #6b7490;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mhm-rentiva-dashboard__logout {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	color: #5c657f;
	text-decoration: none;
	padding: 8px 12px;
	border: 1px solid #e4e7ef;
	border-radius: 8px;
	background: #fff;
	text-align: center;
	width: 100%;
	box-sizing: border-box;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mhm-rentiva-dashboard__logout:hover {
	background: #fef2f2;
	border-color: #fecaca;
	color: #b91c1c;
}

.mhm-rentiva-dashboard__main {
	flex: 1;
	min-width: 0;
	background: #f9fbff;
}

.mhm-rentiva-dashboard__content {
	padding: 22px;
}

.mhm-rentiva-dashboard__header h2 {
	margin: 0 0 16px;
	font-size: 24px;
	line-height: 1.2;
	color: #11192b;
}

.mhm-rentiva-dashboard__kpis {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

.mhm-rentiva-dashboard__kpi-card {
	position: relative;
	padding: 18px 18px 20px;
	border-radius: 16px;
	border: 1px solid #e4e8f2;
	background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
	box-shadow: 0 6px 18px rgba(22, 34, 66, 0.05);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mhm-rentiva-dashboard__kpi-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(22, 34, 66, 0.08);
}

.mhm-rentiva-dashboard__kpi-card:nth-child(1) {
	border-left: 4px solid #2f54ff;
}

.mhm-rentiva-dashboard__kpi-card:nth-child(2) {
	border-left: 4px solid #8b5cf6;
}

.mhm-rentiva-dashboard__kpi-card:nth-child(3) {
	border-left: 4px solid #f59e0b;
}

.mhm-rentiva-dashboard__kpi-card:nth-child(4) {
	border-left: 4px solid #ef4444;
}

.mhm-rentiva-dashboard__kpi-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.mhm-rentiva-dashboard__kpi-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 8px;
	background: #eef2ff;
	color: #2f54ff;
	flex-shrink: 0;
}

.mhm-rentiva-dashboard__kpi-icon svg {
	width: 14px;
	height: 14px;
	display: block;
}

.mhm-rentiva-dashboard__kpi-card:nth-child(2) .mhm-rentiva-dashboard__kpi-icon {
	background: #f3e8ff;
	color: #8b5cf6;
}

.mhm-rentiva-dashboard__kpi-card:nth-child(3) .mhm-rentiva-dashboard__kpi-icon {
	background: #fff7ed;
	color: #f59e0b;
}

.mhm-rentiva-dashboard__kpi-card:nth-child(4) .mhm-rentiva-dashboard__kpi-icon {
	background: #fee2e2;
	color: #ef4444;
}

.mhm-rentiva-dashboard__kpi-label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #6b748f;
	margin-bottom: 0;
	text-transform: uppercase;
}

.mhm-rentiva-dashboard__kpi-value {
	font-size: 34px;
	line-height: 1;
	font-weight: 800;
	color: #101828;
}

.mhm-rentiva-dashboard__kpi-meta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 10px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
	margin-top: 10px;
	background: #eef2ff;
	color: #2f54ff;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.mhm-rentiva-dashboard__kpi-context {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	flex-wrap: wrap;
}

.mhm-rentiva-dashboard__kpi-context .mhm-rentiva-dashboard__kpi-meta {
	margin-top: 0;
}

.mhm-rentiva-dashboard__kpi-trend {
	font-size: 11px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.mhm-rentiva-dashboard__kpi-trend.is-up {
	color: #10b981;
}

.mhm-rentiva-dashboard__kpi-trend.is-down {
	color: #ef4444;
}

.mhm-rentiva-dashboard__kpi-trend.is-neutral {
	color: #64748b;
}

.mhm-rentiva-dashboard__kpi-trend.is-up::before {
	content: "\2191";
}

.mhm-rentiva-dashboard__kpi-trend.is-down::before {
	content: "\2193";
}

.mhm-rentiva-dashboard__kpi-card:nth-child(1) .mhm-rentiva-dashboard__kpi-meta {
	background: #eef2ff;
	color: #2f54ff;
}

.mhm-rentiva-dashboard__kpi-card:nth-child(2) .mhm-rentiva-dashboard__kpi-meta {
	background: #f3e8ff;
	color: #8b5cf6;
}

.mhm-rentiva-dashboard__kpi-card:nth-child(3) .mhm-rentiva-dashboard__kpi-meta {
	background: #fff7ed;
	color: #f59e0b;
}

.mhm-rentiva-dashboard__kpi-card:nth-child(4) .mhm-rentiva-dashboard__kpi-meta {
	background: #fee2e2;
	color: #ef4444;
}

.mhm-rentiva-dashboard__section {
	background: #ffffff;
	border: 1px solid #e4e8f2;
	border-radius: 12px;
}

.mhm-rentiva-dashboard__section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-bottom: 1px solid #edf1f8;
}

.mhm-rentiva-dashboard__section-head h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #1b2438;
}

.mhm-rentiva-dashboard__section-head a {
	font-size: 13px;
	font-weight: 600;
	color: #2f54ff;
	text-decoration: none;
}

.mhm-rentiva-dashboard__table-wrap {
	overflow-x: auto;
}

.mhm-rentiva-dashboard__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	color: #2f3952;
}

.mhm-rentiva-dashboard__table th,
.mhm-rentiva-dashboard__table td {
	padding: 11px 14px;
	border-bottom: 1px solid #edf1f8;
	text-align: left;
}

/* Recent Bookings â€” booking cell with service type icon */
.mhm-rentiva-dashboard__booking-cell {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #2f54ff;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.15s ease;
}

.mhm-rentiva-dashboard__booking-cell:hover {
	color: #1a40e8;
	text-decoration: underline;
}

/* Recent Bookings table â€” stack cards on narrow screens (theme-agnostic) */
@media (max-width: 640px) {
	.mhm-rentiva-dashboard__overview-bookings .mhm-rentiva-dashboard__table-wrap {
		overflow-x: visible;
	}
	.mhm-rentiva-dashboard__overview-bookings .mhm-rentiva-dashboard__table,
	.mhm-rentiva-dashboard__overview-bookings .mhm-rentiva-dashboard__table thead,
	.mhm-rentiva-dashboard__overview-bookings .mhm-rentiva-dashboard__table tbody,
	.mhm-rentiva-dashboard__overview-bookings .mhm-rentiva-dashboard__table tr,
	.mhm-rentiva-dashboard__overview-bookings .mhm-rentiva-dashboard__table td,
	.mhm-rentiva-dashboard__overview-bookings .mhm-rentiva-dashboard__table th {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}
	.mhm-rentiva-dashboard__overview-bookings .mhm-rentiva-dashboard__table thead {
		position: absolute;
		left: -9999px;
		top: -9999px;
	}
	.mhm-rentiva-dashboard__overview-bookings .mhm-rentiva-dashboard__table tr {
		border: 1px solid #edf1f8;
		border-radius: 10px;
		padding: 10px 12px;
		margin-bottom: 10px;
		background: #fff;
	}
	.mhm-rentiva-dashboard__overview-bookings .mhm-rentiva-dashboard__table td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 12px;
		padding: 6px 0;
		border-bottom: 1px dashed #edf1f8;
	}
	.mhm-rentiva-dashboard__overview-bookings .mhm-rentiva-dashboard__table td:last-child {
		border-bottom: none;
	}
	.mhm-rentiva-dashboard__overview-bookings .mhm-rentiva-dashboard__table td::before {
		content: attr(data-label);
		font-size: 11px;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.03em;
		color: #6d7895;
		flex-shrink: 0;
	}
}

.mhm-rentiva-dashboard__table th {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #6d7895;
}

/* ===============================
   STATUS BADGE SYSTEM
================================= */
.mhm-rentiva-dashboard__status {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 600;
	border-radius: 999px;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.mhm-rentiva-dashboard__status.is-completed {
	background: #ecfdf5;
	color: #10b981;
}

.mhm-rentiva-dashboard__status.is-confirmed {
	background: #eef2ff;
	color: #2f54ff;
}

.mhm-rentiva-dashboard__status.is-progress {
	background: #fff7ed;
	color: #f59e0b;
}

.mhm-rentiva-dashboard__status.is-pending {
	background: #fef9c3;
	color: #ca8a04;
}

.mhm-rentiva-dashboard__status.is-cancelled {
	background: #fef2f2;
	color: #ef4444;
}

.mhm-rentiva-dashboard__status.is-refunded {
	background: #f1f5f9;
	color: #64748b;
}

.mhm-rentiva-dashboard__tab-content {
	background: #ffffff;
	border: 1px solid #e4e8f2;
	border-radius: 12px;
	padding: 16px;
}

@media (max-width: 1024px) {
	.mhm-rentiva-dashboard {
		flex-direction: column;
	}

	.mhm-rentiva-dashboard__sidebar {
		border-right: 0;
		border-bottom: 1px solid #e4e8f2;
	}

	.mhm-rentiva-dashboard__kpis {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.mhm-rentiva-dashboard__content {
		padding: 14px;
	}

	.mhm-rentiva-dashboard__kpis {
		grid-template-columns: 1fr;
	}
}

/* ===============================
   MOBILE SPACING POLISH
================================= */
@media (max-width: 768px) {
	body.rentiva-panel-page .mhm-rentiva-dashboard__content {
		padding: 20px 16px 32px;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__sidebar {
		padding: 20px 16px;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__nav {
		margin-top: 16px;
		gap: 8px;
	}

	body.rentiva-panel-page h1,
	body.rentiva-panel-page .entry-title {
		font-size: 28px;
		margin-bottom: 24px;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__kpis {
		gap: 16px;
		margin-bottom: 24px;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__kpi-card {
		padding: 18px 16px;
		border-radius: 14px;
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__kpi-card:hover {
		transform: none;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__kpi-meta {
		font-size: 9px;
		padding: 4px 8px;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__section {
		padding: 18px 16px;
		border-radius: 16px;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__section-head {
		padding: 0 0 12px;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__table-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__sidebar {
		background: transparent;
		border: none;
		padding: 12px 16px 4px;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard {
		border-radius: 0;
		border: none;
		background: #f6f8fc;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__brand {
		margin-bottom: 12px;
	}
}

/* ===============================
   MOBILE TAB BAR MODE
================================= */
@media (max-width: 768px) {
	body.rentiva-panel-page .mhm-rentiva-dashboard {
		flex-direction: column;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__sidebar {
		width: 100%;
		background: transparent;
		border: none;
		padding: 0 16px;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__brand,
	body.rentiva-panel-page .mhm-rentiva-dashboard__user {
		display: none;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__nav {
		flex-direction: row;
		overflow-x: auto;
		gap: 8px;
		padding: 12px 0;
		margin-top: -8px;
		border-bottom: 1px solid #e4e8f2;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__nav::-webkit-scrollbar {
		display: none;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__nav-item {
		white-space: nowrap;
		padding: 10px 14px;
		border-radius: 999px;
		background: #eef2ff;
		font-size: 13px;
		flex-shrink: 0;
	}

	body.rentiva-panel-page .mhm-rentiva-dashboard__nav-item.is-active {
		background: #2f54ff;
		color: #ffffff;
		border-color: #2f54ff;
	}
}
