/* MathsClick — الثيم الموحّد داخل تطبيق الأستاذ (29 أكتوبر، الإصدار 2: فاتح زجاجي مثل accueil.html).
   الألوان والشعار والخط فقط؛ الوثائق (#notebook، .page، .exo-design، الطباعة) لا تُلمس. */
:root{
  --mc-green-900:#0B1630; --mc-green-800:#1D4ED8; --mc-green-700:#1D4ED8; --mc-green-600:#1D4ED8;
  --mc-gold:#F2B230; --mc-gold-ink:#0B1630; --mc-paper:#E9EFFB; --mc-ink:#0B1630; --mc-muted:#4A5672; --mc-line:#dbe3f0;
  --mcT-glass:rgba(255,255,255,.62); --mcT-gb:rgba(255,255,255,.85);
}
/* متغيرات app.css للواجهة فقط ⇒ أزرق؛ وتعود خضراء داخل الوثائق */
#screen_app, #screen_dashboard, .modal, .modal-bg, [id$="_overlay"]{ --green:#1D4ED8; --green-dark:#1E40AF; }
#notebook, #notebook *, .page, .exo-design, [class*="nb-page"]{ --green:#2d7a4f; --green-dark:#1d5435; }

#screen_dashboard.mc-app, body{
  background:radial-gradient(900px 600px at 0% 0%,#bfdbfe 0,transparent 60%),radial-gradient(800px 560px at 100% 60%,#fde68a 0,transparent 58%),radial-gradient(700px 500px at 30% 100%,#ddd6fe 0,transparent 60%),#E9EFFB !important;
}
@media (hover:hover) and (min-width:901px){ #screen_dashboard.mc-app, body{ background-attachment:fixed !important; } }

/* الخط: عناصر الواجهة فقط */
.mc-side, .mc-side *, .mc-bnav, .mc-bn, .mc-btn, .mc-pc, .mc-group-h, .mc-page-h, .mc-sub, .mc-toast,
.dash-top, .dash-top *, .dash-welcome, .dash-welcome *, .svc-name, .svc-desc, .svc-badge, .now-card, .now-card *,
.topbar, .topbar *, .btn-mc, #screen_app > .wrap > .card > h2{
  font-family:'Readex Pro','Cairo',system-ui,sans-serif !important;
}

/* ── القائمة الجانبية: زجاج فاتح ── */
.mc-side{ background:var(--mcT-glass) !important; -webkit-backdrop-filter:blur(20px) saturate(160%); backdrop-filter:blur(20px) saturate(160%);
  color:#0B1630; border-inline-start:1px solid var(--mcT-gb); box-shadow:-18px 0 40px -34px rgba(11,22,48,.45); }
.mc-brand{ color:#0B1630; font-family:'Montserrat','Readex Pro',sans-serif !important; font-weight:800; letter-spacing:-.3px; }
.mc-brand span{ font-family:'Montserrat',sans-serif !important; }
.mc-brand b{ color:#1D4ED8; }
.mc-brand img{ background:none !important; border-radius:0 !important; height:30px; width:auto; transition:transform .5s cubic-bezier(.3,1.6,.5,1); }
.mc-brand:hover img{ transform:rotate(-8deg) scale(1.08); }
.mc-side-x{ color:#0B1630; }
.mc-nav{ scrollbar-color:rgba(11,22,48,.15) transparent; }
.mc-sep{ color:#8a97b3; font-weight:600; }
.mc-ni{ color:#2A3756; font-weight:500; }
.mc-ni:hover{ background:rgba(29,78,216,.07); color:#1D4ED8; }
.mc-ni.on{ background:rgba(29,78,216,.1); color:#1D4ED8; font-weight:600; box-shadow:inset -3px 0 0 #1D4ED8; }
.mc-me{ border-top:1px solid rgba(11,22,48,.08); background:rgba(255,255,255,.45); }
.mc-me-t span{ color:#4A5672; }
.mc-me-t span.on{ color:#b7791f; }
.mc-sw{ background:rgba(11,22,48,.15); }
.mc-backdrop{ background:rgba(11,22,48,.28) !important; }
.mc-bnav{ background:rgba(255,255,255,.82); -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); }
.mc-bn.on{ color:#1D4ED8; background:rgba(29,78,216,.1); }
.mc-toast{ background:#0B1630; }

/* ── بطاقات وأزرار ── */
.mc-btn.ghost{ background:rgba(255,255,255,.75); color:#1D4ED8; border-color:rgba(29,78,216,.3); }
.mc-pc{ background:var(--mcT-glass); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); border-color:var(--mcT-gb); box-shadow:0 18px 40px -26px rgba(11,22,48,.4); }
.mc-pc.ok{ border-color:rgba(29,78,216,.25); background:linear-gradient(135deg,rgba(238,243,255,.9),rgba(255,255,255,.7)); }
.mc-sub{ background:rgba(255,255,255,.72); }
.mc-sub.ok .mc-sub-state{ background:#eef3ff; color:#1D4ED8; }
.btn-mc{ background:#1D4ED8 !important; box-shadow:0 10px 24px -12px rgba(29,78,216,.85) !important; border-radius:12px !important; }
.btn-mc:hover{ background:#1E40AF !important; }
.btn-mc.ghost{ background:rgba(255,255,255,.75) !important; color:#1D4ED8 !important; border:1.5px solid rgba(29,78,216,.35) !important; box-shadow:none !important; }
.btn{ border-radius:12px; }
.btn.ghost:hover{ background:#eef3ff; }

/* ── الشريط العلوي للوحة ── */
.dash-top{ background:var(--mcT-glass) !important; -webkit-backdrop-filter:blur(18px) saturate(160%); backdrop-filter:blur(18px) saturate(160%);
  border-bottom:1px solid var(--mcT-gb); box-shadow:0 12px 30px -24px rgba(11,22,48,.45) !important; }
.dash-top .mc-logo{ color:#0B1630 !important; font-family:'Montserrat',sans-serif !important; font-weight:800 !important; letter-spacing:-.5px; direction:ltr; unicode-bidi:isolate; display:inline-flex; align-items:center; }
.dash-top .mc-logo span{ color:#1D4ED8 !important; }
.dash-top .mc-logo img{ height:1em; width:auto; margin-inline-end:6px; }
.dash-user{ color:#0B1630; }
#mc_profile_btn span{ color:#0B1630 !important; }
#mc_profile_btn:hover{ background:rgba(29,78,216,.08) !important; }
#mc_avatar_wrap{ background:linear-gradient(135deg,#1D4ED8,#60A5FA) !important; }
.mc-burger{ color:#0B1630 !important; background:rgba(255,255,255,.75) !important; border:1px solid rgba(11,22,48,.12) !important; }
.dash-welcome h2{ color:#0B1630 !important; font-weight:700 !important; }
.dash-welcome p{ color:#4A5672 !important; }
.svc-name{ color:#0B1630 !important; font-weight:700 !important; }
.svc-desc{ color:#4A5672; }

/* ── بطاقة الحصة الحالية: فاتحة ── */
.now-card, .now-card.idle{ background:linear-gradient(115deg,rgba(219,234,254,.92) 0%,rgba(255,255,255,.8) 55%,rgba(254,243,199,.9) 100%) !important;
  color:#0B1630 !important; border:1px solid var(--mcT-gb); box-shadow:0 1px 0 #fff inset,0 22px 44px -28px rgba(29,78,216,.5) !important;
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); }
.now-card .nc-label, .now-card .nc-sub{ color:#4A5672 !important; opacity:1 !important; }
.now-card .nc-title{ color:#1D4ED8 !important; font-weight:700 !important; }
.now-card .nc-title *{ color:inherit !important; }
.now-card .nc-btn{ background:#1D4ED8 !important; color:#fff !important; font-weight:600 !important; box-shadow:0 10px 24px -12px rgba(29,78,216,.85) !important; }
.now-card .nc-btn.ghost{ background:rgba(255,255,255,.8) !important; color:#1D4ED8 !important; border:1.5px solid rgba(29,78,216,.3) !important; box-shadow:none !important; }
.now-card .nc-alert{ background:rgba(255,255,255,.7) !important; border:1.5px dashed rgba(29,78,216,.3) !important; color:#14215A !important; }

/* ── دفتر النصوص: الرأس والبطاقات ── */
.topbar{ background:var(--mcT-glass) !important; color:#0B1630 !important; -webkit-backdrop-filter:blur(18px) saturate(160%); backdrop-filter:blur(18px) saturate(160%);
  border:1px solid var(--mcT-gb); box-shadow:0 1px 0 #fff inset,0 18px 40px -26px rgba(11,22,48,.4) !important; }
.topbar::before, .topbar::after{ opacity:.35; }
.topbar h1{ color:#0B1630 !important; font-weight:700 !important; }
.topbar p{ color:#4A5672 !important; opacity:1 !important; }
.topbar .logo{ background:rgba(29,78,216,.1) !important; }
.topbar .btn{ background:rgba(255,255,255,.8) !important; color:#1D4ED8 !important; border:1.5px solid rgba(29,78,216,.25) !important; box-shadow:none !important; }
.topbar .btn:hover{ background:#fff !important; }
#screen_app .card{ background:var(--mcT-glass); -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); border:1px solid var(--mcT-gb); }
.step.active{ background:#eef3ff; }
.chip{ background:#eef3ff; }
.sched-table td.filled, .sched-table td.merged-cell{ background:#eef3ff; }
.mc-topbar-actions{ background:rgba(238,243,255,.7); border-bottom-color:#dbe3f0; }
.dm-btn{ border-color:#dbe3f0 !important; color:#4A5672 !important; }
.dm-btn:hover, .rb-tab-btn:hover{ background:#eef3ff !important; border-color:#1D4ED8 !important; color:#1D4ED8 !important; }
.dm-btn.active, .rb-tab-btn.active{ background:#1D4ED8 !important; border-color:#1D4ED8 !important; color:#fff !important; box-shadow:0 6px 14px -8px rgba(29,78,216,.8) !important; }
.dafter-mode-tab:hover, .dafter-mode-tab.active{ border-color:#1D4ED8 !important; }
.dafter-mode-tab.active{ background:linear-gradient(180deg,#eef3ff,#fff) !important; box-shadow:0 0 0 3px rgba(29,78,216,.14) !important; }
.dafter-mode-tab .dm-title, .price-name{ color:#14215A !important; }
.auth-tab.active{ color:#1D4ED8 !important; }
.svc-badge.ready{ background:#eef3ff !important; color:#1D4ED8 !important; border-color:rgba(29,78,216,.15) !important; }
#mc_ver_badge{ background:rgba(20,33,90,.6) !important; }

/* ── ألوان خضراء مكتوبة inline في core.js: داخل الواجهة فقط، لا في الوثائق ── */
:is(#screen_app,#screen_dashboard,.modal,[id$="_overlay"]) :is([style*="background:#1d5435"],[style*="background: #1d5435"],[style*="background:#2d7a4f"],[style*="background: #2d7a4f"],[style*="#1d5435,#2d7a4f"],[style*="#2d7a4f,#1d5435"],[style*="#1d5435, #2d7a4f"],[style*="#2d7a4f, #1d5435"],[style*="background:#0B7B50"],[style*="background:#1a7a42"]):not(:is(#notebook,.page,.exo-design,[class*="page"],[class*="sheet"]) *){
  background:#1D4ED8 !important; }
:is(#screen_app,#screen_dashboard,.modal,[id$="_overlay"]) :is([style*="color:#1d5435"],[style*="color: #1d5435"],[style*="color:#2d7a4f"],[style*="color: #2d7a4f"],[style*="color:#143d22"]):not([style*="background:#1d5435"]):not([style*="background:#2d7a4f"]):not(:is(#notebook,.page,.exo-design,[class*="page"],[class*="sheet"]) *){
  color:#1D4ED8 !important; }
:is(#screen_app,#screen_dashboard,.modal,[id$="_overlay"]) :is([style*="border:2px solid #1d5435"],[style*="border:1.5px solid #1d5435"],[style*="border:2px solid #2d7a4f"],[style*="border:1.5px solid #2d7a4f"],[style*="border-color:#1d5435"],[style*="border-color:#2d7a4f"]):not(:is(#notebook,.page,.exo-design,[class*="page"],[class*="sheet"]) *){
  border-color:#1D4ED8 !important; }
:is(#screen_app,#screen_dashboard,.modal,[id$="_overlay"]) :is([style*="#cfe0d3"],[style*="#d0dcd5"],[style*="#e0e8e4"]):not(:is(#notebook,.page,.exo-design,[class*="page"],[class*="sheet"]) *){
  border-color:#dbe3f0 !important; }
/* قواعد app.css الخاصة بـ #now_card_wrap (كانت تفرض الأبيض والذهبي) */
#now_card_wrap .nc-card, #now_card_wrap .now-card{ background:linear-gradient(115deg,rgba(219,234,254,.92) 0%,rgba(255,255,255,.8) 55%,rgba(254,243,199,.9) 100%) !important;
  border:1px solid rgba(255,255,255,.85) !important; box-shadow:0 1px 0 #fff inset,0 22px 44px -28px rgba(29,78,216,.5) !important; }
#now_card_wrap .nc-card *, #now_card_wrap .now-card *{ color:#0B1630 !important; }
#now_card_wrap .nc-title, #now_card_wrap .nc-title *{ color:#1D4ED8 !important; }
#now_card_wrap .nc-sub, #now_card_wrap .nc-label, #now_card_wrap .nc-sub *, #now_card_wrap .nc-label *{ color:#4A5672 !important; }
#now_card_wrap .nc-btn, #now_card_wrap .nc-btn *{ color:#fff !important; }
#now_card_wrap .nc-btn.ghost, #now_card_wrap .nc-btn.ghost *{ color:#1D4ED8 !important; }
.topbar::before, .topbar::after{ opacity:.18 !important; }
/* نوافذ الخدمات (#xxx_overlay): خلفية الموقع + شريط زجاجي */
.btn-mc:not(.ghost){ color:#fff !important; }
[id$="_overlay"]{ background:radial-gradient(900px 600px at 0% 0%,#bfdbfe 0,transparent 60%),radial-gradient(800px 560px at 100% 70%,#fde68a 0,transparent 58%),#E9EFFB !important; }
[id$="_overlay"] > div[style*="position:sticky"]:first-child{ background:rgba(255,255,255,.66) !important; -webkit-backdrop-filter:blur(18px) saturate(160%); backdrop-filter:blur(18px) saturate(160%);
  border-bottom:1px solid rgba(255,255,255,.85); box-shadow:0 12px 30px -24px rgba(11,22,48,.45) !important; }
html body [id$="_overlay"] > div[style*="position:sticky"]:first-child > strong{ color:#0B1630 !important; font-family:'Readex Pro','Cairo',sans-serif !important; font-weight:700 !important; }
[id$="_overlay"] > div[style*="position:sticky"]:first-child .btn-mc{ font-family:'Readex Pro','Cairo',sans-serif !important; font-weight:600 !important; }
/* استجابة فورية للنقر */
.btn-mc:active,.btn:active,.mc-ni:active,.mc-bn:active,.svc-card:active,.nc-btn:active,.dm-btn:active{transform:scale(.97) !important;transition-duration:.08s !important}
