.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-lang-switch { text-align: center; margin-bottom: 16px; }
.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: #2271b1; color: #fff; }

.lr-ad-status-bar { text-align: center; margin-bottom: 18px; }
.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: #2271b1; color: #fff; }
.lr-btn-small { background: #f0f6ff; color: #2271b1; border: 1px solid #2271b1; font-size: 13px; padding: 6px 12px; }
.lr-error { color: #d63638; font-weight: 600; }
.lr-notice { text-align: center; padding: 20px; }
.lr-link { color: #2271b1; 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 {
	position: relative;
	margin: 10px auto 20px;
	border-radius: 10px;
	overflow: hidden;
	background: #f7f9fb;
	max-width: 50%;
}
.lr-carousel-track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.lr-carousel-track::-webkit-scrollbar { display: none; }
.lr-carousel-slide {
	flex: 0 0 100%;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px;
	box-sizing: border-box;
}
.lr-carousel-image-wrap {
	position: relative;
	width: 100%;
	height: 320px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #eef1f4;
	border-radius: 6px;
	overflow: hidden;
}
.lr-carousel-image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
.lr-approved-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(46, 125, 50, 0.92);
	color: #fff;
	font-weight: 800;
	font-size: 28px;
	padding: 18px 32px;
	border-radius: 50%;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	box-shadow: 0 4px 14px rgba(0,0,0,0.35);
	text-align: center;
	line-height: 1.1;
}
.lr-approved-badge .lr-approved-check { font-size: 40px; }
.lr-approved-badge.show { display: flex; }
.lr-approve-btn {
	border: 1px solid #2271b1;
	background: #fff;
	color: #2271b1;
	padding: 6px 14px;
	border-radius: 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.lr-approve-btn.approved {
	background: #2e7d32;
	border-color: #2e7d32;
	color: #fff;
	cursor: default;
}
.lr-carousel-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,0.45);
	color: #fff;
	border: none;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.lr-carousel-prev { left: 10px; }
.lr-carousel-next { right: 10px; }
.lr-carousel-dots {
	position: static;
	display: flex;
	justify-content: center;
	gap: 6px;
	padding: 8px 0 12px;
	background: transparent;
}
.lr-carousel-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #cfd8dc;
	cursor: pointer;
}
.lr-carousel-dot.active { background: #2271b1; }

.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: #2271b1; 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: #f0f6ff; 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: #2271b1; 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; }

/* 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: nowrap; }
.lr-phone-number { margin-inline-end: 6px; }
.lr-phone-masked {
	color: #999;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	pointer-events: none;
}
.lr-contact-icon {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	margin-inline-start: 4px;
	font-size: 15px;
	vertical-align: middle;
}
.lr-whatsapp-contact { color: #25D366; }
.lr-call-icon { color: #2271b1; }
.lr-contact-count {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin-inline-start: 6px;
	font-size: 12px;
	color: #999;
}

.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: #1e8e3e; color: #fff; }
.lr-export-btn:hover { background: #17722f; 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-carousel { max-width: 100%; }
	.lr-carousel-image-wrap { height: 200px; }
	.lr-carousel-btn { width: 28px; height: 28px; font-size: 16px; }

	/* 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: 10px;
		margin-bottom: 12px;
		padding: 8px 12px;
	}
	.lr-leads-table td {
		white-space: normal;
		border-bottom: 1px solid #f3f3f3;
		padding: 8px 0;
		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: #2271b1;
		background: transparent;
		border-bottom: 1px solid #eee;
	}

	.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; }
}
