/* نماذج أكابرس — تنسيق الواجهة. عمود واحد، تسميات ظاهرة، اتجاه منطقي (RTL). */

.acaprs-form {
	max-width: none;
	width: 100%;
	margin: 1.5rem 0;
}

.acaprs-field {
	margin-bottom: 1.25rem;
}

.acaprs-field label,
.acaprs-field legend {
	display: block;
	font-weight: 700;
	margin-bottom: 0.35rem;
}

.acaprs-field input[type="text"],
.acaprs-field input[type="email"],
.acaprs-field input[type="file"],
.acaprs-field textarea,
.acaprs-field select {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	font: inherit;
}

.acaprs-field input[aria-invalid="true"],
.acaprs-field textarea[aria-invalid="true"],
.acaprs-field select[aria-invalid="true"] {
	border-color: #b32d2e;
	outline: 2px solid rgba(179, 45, 46, 0.25);
}

.acaprs-required {
	color: #b32d2e;
}

.acaprs-field-error {
	color: #b32d2e;
	font-weight: 600;
	margin: 0 0 0.4rem;
}

.acaprs-error-summary {
	border: 2px solid #b32d2e;
	background: #fcf0f1;
	padding: 1rem;
	margin-bottom: 1.5rem;
	border-radius: 4px;
}

.acaprs-error-summary ul {
	margin: 0.5rem 0 0;
	padding-inline-start: 1.25rem;
}

.acaprs-error-summary a {
	color: #b32d2e;
}

.acaprs-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.acaprs-radios {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.acaprs-radio-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	border: 1px solid #c3c4c7;
	border-radius: 999px;
	padding: 0.4rem 0.9rem;
	cursor: pointer;
	background: #fff;
	font-weight: 400;
}

.acaprs-radio-pill:has(input:checked) {
	border-color: #4b2c5f;
	background: #f3eef8;
	color: #4b2c5f;
	font-weight: 700;
}

.acaprs-checkboxes label {
	display: block;
	margin-bottom: 0.3rem;
}

.acaprs-hint {
	color: #646970;
	font-size: 0.9em;
	margin: 0.35rem 0 0;
}

.acaprs-promise {
	font-weight: 700;
}

.acaprs-privacy {
	color: #646970;
	font-size: 0.9em;
}

.acaprs-submit {
	background: #4b2c5f;
	color: #fff;
	border: none;
	padding: 0.7rem 1.6rem;
	border-radius: 4px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.acaprs-submit:hover {
	background: #3a2149;
}

.acaprs-forms-success {
	border: 2px solid #2e7d32;
	background: #f0f7f0;
	padding: 1.5rem;
	border-radius: 6px;
	max-width: none;
}

/* البوابة */
.acaprs-portal {
	max-width: none;
	width: 100%;
}

.acaprs-portal-note {
	background: #eef6ff;
	border: 1px solid #8ab4f8;
	padding: 0.75rem 1rem;
	border-radius: 4px;
}

.acaprs-ticket-list {
	list-style: none;
	padding: 0;
}

.acaprs-ticket-list li {
	border-bottom: 1px solid #ddd;
	padding: 0.6rem 0;
}

.acaprs-status {
	display: inline-block;
	padding: 0.1rem 0.6rem;
	border-radius: 999px;
	font-size: 0.85em;
	background: #eee;
}

.acaprs-status-open { background: #e6f0ff; }
.acaprs-status-new { background: #fff3cd; }
.acaprs-status-resolved { background: #d4edda; }
.acaprs-status-closed { background: #e2e3e5; }
.acaprs-status-spam { background: #f8d7da; }

.acaprs-message {
	border: 1px solid #ddd;
	padding: 1rem;
	margin-bottom: 1rem;
	border-radius: 6px;
}

.acaprs-message-staff {
	background: #f6f7f7;
}

.acaprs-message-meta {
	color: #646970;
	font-size: 0.9em;
	margin: 0 0 0.5rem;
}

.acaprs-attachments {
	list-style: none;
	padding: 0;
	margin: 0.75rem 0 0;
}

.acaprs-closed-note {
	border: 1px solid #ddd;
	padding: 1rem;
	border-radius: 6px;
	background: #f6f7f7;
}

/* ب3 (1.0.4): كسر النصوص والروابط الطويلة داخل رسائل البوابة والمرفقات
   حتى لا يفيض محتوى تذكرة واحدة ببطاقة الرسالة على الجوال. */
.acaprs-message p, .acaprs-attachments a { overflow-wrap: anywhere; }

.acaprs-status-pending { background: #fdeeda; }
.acaprs-status-merged { background: #e8e0f0; }

/* ============================================================
   1.1.0: مكتب الدعم الفني الأمامي + صندوق المدرب «المحوّلة إليّ»
   لغة تصميم بوابة الطالب المعتمدة: بنفسجي #4B2C5F + ذهبي
   #EFD9A4/#C9A24B + خلفية كريمية، خط Cairo، RTL مثبّت صراحة
   في الكود ومحاذاة يمين — لا اعتماداً على سمة الصفحة وحدها.
   ============================================================ */
.acaprs-desk {
	direction: rtl;
	text-align: right;
	font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
	color: #241a2e;
	line-height: 1.9;
}

.acaprs-desk *, .acaprs-desk *::before, .acaprs-desk *::after { box-sizing: border-box; }
.acaprs-desk h2, .acaprs-desk h3 { color: #4b2c5f; line-height: 1.6; margin: 0; }

/* الترويسة البنفسجية بشارات الملخص */
.acaprs-desk-hero {
	background: linear-gradient(135deg, #4b2c5f 0%, #3a2349 100%);
	border-radius: 18px;
	color: #fff;
	padding: 26px 22px;
	box-shadow: 0 12px 34px rgba(75, 44, 95, 0.09);
	position: relative;
	overflow: hidden;
	direction: rtl;
	text-align: right;
	margin-bottom: 20px;
}

.acaprs-desk-hero::after {
	content: "";
	position: absolute;
	inset-inline-end: -60px;
	top: -60px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: rgba(239, 217, 164, 0.14);
}

.acaprs-desk-hero h2 { color: #fff; font-size: 1.65rem; font-weight: 800; position: relative; z-index: 1; }
.acaprs-desk-hero-sub { color: #e9ddf2; margin-top: 4px; max-width: 680px; position: relative; z-index: 1; }
.acaprs-desk-hero--trainer { border-top: 5px solid #c9a24b; }

.acaprs-desk-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; position: relative; z-index: 1; }

.acaprs-desk-chip {
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(239, 217, 164, 0.45);
	color: #fff;
	border-radius: 999px;
	padding: 4px 15px;
	font-weight: 700;
	font-size: 0.9rem;
}

.acaprs-desk-chip b { color: #efd9a4; font-weight: 900; }
.acaprs-desk-chip--alert { background: rgba(169, 50, 38, 0.45); border-color: rgba(241, 169, 160, 0.6); }
.acaprs-desk-chip--user { background: rgba(26, 122, 58, 0.35); border-color: rgba(140, 230, 170, 0.5); }

/* تبويبات الطوابير */
.acaprs-desk-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }

.acaprs-desk-tab {
	border: 1.5px solid #4b2c5f;
	color: #4b2c5f;
	background: #fff;
	border-radius: 999px;
	padding: 7px 20px;
	font-weight: 800;
	font-size: 0.95rem;
	text-decoration: none;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

.acaprs-desk-tab.is-active { background: #4b2c5f; color: #efd9a4; }

/* البطاقات */
.acaprs-desk-card {
	background: #fff;
	border: 1px solid #e8e0d2;
	border-radius: 18px;
	box-shadow: 0 12px 34px rgba(75, 44, 95, 0.09);
	padding: 22px 20px;
	margin-bottom: 18px;
	direction: rtl;
	text-align: right;
}

.acaprs-desk-card-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.acaprs-desk-code { color: #4b2c5f; font-weight: 900; unicode-bidi: isolate; }
.acaprs-desk-topic { font-size: 1.14rem; font-weight: 800; }
.acaprs-desk-sec-title { font-size: 1.15rem; font-weight: 800; border-bottom: 2px solid #efd9a4; padding-bottom: 8px; margin-bottom: 14px; }
.acaprs-desk-meta { color: #6f6580; font-size: 0.92rem; }
.acaprs-desk-client { margin-top: 6px; }

.acaprs-desk-priority { display: inline-block; border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.85em; font-weight: 700; background: #f1ede3; color: #6f6580; }
.acaprs-desk-priority-urgent { background: #fdecea; color: #a93226; }
.acaprs-desk-priority-normal { background: #fdf3d7; color: #9a6a12; }
.acaprs-desk-priority-low { background: #eef6ff; color: #4b2c5f; }
.acaprs-desk-overdue { display: inline-block; border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.85em; font-weight: 800; background: #a93226; color: #fff; }

.acaprs-desk-card-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.acaprs-desk-assignee { font-weight: 800; color: #4b2c5f; }
.acaprs-desk-assignee--none { color: #9a6a12; }
.acaprs-desk-locked { color: #6f6580; font-size: 0.9rem; font-weight: 700; }
.acaprs-desk-inline-form { display: inline; margin: 0; }

/* الأزرار */
.acaprs-desk-btn {
	display: inline-block;
	background: #4b2c5f;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 10px 26px;
	font-weight: 800;
	font-size: 0.95rem;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(75, 44, 95, 0.22);
	min-height: 46px;
	line-height: 1.6;
}

.acaprs-desk-btn:hover { background: #6b4683; color: #fff; }
.acaprs-desk-btn--gold { background: #efd9a4; color: #3a2349; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); }
.acaprs-desk-btn--gold:hover { background: #f7e8c0; color: #3a2349; }
.acaprs-desk-btn--ghost { background: #fff; color: #4b2c5f; border: 1.5px solid #4b2c5f; box-shadow: none; }
.acaprs-desk-btn--ghost:hover { background: #f3eef8; color: #4b2c5f; }

/* التنبيهات والحالات */
.acaprs-desk-notice {
	background: #e9f7ee;
	border: 1px solid #9ed3ae;
	color: #1a7a3a;
	border-radius: 14px;
	padding: 12px 18px;
	font-weight: 700;
	margin-bottom: 16px;
}

.acaprs-desk-empty {
	border: 1.5px dashed #d9cba6;
	background: #fffdf6;
	border-radius: 18px;
	padding: 28px 22px;
	text-align: center;
	color: #6f6580;
}

.acaprs-desk-privacy-note {
	background: #fffdf6;
	border-inline-start: 4px solid #c9a24b;
	border-radius: 10px;
	padding: 12px 16px;
	margin-top: 12px;
	line-height: 1.95;
}

.acaprs-desk-back { margin-bottom: 12px; }
.acaprs-desk-back a { color: #4b2c5f; font-weight: 800; text-decoration: none; }

/* الخيط والملاحظات والسجل */
.acaprs-desk-thread { margin-bottom: 6px; }
.acaprs-message-internal { background: #fdf3d7; border: 1.5px dashed #c9a24b; }
.acaprs-desk-internal-badge { display: inline-block; background: #efd9a4; color: #3a2349; border-radius: 999px; padding: 0 10px; font-size: 0.82em; font-weight: 800; }

.acaprs-desk-note { border-bottom: 1px dashed #e8e0d2; padding-bottom: 10px; margin-bottom: 10px; overflow-wrap: anywhere; }

.acaprs-desk-route-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.acaprs-desk-route-log li { background: #f6f3ec; border: 1px solid #e8e0d2; border-radius: 12px; padding: 10px 16px; }

.acaprs-desk-check { margin: 0 0 10px; }
.acaprs-desk select, .acaprs-desk input[type="text"] { max-width: 100%; }

/* الجوال أولاً: لا كسر عند 360px */
@media (max-width: 700px) {
	.acaprs-desk-hero { padding: 20px 16px; }
	.acaprs-desk-hero h2 { font-size: 1.35rem; }
	.acaprs-desk-card { padding: 18px 14px; }
	.acaprs-desk-card-actions { flex-direction: column; align-items: stretch; }
	.acaprs-desk-card-actions .acaprs-desk-btn { text-align: center; width: 100%; }
	.acaprs-desk-inline-form { display: block; }
	.acaprs-desk-tab { padding: 7px 14px; font-size: 0.9rem; }
}
