/* «لوحة الإدارة» (js/admin.js، الأدمن بس، الموقع والتطبيق): نفس الشكل الموحّد بتاع «عجلة المفهومية» بستايل اللعبة دي.
   index.html بيحمّله بـdata-site، فمش في الـArtifact */

.apAdm{ gap:8px; padding-bottom:calc(8px + env(safe-area-inset-bottom, 0px)); }
.admPane{ display:flex; flex-direction:column; gap:12px; }

/* التابات: شبكة ٦ في الصف، أيقونة واسم وعدد الجديد */
.admTabs{ display:grid; grid-template-columns:repeat(6, 1fr); gap:3px; flex:none; background:#0F1437; border-radius:16px; padding:5px; box-shadow:0 3px 0 #070A1C; }
.admTab{ position:relative; display:flex; flex-direction:column; align-items:center; gap:1px; border:none; background:transparent; color:#B9B3E6; border-radius:12px; padding:5px 0 4px; font-size:11px; font-weight:800; line-height:1.25; text-align:center; min-width:0; white-space:nowrap; }
.admTab .apIco{ width:20px; height:20px; }
.admTab.on{ background:#F6EBD0; color:#0F1437; }
.admTabN{ position:absolute; top:-1px; left:3px; min-width:18px; height:18px; padding:0 4px; border-radius:9px; background:#C8102E; color:#fff; font-style:normal; font-size:11px; font-weight:800; line-height:18px; font-variant-numeric:tabular-nums; }

/* السكاشن */
.admSec{ display:flex; flex-direction:column; gap:7px; }
.admSecH{ display:flex; align-items:center; gap:8px; padding:0 4px; }
.admSecH b{ font-family:'Changa', sans-serif; font-weight:800; font-size:18px; line-height:1.3; color:#0F1437; }
.admNote{ display:block; font-size:12px; font-weight:700; color:#7D5A3A; line-height:1.5; padding:0 4px; }
.admNone{ margin:0; text-align:center; font-size:14px; font-weight:700; color:#6B4A2A; padding:14px 6px; }
.apBtn.admMore{ align-self:center; }

/* «محتاج منك» */
.admTodos{ display:flex; flex-direction:column; gap:7px; }
.admTodo{ display:flex; align-items:center; gap:10px; width:100%; text-align:start; border:2.5px solid #0F1437; border-radius:14px; padding:8px 10px; background:#FFF8E6; color:#2A1B10; box-shadow:0 3px 0 #0F1437; }
.admTodo:active{ transform:translateY(2px); box-shadow:0 1px 0 #0F1437; }
.admTodoIco{ width:34px; height:34px; padding:7px; border-radius:10px; background:var(--tc, #0F1437); color:#fff; }
.admTodoT{ flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.3; }
.admTodoT b{ font-size:15px; font-weight:800; color:#0F1437; }
.admTodoT small{ font-size:12px; font-weight:700; color:#7D5A3A; }
.admTodoGo{ display:inline-flex; align-items:center; gap:3px; flex:none; background:var(--tc, #0F1437); color:#fff; border-radius:999px; padding:3px 10px 3px 8px; font-size:13px; font-weight:800; }
.admTodoGo .apIco{ width:13px; height:13px; }
.admTodo.flag{ --tc:#A10E26; background:#FBE3E6; }
.admTodo.fb{ --tc:#7A4E00; background:#FFF1C9; }
.admTodo.hid{ --tc:#46289A; }
.admTodoNone{ margin:0; display:flex; align-items:center; gap:8px; background:#D8F2E1; color:#0F6436; border-radius:14px; padding:9px 12px; font-size:14.5px; font-weight:800; }
.admTodoNone .apIco{ width:20px; height:20px; }

/* الفترة والاختيارات */
.admSeg{ display:grid; grid-auto-flow:column; grid-auto-columns:1fr; gap:3px; background:rgba(15,20,55,0.08); border-radius:12px; padding:3px; flex:none; }
.admSeg.scroll{ display:flex; overflow-x:auto; scrollbar-width:none; }
.admSeg.scroll::-webkit-scrollbar{ display:none; }
.admSeg.scroll .admSegB{ flex:1 0 auto; padding:5px 10px; }
.admSegB{ border:none; background:transparent; border-radius:9px; padding:5px 4px; font-size:13.5px; font-weight:800; color:#6B4A2A; line-height:1.3; white-space:nowrap; }
.admSegB.on{ background:#0F1437; color:#F6EBD0; box-shadow:0 2px 0 #070A1C; }
.admChip{ align-self:flex-start; display:inline-flex; align-items:center; gap:6px; border:2px solid #0F1437; border-radius:999px; background:#FFF8E6; color:#0F1437; font-size:13.5px; font-weight:800; padding:4px 12px 4px 10px; line-height:1.3; }
.admChip .apIco{ width:16px; height:16px; }
.admChip.on{ background:#0F1437; color:#FFD23F; }
.admChip b{ font-size:16px; line-height:1; }

/* كروت الأرقام */
.admStats{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.admStat{ display:flex; flex-direction:column; background:#FFF8E6; border:2.5px solid #0F1437; border-radius:14px; padding:6px 10px; box-shadow:0 3px 0 #0F1437; line-height:1.3; min-width:0; }
.admStat b{ font-family:'Rakkas', 'Changa', sans-serif; font-weight:400; font-size:28px; color:#C8102E; line-height:1.15; font-variant-numeric:tabular-nums; }
.admStat span{ font-size:14px; font-weight:800; color:#0F1437; }
.admLive{ margin:0; display:flex; align-items:center; gap:8px; font-size:14px; font-weight:800; color:#7D5A3A; padding:0 4px; }
.admPulse{ width:11px; height:11px; border-radius:50%; background:#9A9AA8; flex:none; }
.admLive.hot{ color:#0F1437; }
.admLive.hot .admPulse{ background:#1DA851; animation:admPulse 1.6s infinite; }
@keyframes admPulse{ 0%{ box-shadow:0 0 0 0 rgba(29,168,81,.55); } 70%{ box-shadow:0 0 0 9px rgba(29,168,81,0); } 100%{ box-shadow:0 0 0 0 rgba(29,168,81,0); } }
@media (prefers-reduced-motion: reduce){ .admLive.hot .admPulse{ animation:none; } }

/* الجداول */
.admTable{ display:flex; flex-direction:column; background:#FFF8E6; border:2.5px solid #0F1437; border-radius:14px; overflow:hidden; box-shadow:0 3px 0 #0F1437; }
.admTRow{ display:grid; align-items:center; gap:4px; padding:6px 8px; font-size:13.5px; font-weight:800; text-align:center; color:#2A1B10; font-variant-numeric:tabular-nums; }
.admTRow + .admTRow{ border-top:1.5px solid rgba(15,20,55,0.1); }
.admTRow b{ text-align:start; font-size:13px; color:#0F1437; display:flex; align-items:center; gap:4px; white-space:nowrap; overflow:hidden; }
.admTRow.head{ background:rgba(15,20,55,0.06); font-size:11px; color:#7D5A3A; line-height:1.25; padding:5px 8px; }
.admTRow.dim{ color:#9C8A6E; }
.admTable.p .admTRow{ grid-template-columns:1.7fr .8fr 1fr .9fr .8fr .8fr; }
.admTable.r .admTRow{ grid-template-columns:1fr .7fr 1.2fr 1.2fr; }
/* «الإعلان التجريبي»: النوع، والنهارده، وآخر ٧ أيام (فتحوه / كمّلوه) */
.admTable.ad .admTRow{ grid-template-columns:1.2fr 1fr 1fr; }
.admTable.ad .admTRow.sum{ background:rgba(15,20,55,0.06); }
.admTable.l .admTRow{ grid-template-columns:.9fr .8fr 1fr 1fr .8fr .8fr .8fr; padding:5px 8px; }
.admTable.l .admTRow.hard b{ color:#7A1606; }
.admTable.l .admTRow.odd{ background:#FBE3E6; }
.admOdd{ display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; border-radius:50%; background:#C8102E; color:#fff; font-style:normal; font-size:11px; line-height:1; }

/* القمع */
.admFunnel{ display:flex; flex-direction:column; gap:3px; background:#FFF8E6; border:2.5px solid #0F1437; border-radius:14px; padding:8px 10px; box-shadow:0 3px 0 #0F1437; }
.admFRow{ display:grid; grid-template-columns:28px 1fr 38px 38px; align-items:center; gap:6px; font-size:12.5px; font-weight:800; color:#2A1B10; font-variant-numeric:tabular-nums; }
.admFRow b{ text-align:center; color:#0F1437; }
.admFRow small{ font-size:11.5px; color:#7D5A3A; text-align:end; }
.admBarBox{ height:12px; background:rgba(15,20,55,0.08); border-radius:6px; overflow:hidden; }
.admBar{ display:block; height:100%; background:#1C4FA0; border-radius:6px; }
.admFRow.hard .admBar{ background:#C8102E; }
.admFRow.hard b{ color:#7A1606; }

/* اللستات */
.admList{ display:flex; flex-direction:column; gap:6px; }
.admSRow{ display:flex; align-items:center; gap:8px; background:#FFF8E6; border:2px solid rgba(15,20,55,0.3); border-radius:12px; padding:6px 8px; box-shadow:0 2px 0 rgba(15,20,55,0.3); }
.admSRow.flag{ border-color:#C8102E; box-shadow:0 2px 0 #C8102E; }
.admSRowT{ flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.3; }
.admSRowT b{ font-size:14px; font-weight:800; color:#0F1437; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.admSRowT small{ font-size:11.5px; font-weight:700; color:#7D5A3A; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.admMini{ flex:none; width:36px; height:36px; border:2px solid #0F1437; border-radius:10px; background:#FFF8E6; color:#0F1437; box-shadow:0 2px 0 #0F1437; display:flex; align-items:center; justify-content:center; padding:0; }
.admMini .apIco{ width:16px; height:16px; }
.admMini:active{ transform:translateY(2px); box-shadow:none; }
.admWho{ display:flex; align-items:center; gap:7px; min-width:0; border:none; background:none; padding:0; color:#0F1437; text-align:start; }
.admWho b{ font-size:15px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-decoration:underline; text-decoration-color:rgba(15,20,55,.25); text-underline-offset:3px; }
.admWho.small{ flex:0 1 34%; }
.admWho.small .lbAva{ width:28px; height:28px; }
.admWho.small b{ font-size:13.5px; }
.admTag{ display:inline-flex; align-items:center; gap:3px; font-style:normal; font-size:11.5px; font-weight:800; line-height:1.3; border-radius:999px; padding:2px 8px; background:rgba(15,20,55,0.08); color:#0F1437; white-space:nowrap; flex:none; }
.admTag .apIco{ width:13px; height:13px; }
.admTag.flag{ background:#C8102E; color:#fff; }
.admTag.ok{ background:#D8F2E1; color:#0F6436; }
.admTag.why{ background:#FFF1C9; color:#6B4A00; }
.admTag.hard{ background:#7A1606; color:#FFE2A8; }
.admTag.adm{ background:#0F1437; color:#FFD23F; }
.admTag.now, .admTag.cur{ background:#1C4FA0; color:#fff; }
.admTags{ display:flex; flex-wrap:wrap; gap:4px; }

/* «اللاعيبة» */
.admSearchRow{ position:relative; display:flex; align-items:center; }
.admSearchIco{ position:absolute; inset-inline-start:11px; width:20px; height:20px; color:#7D5A3A; pointer-events:none; }
.lbInput.admSearch{ padding-inline-start:38px; font-size:16px; padding-top:7px; padding-bottom:7px; }
.admPRow{ display:flex; align-items:center; gap:9px; width:100%; text-align:start; background:#FFF8E6; border:2px solid #0F1437; border-radius:12px; padding:6px 10px; color:#2A1B10; box-shadow:0 2px 0 #0F1437; }
.admPRow:active{ transform:translateY(2px); box-shadow:none; }
.admPRow.hid{ background:#EFE4CC; border-style:dashed; box-shadow:none; }
.admPRowT{ flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.3; }
.admPRowT b{ display:flex; align-items:center; gap:6px; font-size:15px; font-weight:800; color:#0F1437; min-width:0; }
.admPRowT b > span{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.admPRowT small{ font-size:12px; font-weight:700; color:#7D5A3A; }
.admGo{ width:16px; height:16px; color:#7D5A3A; }

/* كارت اللاعب */
.admBack{ align-self:flex-start; display:inline-flex; align-items:center; gap:4px; border:none; background:rgba(15,20,55,0.08); color:#0F1437; border-radius:999px; padding:5px 12px 5px 10px; font-size:14px; font-weight:800; }
.admBack .apIco{ width:15px; height:15px; }
.admCard{ gap:10px; background:linear-gradient(#FFF8E6, #FFF1D0); }
.admCStats{ grid-template-columns:repeat(4, 1fr); }
.admCStats .lbStat b{ font-size:19px; }
.admCStats .lbStat span{ font-size:11px; text-align:center; line-height:1.3; }
.admActs{ display:flex; flex-wrap:wrap; gap:7px; align-items:center; }
.admActs .apBtn{ flex:none; }
.admActs .admNote{ flex:1; min-width:120px; padding:0; }
.admSubT{ font-size:15px; font-weight:800; color:#0F1437; }
.fbTa.admNoteTa{ min-height:72px; }
.admMsg{ background:#FFF8E6; border:2px solid rgba(15,20,55,0.3); border-radius:12px; padding:6px 10px; }
.admMsg small{ font-size:11.5px; font-weight:700; color:#7D5A3A; }
.admMsg p{ margin:2px 0 0; font-size:14px; font-weight:600; line-height:1.55; color:#2A1B10; white-space:pre-wrap; overflow-wrap:anywhere; user-select:text; -webkit-user-select:text; }
.admAsk{ font-size:15px; }
/* «إدّيله نقط» (المنحة) */
.admGrantBox{ gap:8px; }
.admGrant{ display:flex; flex-direction:column; gap:1px; background:#FFF8E6; border:2px solid #0F1437; border-radius:12px; padding:7px 10px; line-height:1.45; }
.admGrant b{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:15px; font-weight:800; color:#0F1437; }
.admGrant small{ font-size:11.5px; font-weight:700; color:#7D5A3A; }
.admGrant.off{ background:#FBF3DE; border-style:dashed; border-color:rgba(15,20,55,0.35); }
.admGrant.off b > span{ text-decoration:line-through; text-decoration-thickness:1.5px; }
.admGrantWhy{ margin:0; font-size:14px; font-weight:700; color:#2A1B10; overflow-wrap:anywhere; }
.admGrantOld{ display:flex; flex-direction:column; gap:6px; }
.admGrantWho{ margin:0; font-size:15px; }
.admFields{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.admField{ display:flex; flex-direction:column; gap:4px; min-width:0; font-size:13.5px; font-weight:800; color:#0F1437; text-align:start; }
.admField .lbInput{ font-size:17px; padding:7px 11px; min-width:0; }
.admGrantEst{ padding:0; }
.admGrantEst.err{ color:#A10E26; }
.apBtn.admGrantCalc{ align-self:flex-start; }
/* الكود نفسه LTR بخط ثابت، بس وهو فاضي الكلام اللي جواه عربي */
.mvCode.admGrantCode:placeholder-shown{ direction:rtl; text-align:right; font-family:inherit; font-size:14px; font-weight:700; }
.admTable.gr .admTRow{ grid-template-columns:1.2fr 1fr 1fr; }
.admTable.gr .admTRow:not(.head){ font-size:15px; }
.admTable.gr .admTRow:not(.head) b{ font-size:14px; }
.admTable.gr .admTRow:not(.head) span:last-child{ font-weight:800; color:#0F6436; }

/* «الحلول» */
.admKRow{ display:flex; flex-direction:column; gap:6px; }
.admLvBox{ display:flex; gap:6px; align-items:center; }
.lbInput.admLvIn{ width:110px; font-size:15px; padding:6px 10px; }
.admSolve{ gap:6px; padding:10px 12px; }
.admSolve.flag{ border-color:#C8102E; box-shadow:0 4px 0 #C8102E; }
.admSolveTop{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.admWhen{ flex:none; font-size:12px; font-weight:700; color:#7D5A3A; }
.admSolveK{ display:flex; flex-wrap:wrap; align-items:center; gap:5px; }
.admSolveK b{ font-size:15px; font-weight:800; color:#0F1437; }
.admVs{ margin:0; font-size:15.5px; font-weight:800; color:#A10E26; font-variant-numeric:tabular-nums; }
.admSolve:not(.flag) .admVs{ color:#2A1B10; }

/* «إعادة الحل» */
.admRp{ display:flex; flex-direction:column; align-items:center; gap:8px; }
.admRpWho{ font-size:14.5px; }
.admRpCv{ display:block; }
.admRpCtl{ display:flex; align-items:center; gap:7px; }
.admRpB{ min-width:42px; height:42px; border:2px solid #0F1437; border-radius:12px; background:#FFF8E6; color:#0F1437; box-shadow:0 3px 0 #0F1437; display:flex; align-items:center; justify-content:center; padding:0 8px; font-size:14px; font-weight:800; }
.admRpB .apIco{ width:20px; height:20px; }
.admRpB:active{ transform:translateY(2px); box-shadow:0 1px 0 #0F1437; }
.admRpClock{ font-size:15px; font-weight:800; color:#0F1437; direction:ltr; unicode-bidi:isolate; font-variant-numeric:tabular-nums; min-width:76px; text-align:center; }
.admRp .admNote{ text-align:center; }

/* «الألغاز» */
.admPzRow{ display:flex; align-items:center; gap:9px; background:#FFF8E6; border:2px solid #0F1437; border-radius:12px; padding:6px 8px; box-shadow:0 2px 0 #0F1437; }
.admPzRow.future{ background:#FBF3DE; border-style:dashed; box-shadow:none; }
.admThumb{ flex:none; display:block; }
.admPzT{ flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; line-height:1.3; }
.admPzT b{ font-size:14.5px; font-weight:800; color:#0F1437; }
.admPzT small{ font-size:11.5px; font-weight:700; color:#7D5A3A; }
.admPzT .admPzSt{ color:#2A1B10; }
.apBtn.admPlay{ flex:none; padding:5px 10px; font-size:14px; }

/* «السجل» */
.admLog{ display:flex; align-items:flex-start; gap:8px; background:#FFF8E6; border:2px solid rgba(15,20,55,0.3); border-radius:12px; padding:7px 10px; }
.admLog.link{ cursor:pointer; }
.admLogBy{ flex:none; background:#0F1437; color:#FFD23F; border-radius:999px; padding:1px 9px; font-size:12.5px; font-weight:800; line-height:1.5; }
.admLogT{ flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.45; }
.admLogT span{ font-size:14px; font-weight:700; color:#2A1B10; }
.admLogT small{ font-size:11.5px; font-weight:700; color:#7D5A3A; }

/* «الرسايل» جوه اللوحة (js/fb.js) */
.admFb{ display:flex; flex-direction:column; gap:10px; }
.admBadge{ top:-8px; left:-8px; }

@media (max-width:359px){
  .admTab{ font-size:9.5px; }
  .admTab .apIco{ width:18px; height:18px; }
  .admTable.p .admTRow, .admTable.l .admTRow{ font-size:12px; }
}

/* الأرقام بتتداس (زكي ١٠/١١): «نظرة عامة» ⇒ «اللاعيبة» أو «الحلول» بالفلتر */
.admStat.tap{ position:relative; text-align:start; font:inherit; color:inherit; cursor:pointer; }
.admStat.tap:active{ transform:translateY(2px); box-shadow:0 1px 0 #0F1437; }
.admStatGo{ position:absolute; top:9px; left:9px; width:15px; height:15px; color:#7D5A3A; }
.admNum{ border:none; background:rgba(28,79,160,0.1); color:#1C4FA0; border-radius:8px; padding:1px 6px; font:inherit; font-weight:800; text-decoration:underline; text-decoration-color:rgba(28,79,160,.35); text-underline-offset:3px; justify-self:center; }
.admNum:active{ background:rgba(28,79,160,0.2); }
button.admLive{ border:none; background:none; font:inherit; font-size:14px; font-weight:800; text-align:start; padding:0 4px; text-decoration:underline; text-decoration-color:rgba(15,20,55,.25); text-underline-offset:3px; }
button.admFRow{ width:100%; border:none; background:none; font:inherit; color:inherit; padding:2px 0; border-radius:6px; }
button.admFRow:active{ background:rgba(28,79,160,0.1); }
button.admFRow > span:nth-child(3){ color:#1C4FA0; text-decoration:underline; text-underline-offset:3px; }
.admFilter{ display:flex; align-items:center; justify-content:space-between; gap:8px; background:#0F1437; color:#FFD23F; border-radius:12px; padding:7px 8px 7px 12px; flex:none; }
.admFilter b{ font-size:15.5px; font-weight:800; line-height:1.35; min-width:0; }
.admFilterX{ flex:none; width:32px; height:32px; border:none; border-radius:9px; background:#FFF8E6; color:#0F1437; font-size:20px; font-weight:800; line-height:1; padding:0; }
/* «أخطاء آخر ٢٤ ساعة» (زكي ١٠/١١) */
.admTodo.err{ --tc:#6B3FA0; background:#EFE6FA; }
.admErrs{ display:flex; flex-direction:column; gap:8px; max-height:60vh; overflow:auto; text-align:start; }
.admErrTot{ margin:0; font-size:13px; font-weight:700; color:#7D5A3A; text-align:center; }
.admErr{ background:#FFF8E6; border:2px solid #0F1437; border-radius:12px; padding:8px 10px; display:flex; flex-direction:column; gap:4px; }
.admErrMsg{ font:700 13px/1.45 ui-monospace, Menlo, Consolas, monospace; color:#8E1022; overflow-wrap:anywhere; text-align:left; }
.admErrRow{ display:flex; flex-wrap:wrap; gap:4px 10px; font-size:13px; font-weight:700; color:#0F1437; }
.admErrN{ color:#6B3FA0; }
.admErrTags{ display:flex; flex-wrap:wrap; gap:4px; }
.admErrTag{ font-size:11.5px; font-weight:700; background:#F1E3C2; border-radius:999px; padding:1px 8px; color:#5A3D22; overflow-wrap:anywhere; }
.admErrDet summary{ font-size:12px; font-weight:800; color:#1C4FA0; cursor:pointer; }
.admErrPre{ margin:4px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; font:600 11px/1.4 ui-monospace, Menlo, Consolas, monospace; color:#2A1B10; text-align:left; background:#F6EBD0; border-radius:8px; padding:6px; }
