/* Staff portal shell: morphic wider layout distinct from compact booking bar */
.proappt-booking-form-wrap.proappt-staff-portal-wrap {
	max-width: min(1120px, 100%);
	margin-left: auto;
	margin-right: auto;
	padding: clamp(20px, 4vw, 36px);
	background: linear-gradient(160deg, color-mix(in srgb, var(--proappt-primary, #0f766e) 8%, var(--proappt-surface, #f8fafc)) 0%, var(--proappt-surface, #f1f5f9) 38%, color-mix(in srgb, var(--proappt-surface, #ffffff) 88%, var(--proappt-primary, #0f766e)) 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.65),
		0 22px 50px rgba(15, 23, 42, 0.1),
		0 4px 14px rgba(15, 23, 42, 0.06);
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e5e7eb) 92%, transparent);
	position: relative;
}

.proappt-staff-portal-wrap {
	max-width: min(1120px, 100%);
}

#proappt-staff-auth-wrap {
	display: grid;
	gap: 12px;
	justify-items: center;
	align-items: center;
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	padding: 6px 0 2px;
	text-align: center;
}

#proappt-staff-auth-wrap .proappt-staff-portal-intro {
	margin: 0 auto !important;
	max-width: 60ch;
	width: auto !important;
	float: none !important;
	position: static !important;
	left: auto !important;
	right: auto !important;
	transform: none !important;
	text-indent: 0 !important;
	line-height: 1.55;
	color: var(--proappt-text, #0f172a);
	text-align: center !important;
	word-break: normal;
	overflow-wrap: anywhere;
}

#proappt-staff-auth-wrap #proappt-open-staff-login {
	min-width: min(320px, 100%);
}

.proappt-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.proappt-staff-app-shell {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.proappt-staff-app-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 12;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-bottom: 4px;
}

.proappt-staff-app-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.proappt-staff-app-welcome {
	margin: 0;
	font-size: 0.9rem;
	color: var(--proappt-text-muted, #64748b);
	font-weight: 600;
}

.proappt-btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	min-height: 42px;
	font-weight: 700;
	cursor: pointer;
	border-radius: var(--proappt-btn-radius, 12px);
	font-family: inherit;
	font-size: 0.9rem;
	color: var(--proappt-text, #0f172a);
	background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--proappt-border, #e2e8f0) 40%, #fff) 100%);
	border: 1px solid color-mix(in srgb, var(--proappt-border, #cbd5e1) 90%, #000);
	box-shadow:
		inset 0 2px 0 rgba(255, 255, 255, 0.86),
		0 6px 0 color-mix(in srgb, var(--proappt-border, #cbd5e1) 55%, transparent),
		0 10px 20px rgba(15, 23, 42, 0.08);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.proappt-btn-secondary:hover {
	transform: translateY(-1px);
	box-shadow:
		inset 0 2px 0 rgba(255, 255, 255, 0.9),
		0 7px 0 color-mix(in srgb, var(--proappt-border, #cbd5e1) 65%, transparent),
		0 14px 28px rgba(15, 23, 42, 0.1);
}

.proappt-btn-secondary:active {
	transform: translateY(2px);
	box-shadow:
		inset 0 2px 4px rgba(0, 0, 0, 0.05),
		0 2px 0 color-mix(in srgb, var(--proappt-border, #cbd5e1) 45%, transparent);
}

/* High-contrast primary actions that still honor configured theme color vars. */
.proappt-staff-portal-wrap .proappt-btn-primary {
	color: var(--proappt-btn-text, #ffffff) !important;
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--proappt-primary, #0f766e) 88%, #ffffff) 0%,
		color-mix(in srgb, var(--proappt-primary, #0f766e) 92%, #000000) 100%
	) !important;
	border: 1px solid color-mix(in srgb, var(--proappt-primary, #0f766e) 70%, #000000) !important;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.22),
		0 6px 14px color-mix(in srgb, var(--proappt-primary, #0f766e) 35%, transparent);
}

.proappt-staff-portal-wrap .proappt-btn-primary:hover {
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--proappt-primary, #0f766e) 78%, #ffffff) 0%,
		color-mix(in srgb, var(--proappt-primary, #0f766e) 86%, #000000) 100%
	) !important;
	border-color: color-mix(in srgb, var(--proappt-primary, #0f766e) 75%, #000000) !important;
}

.proappt-staff-portal-wrap .proappt-btn-primary:active {
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--proappt-primary, #0f766e) 84%, #000000) 0%,
		color-mix(in srgb, var(--proappt-primary, #0f766e) 92%, #000000) 100%
	) !important;
}

.proappt-staff-portal-wrap .proappt-btn-primary:focus-visible {
	outline: none;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.22),
		0 0 0 3px color-mix(in srgb, var(--proappt-primary, #0f766e) 28%, transparent),
		0 6px 14px color-mix(in srgb, var(--proappt-primary, #0f766e) 35%, transparent);
}

.proappt-staff-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px;
	background: color-mix(in srgb, var(--proappt-surface, #ffffff) 72%, transparent);
	border-radius: 14px;
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e2e8f0) 90%, transparent);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.82),
		0 10px 24px rgba(15, 23, 42, 0.07);
}

.proappt-staff-tab {
	position: relative;
	flex: 1 1 auto;
	min-width: 120px;
	padding: 12px 14px;
	font-weight: 800;
	font-size: 0.8rem;
	letter-spacing: 0.045em;
	text-transform: uppercase;
	font-family: inherit;
	cursor: pointer;
	color: var(--proappt-text-muted, #64748b);
	background: transparent;
	border: none;
	border-radius: 11px;
	box-shadow: inset 0 3px 6px rgba(15, 23, 42, 0.04);
	transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.proappt-staff-tab:hover {
	color: var(--proappt-text, #0f172a);
	background: rgba(255, 255, 255, 0.45);
}

.proappt-staff-tab.is-active {
	color: #0f172a !important;
	background: linear-gradient(165deg, #ffffff 0%, color-mix(in srgb, var(--proappt-primary, #0f766e) 18%, #ffffff) 52%, #ffffff 100%);
	box-shadow:
		inset 0 1px 1px rgba(255, 255, 255, 0.82),
		0 8px 20px color-mix(in srgb, var(--proappt-primary, #0f766e) 24%, transparent);
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.66);
}

.proappt-staff-global-message {
	margin-top: 0;
	border-radius: 12px;
}

.proappt-staff-tab-panel {
	display: block;
}

.proappt-staff-tab-panel[hidden] {
	display: none !important;
}

.proappt-staff-card {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, color-mix(in srgb, var(--proappt-surface, #fff) 97%, rgba(245, 250, 255, 0.8)) 100%);
	border-radius: 18px;
	padding: clamp(16px, 3vw, 24px);
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e2e8f0) 94%, transparent);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 1),
		0 14px 32px rgba(15, 23, 42, 0.08),
		0 2px 8px rgba(15, 23, 42, 0.04);
}

.proappt-staff-card-title {
	margin: 0 0 12px;
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--proappt-text, #0f172a);
	letter-spacing: -0.02em;
}

.proappt-staff-help {
	margin: 0 0 14px;
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--proappt-text-muted, #64748b);
}

.proappt-staff-subcard {
	margin-bottom: 18px;
	padding: 18px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.55);
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e2e8f0) 92%, transparent);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.92),
		0 10px 24px rgba(15, 23, 42, 0.05);
}

.proappt-staff-subcard:last-of-type {
	margin-bottom: 0;
}

.proappt-staff-profile-actions {
	margin: 20px 0 0;
}

.proappt-staff-filters-block,
.proappt-staff-appointments-section {
	margin-top: 22px;
}

.proappt-staff-kanban-section {
	margin-top: 22px;
}

.proappt-staff-kanban-board {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
}

.proappt-staff-kanban-col {
	background: rgba(255, 255, 255, 0.6);
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e2e8f0) 90%, transparent);
	border-radius: 14px;
	padding: 10px;
	min-height: 220px;
}

.proappt-staff-kanban-col-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	font-weight: 700;
}

.proappt-staff-kanban-cards {
	min-height: 150px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	border-radius: 10px;
	padding: 4px;
}

.proappt-staff-kanban-cards.is-over {
	background: rgba(59, 130, 246, 0.08);
	outline: 1px dashed rgba(37, 99, 235, 0.35);
}

.proappt-staff-kanban-card {
	background: #fff;
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e2e8f0) 88%, transparent);
	border-radius: 10px;
	padding: 10px;
	cursor: grab;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.proappt-staff-kanban-card.is-dragging {
	opacity: 0.6;
}

.proappt-staff-kanban-card h5 {
	margin: 0 0 4px;
	font-size: 0.9rem;
}

.proappt-staff-kanban-card p {
	margin: 0 0 4px;
	font-size: 0.82rem;
}

.proappt-staff-kanban-card small {
	color: var(--proappt-text-muted, #64748b);
}

.proappt-staff-kanban-actions {
	margin-top: 8px;
	display: flex;
	gap: 6px;
}

.proappt-staff-kanban-actions .proappt-btn {
	padding: 6px 8px;
	min-height: 30px;
	font-size: 0.75rem;
}

.proappt-staff-kanban-empty {
	font-size: 0.82rem;
	color: var(--proappt-text-muted, #64748b);
	padding: 6px 4px;
}

.proappt-staff-calendar-wrap {
	margin-top: 8px;
}

.proappt-staff-top-actions {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 8px;
}

.proappt-staff-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	align-items: flex-start;
	justify-content: center;
	padding: clamp(110px, 16vh, 220px) 12px 24px;
	overflow: auto;
}

.proappt-staff-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.proappt-staff-modal-content {
	position: relative;
	z-index: 2;
	max-width: 420px;
	margin: 0 auto;
	background: var(--proappt-surface, #ffffff);
	border-radius: 14px;
	padding: 18px;
	border: 1px solid var(--proappt-border, #d5dee5);
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2), 0 3px 10px rgba(0, 0, 0, 0.12);
	display: grid;
	gap: 10px;
	width: calc(100% - 24px);
}

#proappt-staff-login-message {
	margin-top: 2px;
}

.proappt-staff-modal-content label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-weight: 600;
	color: var(--proappt-text, #0f172a);
}

.proappt-staff-modal-close {
	position: absolute;
	top: 8px;
	right: 8px;
	border: 0;
	background: transparent;
	font-size: 24px;
	cursor: pointer;
}

.proappt-staff-modal-content h4 {
	margin: 0 26px 4px 0;
	color: var(--proappt-text, #0f172a);
}

.proappt-staff-modal-content input[type="text"],
.proappt-staff-modal-content input[type="email"],
.proappt-staff-modal-content input[type="password"] {
	width: 100%;
	border: 1px solid var(--proappt-border, #d5dee5);
	border-radius: 10px;
	background: #fff;
	color: var(--proappt-text, #0f172a);
	padding: 10px 12px;
}

.proappt-staff-modal-content #proappt-staff-login-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	margin-top: 4px;
	background: var(--proappt-primary, #0f766e);
	border: 1px solid color-mix(in srgb, var(--proappt-primary, #0f766e) 84%, #000);
	color: #fff;
	font-weight: 700;
	border-radius: 12px;
}

.proappt-staff-modal-content #proappt-staff-login-back {
	min-height: 40px;
}

body.proappt-staff-modal-open {
	overflow: hidden;
}

/* reCAPTCHA v3 badge: themes often hide it (overflow/transform). Keep visible when the script mounts. */
body .grecaptcha-badge {
	visibility: visible !important;
	opacity: 1 !important;
	transform: none !important;
	position: fixed !important;
	bottom: 0 !important;
	right: 0 !important;
	z-index: 99998 !important;
}

.proappt-recaptcha-attribution {
	margin: 14px 0 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--proappt-label-color, #64748b);
}

.proappt-recaptcha-attribution a {
	color: inherit;
	text-decoration: underline;
}

.proappt-staff-controls {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	align-items: end;
	margin-bottom: 14px;
}

.proappt-staff-export-controls {
	grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
	justify-content: start;
}

.proappt-staff-kpis {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
	gap: 12px;
	margin-bottom: 6px;
}

.proappt-kpi {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 6px;
	min-height: 76px;
	padding: 14px;
	border-radius: 14px;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.25;
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e2e8f0) 88%, transparent);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 1),
		0 8px 16px rgba(15, 23, 42, 0.05);
	transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.proappt-kpi:hover {
	transform: translateY(-2px);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 1),
		0 12px 24px rgba(15, 23, 42, 0.08);
}

.proappt-kpi-label {
	color: var(--proappt-label-color, var(--proappt-text-muted, #64748b));
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.proappt-kpi-value {
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--proappt-text, #0f172a);
}

.proappt-kpi-total { border-bottom: 3px solid color-mix(in srgb, var(--proappt-primary, #0f766e) 72%, transparent); }
.proappt-kpi-pending { border-bottom: 3px solid #f59e0b; }
.proappt-kpi-confirmed { border-bottom: 3px solid #3b82f6; }
.proappt-kpi-completed { border-bottom: 3px solid #16a34a; }
.proappt-kpi-cancelled { border-bottom: 3px solid #ef4444; }

.proappt-staff-controls label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--proappt-label-color, var(--proappt-text, #374151));
}

.proappt-staff-controls .proappt-label-inline {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.proappt-staff-controls input[type="date"],
.proappt-staff-controls input[type="search"],
.proappt-staff-controls input[type="text"],
.proappt-staff-controls input[type="email"],
.proappt-staff-controls input[type="time"],
.proappt-staff-controls select,
.proappt-staff-controls textarea {
	width: 100%;
	padding: 10px 12px;
	border-radius: var(--proappt-input-radius, 10px);
	border: 1px solid var(--proappt-input-border, var(--proappt-border, #e5e7eb));
	background: var(--proappt-input-bg, rgba(255, 255, 255, 0.95));
	color: var(--proappt-input-text, var(--proappt-text, #111827));
	box-shadow:
		inset 0 3px 5px rgba(15, 23, 42, 0.04),
		inset 0 -1px 0 rgba(255, 255, 255, 0.62);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	box-sizing: border-box;
	font-family: inherit;
}

.proappt-staff-controls select {
	min-height: 44px;
}

.proappt-notes-col {
	align-self: stretch;
}

#proappt-staff-edit-customer-notes {
	min-height: 116px;
	resize: vertical;
}

#proappt-staff-edit-staff-notes-history {
	min-height: 84px;
	resize: vertical;
	background: color-mix(in srgb, var(--proappt-input-bg, #fff) 90%, #f1f5f9);
}

#proappt-staff-edit-staff-notes-new {
	min-height: 76px;
	resize: vertical;
}

.proappt-notes-col small {
	font-size: 12px;
	color: var(--proappt-text-muted, #64748b);
	margin-top: 2px;
}

@media (min-width: 1100px) {
	.proappt-staff-controls {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.proappt-staff-controls .proappt-notes-col {
		grid-column: span 3;
	}
}

@media (max-width: 1099px) {
	.proappt-staff-controls .proappt-notes-col {
		grid-column: 1 / -1;
	}
}

/* Tooltip (pure CSS, wp-admin safe) */
.proappt-tooltip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	margin-left: 6px;
	border-radius: 999px;
	font-weight: 900;
	font-size: 12px;
	line-height: 1;
	cursor: help;
	color: #0f172a;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e2e8f0) 86%, transparent);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 10px rgba(15, 23, 42, 0.06);
	position: relative;
}

.proappt-tooltip::after {
	content: attr(data-tooltip);
	position: absolute;
	left: 50%;
	top: calc(100% + 10px);
	transform: translateX(-50%);
	min-width: 260px;
	max-width: min(360px, 80vw);
	padding: 10px 12px;
	border-radius: 12px;
	background: rgba(15, 23, 42, 0.92);
	color: #fff;
	font-weight: 600;
	font-size: 12px;
	line-height: 1.45;
	letter-spacing: 0.01em;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
	z-index: 20;
	transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.proappt-tooltip:hover::after,
.proappt-tooltip:focus-visible::after {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(2px);
}

#proappt-staff-edit-status {
	min-width: 160px;
}

.proappt-staff-form-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 6px 0 0;
}

.proappt-staff-form-actions .proappt-btn {
	width: auto;
	margin-top: 0;
	min-height: 42px;
	padding: 12px 18px;
}

.proappt-staff-form-actions .proappt-btn-primary {
	min-width: 180px;
}

.proappt-staff-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: stretch;
}

.proappt-staff-actions .proappt-btn {
	white-space: nowrap;
	width: 100%;
	min-height: 40px;
}

#proappt-staff-edit-participants {
	min-height: 120px;
}

.proappt-staff-conflict-panel {
	margin-top: 12px;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e2e8f0) 86%, transparent);
	background: rgba(255, 255, 255, 0.75);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 10px 22px rgba(15, 23, 42, 0.05);
	font-size: 0.9rem;
}

.proappt-staff-conflict-panel ul {
	margin: 8px 0 0 18px;
}

.proappt-staff-conflict-items {
	margin: 8px 0 0 18px;
}

.proappt-staff-conflict-item {
	margin: 6px 0;
}

.proappt-staff-conflict-line {
	display: inline-block;
	padding: 6px 10px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e2e8f0) 86%, transparent);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.proappt-staff-conflict-panel.is-ok {
	border-color: color-mix(in srgb, #16a34a 35%, var(--proappt-border, #e2e8f0));
}

.proappt-staff-conflict-panel.is-error {
	border-color: color-mix(in srgb, #ef4444 40%, var(--proappt-border, #e2e8f0));
	background: color-mix(in srgb, #fee2e2 25%, rgba(255, 255, 255, 0.78));
}

.proappt-staff-conflict-hint {
	margin-top: 8px;
	font-size: 0.85rem;
	color: #991b1b;
	font-weight: 700;
}
.proappt-conflict-explain {
	margin: 6px 0 4px;
	font-size: 0.85rem;
	color: #7f1d1d;
}
.proappt-conflict-time {
	font-weight: 600;
	color: #dc2626;
}
.proappt-conflict-reason {
	font-weight: 400;
	color: #b91c1c;
	font-style: italic;
}

.proappt-staff-controls input:focus-visible,
.proappt-staff-controls select:focus-visible {
	outline: none;
	border-color: var(--proappt-primary, #2563eb);
	box-shadow:
		inset 0 1px 2px rgba(15, 23, 42, 0.05),
		0 0 0 3px color-mix(in srgb, var(--proappt-primary, #2563eb) 25%, transparent);
}

.proappt-staff-controls .proappt-btn {
	margin-top: 0;
}

.proappt-staff-table-responsive {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 14px;
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e2e8f0) 90%, transparent);
	background: rgba(255, 255, 255, 0.6);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
	margin-top: 6px;
}

.proappt-profile-services-search-wrap {
	display: block;
	margin-bottom: 10px;
}

.proappt-profile-services-search {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px !important;
}

.proappt-profile-services-scroll {
	max-height: min(340px, 45vh);
	overflow-y: auto;
	padding: 10px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e2e8f0) 88%, transparent);
	box-shadow:
		inset 0 2px 10px rgba(15, 23, 42, 0.04),
		inset 0 -1px 0 rgba(255, 255, 255, 0.76);
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 6px;
}

.proappt-profile-service-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	padding: 8px 10px;
	border-radius: 10px;
	border: 1px solid transparent;
	transition: background 0.12s ease;
}

.proappt-profile-service-row:hover {
	background: rgba(255, 255, 255, 0.95);
	border-color: color-mix(in srgb, var(--proappt-border, #e2e8f0) 70%, transparent);
}

.proappt-profile-service-row input {
	margin-top: 3px;
	flex-shrink: 0;
	accent-color: var(--proappt-primary, #2563eb);
}

.proappt-profile-service-name {
	flex: 1;
	line-height: 1.4;
	color: var(--proappt-text, #111827);
}

.proappt-staff-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.proappt-staff-table th,
.proappt-staff-table td {
	border: 1px solid var(--proappt-border, #e5e7eb);
	padding: 10px;
	vertical-align: top;
}

.proappt-staff-table th {
	background: color-mix(in srgb, var(--proappt-surface, #fff) 92%, #000);
	text-align: left;
}

.proappt-staff-status,
.proappt-staff-note-add {
	width: 100%;
}

.proappt-staff-notes-history {
	white-space: pre-wrap;
	font-size: 12px;
	line-height: 1.35;
	max-height: 120px;
	overflow: auto;
	padding: 8px;
	margin-bottom: 8px;
	border: 1px solid var(--proappt-border, #e5e7eb);
	border-radius: 8px;
	background: #fff;
}

.proappt-staff-profile-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px;
	margin-bottom: 10px;
}

.proappt-staff-profile-grid label {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.proappt-staff-profile-grid input,
.proappt-staff-profile-grid textarea {
	width: 100%;
	padding: 10px 12px;
	border-radius: var(--proappt-input-radius, 10px);
	border: 1px solid var(--proappt-input-border, var(--proappt-border, #e5e7eb));
	background: rgba(255, 255, 255, 0.95);
	color: var(--proappt-input-text, var(--proappt-text, #111827));
	box-sizing: border-box;
	box-shadow:
		inset 0 2px 4px rgba(15, 23, 42, 0.04),
		inset 0 -1px 0 rgba(255, 255, 255, 0.55);
	font-family: inherit;
}

.proappt-staff-profile-grid textarea {
	min-height: 88px;
	resize: vertical;
}

.proappt-span-2 {
	grid-column: span 2;
}

.proappt-profile-schedule-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 12px;
}

.proappt-profile-leave-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 12px;
}

.proappt-schedule-row {
	display: grid;
	grid-template-columns: 1.15fr minmax(0, 1fr) minmax(0, 1fr) auto;
	gap: 10px;
	margin-bottom: 0;
	align-items: end;
	padding: 12px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e2e8f0) 92%, transparent);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.94),
		0 4px 10px rgba(15, 23, 42, 0.04);
}

.proappt-leave-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr) auto;
	gap: 10px;
	align-items: end;
	padding: 12px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e2e8f0) 92%, transparent);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 4px 10px rgba(15, 23, 42, 0.04);
}

.proappt-schedule-row select,
.proappt-schedule-row input {
	width: 100%;
	min-height: 42px;
	padding: 8px 10px;
	box-sizing: border-box;
	border-radius: 10px;
	border: 1px solid var(--proappt-border, #e5e7eb);
	background: rgba(255, 255, 255, 0.98);
	font-family: inherit;
}

.proappt-leave-row input[type="date"],
.proappt-leave-row input[type="text"] {
	width: 100%;
	min-height: 42px;
	padding: 8px 10px;
	box-sizing: border-box;
	border-radius: 10px;
	border: 1px solid var(--proappt-border, #e5e7eb);
	background: rgba(255, 255, 255, 0.98);
	font-family: inherit;
}

.proappt-prof-leave-phone {
	min-height: 42px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 10px;
	border: 1px solid var(--proappt-border, #e5e7eb);
	background: rgba(255, 255, 255, 0.98);
	font-weight: 600;
}

.proappt-prof-remove {
	width: 42px;
	height: 42px;
	flex-shrink: 0;
	justify-self: end;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	border-radius: 10px;
	background: linear-gradient(180deg, #fff, color-mix(in srgb, #fee2e2 42%, #fff));
	border: 1px solid #fecaca;
	color: #b91c1c;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
	transition: transform 0.12s ease;
}

.proappt-prof-remove:hover {
	transform: scale(1.04);
}

.proappt-prof-remove:active {
	transform: scale(0.97);
}

@media (max-width: 640px) {
	.proappt-schedule-row {
		grid-template-columns: 1fr 1fr;
		grid-auto-rows: auto;
		row-gap: 10px;
	}

	.proappt-leave-row {
		grid-template-columns: 1fr;
	}

	.proappt-prof-remove {
		grid-column: 1 / -1;
		width: 100%;
	}

	.proappt-staff-section-head {
		flex-wrap: wrap;
	}

	.proappt-calendar-toggle {
		width: 100%;
	}
}

.proappt-staff-calendar-wrap {
	margin-bottom: 16px;
}

.proappt-staff-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.proappt-calendar-toggle {
	min-height: 34px;
	padding: 6px 10px;
	font-size: 0.8rem;
}

@media (min-width: 769px) {
	.proappt-calendar-toggle {
		display: none;
	}
}

.proappt-staff-legend {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.proappt-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
}

.proappt-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
}

.proappt-dot.pending { background: #f59e0b; }
.proappt-dot.confirmed { background: #3b82f6; }
.proappt-dot.completed { background: #16a34a; }
.proappt-dot.cancelled { background: #ef4444; }

.proappt-staff-calendar-header {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 8px;
}

.proappt-staff-calendar {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 6px;
	margin-bottom: 10px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow: hidden;
}

.proappt-staff-calendar .proappt-cal-day,
.proappt-staff-calendar .proappt-cal-dow {
	border: 1px solid color-mix(in srgb, var(--proappt-border, #e5e7eb) 92%, transparent);
	border-radius: 12px;
	padding: 8px;
	min-height: 44px;
	background: rgba(255, 255, 255, 0.76);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.94),
		0 2px 8px rgba(15, 23, 42, 0.04);
	min-width: 0;
	overflow: hidden;
}

.proappt-staff-calendar .proappt-cal-dow {
	font-weight: 700;
	text-align: center;
}

.proappt-staff-calendar .proappt-cal-day small {
	display: block;
	margin-top: 4px;
	color: #666;
}

.proappt-cal-status-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	justify-content: center;
	margin-top: 3px;
}

.proappt-cal-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 16px;
	height: 16px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	border-radius: 8px;
	padding: 0 3px;
	color: #fff;
	cursor: default;
}

.proappt-cal-badge-pending   { background: #f59e0b; }
.proappt-cal-badge-confirmed { background: #3b82f6; }
.proappt-cal-badge-completed { background: #16a34a; }
.proappt-cal-badge-cancelled { background: #ef4444; }
.proappt-staff-calendar .proappt-cal-day.leave-day {
	background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
	border-color: #cbd5e1;
}
.proappt-staff-calendar .proappt-cal-day.leave-phone-only {
	background: linear-gradient(180deg, #eff6ff, #dbeafe);
	border-color: #93c5fd;
}
.proappt-staff-calendar .proappt-cal-day.has-data {
	cursor: pointer;
}
.proappt-staff-calendar .proappt-cal-day .proappt-cal-leave-note {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.proappt-staff-calendar .proappt-cal-day .proappt-cal-icon-badge {
	font-size: 12px;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	cursor: help;
}

.proappt-staff-calendar .proappt-cal-day .proappt-cal-off-icon {
	color: #9f1239;
}

.proappt-staff-calendar .proappt-cal-day .proappt-cal-phone-icon {
	color: #1d4ed8;
}

@media (max-width: 480px) {
	.proappt-staff-calendar {
		gap: 4px;
	}

	.proappt-staff-calendar .proappt-cal-day,
	.proappt-staff-calendar .proappt-cal-dow {
		padding: 6px 4px;
		min-height: 38px;
	}

	.proappt-staff-calendar .proappt-cal-day .proappt-cal-leave-note {
		font-size: 9px;
	}

	.proappt-staff-calendar .proappt-cal-day .proappt-cal-icon-badge {
		font-size: 10px;
	}

	.proappt-cal-status-badges {
		gap: 1px;
	}

	.proappt-cal-badge {
		min-width: 13px;
		height: 13px;
		font-size: 8px;
		padding: 0 2px;
		border-radius: 6px;
	}
}

.proappt-staff-calendar-day {
	padding: 8px;
	border: 1px solid var(--proappt-border, #e5e7eb);
	border-radius: 8px;
	background: #fff;
}

.proappt-staff-leave-hint {
	margin-top: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid #fecaca;
	background: #fff1f2;
	color: #9f1239;
	font-weight: 600;
}

.proappt-staff-leave-hint.is-warning {
	border-color: #bfdbfe;
	background: #eff6ff;
	color: #1d4ed8;
}

/* ─── Staff Invoice Create Form ─── */
.proappt-sinv-form {
	border: 1px solid #d0d5dd;
	border-radius: 10px;
	padding: 24px;
	margin-top: 20px;
	background: linear-gradient(135deg, #fafbfc 0%, #f0f2f5 100%);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.proappt-sinv-title {
	margin: 0 0 20px;
	font-size: 18px;
	font-weight: 700;
	color: #1d2939;
}
.proappt-sinv-fieldset {
	border: 1px solid #e4e7ec;
	border-radius: 8px;
	padding: 16px 20px 20px;
	margin-bottom: 18px;
	background: #fff;
}
.proappt-sinv-fieldset legend {
	font-weight: 700;
	font-size: 14px;
	color: #344054;
	padding: 0 8px;
}
.proappt-sinv-client-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 14px;
	margin-bottom: 4px;
}
.proappt-sinv-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.proappt-sinv-field--full {
	grid-column: 1 / -1;
}
.proappt-sinv-field label {
	font-size: 13px;
	font-weight: 600;
	color: #475467;
}
.proappt-sinv-input {
	display: block;
	width: 100%;
	padding: 10px 12px;
	font-size: 14px;
	line-height: 1.5;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	background: #fff;
	color: #1d2939;
	transition: border-color .15s, box-shadow .15s;
	box-sizing: border-box;
}
.proappt-sinv-input:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
	outline: none;
}
.proappt-sinv-input--sm {
	width: auto;
	min-width: 70px;
	max-width: 100px;
	padding: 8px 10px;
	font-size: 13px;
}
select.proappt-sinv-input {
	cursor: pointer;
	appearance: auto;
}

/* Appointment multi-select list */
.proappt-sinv-apt-list {
	max-height: 220px;
	overflow-y: auto;
	border: 1px solid #e4e7ec;
	border-radius: 6px;
	background: #f9fafb;
	padding: 4px;
	margin-bottom: 10px;
}
.proappt-sinv-apt-hint {
	padding: 14px 16px;
	color: #667085;
	font-size: 13px;
	margin: 0;
	text-align: center;
}
.proappt-sinv-apt-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 12px;
	margin: 2px 0;
	border-radius: 6px;
	cursor: pointer;
	transition: background .12s;
	font-size: 13px;
	line-height: 1.4;
}
.proappt-sinv-apt-item:hover {
	background: #eef2ff;
}
.proappt-sinv-apt-item input[type="checkbox"] {
	margin-top: 2px;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	cursor: pointer;
}
.proappt-sinv-apt-info {
	flex: 1;
}
.proappt-sinv-apt-info strong {
	color: #2563eb;
}
.proappt-sinv-apt-meta {
	display: block;
	font-size: 12px;
	color: #667085;
	margin-top: 2px;
}
.proappt-sinv-apt-imported {
	opacity: .5;
	pointer-events: none;
}
.proappt-sinv-apt-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}
.proappt-sinv-import-count {
	font-size: 12px;
	color: #667085;
}

/* Line items table */
.proappt-sinv-items-wrap {
	overflow-x: auto;
	margin-bottom: 10px;
}
.proappt-sinv-table {
	width: 100%;
	border-collapse: collapse;
}
.proappt-sinv-table thead th {
	background: #f2f4f7;
	padding: 8px 10px;
	font-size: 12px;
	font-weight: 700;
	color: #475467;
	text-align: left;
	border-bottom: 2px solid #d0d5dd;
	white-space: nowrap;
}
.proappt-sinv-table tbody tr {
	border-bottom: 1px solid #e4e7ec;
}
.proappt-sinv-table tbody td {
	padding: 6px 6px;
	vertical-align: middle;
}
.proappt-sinv-table .sinv-total {
	white-space: nowrap;
	font-weight: 600;
	min-width: 80px;
	text-align: right;
	padding-right: 10px;
}
.proappt-sinv-table .sinv-col-desc { width: 30%; }
.proappt-sinv-table .sinv-col-date { width: 15%; }
.proappt-sinv-table .sinv-col-time { width: 15%; }
.proappt-sinv-table .sinv-col-qty { width: 8%; }
.proappt-sinv-table .sinv-col-price { width: 12%; }
.proappt-sinv-table .sinv-col-total { width: 12%; text-align: right; }
.proappt-sinv-table .sinv-col-action { width: 5%; text-align: center; }
.proappt-sinv-table td input.proappt-sinv-input {
	padding: 8px 10px;
	font-size: 13px;
}
.proappt-sinv-table td .sinv-remove {
	padding: 4px 10px;
	font-size: 16px;
	line-height: 1;
	border-radius: 4px;
}

/* Footer: notes + totals */
.proappt-sinv-footer-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin-bottom: 16px;
}
.proappt-sinv-notes-field textarea {
	min-height: 80px;
	resize: vertical;
}
.proappt-sinv-totals-card {
	background: #f9fafb;
	border: 1px solid #e4e7ec;
	border-radius: 8px;
	padding: 14px 18px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}
.proappt-sinv-discount-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}
.proappt-sinv-discount-label {
	font-weight: 600;
	font-size: 13px;
	color: #475467;
}
.proappt-sinv-totals-breakdown {
	font-size: 13px;
	line-height: 1.6;
}
.sinv-totals-row {
	display: flex;
	justify-content: space-between;
	padding: 2px 0;
}
.sinv-totals-discount {
	color: #dc3232;
}
.sinv-totals-grand {
	border-top: 2px solid #2563eb;
	margin-top: 6px;
	padding-top: 6px;
	font-size: 15px;
}

/* Actions bar */
.proappt-sinv-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}
.proappt-sinv-submit-btn {
	min-width: 160px;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 700;
}

/* Mobile */
@media (max-width: 680px) {
	.proappt-sinv-form {
		padding: 14px;
	}
	.proappt-sinv-fieldset {
		padding: 12px 14px 16px;
	}
	.proappt-sinv-client-row {
		grid-template-columns: 1fr;
	}
	.proappt-sinv-footer-grid {
		grid-template-columns: 1fr;
	}
	.proappt-sinv-table .sinv-col-desc { width: auto; min-width: 140px; }
	.proappt-sinv-actions {
		flex-direction: column;
	}
	.proappt-sinv-submit-btn {
		width: 100%;
	}
}
