.lr-login-box, .lr-dashboard {
	font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
	max-width: 950px;
	margin: 20px auto;
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.08);
	box-sizing: border-box;
}
.lr-login-box[dir="rtl"], .lr-dashboard[dir="rtl"] { direction: rtl; text-align: right; }
.lr-login-box[dir="ltr"], .lr-dashboard[dir="ltr"] { direction: ltr; text-align: left; }

.lr-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 16px;
	direction: ltr; /* keep Ad Status pinned left and Logout/Lang pinned right regardless of AR/EN */
}
.lr-topbar-left { display: flex; align-items: center; gap: 8px; }
.lr-topbar-right { display: flex; align-items: center; gap: 14px; }

.lr-logout-corner {
	display: inline-block;
	background: #f4f4f4;
	padding: 6px 14px;
	border-radius: 8px;
	font-size: 13px;
}
.lr-logout-corner:hover { background: #eaeaea; }

.lr-lang-switch { margin: 0; }
.lr-lang-switch a {
	display: inline-block; padding: 5px 14px; margin: 0 3px; border-radius: 14px;
	font-size: 12px; text-decoration: none; color: #555; background: #f0f0f0;
}
.lr-lang-switch a.active { background: #CC1939; color: #fff; }

.lr-ad-status-label { color: #777; font-size: 13px; margin-inline-end: 6px; }
.lr-ad-status-badge {
	display: inline-block; padding: 5px 16px; border-radius: 16px;
	font-size: 13px; font-weight: 700;
}
.lr-status-pending { background: #fff3cd; color: #8a6d1f; }
.lr-status-active { background: #cfe2ff; color: #1a4a8a; }
.lr-status-complete { background: #d4edda; color: #1e7e34; }
[dir="rtl"] .lr-header-right { flex-direction: row-reverse; }
[dir="rtl"] .lr-am-whatsapp { margin-inline-start: 0; margin-inline-end: auto; }

.lr-form label { display: block; margin: 10px 0 4px; font-weight: 600; }
.lr-form input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; box-sizing: border-box; }

.lr-btn, .lr-btn-small {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	font-weight: 600;
	background: #eee;
	color: #333;
	text-decoration: none;
	margin-top: 12px;
}
.lr-btn-primary { background: #CC1939; color: #fff; }
.lr-btn-small { background: #eee; color: #333; border: 1px solid #ccc; font-size: 13px; padding: 6px 12px; }
.lr-error { color: #d63638; font-weight: 600; }
.lr-notice-success { color: #1e7e34; font-weight: 600; }
.lr-notice { text-align: center; padding: 20px; }

.lr-staff-form {
	background: #f7f9fb;
	border-radius: 10px;
	padding: 16px;
	margin: 10px 0 24px;
}
.lr-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
	margin-bottom: 14px;
}
.lr-form-grid label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; color: #444; }
.lr-form-grid input, .lr-form-grid select {
	padding: 8px; border: 1px solid #ddd; border-radius: 6px; font-weight: 400; font-size: 14px;
}
.lr-checkbox-label { flex-direction: row !important; align-items: center; gap: 6px !important; }
.lr-link { color: #CC1939; text-decoration: none; font-weight: 600; }
.lr-link:hover { text-decoration: underline; }

.lr-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.lr-header-right { display: flex; align-items: center; gap: 14px; }
.lr-datetime { color: #777; font-size: 14px; margin: 4px 0; }
.lr-project-name { color: #444; margin-top: 4px; }
.lr-end-date { color: #555; margin-top: 4px; }
.lr-whatsapp-icon {
	background: #25D366; color: #fff; padding: 8px 16px; border-radius: 20px;
	text-decoration: none; font-weight: 600;
	display: inline-flex; align-items: center; gap: 6px;
}

.lr-account-manager {
	display: flex; align-items: center; gap: 12px;
	background: #f7f9fb; border-radius: 10px; padding: 12px; margin: 16px 0;
}
.lr-account-manager img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.lr-am-label { display: block; font-size: 12px; color: #777; }
.lr-am-whatsapp {
	margin-inline-start: auto; background: #25D366; color: #fff; width: 34px; height: 34px;
	border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none;
}

.lr-campaign-images { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.lr-campaign-images img { width: 140px; height: 100px; object-fit: cover; border-radius: 8px; }

.lr-carousel-hint { text-align: center; color: #777; font-size: 13px; margin: -6px 0 10px; }

.lr-ad-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin: 10px 0 20px;
}
.lr-ad-grid-item {
	position: relative;
	aspect-ratio: 2 / 4;
	background: #eef1f4;
	border-radius: 8px;
	overflow: hidden;
	cursor: zoom-in;
}
.lr-ad-grid-item img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
.lr-ad-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	font-weight: 800;
	font-size: 32px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: none;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0,0,0,0.35);
	line-height: 1;
}
.lr-ad-badge.show { display: flex; }
.lr-ad-badge-approved { background: rgba(46, 125, 50, 0.92); }
.lr-ad-badge-declined { background: rgba(198, 40, 40, 0.92); }

/* Lightbox */
.lr-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 20px;
	box-sizing: border-box;
}
.lr-lightbox-inner {
	position: relative;
	background: #fff;
	border-radius: 10px;
	padding: 16px;
	max-width: 600px;
	width: 100%;
	text-align: center;
}
.lr-lightbox-img {
	max-width: 100%;
	max-height: 60vh;
	object-fit: contain;
	border-radius: 6px;
	display: block;
	margin: 0 auto;
}
.lr-lightbox-close {
	position: absolute;
	top: 8px;
	right: 12px;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #555;
}
[dir="rtl"] .lr-lightbox-close { right: auto; left: 12px; }
.lr-lightbox-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.lr-lightbox-approve-btn, .lr-lightbox-decline-btn {
	border: none;
	padding: 10px 20px;
	border-radius: 20px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
}
.lr-lightbox-approve-btn { background: #2e7d32; color: #fff; }
.lr-lightbox-decline-btn { background: #c62828; color: #fff; }
.lr-lightbox-approve-btn.active, .lr-lightbox-decline-btn.active { box-shadow: 0 0 0 3px rgba(0,0,0,0.15) inset; }
.lr-lightbox .lr-ad-badge { position: absolute; top: 16px; }
.lr-lightbox #lr-lightbox-badge-approved { left: 16px; width: 60px; height: 60px; font-size: 32px; transform: none; top: 16px; }
.lr-lightbox #lr-lightbox-badge-declined { right: 16px; width: 60px; height: 60px; font-size: 32px; transform: none; top: 16px; }
[dir="rtl"] .lr-lightbox #lr-lightbox-badge-approved { left: auto; right: 16px; }
[dir="rtl"] .lr-lightbox #lr-lightbox-badge-declined { right: auto; left: 16px; }


.lr-stats { display: flex; gap: 16px; margin: 20px 0; flex-wrap: wrap; }
.lr-stat-card { flex: 1; min-width: 130px; background: #f7f9fb; border-radius: 10px; padding: 16px; text-align: center; }
.lr-stat-number { display: block; font-size: 24px; font-weight: 700; color: #222; word-break: break-word; }
.lr-stat-label { display: block; margin-top: 6px; color: #555; font-size: 13px; }

.lr-budget { display: flex; gap: 16px; margin: 0 0 20px; flex-wrap: wrap; }
.lr-budget-item {
	flex: 1; min-width: 130px; background: #f0f0f0; border-radius: 10px; padding: 14px; text-align: center;
}
.lr-budget-label { display: block; font-size: 13px; color: #555; margin-bottom: 6px; }
.lr-budget-value { display: block; font-size: 20px; font-weight: 700; color: #222; word-break: break-word; }
.lr-budget-remaining { background: #e8f5e9; }
.lr-budget-remaining .lr-budget-value { color: #2e7d32; }

.lr-leads-table-wrap { margin-top: 24px; }
.lr-section-title { margin-bottom: 10px; }
.lr-table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lr-leads-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; min-width: 680px; }
.lr-leads-table th { padding: 6px 10px; white-space: nowrap; color: #777; font-size: 13px; }
.lr-leads-table td { padding: 12px 10px; white-space: nowrap; background: #fafbfc; }
[dir="ltr"] .lr-leads-table th, [dir="ltr"] .lr-leads-table td { text-align: left; }
[dir="rtl"] .lr-leads-table th, [dir="rtl"] .lr-leads-table td { text-align: right; }
.lr-leads-table tbody tr td:first-child { border-radius: 8px 0 0 8px; }
.lr-leads-table tbody tr td:last-child { border-radius: 0 8px 8px 0; }
.lr-lead-number { color: #999; font-weight: 600; }
.lr-feedback-select { padding: 6px; border-radius: 6px; }
.lr-source-badge { background: #eef2ff; color: #3949ab; padding: 4px 10px; border-radius: 12px; font-size: 12px; }
.lr-type-badge { padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.lr-type-raw { background: #fff3cd; color: #8a6d00; }
.lr-type-verified { background: #d4edda; color: #1e6b34; }

/* Feedback row colors (apply to td since cells now have their own background) */
.lr-fb-interested td { background: #e8f5e9; }
.lr-fb-followup td { background: #a5d6a7; }
.lr-fb-not-interested td { background: #fdecea; }
.lr-fb-no-answer td { background: #fff9c4; }
.lr-fb-deal td { background: #66bb6a; color: #1b3a1d; font-weight: 600; }

.lr-phone-cell { white-space: normal; }
.lr-phone-number { margin-inline-end: 6px; font-weight: 600; }
.lr-phone-masked {
	color: #999;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	pointer-events: none;
}
.lr-contact-icons-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 8px;
}
.lr-contact-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.15);
	text-decoration: none;
	font-size: 16px;
	line-height: 1;
	margin: 0;
	flex-shrink: 0;
}
.lr-icon-symbol { line-height: 1; }
.lr-contact-icon svg { width: 18px; height: 18px; }
.lr-whatsapp-contact { color: #25D366; }
.lr-call-icon { color: #CC1939; }
.lr-mail-icon { color: #CC1939; }
.lr-add-contact-btn { color: #555; }
.lr-contact-count {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-size: 12px;
	color: #999;
	margin-inline-start: 2px;
}

.lr-proof-cell { min-width: 170px; }
.lr-proof-cell select, .lr-proof-cell .lr-btn-small { font-size: 12px; margin: 2px 0; }
.lr-proof-type-select {
	width: 100%;
	padding: 4px 6px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 12px;
	margin-bottom: 4px;
}
.lr-proof-view-link { display: inline-block; font-size: 12px; color: #2e7d32; text-decoration: none; font-weight: 600; }
.lr-proof-status { margin-inline-start: 6px; font-size: 13px; color: #2e7d32; font-weight: 700; }

.lr-voice-note-wrap { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: 10px; flex-wrap: wrap; }
.lr-voice-record-btn { white-space: nowrap; }
.lr-voice-timer { font-size: 12px; color: #999; min-width: 60px; }
.lr-voice-note-player { height: 32px; max-width: 220px; vertical-align: middle; }

.lr-note-row td {
	background: transparent;
	padding: 0 10px 10px;
	border-radius: 0;
}
.lr-note-textarea {
	width: 70%;
	min-height: 34px;
	resize: vertical;
	padding: 6px 8px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-family: inherit;
	font-size: 13px;
	vertical-align: middle;
}
.lr-save-note-btn { margin: 0 0 0 8px; vertical-align: middle; }
[dir="rtl"] .lr-save-note-btn { margin: 0 8px 0 0; }

.lr-export-btn { margin-top: 14px; display: inline-block; text-decoration: none; background: #CC1939; color: #fff; }
.lr-export-btn:hover { background: #a91230; color: #fff; }

.lr-summary-report { margin-top: 28px; }
.lr-summary-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.lr-summary-item {
	flex: 1; min-width: 110px; text-align: center; padding: 12px; border-radius: 10px;
	background: #f7f9fb; font-weight: 600; color: #333; font-size: 13px;
}
.lr-summary-item span { display: block; font-size: 20px; font-weight: 700; margin-bottom: 4px; }

/* ---------------- Mobile responsiveness ---------------- */
@media (max-width: 600px) {
	.lr-login-box, .lr-dashboard {
		margin: 8px;
		padding: 14px;
		border-radius: 8px;
	}

	.lr-header { flex-direction: column; align-items: flex-start; }
	.lr-header-right { display: flex; gap: 10px; align-items: center; }

	.lr-stats, .lr-budget { gap: 8px; }
	.lr-stat-card, .lr-budget-item { min-width: calc(50% - 8px); padding: 12px; }
	.lr-stat-number { font-size: 20px; }
	.lr-budget-value { font-size: 17px; }

	.lr-account-manager { flex-wrap: wrap; }

	.lr-campaign-images img { width: 100px; height: 75px; }
	.lr-ad-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

	/* Convert the leads table into a stacked "card" list on small screens */
	.lr-table-scroll { overflow: visible; }
	.lr-leads-table { min-width: 0; }
	.lr-leads-table thead { display: none; }
	.lr-leads-table, .lr-leads-table tbody, .lr-leads-table tr, .lr-leads-table td {
		display: block;
		width: 100%;
	}
	.lr-leads-table tr {
		border: 1px solid #eee;
		border-radius: 12px;
		margin-bottom: 14px;
		padding: 14px 16px;
	}
	.lr-leads-table td {
		white-space: normal;
		border-bottom: 1px solid #f3f3f3;
		padding: 10px 8px;
		border-radius: 8px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 10px;
	}
	.lr-leads-table td:last-child { border-bottom: none; }
	.lr-leads-table td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #777;
		flex-shrink: 0;
	}
	[dir="rtl"] .lr-leads-table td { flex-direction: row-reverse; }
	.lr-leads-table .lr-empty-row td { display: block; text-align: center; }
	.lr-leads-table .lr-empty-row td::before { content: ''; }
	.lr-leads-table tr td.lr-lead-number {
		font-weight: 700;
		color: #222;
		background: transparent;
		border-bottom: 1px solid #eee;
	}

	/* Stack the phone number above a full-width, wrapped row of bigger contact icons */
	.lr-leads-table td.lr-phone-cell {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 8px !important;
	}
	.lr-phone-cell .lr-contact-icons-row {
		width: 100%;
		margin-top: 2px;
		gap: 12px;
	}
	.lr-phone-cell .lr-contact-icon {
		width: 40px;
		height: 40px;
		font-size: 19px;
	}
	.lr-phone-cell .lr-contact-icon svg { width: 20px; height: 20px; }

	.lr-note-row td {
		display: block !important;
		padding: 6px 0 10px !important;
	}
	.lr-note-row td::before { content: '' !important; }
	.lr-note-textarea { width: 100%; }
	.lr-save-note-btn { margin: 6px 0 0 !important; display: inline-block; }

	.lr-summary-grid { gap: 8px; }
	.lr-summary-item { min-width: calc(50% - 8px); font-size: 12px; }

	/* Simpler, more compact date display on mobile */
	.lr-date-cell { font-size: 12px; color: #888; }
}
