/* تحسينات مشتركة لصفحات الأوامر: وظيفة الأمر، القائمة الجانبية، وتكبير الخط. */

/* ===== سطر «وظيفته» داخل كل بطاقة ===== */
.px-fn { display: flex; gap: .6em; align-items: baseline; margin: .7em 0 .8em; padding: .7em .9em; border-radius: 12px; background: rgba(99, 221, 255, .09); border: 1px solid rgba(99, 221, 255, .28); border-inline-start: 4px solid #63ddff; font-size: 16px; line-height: 1.8; color: #e9efff; text-align: start; }
.px-fn-k { flex: none; font-weight: 800; color: #63ddff; white-space: nowrap; }
.px-fn-k::after { content: ":"; }
.px-fn-t { font-weight: 600; min-width: 0; }

/* ===== القائمة الجانبية (المعلمون والطلاب) ===== */
.px-layout { display: flex; align-items: flex-start; }
.px-content { flex: 1 1 0; min-width: 0; }
.px-side { flex: 0 0 310px; width: 310px; position: sticky; top: 0; max-height: 100vh; overflow-y: auto; overscroll-behavior: contain; padding: 14px 10px 48px; background: #070b1c; border-inline-end: 1px solid #1d2850; scrollbar-width: thin; scrollbar-color: #26346a transparent; }
.px-side-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 8px 12px; color: #e9efff; font-size: 17px; }
.px-side-h span { font-size: 13.5px; color: #63ddff; }
.px-g { margin-bottom: 4px; }
.px-gb { display: flex; align-items: center; gap: .6em; width: 100%; padding: .7em .8em; border: 0; border-radius: 10px; background: transparent; color: #cfe3ff; font-family: inherit; font-size: 15.5px; font-weight: 700; line-height: 1.45; text-align: start; cursor: pointer; }
.px-gb:hover { background: #0d2145; }
.px-g.on > .px-gb { background: #10285a; color: #fff; }
.px-gb .ic { flex: none; font-size: 1.15em; }
.px-gb .tt { flex: 1 1 auto; min-width: 0; }
.px-gb .cnt { flex: none; padding: .1em .6em; border-radius: 999px; background: rgba(99, 221, 255, .16); color: #63ddff; font-size: 12.5px; font-weight: 700; }
.px-items { display: none; margin: 2px 0 10px; padding: 0; list-style: none; }
.px-g.open .px-items { display: block; }
.px-items a { display: flex; gap: .55em; align-items: baseline; padding: .5em .7em .5em .5em; border-radius: 8px; color: #a9bde0; font-size: 14.5px; line-height: 1.6; text-decoration: none; }
.px-items a:hover { background: #0d2145; color: #63ddff; }
.px-items a.on { background: #2f6df0; color: #fff; font-weight: 700; }
.px-items .n { flex: none; min-width: 1.7em; text-align: center; font-size: 12.5px; opacity: .85; }
.px-items .t { min-width: 0; }
.px-flash { animation: pxFlash 1.8s ease-out; }
@keyframes pxFlash { 0% { box-shadow: 0 0 0 3px #63ddff, 0 0 28px rgba(99, 221, 255, .55); } 100% { box-shadow: 0 0 0 0 transparent; } }
.px-overlay, .px-menu { display: none; }

@media (max-width: 900px) {
  .px-layout { display: block; }
  .px-side { position: fixed; top: 0; right: 0; bottom: 0; z-index: 200; width: min(88vw, 350px); max-height: none; flex: none; transform: translateX(105%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; box-shadow: -10px 0 40px rgba(0, 0, 0, .55); }
  .px-side.open { transform: none; visibility: visible; transition: transform .25s ease; }
  .px-overlay.open { display: block; position: fixed; inset: 0; z-index: 190; background: rgba(2, 4, 11, .72); }
  body.px-has-side .mn-head { position: sticky; top: 0; z-index: 120; }
  .px-menu { display: inline-flex; align-items: center; gap: .4em; flex: 0 0 auto; padding: .55em .95em; border: 1px solid rgba(99, 221, 255, .6); border-radius: 999px; background: #10285a; color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer; -webkit-appearance: none; appearance: none; }
}

/* ===== المعلمون والمعلمات ===== */
/* التبويبات: صفوف منتظمة في منتصف الصفحة بلا سحب أفقي */
body[data-px="teachers"] .nav { position: static; background: transparent; border-bottom: 0; box-shadow: none; padding: 20px 12px 8px; }
body[data-px="teachers"] .nav-i { flex-wrap: wrap; justify-content: center; overflow: visible; gap: 10px; max-width: 980px; margin: 0 auto; padding: 0; }
body[data-px="teachers"] .nb { flex: 0 0 auto; padding: .6em 1.05em; font-size: 15px; line-height: 1.4; border-radius: 999px; }
body[data-px="teachers"] .nb.on { background: #10285a; border-color: #63ddff; box-shadow: 0 0 0 2px rgba(99, 221, 255, .25); }
body[data-px="teachers"] .pn { font-size: 18px; font-weight: 800; line-height: 1.55; }
body[data-px="teachers"] .pt { font-size: 15.5px; line-height: 2; }
body[data-px="teachers"] .pex { font-size: 14.5px; line-height: 1.8; }
body[data-px="teachers"] .cb { font-size: 15.5px; padding-block: .75em; }
body[data-px="teachers"] .ptool { font-size: 12.5px; }
body[data-px="teachers"] .attach-note { font-size: 14px; }
body[data-px="teachers"] .sec-ttl { font-size: 21px; line-height: 1.5; }
body[data-px="teachers"] .sec-sub { font-size: 14.5px; }
body[data-px="teachers"] .sec-cnt { font-size: 14px; }
body[data-px="teachers"] .srch-i { font-size: 16px; }
body[data-px="teachers"] .srch-c, body[data-px="teachers"] .qempty { font-size: 14.5px; }
body[data-px="teachers"] .pc { scroll-margin-top: 16px; }

/* ===== الطلاب والطالبات ===== */
body[data-px="students"] .tabbar { position: static; background: transparent; border: 0; box-shadow: none; padding: 20px 12px 8px; }
body[data-px="students"] .tabbar .wrap { padding: 0; }
body[data-px="students"] .nav-scroller { display: flex; flex-wrap: wrap; justify-content: center; overflow: visible; gap: 10px; max-width: 980px; margin: 0 auto; padding: 0; }
body[data-px="students"] .nav-pill { flex: 0 0 auto; padding: .6em 1.05em; font-size: 15px; min-height: 0; border-radius: 999px; }
body[data-px="students"] .nav-pill.active { background: #10285a; border-color: #63ddff; box-shadow: 0 0 0 2px rgba(99, 221, 255, .25); }
body[data-px="students"] .cmd-title { font-size: 21px; line-height: 1.5; }
body[data-px="students"] .cmd-meta p { font-size: 15.5px; line-height: 1.85; }
body[data-px="students"] .cmd-id { font-size: 14px; }
body[data-px="students"] .mode-chip { font-size: 13px; }
body[data-px="students"] .cmd-body { font-size: 15.5px; line-height: 2; }
body[data-px="students"] .chapter-head h2 { font-size: 24px; }
body[data-px="students"] .chapter-head .count { font-size: 14.5px; }
body[data-px="students"] .cmd-card, body[data-px="students"] .chapter { scroll-margin-top: 16px; }

/* ===== المذاكرة ===== */
body[data-px="study"] .card h3 { font-size: 21px; line-height: 1.5; }
body[data-px="study"] .card .desc, body[data-px="study"] .card .result { font-size: 16.5px; line-height: 1.85; }
body[data-px="study"] .card .prompt { font-size: 16px; line-height: 1.95; }
body[data-px="study"] .plabel { font-size: 14.5px; }
body[data-px="study"] .tool, body[data-px="study"] .when { font-size: 15px; }

/* ===== NotebookLM ===== */
body[data-px="notebooklm"] .cmd-title { font-size: 19px; line-height: 1.5; }
body[data-px="notebooklm"] .cmd-use { font-size: 15.5px; line-height: 1.8; }
body[data-px="notebooklm"] .prompt-text { font-size: 15.5px; line-height: 1.95; }
body[data-px="notebooklm"] .tip-text, body[data-px="notebooklm"] .example-text { font-size: 15px; line-height: 1.85; }
body[data-px="notebooklm"] .block-label { font-size: 13px; }
body[data-px="notebooklm"] .nav-sub, body[data-px="notebooklm"] .sb-section-btn { font-size: 14.5px; }

/* ===== القدرات والتحصيلي وبحوث التخرج ===== */
body[data-px="qiyas"] .cmd-head h3, body[data-px="research"] .cmd-head h3 { font-size: 18.5px; line-height: 1.5; }
body[data-px="qiyas"] .meta-box, body[data-px="research"] .meta-box { font-size: 15px; line-height: 1.8; }
body[data-px="qiyas"] .prompt-box, body[data-px="research"] .prompt-box { font-size: 15.5px; line-height: 1.95; }
body[data-px="qiyas"] .pl-text, body[data-px="research"] .pl-text, body[data-px="qiyas"] .m-label, body[data-px="research"] .m-label { font-size: 14px; }
body[data-px="qiyas"] .sb-section-btn, body[data-px="research"] .sb-section-btn { font-size: 14.5px; }
body[data-px="qiyas"] .sb-cmd-list li a, body[data-px="research"] .sb-cmd-list li a { font-size: 14px; }

/* التبويبات على الجوال: شبكة من عمودين متساويين بدل صف طويل */
@media (max-width: 600px) {
  body[data-px="teachers"] .nav-i, body[data-px="students"] .nav-scroller { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body[data-px="teachers"] .nb, body[data-px="students"] .nav-pill { display: flex; align-items: center; justify-content: center; text-align: center; white-space: normal; padding: .55em .5em; font-size: 14px; line-height: 1.45; border-radius: 14px; min-height: 46px; }
  body[data-px="teachers"] .nb:last-child:nth-child(odd), body[data-px="students"] .nav-pill:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ===== مربع البحث داخل الترويسة (المعلمون والطلاب) ===== */
.mn-head .srch { order: 9; flex: 1 0 100%; margin: 0; min-width: 0; }
.mn-head .srch-i { display: block; width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid rgba(99, 221, 255, .45); background: #0d2145; color: #e9efff; font-family: inherit; font-size: 16px; -webkit-user-select: text; user-select: text; -webkit-appearance: none; appearance: none; }
.mn-head .srch-i::placeholder { color: #9aa8c7; }
.mn-head .srch-i:focus { outline: 2px solid #63ddff; outline-offset: 2px; }
.mn-head .srch-c { font-size: 13px; color: #9aa8c7; margin-top: 4px; }
.mn-head .srch-c:empty { display: none; }
body[data-px="teachers"] .mn-head, body[data-px="students"] .mn-head { flex-wrap: wrap; row-gap: 8px; padding-bottom: 12px; }
.qempty { padding: 20px; text-align: center; color: #9aa8c7; font-size: 14.5px; background: #0c1228; border-radius: 12px; border: 1.5px dashed rgba(99, 221, 255, .35); margin: 16px auto; }
.qempty[hidden], section.chapter[hidden] { display: none; }
@media (min-width: 901px) {
  .mn-head .srch { order: 1; flex: 0 1 420px; }
  .mn-head .home-btn { order: 2; }
}

/* ترويسة مثبتة على كل المقاسات في المعلمين والطلاب، وإزاحة التمرير تحتها */
body[data-px="teachers"] .mn-head, body[data-px="students"] .mn-head { position: sticky; top: 0; z-index: 120; }
body[data-px="teachers"] .sec, body[data-px="teachers"] .pc, body[data-px="students"] section.chapter, body[data-px="students"] .cmd-card { scroll-margin-top: 140px; }
@media (min-width: 901px) {
  body[data-px="teachers"] .px-side, body[data-px="students"] .px-side { top: 66px; max-height: calc(100vh - 66px); }
  body[data-px="teachers"] .sec, body[data-px="teachers"] .pc, body[data-px="students"] section.chapter, body[data-px="students"] .cmd-card { scroll-margin-top: 90px; }
}

/* الصف الأول: القائمة + الشعار والعنوان + الرئيسية في سطر واحد، والبحث في سطر تحته */
body[data-px="teachers"] .mn-head .topbar-brand, body[data-px="students"] .mn-head .topbar-brand { flex: 1 1 0; min-width: 0; }
body[data-px="teachers"] .mn-head .home-btn, body[data-px="students"] .mn-head .home-btn { flex: 0 0 auto; }
body[data-px="teachers"] .mn-head, body[data-px="students"] .mn-head { column-gap: 10px; row-gap: 10px; padding: 10px 14px 14px; }
@media (max-width: 900px) {
  body[data-px="teachers"] .px-menu, body[data-px="students"] .px-menu { padding: .7em .85em; font-size: 14px; }
  body[data-px="teachers"] .mn-head .t-main, body[data-px="students"] .mn-head .t-main { font-size: 14px; }
}
