/* ============================================================
   MilitarySci VERSION-C (STATIC) — plus.css
   أنماط الطبقة التفاعلية الجديدة: نظام القوائم المنبثقة، صندوق
   الإشعارات، منتقي الثيم، قائمة الأفاتار، منشئ المنشورات، ويدجت
   رفع الصور (كوفر/مصغرة بثابتة النسب بلا إزاحة)، وصفحة إعدادات
   الثيم للأدمن.
   ============================================================ */

/* ============ 1) نظام القوائم المنبثقة ============ */
/* [hidden] يتفوق دائمًا على display المخصص (بوابات المنشئ، حالة الإشعارات الفارغة…) */
[hidden] { display: none !important; }
.pop-wrap { position: relative; }

.menu { display: none; }
.menu.show {
  display: block;
  animation: pop-in var(--t-med) both;
  transform-origin: top;
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.menu-sep { height: 1px; background: var(--hairline); margin: 7px 4px; }
.menu-item b { font-weight: 650; }
.menu-danger { color: var(--danger); }
.menu-danger:hover { background: var(--danger-soft) !important; color: var(--danger) !important; }

/* ============ 2) منتقي الثيم ============ */
.theme-menu { min-width: 250px; }
.theme-opt {
  justify-content: flex-start;
  padding: 10px 12px;
  border-radius: var(--r-sm);
}
.theme-opt > span:not(.theme-check) {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
  text-align: start;
}
.theme-opt b { font-size: 13.5px; font-weight: 650; }
.theme-hint { font-size: 11px; color: var(--text-3); font-style: normal; }
.theme-check { flex: none; color: var(--brand); }
.theme-opt.on { background: var(--brand-soft); color: var(--brand); }
.theme-opt.on .theme-hint { color: var(--brand); opacity: .75; }

/* ============ 3) صندوق الإشعارات ============ */
.notif-panel {
  width: min(400px, calc(100vw - 28px));
  padding: 0;
  overflow: hidden;
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--hairline);
}
.notif-head b { font-size: 14.5px; }
.notif-markall {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 650;
  color: var(--brand);
  padding: 5px 9px; border-radius: var(--r-pill);
  background: var(--brand-softer);
  transition: background var(--t-fast);
}
.notif-markall:hover { background: var(--brand-soft); }
.notif-tabs {
  display: flex; gap: 4px;
  padding: 8px 12px 0;
}
.notif-tabs button {
  font-size: 12px; font-weight: 650;
  color: var(--text-3);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  transition: all var(--t-fast);
}
.notif-tabs button:hover { background: var(--surface-3); color: var(--text); }
.notif-tabs button.on { background: var(--brand-soft); color: var(--brand); }
.notif-scroll {
  max-height: min(430px, 56dvh);
  overflow-y: auto;
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 7px;
}
.notif-scroll .notif { position: relative; }
.notif-scroll .notif time { font-size: 10.5px; color: var(--text-3); }
.notif-read {
  position: absolute;
  top: 10px; inset-inline-end: 10px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
  transition: transform var(--t-fast);
}
.notif-read:hover { transform: scale(1.35); }
.notif-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 28px 12px;
  color: var(--text-3);
  font-size: 13px;
}
.notif-empty .i { color: var(--ok); }
.notif-foot {
  border-top: 1px solid var(--hairline);
  padding: 10px 16px;
  text-align: center;
}
.notif-foot a {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700;
  color: var(--brand);
  padding: 4px 10px;
  border-radius: var(--r-sm);
}
.notif-foot a:hover { background: var(--brand-softer); }

/* ============ 4) قائمة الأفاتار ============ */
.topuser-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px;
  padding: 3px 10px 3px 3px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  transition: all var(--t-fast);
}
[dir="ltr"] .topuser-btn { padding: 3px 3px 3px 10px; }
.topuser-btn:hover { background: var(--surface-3); border-color: var(--hairline-strong); box-shadow: var(--sh-1); }
.topuser-btn .avatar { border-radius: 50%; }
.topuser-name { font-size: 13px; font-weight: 700; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topuser-btn .i { color: var(--text-3); transition: transform var(--t-fast); }
.topuser-btn[aria-expanded="true"] .i { transform: rotate(180deg); }

.user-menu { min-width: 268px; }
.user-card {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px;
  margin-bottom: 6px;
  border-radius: var(--r-md);
  background: var(--surface-3);
  transition: background var(--t-fast);
}
.user-card:hover { background: var(--brand-softer); }
.user-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.user-card-main b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card-main i { font-size: 11.5px; color: var(--text-3); }
.user-card .badge { flex: none; }
.user-menu .menu-item { padding: 9px 12px; font-size: 13.5px; }

/* ============ 5) لمسات عامة ============ */
/* لوحة الأوامر تُرسم في HTML ثابت — تُخفى كليًا حتى تُفتح (وإلا اعترضت خلفيتها النقرات) */
#palette-root:not(.open) { visibility: hidden; }
#palette-root:not(.open) .palette-backdrop,
#palette-root:not(.open) .palette { pointer-events: none; }
#palette-root.open { visibility: visible; }
.topbar.scrolled { box-shadow: var(--sh-1); }
.back-top {
  position: fixed;
  bottom: 22px; inset-inline-start: 22px;
  z-index: 80;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  box-shadow: var(--sh-2);
  color: var(--text-2);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: all var(--t-med);
}
.back-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top:hover { color: var(--brand); border-color: var(--brand); }
@media (max-width: 768px) { .back-top { display: none; } }

/* ============ 6) ويدجت رفع الصور — كوفر ومصغرة ============ */
/* قاعدة التجربة: مساحة الكوفر محجوزة دائمًا بنسبة ثابتة — لا إزاحة ولا قفزة */
.upl-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 5.4;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1.5px dashed var(--hairline-strong);
  background:
    linear-gradient(135deg, var(--brand-softer), var(--surface-2) 55%, var(--brand-soft));
  transition: border-color var(--t-fast), background var(--t-fast);
}
.upl-cover.has-img { border-style: solid; border-color: var(--hairline); }
.upl-cover.dragover { border-color: var(--brand); background: var(--brand-softer); }
.upl-cover input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upl-cover .upl-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  color: var(--text-3);
  pointer-events: none;
  text-align: center;
  padding: 12px;
}
.upl-cover .upl-empty .upl-ic {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
}
.upl-cover .upl-empty b { font-size: 13.5px; color: var(--text-2); }
.upl-cover .upl-empty small { font-size: 11.5px; }
.upl-cover .upl-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: none;
}
.upl-cover.has-img .upl-img { display: block; animation: img-in var(--t-slow) both; }
.upl-cover.has-img .upl-empty { display: none; }
@keyframes img-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: scale(1); } }
.upl-cover .upl-tools {
  position: absolute;
  bottom: 10px; inset-inline-end: 10px;
  display: none; gap: 6px;
}
.upl-cover.has-img .upl-tools { display: flex; animation: pop-in var(--t-med) both; }
.upl-tools .btn { box-shadow: var(--sh-2); }
.upl-tools .btn-ico {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  padding: 0;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--bg-raised) 92%, transparent);
  border: 1px solid var(--hairline);
  color: var(--text-2);
}
.upl-tools .btn-ico:hover { color: var(--danger); border-color: var(--danger-soft); background: var(--danger-soft); }
.upl-cover .upl-badge {
  position: absolute;
  top: 10px; inset-inline-start: 10px;
  display: none;
  align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--ok) 92%, transparent);
  color: #fff;
}
.upl-cover.has-img .upl-badge { display: inline-flex; animation: pop-in var(--t-med) both; }
.upl-cover .upl-busy {
  position: absolute; inset: 0;
  display: none;
  place-items: center;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(3px);
}
.upl-cover.busy .upl-busy { display: grid; }
.upl-cover .upl-bar {
  position: absolute;
  bottom: 0; inset-inline: 0;
  height: 3px;
  background: var(--hairline);
  display: none;
}
.upl-cover.busy .upl-bar { display: block; }
.upl-cover .upl-bar b {
  display: block; height: 100%; width: 0;
  background: var(--brand);
  border-radius: 0 3px 3px 0;
  transition: width 420ms ease;
}
[dir="ltr"] .upl-cover .upl-bar b { border-radius: 3px 0 0 3px; }

/* المصغرة — مربعة 1:1 ثابتة */
.upl-thumb {
  position: relative;
  width: 112px;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1.5px dashed var(--hairline-strong);
  background: var(--surface-2);
  transition: border-color var(--t-fast);
  flex: none;
}
.upl-thumb.dragover { border-color: var(--brand); background: var(--brand-softer); }
.upl-thumb.has-img { border-style: solid; border-color: var(--hairline); }
.upl-thumb input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upl-thumb .upl-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: var(--text-3);
  pointer-events: none;
}
.upl-thumb .upl-empty .upl-ic {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--surface-3);
}
.upl-thumb .upl-empty small { font-size: 10px; }
.upl-thumb .upl-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.upl-thumb.has-img .upl-img { display: block; animation: img-in var(--t-slow) both; }
.upl-thumb.has-img .upl-empty { display: none; }
.upl-thumb .upl-tools { position: absolute; bottom: 6px; inset-inline-end: 6px; display: none; }
.upl-thumb.has-img .upl-tools { display: flex; }

/* ملاحظة إرشادية تحت الويدجت */
.upl-note {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--text-3);
  margin-top: 8px;
}
.upl-note .i { color: var(--text-3); flex: none; }
.upl-note b { color: var(--text-2); }

/* ============ 7) منشئ المنشورات (community/create + edit) ============ */
.create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 22px;
  align-items: start;
}
.create-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.create-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--topbar-h) + var(--segnav-h) + 16px); }

.role-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border-radius: var(--r-lg);
  background: linear-gradient(120deg, var(--brand-softer), var(--surface-2));
  border: 1px solid var(--hairline);
}
.role-banner .avatar { flex: none; }
.role-banner-main { flex: 1; min-width: 0; }
.role-banner-main b { display: block; font-size: 14px; }
.role-banner-main small { font-size: 12px; color: var(--text-2); display: block; }
.role-banner .badge { flex: none; }

/* اختيار نوع المنشور — مقيّد بالدور والعضوية */
.ptype-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 9px; }
.ptype {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 12px 13px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--hairline);
  background: var(--surface-2);
  cursor: pointer;
  transition: all var(--t-fast);
  text-align: start;
  width: 100%;
}
.ptype:hover { border-color: var(--hairline-strong); transform: translateY(-1px); box-shadow: var(--sh-1); }
.ptype .ptype-ic {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text-2);
  transition: all var(--t-fast);
}
.ptype b { font-size: 12.5px; font-weight: 700; }
.ptype small { font-size: 10px; color: var(--text-3); }
.ptype.on {
  border-color: var(--brand);
  background: var(--brand-softer);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--brand) 14%, transparent);
}
.ptype.on .ptype-ic { background: var(--brand); color: var(--on-brand); }
.ptype[data-locked] { opacity: .62; cursor: not-allowed; }
.ptype[data-locked]:hover { transform: none; box-shadow: none; border-color: var(--hairline); }
.ptype .ptype-lock {
  position: absolute;
  top: 9px; inset-inline-end: 9px;
  color: var(--warn);
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: .04em;
}

/* محرر النص */
.editor {
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.editor-toolbar {
  display: flex; align-items: center; gap: 2px;
  padding: 7px 9px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-2);
  flex-wrap: wrap;
}
.editor-toolbar button {
  width: 31px; height: 31px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--text-3);
  font-size: 13px; font-weight: 700;
  transition: all var(--t-fast);
}
.editor-toolbar button:hover { background: var(--surface-3); color: var(--text); }
.editor-toolbar .ed-sep { width: 1px; height: 18px; background: var(--hairline); margin-inline: 4px; }
.editor-area {
  min-height: 240px;
  padding: 16px 18px;
  border: 0; outline: none; resize: vertical;
  width: 100%;
  background: transparent;
  line-height: 1.85;
  font-size: 14.5px;
  direction: rtl; text-align: start;
}
.editor-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--hairline);
  background: var(--surface-2);
  font-size: 11px; color: var(--text-3);
}
.editor-foot .mono { color: var(--text-2); }

/* بوابات العضوية والدور */
.gate {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--warn-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent);
}
.gate .gate-ic { color: var(--warn); flex: none; margin-top: 2px; }
.gate b { font-size: 13px; display: block; color: var(--text); }
.gate p { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.gate .btn { margin-inline-start: auto; flex: none; align-self: center; }

.publish-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--sh-1);
  position: sticky;
  bottom: 14px;
}
.publish-bar .pub-state { font-size: 12px; color: var(--text-3); margin-inline-end: auto; display: flex; align-items: center; gap: 6px; }
.publish-bar .pub-state.ok { color: var(--ok); }

/* قائمة جانبية: إعدادات النشر */
.side-opt { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hairline); }
.side-opt:last-child { border-bottom: 0; }
.side-opt .so-ic { color: var(--text-3); flex: none; margin-top: 2px; }
.side-opt-main { flex: 1; min-width: 0; }
.side-opt-main b { display: block; font-size: 13px; }
.side-opt-main small { font-size: 11.5px; color: var(--text-3); display: block; margin-top: 1px; }
.side-opt .f-input { max-width: 132px; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch i {
  position: absolute; inset: 0;
  border-radius: 99px;
  background: var(--hairline-strong);
  transition: background var(--t-fast);
}
.switch i::after {
  content: '';
  position: absolute;
  top: 3px; inset-inline-start: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform var(--t-med);
}
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(-16px); }
[dir="ltr"] .switch input:checked + i::after { transform: translateX(16px); }

/* شرائح الوسوم */
.tagrow { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.tagrow .chip { gap: 5px; }
.tagrow .chip button { display: grid; place-items: center; color: inherit; opacity: .6; }
.tagrow .chip button:hover { opacity: 1; }

/* ============ 8) صفحة إعدادات الثيم (أدمن ووردبريس) ============ */
.wpadmin {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100dvh - var(--topbar-h) - var(--segnav-h));
  background: var(--surface-2);
  border-block: 1px solid var(--hairline);
}
.wpadmin-side {
  background: var(--surface);
  border-inline-end: 1px solid var(--hairline);
  padding: 14px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.wpadmin-side .wa-group { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--text-3); padding: 12px 10px 5px; text-transform: uppercase; }
.wa-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  transition: all var(--t-fast);
}
.wa-item:hover { background: var(--surface-3); color: var(--text); }
.wa-item.on { background: var(--brand-soft); color: var(--brand); }
.wa-item .i { flex: none; }
.wpadmin-main { padding: 26px 30px 40px; max-width: 980px; }
.wpadmin-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 6px; flex-wrap: wrap; }
.wpadmin-head h1 { font-size: 23px; }
.wpadmin-head .wa-crumb { font-size: 12px; color: var(--text-3); }
.wa-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  margin-top: 16px;
  overflow: hidden;
}
.wa-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-2);
}
.wa-card-head .i { color: var(--brand); }
.wa-card-head b { font-size: 14.5px; }
.wa-card-head small { color: var(--text-3); font-size: 11.5px; margin-inline-start: auto; }
.wa-card-body { padding: 6px 20px 16px; }
.wa-row {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}
.wa-row:last-child { border-bottom: 0; }
.wa-row-label { width: 240px; flex: none; }
.wa-row-label b { font-size: 13.5px; display: block; }
.wa-row-label p { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.wa-row-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.wa-row-field .f-input { max-width: 440px; }
.wa-radio-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.wa-radio {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--hairline);
  background: var(--surface-2);
  font-size: 12.5px; font-weight: 650;
  cursor: pointer;
  transition: all var(--t-fast);
}
.wa-radio:hover { border-color: var(--hairline-strong); }
.wa-radio.on { border-color: var(--brand); background: var(--brand-softer); color: var(--brand); }
.wa-radio .i { flex: none; }
.wa-swatches { display: flex; gap: 9px; flex-wrap: wrap; }
.wa-swatch {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 2.5px solid transparent;
  cursor: pointer;
  position: relative;
  transition: all var(--t-fast);
}
.wa-swatch:hover { transform: scale(1.07); }
.wa-swatch.on { border-color: var(--text); box-shadow: var(--sh-1); }
.wa-swatch.on::after {
  content: '';
  position: absolute; inset: 0;
  margin: auto;
  width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7'/%3E%3C/svg%3E") center/contain no-repeat;
}
.wa-savebar {
  position: sticky;
  bottom: 0;
  margin-top: 20px;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
}
.wa-savebar small { color: var(--text-3); font-size: 11.5px; margin-inline-end: auto; }
.wa-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: .05em;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--info-soft);
  color: var(--info);
}
.wa-hint { font-size: 11.5px; color: var(--text-3); background: var(--brand-softer); border: 1px solid var(--hairline); border-radius: var(--r-sm); padding: 9px 13px; display: flex; gap: 8px; align-items: flex-start; }
.wa-hint .i { color: var(--brand); flex: none; margin-top: 1px; }
@media (max-width: 900px) {
  .wpadmin { grid-template-columns: 1fr; }
  .wpadmin-side { flex-direction: row; flex-wrap: wrap; border-inline-end: 0; border-bottom: 1px solid var(--hairline); }
  .wpadmin-side .wa-group { display: none; }
  .wpadmin-main { padding: 18px 16px 30px; }
  .wa-row { flex-direction: column; gap: 8px; }
  .wa-row-label { width: auto; }
}

/* ============ 9) استجابة الجوال للقوائم ============ */
@media (max-width: 640px) {
  .notif-panel, .user-menu, .theme-menu { position: fixed; top: calc(var(--topbar-h) + 6px); inset-inline: 10px; width: auto; inset-inline-end: 10px; min-width: 0; }
  .topuser-name { display: none; }
  .create-layout { grid-template-columns: 1fr; }
  .create-side { position: static; }
}

/* ============ 10) إضافات المنشئ ============ */
.spin {
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -2px;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* شرائح الظهور (الوصول) */
.seg-radio { display: flex; flex-wrap: wrap; gap: 7px; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg-opt span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--hairline);
  background: var(--surface-2);
  font-size: 12.5px; font-weight: 650;
  transition: all var(--t-fast);
  pointer-events: none;
}
.seg-opt input:checked + span { border-color: var(--brand); background: var(--brand-softer); color: var(--brand); }
.seg-opt.off { opacity: .45; }
.seg-opt.off span { cursor: not-allowed; }

/* حقل إضافة الوسوم */
.tag-add input {
  flex: 1; min-width: 140px;
  border: 0; outline: none; background: transparent;
  font-size: 13px;
  padding: 6px 2px;
}

/* عدّاد يتجاوز الحد */
.counter.over { color: var(--danger); font-weight: 700; }

/* بطاقات مختصرة في الشريط الجانبي للمنشئ */
.rules-list { display: flex; flex-direction: column; gap: 9px; }
.rules-list li { display: flex; gap: 9px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.rules-list li .i { color: var(--ok); flex: none; margin-top: 2px; }
