/* ===== Page header ===== */
.as-page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 22px;
	flex-wrap: wrap;
}

.as-page-header-text h1 {
	font-size: 20px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 2px;
}

.as-page-header-text p {
	font-size: 13px;
	color: #6b7280;
	margin: 0;
}

.as-btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 38px;
	padding: 0 18px;
	background: #1d4ed8;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s;
	font-family: inherit;
}

.as-btn-primary:hover { background: #1e40af; }
.as-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.as-btn-secondary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	color: #334155;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.as-btn-secondary:hover {
	background: #f8fafc;
	border-color: #94a3b8;
}

.as-page-header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

/* ===== Bookings list card ===== */
.as-list-wrap {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 16px;
}

.as-table-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border-bottom: 1px solid #f3f4f6;
	flex-wrap: wrap;
}

.as-table-count {
	font-size: 12.5px;
	color: #6b7280;
}

.as-table-scroll {
	overflow-x: auto;
}

/* ===== Bookings table ===== */
.as-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
	color: #374151;
}

.as-table thead tr {
	border-bottom: 1px solid #e5e7eb;
	background: #f9fafb;
}

.as-table th {
	font-size: 11px;
	font-weight: 600;
	color: #9ca3af;
	letter-spacing: 0.07em;
	padding: 10px 14px;
	text-align: left;
	white-space: nowrap;
	text-transform: uppercase;
}

.as-table td {
	padding: 12px 14px;
	border-bottom: 1px solid #f3f4f6;
	vertical-align: middle;
}

.as-table tbody tr:last-child td { border-bottom: none; }
.as-table tbody tr:hover td { background: #fafafa; }

/* Admin list pages: table on desktop, cards on mobile */
.as-list-cards-view,
.as-bookings-cards-view {
	display: none;
}

/* Shared mobile list cards (bookings, services, categories) */
.as-list-card {
	padding: 14px 16px;
	border-bottom: 1px solid #f3f4f6;
	background: #fff;
}

.as-list-card:last-child {
	border-bottom: none;
}

.as-list-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.as-list-card-title {
	font-size: 15px;
	font-weight: 600;
	color: #111827;
	line-height: 1.3;
	flex: 1;
	min-width: 0;
	word-break: break-word;
}

.as-list-card-head-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.as-list-card-media {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 10px;
}

.as-list-card-thumb {
	width: 52px;
	height: 52px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
	border: 1px solid #e5e7eb;
}

.as-list-card-thumb--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f3f4f6;
	color: #9ca3af;
}

.as-list-card-excerpt {
	margin: 0;
	font-size: 12.5px;
	color: #6b7280;
	line-height: 1.4;
	flex: 1;
	min-width: 0;
}

.as-list-card-meta {
	margin: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 12px;
}

.as-list-card-meta-row {
	margin: 0;
	min-width: 0;
}

.as-list-card-meta-row dt {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #9ca3af;
	margin: 0 0 2px;
}

.as-list-card-meta-row dd {
	margin: 0;
	font-size: 13px;
	color: #374151;
	font-weight: 500;
	word-break: break-word;
}

.as-list-card-meta-row--full,
.as-list-card-meta-row:first-child {
	grid-column: 1 / -1;
}

.as-list-card-meta-row--highlight dd,
.as-list-card-price {
	color: #1d4ed8;
	font-weight: 600;
}

/* Bookings cards (legacy class aliases) */
.as-bookings-cards-view {
	display: none;
}

.as-booking-card {
	padding: 14px 16px;
	border-bottom: 1px solid #f3f4f6;
	background: #fff;
}

.as-booking-card:last-child {
	border-bottom: none;
}

.as-booking-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.as-booking-card-id {
	font-size: 12px;
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
	font-weight: 600;
	color: #6b7280;
	flex-shrink: 0;
}

.as-booking-card-head-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	min-width: 0;
}

.as-booking-card-head-actions .as-status-select-wrap {
	flex: 1 1 auto;
	min-width: 0;
}

.as-booking-card-head-actions .as-status-select {
	width: 100%;
	max-width: 140px;
}

.as-booking-card-customer {
	margin-bottom: 12px;
}

.as-booking-card-customer .as-customer-name {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #111827;
	white-space: normal;
}

.as-booking-card-customer .as-customer-email,
.as-booking-card-phone {
	display: block;
	font-size: 12.5px;
	color: #6b7280;
	margin-top: 2px;
	word-break: break-word;
}

.as-booking-card-meta {
	margin: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 12px;
}

.as-booking-card-meta-row {
	margin: 0;
	min-width: 0;
}

.as-booking-card-meta-row dt {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #9ca3af;
	margin: 0 0 2px;
}

.as-booking-card-meta-row dd {
	margin: 0;
	font-size: 13px;
	color: #374151;
	font-weight: 500;
	word-break: break-word;
}

.as-booking-card-meta-row:first-child {
	grid-column: 1 / -1;
}

@media (max-width: 767px) {
	.as-list-table-view,
	.as-bookings-table-view {
		display: none !important;
	}

	.as-list-cards-view,
	.as-bookings-cards-view {
		display: block;
	}

	.as-admin-page .as-list-wrap .as-table-scroll,
	#as-bookings-wrap .as-table-scroll {
		overflow-x: visible;
	}

	.as-admin-page .as-list-wrap {
		overflow: hidden;
	}

	/* Shared page header + primary CTA */
	.as-admin-page .as-page-header--compact {
		flex-direction: column;
		align-items: stretch;
		margin-bottom: 12px;
		gap: 10px;
	}

	.as-admin-page .as-page-header-text p {
		display: none;
	}

	.as-admin-page .as-page-header-text h1 {
		font-size: 1.25rem;
		line-height: 1.2;
	}

	.as-admin-page .as-btn-primary {
		width: 100%;
		height: 40px;
		justify-content: center;
		font-size: 13px;
	}

	.as-admin-page .as-table-meta {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		padding: 10px 12px;
	}

	.as-admin-page .as-table-count {
		font-size: 13px;
		font-weight: 600;
		color: #374151;
	}

	.as-services-page .as-table-meta .rd-cat-select {
		width: 100%;
	}

	.as-services-page .as-table-meta .rd-cat-trigger {
		width: 100%;
		justify-content: space-between;
	}

	.as-admin-page .as-list-card {
		padding: 12px 14px;
	}

	.as-admin-page .as-list-card-meta {
		gap: 8px 10px;
	}
}

@media (min-width: 768px) {
	.as-bookings-cards-view {
		display: none !important;
	}
}

.as-th-actions,
.as-td-actions {
	width: 56px;
	text-align: center;
}

/* ===== Row action menu ===== */
.as-action-wrap {
	position: relative;
	display: inline-block;
}

.as-action-trigger {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 6px;
	border: 1px solid transparent;
	background: transparent;
	color: #6b7280;
	cursor: pointer;
	transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.as-action-trigger:hover,
.as-action-wrap:has(.as-action-menu.open) .as-action-trigger {
	background: #f3f4f6;
	border-color: #e5e7eb;
	color: #111827;
}

.as-action-menu {
	display: none;
	position: fixed;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
	min-width: 160px;
	z-index: 9999;
	overflow: hidden;
}

.as-action-menu.open { display: block; }

.as-action-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	font-size: 13.5px;
	color: #374151;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.1s;
}

.as-action-item:hover {
	background: #f3f4f6;
	color: #111827;
}

button.as-action-item {
	width: 100%;
	border: none;
	background: transparent;
	font: inherit;
	text-align: left;
}

/* ===== Table empty state ===== */
.as-table-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 56px 24px;
	gap: 12px;
	color: #9ca3af;
}

.as-table-empty p {
	font-size: 14px;
	margin: 0;
}

/* ===== Category picker — form-field variant of rd-cat-trigger ===== */

/*
 * Service drawer uses transform for slide-in. That makes position:fixed on the
 * dropdown use the drawer as its containing block while JS still positions with
 * viewport coordinates — the list falls outside the clipped drawer. Anchor here.
 */
#as-service-drawer .rd-cat-select:has(.rd-cat-dropdown.open),
#as-booking-drawer .rd-cat-select:has(.rd-cat-dropdown.open) {
	z-index: 30;
}

#as-service-drawer .rd-cat-select .rd-cat-dropdown,
#as-booking-drawer .rd-cat-select .rd-cat-dropdown {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	width: auto !important;
	min-width: 100%;
	z-index: 1;
}

/* Make the trigger button fill its parent form field */
.as-cat-field-trigger {
	width: 100%;
	justify-content: space-between;
	border-radius: 8px;
	font-size: 14px;
	padding: 9px 12px;
	border-color: #e5e7eb;
}
.as-cat-field-trigger .rd-cat-trigger-label {
	max-width: none;
	flex: 1;
	text-align: left;
}

/* Table meta row: align count + filter horizontally */
.rd-table-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

/* Ensure filter cat-select inside table-meta doesn't push things down */
.rd-table-meta .rd-cat-select {
	margin-left: auto;
}

/* ===== Shared action item danger variant ===== */
.as-action-danger {
	color: #dc2626;
}
.as-action-danger:hover {
	background: #fef2f2;
	color: #b91c1c;
}

/* ===== Booking stats chips (default; bookings page overrides below) ===== */
.as-booking-stats {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.as-stat-chip {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 12px 20px;
	min-width: 80px;
}

.as-stat-chip-value {
	font-size: 24px;
	font-weight: 700;
	color: #111827;
	line-height: 1;
}

.as-stat-chip-label {
	font-size: 11.5px;
	color: #6b7280;
	font-weight: 500;
}

.as-stat-chip--yellow { border-color: #fde68a; background: #fefce8; }
.as-stat-chip--yellow .as-stat-chip-value { color: #92400e; }

.as-stat-chip--green { border-color: #bbf7d0; background: #f0fdf4; }
.as-stat-chip--green .as-stat-chip-value { color: #15803d; }

.as-stat-chip--gray { border-color: #e5e7eb; background: #f9fafb; }
.as-stat-chip--gray .as-stat-chip-value { color: #374151; }

.as-stat-chip--red { border-color: #fecaca; background: #fef2f2; }
.as-stat-chip--red .as-stat-chip-value { color: #b91c1c; }

/* ===== Bookings page — compact toolbar ===== */
.as-bookings-page .as-page-header--compact {
	margin-bottom: 12px;
}

.as-bookings-page .as-booking-stats {
	display: flex;
	gap: 6px;
	margin-bottom: 10px;
}

.as-bookings-page .as-stat-chip {
	flex: 1 1 0;
	min-width: 0;
	flex-direction: row;
	align-items: baseline;
	justify-content: center;
	gap: 5px;
	padding: 7px 8px;
	border-radius: 8px;
}

.as-bookings-page .as-stat-chip-value {
	font-size: 16px;
	font-weight: 700;
}

.as-bookings-page .as-stat-chip-label {
	font-size: 11px;
	white-space: nowrap;
}

/* Filters wrapper */
.as-bookings-filters-wrap {
	margin-bottom: 10px;
}

.as-bookings-filters-toggle {
	display: none;
}

.as-bookings-filter-panel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	padding: 8px 10px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}

.as-filter-section-label {
	display: none;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #9ca3af;
	margin: 0 0 4px;
}

.as-scroll-row {
	min-width: 0;
}

.as-scroll-row__track {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.as-filters-active-badge {
	font-size: 10px;
	font-weight: 600;
	color: #1d4ed8;
	background: #dbeafe;
	padding: 2px 7px;
	border-radius: 999px;
	margin-left: auto;
}

.as-bookings-filters-chevron {
	width: 8px;
	height: 8px;
	border-right: 2px solid #6b7280;
	border-bottom: 2px solid #6b7280;
	transform: rotate(45deg);
	margin-left: 6px;
	transition: transform 0.2s;
	flex-shrink: 0;
}

.as-bookings-filters-toggle[aria-expanded="true"] .as-bookings-filters-chevron {
	transform: rotate(-135deg);
	margin-top: 4px;
}

.as-booking-date-clear {
	appearance: none;
	-webkit-appearance: none;
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 500;
	color: #6b7280;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	cursor: pointer;
	padding: 5px 10px;
	min-height: 30px;
	transition: background 0.12s, color 0.12s;
}

.as-booking-date-clear:hover {
	background: #f3f4f6;
	color: #111827;
}

.as-bookings-page .as-bookings-filter-panel__status {
	flex: 0 1 auto;
	min-width: 0;
}

.as-bookings-page .as-bookings-filter-panel__dates {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	flex: 1 1 280px;
	min-width: 0;
	margin-left: auto;
}

.as-bookings-page .as-bookings-filter-panel .as-tab-bar {
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	border-radius: 0;
	gap: 2px;
}

.as-bookings-page .as-bookings-filter-panel .as-tab {
	padding: 5px 9px;
	font-size: 12px;
	border-radius: 6px;
}

.as-bookings-page .as-booking-date-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	min-width: 0;
}

/* Date preset pills — full reset (isolated UI has no theme button styles) */
.as-date-preset-btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 5px 10px;
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 500;
	line-height: 1.3;
	color: #4b5563;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.as-date-preset-btn:hover {
	background: #f3f4f6;
	border-color: #d1d5db;
	color: #111827;
}

.as-date-preset-btn.active {
	background: #eff6ff;
	border-color: #93c5fd;
	color: #1d4ed8;
}

.as-date-preset-btn:focus {
	outline: none;
}

.as-date-preset-btn:focus-visible {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #93c5fd;
}

.as-bookings-page .as-booking-date-range {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 6px;
}

.as-bookings-page .as-booking-date-field {
	flex: 0 0 auto;
	gap: 2px;
}

.as-bookings-page .as-booking-date-label {
	font-size: 10px;
	letter-spacing: 0.04em;
}

.as-bookings-page .as-booking-date-input {
	width: 128px;
	padding: 5px 8px;
	font-size: 12px;
	min-height: 30px;
}

.as-bookings-page .as-list-wrap {
	margin-bottom: 12px;
}

.as-bookings-page .as-table-meta {
	padding: 8px 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.as-bookings-page .as-table-count {
	font-size: 12px;
	flex: 1 1 auto;
	min-width: 0;
}

.as-bookings-page #as-bookings-pagination {
	padding: 10px 16px 12px;
	border-top: 1px solid #f3f4f6;
}

.as-bookings-page .as-bookings-pagination .rd-page-num.current {
	background: var(--rd-accent, #881337);
	color: #fff;
	border-color: var(--rd-accent, #881337);
}

.as-bookings-view-toggle {
	display: inline-flex;
	padding: 3px;
	background: #f3f4f6;
	border-radius: 8px;
	gap: 2px;
	flex-shrink: 0;
}

.as-view-toggle-btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin: 0;
	padding: 5px 11px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 500;
	color: #6b7280;
	background: transparent;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}

.as-view-toggle-btn:hover {
	color: #374151;
	background: rgba(255, 255, 255, 0.6);
}

.as-view-toggle-btn.active {
	background: #fff;
	color: #1d4ed8;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.as-view-toggle-btn .rd-md-icon {
	opacity: 0.85;
}

.as-bookings-view-panel[hidden] {
	display: none !important;
}

@media (min-width: 768px) {
	.as-bookings-page .as-bookings-filter-panel__dates {
		padding-left: 12px;
		border-left: 1px solid #f0f0f0;
	}
}

@media (max-width: 767px) {
	/* Stats: 3+2 grid — no horizontal scroll */
	.as-bookings-page .as-booking-stats {
		display: grid;
		grid-template-columns: repeat(6, 1fr);
		gap: 6px;
		overflow: visible;
		padding-bottom: 0;
	}

	.as-bookings-page .as-stat-chip {
		grid-column: span 2;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		padding: 8px 4px;
		min-width: 0;
	}

	.as-bookings-page .as-stat-chip-value {
		font-size: 1.125rem;
	}

	.as-bookings-page .as-stat-chip-label {
		font-size: 10px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 100%;
	}

	/* Collapsible filters */
	.as-bookings-filters-toggle {
		display: flex;
		align-items: center;
		gap: 8px;
		width: 100%;
		margin: 0;
		padding: 10px 12px;
		font-family: inherit;
		font-size: 13px;
		font-weight: 600;
		color: #374151;
		background: #fff;
		border: 1px solid #e5e7eb;
		border-radius: 8px;
		cursor: pointer;
		text-align: left;
		-webkit-tap-highlight-color: transparent;
	}

	.as-bookings-filters-toggle .rd-md-icon {
		color: #6b7280;
		flex-shrink: 0;
	}

	.as-bookings-filters-toggle-text {
		flex: 1;
		min-width: 0;
	}

	.as-bookings-filter-panel {
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		margin-top: 8px;
		padding: 12px;
		border-radius: 8px;
	}

	.as-bookings-filter-panel.is-open {
		display: flex;
	}

	.as-filter-section-label {
		display: block;
	}

	.as-bookings-page .as-bookings-filter-panel__status,
	.as-bookings-page .as-bookings-filter-panel__dates {
		flex: none;
		width: 100%;
		margin-left: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 6px;
	}

	/* Horizontal scroll rows with snap */
	.as-scroll-row {
		position: relative;
		margin: 0 -4px;
	}

	.as-scroll-row::after {
		content: '';
		position: absolute;
		top: 0;
		right: 0;
		bottom: 6px;
		width: 20px;
		background: linear-gradient(to left, #fff, transparent);
		pointer-events: none;
	}

	.as-scroll-row__track {
		flex-wrap: nowrap;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding: 2px 4px 6px;
		gap: 6px;
	}

	.as-scroll-row__track::-webkit-scrollbar {
		display: none;
	}

	.as-scroll-row__track > .as-tab,
	.as-scroll-row__track > .as-date-preset-btn {
		scroll-snap-align: start;
		flex-shrink: 0;
	}

	.as-bookings-page .as-bookings-filter-panel .as-tab {
		padding: 8px 14px;
		font-size: 12.5px;
	}

	.as-date-preset-btn {
		padding: 8px 12px;
		font-size: 12px;
	}

	.as-bookings-page .as-booking-date-range {
		display: flex;
		flex-direction: column;
		gap: 8px;
	}

	.as-bookings-page .as-booking-date-field {
		width: 100%;
	}

	.as-bookings-page .as-booking-date-input {
		width: 100%;
		min-height: 40px;
		font-size: 16px; /* prevents iOS zoom on focus */
	}

	.as-booking-date-clear {
		width: 100%;
		min-height: 36px;
		background: transparent;
		border: none;
		color: #1d4ed8;
		text-decoration: underline;
		text-underline-offset: 2px;
	}

	.as-booking-date-clear:hover {
		background: transparent;
		color: #1e40af;
	}

	/* List header */
	.as-bookings-page .as-table-meta {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		padding: 10px 12px;
	}

	.as-bookings-page .as-table-count {
		font-size: 13px;
		font-weight: 600;
		color: #374151;
	}

	.as-bookings-view-toggle {
		width: 100%;
		padding: 4px;
	}

	.as-view-toggle-btn {
		flex: 1;
		justify-content: center;
		padding: 8px 10px;
		font-size: 12.5px;
	}

	.as-bookings-page .as-list-wrap {
		border-radius: 8px;
	}

	/* Booking cards */
	.as-bookings-page .as-booking-card {
		padding: 12px 14px;
	}

	.as-bookings-page .as-booking-card-head {
		margin-bottom: 8px;
		gap: 8px;
	}

	.as-bookings-page .as-booking-card-head-actions {
		flex-wrap: nowrap;
	}

	.as-bookings-page .as-booking-card-head-actions .as-status-select {
		max-width: 118px;
		font-size: 12px;
	}

	.as-bookings-page .as-booking-card-customer {
		margin-bottom: 10px;
	}

	.as-bookings-page .as-booking-card-customer .as-customer-name {
		font-size: 15px;
	}

	.as-bookings-page .as-booking-card-meta {
		grid-template-columns: 1fr 1fr;
		gap: 8px 12px;
	}

	.as-bookings-page .as-booking-card-meta-row:first-child {
		grid-column: 1 / -1;
	}
}

@media (min-width: 768px) {
	.as-bookings-filter-panel {
		display: flex !important;
	}

	.as-filter-section-label {
		display: none !important;
	}
}

/* ===== Status filter tab bar ===== */
.as-tab-bar {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	margin-bottom: 14px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 6px 8px;
}

.as-tab {
	padding: 6px 14px;
	border-radius: 7px;
	border: none;
	background: none;
	font-size: 13px;
	font-weight: 500;
	color: #6b7280;
	cursor: pointer;
	transition: background 0.12s, color 0.12s;
	white-space: nowrap;
}

.as-tab:hover {
	background: #f3f4f6;
	color: #111827;
}

.as-tab.active {
	background: #dbeafe;
	color: #1d4ed8;
}

/* ===== Booking table cells ===== */
.as-booking-id {
	font-size: 12px;
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
	color: #9ca3af;
	white-space: nowrap;
}

.as-customer-cell {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 160px;
}

.as-customer-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #dbeafe;
	color: #1d4ed8;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	letter-spacing: 0.03em;
}

.as-customer-name {
	display: block;
	font-size: 13.5px;
	font-weight: 500;
	color: #111827;
	white-space: nowrap;
}

.as-customer-email {
	display: block;
	font-size: 12px;
	color: #9ca3af;
	white-space: nowrap;
}

.as-order-link {
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
	font-size: 12.5px;
	color: #2563eb;
	text-decoration: none;
	font-weight: 500;
}
.as-order-link:hover { text-decoration: underline; }
.as-muted { color: #9ca3af; }

/* ===== Status select in table ===== */
.as-status-select-wrap {
	position: relative;
}

.as-status-select {
	appearance: none;
	-webkit-appearance: none;
	border: 1px solid #e5e7eb;
	border-radius: 20px;
	padding: 4px 24px 4px 10px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	outline: none;
	background: #f9fafb url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 8 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%236b7280' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 8px center;
	transition: border-color 0.12s;
	color: #374151;
}

.as-status-select:focus {
	border-color: #2563eb;
}

.as-status-select[data-status="pending"]   { background-color: #fefce8; border-color: #fde68a; color: #92400e; }
.as-status-select[data-status="confirmed"] { background-color: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.as-status-select[data-status="completed"] { background-color: #f9fafb; border-color: #e5e7eb; color: #374151; }
.as-status-select[data-status="cancelled"] { background-color: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* ===== Drawer ===== */
.as-drawer-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.25);
	z-index: 200;
	backdrop-filter: blur(1px);
}

.as-drawer-overlay.open {
	display: block;
}

.as-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 500px;
	max-width: 100vw;
	background: #fff;
	border-left: 1px solid #e5e7eb;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
	z-index: 201;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.as-drawer.open {
	transform: translateX(0);
}

.as-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	border-bottom: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.as-drawer-header h3 {
	font-size: 16px;
	font-weight: 600;
	color: #111827;
}

.as-drawer-close {
	background: none;
	border: none;
	width: 30px;
	height: 30px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6b7280;
	cursor: pointer;
	transition: background 0.1s, color 0.1s;
}

.as-drawer-close:hover {
	background: #f3f4f6;
	color: #111827;
}

.as-drawer-body {
	flex: 1;
	overflow-y: auto;
	padding: 0;
	scrollbar-width: thin;
	scrollbar-color: #e5e7eb transparent;
}

.as-drawer-body::-webkit-scrollbar { width: 4px; }
.as-drawer-body::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }

.as-drawer-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding: 14px 22px;
	border-top: 1px solid #e5e7eb;
	flex-shrink: 0;
	background: #fff;
}

/* Booking drawer — form padding via sections */
#as-booking-drawer .as-drawer-body .as-form-section {
	padding: 20px 22px;
}

#as-booking-drawer .as-form-section--error {
	padding-top: 0;
	border-bottom: none;
}

/* Customer source toggle */
.as-b-customer-mode {
	display: flex;
	gap: 6px;
	margin-bottom: 14px;
	padding: 3px;
	background: #f3f4f6;
	border-radius: 8px;
}

.as-b-mode-btn {
	flex: 1;
	padding: 8px 10px;
	font-size: 12.5px;
	font-weight: 500;
	color: #6b7280;
	background: transparent;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}

.as-b-mode-btn:hover {
	color: #374151;
}

.as-b-mode-btn.active {
	background: #fff;
	color: #111827;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.as-b-option-meta {
	display: block;
	font-size: 11px;
	color: #9ca3af;
	font-weight: 400;
	margin-top: 1px;
}

.as-b-picker-empty {
	padding: 12px 14px;
	font-size: 13px;
	color: #9ca3af;
	margin: 0;
}

#as-b-customer-fields.as-b-fields--readonly .as-input {
	background: #f9fafb;
	color: #374151;
	cursor: default;
}

/* Admin time slots (booking drawer) */
.as-b-slots-panel {
	margin-top: 4px;
}

.as-b-slots-hint {
	padding: 14px 16px;
	background: #f9fafb;
	border: 1px dashed #e5e7eb;
	border-radius: 8px;
	font-size: 13px;
	color: #6b7280;
}

.as-b-slots-hint p {
	margin: 0;
}

.as-b-slots-loading {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #6b7280;
	padding: 8px 0 12px;
}

.as-b-slots-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.as-b-slot {
	padding: 9px 6px;
	text-align: center;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	background: #fff;
	color: #374151;
	transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.as-b-slot:hover {
	border-color: #2563eb;
	background: #eff6ff;
	color: #1d4ed8;
}

.as-b-slot--selected {
	background: #2563eb !important;
	border-color: #2563eb !important;
	color: #fff !important;
}

.as-b-slots-empty {
	font-size: 13px;
	color: #9ca3af;
	text-align: center;
	padding: 12px 0 0;
	margin: 0;
}

/* ===== Form sections ===== */
.as-form-section {
	padding: 20px 22px;
	border-bottom: 1px solid #f3f4f6;
}

.as-form-section:last-of-type {
	border-bottom: none;
}

.as-form-section-title {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: #9ca3af;
	text-transform: uppercase;
	margin-bottom: 14px;
}

/* ===== Form elements ===== */
.as-field-group {
	margin-bottom: 14px;
}

.as-field-group:last-child {
	margin-bottom: 0;
}

.as-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.as-label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}

.as-required {
	color: #ef4444;
}

.as-input {
	width: 100%;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 8px 11px;
	font-size: 13.5px;
	color: #111827;
	background: #fff;
	outline: none;
	transition: border-color 0.12s, box-shadow 0.12s;
	box-sizing: border-box;
	font-family: inherit;
}

.as-input:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.as-textarea {
	width: 100%;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 8px 11px;
	font-size: 13.5px;
	color: #111827;
	background: #fff;
	outline: none;
	resize: vertical;
	min-height: 80px;
	transition: border-color 0.12s, box-shadow 0.12s;
	font-family: inherit;
	box-sizing: border-box;
	line-height: 1.5;
}

.as-textarea:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* Select wrapper for custom arrow */
.as-select-wrap {
	position: relative;
}

.as-select {
	appearance: none;
	-webkit-appearance: none;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 11px center;
	background-size: 10px 6px;
	padding-right: 30px;
	cursor: pointer;
}

.as-field-hint {
	display: block;
	font-size: 11.5px;
	color: #9ca3af;
	margin-top: 5px;
	line-height: 1.4;
}

.as-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	color: #374151;
	cursor: pointer;
}

.as-checkbox-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--rd-accent, #8b5e3c);
}

.as-group-fields[hidden] {
	display: none !important;
}

.as-form-error {
	display: none;
	font-size: 13px;
	color: #dc2626;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	padding: 9px 13px;
	margin-top: 12px;
}

.as-form-error.visible {
	display: block;
}

/* ===== Drag-and-drop zone ===== */
.as-dropzone {
	border: 2px dashed #d1d5db;
	border-radius: 10px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	background: #fafafa;
	user-select: none;
	position: relative;
	overflow: hidden;
}

.as-dropzone:hover,
.as-dropzone--active {
	border-color: #2563eb;
	background: #eff6ff;
}

.as-dropzone--active .as-dropzone-icon svg path {
	stroke: #2563eb;
}

.as-dropzone--active .as-dropzone-text,
.as-dropzone:hover .as-dropzone-text {
	color: #111827;
}

/* Gallery zone (compact) */
.as-dropzone--gallery {
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-align: left;
	flex-direction: column;
}

.as-dropzone--gallery .as-dropzone-icon {
	flex-shrink: 0;
	margin: 0;
}

.as-dropzone--gallery .as-dropzone-text,
.as-dropzone--gallery .as-dropzone-hint {
	margin: 0;
	text-align: left;
}

/* Drop zone content */
.as-dropzone-empty {
	padding: 28px 20px;
}

.as-dropzone-icon {
	margin-bottom: 10px;
	line-height: 0;
	display: flex;
	justify-content: center;
}

.as-dropzone-text {
	font-size: 13.5px;
	color: #374151;
	margin-bottom: 4px;
}

.as-browse-link {
	color: #2563eb;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
	font-weight: 500;
}

.as-browse-link:hover {
	color: #1d4ed8;
}

.as-dropzone-hint {
	font-size: 12px;
	color: #9ca3af;
}

/* Uploading state inside drop zone */
.as-dropzone-uploading {
	padding: 28px 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: #6b7280;
	font-size: 13px;
}

/* Image preview inside single drop zone */
.as-dropzone--single {
	padding: 0;
	min-height: 130px;
}

.as-dropzone-preview {
	position: relative;
	width: 100%;
}

.as-dropzone-preview img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block;
}

.as-dropzone-preview-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	opacity: 0;
	transition: opacity 0.15s;
}

.as-dropzone-preview:hover .as-dropzone-preview-overlay {
	opacity: 1;
}

.as-preview-btn {
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 7px;
	padding: 6px 16px;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	color: #111827;
	transition: background 0.1s;
}

.as-preview-btn:hover {
	background: #fff;
}

.as-preview-btn--danger {
	background: rgba(220, 38, 38, 0.85);
	color: #fff;
}

.as-preview-btn--danger:hover {
	background: rgba(185, 28, 28, 0.95);
}

/* ===== Gallery thumbnails ===== */
.as-gallery-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

.as-gallery-thumb {
	width: 64px;
	height: 64px;
	border-radius: 8px;
	overflow: hidden;
	position: relative;
	border: 1px solid #e5e7eb;
	background: #f3f4f6;
	flex-shrink: 0;
}

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

.as-gallery-remove {
	position: absolute;
	top: 3px;
	right: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.12s, background 0.12s;
}

.as-gallery-thumb:hover .as-gallery-remove {
	opacity: 1;
}

.as-gallery-remove:hover {
	background: rgba(185, 28, 28, 0.9);
}

/* Uploading thumbnail placeholder */
.as-gallery-thumb--uploading {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ===== Drawer action buttons ===== */
.as-btn-ghost {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 8px 18px;
	font-size: 13.5px;
	font-weight: 500;
	color: #374151;
	cursor: pointer;
	transition: background 0.12s, border-color 0.12s;
	font-family: inherit;
}

.as-btn-ghost:hover {
	background: #f3f4f6;
	border-color: #d1d5db;
}

.as-btn-submit {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #1d4ed8;
	border: none;
	border-radius: 8px;
	padding: 8px 22px;
	font-size: 13.5px;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
	transition: background 0.12s;
	font-family: inherit;
}

.as-btn-submit:hover {
	background: #1e40af;
}

.as-btn-submit:disabled {
	background: #93c5fd;
	cursor: not-allowed;
}

/* ===== Settings layout ===== */
.as-settings-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 20px;
}

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

.as-settings-panel .rd-panel-header h3 {
	display: flex;
	align-items: center;
	gap: 6px;
}

.as-settings-body {
	padding: 16px 20px 4px;
}

.as-settings-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	padding-bottom: 24px;
}

.as-settings-msg {
	font-size: 13px;
	font-weight: 500;
}

.as-settings-msg.success { color: #15803d; }
.as-settings-msg.error   { color: #dc2626; }

/* Weekly schedule (settings) */
.as-settings-panel--wide {
	grid-column: 1 / -1;
}

.as-wh-intro {
	font-size: 12px;
	color: #6b7280;
	margin: 0 0 10px;
	line-height: 1.4;
	max-width: 80ch;
}

.as-wh-week {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.as-wh-day {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 10px 12px;
	background: #fff;
}

.as-wh-day--off {
	opacity: 0.95;
	background: #fafafa;
	padding: 8px 12px;
}

.as-wh-day-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	gap: 8px;
	flex-wrap: wrap;
}

.as-wh-day--off .as-wh-day-head {
	margin-bottom: 0;
}

.as-wh-day-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-weight: 600;
	font-size: 13px;
	color: #111827;
	margin: 0;
}

.as-wh-day-toggle input {
	width: 15px;
	height: 15px;
	accent-color: #2563eb;
}

.as-wh-status {
	font-size: 10px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.as-wh-status--on {
	background: #dbeafe;
	color: #1e40af;
}

.as-wh-status--off {
	background: #f3f4f6;
	color: #6b7280;
}

.as-wh-day--off .as-wh-day-body {
	display: none;
}

.as-wh-day-body {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.as-wh-times {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 8px 12px;
	margin-bottom: 0;
}

.as-wh-time-field {
	min-width: 108px;
}

.as-label--compact {
	font-size: 10px;
	margin-bottom: 2px;
	display: block;
	color: #6b7280;
}

.as-wh-to {
	padding-bottom: 6px;
	font-size: 12px;
	color: #9ca3af;
}

.as-wh-breaks-section {
	border-top: 1px solid #e5e7eb;
	padding-top: 8px;
	margin-top: 8px;
}

.as-wh-breaks-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
	gap: 8px;
	flex-wrap: wrap;
}

.as-wh-breaks-title {
	font-size: 11px;
	font-weight: 600;
	color: #374151;
}

.as-wh-add-break {
	font-size: 11px;
	padding: 5px 10px;
	border-radius: 6px;
	border: 1px solid #1d4ed8;
	background: #2563eb;
	color: #fff;
	cursor: pointer;
	font-family: inherit;
	font-weight: 500;
}

.as-wh-add-break:hover {
	background: #1d4ed8;
	border-color: #1e3a8a;
}

.as-wh-break-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	padding: 6px 8px;
	background: #f9fafb;
	border-radius: 6px;
	margin-bottom: 6px;
}

.as-wh-break-row:last-child {
	margin-bottom: 0;
}

.as-wh-break-lbl {
	font-size: 11px;
	color: #6b7280;
}

.as-wh-break-row .as-input[type="time"] {
	min-width: 104px;
}

.as-wh-remove-break {
	font-size: 11px;
	margin-left: auto;
	padding: 3px 8px;
	border: none;
	background: transparent;
	color: #dc2626;
	cursor: pointer;
	text-decoration: underline;
	font-family: inherit;
}

.as-wh-remove-break:hover {
	color: #991b1b;
}

/* Wider screens: times + breaks share one row to reduce vertical scroll */
@media (min-width: 768px) {
	.as-wh-day:not(.as-wh-day--off) .as-wh-day-body {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: flex-start;
		column-gap: 20px;
		row-gap: 6px;
	}

	.as-wh-day:not(.as-wh-day--off) .as-wh-times {
		flex: 0 0 auto;
	}

	.as-wh-day:not(.as-wh-day--off) .as-wh-breaks-section {
		flex: 1 1 240px;
		min-width: 200px;
		border-top: none;
		border-left: 1px solid #e5e7eb;
		padding-top: 0;
		margin-top: 0;
		padding-left: 16px;
	}
}

/* ===== Spinners ===== */
@keyframes as-spin {
	to { transform: rotate(360deg); }
}

.as-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: as-spin 0.65s linear infinite;
	vertical-align: middle;
	flex-shrink: 0;
}

.as-spinner--dark {
	border-color: rgba(0, 0, 0, 0.1);
	border-top-color: #6b7280;
}

.as-spinner--sm {
	width: 20px;
	height: 20px;
	border-width: 2px;
	border-color: rgba(0, 0, 0, 0.1);
	border-top-color: #6b7280;
}

/* ===================================================================
   Settings page — tabs, email editor, reminders, preview modal
   =================================================================== */

/* Tabs */
.as-settings-tabs {
	margin-bottom: 18px;
}

.as-settings-tabs .as-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.as-tab-panel {
	display: block;
}

.as-tab-panel[hidden] {
	display: none;
}

/* Field row + color picker */
.as-input--color {
	max-width: 70px;
	padding: 4px;
	height: 36px;
	cursor: pointer;
}

/* Switch (iOS-style) */
.as-switch {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	flex-shrink: 0;
}

.as-switch input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}

.as-switch-track {
	position: relative;
	display: inline-block;
	width: 38px;
	height: 22px;
	background: #d1d5db;
	border-radius: 999px;
	transition: background 0.18s;
}

.as-switch-track::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	transition: transform 0.18s;
}

.as-switch input:checked + .as-switch-track {
	background: #2563eb;
}

.as-switch input:checked + .as-switch-track::after {
	transform: translateX(16px);
}

.as-switch--header {
	margin-left: auto;
}

/* Email global panel */
.as-email-panel {
	margin-bottom: 16px;
}

.as-email-toggle {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 12px 14px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafb;
	margin-bottom: 18px;
}

.as-toggle-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 13px;
	color: #374151;
	line-height: 1.45;
}

.as-toggle-text strong {
	color: #111827;
	font-size: 13.5px;
}

.as-toggle-text span {
	color: #6b7280;
	font-size: 12.5px;
}

.as-lead-fields {
	margin-top: 16px;
	padding-top: 20px;
	border-top: 1px solid #e5e7eb;
}

.as-lead-fields--disabled {
	opacity: 0.45;
	pointer-events: none;
}

.as-lead-block {
	margin-bottom: 18px;
}

.as-lead-block-title {
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 600;
	color: #111827;
}

.as-lead-block-desc {
	margin: 0 0 12px;
}

.as-lead-hours-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px 20px;
}

.as-lead-input-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.as-lead-input-wrap .as-input--sm {
	width: 88px;
	max-width: 88px;
}

.as-lead-input-suffix {
	font-size: 13px;
	font-weight: 600;
	color: #6b7280;
}

.as-lead-presets {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.as-lead-presets-label {
	font-size: 12px;
	color: #6b7280;
	margin-right: 4px;
}

.as-lead-preset {
	border: 1px solid #d1d5db;
	background: #fff;
	color: #374151;
	border-radius: 8px;
	padding: 7px 12px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.as-lead-preset:hover {
	border-color: #9ca3af;
	background: #f9fafb;
}

.as-lead-preset.is-active {
	border-color: var(--rd-site-accent, #2563eb);
	background: color-mix(in srgb, var(--rd-site-accent, #2563eb) 12%, #fff);
	color: #111827;
}

.as-lead-preset--day {
	min-width: 72px;
}

.as-lead-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 20px 0;
	color: #9ca3af;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.as-lead-divider::before,
.as-lead-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: #e5e7eb;
}

.as-lead-days-custom {
	max-width: 200px;
	margin-top: 12px;
}

.as-lead-preview {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 20px;
	padding: 14px 16px;
	border-radius: 10px;
	background: color-mix(in srgb, var(--rd-site-accent, #2563eb) 8%, #f0f4ff);
	border: 1px solid color-mix(in srgb, var(--rd-site-accent, #2563eb) 22%, #e5e7eb);
}

.as-lead-preview-icon {
	flex-shrink: 0;
	opacity: 0.85;
	margin-top: 1px;
}

.as-lead-preview-text {
	font-size: 13.5px;
	line-height: 1.5;
	color: #1f2937;
}

/* Nosacījumi tab — compact terms cards */
.as-terms-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.as-terms-card-head h3 {
	font-size: 14px;
}

.as-terms-card-body {
	padding-top: 12px !important;
	padding-bottom: 14px !important;
}

.as-terms-intro {
	margin: 0 0 12px;
	font-size: 12.5px;
	line-height: 1.45;
	color: #6b7280;
}

.as-terms-toggle {
	display: flex;
	align-items: center;
	gap: 12px;
}

.as-terms-toggle .as-toggle-text strong {
	font-size: 13.5px;
}

.as-terms-fields {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e5e7eb;
}

.as-terms-fields--disabled {
	opacity: 0.45;
	pointer-events: none;
}

.as-terms-rules {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.as-terms-rule-name {
	display: block;
	margin-bottom: 6px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #6b7280;
}

.as-terms-rule-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
}

.as-terms-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.as-terms-presets .as-terms-preset {
	padding: 5px 9px;
	font-size: 12px;
	border-radius: 7px;
	border: 1px solid #d1d5db;
	background: #fff;
	color: #374151;
	font-weight: 500;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.as-terms-presets .as-terms-preset:hover {
	border-color: #9ca3af;
	background: #f9fafb;
}

.as-terms-presets .as-terms-preset.is-active {
	border-color: var(--rd-site-accent, #2563eb);
	background: color-mix(in srgb, var(--rd-site-accent, #2563eb) 12%, #fff);
	color: #111827;
}

.as-terms-split {
	text-align: center;
	font-size: 10px;
	font-weight: 600;
	color: #9ca3af;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 2px 0;
}

.as-terms-preview {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 8px;
	background: color-mix(in srgb, var(--rd-site-accent, #2563eb) 7%, #f8fafc);
	border: 1px solid color-mix(in srgb, var(--rd-site-accent, #2563eb) 18%, #e5e7eb);
	font-size: 12.5px;
	line-height: 1.45;
	color: #374151;
}

.as-terms-preview-icon {
	flex-shrink: 0;
	opacity: 0.85;
	margin-top: 1px;
}

@media (max-width: 960px) {
	.as-terms-grid {
		grid-template-columns: 1fr;
	}
}

/* Placeholder chips */
.as-placeholder-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 8px;
}

.as-placeholder-chip {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding: 8px 10px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.12s, background 0.12s, transform 0.06s;
	text-align: left;
}

.as-placeholder-chip code {
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
	font-size: 12.5px;
	color: #2563eb;
	background: transparent;
	padding: 0;
}

.as-placeholder-chip span {
	font-size: 11.5px;
	color: #6b7280;
}

.as-placeholder-chip:hover {
	border-color: #c7d2fe;
	background: #f8faff;
}

.as-placeholder-chip:active {
	transform: scale(0.98);
}

.as-placeholder-chip--copied {
	border-color: #34d399;
	background: #ecfdf5;
}

.as-placeholder-chip--copied code {
	color: #047857;
}

/* Email template panel header */
.as-email-tpl-header {
	display: flex;
	align-items: center;
	gap: 14px;
}

.as-email-tpl-title {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.as-email-tpl-title h3 {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 6px;
}

.as-email-tpl-desc {
	font-size: 12px;
	color: #6b7280;
}

.as-email-tpl-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	padding-top: 8px;
	border-top: 1px dashed #e5e7eb;
	margin-top: 8px;
}

/* CTA settings group inside a template editor */
.as-cta-group {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 12px 14px;
	margin-top: 4px;
	margin-bottom: 14px;
}

.as-cta-group-title {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #6b7280;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-bottom: 10px;
}

.as-cta-group .as-field-hint {
	display: block;
	margin-top: 8px;
}

.as-cta-group code {
	background: #fff;
	border: 1px solid #e5e7eb;
	padding: 1px 5px;
	border-radius: 4px;
	font-size: 12px;
	color: #2563eb;
}

/* Reminders */
.as-reminders {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.as-reminder-row {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
}

.as-reminder-head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	background: #f9fafb;
	border-bottom: 1px solid #e5e7eb;
	flex-wrap: wrap;
}

.as-reminder-timing {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 220px;
}

.as-reminder-timing .as-input--sm {
	width: 80px;
}

.as-reminder-timing select.as-input {
	width: auto;
	min-width: 110px;
}

.as-reminder-suffix {
	font-size: 12.5px;
	color: #6b7280;
}

.as-reminder-actions {
	display: flex;
	gap: 4px;
	margin-left: auto;
}

.as-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 7px;
	background: #fff;
	border: 1px solid #e5e7eb;
	color: #6b7280;
	cursor: pointer;
	transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.as-icon-btn:hover {
	border-color: #c7d2fe;
	color: #2563eb;
	background: #f8faff;
}

.as-icon-btn.as-action-danger {
	color: #dc2626;
}

.as-icon-btn.as-action-danger:hover {
	border-color: #fca5a5;
	background: #fef2f2;
	color: #b91c1c;
}

.as-reminder-body {
	padding: 14px 16px 6px;
}

.as-reminders-footer {
	margin-top: 14px;
	display: flex;
	justify-content: flex-start;
}

/* Email preview modal */
.as-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

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

.as-modal--email {
	background: #fff;
	border-radius: 14px;
	width: 100%;
	max-width: 780px;
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.as-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	border-bottom: 1px solid #e5e7eb;
	background: #f9fafb;
}

.as-modal-header h3 {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #111827;
	display: flex;
	align-items: center;
	gap: 6px;
}

.as-modal-close {
	background: none;
	border: none;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	color: #6b7280;
	cursor: pointer;
}

.as-modal-close:hover {
	background: #e5e7eb;
	color: #111827;
}

.as-modal-body {
	padding: 14px 18px;
	overflow: auto;
}

.as-em-preview-subject {
	display: flex;
	gap: 6px;
	align-items: baseline;
	padding: 8px 12px;
	margin-bottom: 10px;
	background: #f3f4f6;
	border-radius: 8px;
	font-size: 13px;
}

.as-em-preview-label {
	color: #6b7280;
	font-weight: 500;
}

.as-em-preview-value {
	color: #111827;
	font-weight: 500;
}

.as-em-preview-frame {
	width: 100%;
	height: 70vh;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #f3f4f6;
}

@media (max-width: 640px) {
	.as-reminder-head {
		gap: 10px;
	}
	.as-reminder-timing {
		min-width: 100%;
		order: 2;
	}
	.as-reminder-actions {
		order: 1;
		margin-left: auto;
	}
}

/* Time block drawer — day schedule reference list */
.as-day-schedule-panel {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafb;
	padding: 10px 12px;
	max-height: 220px;
	overflow-y: auto;
}

.as-day-schedule-empty {
	margin: 0;
	font-size: 13px;
	color: #6b7280;
}

.as-day-schedule-loading {
	display: none;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #6b7280;
}

.as-day-schedule-loading.is-visible {
	display: flex;
}

.as-day-schedule-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.as-day-schedule-item {
	padding: 8px 10px;
	border-radius: 8px;
	background: #fff;
	border: 1px solid #e5e7eb;
	font-size: 13px;
}

.as-day-schedule-item-time {
	font-weight: 600;
	color: #111827;
}

.as-day-schedule-item-meta {
	color: #6b7280;
	margin-top: 2px;
}

.as-day-schedule-item--hold {
	border-style: dashed;
	background: #fffbeb;
}

.as-day-schedule-item-expires {
	margin-top: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #b45309;
}

.as-day-schedule-item--block {
	border-color: #cbd5e1;
	background: #f1f5f9;
}

.as-row--time-block td {
	background: #f8fafc;
}

.as-booking-card--time-block {
	border-color: #cbd5e1;
	background: #f8fafc;
}
