/**
 * Resha Leads Dashboard Premium Stylesheet
 * Gold accents (#c9a24a), Slate background structure, and responsive alignments.
 */

:root {
	--resha-gold: #c9a24a;
	--resha-gold-hover: #b8913b;
	--resha-slate-50: #f8fafc;
	--resha-slate-100: #f1f5f9;
	--resha-slate-200: #e2e8f0;
	--resha-slate-300: #cbd5e1;
	--resha-slate-700: #334155;
	--resha-slate-800: #1e293b;
	--resha-slate-900: #0f172a;
	--resha-border-radius: 12px;
	--resha-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	--resha-font-sans: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.resha-leads-app {
	font-family: var(--resha-font-sans);
	max-width: 1400px;
	margin: 2rem auto;
	padding: 0 1.5rem;
	color: var(--resha-slate-800);
}

/* 1. Hero Header Section */
.resha-leads-hero {
	background: linear-gradient(135deg, var(--resha-slate-900) 0%, #1e293b 100%);
	color: #fff;
	border-radius: var(--resha-border-radius);
	padding: 2.5rem;
	margin-bottom: 2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
	position: relative;
	overflow: hidden;
}

.resha-leads-hero::after {
	content: '';
	position: absolute;
	top: -50%;
	right: -20%;
	width: 350px;
	height: 350px;
	background: radial-gradient(circle, rgba(201, 162, 74, 0.15) 0%, rgba(201, 162, 74, 0) 70%);
	pointer-events: none;
}

.resha-leads-hero-text h1 {
	font-family: var(--resha-font-sans);
	font-size: 2.25rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 0.5rem 0;
	letter-spacing: -0.025em;
}

.resha-leads-hero-text p {
	color: var(--resha-slate-300);
	margin: 0;
	font-size: 1.05rem;
}

.resha-leads-hero-actions {
	display: flex;
	gap: 0.75rem;
	z-index: 10;
}

/* 2. Premium Buttons */
.resha-leads-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--resha-font-sans);
	font-size: 0.95rem;
	font-weight: 600;
	padding: 0.75rem 1.25rem;
	border-radius: 8px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: var(--resha-transition);
	line-height: 1.2;
}

.resha-leads-btn-primary {
	background-color: var(--resha-gold);
	color: #fff;
}

.resha-leads-btn-primary:hover {
	background-color: var(--resha-gold-hover);
	transform: translateY(-1px);
}

.resha-leads-btn-outline {
	background-color: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.2);
}

.resha-leads-btn-outline:hover {
	background-color: rgba(255, 255, 255, 0.1);
	border-color: #fff;
}

.resha-leads-btn-danger {
	background-color: #ef4444;
	color: #fff;
}

.resha-leads-btn-danger:hover {
	background-color: #dc2626;
}

/* 3. Stats Grid Panel */
.resha-leads-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.25rem;
	margin-bottom: 2rem;
}

.resha-leads-stat-card {
	background: #fff;
	border: 1px solid var(--resha-slate-200);
	border-radius: var(--resha-border-radius);
	padding: 1.5rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	transition: var(--resha-transition);
	position: relative;
	overflow: hidden;
}

.resha-leads-stat-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 4px;
	height: 100%;
	background-color: var(--resha-gold);
}

.resha-leads-stat-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.08);
}

.resha-leads-stat-title {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--resha-slate-700);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.5rem;
}

.resha-leads-stat-value {
	font-size: 2.25rem;
	font-weight: 700;
	color: var(--resha-slate-900);
	margin-bottom: 0.25rem;
	line-height: 1;
}

.resha-leads-stat-desc {
	font-size: 0.85rem;
	color: #64748b;
}

/* 4. Toolbar Filters */
.resha-leads-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.5rem;
	background: var(--resha-slate-50);
	padding: 1rem 1.25rem;
	border-radius: var(--resha-border-radius);
	border: 1px solid var(--resha-slate-200);
}

.resha-leads-search-wrapper {
	position: relative;
	flex: 1;
	max-width: 500px;
}

.resha-leads-search-wrapper .search-icon {
	position: absolute;
	left: 0.85rem;
	top: 50%;
	transform: translateY(-50%);
	color: #64748b;
	pointer-events: none;
}

.resha-leads-search-wrapper input {
	width: 100%;
	padding: 0.75rem 1rem 0.75rem 2.6rem;
	border: 1px solid var(--resha-slate-300);
	border-radius: 8px;
	font-family: var(--resha-font-sans);
	font-size: 0.95rem;
	background: #fff;
	transition: var(--resha-transition);
}

.resha-leads-search-wrapper input:focus {
	border-color: var(--resha-gold);
	outline: none;
	box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.15);
}

.resha-leads-sort-wrapper {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.resha-leads-sort-wrapper label {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--resha-slate-700);
}

.resha-leads-sort-wrapper select {
	padding: 0.7rem 1.75rem 0.7rem 1rem;
	border: 1px solid var(--resha-slate-300);
	border-radius: 8px;
	font-family: var(--resha-font-sans);
	font-size: 0.95rem;
	background: #fff;
	cursor: pointer;
	transition: var(--resha-transition);
}

.resha-leads-sort-wrapper select:focus {
	border-color: var(--resha-gold);
	outline: none;
}

/* 5. Leads Data Table */
.resha-leads-table-container {
	background: #fff;
	border: 1px solid var(--resha-slate-200);
	border-radius: var(--resha-border-radius);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	overflow-x: auto;
	margin-bottom: 1.5rem;
}

.resha-leads-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	font-size: 0.95rem;
}

.resha-leads-table th {
	background-color: var(--resha-slate-100);
	color: var(--resha-slate-900);
	font-weight: 700;
	padding: 1.15rem 1.25rem;
	border-bottom: 2px solid var(--resha-slate-200);
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.05em;
}

.resha-leads-table td {
	padding: 1.15rem 1.25rem;
	border-bottom: 1px solid var(--resha-slate-100);
	vertical-align: middle;
	color: var(--resha-slate-700);
}

.resha-leads-table tr:hover td {
	background-color: var(--resha-slate-50);
}

.resha-lead-name-cell {
	font-weight: 600;
	color: var(--resha-slate-900);
}

.resha-leads-table-empty {
	text-align: center;
	padding: 3rem 0;
	color: #64748b;
	font-style: italic;
}

/* Quick Actions in Table */
.resha-lead-action-cell {
	display: inline-flex;
	gap: 0.5rem;
}

.resha-lead-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	border: 1px solid var(--resha-slate-200);
	background: #fff;
	cursor: pointer;
	transition: var(--resha-transition);
	color: var(--resha-slate-700);
}

.resha-lead-action-btn:hover {
	border-color: var(--resha-gold);
	color: var(--resha-gold);
	background: rgba(201, 162, 74, 0.05);
}

.resha-lead-action-btn.btn-wa:hover {
	border-color: #25d366;
	color: #25d366;
	background: rgba(37, 211, 102, 0.05);
}

.resha-lead-action-btn.btn-call:hover {
	border-color: #3b82f6;
	color: #3b82f6;
	background: rgba(59, 130, 246, 0.05);
}



.resha-lead-action-btn svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

.resha-lead-source-cell {
	max-width: 220px;
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
}

.resha-lead-source-cell a {
	color: var(--resha-gold);
	text-decoration: none;
	transition: var(--resha-transition);
}

.resha-lead-source-cell a:hover {
	color: var(--resha-gold-hover);
	text-decoration: underline;
}

.resha-lead-ua-cell {
	max-width: 250px;
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
	font-family: monospace;
	font-size: 0.8rem;
	color: #64748b;
	cursor: help;
}

/* 6. Pagination UI */
.resha-leads-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.resha-leads-pagination span {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--resha-slate-700);
}



/* 8. Authentication/Login Gate */
.resha-leads-login-gate {
	max-width: 480px;
	margin: 5rem auto;
	background: #fff;
	border: 1px solid var(--resha-slate-200);
	border-radius: var(--resha-border-radius);
	padding: 3rem 2rem;
	text-align: center;
	box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.resha-leads-gate-icon {
	width: 72px;
	height: 72px;
	border-radius: 999px;
	background: rgba(201, 162, 74, 0.1);
	color: var(--resha-gold);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1.5rem auto;
}

.resha-leads-gate-icon svg {
	width: 36px;
	height: 36px;
}

.resha-leads-login-gate h2 {
	font-size: 1.6rem;
	font-weight: 700;
	margin: 0 0 0.75rem 0;
	color: var(--resha-slate-900);
}

.resha-leads-login-gate p {
	color: var(--resha-slate-700);
	font-size: 0.95rem;
	line-height: 1.5;
	margin: 0 0 2rem 0;
}

.resha-leads-gate-btn {
	background: var(--resha-gold);
	color: #fff;
	border: none;
	font-family: var(--resha-font-sans);
	font-weight: 700;
	font-size: 1rem;
	padding: 0.9rem 2rem;
	border-radius: 8px;
	cursor: pointer;
	transition: var(--resha-transition);
	box-shadow: 0 4px 6px rgba(201, 162, 74, 0.2);
}

.resha-leads-gate-btn:hover {
	background: var(--resha-gold-hover);
	transform: translateY(-2px);
	box-shadow: 0 6px 12px rgba(201, 162, 74, 0.3);
}

.resha-leads-login-gate--denied .resha-leads-gate-icon {
	background: rgba(239, 68, 68, 0.1);
	color: #ef4444;
}

.resha-leads-login-gate--denied .resha-leads-gate-btn {
	background: var(--resha-slate-900);
	box-shadow: none;
}

.resha-leads-login-gate--denied .resha-leads-gate-btn:hover {
	background: #000;
}

/* Skeleton Loading Effect */
.resha-skeleton-row td {
	padding: 1.25rem;
}

.resha-skeleton-bar {
	height: 16px;
	background: linear-gradient(90deg, #e2e8f0 25%, #cbd5e1 50%, #e2e8f0 75%);
	background-size: 200% 100%;
	animation: reshaSkeletonGlow 1.5s infinite;
	border-radius: 4px;
	width: 80%;
}

@keyframes reshaSkeletonGlow {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* 9. Responsive Adjustments */
@media (max-width: 900px) {
	.resha-leads-hero {
		flex-direction: column;
		align-items: flex-start;
		gap: 1.5rem;
	}

	.resha-leads-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.resha-leads-search-wrapper {
		max-width: 100%;
	}

	.hide-mobile {
		display: none;
	}
}

@media (max-width: 600px) {
	.resha-leads-app {
		padding: 0 0.75rem;
	}

	.resha-leads-hero {
		padding: 1.5rem;
	}

	.resha-leads-hero-text h1 {
		font-size: 1.75rem;
	}
}
