/**
 * تصميم بوابة RE Space — premium، داكن، عربي RTL، مستقل تماماً عن الـ theme.
 */

/* ===== أساسيات ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

.respace-login-body,
.respace-portal-body {
	font-family: "Segoe UI", "Tajawal", Tahoma, Arial, sans-serif;
	background: #0d0f14;
	color: #e8eaed;
	min-height: 100vh;
	direction: rtl;
}

/* ============================================
   صفحة الـ LOGIN
   ============================================ */
.respace-login-wrap {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background:
		radial-gradient(circle at 20% 20%, rgba(212, 175, 55, 0.08), transparent 40%),
		radial-gradient(circle at 80% 80%, rgba(40, 60, 100, 0.15), transparent 40%),
		#0d0f14;
}

.respace-login-card {
	background: #161a22;
	border: 1px solid #232834;
	border-radius: 20px;
	padding: 44px 38px;
	width: 100%;
	max-width: 400px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.respace-login-brand {
	text-align: center;
	margin-bottom: 32px;
}

.respace-login-logo {
	font-size: 30px;
	font-weight: 800;
	letter-spacing: 2px;
	color: #fff;
}

.respace-login-logo::after {
	content: "";
	display: block;
	width: 44px;
	height: 3px;
	background: #d4af37;
	margin: 12px auto 0;
	border-radius: 2px;
}

.respace-login-tag {
	margin-top: 14px;
	color: #8b93a3;
	font-size: 14px;
}

.respace-login-form label {
	display: block;
	margin: 16px 0 6px;
	font-size: 13px;
	color: #aab1bf;
}

.respace-login-form input {
	width: 100%;
	padding: 13px 14px;
	background: #0d0f14;
	border: 1px solid #2a3040;
	border-radius: 10px;
	color: #fff;
	font-size: 15px;
	transition: border-color 0.2s;
}

.respace-login-form input:focus {
	outline: none;
	border-color: #d4af37;
}

.respace-login-btn {
	width: 100%;
	margin-top: 26px;
	padding: 14px;
	background: #d4af37;
	color: #1a1a1a;
	border: none;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
}

.respace-login-btn:hover { background: #e3c14f; }
.respace-login-btn:active { transform: translateY(1px); }

.respace-login-error {
	background: rgba(192, 57, 43, 0.15);
	border: 1px solid rgba(192, 57, 43, 0.4);
	color: #ff8a7a;
	padding: 12px 14px;
	border-radius: 10px;
	font-size: 14px;
	text-align: center;
	margin-bottom: 8px;
}

.respace-login-foot {
	text-align: center;
	margin-top: 28px;
	color: #5a6273;
	font-size: 12px;
}

/* ============================================
   البوابة (Layout)
   ============================================ */
.respace-portal {
	display: flex;
	min-height: 100vh;
}

/* الشريط الجانبي */
.respace-sidebar {
	width: 250px;
	background: #11151c;
	border-left: 1px solid #232834;
	display: flex;
	flex-direction: column;
	padding: 24px 0;
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
}

.respace-sidebar-brand {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: 2px;
	color: #fff;
	padding: 0 24px 24px;
	border-bottom: 1px solid #232834;
	margin-bottom: 16px;
}

.respace-sidebar-brand::before {
	content: "■ ";
	color: #d4af37;
}

.respace-nav {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 0 12px;
}

.respace-nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 10px;
	color: #aab1bf;
	text-decoration: none;
	font-size: 15px;
	transition: background 0.15s, color 0.15s;
}

.respace-nav-item:hover {
	background: #1a1f29;
	color: #fff;
}

.respace-nav-item.is-active {
	background: #1f2530;
	color: #fff;
	border-right: 3px solid #d4af37;
}

.respace-nav-icon {
	font-size: 16px;
	width: 20px;
	text-align: center;
}

.respace-sidebar-foot {
	padding: 16px 20px 0;
	border-top: 1px solid #232834;
	margin: 16px 12px 0;
}

.respace-user-name { font-weight: 700; color: #fff; font-size: 15px; }
.respace-user-role { color: #d4af37; font-size: 12px; margin-top: 2px; }

.respace-logout {
	display: block;
	margin-top: 14px;
	padding: 10px;
	text-align: center;
	background: #1a1f29;
	color: #aab1bf;
	border-radius: 8px;
	text-decoration: none;
	font-size: 14px;
	transition: background 0.15s;
}

.respace-logout:hover { background: #232834; color: #fff; }

/* منطقة المحتوى */
.respace-content {
	flex: 1;
	margin-right: 250px;
	padding: 36px 40px;
}

.respace-page-head { margin-bottom: 28px; }
.respace-page-head h1 { font-size: 26px; color: #fff; font-weight: 700; }
.respace-page-sub { color: #8b93a3; margin-top: 6px; font-size: 15px; }

.respace-page-head-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

/* بطاقات الإحصائيات */
.respace-cards {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	margin-bottom: 28px;
}

.respace-card {
	background: linear-gradient(135deg, #161a22 0%, #1c2230 100%);
	border: 1px solid #232834;
	border-radius: 16px;
	padding: 24px 30px;
	min-width: 170px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.respace-card-num {
	font-size: 36px;
	font-weight: 800;
	color: #d4af37;
	line-height: 1;
}

.respace-card-label { color: #8b93a3; font-size: 14px; }

/* روابط سريعة */
.respace-quick {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}

.respace-quick-link {
	padding: 12px 22px;
	background: #161a22;
	border: 1px solid #232834;
	border-radius: 10px;
	color: #e8eaed;
	text-decoration: none;
	font-size: 14px;
	transition: background 0.15s;
}

.respace-quick-link:hover { background: #1f2530; }
.respace-quick-primary { background: #d4af37; color: #1a1a1a; border-color: #d4af37; font-weight: 700; }
.respace-quick-primary:hover { background: #e3c14f; }

/* أزرار */
.respace-btn-primary {
	display: inline-block;
	padding: 12px 24px;
	background: #d4af37;
	color: #1a1a1a;
	border: none;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s;
}

.respace-btn-primary:hover { background: #e3c14f; }
.respace-btn-lg { margin-top: 24px; padding: 14px 40px; font-size: 16px; }

/* الجداول */
.respace-table-wrap {
	background: #161a22;
	border: 1px solid #232834;
	border-radius: 16px;
	overflow: hidden;
}

.respace-data-table {
	width: 100%;
	border-collapse: collapse;
}

.respace-data-table thead th {
	background: #11151c;
	color: #aab1bf;
	font-weight: 600;
	font-size: 13px;
	padding: 14px 18px;
	text-align: right;
	border-bottom: 1px solid #232834;
}

.respace-data-table tbody td {
	padding: 14px 18px;
	border-bottom: 1px solid #1c212b;
	font-size: 14px;
	color: #e8eaed;
}

.respace-data-table tbody tr:last-child td { border-bottom: none; }
.respace-data-table tbody tr:hover { background: #1a1f29; }

.respace-empty {
	text-align: center !important;
	padding: 48px 0 !important;
	color: #5a6273 !important;
	font-size: 15px;
}

/* شارات الحالة */
.respace-status {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: #232834;
	color: #aab1bf;
}

.respace-status-new { background: rgba(10, 91, 211, 0.2); color: #5b9bff; }
.respace-status-contacted { background: rgba(184, 115, 10, 0.2); color: #e0a44a; }
.respace-status-qualified { background: rgba(26, 138, 79, 0.2); color: #4cd98a; }
.respace-status-meeting,
.respace-status-site_visit { background: rgba(107, 47, 184, 0.2); color: #b07fe0; }
.respace-status-negotiation { background: rgba(192, 57, 43, 0.2); color: #ff8a7a; }
.respace-status-reservation,
.respace-status-contract { background: rgba(10, 125, 114, 0.2); color: #3fd9c9; }
.respace-status-won { background: #d4af37; color: #1a1a1a; }
.respace-status-lost { background: #232834; color: #6a7283; }

/* زرار واتساب */
.respace-wa-btn {
	display: inline-block;
	background: #25d366;
	color: #fff;
	padding: 6px 16px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s;
}

.respace-wa-btn:hover { background: #1da851; }

/* تنبيهات */
.respace-alert {
	padding: 13px 18px;
	border-radius: 10px;
	font-size: 14px;
	margin-bottom: 20px;
}

.respace-alert-success { background: rgba(26, 138, 79, 0.15); border: 1px solid rgba(26, 138, 79, 0.4); color: #4cd98a; }
.respace-alert-error { background: rgba(192, 57, 43, 0.15); border: 1px solid rgba(192, 57, 43, 0.4); color: #ff8a7a; }

/* الفورم */
.respace-portal-form {
	background: #161a22;
	border: 1px solid #232834;
	border-radius: 16px;
	padding: 30px;
	max-width: 800px;
}

.respace-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.respace-field { display: flex; flex-direction: column; }
.respace-field label { font-size: 13px; color: #aab1bf; margin-bottom: 7px; }
.respace-field label span { color: #ff8a7a; }

.respace-field input,
.respace-field select {
	padding: 12px 14px;
	background: #0d0f14;
	border: 1px solid #2a3040;
	border-radius: 10px;
	color: #fff;
	font-size: 15px;
	width: 100%;
}

.respace-field input:focus,
.respace-field select:focus { outline: none; border-color: #d4af37; }

.respace-field-row { display: flex; gap: 10px; }

/* ===== متجاوب (موبايل) ===== */
@media (max-width: 782px) {
	.respace-sidebar {
		width: 100%;
		position: relative;
		flex-direction: row;
		flex-wrap: wrap;
		padding: 16px;
	}
	.respace-content { margin-right: 0; padding: 24px 18px; }
	.respace-nav { flex-direction: row; flex-wrap: wrap; }
	.respace-form-grid { grid-template-columns: 1fr; }
	.respace-sidebar-foot { width: 100%; }
}
