/* ═══════════════════════════════════════════════════════════
   shell2.css — پوسته‌ی تازه (نوارِ کناری، نوارِ بالا، نوارِ پایینِ گوشی)

   ⚠️ همه چیز زیرِ `body.sh2` است. کلاسِ sh2 را shell2.js فقط برای
   معلم می‌گذارد، پس پنلِ دانش‌آموز/والدین/مدیر دست‌نخورده می‌ماند.
   برداشتنِ کلاس = برگشتِ کاملِ ظاهرِ قبلی.
   ═══════════════════════════════════════════════════════════ */

body.sh2{
  --sh-bg:#EEF4FB; --sh-card:#fff; --sh-line:#E6EEF7;
  --sh-ink:#1F2D3D; --sh-ink2:#64748B; --sh-blue:#2E9BE6; --sh-green:#17B67C;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) body.sh2{
    --sh-bg:#0E141C; --sh-card:#151C26; --sh-line:#25303F; --sh-ink:#E8EEF6; --sh-ink2:#93A3B8;
  }
}
:root[data-theme="dark"] body.sh2{
  --sh-bg:#0E141C; --sh-card:#151C26; --sh-line:#25303F; --sh-ink:#E8EEF6; --sh-ink2:#93A3B8;
}

/* ── نوارِ کناری ────────────────────────────────────────── */
body.sh2 .sidebar{ background:var(--sh-card); border-inline-start:1px solid var(--sh-line); }
body.sh2 .sb-logo{ padding:1rem .9rem .6rem; }
body.sh2 .sb-logo-ico{ display:none; }
body.sh2 .sh2-logo{ display:block; width:100%; max-width:168px; margin:0 auto .15rem; }
body.sh2 .sh2-logo-sub{
  display:block; text-align:center; font-size:.66rem; color:var(--sh-ink2);
  line-height:1.8; margin-bottom:.2rem;
}
body.sh2 .sb-logo-t, body.sh2 .sb-logo-s{ display:none; }

body.sh2 .sb-nav{ padding:.35rem .55rem; }
/*  ⚠️ فشرده نگه داشته می‌شود: با ۱۶ مورد، هر پیکسلِ ارتفاع یعنی یک
    موردِ بیشتر که بدونِ اسکرول دیده می‌شود. */
body.sh2 .sb-nav .nav-item{
  border-radius:12px; padding:.48rem .7rem; margin-bottom:.12rem;
  font-size:.82rem; font-weight:700; color:var(--sh-ink2);
}
body.sh2 .sb-nav .nav-item:hover{ background:#F2F7FC; color:var(--sh-ink); }
body.sh2 .sb-nav .nav-item.active{
  background:#E9F2FE; color:#1D6FBF; position:relative;
}
body.sh2 .sb-nav .nav-item.active::before{
  content:''; position:absolute; inset-inline-start:0; top:22%; bottom:22%;
  width:3px; border-radius:3px; background:#1D6FBF;
}
body.sh2 .sb-nav .nav-ico img{ width:20px; height:20px; }
body.sh2 .sb-nav .nav-ico svg{ width:20px; height:20px; }

/* کارتِ تشویقی + پشتیبانی، تهِ منو */
/*  ⚠️ کارتِ بلند، فهرستِ ۱۵تایی را می‌خورد (۳۸۰ از ۶۸۶ پیکسل را
    گرفته بود). پس افقی و جمع‌وجور است، نه عمودی و بزرگ. */
body.sh2 .sh2-sbcard{
  display:flex; align-items:center; gap:.5rem; overflow:hidden;
  margin:.5rem .55rem .45rem; border-radius:14px; padding:.55rem .65rem;
  background:linear-gradient(160deg,#E3F3FF,#DFF6EA); color:#0E4A3C;
  font-size:.72rem; font-weight:800; line-height:1.7; text-align:start;
}
body.sh2 .sh2-sbcard img{ width:50px; flex:none; pointer-events:none; }
/*  روی نمایشگرِ کوتاه، کارت کنار می‌رود تا منو کامل دیده شود */
@media (max-height:700px){ body.sh2 .sh2-sbcard{ display:none; } }
body.sh2 .sh2-support{
  display:flex; align-items:center; justify-content:center; gap:.45rem;
  width:calc(100% - 1.1rem); margin:0 .55rem .6rem; cursor:pointer;
  background:#1D3A5C; color:#fff; border:0; border-radius:14px;
  padding:.7rem .8rem; font:inherit; font-weight:800; font-size:.82rem;
}
body.sh2 .sh2-support:hover{ filter:brightness(1.12); }
body.sh2 .sb-home-btn{ font-size:.76rem; opacity:.8; }

/* ── نوارِ بالا ─────────────────────────────────────────── */
body.sh2 .topbar{
  background:var(--sh-card); border-bottom:1px solid var(--sh-line);
  gap:.8rem; padding-inline:1rem;
}
body.sh2 .topbar-t{ display:none; }
/*  دکمه‌های قدیمی پنهان (حذف نمی‌شوند تا کدی که صداشان می‌زند نشکند) */
body.sh2 #tb-music-toggle, body.sh2 .topbar-r > .tb-btn[title="تنظیم صدا"]{ display:none; }

body.sh2 .sh2-search{
  flex:1; max-width:520px; position:relative; display:flex; align-items:center;
}
body.sh2 .sh2-search input{
  width:100%; border:1px solid var(--sh-line); background:#F5F9FD;
  border-radius:12px; padding:.6rem 2.3rem .6rem .8rem;
  font:inherit; font-size:.82rem; color:var(--sh-ink);
}
body.sh2 .sh2-search input:focus{ outline:2px solid #BEDCFA; border-color:#BEDCFA; }
body.sh2 .sh2-search .sh2-mag{
  position:absolute; inset-inline-start:.65rem; opacity:.5; pointer-events:none;
  display:grid; place-items:center;
}
body.sh2 .sh2-kbd{
  position:absolute; inset-inline-end:.5rem; font-size:.66rem; color:var(--sh-ink2);
  background:var(--sh-card); border:1px solid var(--sh-line); border-radius:7px;
  padding:.12rem .35rem; pointer-events:none;
}
body.sh2 .sh2-res{
  position:absolute; top:calc(100% + .4rem); inset-inline-start:0; inset-inline-end:0;
  background:var(--sh-card); border:1px solid var(--sh-line); border-radius:14px;
  box-shadow:0 8px 26px rgba(31,45,61,.14); padding:.35rem; z-index:60;
  max-height:min(56vh,360px); overflow:auto;
}
body.sh2 .sh2-res button{
  display:flex; align-items:center; gap:.55rem; width:100%; cursor:pointer;
  background:none; border:0; border-radius:10px; padding:.55rem .6rem;
  font:inherit; font-size:.82rem; color:var(--sh-ink); text-align:start;
}
body.sh2 .sh2-res button:hover, body.sh2 .sh2-res button.on{ background:#EEF5FD; }
body.sh2 .sh2-res .sh2-none{ padding:.9rem; font-size:.8rem; color:var(--sh-ink2); text-align:center; }

body.sh2 .sh2-icbtn{
  position:relative; width:38px; height:38px; flex:none; cursor:pointer;
  display:grid; place-items:center; border:1px solid var(--sh-line);
  background:var(--sh-card); border-radius:11px; color:var(--sh-ink2);
}
body.sh2 .sh2-icbtn:hover{ background:#F2F7FC; color:var(--sh-ink); }
body.sh2 .sh2-icbtn .sh2-dot{
  position:absolute; top:7px; inset-inline-end:8px; width:8px; height:8px;
  border-radius:50%; background:#EF4444; border:2px solid var(--sh-card);
}
body.sh2 .sh2-me{
  display:flex; align-items:center; gap:.55rem; cursor:pointer;
  padding-inline-start:.8rem; border-inline-start:1px solid var(--sh-line);
}
body.sh2 .sh2-me-t{ text-align:start; line-height:1.5; }
body.sh2 .sh2-me-t b{ display:block; font-size:.82rem; font-weight:800; color:var(--sh-ink); }
body.sh2 .sh2-me-t span{ font-size:.7rem; color:var(--sh-ink2); }
body.sh2 .sh2-me-av{
  width:40px; height:40px; border-radius:50%; flex:none; object-fit:cover;
  background:#E9F2FE; border:2px solid var(--sh-line);
}

/* ── نوارِ پایینِ گوشی ───────────────────────────────────── */
/*  ⚠️ دکمه‌ی «+» عمداً نیست — کارفرما گفت چنین گزینه‌ای نداریم. */
body.sh2 .sh2-tabs{ display:none; }
@media (max-width:760px){
  body.sh2 .sh2-tabs{
    display:grid; grid-template-columns:repeat(4,1fr);
    position:fixed; inset-inline:0; bottom:0; z-index:70;
    background:var(--sh-card); border-top:1px solid var(--sh-line);
    padding:.3rem .2rem calc(.3rem + env(safe-area-inset-bottom,0px));
    box-shadow:0 -2px 14px rgba(31,45,61,.07);
  }
  body.sh2 .sh2-tab{
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:.15rem; cursor:pointer; background:none; border:0; font:inherit;
    color:var(--sh-ink2); font-size:.66rem; font-weight:700;
    min-height:48px; padding:.25rem;
  }
  body.sh2 .sh2-tab.on{ color:var(--sh-blue); }
  body.sh2 .sh2-tab svg{ width:22px; height:22px; }
  body.sh2 .main{ padding-bottom:64px; }
  /*  ⚠️ حبابِ گزارشِ باگ (.fbx-fab) پایین-چپ می‌نشیند و دقیقاً روی
      گزینه‌ی «بیشتر» می‌افتاد. قانونِ قدیمی فقط نوارِ شناورِ قبلی
      (body.has-fbar) را می‌شناخت، نه این نوار را. */
  body.sh2 .fbx-fab{ bottom:80px; }
  /* روی گوشی جست‌وجو جا نمی‌شود — با ذره‌بینِ نوارِ بالا باز می‌شود */
  body.sh2 .sh2-search{ display:none; }
  body.sh2 .sh2-search.open{
    display:flex; position:fixed; inset-inline:.6rem; top:.6rem; z-index:80; max-width:none;
  }
  body.sh2 .sh2-me-t{ display:none; }
}
@media (min-width:761px){ body.sh2 .sh2-searchbtn{ display:none; } }

/* 🎤 دکمه‌ی دستیارِ صوتی در نوارِ بالا */
body.sh2 .sh2-mic .sh2-mic-ic{ font-size:1rem; line-height:1; }
body.sh2 .sh2-mic.listening{
  background:#FFE9EC; border-color:#FFC9D1; color:#D42A46;
  animation:sh2MicPulse 1.1s ease-in-out infinite;
}
@keyframes sh2MicPulse{ 0%,100%{ box-shadow:0 0 0 0 rgba(212,42,70,.35); } 50%{ box-shadow:0 0 0 6px rgba(212,42,70,0); } }
@media (prefers-reduced-motion:reduce){ body.sh2 .sh2-mic.listening{ animation:none; } }

/* 🎓 درخواست‌های تغییرِ پایه — پنلِ مدیرِ سایت */
.agq{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:.8rem; }
.agq-row{ background:var(--card,#fff); border:1px solid var(--line,#E6EEF7); border-radius:16px; padding:1rem; }
.agq-h{ display:flex; align-items:center; gap:.5rem; justify-content:space-between; }
.agq-h b{ font-size:.98rem; font-weight:900; }
.agq-b{ font-size:.66rem; font-weight:800; border-radius:99px; padding:.2rem .6rem; }
.agq-b.pend{ background:#FFF3DA; color:#8A5A00; }
.agq-b.ok{ background:#DFF6EA; color:#0E7A55; }
.agq-b.no{ background:#FDECEC; color:#A22; }
.agq-m{ display:flex; flex-wrap:wrap; gap:.6rem; font-size:.7rem; opacity:.65; margin:.4rem 0; }
.agq-g{ font-size:.86rem; margin:.5rem 0; }
.agq-g i{ font-style:normal; opacity:.6; }
.agq-g b{ font-weight:900; color:#2E9BE6; }
.agq-w{ background:var(--soft,#F5F9FD); border-radius:12px; padding:.6rem .75rem; font-size:.78rem; line-height:1.9; }
.agq-a{ display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.7rem; }
.agq-n{ margin-top:.6rem; font-size:.72rem; opacity:.7; }

/* 📜 بخشنامه‌ها */
.cir-up{ padding:1.1rem; margin-bottom:1rem; }
.cir-up-h{ display:flex; align-items:baseline; gap:.6rem; flex-wrap:wrap; margin-bottom:.9rem; }
.cir-up-h b{ font-size:.98rem; font-weight:900; }
.cir-up-h span{ font-size:.72rem; opacity:.6; }
.cir-list{ display:flex; flex-direction:column; gap:.6rem; }
.cir{
  display:flex; align-items:center; gap:.8rem;
  background:var(--card,#fff); border:1px solid var(--line,#E6EEF7);
  border-radius:16px; padding:.8rem 1rem;
}
.cir-ico{ font-size:1.5rem; flex:none; }
.cir-b{ flex:1; min-width:0; }
.cir-b b{ display:block; font-size:.9rem; font-weight:800; }
.cir-b p{ margin:.15rem 0 0; font-size:.76rem; opacity:.75; line-height:1.8; }
.cir-b i{ font-style:normal; font-size:.68rem; opacity:.55; }
.cir-a{ display:flex; align-items:center; gap:.4rem; flex:none; }
.cir-del{ background:none; border:0; cursor:pointer; font-size:1rem; opacity:.5; }
.cir-del:hover{ opacity:1; }
@media (max-width:560px){
  .cir{ flex-wrap:wrap; }
  .cir-a{ width:100%; justify-content:flex-end; }
}

/* 💬 نوارِ انتخابِ گفت‌وگو (گروهِ کلاس / والدین / خصوصی / هم‌پایه‌ها) */
.mgr-bar{ position:relative; border-bottom:1px solid var(--line,#E6EEF7); background:var(--card,#fff); }
.mgr-chips{ display:flex; gap:.4rem; padding:.55rem .6rem; overflow-x:auto; scrollbar-width:none; }
.mgr-chips::-webkit-scrollbar{ display:none; }
.mgr-chip{
  display:inline-flex; align-items:center; gap:.35rem; flex:none; cursor:pointer;
  background:var(--soft,#F2F7FC); border:1px solid transparent; border-radius:999px;
  padding:.4rem .8rem; font:inherit; font-size:.76rem; font-weight:700; color:inherit;
  white-space:nowrap;
}
.mgr-chip:hover{ border-color:#BEDCFA; }
.mgr-chip.on{ background:#E9F2FE; color:#1D6FBF; border-color:#BEDCFA; }
.mgr-chip span{ font-size:.9rem; }
.mgr-chip i{ font-style:normal; opacity:.6; }
.mgr-menu{
  display:none; position:absolute; inset-inline-end:.6rem; top:calc(100% - .2rem); z-index:40;
  min-width:220px; max-height:min(52vh,340px); overflow:auto;
  background:var(--card,#fff); border:1px solid var(--line,#E6EEF7); border-radius:14px;
  box-shadow:0 10px 30px rgba(31,45,61,.16); padding:.35rem;
}
.mgr-menu.open{ display:block; }
.mgr-menu-h{ font-size:.66rem; opacity:.6; padding:.5rem .6rem; line-height:1.8; }
.mgr-mi{
  display:flex; align-items:center; gap:.5rem; width:100%; cursor:pointer;
  background:none; border:0; border-radius:10px; padding:.5rem .6rem;
  font:inherit; font-size:.8rem; color:inherit; text-align:start;
}
.mgr-mi:hover{ background:var(--soft,#EEF5FD); }
.mgr-mi.on{ background:#E9F2FE; color:#1D6FBF; }
.mgr-mi i{
  font-style:normal; width:26px; height:26px; flex:none; border-radius:50%;
  display:grid; place-items:center; background:#E9F2FE; color:#1D6FBF; font-weight:800; font-size:.72rem;
}

/* 📚 انتخابِ کتابِ درسی داخلِ کلاسِ آنلاین */
.bk-ov{
  position:fixed; inset:0; z-index:9999; display:grid; place-items:center;
  background:rgba(12,20,30,.55); backdrop-filter:blur(3px); padding:1rem;
}
.bk-box{
  width:min(520px,100%); max-height:82vh; display:flex; flex-direction:column;
  background:var(--card,#fff); color:var(--ink,#1F2D3D);
  border-radius:20px; box-shadow:0 20px 60px rgba(0,0,0,.35); overflow:hidden;
}
.bk-head{
  display:flex; align-items:center; justify-content:space-between; gap:.6rem;
  padding:1rem 1.1rem; border-bottom:1px solid var(--line,#E6EEF7);
}
.bk-head b{ font-size:1rem; font-weight:900; }
.bk-x{ background:none; border:0; cursor:pointer; font-size:1.05rem; opacity:.6; }
.bk-x:hover{ opacity:1; }
.bk-body{ padding:.8rem 1rem 1.1rem; overflow:auto; }
.bk-g{ font-size:.72rem; font-weight:800; opacity:.55; margin:.6rem .2rem .45rem; }
.bk-list{ display:flex; flex-direction:column; gap:.45rem; }
.bk-c{
  display:flex; align-items:center; gap:.7rem; width:100%; cursor:pointer; text-align:start;
  background:var(--soft,#F5F9FD); border:1px solid transparent; border-radius:14px;
  padding:.7rem .85rem; font:inherit; color:inherit;
}
.bk-c:hover{ border-color:#BEDCFA; background:#EEF5FD; }
.bk-c i{ font-style:normal; font-size:1.3rem; flex:none; }
.bk-c span{ display:flex; flex-direction:column; min-width:0; }
.bk-c b{ font-size:.88rem; font-weight:800; }
.bk-c em{ font-style:normal; font-size:.68rem; opacity:.6; }
.bk-empty{ padding:1.6rem 1rem; text-align:center; font-size:.86rem; line-height:2.2; }
.bk-empty span{ font-size:.74rem; opacity:.65; }

/* 🔄 نوارِ «نسخه‌ی تازه آمده» */
.fresh-bar{
  position:fixed; z-index:9800; inset-inline:0; bottom:0;
  margin:0 auto 12px; width:min(460px,calc(100% - 24px));
  display:flex; align-items:center; gap:.7rem;
  background:#1D3A5C; color:#fff; border-radius:16px;
  padding:.75rem .9rem; box-shadow:0 12px 34px rgba(12,24,40,.3);
  transform:translateY(140%); opacity:0; transition:transform .35s cubic-bezier(.2,.8,.3,1), opacity .35s;
}
.fresh-bar.on{ transform:translateY(0); opacity:1; }
.fresh-ic{ font-size:1.2rem; flex:none; }
.fresh-t{ flex:1; min-width:0; line-height:1.6; }
.fresh-t b{ display:block; font-size:.82rem; font-weight:800; }
.fresh-t span{ font-size:.68rem; opacity:.8; }
.fresh-go{
  flex:none; cursor:pointer; border:0; border-radius:11px; font:inherit;
  font-size:.76rem; font-weight:800; padding:.5rem .8rem;
  background:#43D9AD; color:#08313F;
}
.fresh-go:hover{ filter:brightness(1.08); }
.fresh-go:disabled{ opacity:.7; cursor:default; }
.fresh-x{
  flex:none; cursor:pointer; border:0; background:none; color:#fff;
  opacity:.6; font-size:.9rem; padding:.3rem;
}
.fresh-x:hover{ opacity:1; }
/* بالاتر از نوارِ پایینِ گوشی */
@media (max-width:760px){ body.sh2 .fresh-bar, body.has-fbar .fresh-bar{ bottom:64px; } }
@media (prefers-reduced-motion:reduce){ .fresh-bar{ transition:none; } }

/* دکمه‌ی راهِ دوم در صفحه‌ی ورود (ورود با رمز / برگشت به پیامک) */
.lg-alt{
  display:block; width:100%; margin-top:.6rem; cursor:pointer;
  background:none; border:1px dashed var(--line,#D8E3EF); border-radius:12px;
  padding:.6rem; font:inherit; font-size:.78rem; font-weight:700; color:inherit; opacity:.85;
}
.lg-alt:hover{ opacity:1; border-style:solid; }
