* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	--bg: #f4f6ff;
	--panel: #ffffff;
	--text: #1f2240;
	--muted: #7a7fa6;
	--primary: #5b4bff;
	--primary-weak: #e7e4ff;
	--mint: #e9fbf3;
	--mint-strong: #2cc98f;
	--peach: #fff0ea;
	--peach-strong: #ff7a59;
	--shadow: 0 18px 40px rgba(22, 23, 80, 0.08);
}

body {
	font-family: "Plus Jakarta Sans", sans-serif;
	color: var(--text);
	background: linear-gradient(120deg, #f3f6ff 0%, #f6f9ff 50%, #f7f4ff 100%);
	min-height: 100vh;
}

.app {
	display: grid;
	grid-template-columns: 265px 1fr;
	min-height: 100vh;
}

.sidebar {
	background: #ffffff;
	padding: 28px 22px;
	box-shadow: 10px 0 40px rgba(24, 24, 72, 0.06);
}

.brand {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 36px;
}

.brand-name {
	font-size: 20px;
	font-weight: 700;
}

.avatar {
	width: 43px;
	height: 43px;
}

.avatar.small {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid #f1f1ff;
}

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

.nav {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 14px;
	color: var(--muted);
	text-decoration: none;
	font-weight: 600;
	transition: all 0.2s ease;
}

.nav-item span {
	white-space: nowrap;
}

.nav-item i {
	font-size: 20px;
}

.nav-item:hover {
	background: #f5f6ff;
	color: var(--text);
}

.nav-item.active {
	background: var(--primary);
	color: #ffffff;
	box-shadow: 0 10px 20px rgba(91, 75, 255, 0.25);
}

.main {
	padding: 28px 40px 96px;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

#page-content {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.main-fill {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.refresh-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	border: 1px solid #e4e4e4;
	background: #f7f7f7;
	cursor: pointer;
	color: #666;
	font-size: 20px;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	flex-shrink: 0;
}

.refresh-btn:hover {
	background: #eef0ff;
	border-color: #c5c9f7;
	color: #4a4fc4;
}

.refresh-btn .ph {
	transition: transform 0.5s ease;
}

.refresh-btn.spinning .ph {
	animation: spin-once 0.6s ease;
}

@keyframes spin-once {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

.bottom-bar {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, #f0f2ff 60%, transparent);
	padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
	z-index: 10;
	justify-content: center;
}

.bottom-nav {
	display: grid;
	background: #ffffff;
	border-radius: 22px;
	padding: 10px 14px;
	box-shadow: 0 18px 40px rgba(22, 23, 80, 0.12);
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px;
	width: min(92vw, 420px);
	border: 1px solid #eef0ff;
}

.bottom-item {
	text-decoration: none;
	color: var(--muted);
	font-weight: 600;
	font-size: 11px;
	padding: 10px 8px;
	border-radius: 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	transition: all 0.2s ease;
}

.bottom-item i {
	font-size: 20px;
}

.bottom-item.active {
	color: #ffffff;
	background: var(--primary);
	box-shadow: 0 12px 20px rgba(91, 75, 255, 0.25);
}

.bottom-item:hover {
	color: var(--text);
	background: #f2f3ff;
}

.greeting {
	display: flex;
	align-items: center;
	gap: 14px;
}

.hello {
	font-size: 22px;
	font-weight: 700;
}

.subtitle {
	color: var(--muted);
	font-size: 14px;
	margin-top: 4px;
}

.stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-bottom: 26px;
}

.stat-card {
	background: var(--panel);
	border-radius: 20px;
	padding: 16px 18px;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 14px;
	box-shadow: var(--shadow);
}

.stat-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.stat-card.mint {
	background: var(--mint);
}

.stat-card.peach {
	background: var(--peach);
}

.icon-wrap {
	width: 52px;
	height: 52px;
	min-width: 52px;
	border-radius: 14px;
	display: grid;
	place-items: center;
	background: #ffffff;
	box-shadow: 0 10px 18px rgba(40, 40, 90, 0.08);
}

.icon-wrap i {
	font-size: 24px;
	color: var(--primary);
}

.stat-title {
	color: var(--muted);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
}

.stat-value {
	font-size: 26px;
	font-weight: 700;
	margin: 0;
	line-height: 1.1;
}

.stat-change {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
}

.stat-change.up {
	color: var(--mint-strong);
}

.stat-change.down {
	color: var(--peach-strong);
}

.card {
	background: var(--panel);
	border-radius: 22px;
	padding: 24px 28px 28px;
	box-shadow: var(--shadow);
	flex: 1;
}

.card h2 {
	font-size: 18px;
}

.muted {
	color: var(--mint-strong);
	font-weight: 600;
	font-size: 13px;
	margin-top: 6px;
}

.spinner-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 80px 0;
}

.spinner {
	width: 42px;
	height: 42px;
	border: 3px solid var(--primary-weak);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* ── Booking Cards ─────────────────────────────────────── */
.booking-list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	margin-top: 20px;
}

.booking-card {
	border: 1px solid #c7c7c7;
	border-radius: 14px;
	overflow: hidden;
	transition: box-shadow 0.2s;
}

.booking-card:hover {
	box-shadow: 0 4px 20px rgba(108, 93, 211, 0.08);
}

.booking-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: #fafafe;
	border-bottom: 1px solid #c7c7c7;
}

.booking-badges {
	display: flex;
	align-items: center;
	gap: 8px;
}

.booking-actions {
	display: flex;
	gap: 6px;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}

.badge-recurring {
	background: #ece9ff;
	color: var(--primary);
}

.badge-onetime {
	background: #fff4e0;
	color: #d97706;
}

.booking-card-body {
	padding: 14px 16px 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.booking-meta-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.booking-meta {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	min-width: 0;
}

.meta-icon {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: #f0f0f0;
	color: #999;
	font-size: 14px;
	display: grid;
	place-items: center;
	flex-shrink: 0;
	margin-top: 1px;
}

.meta-icon-danger {
	background: #fff0f0;
	color: #e04040;
}

.booking-meta-full {
	grid-column: 1 / -1;
}

.meta-label {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--muted);
}

.meta-value {
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.meta-value-wrap {
	white-space: normal;
	overflow: visible;
	text-overflow: unset;
	word-break: break-word;
}

.empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 56px 0;
	color: var(--muted);
	font-size: 14px;
}

.empty-state i {
	font-size: 36px;
	opacity: 0.4;
}

.pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}

.pill.active {
	background: #e6fbf1;
	color: var(--mint-strong);
	border: 1px solid #c7f0df;
}

.pill.inactive {
	background: #ffecec;
	color: #ff6b6b;
	border: 1px solid #ffd2d2;
}

.pill.pending {
	background: #fff8e6;
	color: #c87800;
	border: 1px solid #fde68a;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #d7f2e6;
	background: #e8fbf3;
	color: var(--mint-strong);
	border-radius: 8px;
	padding: 6px 10px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.btn.danger {
	background: #ffe9e9;
	color: #ff6b6b;
	border-color: #ffd6d6;
}

.icon-btn {
	width: 30px;
	height: 30px;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	display: inline-grid;
	place-items: center;
	font-size: 15px;
	transition: background 0.15s;
}

.icon-btn.edit {
	background: #ece9ff;
	color: var(--primary);
}

.icon-btn.edit:hover {
	background: #d6d0ff;
}

.icon-btn.delete {
	background: #fff0ea;
	color: #ff7a59;
}

.icon-btn.delete:hover {
	background: #ffd6c8;
}

@media (max-width: 1100px) {
	.app {
		grid-template-columns: 210px 1fr;
	}
}

@media (max-width: 1280px) {
	.booking-list {
		grid-template-columns: 1fr;
	}
}

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

	.sidebar {
		display: none;
	}

	.main {
		padding-bottom: 130px;
	}

	.bottom-bar {
		display: flex;
	}

	.stat-title {
		font-size: 9px;
	}

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

@media (max-width: 600px) {
	.stats {
		gap: 12px;
	}

	.main {
		padding: 18px 16px 110px;
	}

	.hello {
		font-size: 20px;
	}

	.subtitle {
		font-size: 13px;
	}

	.stat-card {
		padding: 18px;
	}

	.stat-value {
		font-size: 24px;
	}

	.card {
		padding: 20px 18px 24px;
	}

	.meta-value {
		font-size: 12px;
	}
}

/* ── Create Form ─────────────────────────────────────────── */
.form-card {
	max-width: none;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.form-card .form-error-banner {
	width: 100%;
	max-width: 640px;
}

.form-card form {
	max-width: 640px;
	width: 100%;
}

.btn-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--primary-weak);
	color: var(--primary);
	text-decoration: none;
	font-size: 18px;
	flex-shrink: 0;
	transition: background 0.2s;
}

.btn-back:hover {
	background: #d6d0ff;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 20px;
}

.form-label {
	font-size: 12px;
	font-weight: 700;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.form-hint {
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
}

.form-input {
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 14px;
	color: var(--text);
	background: #f7f8ff;
	border: 1.5px solid #e4e7f8;
	border-radius: 10px;
	padding: 10px 14px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	width: 100%;
	box-sizing: border-box;
}

.form-input:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(91, 75, 255, 0.12);
	background: #fff;
}

.form-multiselect {
	padding: 6px 8px;
	height: auto;
	min-height: 44px;
}

/* Custom multi-select dropdown */
.multi-drop {
	position: relative;
}

.multi-drop-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	cursor: pointer;
	text-align: left;
	background: #f7f8ff;
	border: 1.5px solid #e4e7f8;
}

.multi-drop-trigger:hover {
	border-color: var(--primary);
}

.multi-drop-trigger i {
	font-size: 14px;
	color: var(--muted);
	flex-shrink: 0;
	transition: transform 0.2s;
}

.multi-drop-trigger span {
	color: var(--muted);
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.multi-drop-trigger span:not(:empty) {
	color: var(--text);
}

.multi-drop-menu {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1.5px solid #e4e7f8;
	border-radius: 12px;
	box-shadow: 0 12px 30px rgba(22, 23, 80, 0.1);
	z-index: 100;
	overflow: hidden;
}

.multi-drop-menu.open {
	display: block;
}

.multi-drop-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 14px;
	font-size: 14px;
	font-weight: 500;
	color: var(--text);
	cursor: pointer;
	transition: background 0.15s;
}

.multi-drop-item:hover {
	background: #f5f6ff;
}

.multi-drop-item input[type="checkbox"] {
	display: none;
}

.check-box {
	width: 18px;
	height: 18px;
	min-width: 18px;
	border-radius: 5px;
	border: 1.5px solid #c8ccec;
	background: #fff;
	display: grid;
	place-items: center;
	transition: all 0.15s;
}

.multi-drop-item input:checked ~ .check-box {
	background: var(--primary);
	border-color: var(--primary);
}

.multi-drop-item input:checked ~ .check-box::after {
	content: '';
	display: block;
	width: 5px;
	height: 9px;
	border: 2px solid #fff;
	border-top: none;
	border-left: none;
	transform: rotate(45deg) translate(-1px, -1px);
}

/* Type toggle */
.type-toggle {
	display: flex;
	gap: 10px;
}

.type-opt {
	flex: 1;
	cursor: pointer;
}

.type-opt input[type="radio"] {
	display: none;
}

.type-opt span {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 10px;
	border: 1.5px solid #e4e7f8;
	background: #f7f8ff;
	font-size: 13px;
	font-weight: 600;
	color: var(--muted);
	transition: all 0.2s;
}

.type-opt input[type="radio"]:checked + span {
	border-color: var(--primary);
	background: var(--primary-weak);
	color: var(--primary);
}

/* Toggle switch */
.toggle-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
}

.toggle-wrap input[type="checkbox"] {
	display: none;
}

.toggle-track {
	width: 44px;
	height: 24px;
	background: #dde0f0;
	border-radius: 99px;
	position: relative;
	transition: background 0.2s;
	flex-shrink: 0;
}

.toggle-thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0,0,0,0.15);
	transition: transform 0.2s;
}

.toggle-wrap input:checked ~ .toggle-track {
	background: var(--primary);
}

.toggle-wrap input:checked ~ .toggle-track .toggle-thumb {
	transform: translateX(20px);
}

.toggle-label {
	font-size: 14px;
	font-weight: 600;
}

/* Form actions */
.form-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 8px;
	padding-top: 20px;
	border-top: 1px solid #eff1fb;
}

.btn-ghost {
	background: transparent;
	color: var(--muted);
	border: 1.5px solid #e4e7f8;
	text-decoration: none;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 20px;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-ghost:hover {
	background: #f5f6ff;
	color: var(--text);
}

.btn-primary {
	background: var(--primary);
	color: #fff;
	border: none;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 22px;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(91, 75, 255, 0.25);
	transition: all 0.2s;
}

.btn-primary:hover {
	background: #4a3ae0;
}

.btn-primary:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.form-error-banner {
	background: #fff0ea;
	border: 1px solid #ffd0bb;
	color: #cc4400;
	border-radius: 10px;
	padding: 12px 16px;
	font-size: 13px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
}

.input-error {
	border-color: #ff5c5c !important;
	background: #fff8f8 !important;
	box-shadow: 0 0 0 3px rgba(255, 92, 92, 0.12) !important;
}

.field-error {
	font-size: 11px;
	font-weight: 600;
	color: #e03f3f;
	margin-top: 4px;
	display: flex;
	align-items: center;
	gap: 4px;
}

.field-error::before {
	content: '\26A0';
	font-size: 11px;
}

@media (max-width: 600px) {
	.form-row {
		grid-template-columns: 1fr;
		gap: 0;
	}
}

