/* ===== تحسينات الشاشات الكبيرة والوضع الداكن ===== */

/* النصوص تكبر تدريجياً مع الشاشة، فكل ما يعتمد على rem يكبر معها */
/* لوحات الإدارة والمورد والحساب تبقى بمقاسها الأصلي كي لا يختل تنسيق القوائم الجانبية */
@media (min-width: 1280px) { html:not(:has(.admin-side, .admin-main, .dash)) { font-size: 106.25% } }
@media (min-width: 1680px) { html:not(:has(.admin-side, .admin-main, .dash)) { font-size: 112.5% } }

/* القوائم المنسدلة الأصلية (الترتيب وغيره) تتبع الوضع الداكن */
html[data-theme="dark"] { color-scheme: dark; accent-color: var(--gold-500) }
select option { color: var(--text); background: var(--surface) }

/* خانات الاختيار والراديو: واضحة في الفاتح والداكن */
.check input[type="checkbox"], .check input[type="radio"] {
 display: inline-grid;
 margin: 2px 0 0;
 border: 2px solid var(--border-strong);
 width: 20px;
 height: 20px;
 background-color: var(--surface);
 background-position: center;
 background-repeat: no-repeat;
 background-size: 14px;
 flex: none;
 cursor: pointer;
 appearance: none;
 -webkit-appearance: none;
 transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out) }
.check input[type="checkbox"] { border-radius: 6px }
.check input[type="radio"] { border-radius: 50% }
.check input[type="checkbox"]:checked, .check input[type="radio"]:checked {
 border-color: var(--purple-700);
 background-color: var(--purple-700) }
.check input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") }
.check input[type="radio"]:checked { background-image: radial-gradient(circle, #FFFFFF 0 32%, transparent 36%) }
.check input:focus-visible { outline: 3px solid var(--purple-300); outline-offset: 2px }
html[data-theme="dark"] .check input[type="checkbox"], html[data-theme="dark"] .check input[type="radio"] { border-color: var(--purple-300) }
html[data-theme="dark"] .check input[type="checkbox"]:checked, html[data-theme="dark"] .check input[type="radio"]:checked {
 border-color: var(--gold-500);
 background-color: var(--gold-500) }
html[data-theme="dark"] .check input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%231C1430' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") }
html[data-theme="dark"] .check input[type="radio"]:checked { background-image: radial-gradient(circle, #1C1430 0 32%, transparent 36%) }
html[data-theme="dark"] .sort-opt .icon { color: var(--gold-500) }
html[data-theme="dark"] .range { accent-color: var(--gold-500) }
html[data-theme="dark"] .pill.on-soft, html[data-theme="dark"] .cat-chips .pill.on { color: var(--text); border-color: var(--gold-500); background: var(--purple-100) }

/* قائمة الرأس المنسدلة: لا يمتد خط الصفحة الحالية فوق عناصرها */
.app-header .bar nav .nav-sub a { display: block; position: relative; padding: var(--s3) var(--s4); border-radius: 10px; font-size: var(--fs-14) }
.app-header .bar nav .nav-sub a.on { color: #FFFFFF; background: rgba(255, 255, 255, 0.1) }
.app-header .bar nav .nav-sub a.on::after {
 position: absolute;
 top: 25%;
 right: 0;
 bottom: 25%;
 left: auto;
 border-radius: 3px;
 width: 3px;
 height: auto;
 background: var(--gold-500);
 content: '' }

/* لوحة التصفية */
.filter-side > .row.between { margin-bottom: var(--s3); padding-bottom: var(--s2) }
.filter-side .row.between .link-btn { padding: var(--s2) 0 }
.range-row .field input { min-height: 46px; padding: 0 var(--s3); font-size: var(--fs-14) }
.range-row .field-box { min-width: 0 }
.range-row input::placeholder { color: var(--muted); opacity: 1 }

/* عنوان الصفحة وتحته الوصف */
.page-title h1 + p, .page-head h1 + p, .browse-head h1 + p, .cms-page h1 + p { margin-top: var(--s2) }
.page-title p, .browse-head p { font-size: var(--fs-16) }
.sec-head p { margin-top: var(--s2) }

/* بطاقة المورد */
.s-card { padding: var(--s6) var(--s5); gap: var(--s4) }
.s-card .sq-av { width: 60px; height: 60px }
.s-head { gap: var(--s4); align-items: center }
.s-head .name { font-size: var(--fs-18) }
.s-head .meta { margin-top: 4px; font-size: var(--fs-14); gap: var(--s1) }
.s-stats { padding-top: var(--s4); align-items: start }
.s-stats > div { align-items: flex-start; gap: 4px }
.s-stats b { align-items: center; min-height: 28px; font-size: var(--fs-18); line-height: 28px }
.s-stats b .num { line-height: 28px }
.s-stats span { font-size: var(--fs-14); line-height: 1.4 }
.s-card .btn { min-height: 48px; font-size: var(--fs-16) }
.store-stats .s-stats > div { align-items: center }

/* التذييل */
.app-footer { font-size: var(--fs-16) }
.app-footer .stack p, .app-footer p.xs { font-size: var(--fs-14); line-height: 1.8 }
.app-footer .stack p.foot-about { font-size: var(--fs-16); line-height: 2 }
.app-footer ul li, .app-footer ul a { font-size: var(--fs-16) }
.app-footer h4 { font-size: var(--fs-18) }

/* عناوين أقسام الرئيسية على الشاشات الكبيرة */
@media (min-width: 1023px) {
 .sec-head h2 { font-size: var(--fs-32) }
 .sec-head p { font-size: var(--fs-18) }
 .home-body .more-link { font-size: var(--fs-16) }
 .page-title h1 { font-size: var(--fs-40) } }

/* بطاقة «لم تجد ما تبحث عنه؟» */
.rfq-cta {
 display: grid;
 position: relative;
 gap: var(--s4);
 padding: var(--s6);
 border: 1px solid var(--purple-300);
 border-radius: var(--r-md);
 text-align: start;
 background: linear-gradient(135deg, var(--purple-50), var(--surface));
 overflow: hidden }
.empty-block .hint-card.rfq-cta { align-items: stretch; border: 1px solid var(--purple-300); padding: var(--s6); text-align: start }
.rfq-cta .rfq-top { display: flex; align-items: center; gap: var(--s4) }
.rfq-cta h3 { font-size: var(--fs-20); font-weight: 700 }
.rfq-cta p { margin-top: var(--s1); font-size: var(--fs-16); color: var(--text-2) }
.rfq-cta .rfq-points { display: grid; margin: 0; padding: 0; list-style: none; gap: var(--s2); font-size: var(--fs-14); color: var(--text-2) }
.rfq-cta .rfq-points li { display: flex; align-items: center; gap: var(--s2) }
.rfq-cta .rfq-points .icon { color: var(--success); flex: none }
.rfq-cta .btn { min-height: 48px; justify-self: start }
html[data-theme="dark"] .rfq-cta { background: linear-gradient(135deg, var(--purple-100), var(--surface)) }
@media (min-width: 760px) {
 .rfq-cta { grid-template-columns: 1fr auto; align-items: center }
 .rfq-cta .rfq-points { grid-column: 1 / -1; grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--s5) }
 .rfq-cta .btn { grid-row: 1; grid-column: 2 } }

/* عرض المحتوى يواكب تكبير النص على الشاشات الكبيرة */
@media (min-width: 1440px) { .container:not(.dash) { max-width: 1360px } }
@media (min-width: 1680px) { .container:not(.dash) { max-width: 1480px } }

/* ===== صفحة فريق العمل ===== */
.team-page { padding-bottom: var(--s7) }
.team-page .page-title { max-width: 62ch }
.team-label { display: flex; align-items: center; gap: var(--s4); margin: var(--s5) 0 var(--s6); font-size: var(--fs-14); font-weight: 600; color: var(--muted) }
.team-label::before, .team-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to left, transparent, var(--border-strong), transparent) }
.team-grid { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)) }
.team-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden }
.team-photo { aspect-ratio: 4 / 3; background: var(--purple-100); display: flex; align-items: center; justify-content: center }
.team-photo img { width: 100%; height: 100%; object-fit: cover }
.team-initial { font-size: 4rem; font-weight: 700; color: var(--purple-700) }
html[data-theme="dark"] .team-initial { color: var(--gold-500) }
.team-body { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s5); flex: 1 }
.team-body h2 { font-size: var(--fs-20) }
.team-role { font-size: var(--fs-14); font-weight: 600; color: var(--gold-700) }
.team-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: 0; padding: 0; list-style: none; font-size: var(--fs-14); color: var(--muted) }
.team-meta li { display: inline-flex; align-items: center; gap: var(--s1) }
.team-bio { font-size: var(--fs-16); line-height: 1.9; color: var(--text-2) }
.team-body .btn { margin-top: auto; align-self: flex-start; min-height: 46px }

.btn-lg { min-height: 52px; padding-inline: var(--s6); font-size: var(--fs-16) }
.demo-wait { opacity: 0.6; pointer-events: none }

/* ===== بطاقات الباقات ===== */
.plan-card { position: relative; display: flex; flex-direction: column; gap: var(--s4); padding: var(--s6) var(--s5) var(--s5); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface) }
.plan-card.is-featured { border: 2px solid var(--purple-700); box-shadow: var(--shadow-2) }
html[data-theme="dark"] .plan-card.is-featured { border-color: var(--gold-500) }
.plan-card.is-current { outline: 2px solid var(--success); outline-offset: 2px }
.plan-ribbon { position: absolute; top: -13px; right: var(--s5); padding: 4px var(--s4); border-radius: var(--r-full); font-size: var(--fs-12); font-weight: 700; color: var(--purple-950); background: var(--gold-500) }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3) }
.plan-head h3 { font-size: var(--fs-24); font-weight: 700 }
.plan-tag { margin: 0; font-size: var(--fs-14); color: var(--muted) }
.plan-price { display: flex; align-items: baseline; gap: var(--s2) }
.plan-amount { font-size: var(--fs-40); font-weight: 700; line-height: 1.1 }
.plan-per { font-size: var(--fs-14); color: var(--muted) }
.plan-alt { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: calc(var(--s2) * -1) 0 0; padding: 0; list-style: none; font-size: var(--fs-14); color: var(--text-2) }
.plan-alt li { display: inline-flex; align-items: baseline; gap: var(--s1) }
.plan-comm { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-sm); font-size: var(--fs-14); background: var(--purple-50) }
.plan-comm b { font-size: var(--fs-20); color: var(--accent-ink) }
.plan-feats { display: grid; margin: 0; padding: var(--s4) 0 0; border-top: 1px solid var(--border); list-style: none; gap: var(--s3); flex: 1; align-content: start }
.plan-feats li { display: flex; align-items: flex-start; gap: var(--s3); font-size: var(--fs-16) }
.plan-feats .fi { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50% }
.plan-feats .yes .fi { color: var(--success); background: var(--success-bg) }
.plan-feats .no .fi { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border) }
.plan-feats .no .ft { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong) }
.plan-feats .ft { display: flex; flex-direction: column; gap: 2px; padding-top: 1px }
.plan-val { font-size: var(--fs-14); font-weight: 600; color: var(--accent-ink) }
.plan-off { font-size: var(--fs-12); color: var(--muted); text-decoration: none; display: inline-block }
.plan-card .btn-block { min-height: 48px; margin-top: var(--s2) }

/* ===== صفحة برنامج المسوّقين ===== */
.aff-hero { padding: var(--s7) 0; color: #FFFFFF; background: linear-gradient(135deg, var(--purple-900), var(--purple-800)); position: relative; overflow: hidden }
.aff-hero::before { content: ''; position: absolute; inset: 0; background: url('/assets/pattern/pattern.png') center / 320px repeat; opacity: 0.08 }
.aff-hero-in { position: relative; display: grid; gap: var(--s6); align-items: center }
.aff-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4) }
.aff-copy h1 { font-size: var(--fs-32); line-height: 1.4; color: #FFFFFF }
.aff-copy .lead { max-width: 56ch; font-size: var(--fs-18); line-height: 1.9; color: var(--purple-200) }
.aff-glance { display: grid; gap: var(--s3); padding: var(--s5); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--r-md); background: rgba(255, 255, 255, 0.07); backdrop-filter: blur(6px) }
.aff-glance-row { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-16) }
.aff-n { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 700; color: var(--purple-950); background: var(--gold-500) }
.aff-body { padding-block: var(--s7) var(--s6); display: grid; gap: var(--s7) }
.aff-steps { display: grid; margin: 0; padding: 0; list-style: none; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)) }
.aff-steps li { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s5) }
.aff-steps p { font-size: var(--fs-16); line-height: 1.9 }
.aff-note { padding: var(--s5) var(--s6) }
.aff-note h3 { margin-bottom: var(--s3); font-size: var(--fs-20); font-weight: 700 }
.aff-note ul { display: grid; margin: 0; padding: 0; list-style: none; gap: var(--s3) }
.aff-note li { display: flex; align-items: flex-start; gap: var(--s3); font-size: var(--fs-16); color: var(--text-2) }
.aff-x { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: var(--danger); background: var(--danger-bg) }
.aff-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); padding: var(--s6); border-color: var(--purple-300); background: linear-gradient(135deg, var(--purple-50), var(--surface)) }
.aff-cta h2 { font-size: var(--fs-24); margin-bottom: var(--s2) }
.aff-terms { display: inline-flex; align-items: center; gap: var(--s1); margin-top: var(--s3); font-weight: 600 }
@media (min-width: 1023px) { .aff-copy { max-width: 760px } .aff-copy h1 { font-size: var(--fs-40) } .aff-hero { padding: 88px 0 } }

/* مسار الصفحة يفصله هامش عن المحتوى، وعنوان المتجر عن بياناته */
.crumbs { padding-bottom: var(--s4); margin-bottom: var(--s2) }
.store-id h1 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4) }
.store-id h1 + p, .store-id h1 + .muted { margin-top: var(--s2) }
.store-id p { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap }

/* حالات «لا توجد نتائج» في وسط الصفحة دائماً، حتى داخل الشبكات */
.empty { margin-inline: auto; width: 100%; justify-content: center; align-items: center; text-align: center }
.grid > .empty, .team-grid > .empty, .prod-grid > .empty, .store-grid > .empty, .cfg-plans > .empty { grid-column: 1 / -1 }

/* وصف الصفحة يتناسق مع عنوانها */
.page-title p, .page-head h1 + p, .browse-head h1 + p { font-size: var(--fs-18); line-height: 1.9; color: var(--text-2) }
@media (min-width: 1023px) { .page-title p, .page-head h1 + p { font-size: var(--fs-20) } .page-title p { max-width: 64ch } }

/* الصور الافتراضية للفريق في لوحة الإدارة */
.team-defaults .cfg-slots { display: flex; flex-wrap: wrap; gap: var(--s6) var(--s7) }
.team-defaults .cfg-slot { align-items: flex-start; gap: var(--s3) }
.team-defaults .cfg-slot-img { display: flex; align-items: center; justify-content: center; width: 120px; height: 120px; border: 1px dashed var(--border-strong); border-radius: 50%; overflow: hidden; background: var(--surface-2) }
.team-defaults .cfg-slot-img img { width: 100%; height: 100%; object-fit: cover }

/* ===== خط زمني لبرنامج المسوّقين ===== */
.aff-hero { padding: 64px 0 }
@media (min-width: 1023px) { .aff-hero { padding: 76px 0 } }
.aff-timeline-sec { padding: var(--s7) 0 var(--s8); border-block: 1px solid var(--border); background: var(--purple-50) }
.aff-head { margin-bottom: var(--s7) }
.aff-timeline { position: relative; display: grid; margin: 0; padding: 0; list-style: none; gap: var(--s6) 0 }
.aff-step { position: relative; display: flex; gap: var(--s4); align-items: flex-start }
.aff-node { position: relative; z-index: 1; display: inline-flex; flex: none; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; color: #FFFFFF; background: var(--purple-700); box-shadow: 0 0 0 6px var(--purple-100), var(--shadow-2) }
html[data-theme="dark"] .aff-node { color: var(--purple-950); background: var(--gold-500); box-shadow: 0 0 0 6px var(--purple-100), var(--shadow-2) }
.aff-step-body { padding-top: 6px }
.aff-step-no { display: inline-block; margin-bottom: var(--s2); padding: 2px var(--s3); border-radius: var(--r-full); font-size: var(--fs-12); font-weight: 700; color: var(--gold-700); background: var(--gold-100) }
.aff-step p { font-size: var(--fs-18); line-height: 1.8; font-weight: 500 }
/* الخط الرأسي في الجوال */
.aff-step:not(:last-child)::after { content: ''; position: absolute; top: 64px; bottom: calc(var(--s6) * -1 + 6px); right: 31px; border-right: 2px dashed var(--purple-300) }
@media (min-width: 900px) {
 .aff-timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 }
 .aff-step { flex-direction: column; align-items: center; padding-inline: var(--s3); text-align: center; gap: var(--s5) }
 .aff-step-body { padding-top: 0 }
 .aff-step:not(:last-child)::after { top: 31px; bottom: auto; right: auto; left: calc(-50% + 44px); width: calc(100% - 88px); height: 0; border-right: 0; border-top: 2px dashed var(--purple-300) } }
.aff-body { gap: var(--s6); padding-top: var(--s7) }
.aff-note h3 { display: flex; align-items: center; gap: var(--s3) }
.aff-warn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; color: var(--warning); background: var(--warning-bg) }
.aff-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); padding: var(--s6) var(--s7); border-radius: var(--r-md); color: #FFFFFF; background: linear-gradient(135deg, var(--purple-900), var(--purple-800)) }
.aff-cta h2 { margin-bottom: var(--s2); font-size: var(--fs-24); color: #FFFFFF }
.aff-cta p { max-width: 52ch; color: var(--purple-200); font-size: var(--fs-16); line-height: 1.8 }
.aff-cta .aff-terms { color: var(--gold-200) }

/* مسار الصفحة داخل اللوحات أقرب لعنوان الصفحة */
.admin-main .crumbs, .dash-main .crumbs { padding-top: var(--s2); padding-bottom: 0; margin-bottom: 0 }
.admin-main .page-head, .dash-main .page-head { padding-top: var(--s3); padding-bottom: var(--s4) }

/* ===== لوحات الإدارة: تنسيق عام ===== */
/* مفتاح التفعيل بجوار نصه لا في أقصى الطرف الآخر */
.toggle-row { display: flex; align-items: center; justify-content: flex-start; gap: var(--s3); min-height: 44px; cursor: pointer }
.toggle-row > span:first-child { font-size: var(--fs-16) }

/* مسافة بين عنوان البطاقة ووصفها */
.card > h2 + p, .card > h3 + p, .card h2.cfg-h + p, .cfg-help h2 + p, .u-title + p, .u-h2 + p, .stack > h2 + p, .stack > h3 + p { margin-top: var(--s2) }

/* الأزرار داخل البطاقات والنماذج بحجمها الطبيعي وعلى الطرف الأول بدل أن تمتد */
.card.stack > .btn:not(.btn-block), form.stack > .btn:not(.btn-block), .stack > .btn-primary:not(.btn-block) { align-self: flex-start; width: auto; min-width: 140px }

/* ثلاثة حقول في السطر على الشاشات الكبيرة داخل اللوحات (النوافذ المنبثقة تبقى بحقلين) */
@media (min-width: 1280px) { .admin-main .form-grid.two, .admin-main .form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
.modal .form-grid { padding-top: var(--s2) }

/* صفحة التشغيل */
.ops-sec { overflow: hidden }
.ops-sec > h2 { padding: var(--s5) var(--s5) var(--s3); font-size: var(--fs-20) }
.ops-sec .table-wrap { border-top: 1px solid var(--border) }
.ops-sec .empty { padding: var(--s6) var(--s4) }
.ops-sec .release-notes { margin: 0; padding-inline-start: var(--s5); display: grid; gap: var(--s1); font-size: var(--fs-14); color: var(--text-2) }
.admin-main .stack > .grid.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)) }

/* بطاقتا التقارير: العنوان في نفس الموضع */
.af-stores .af-pad { padding: var(--s5) var(--s5) var(--s3) }
.af-block .af-card-title { margin-bottom: var(--s2) }
.af-blocks { align-items: stretch }

/* رأس صفحة المستخدم */
.us-head .us-name { margin-bottom: var(--s2) }
.us-head .grow > p { margin-top: var(--s1) }
.u-ava img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover }
.u-ava { overflow: hidden }

/* أقسام الصفحة داخل اللوحة تفصلها مسافة */
.admin-main [data-root] > * + * { margin-top: var(--s5) }
.team-defaults { margin-bottom: 0 }

/* حقل رفع الصورة: معاينة صغيرة بجانب الزر بدل صورة وزر بعرض كامل */
.img-field { display: flex; align-items: center; gap: var(--s4); padding: var(--s3) var(--s4); border: 1px dashed var(--border-strong); border-radius: var(--r-sm); background: var(--surface-2) }
.img-field .uploads { flex: none }
.img-field .u { display: flex; align-items: center; justify-content: center; width: 96px; height: 72px; border-radius: var(--r-xs); overflow: hidden; background: var(--purple-50) }
.img-field .u img, .img-field .u .ph { width: 100%; height: 100%; object-fit: cover }
.img-field.round .u { width: 88px; height: 88px; border-radius: 50% }
.img-field-side { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); min-width: 0 }
.img-field-side .btn { width: auto; min-width: 0 }

/* القائمة الجانبية للإدارة: قاعدة nav العامة للرأس تجعل العناصر في الوسط فتنكمش، فنعيدها لعرض كامل */
.admin-side nav { align-items: stretch; width: 100% }
.admin-side nav a, .admin-side details.more { width: 100% }
.admin-side nav a { justify-content: flex-start; font-size: var(--fs-14) }
.admin-side details.more > summary { display: flex; align-items: center; justify-content: space-between; padding-inline: var(--s3) }

/* صفوف مدد الاشتراك في محرر الباقة: أعمدة ثابتة ومحاذاة واحدة */
.cfg-line { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(170px, 1.5fr) auto auto; align-items: center; gap: var(--s3) var(--s4); margin-bottom: var(--s3) }
.cfg-line .toggle-row { white-space: nowrap }
@media (max-width: 760px) { .cfg-line { grid-template-columns: 1fr 1fr } .cfg-line .toggle-row, .cfg-line .btn { justify-self: start } }
.cfg-plan-editor .form-grid { align-items: start }
.cfg-feat-grid { gap: var(--s3) var(--s5) }
.cfg-feat-grid .check { min-height: 44px; align-items: center }

/* رسالة «لا توجد بيانات» في وسط بطاقتي التقارير */
.af-block { display: flex; flex-direction: column; min-height: 220px }
.af-block > p { margin-block: auto; text-align: center }
.af-block > p.af-pad { padding: var(--s5) }

/* الأفاتار: خلفية بدل الأسود قبل وصول الصورة */
img.avatar, .u-ava img { background: var(--purple-100) }

/* بطاقتا التقارير بنفس الحشوة: العنوان والرسالة في نفس الموضع */
.card.flush.af-block.af-stores { padding: var(--s5) }
.af-stores .af-pad, .af-stores > p.af-pad { padding: 0 }
.af-block { gap: var(--s3) }
.af-block > p { margin-block: auto }

/* القائمة الجانبية في الوضع الداكن: نص العناصر كان يأخذ لوناً داكناً على خلفية بنفسجية فلا يُرى */
.admin-side nav a { color: #F1ECF8 }
.admin-side nav a:hover, .admin-side nav a.on { color: #FFFFFF }
.admin-side nav a .icon { color: #D9CFEA }
.admin-side .group { color: #BFB3D9 }

/* حيث يظهر تذييل الموقع الكامل يُخفى شريط الروابط المختصر الخاص بصفحات الدخول والتسجيل */
body:not(.no-site-footer) .auth-foot { display: none }
body.admin-route .app-footer { margin-top: var(--s7) }
