/*!
 *  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   © 2026  رحاب أحمد أبوزحرة الطويرقي
 *   سمايا · جميع الحقوق محفوظة
 *  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 */
/* ════════════════════════════════════════════════════════════════════
   منصة انضباط · التصميم المعتمد «ليلك ونعناع» الزجاجي (فاتح وليلي)
   ════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #f6effc; --bg-b1: #dcc6f3; --bg-b2: #c3f1e3; --bg-b3: #f9d8e8;
  --glass: rgba(255,255,255,.62); --glass-2: rgba(255,255,255,.82); --glass-line: rgba(255,255,255,.8);
  --side: rgba(124,82,170,.66); --side-ink: #fbf6ff; --side-on: rgba(255,255,255,.26);
  --text: #33204a; --text-2: #5d4a74; --text-3: #8b7aa0;
  --line: rgba(162,116,214,.22); --line-strong: rgba(162,116,214,.4);
  --mauve: #a274d6; --mauve-d: #7a4fb3; --mauve-l: #efe4fb;
  --mint: #2fbf9f; --mint-d: #138069; --mint-l: #dcf6ee;
  --pink: #e98bb5; --pink-d: #a8366b; --pink-l: #fce6f0;
  --amber: #e0a03c; --amber-d: #8f5a0b; --amber-l: #fdf0d9;
  --sky: #5aa8e6; --sky-l: #e1f0fc;
  --ink: var(--mauve-d); --ink-2: var(--mauve); --gold: var(--amber); --info: var(--sky); --ok: var(--mint); --bad: var(--pink-d); --warn: var(--amber);
  --paper: #fff;
  --shadow: 0 10px 30px rgba(110,70,160,.12);
  --r: 16px;
  --font-head: "Amiri", Georgia, "Times New Roman", serif;
  --font-body: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --font-mono: ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #1a1326; --bg-b1: #4a2f74; --bg-b2: #12483f; --bg-b3: #5a2443;
  --glass: rgba(46,32,68,.6); --glass-2: rgba(56,40,82,.86); --glass-line: rgba(196,160,240,.18);
  --side: rgba(40,26,62,.72); --side-on: rgba(196,160,240,.2);
  --text: #f2eafc; --text-2: #cdbbe3; --text-3: #9d8bb5;
  --line: rgba(196,160,240,.18); --line-strong: rgba(196,160,240,.34);
  --mauve: #c39af0; --mauve-d: #dbc0f8; --mauve-l: rgba(195,154,240,.16);
  --mint: #5fe0c0; --mint-d: #7fead0; --mint-l: rgba(95,224,192,.14);
  --pink: #f5a9cb; --pink-d: #f7b6d3; --pink-l: rgba(245,169,203,.14);
  --amber: #f0b257; --amber-d: #f5c67f; --amber-l: rgba(240,178,87,.14);
  --sky: #7cc0f2; --sky-l: rgba(124,192,242,.14); --paper: #2a1d3d;
  --shadow: 0 10px 30px rgba(0,0,0,.35); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #1a1326; --bg-b1: #4a2f74; --bg-b2: #12483f; --bg-b3: #5a2443;
  --glass: rgba(46,32,68,.6); --glass-2: rgba(56,40,82,.86); --glass-line: rgba(196,160,240,.18);
  --side: rgba(40,26,62,.72); --side-on: rgba(196,160,240,.2);
  --text: #f2eafc; --text-2: #cdbbe3; --text-3: #9d8bb5;
  --line: rgba(196,160,240,.18); --line-strong: rgba(196,160,240,.34);
  --mauve: #c39af0; --mauve-d: #dbc0f8; --mauve-l: rgba(195,154,240,.16);
  --mint: #5fe0c0; --mint-d: #7fead0; --mint-l: rgba(95,224,192,.14);
  --pink: #f5a9cb; --pink-d: #f7b6d3; --pink-l: rgba(245,169,203,.14);
  --amber: #f0b257; --amber-d: #f5c67f; --amber-l: rgba(240,178,87,.14);
  --sky: #7cc0f2; --sky-l: rgba(124,192,242,.14); --paper: #2a1d3d;
  --shadow: 0 10px 30px rgba(0,0,0,.35); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; direction: rtl; font: 400 15px/1.75 var(--font-body); color: var(--text); background: var(--bg);
  background-image: radial-gradient(620px 440px at 92% 4%, var(--bg-b1), transparent 70%), radial-gradient(520px 420px at 4% 92%, var(--bg-b2), transparent 70%), radial-gradient(420px 320px at 50% 55%, var(--bg-b3), transparent 72%);
  background-attachment: fixed; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; text-wrap: balance; }
a { color: var(--mauve-d); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--mauve); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* زجاج */
.glass { background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border: 1px solid var(--glass-line); box-shadow: var(--shadow); border-radius: var(--r); }

/* ── الهيكل ── */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); color: var(--side-ink); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  padding: max(18px, env(safe-area-inset-top, 0px)) 14px 18px max(14px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 4px; border-left: 1px solid rgba(255,255,255,.25); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 16px; }
.brand .logo { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--mauve), var(--pink)); color: #fff; font: 800 22px var(--font-head); box-shadow: 0 6px 18px rgba(162,116,214,.4); flex: none; }
.brand b { font: 800 18px/1.3 var(--font-head); display: block; }
.brand small { font-size: 11.5px; opacity: .85; display: block; }
.nav-group { font-size: 11px; opacity: .7; padding: 12px 10px 2px; letter-spacing: .3px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; color: inherit; text-decoration: none; font-size: 14px; opacity: .9; }
.nav a:hover { background: rgba(255,255,255,.12); opacity: 1; }
.nav a[aria-current="page"] { background: var(--side-on); opacity: 1; font-weight: 700; }
.nav .nav-ico { width: 19px; height: 19px; flex: none; }
.nav .count { margin-inline-start: auto; background: var(--pink); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.side-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.side-foot .who { opacity: .9; padding: 0 8px; }
.side-btn { display: flex; align-items: center; gap: 8px; border: 0; background: rgba(255,255,255,.12); color: inherit; border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 13px; }
.side-btn svg { width: 16px; height: 16px; }

.main { min-width: 0; padding: max(22px, env(safe-area-inset-top, 0px)) max(26px, env(safe-area-inset-left, 0px)) 40px 26px; display: flex; flex-direction: column; gap: 18px; }
.topbar { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.page-head p { margin: 2px 0 0; color: var(--text-2); font-size: 14px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.hello { border-radius: 22px; padding: 24px 26px; color: #fff; background: linear-gradient(135deg, rgba(162,116,214,.94), rgba(205,150,226,.86)); box-shadow: 0 14px 34px rgba(130,80,190,.28); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.hello h1 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; }
.hello p { margin: 4px 0 0; opacity: .92; font-size: 14px; }
.hello .hello-date { text-align: left; font-size: 13px; opacity: .95; }
.hello .hello-date b { display: block; font: 700 18px var(--font-head); }

/* ── بطاقات ومؤشرات ── */
.card { background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border: 1px solid var(--glass-line); box-shadow: var(--shadow); border-radius: var(--r); padding: 18px 20px; min-width: 0; }
.card > h2, .card > h3 { font-size: 17px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card > h2 .spacer, .card > h3 .spacer { flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { position: relative; overflow: hidden; }
.kpi i { font-style: normal; font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kpi i::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--k, var(--mauve)); }
.kpi b { display: block; font: 800 30px/1.25 var(--font-head); font-variant-numeric: tabular-nums; color: var(--text); }
.kpi small { color: var(--text-3); font-size: 12px; }
.kpi.click { cursor: pointer; } .kpi.click:hover { transform: translateY(-2px); transition: transform .15s; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

/* ── أزرار وحقول ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--glass-2); color: var(--text); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--mauve); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: linear-gradient(135deg, var(--mauve), #b98ae0); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(162,116,214,.35); }
.btn.mint { background: var(--mint); border-color: transparent; color: #fff; }
.btn.pink { background: var(--pink); border-color: transparent; color: #fff; }
.btn.amber { background: var(--amber); border-color: transparent; color: #3a2a0a; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.btn.lg { padding: 12px 22px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line-strong); background: var(--glass-2); border-radius: 12px; padding: 9px 12px; min-height: 42px; }
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { outline: none; border-color: var(--mauve); box-shadow: 0 0 0 3px var(--mauve-l); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.hj-hint { font-size: 12px; color: var(--mauve-d); }
.seg { display: inline-flex; background: var(--glass-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 13.5px; color: var(--text-2); }
.seg button[aria-pressed="true"] { background: var(--mauve); color: #fff; font-weight: 700; }

/* ── شارات ── */
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.b-mint { background: var(--mint-l); color: var(--mint-d); }
.b-pink { background: var(--pink-l); color: var(--pink-d); }
.b-amber { background: var(--amber-l); color: var(--amber-d); }
.b-mauve { background: var(--mauve-l); color: var(--mauve-d); }
.b-sky { background: var(--sky-l); color: var(--text); }

/* ── جداول ── */
.table-wrap { overflow-x: auto; border-radius: 12px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: right; font: 700 12.5px var(--font-head); color: var(--mauve-d); background: var(--mauve-l); padding: 9px 10px; white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: rgba(162,116,214,.05); }
.tbl td.n { font-variant-numeric: tabular-nums; text-align: center; }
.empty { text-align: center; color: var(--text-3); padding: 26px 10px; }

/* ── شبكة الفصول ── */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.class-tile { border-radius: 14px; padding: 10px; text-align: center; border: 1px solid var(--glass-line); background: var(--glass-2); cursor: pointer; }
.class-tile b { display: block; font: 800 18px var(--font-head); }
.class-tile small { font-size: 12px; }
.class-tile.done { background: var(--mint-l); color: var(--mint-d); }
.class-tile.todo { background: var(--pink-l); color: var(--pink-d); }
.class-tile[aria-pressed="true"] { outline: 3px solid var(--mauve); }

/* ── تسجيل الحضور: بطاقات الطالبات ── */
.roll { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.stu { border-radius: 14px; border: 1.5px solid var(--glass-line); background: var(--glass-2); padding: 10px 12px; text-align: right; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 66px; user-select: none; transition: transform .1s; }
.stu:active { transform: scale(.98); }
.stu b { font-size: 14.5px; line-height: 1.4; }
.stu small { font-size: 12px; color: var(--text-3); }
.stu[data-s="absent"] { background: var(--pink-l); border-color: var(--pink); }
.stu[data-s="absent"] small { color: var(--pink-d); font-weight: 700; }
.stu[data-s="excused"] { background: var(--amber-l); border-color: var(--amber); }
.stu[data-s="excused"] small { color: var(--amber-d); font-weight: 700; }
.roll-bar { position: sticky; bottom: 10px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; z-index: 5; }

/* ── شريط تنبيه ── */
.note { border-radius: 12px; padding: 10px 14px; background: var(--amber-l); color: var(--text); font-size: 13.5px; }
.note.mint { background: var(--mint-l); } .note.pink { background: var(--pink-l); } .note.mauve { background: var(--mauve-l); }
.demo-ribbon { background: var(--amber); color: #3a2a0a; text-align: center; font-size: 12.5px; font-weight: 700; padding: 4px; border-radius: 10px; }

/* ── نوافذ ── */
dialog.modal { border: 0; padding: 0; border-radius: 20px; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 40px); background: var(--glass-2); color: var(--text); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 30px 70px rgba(60,30,100,.35); }
dialog.modal::backdrop { background: rgba(40,20,70,.35); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal-in { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: calc(100vh - 40px); }
.modal-in h2 { font-size: 19px; }
.modal-act { display: flex; gap: 8px; justify-content: flex-start; flex-wrap: wrap; padding-top: 6px; }
.toast-zone { position: fixed; bottom: max(16px, env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 1000; width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--mauve-d); color: #fff; border-radius: 14px; padding: 10px 16px; box-shadow: var(--shadow); font-size: 14px; }
.toast.bad { background: var(--pink-d); }

/* ── رسائل ── */
.msg-card { border-radius: 14px; border: 1px solid var(--glass-line); background: var(--glass-2); padding: 12px 14px; white-space: pre-line; font-size: 14px; line-height: 1.9; }
.msg-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }

/* ── تحليل ── */
figure.chart figcaption { font-family: var(--font-head); }
.heat td { text-align: center; font-size: 12px; border-radius: 6px; }
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; text-align: center; }
.compare .big { font: 800 40px var(--font-head); }
.compare .arrow { font-size: 28px; color: var(--mauve); }
.reading { background: var(--mint-l); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; line-height: 1.9; }

/* ── شهادة (معاينة) ── */
.cert-prev { aspect-ratio: 297/210; max-width: 100%; border-radius: 12px; background: #fff; color: #33204a; border: 8px double var(--mauve); display: grid; place-content: center; text-align: center; gap: 6px; padding: 20px; }
.cert-prev h3 { font-size: 26px; color: var(--mauve-d); }

/* ── تذييل الحقوق ── */
.rights { text-align: center; font-size: 12px; color: var(--text-3); padding: 18px 0 6px; }

/* ── الجوال والآيباد ── */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 0 0 auto; width: min(290px, 86vw); height: 100%; z-index: 50; transform: translateX(105%); transition: transform .22s ease; }
  body.nav-open .side { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(30,15,50,.35); z-index: 40; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; padding: 10px 14px; margin: -8px -8px 0; }
  .topbar b { font: 800 17px var(--font-head); }
  .main { padding: 14px max(16px, env(safe-area-inset-left, 0px)) 30px max(16px, env(safe-area-inset-right, 0px)); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .roll { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .compare { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ── صفحات الواجهة العامة (دخول، معكم، عذر، ملف أداء) ── */
.public { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: max(24px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); gap: 18px; }
.public .wrap { width: min(980px, 100%); display: flex; flex-direction: column; gap: 16px; }
.public .narrow { width: min(520px, 100%); }
.public-head { display: flex; align-items: center; gap: 12px; }
.public-head .logo { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--mauve), var(--pink)); color: #fff; font: 800 26px var(--font-head); }
.public-head h1 { font-size: 24px; font-weight: 800; }
.public-head small { color: var(--text-2); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: 7px 14px; border-radius: 999px; background: var(--glass-2); color: var(--text-2); border: 1px solid var(--glass-line); font-size: 14px; }
.tabs a[aria-current="page"] { background: var(--mauve); color: #fff; font-weight: 700; }
.hero-land { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.hero-land h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 800; }
.hero-land .sub { font: 700 18px var(--font-head); color: var(--mauve-d); }
.hero-land p { max-width: 60ch; color: var(--text-2); }

/* ── الطباعة: لا شيء من الواجهة يطبع إلا الورقة المختومة ── */
@media print { body:not(.printing):not(.pr-self) > * { display: none !important; } }

/* ملف الأداء على الشاشة (رابط المشاركة) */
.pf-screen { display: flex; flex-direction: column; gap: 18px; }
.pf-screen .pr-page { border-bottom: 2px dashed #e4d8f2; padding-bottom: 18px; }
.pf-screen .pr-head { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 8px; font-size: 12px; align-items: center; }
.pf-screen .pr-school { text-align: center; } .pf-screen .pr-school strong { display: block; font: 700 16px var(--font-head); color: #4a2a78; }
.pf-screen .pr-date { text-align: left; }
.pf-screen .pr-rule { height: 2px; background: linear-gradient(90deg, transparent, #a274d6, transparent); margin: 6px 0 10px; }
.pf-screen .pr-title { font: 800 20px var(--font-head); text-align: center; color: #4a2a78; }
.pf-screen .pr-sub { text-align: center; color: #5d4a74; font-size: 13px; }
.pf-screen h3 { font: 700 15px var(--font-head); color: #7a4fb3; margin: 12px 0 6px; }
.pf-screen .pr-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.pf-screen .pr-table th { background: #7a4fb3; color: #fff; padding: 6px; }
.pf-screen .pr-table td { border: 1px solid #e4d8f2; padding: 5px 6px; }
.pf-screen .pr-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; text-align: center; margin-top: 16px; }
.pf-screen .pr-sign-line { border-top: 1px dashed #aaa; margin-top: 20px; font-size: 12px; color: #777; }
@media (max-width: 600px) { .pf-screen .pr-head { grid-template-columns: 1fr; text-align: center; } .pf-screen .pr-date { text-align: center; } }

/* ── الأسلوب المعتمد «لمعة متحركة»: شريط ضوء يعبر البطاقات والأزرار + عنوان الترحيب بتدرّج لامع ── */
.kpi, .hello, .btn.primary, .btn.mint, .btn.pink, .class-tile, .public-head .logo, .brand .logo { position: relative; overflow: hidden; isolation: isolate; }
@media (prefers-reduced-motion: no-preference) {
  .kpi::before, .hello::before, .btn.primary::before, .btn.mint::before, .btn.pink::before, .brand .logo::before, .public-head .logo::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.6) 50%, transparent 70%);
    transform: translateX(120%); animation: sheen 3.4s ease-in-out infinite;
  }
  .kpis > .kpi:nth-child(2)::before { animation-delay: .4s; } .kpis > .kpi:nth-child(3)::before { animation-delay: .8s; }
  .kpis > .kpi:nth-child(4)::before { animation-delay: 1.2s; } .kpis > .kpi:nth-child(5)::before { animation-delay: 1.6s; }
  .kpis > .kpi:nth-child(n+6)::before { animation-delay: 2s; }
  .btn.primary::before, .btn.mint::before, .btn.pink::before { animation-duration: 4.2s; animation-delay: .6s; }
  @keyframes sheen { 0% { transform: translateX(120%); } 60%, 100% { transform: translateX(-120%); } }
  .hello h1 { background: linear-gradient(90deg, #fff, #fde9ff, #d7fff3, #fff); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine-text 5s linear infinite; }
  @keyframes shine-text { to { background-position: 300% 0; } }
  .kpi, .class-tile, .card.glass, .btn { transition: transform .22s ease, box-shadow .22s ease; }
  .kpi:hover, .class-tile:hover { transform: scale(1.035); box-shadow: 0 14px 34px rgba(130,80,190,.22); }
  .btn.primary:hover, .btn.mint:hover, .btn.pink:hover { transform: translateY(-2px); }
}
.kpi > *, .hello > *, .btn > * { position: relative; z-index: 2; }

/* ── التخطيط المعتمد «أيقونات + عمود مهام»: قائمة أيقونات نحيلة تتّسع عند المرور ── */
@media (min-width: 961px) {
  .shell { display: block; padding-right: 78px; }
  .side { position: fixed; top: 0; right: 0; bottom: 0; height: 100vh; width: 78px; padding-inline: 12px; overflow-x: hidden; z-index: 40; transition: width .22s ease, box-shadow .22s ease; }
  .side:hover, .side:focus-within { width: 252px; background: linear-gradient(180deg, #8a5cc4, #7a4fb3); box-shadow: -18px 0 40px rgba(60,30,100,.3); }
  .side .brand > div:last-child, .side .nav a span, .side .nav-group, .side .who, .side .side-btn span, .side .nav .count { opacity: 0; white-space: nowrap; transition: opacity .15s; }
  .side:hover .brand > div:last-child, .side:hover .nav a span, .side:hover .nav-group, .side:hover .who, .side:hover .side-btn span, .side:hover .nav .count,
  .side:focus-within .brand > div:last-child, .side:focus-within .nav a span, .side:focus-within .nav-group, .side:focus-within .who, .side:focus-within .side-btn span, .side:focus-within .nav .count { opacity: 1; }
  .side .nav-group { height: 0; padding: 4px 0 0; overflow: hidden; }
  .side:hover .nav-group, .side:focus-within .nav-group { height: auto; padding: 12px 10px 2px; }
  .side .nav a { padding: 10px 17px; }
  .side .brand { padding-inline: 4px; }
  .side .side-btn { white-space: nowrap; overflow: hidden; }
}
/* الرئيسية: المحتوى + عمود «مهام اليوم» */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.tasks-col { position: sticky; top: calc(16px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 10px; }
.tasks-col h2 { font-size: 20px; }
.task { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--mauve-l); color: var(--text); text-decoration: none; font-size: 14px; border: 1px solid transparent; cursor: pointer; transition: transform .18s, border-color .18s; }
.task:hover { transform: translateX(-3px); border-color: var(--mauve); }
.task b { font: 700 22px var(--font-head); min-width: 34px; text-align: center; }
.task.pink { background: var(--pink-l); } .task.mint { background: var(--mint-l); } .task.amber { background: var(--amber-l); }
.task.done { opacity: .6; }
@media (max-width: 1100px) { .home-grid { grid-template-columns: 1fr; } .tasks-col { position: static; } }

/* ── الخلفية المتحركة للصفحات العامة (livebg.js) ── */
.live-bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
body:has(.live-bg) { background-image: none; background: linear-gradient(160deg, #fbf7ff 0%, #f4effd 45%, #eefaf6 100%); }
:root[data-theme="dark"] body:has(.live-bg) { background: var(--bg); }
.public .hero-land { background: rgba(255,255,255,.55); }
:root[data-theme="dark"] .public .hero-land { background: var(--glass); }

/* ── الصفحة الأولى والدخول: الاسم في وسط الشاشة · صفحة الدخول مقسومة · عبارة تتبدّل · الدعم الفني ── */
.public.land-center { justify-content: center; min-height: 100vh; min-height: 100dvh; }
.public.land-center .hero-land { width: min(760px, 100%); padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 48px); gap: 12px; }
.logo.big { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, var(--mauve), var(--pink)); color: #fff; font: 800 38px var(--font-head); box-shadow: 0 12px 30px rgba(162,116,214,.35); position: relative; overflow: hidden; isolation: isolate; }
.motto { min-height: 1.9em; margin: 4px 0 0; font: 700 clamp(17px, 2.2vw, 21px)/1.6 var(--font-head); color: var(--mint-d); opacity: 0; transform: translateY(6px); transition: opacity .45s ease, transform .45s ease; }
.motto.on { opacity: 1; transform: none; }
.support-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--mauve-d); text-decoration: none; background: rgba(255,255,255,.6); border: 1px solid var(--line); }
.support-link:hover { background: var(--mauve-l); }

.login-split { width: min(980px, 100%); display: grid; grid-template-columns: 1fr 1fr; padding: 0; overflow: hidden; }
.login-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: clamp(28px, 4vw, 52px) 24px;
  background: linear-gradient(160deg, rgba(162,116,214,.16), rgba(47,191,159,.12) 60%, rgba(233,139,181,.14)); border-inline-end: 1px solid var(--line); }
.login-brand h1 { font-size: clamp(34px, 4.6vw, 50px); font-weight: 800; }
.login-brand .sub { font: 700 18px var(--font-head); color: var(--mauve-d); }
.login-form { display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 4vw, 44px); justify-content: center; }
.login-form h2 { font-size: 26px; text-align: center; }
.demo-box { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
@media (max-width: 760px) {
  .login-split { grid-template-columns: 1fr; }
  .login-brand { border-inline-end: 0; border-bottom: 1px solid var(--line); padding: 26px 18px; }
  .login-brand .logo.big { width: 60px; height: 60px; font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { .motto { transition: none; } }
