/**
 * تعديلات اللوحة الخارجية فوق ستايل البلجن.
 *
 * fi.css منقول من البلجن حرف بحرف عشان يفضل سهل نحدّثه لما البلجن يتحدّث،
 * فأي فرق بين «جوه ووردبريس» و«موقع مستقل» بيتظبط من هنا بس.
 */

/* ------------------------------------------------ فروق الصفحة المستقلة */

html,
body {
	margin: 0;
	padding: 0;
	background: #0c1020;
	min-height: 100%;
}

/* الهامش السالب ده كان بيعوّض حواف لوحة ووردبريس — مالوش لازمة هنا،
   وبيعمل تمرير أفقي لو فضل. */
.fi-app {
	margin: 0;
}

.fi-app--with-sidebar {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.fi-main {
	flex: 1;
	min-width: 0;
}

.wec-sidebar {
	flex: 0 0 220px;
	background: rgba(255,255,255,0.04);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 12px;
	padding: 14px;
	position: sticky;
	top: 12px;
}

.wec-sidebar__title {
	font-size: 14px;
	margin: 0 0 10px;
	opacity: 0.7;
}

.wec-access {
	margin-bottom: 12px;
	padding: 10px;
	border-radius: 8px;
	background: rgba(255,255,255,0.03);
}

.wec-access__head {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
}

.wec-access__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #888;
	flex: 0 0 auto;
}

.wec-access[data-wec-state="on"] .wec-access__dot { background: #2ecc71; }
.wec-access[data-wec-state="off"] .wec-access__dot { background: #e74c3c; }

.wec-access__reason {
	margin: 6px 0 0;
	font-size: 12px;
	opacity: 0.75;
	line-height: 1.5;
}

/* رأس الجدول اللاصق كان بينزل تحت شريط أدمن ووردبريس. مفيش شريط هنا. */
.fi-thead {
	top: 0;
}

/* اسم المنتج كان لينك على صفحة تعديل في ووردبريس — بقى نص عادي. */
.fi-product__name {
	cursor: default;
	text-decoration: none;
}

/* ------------------------------------------------------- هوية المستخدم */

.wec-user {
	display: inline-flex;
	align-items: center;
	padding: 0 10px;
	color: var( --text-2 );
	font-size: var( --fs-sm );
	font-weight: 600;
	white-space: nowrap;
}

/* ------------------------------------------------------ شاشة التحميل */

.wec-boot {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	min-height: 100vh;
	color: #8b96bd;
	font: 600 15px/1.6 system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

.wec-boot[ hidden ] {
	display: none;
}

.wec-boot__spinner {
	width: 38px;
	height: 38px;
	border: 3px solid #29335a;
	border-top-color: #4f7cff;
	border-radius: 50%;
	animation: wec-spin 0.8s linear infinite;
}

@keyframes wec-spin {
	to {
		transform: rotate( 360deg );
	}
}

/* --------------------------------------------------------- شاشة الدخول */

.wec-login {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 24px;
	background:
		radial-gradient( 900px 420px at 80% -10%, rgba( 116, 148, 255, 0.30 ), transparent 60% ),
		#0c1020;
	font-family: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

.wec-login[ hidden ] {
	display: none;
}

.wec-login__card {
	width: 100%;
	max-width: 380px;
	padding: 34px 30px 30px;
	background: linear-gradient( 125deg, #151c33 0%, #1b2340 100% );
	border: 1px solid #29335a;
	border-radius: 22px;
	box-shadow: 0 30px 70px rgba( 0, 0, 0, 0.55 );
	text-align: center;
}

.wec-login__mark {
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	margin: 0 auto 16px;
	border-radius: 16px;
	background: linear-gradient( 135deg, #4f7cff, #8b5cf6 );
	color: #fff;
	font-size: 26px;
	font-weight: 800;
}

.wec-login__card h1 {
	margin: 0;
	color: #eef2ff;
	font-size: 22px;
	font-weight: 800;
}

.wec-login__sub {
	margin: 6px 0 26px;
	color: #8b96bd;
	font-size: 14px;
}

.wec-login__field {
	display: block;
	margin-bottom: 16px;
	text-align: right;
}

.wec-login__field span {
	display: block;
	margin-bottom: 7px;
	color: #b9c3e6;
	font-size: 13.5px;
	font-weight: 600;
}

.wec-login__field input {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	background: #0c1020;
	border: 1px solid #29335a;
	border-radius: 12px;
	color: #eef2ff;
	font-size: 15px;
	font-family: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.wec-login__field input:focus {
	outline: none;
	border-color: #4f7cff;
	box-shadow: 0 0 0 3px rgba( 79, 124, 255, 0.22 );
}

.wec-login__submit {
	width: 100%;
	margin-top: 8px;
	padding: 13px;
	background: linear-gradient( 135deg, #4f7cff, #8b5cf6 );
	border: 0;
	border-radius: 12px;
	color: #fff;
	font-size: 15.5px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	transition: transform 0.2s cubic-bezier( 0.34, 1.56, 0.64, 1 ), opacity 0.2s;
}

.wec-login__submit:hover:not( :disabled ) {
	transform: translateY( -2px );
}

.wec-login__submit:disabled {
	opacity: 0.6;
	cursor: default;
}

.wec-login__error {
	margin: 0 0 14px;
	padding: 10px 12px;
	background: rgba( 226, 86, 77, 0.12 );
	border: 1px solid rgba( 226, 86, 77, 0.45 );
	border-radius: 10px;
	color: #ff9d95;
	font-size: 13.5px;
	text-align: right;
}

.wec-login__error[ hidden ] {
	display: none;
}
