:root {
	--hap-accent: #e4c537;
	--hap-bg: #0b0f14;
	--hap-surface: #141b24;
	--hap-surface-2: #1a2330;
	--hap-border: rgba(255, 255, 255, 0.08);
	--hap-text: #f1f5f9;
	--hap-muted: #94a3b8;
	--hap-radius: 16px;
}

/* Hard reset: the blank shell still loads the theme's wp_head, and the theme
   paints a full-page hero graphic on the body. Force our own background so it
   can never bleed through behind the partner pages. */
body.hap-app-body,
body.hap-app-body::before,
body.hap-app-body::after {
	background: var(--hap-bg) !important;
	background-image: none !important;
}

body.hap-app-body {
	margin: 0 !important;
	padding: 0 !important;
	color: var(--hap-text);
	font-family: 'Cairo', Tahoma, "Segoe UI", Arial, sans-serif;
	direction: rtl;
	min-height: 100vh;
}

/* Hide theme chrome if it ever gets injected, but leave utility widgets
   (accessibility button, admin bar) alone. */
body.hap-app-body > header,
body.hap-app-body > footer,
body.hap-app-body > nav,
body.hap-app-body .bgimg {
	display: none !important;
}

.hap-app-main {
	min-height: 100vh;
	width: 100%;
	background: var(--hap-bg);
}

.hap-app {
	--hap-accent: #e4c537;
	min-height: 100vh;
}

.hap-app h1,
.hap-app h2,
.hap-app h3 {
	font-family: 'Changa', 'Cairo', Tahoma, sans-serif;
}

.hap-shell {
	display: grid;
	grid-template-columns: 280px 1fr;
	min-height: 100vh;
}

.hap-sidebar {
	background: var(--hap-surface);
	border-left: 1px solid var(--hap-border);
	padding: 24px 20px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.hap-site-logo {
	display: block;
	margin-bottom: 4px;
}

.hap-site-logo img {
	max-width: 150px;
	height: auto;
	display: block;
}

.hap-login-card {
	text-align: center;
}

.hap-login-card .hap-signup-logo {
	display: inline-block;
	margin-bottom: 18px;
}

.hap-login-card .hap-signup-logo img {
	max-width: 170px;
	height: auto;
}

.hap-brand {
	display: flex;
	gap: 12px;
	align-items: center;
}

.hap-brand img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 12px;
}

.hap-brand strong {
	display: block;
	font-size: 15px;
}

.hap-status-badge {
	font-size: 11px;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
}

.hap-status-approved { color: #86efac; }
.hap-status-pending { color: #fde047; }
.hap-status-rejected { color: #fca5a5; }

.hap-nav {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.hap-nav a {
	padding: 12px 14px;
	border-radius: 12px;
	color: var(--hap-muted);
	text-decoration: none;
	transition: 0.2s;
}

.hap-nav a:hover,
.hap-nav a.active {
	background: color-mix(in srgb, var(--hap-accent) 18%, transparent);
	color: var(--hap-text);
}

.hap-logout {
	margin-top: auto;
	color: var(--hap-muted);
	text-decoration: none;
	font-size: 14px;
}

.hap-main {
	padding: 32px;
	max-width: 960px;
	position: relative;
}

.hap-app .hap-page-head {
	position: static;
	width: 100%;
	z-index: auto;
	background: transparent;
	display: block;
	margin-bottom: 24px;
}

.hap-page-head h1 {
	margin: 0 0 6px;
	font-size: 28px;
}

.hap-page-head p {
	margin: 0 0 24px;
	color: var(--hap-muted);
}

.hap-banner {
	padding: 16px 20px;
	border-radius: var(--hap-radius);
	margin-bottom: 24px;
}

.hap-banner-pending {
	background: rgba(234, 179, 8, 0.12);
	border: 1px solid rgba(234, 179, 8, 0.35);
}

.hap-panel {
	background: var(--hap-surface);
	border: 1px solid var(--hap-border);
	border-radius: var(--hap-radius);
	padding: 20px;
	margin-bottom: 16px;
}

.hap-panel h2 {
	margin: 0 0 16px;
	font-size: 18px;
}

.hap-form-grid label {
	display: block;
	margin-bottom: 14px;
	font-size: 14px;
	color: var(--hap-muted);
}

.hap-form-grid input[type="text"],
.hap-form-grid input[type="email"],
.hap-form-grid input[type="password"],
.hap-form-grid input[type="url"],
.hap-form-grid input[type="number"],
.hap-form-grid select,
.hap-form-grid textarea {
	width: 100%;
	margin-top: 6px;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid var(--hap-border);
	background: var(--hap-surface-2);
	color: var(--hap-text);
	box-sizing: border-box;
}

/* Price input with an ILS (₪) symbol prefix. */
.hap-price-field {
	position: relative;
	display: block;
	margin-top: 6px;
}

.hap-price-field .hap-currency {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
	color: var(--hap-accent);
	font-weight: 700;
	font-size: 16px;
	pointer-events: none;
}

.hap-price-field input[type="number"] {
	margin-top: 0 !important;
	padding-right: 34px !important;
}

.hap-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.hap-hint {
	color: var(--hap-muted);
	font-size: 13px;
	margin: 0 0 12px;
}

.hap-btn {
	border: 0;
	border-radius: 12px;
	padding: 12px 20px;
	cursor: pointer;
	font-weight: 700;
	font-size: 14px;
}

.hap-btn-primary {
	background: var(--hap-accent);
	color: #111;
}

.hap-btn-ghost {
	background: transparent;
	border: 1px dashed var(--hap-border);
	color: var(--hap-text);
}

.hap-btn-lg {
	padding: 14px 28px;
	font-size: 16px;
}

.hap-upload-zone {
	margin-top: 8px;
	padding: 32px 16px;
	border: 2px dashed var(--hap-border);
	border-radius: var(--hap-radius);
	text-align: center;
	color: var(--hap-muted);
	cursor: pointer;
	transition: 0.2s;
}

.hap-upload-zone.is-dragover,
.hap-upload-zone:hover {
	border-color: var(--hap-accent);
	color: var(--hap-text);
}

.hap-upload-zone img {
	max-height: 120px;
	border-radius: 10px;
	margin-top: 8px;
}

.hap-preview-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.hap-preview-grid img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 8px;
}

.hap-dates-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.hap-date-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	background: var(--hap-surface-2);
	border: 1px solid var(--hap-border);
	padding: 14px 16px;
	border-radius: 12px;
}

.hap-date-fields {
	display: grid;
	grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) 96px;
	gap: 12px;
	flex: 1;
	min-width: 0;
}

.hap-date-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.hap-date-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--hap-muted);
	line-height: 1.3;
}

.hap-date-row input[type="date"],
.hap-date-row input[type="number"] {
	width: 100%;
	margin: 0;
	padding: 11px 12px;
	border-radius: 10px;
	border: 1px solid var(--hap-border);
	background: var(--hap-bg);
	color: var(--hap-text);
	font-family: inherit;
	font-size: 14px;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.hap-date-row input[type="date"]:focus,
.hap-date-row input[type="number"]:focus {
	outline: none;
	border-color: color-mix(in srgb, var(--hap-accent) 60%, transparent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--hap-accent) 15%, transparent);
}

.hap-date-row input[type="date"] {
	color-scheme: dark;
	min-height: 44px;
}

.hap-date-row input[type="date"]::-webkit-calendar-picker-indicator {
	filter: invert(0.85);
	cursor: pointer;
	opacity: 0.85;
}

.hap-date-row input[type="number"] {
	-moz-appearance: textfield;
}

.hap-date-row input[type="number"]::-webkit-outer-spin-button,
.hap-date-row input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.hap-date-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.hap-date-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 8px 12px;
	border-radius: 10px;
	background: var(--hap-bg);
	border: 1px solid var(--hap-border);
	font-size: 13px;
	color: var(--hap-text);
	cursor: pointer;
	white-space: nowrap;
}

.hap-date-check input {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--hap-accent);
	cursor: pointer;
}

.hap-date-remove {
	background: rgba(248, 113, 113, 0.1);
	border: 1px solid rgba(248, 113, 113, 0.35);
	color: #fca5a5;
	cursor: pointer;
	padding: 9px 14px;
	border-radius: 10px;
	font-size: 13px;
	font-family: inherit;
	font-weight: 600;
	white-space: nowrap;
	transition: 0.2s;
}

.hap-date-remove:hover {
	background: rgba(248, 113, 113, 0.18);
	color: #fecaca;
}

.hap-about-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.hap-about-row {
	background: var(--hap-surface-2);
	border: 1px solid var(--hap-border);
	border-radius: 12px;
	padding: 14px;
	display: grid;
	gap: 10px;
}

.hap-about-row label {
	margin: 0;
}

.hap-about-remove {
	justify-self: start;
	background: transparent;
	border: 0;
	color: #f87171;
	cursor: pointer;
	font-size: 13px;
	padding: 0;
}

.hap-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.hap-card {
	background: var(--hap-surface);
	border: 1px solid var(--hap-border);
	border-radius: var(--hap-radius);
	overflow: hidden;
}

.hap-card img {
	width: 100%;
	height: 140px;
	object-fit: cover;
}

.hap-card-body {
	padding: 14px;
}

.hap-pill {
	font-size: 12px;
	color: var(--hap-accent);
}

.hap-card-actions a {
	margin-left: 12px;
	color: var(--hap-accent);
}

.hap-empty {
	padding: 40px;
	text-align: center;
	color: var(--hap-muted);
}

.hap-notif-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.hap-notif-card {
	background: var(--hap-surface);
	border: 1px solid var(--hap-border);
	border-radius: var(--hap-radius);
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.hap-notif-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.hap-notif-type {
	color: var(--hap-accent);
	font-size: 12px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--hap-accent) 14%, transparent);
}

.hap-notif-card time {
	color: var(--hap-muted);
	font-size: 12px;
	white-space: nowrap;
}

.hap-notif-title {
	display: block;
	font-size: 18px;
	font-weight: 700;
	color: var(--hap-text);
	line-height: 1.4;
	margin: 0;
}

.hap-notif-meta,
.hap-notif-note {
	margin: 0;
	color: var(--hap-muted);
	font-size: 14px;
	line-height: 1.5;
}

.hap-notif-payment {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hap-notif-contact {
	margin-top: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--hap-border);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hap-notif-contact__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 14px;
}

.hap-notif-contact__row span {
	color: var(--hap-muted);
	flex-shrink: 0;
}

.hap-notif-contact__row a {
	color: var(--hap-accent);
	text-decoration: none;
	word-break: break-all;
}

.hap-notif-contact__row a:hover {
	text-decoration: underline;
}

.hap-btn-whatsapp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 4px;
	padding: 11px 16px;
	border-radius: 12px;
	background: #25d366;
	color: #fff !important;
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
	width: fit-content;
}

.hap-btn-whatsapp:hover {
	background: #1ebe57;
	color: #fff;
	text-decoration: none;
}

.hap-message.is-success { color: #86efac; margin-top: 12px; }
.hap-message.is-error { color: #fca5a5; margin-top: 12px; }

.hap-signup-screen,
.hap-login-screen {
	display: grid;
	place-items: center;
	min-height: 100vh;
	padding: 48px 24px;
	/* Branded backdrop: deep navy with soft gold glows. */
	background:
		radial-gradient(600px 400px at 85% 10%, rgba(228, 197, 55, 0.10), transparent 65%),
		radial-gradient(700px 500px at 10% 90%, rgba(228, 197, 55, 0.06), transparent 60%),
		linear-gradient(160deg, #0b0f14 0%, #10161f 55%, #0b0f14 100%) !important;
}

.hap-signup-card,
.hap-login-card {
	width: min(640px, 100%);
	background: linear-gradient(180deg, #161e29 0%, #121924 100%);
	border: 1px solid rgba(228, 197, 55, 0.18);
	border-radius: 24px;
	padding: 44px 40px 36px;
	box-shadow:
		0 30px 80px rgba(0, 0, 0, 0.55),
		0 0 0 1px rgba(255, 255, 255, 0.03) inset;
	position: relative;
	overflow: hidden;
}

/* Two-column form inside the signup card. */
.hap-signup-card .hap-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 16px;
}

.hap-signup-card .hap-form-grid .hap-full {
	grid-column: 1 / -1;
}

.hap-signup-card form > .hap-btn {
	display: block;
	width: 100%;
	margin-top: 10px;
}

@media (max-width: 640px) {
	.hap-signup-card .hap-form-grid {
		grid-template-columns: 1fr;
	}
	.hap-signup-card,
	.hap-login-card {
		padding: 32px 22px 26px;
	}
}

/* Gold accent bar across the top of the card. */
.hap-signup-card::before,
.hap-login-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--hap-accent), #ffd873);
}

.hap-signup-head {
	text-align: center;
	margin-bottom: 8px;
}

.hap-signup-logo {
	display: inline-block;
	margin-bottom: 18px;
}

.hap-signup-logo img {
	max-width: 170px;
	height: auto;
	display: block;
	margin: 0 auto;
}

/* Text wordmark fallback when no logo image is configured. */
.hap-wordmark {
	font-family: 'Changa', 'Cairo', Tahoma, sans-serif;
	font-size: 30px;
	font-weight: 700;
	letter-spacing: 2px;
	color: #fff;
	text-decoration: none;
	display: inline-block;
	margin-bottom: 18px;
}

.hap-wordmark span {
	color: var(--hap-accent);
}

.hap-site-logo.hap-wordmark {
	font-size: 22px;
	margin-bottom: 4px;
}

/* Style the raw wp_login_form output inside the login card. */
.hap-login-card form p {
	margin: 0 0 14px;
	text-align: right;
}

.hap-login-card form label {
	display: block;
	font-size: 14px;
	color: var(--hap-muted);
	margin-bottom: 6px;
}

.hap-login-card form input[type="text"],
.hap-login-card form input[type="password"] {
	width: 100%;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid var(--hap-border);
	background: var(--hap-surface-2);
	color: var(--hap-text);
	box-sizing: border-box;
}

.hap-login-card form .login-remember {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--hap-muted);
	font-size: 14px;
}

.hap-login-card form .login-remember label {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.hap-login-card form input[type="submit"] {
	width: 100%;
	padding: 13px 20px;
	border: 0;
	border-radius: 12px;
	background: var(--hap-accent);
	color: #111;
	font-weight: 700;
	font-size: 16px;
	cursor: pointer;
	transition: filter .2s;
}

.hap-login-card form input[type="submit"]:hover {
	filter: brightness(1.08);
}

.hap-login-footer {
	margin-top: 18px;
}

.hap-login-footer a {
	color: var(--hap-accent);
}

.hap-signup-pill {
	display: inline-block;
	background: rgba(228, 197, 55, 0.14);
	color: var(--hap-accent);
	border: 1px solid rgba(228, 197, 55, 0.35);
	padding: 5px 16px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 14px;
}

.hap-signup-head h1 {
	margin: 0 0 10px;
	font-size: 26px;
}

.hap-signup-head p {
	color: var(--hap-muted);
	margin: 0 auto 26px;
	max-width: 440px;
	line-height: 1.7;
}

.hap-signup-login {
	text-align: center;
	margin-top: 16px;
}

.hap-signup-login a {
	color: var(--hap-accent);
}

.hap-link-btn {
	background: none;
	border: 0;
	padding: 0;
	color: var(--hap-accent);
	cursor: pointer;
	font: inherit;
	margin-left: 12px;
}

.hap-link-btn--muted { color: var(--hap-muted); }
.hap-link-btn--danger { color: #b91c1c; }

.hap-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--hap-border);
	border-radius: var(--hap-radius);
	background: var(--hap-surface);
}

.hap-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.hap-table th,
.hap-table td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--hap-border);
	text-align: right;
	vertical-align: top;
}

.hap-table th {
	background: #fafafa;
	font-weight: 700;
}

.hap-lead-status {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.hap-lead-status--registered { background: #f1f5f9; color: #475569; }
.hap-lead-status--deposit { background: #fef3c7; color: #92400e; }
.hap-lead-status--paid_full { background: #dcfce7; color: #166534; }

.hap-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 14px;
	margin-bottom: 28px;
}

.hap-stat-card {
	background: var(--hap-surface);
	border: 1px solid var(--hap-border);
	border-radius: var(--hap-radius);
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hap-stat-card span {
	color: var(--hap-muted);
	font-size: 13px;
}

.hap-stat-card strong {
	font-size: 28px;
	color: var(--hap-text);
}

.hap-section-title {
	margin: 24px 0 12px;
	font-size: 20px;
}

.hap-page-head--row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.hap-muted { color: var(--hap-muted); font-size: 13px; }
.hap-btn-sm { padding: 6px 12px; font-size: 13px; }

.hap-lead-note-form textarea {
	width: 100%;
	min-width: 160px;
	margin-bottom: 6px;
	border: 1px solid var(--hap-border);
	border-radius: 8px;
	padding: 8px;
	font: inherit;
}

/* ---- AJAX loader overlay ---- */
.hap-loader-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 16px;
	background: rgba(11, 15, 20, 0.72);
	backdrop-filter: blur(3px);
}

.hap-loader-overlay.is-active {
	display: flex;
}

.hap-loader-spinner {
	width: 52px;
	height: 52px;
	border: 4px solid rgba(228, 197, 55, 0.25);
	border-top-color: var(--hap-accent);
	border-radius: 50%;
	animation: hap-spin 0.8s linear infinite;
}

.hap-loader-text {
	color: var(--hap-text);
	font-size: 15px;
	font-weight: 600;
}

@keyframes hap-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
	.hap-shell {
		grid-template-columns: 1fr;
	}
	.hap-sidebar {
		border-left: 0;
		border-bottom: 1px solid var(--hap-border);
	}
	.hap-row {
		grid-template-columns: 1fr;
	}

	.hap-date-row {
		flex-direction: column;
		align-items: stretch;
	}

	.hap-date-fields {
		grid-template-columns: 1fr;
		width: 100%;
	}

	.hap-date-actions {
		justify-content: space-between;
		width: 100%;
	}
}
