/* ==========================================================
   REAL ESTATE CRM
   MODULES CSS
   ========================================================== */


/* ==========================================================
   PAGE
   ========================================================== */

.recrm-page {
	width: 100%;
	box-sizing: border-box;
}

.recrm-page *,
.recrm-page *::before,
.recrm-page *::after {
	box-sizing: border-box;
}


/* ==========================================================
   PAGE HEADING
   ========================================================== */

.recrm-page-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 24px;
}

.recrm-page-heading h1 {
	margin: 0 0 6px;
	font-size: 28px;
	line-height: 1.2;
	font-weight: 700;
	color: #172033;
}

.recrm-page-heading p {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: #64748b;
}

.recrm-dashboard-date {
	padding: 10px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #ffffff;
	color: #64748b;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}


/* ==========================================================
   BUTTONS
   ========================================================== */

.recrm-primary-button,
.recrm-secondary-button,
.recrm-danger-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 40px;
	padding: 0 15px;
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: all .2s ease;
}

.recrm-primary-button {
	border: 1px solid #2563eb;
	background: #2563eb;
	color: #ffffff;
}

.recrm-primary-button:hover {
	background: #1d4ed8;
	border-color: #1d4ed8;
	color: #ffffff;
}

.recrm-secondary-button {
	border: 1px solid #dbe2ea;
	background: #ffffff;
	color: #334155;
}

.recrm-secondary-button:hover {
	background: #f8fafc;
	border-color: #cbd5e1;
	color: #0f172a;
}

.recrm-danger-button {
	border: 1px solid #fecaca;
	background: #fff5f5;
	color: #dc2626;
}

.recrm-danger-button:hover {
	background: #fee2e2;
	border-color: #fca5a5;
}

.recrm-primary-button:disabled,
.recrm-secondary-button:disabled,
.recrm-danger-button:disabled {
	opacity: .55;
	cursor: not-allowed;
}


/* ==========================================================
   STAT GRID
   ========================================================== */

.recrm-stat-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 20px;
}

.recrm-stat-card {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 105px;
	padding: 18px;
	border: 1px solid #e5eaf0;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
}

.recrm-stat-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: #eff6ff;
	color: #2563eb;
	font-size: 19px;
	font-weight: 700;
}

.recrm-stat-card span {
	display: block;
	margin-bottom: 4px;
	color: #64748b;
	font-size: 12px;
	font-weight: 500;
}

.recrm-stat-card strong {
	display: block;
	color: #172033;
	font-size: 23px;
	line-height: 1.2;
	font-weight: 700;
}

.recrm-stat-card small {
	display: block;
	margin-top: 4px;
	color: #94a3b8;
	font-size: 11px;
}


/* ==========================================================
   PANELS
   ========================================================== */

.recrm-panel {
	margin-bottom: 20px;
	border: 1px solid #e5eaf0;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
	overflow: hidden;
}

.recrm-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	padding: 18px 20px;
	border-bottom: 1px solid #edf1f5;
}

.recrm-panel-header h3 {
	margin: 0 0 4px;
	color: #172033;
	font-size: 16px;
	font-weight: 700;
}

.recrm-panel-header p {
	margin: 0;
	color: #94a3b8;
	font-size: 12px;
}

.recrm-result-count {
	color: #64748b;
	font-size: 12px;
	font-weight: 600;
}


/* ==========================================================
   FORM GRID
   ========================================================== */

.recrm-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	padding: 20px;
}

.recrm-form-field {
	min-width: 0;
}

.recrm-form-field label {
	display: block;
	margin-bottom: 7px;
	color: #334155;
	font-size: 12px;
	font-weight: 600;
}

.recrm-form-field input,
.recrm-form-field select,
.recrm-form-field textarea {
	display: block;
	width: 100%;
	min-height: 42px;
	padding: 9px 12px;
	border: 1px solid #dbe2ea;
	border-radius: 8px;
	background: #ffffff;
	color: #172033;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.4;
	outline: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.recrm-form-field textarea {
	min-height: 95px;
	resize: vertical;
}

.recrm-form-field input::placeholder,
.recrm-form-field textarea::placeholder {
	color: #a1adbd;
}

.recrm-form-field input:focus,
.recrm-form-field select:focus,
.recrm-form-field textarea:focus {
	border-color: #60a5fa;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.recrm-form-field .recrm-field-error,
.recrm-form-field .recrm-field-error:focus {
	border-color: #ef4444;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, .08);
}

.recrm-field-message {
	margin-top: 5px;
	color: #dc2626;
	font-size: 11px;
	line-height: 1.4;
}


/* ==========================================================
   FILTER FORM
   ========================================================== */

.recrm-lead-filter-form .recrm-form-grid {
	padding: 18px 20px;
	grid-template-columns: 1.5fr 1fr 1fr auto;
	align-items: end;
}

.recrm-form-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding: 0 20px 20px;
}

.recrm-lead-filter-form .recrm-form-actions {
	padding: 0;
}


/* ==========================================================
   TABLE
   ========================================================== */

.recrm-table-wrapper {
	width: 100%;
	overflow-x: auto;
}

.recrm-table {
	width: 100%;
	min-width: 900px;
	border-collapse: collapse;
}

.recrm-table th {
	padding: 12px 15px;
	border-bottom: 1px solid #e5eaf0;
	background: #f8fafc;
	color: #64748b;
	font-size: 11px;
	font-weight: 700;
	text-align: left;
	text-transform: uppercase;
	letter-spacing: .03em;
	white-space: nowrap;
}

.recrm-table td {
	padding: 14px 15px;
	border-bottom: 1px solid #edf1f5;
	color: #334155;
	font-size: 12px;
	vertical-align: middle;
}

.recrm-table tbody tr:last-child td {
	border-bottom: 0;
}

.recrm-table tbody tr:hover {
	background: #fafcff;
}

.recrm-table td strong {
	color: #172033;
	font-weight: 650;
}


/* ==========================================================
   LEAD STATUS
   ========================================================== */

.recrm-lead-status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 26px;
	padding: 0 9px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	white-space: nowrap;
}

.recrm-status-new {
	background: #eff6ff;
	color: #2563eb;
}

.recrm-status-contacted {
	background: #f1f5f9;
	color: #475569;
}

.recrm-status-interested {
	background: #ecfdf5;
	color: #059669;
}

.recrm-status-followup {
	background: #fff7ed;
	color: #ea580c;
}

.recrm-status-site_visit {
	background: #f5f3ff;
	color: #7c3aed;
}

.recrm-status-negotiation {
	background: #fefce8;
	color: #ca8a04;
}

.recrm-status-converted {
	background: #ecfdf5;
	color: #16a34a;
}

.recrm-status-lost {
	background: #fef2f2;
	color: #dc2626;
}


/* ==========================================================
   EMPTY STATE
   ========================================================== */

.recrm-empty-state {
	padding: 45px 20px;
	text-align: center;
}

.recrm-empty-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: #f1f5f9;
	color: #94a3b8;
	font-size: 20px;
	font-weight: 700;
}

.recrm-empty-state h3,
.recrm-empty-state h4 {
	margin: 0 0 6px;
	color: #334155;
	font-size: 16px;
	font-weight: 700;
}

.recrm-empty-state p {
	max-width: 500px;
	margin: 0 auto;
	color: #94a3b8;
	font-size: 12px;
	line-height: 1.6;
}


/* ==========================================================
   MODAL
   ========================================================== */

.recrm-modal {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: none;
}

.recrm-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .55);
	backdrop-filter: blur(2px);
}

.recrm-modal-box {
	position: relative;
	z-index: 2;
	width: calc(100% - 30px);
	max-width: 850px;
	max-height: calc(100vh - 40px);
	margin: 20px auto;
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 20px 60px rgba(15, 23, 42, .18);
	overflow: hidden;
	animation: recrmModalIn .2s ease;
}

@keyframes recrmModalIn {
	from {
		opacity: 0;
		transform: translateY(12px) scale(.985);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.recrm-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	padding: 18px 20px;
	border-bottom: 1px solid #edf1f5;
}

.recrm-modal-header h3 {
	margin: 0 0 4px;
	color: #172033;
	font-size: 18px;
	font-weight: 700;
}

.recrm-modal-header p {
	margin: 0;
	color: #94a3b8;
	font-size: 12px;
}

.recrm-modal-close {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: #f8fafc;
	color: #64748b;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.recrm-modal-close:hover {
	background: #f1f5f9;
	color: #172033;
}

.recrm-modal-box form {
	max-height: calc(100vh - 140px);
	overflow-y: auto;
}


/* ==========================================================
   LEAD VIEW
   ========================================================== */

.recrm-lead-view-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	padding: 20px;
}

.recrm-lead-view-item {
	padding: 13px;
	border: 1px solid #e8edf3;
	border-radius: 9px;
	background: #fafcff;
}

.recrm-lead-view-item span {
	display: block;
	margin-bottom: 5px;
	color: #94a3b8;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
}

.recrm-lead-view-item strong {
	display: block;
	color: #334155;
	font-size: 12px;
	font-weight: 650;
	word-break: break-word;
}

.recrm-lead-view-section {
	margin: 0 20px 15px;
	padding: 15px;
	border: 1px solid #e8edf3;
	border-radius: 9px;
	background: #ffffff;
}

.recrm-lead-view-section strong {
	display: block;
	margin-bottom: 7px;
	color: #334155;
	font-size: 12px;
}

.recrm-lead-view-section p {
	margin: 0;
	color: #64748b;
	font-size: 12px;
	line-height: 1.7;
	white-space: pre-wrap;
}


/* ==========================================================
   DASHBOARD
   ========================================================== */

.recrm-dashboard-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
	gap: 20px;
}

.recrm-pipeline {
	padding: 5px 20px 15px;
}

.recrm-pipeline-stage {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	padding: 13px 0;
	border-bottom: 1px solid #edf1f5;
}

.recrm-pipeline-stage:last-child {
	border-bottom: 0;
}

.recrm-pipeline-stage span {
	color: #475569;
	font-size: 12px;
	font-weight: 600;
}

.recrm-pipeline-stage strong {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 26px;
	padding: 0 8px;
	border-radius: 7px;
	background: #eff6ff;
	color: #2563eb;
	font-size: 11px;
}

.recrm-quick-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	padding: 20px;
}

.recrm-quick-action {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 60px;
	padding: 12px;
	border: 1px solid #e5eaf0;
	border-radius: 9px;
	background: #ffffff;
	color: #334155;
	text-decoration: none;
	transition: all .2s ease;
}

.recrm-quick-action:hover {
	border-color: #bfdbfe;
	background: #f8fbff;
	color: #2563eb;
}

.recrm-quick-action span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 7px;
	background: #eff6ff;
	color: #2563eb;
	font-size: 16px;
}

.recrm-quick-action strong {
	font-size: 11px;
}


/* ==========================================================
   SIDEBAR / TOPBAR SUPPORT
   ========================================================== */

.recrm-sidebar-overlay {
	display: none;
}

.recrm-mobile-menu {
	display: none;
}


/* ==========================================================
   BODY MODAL STATE
   ========================================================== */

body.recrm-modal-open {
	overflow: hidden;
}


/* ==========================================================
   RESPONSIVE - TABLET
   ========================================================== */

@media (max-width: 1100px) {

	.recrm-stat-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.recrm-lead-filter-form .recrm-form-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.recrm-dashboard-grid {
		grid-template-columns: 1fr;
	}

}


/* ==========================================================
   RESPONSIVE - MOBILE
   ========================================================== */

@media (max-width: 767px) {

	.recrm-page-heading {
		align-items: flex-start;
		flex-direction: column;
	}

	.recrm-page-heading h1 {
		font-size: 23px;
	}

	.recrm-dashboard-date {
		display: none;
	}

	.recrm-stat-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.recrm-stat-card {
		min-height: 90px;
	}

	.recrm-form-grid {
		grid-template-columns: 1fr !important;
		padding: 15px;
	}

	.recrm-form-field {
		grid-column: 1 !important;
	}

	.recrm-lead-filter-form .recrm-form-actions {
		padding: 0 15px 15px;
		justify-content: flex-start;
	}

	.recrm-panel-header {
		padding: 15px;
	}

	.recrm-table {
		min-width: 850px;
	}

	.recrm-modal-box {
		width: calc(100% - 20px);
		max-height: calc(100vh - 20px);
		margin: 10px auto;
	}

	.recrm-modal-header {
		padding: 15px;
	}

	.recrm-modal-box form {
		max-height: calc(100vh - 110px);
	}

	.recrm-lead-view-grid {
		grid-template-columns: 1fr;
		padding: 15px;
	}

	.recrm-lead-view-section {
		margin-left: 15px;
		margin-right: 15px;
	}

	.recrm-quick-actions {
		grid-template-columns: 1fr;
		padding: 15px;
	}

}


/* ==========================================================
   VERY SMALL MOBILE
   ========================================================== */

@media (max-width: 480px) {

	.recrm-primary-button,
	.recrm-secondary-button,
	.recrm-danger-button {
		min-height: 38px;
		padding: 0 11px;
		font-size: 12px;
	}

	.recrm-stat-card {
		padding: 14px;
	}

	.recrm-stat-card strong {
		font-size: 20px;
	}

	.recrm-panel {
		border-radius: 9px;
	}

}