/* تخطيط: الطالبة عمود واحد للموبايل أولاً؛ الباحثة شريط جانبي + محتوى.
   الهوية من صالة الباليه: باذنجاني المسرح، وردي الساتان، خشب البار. */
:root {
  --bg: #f8f3f5; --surface: #ffffff; --surface-2: #f1e9ed; --ink: #2a1830; --ink-2: #6d5b6f; --line: #e6d9df;
  --primary: #862f6b; --primary-soft: #f7e4f0; --accent: #c23d6b; --accent-soft: #fde7ee;
  --ok: #19794a; --ok-soft: #dcf2e5; --warn: #8f5d00; --warn-soft: #fbeecb; --bad: #c0362f; --bad-soft: #fbe2e0;
  --btn-bg: #862f6b; --btn-fg: #ffffff; --brand: #c4527a; --brand-2: #f3c6d3; --stage: #2a1530; --on-stage: #f8eef4; --on-stage-2: #c9afc4;
  --shadow: 0 1px 2px rgba(42, 21, 48, .06), 0 6px 20px rgba(42, 21, 48, .07);
  --font-display: 'Alexandria', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, 'Noto Sans Arabic', sans-serif;
  --r: 14px; --r-sm: 9px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #170d1a; --surface: #231428; --surface-2: #301c36; --ink: #f3e9f0; --ink-2: #bba5b8; --line: #44294a;
    --primary: #f08fb8; --primary-soft: #47203c; --accent: #ff9bb7; --accent-soft: #4a1f30;
    --ok: #62d394; --ok-soft: #153526; --warn: #f1c152; --warn-soft: #3b3013; --bad: #ff8079; --bad-soft: #41201e;
    --btn-bg: #e27aa6; --btn-fg: #2a0f20; --brand: #b84a72; --brand-2: #5a2a48; --stage: #120a15; --on-stage: #f8eef4; --on-stage-2: #c9afc4;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #170d1a; --surface: #231428; --surface-2: #301c36; --ink: #f3e9f0; --ink-2: #bba5b8; --line: #44294a;
  --primary: #f08fb8; --primary-soft: #47203c; --accent: #ff9bb7; --accent-soft: #4a1f30;
  --ok: #62d394; --ok-soft: #153526; --warn: #f1c152; --warn-soft: #3b3013; --bad: #ff8079; --bad-soft: #41201e;
  --btn-bg: #e27aa6; --btn-fg: #2a0f20; --brand: #b84a72; --brand-2: #5a2a48; --stage: #120a15; --on-stage: #f8eef4; --on-stage-2: #c9afc4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.7; direction: rtl; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.35; margin: 0; text-wrap: balance; font-weight: 700; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1.02rem; } h4 { font-size: .95rem; margin-top: 18px; }
p { margin: 0; } ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.ic { display: inline-flex; flex: none; vertical-align: middle; }
.mono { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; letter-spacing: .02em; }
.muted { color: var(--ink-2); } .small { font-size: .85rem; } .center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; } .row.end { justify-content: flex-end; margin-top: 16px; } .row.between { justify-content: space-between; } .row.wrap, .row.between { flex-wrap: wrap; }

/* أزرار */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid transparent; background: var(--btn-bg); color: var(--btn-fg); padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: .95rem; line-height: 1.4; transition: transform .12s, filter .12s; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); } .btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.big { width: 100%; padding: 13px 18px; font-size: 1.05rem; }
.btn.small { padding: 5px 12px; font-size: .85rem; }
.btn.ghost { background: transparent; color: var(--primary); border-color: var(--line); }
.btn.ghost:hover { background: var(--primary-soft); filter: none; }
.btn.danger { background: var(--bad); color: var(--surface); }
.btn.danger-text { color: var(--bad); }
.btn.light { background: var(--on-stage); color: var(--stage); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink-2); border-radius: 10px; flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.part { background: var(--warn-soft); color: var(--warn); }
.pill.lock { background: var(--surface-2); color: var(--ink-2); } .pill.new { background: var(--primary-soft); color: var(--primary); } .pill.soft { background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .4s; }
.bar.sm { height: 6px; min-width: 70px; display: inline-block; width: 70px; vertical-align: middle; margin-inline-end: 8px; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-msg { display: grid; place-items: center; gap: 12px; text-align: center; padding: 60px 20px; color: var(--ink-2); }

#toasts { position: fixed; inset-inline: 0; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: grid; justify-items: center; gap: 8px; z-index: 90; pointer-events: none; padding-inline: 16px; }
.toast { background: var(--stage); color: var(--on-stage); padding: 10px 18px; border-radius: 12px; box-shadow: var(--shadow); font-size: .92rem; animation: pop .25s; }
.toast.ok { background: var(--ok); color: var(--surface); } .toast.err { background: var(--bad); color: var(--surface); } .toast.out { opacity: 0; transition: opacity .4s; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }

.modal-open { overflow: hidden; }
.modal-wrap { position: fixed; inset: 0; background: rgba(24, 10, 26, .62); z-index: 80; display: grid; place-items: center; padding: 16px; overflow: auto; }
.modal { background: var(--surface); border-radius: 18px; width: min(480px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal.wide { width: min(900px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px; overflow: auto; }
.confirm-msg { font-size: 1rem; }
.demo-banner { display: flex; gap: 8px; align-items: center; justify-content: center; background: var(--warn-soft); color: var(--warn); font-size: .82rem; padding: 6px 16px; text-align: center; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand); color: #fff; flex: none; }
.brand-logo.big { width: 72px; height: 72px; border-radius: 20px; }
.brand-text { display: grid; line-height: 1.3; min-width: 0; }
.brand-text b { font-family: var(--font-display); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--ink-2); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* حقول */
.field { display: grid; gap: 5px; margin-top: 12px; min-width: 0; }
.field-label { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; min-width: 0; }
textarea { resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input.good { border-color: var(--ok); }
.hint { color: var(--ink-2); font-size: .8rem; } .hint.good { color: var(--ok); font-weight: 600; }
.w-sm { max-width: 150px; }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: .9rem; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { width: 42px; height: 24px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + i { background: var(--primary); } .switch input:checked + i::after { transform: translateX(-18px); }
.switch input:focus-visible + i { outline: 3px solid var(--primary); outline-offset: 2px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--primary); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 14px; }
.form-err { color: var(--bad); font-size: .9rem; min-height: 1.4em; margin: 6px 0; font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-tools { padding: 12px; border-bottom: 1px solid var(--line); }

/* ---------- صفحة الدخول ---------- */
.login { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(340px, 1fr); min-height: 100vh; }
.login.solo { grid-template-columns: 1fr; place-items: center; padding: 24px 16px; }
/* المسرح: خلفية باذنجانية ثابتة في الوضعين، والرسم مولَّد من المانيكان نفسه */
.login-hero { --art-floor: #3a2140; --art-line: #7d5a78; --art-line-2: #b99ab3; --art-accent: #f08fb0; --art-ink: #fff;
  background: radial-gradient(110% 80% at 20% 100%, #4a2242 0%, transparent 62%), #2a1530; color: #f8eef4;
  padding: clamp(20px, 3.2vw, 44px); display: grid; grid-template-rows: auto 1fr auto; gap: 16px; overflow: hidden; }
.hero-top { display: flex; align-items: center; gap: 12px; font-size: .85rem; color: #c9afc4; line-height: 1.5; }
.hero-top b { display: block; color: #f8eef4; font-family: var(--font-display); font-size: .98rem; }
.hero-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 4px; min-height: 0; }
.hero-copy { display: grid; gap: 12px; justify-items: start; }
.eyebrow { display: inline-flex; gap: 6px; align-items: center; font-size: .8rem; font-weight: 700; color: #f6b6cb; background: rgba(240, 143, 176, .14); border: 1px solid rgba(240, 143, 176, .32); padding: 3px 12px; border-radius: 999px; }
.login-hero h1 { font-size: clamp(1.9rem, 3.5vw, 2.9rem); font-weight: 800; line-height: 1.3; }
.hero-copy > p { color: #c9afc4; font-size: 1.08rem; max-width: 30ch; }
.feat { display: grid; gap: 8px; margin-top: 6px; }
.feat li { display: flex; gap: 10px; align-items: center; font-size: .95rem; }
.feat .ic { color: #f08fb0; }
.hero-art svg { display: block; width: 100%; height: auto; max-height: 66vh; }
.about { display: grid; gap: 12px; }
.login-hero .about { border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 14px; }
.thesis { font-size: .86rem; line-height: 1.85; color: #c9afc4; max-width: 78ch; }
.thesis b { color: #f8eef4; font-weight: 600; }
.credits { display: flex; gap: 8px 32px; flex-wrap: wrap; }
.credits p { display: grid; } .credits small { color: #c9afc4; font-size: .75rem; } .credits b { font-size: .95rem; }
.login-side { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; padding: 32px 16px; }
.login-side .about { width: min(380px, 100%); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.login-side .thesis, .login-side .credits small { color: var(--ink-2); } .login-side .thesis b { color: var(--ink); }
.only-narrow { display: none; }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.login-card h2 { font-size: 1.3rem; margin-bottom: 8px; }
.login-card label { font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-top: 8px; }
.login-card input { font-size: 1.15rem; padding: 12px 14px; letter-spacing: .08em; text-align: center; direction: ltr; }
.login-card input[type=email] { letter-spacing: 0; font-size: 1rem; }
.login-card .brand-logo { justify-self: center; }
.admin-link { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); font-size: .88rem; justify-self: center; margin-top: 6px; }
.admin-link:hover { color: var(--primary); }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; min-height: 0; }
  .login-hero { padding: 16px 16px 6px; gap: 6px; grid-template-rows: auto auto; }
  .hero-main { grid-template-columns: minmax(0, 1fr) 42%; }
  .hero-copy { gap: 8px; }
  .login-hero h1 { font-size: 1.55rem; } .hero-copy > p { font-size: .9rem; }
  .feat, .only-wide { display: none; }
  .only-narrow { display: grid; }
  .login-side { justify-content: flex-start; padding-top: 22px; }
}

/* ---------- واجهة الطالبة ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; align-items: center; gap: 10px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px; }
.topbar .brand { flex: 1; }
.who { display: flex; align-items: center; gap: 6px; text-align: end; line-height: 1.3; }
.who div { display: grid; } .who b { font-size: .88rem; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .who small { color: var(--ink-2); font-size: .74rem; }
.page { max-width: 780px; margin-inline: auto; padding-inline: 16px; padding-block: 18px 60px; display: grid; gap: 18px; }
.page > * { min-width: 0; }
.hero { background: var(--stage); color: var(--on-stage); border-radius: 20px; padding: 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.hero-text { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.hero-text small { color: var(--on-stage-2); } .hero-text p { color: var(--on-stage-2); font-size: .92rem; } .hero-text .btn { margin-top: 10px; white-space: normal; text-align: start; }
.ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; flex: none; display: grid; place-content: center; text-align: center; line-height: 1.2;
  background: radial-gradient(closest-side, var(--stage) 78%, transparent 79%), conic-gradient(var(--brand) calc(var(--p) * 1%), rgba(255, 255, 255, .16) 0); }
.ring b { font-family: var(--font-display); font-size: 1.3rem; } .ring small { font-size: .7rem; color: var(--on-stage-2); }
.sec-title { font-size: 1.05rem; }
.unit-list { display: grid; gap: 10px; }
.unit-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; color: inherit; transition: border-color .15s, transform .15s; }
a.unit-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.unit-card.locked { opacity: .72; background: var(--surface-2); }
.unit-no { width: 54px; height: 60px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-content: center; text-align: center; line-height: 1.1; flex: none; }
.unit-no small { font-size: .62rem; opacity: .9; } .unit-no b { font-family: var(--font-display); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.locked .unit-no, .draft .unit-no { background: var(--ink-2); }
.unit-info { flex: 1; min-width: 0; display: grid; gap: 4px; }
.unit-tags { display: flex; gap: 6px; flex-wrap: wrap; font-size: .74rem; color: var(--ink-2); }
.unit-tags span + span::before { content: '•'; margin-inline-end: 6px; }
.why { font-size: .82rem; color: var(--ink-2); }
.survey-card { display: flex; gap: 12px; align-items: center; background: var(--primary-soft); color: var(--ink); border: 1.5px dashed var(--primary); border-radius: var(--r); padding: 12px 14px; }
.survey-card div { flex: 1; } .survey-card p { font-size: .85rem; color: var(--ink-2); } .survey-card > .ic { color: var(--primary); }
.survey-card.done { border-style: solid; border-color: var(--line); background: var(--surface); }
.unit-head { display: grid; gap: 6px; }
.unit-prog { display: flex; align-items: center; gap: 10px; } .unit-prog b { font-variant-numeric: tabular-nums; font-size: .9rem; color: var(--primary); }
.done-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--ok-soft); color: var(--ok); border-radius: var(--r); padding: 16px; }
.done-box div { flex: 1; min-width: 180px; } .done-box p { color: var(--ink-2); font-size: .9rem; }
.survey { display: grid; gap: 14px; }
.likert { display: flex; gap: 6px; flex-wrap: wrap; }
.likert label { flex: 1 1 110px; }
.likert input { position: absolute; opacity: 0; }
.likert span { display: block; text-align: center; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 6px; font-size: .84rem; background: var(--surface); cursor: pointer; }
.likert input:checked + span { background: var(--primary); color: var(--btn-fg); border-color: var(--primary); font-weight: 700; }
.likert input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ---------- عرض الوحدة ---------- */
.unit { display: grid; gap: 14px; }
.goals { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.goal { display: flex; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.goal-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.goal b { font-size: .82rem; color: var(--ink-2); } .goal p { font-size: .92rem; line-height: 1.6; }
.intro { color: var(--ink-2); }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.block-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.block-num { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: .82rem; font-weight: 700; flex: none; font-variant-numeric: tabular-nums; }
.is-done .block-num { background: var(--ok); color: var(--surface); }
.block-ic { color: var(--primary); display: grid; }
.block-title { flex: 1; min-width: 0; display: grid; line-height: 1.4; } .block-title small { color: var(--ink-2); font-size: .76rem; }
.block-status { font-size: .78rem; font-weight: 700; color: var(--ink-2); display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.block-status.done { color: var(--ok); } .block-status.part { color: var(--warn); }
.block-body { padding: 14px; display: grid; gap: 12px; }
.block-body > * { min-width: 0; }
.empty-note { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: .9rem; }
.prose { display: grid; gap: 8px; max-width: 68ch; } .prose ul, .block-notes ul { list-style: disc; padding-inline-start: 22px; display: grid; gap: 4px; }
.block-notes { color: var(--ink-2); font-size: .92rem; }
.drill-img { margin: 0; } .drill-img img { border-radius: 10px; display: block; }
.audio-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .audio-row span { display: inline-flex; gap: 6px; font-weight: 600; font-size: .9rem; } .audio-row audio { flex: 1; min-width: 200px; height: 38px; }
.angle-tabs { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .88rem; color: var(--ink-2); }
.vid { display: grid; gap: 10px; }
.vid-frame { aspect-ratio: 16 / 9; background: #170d1a; border-radius: 12px; overflow: hidden; max-width: 100%; }
.vid-frame iframe, .vid-frame video, .vid-frame > div { width: 100%; height: 100%; border: 0; display: block; }
.vid-empty { display: grid !important; place-content: center; justify-items: center; gap: 8px; color: #c9afc4; font-size: .9rem; }
.vid-ctrl { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bd { display: grid; gap: 10px; }
.bd-stage { display: flex; align-items: center; gap: 6px; }
.bd-main { flex: 1; min-width: 0; background: #170d1a; border-radius: 12px; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.bd-main img { max-height: 100%; object-fit: contain; width: 100%; height: 100%; }
.bd-nav { border: 1px solid var(--line); background: var(--surface); width: 38px; height: 56px; border-radius: 10px; color: var(--ink); flex: none; display: grid; place-items: center; }
.bd-meta { display: flex; justify-content: space-between; align-items: center; } .bd-count { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-2); direction: ltr; }
.bd-cap { background: var(--accent-soft); color: var(--ink); border-radius: 10px; padding: 8px 12px; font-size: .92rem; }
.bd-thumbs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.bd-thumb { position: relative; width: 62px; height: 48px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: #170d1a; flex: none; }
.bd-thumb.on { border-color: var(--accent); } .bd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bd-thumb i { position: absolute; bottom: 1px; inset-inline-start: 3px; font-style: normal; font-size: .64rem; color: #fff; text-shadow: 0 0 3px #000; }
.q { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); } .q:last-of-type { border: 0; }
.q-text { font-weight: 600; }
.opt { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.opt input { margin-top: 6px; accent-color: var(--primary); flex: none; width: auto; }
.opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.opt.right { border-color: var(--ok); background: var(--ok-soft); } .opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.quiz-result { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: 10px 14px; }

/* ---------- العارض ثلاثي الأبعاد (مسرح داكن ثابت في الوضعين) ---------- */
.v3d { display: grid; gap: 10px; }
.v3d-holder { min-width: 0; }
/* استوديو المجسم: رمادي داكن مثل استوديو DeepMotion حتى يبرز المجسم الأبيض (نفس الشكل في الوضعين الفاتح والداكن) */
:root { --studio: linear-gradient(#2c2c30, #4b4b50 58%, #8d8d92 100%); --studio-ink: #e6e6ea; --studio-chip: rgba(20, 20, 24, .58); --studio-chip-ink: #f4f4f6; }
.v3d-stage, .v3d-poster { position: relative; height: clamp(300px, 56vh, 520px); border-radius: 14px; overflow: hidden; background: var(--studio); color: var(--studio-ink); touch-action: none; }
.v3d-poster { display: grid; place-content: center; justify-items: center; gap: 10px; font-size: .9rem; touch-action: auto; }
.v3d-stage canvas { width: 100%; height: 100%; display: block; }
.v3d-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 20px; font-size: .9rem; }
.v3d-loading .spinner { border-color: rgba(255, 255, 255, .2); border-top-color: var(--studio-ink); }
.v3d-angles { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 4px; flex-wrap: wrap; max-width: calc(100% - 20px); }
.v3d-angles button { border: 0; background: var(--studio-chip); color: var(--studio-chip-ink); padding: 5px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; backdrop-filter: blur(6px); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.v3d-angles button:hover { background: #c4527a; color: #fff; }
.v3d-hint { position: absolute; bottom: 10px; inset-inline: 0; text-align: center; font-size: .78rem; color: var(--studio-ink); opacity: .85; pointer-events: none; transition: opacity .5s; }
.v3d-hint.hide { opacity: 0; }
.v3d-badge { position: absolute; bottom: 10px; inset-inline-end: 10px; background: rgba(24, 10, 26, .72); color: #f1c152; font-size: .72rem; padding: 3px 10px; border-radius: 999px; pointer-events: none; }
.v3d-phases { display: flex; gap: 6px; flex-wrap: wrap; }
.v3d-phases button { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--surface); padding: 5px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.v3d-phases button i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.v3d-phases button.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.v3d-notes { background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; font-size: .92rem; }
.v3d-bar { display: flex; align-items: center; gap: 6px; }
.v3d-play { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: var(--surface); display: grid; place-items: center; flex: none; }
.v3d-mini { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; flex: none; color: var(--ink); }
.v3d-track { flex: 1; min-width: 0; display: flex; }
.v3d-range { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border-radius: 99px; padding: 0; border: 0; background: var(--phases, none), var(--surface-2); background-color: var(--surface-2); cursor: pointer; }
.v3d-range:focus { box-shadow: none; }
.v3d-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.v3d-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); border: 3px solid var(--surface); }
.v3d-time { font-variant-numeric: tabular-nums; font-size: .8rem; color: var(--ink-2); min-width: 44px; text-align: center; }
.v3d-opts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.v3d:fullscreen, .v3d.pseudo-full { background: var(--bg); padding: 12px; overflow: auto; align-content: start; }
.v3d.pseudo-full { position: fixed; inset: 0; z-index: 70; }
.v3d:fullscreen .v3d-stage, .v3d.pseudo-full .v3d-stage { height: calc(100vh - 190px); }
.no-anim .v3d-bar, .no-anim .v3d-opts .seg:first-child { display: none; }

/* ---------- لوحة التحكم ---------- */
.admin { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--stage); color: var(--on-stage); padding: 18px 12px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.side .brand-text small { color: var(--on-stage-2); }
.side nav { display: grid; gap: 4px; }
.side nav a, .side-foot a, .side-foot button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--on-stage-2); font-weight: 600; font-size: .94rem; border: 0; background: transparent; width: 100%; text-align: start; }
.side nav a:hover, .side-foot a:hover, .side-foot button:hover { background: rgba(255, 255, 255, .08); color: var(--on-stage); }
.side nav a.on { background: var(--brand); color: #fff; }
.side-foot { margin-top: auto; display: grid; gap: 2px; }
.admin-main { min-width: 0; }
.admin-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px clamp(16px, 3vw, 28px); border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.admin-head h1 { font-size: 1.25rem; flex: 1; min-width: 140px; }
.admin-head .row { flex-wrap: wrap; }
.saved { display: inline-flex; gap: 4px; align-items: center; color: var(--ok); font-size: .82rem; font-weight: 700; }
.admin-body { padding: 18px clamp(16px, 3vw, 28px) 80px; display: grid; gap: 16px; max-width: 1100px; }
.admin-body > * { min-width: 0; }
@media (max-width: 860px) {
  .admin { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: auto 0 0 0; top: auto; height: auto; flex-direction: row; padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px)); z-index: 40; gap: 0; }
  .side .brand, .side-foot { display: none; }
  .side nav { display: flex; flex: 1; justify-content: space-around; gap: 0; }
  .side nav a { flex-direction: column; gap: 1px; font-size: .64rem; padding: 6px 4px; flex: 1; align-items: center; }
  .admin-body { padding-bottom: 110px; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 2px; color: inherit; }
.stat-ic { color: var(--accent); } .stat b { font-family: var(--font-display); font-size: 1.7rem; font-variant-numeric: tabular-nums; line-height: 1.2; } .stat small { color: var(--ink-2); font-size: .82rem; }
.steps { display: grid; gap: 8px; margin-top: 10px; }
.steps li { display: flex; gap: 10px; align-items: center; }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.steps .done .tick { background: var(--ok); border-color: var(--ok); color: var(--surface); } .steps .done a { color: var(--ink-2); text-decoration: line-through; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.cols .card { display: grid; gap: 10px; align-content: start; justify-items: start; }
.feed { display: grid; gap: 6px; width: 100%; } .feed li { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; } .feed small { color: var(--ink-2); }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.ucard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: grid; }
.ucard.draft { border-style: dashed; }
.ucard-main { display: flex; gap: 12px; padding: 14px; color: inherit; align-items: center; min-width: 0; }
.ucard-main > div:last-child { min-width: 0; display: grid; gap: 3px; }
.kinds { display: flex; gap: 10px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); } .kinds span { display: inline-flex; gap: 3px; align-items: center; }
.ucard-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); }
.ucard-foot .pill { white-space: normal; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.modes button { display: grid; gap: 2px; justify-items: start; text-align: start; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px; }
.modes button small { color: var(--ink-2); font-size: .8rem; line-height: 1.5; } .modes button .ic { color: var(--ink-2); }
.modes button.on { border-color: var(--primary); background: var(--primary-soft); } .modes button.on .ic { color: var(--primary); }
.access-list { display: grid; gap: 4px; margin-top: 12px; }
.access-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.access-row.all { background: transparent; border: 1px solid var(--line); margin-bottom: 4px; }
.access-row input { width: auto; }
.blocks { display: grid; gap: 8px; margin-top: 10px; }
.eb { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.eb.open { border-color: var(--primary); }
.eb-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; cursor: pointer; }
.eb-title { flex: 1; min-width: 0; display: grid; line-height: 1.35; margin-inline-start: 4px; } .eb-title small { color: var(--ink-2); font-size: .75rem; }
.chev { color: var(--ink-2); display: grid; }
.eb-body { display: none; padding: 4px 14px 16px; border-top: 1px solid var(--line); gap: 10px; }
.eb.open .eb-body { display: grid; } .eb-body > * { min-width: 0; }
.add-title { display: flex; gap: 6px; align-items: center; color: var(--ink-2); }
.add-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-top: 8px; }
.add-tiles button { display: grid; gap: 3px; justify-items: start; text-align: start; border: 1.5px dashed var(--line); background: var(--surface); border-radius: 12px; padding: 12px; }
.add-tiles button:hover { border-color: var(--accent); border-style: solid; } .add-tiles .ic { color: var(--accent); }
.add-tiles small { color: var(--ink-2); font-size: .78rem; line-height: 1.5; }
.phases-ed, .angles-ed, .imgs-ed, .qs-ed { display: grid; gap: 8px; }
.phase-row { border: 1px solid var(--line); border-inline-start: 5px solid var(--c); border-radius: 10px; padding: 10px; display: grid; gap: 8px; }
.phase-top, .angle-row, .img-row, .opt-ed, .sq-row, .sec-row { display: flex; gap: 8px; align-items: center; }
.phase-range { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; font-size: .85rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.img-row img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--surface-2); flex: none; }
.img-n { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: .78rem; font-weight: 700; flex: none; font-variant-numeric: tabular-nums; }
.drill-prev { max-height: 200px; border-radius: 10px; justify-self: start; }
.q-ed { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.q-ed-top { display: flex; justify-content: space-between; align-items: center; }
.opt-ed input[type=radio] { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.sq-row select { width: auto; flex: none; }
.preview-host { max-width: 760px; margin-inline: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 16px; font-weight: 700; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button.on { color: var(--primary); border-color: var(--primary); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { display: inline-flex; gap: 6px; align-items: center; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .9rem; }
.chips button i { font-style: normal; background: var(--surface-2); border-radius: 99px; padding: 0 8px; font-size: .78rem; font-variant-numeric: tabular-nums; }
.chips button.on { background: var(--ink); color: var(--surface); border-color: var(--ink); } .chips button.on i { background: rgba(127, 127, 127, .35); }
.chips button.add { border-style: dashed; color: var(--primary); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { margin-top: 0; min-width: 170px; flex: 0 1 260px; }
.legend { display: flex; gap: 12px; font-size: .82rem; align-items: center; padding-bottom: 8px; }
.legend .c::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; background: var(--surface-2); border: 1px solid var(--line); }
.legend .c.ok::before { background: var(--ok); } .legend .c.part::before { background: var(--warn); }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: start; font-size: .78rem; color: var(--ink-2); font-weight: 700; padding: 10px 12px; background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl td.name { font-weight: 600; min-width: 150px; } .tbl td.num { color: var(--ink-2); font-variant-numeric: tabular-nums; width: 36px; }
.tbl td.acts { white-space: nowrap; text-align: end; } .tbl td.center { text-align: center; padding: 28px; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--primary-soft); }
.tbl tr.off td { opacity: .5; }
.tbl.mini { font-size: .84rem; } .tbl.mini td, .tbl.mini th { padding: 6px 8px; }
.tbl.matrix th, .tbl.matrix td.cell { text-align: center; padding: 6px 4px; min-width: 40px; font-variant-numeric: tabular-nums; font-size: .78rem; }
.tbl.matrix th:first-child { text-align: start; padding-inline-start: 12px; }
.cell.ok { background: var(--ok-soft); color: var(--ok); } .cell.part { background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.ready-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rs { border-radius: var(--r); padding: 12px 14px; display: grid; }
.rs b { font-family: var(--font-display); font-size: 1.8rem; line-height: 1.2; font-variant-numeric: tabular-nums; } .rs small { font-size: .82rem; font-weight: 600; }
.rs.ok { background: var(--ok-soft); color: var(--ok); } .rs.part { background: var(--warn-soft); color: var(--warn); } .rs.none { background: var(--bad-soft); color: var(--bad); }
.detail { display: grid; gap: 12px; }
.detail-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.detail-top div { display: grid; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; } .detail-top small { color: var(--ink-2); font-size: .76rem; }
.d-unit { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.d-unit summary { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; }
.d-unit .tbl { border-top: 1px solid var(--line); } .d-unit p { padding: 8px 12px; }
.sr { padding: 12px 0; border-top: 1px dashed var(--line); display: grid; gap: 6px; }
.sr-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mean { font-family: var(--font-display); font-size: 1.4rem; color: var(--primary); font-variant-numeric: tabular-nums; }
.dist { display: flex; flex: 1; min-width: 180px; height: 24px; border-radius: 8px; overflow: hidden; gap: 2px; }
.dist span { display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: var(--surface); min-width: 0; font-variant-numeric: tabular-nums; }
.dist span:nth-child(1) { background: var(--ok); } .dist span:nth-child(2) { background: var(--primary); } .dist span:nth-child(3) { background: var(--ink-2); } .dist span:nth-child(4) { background: var(--warn); } .dist span:nth-child(5) { background: var(--bad); }
.answers { list-style: disc; padding-inline-start: 22px; font-size: .9rem; color: var(--ink-2); }
.form { display: grid; gap: 4px; }
.search { max-width: 320px; }

/* ---------- كروت الدخول ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-top: 14px; }
.id-card { border: 1.5px dashed #b9a3b6; border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; background: #fff; color: #2a1830; break-inside: avoid; }
.id-top { display: flex; gap: 6px; align-items: center; font-size: .8rem; color: #c23d6b; font-family: var(--font-display); } .id-top b { color: #2a1830; }
.id-mid { display: flex; gap: 12px; align-items: center; }
.id-qr { width: 92px; height: 92px; flex: none; } .id-qr svg { width: 100%; height: 100%; display: block; }
.id-info { min-width: 0; display: grid; gap: 1px; } .id-info h4 { margin: 0; font-size: 1rem; } .id-info small { color: #6d5b6f; }
.id-info p { display: flex; gap: 8px; align-items: baseline; font-size: .82rem; } .id-info p span { color: #6d5b6f; min-width: 70px; } .id-info p b { font-size: 1.15rem; letter-spacing: .1em; }
.id-foot { display: flex; justify-content: space-between; gap: 8px; font-size: .68rem; color: #6d5b6f; flex-wrap: wrap; }

@media print {
  body { background: #fff; }
  .demo-banner, .side, .admin-head, .noprint, .modal-head, #toasts, .tabs, .filters { display: none !important; }
  .admin { display: block; } .admin-body { padding: 0; max-width: none; }
  .card { border: 0; } .tbl th { background: #eee; color: #000; } .tbl { font-size: 10.5pt; color: #000; }
  body.modal-open .admin { display: none; }
  .print-modal { position: static; background: none; padding: 0; display: block; }
  .print-modal .modal { width: auto; max-height: none; box-shadow: none; display: block; } .print-modal .modal-body { padding: 0; overflow: visible; }
  .cards { grid-template-columns: 1fr 1fr; gap: 6mm; margin: 0; }
  .id-card { height: 62mm; align-content: space-between; }
  @page { size: A4; margin: 10mm; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- إضافات: صور المهارات، حساب التجربة، المجموعات ---------- */
.unit-pic { width: 62px; height: 66px; border-radius: 12px; background: #fbe9ef; flex: none; position: relative; overflow: hidden; }
.unit-pic svg { width: 100%; height: 100%; display: block; }
.unit-pic b { position: absolute; top: 3px; inset-inline-start: 3px; min-width: 20px; height: 20px; padding-inline: 5px; border-radius: 99px; background: var(--brand); color: #fff; font-size: .74rem; display: grid; place-items: center; font-family: var(--font-display); font-variant-numeric: tabular-nums; line-height: 1; }
.locked .unit-pic { filter: grayscale(1); opacity: .65; }
.hero { background: radial-gradient(120% 140% at 0% 100%, #4a2242 0%, transparent 60%), #2a1530; color: #f8eef4; }
.hero-text small, .hero-text p { color: #c9afc4; } .hero .btn.light { background: #f8eef4; color: #2a1530; }
.ring { background: radial-gradient(closest-side, #2a1530 78%, transparent 79%), conic-gradient(#f08fb0 calc(var(--p) * 1%), rgba(255, 255, 255, .16) 0); } .ring small { color: #c9afc4; }
.test-bar { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; justify-content: center; background: var(--warn-soft); color: var(--warn); font-size: .85rem; font-weight: 600; padding: 6px 16px; }
.test-bar .seg { background: rgba(127, 127, 127, .18); }
.group-tag { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.group-tag.pilot { background: var(--warn-soft); color: var(--warn); } .group-tag.exp { background: var(--primary-soft); color: var(--primary); }
.group-tag.control { background: var(--surface-2); color: var(--ink-2); } .group-tag.test { background: var(--ok-soft); color: var(--ok); }
.name-in { border-color: transparent !important; background: transparent !important; padding: 5px 8px !important; font-weight: 600; min-width: 190px; }
.name-in:hover { border-color: var(--line) !important; } .name-in:focus { background: var(--surface) !important; border-color: var(--primary) !important; }
.name-in.ph { color: var(--ink-2); font-weight: 400; }
.test-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border: 1.5px dashed var(--ok); background: var(--ok-soft); border-radius: var(--r); padding: 12px 16px; }
.test-card > .ic { color: var(--ok); } .test-card .grow { flex: 1; min-width: 220px; } .test-card p { font-size: .88rem; color: var(--ink-2); }
.test-card .cred { display: flex; gap: 14px; font-size: .9rem; } .test-card .cred b { font-size: 1.15rem; letter-spacing: .08em; }
.gaps { display: grid; gap: 6px; margin-top: 10px; }
.gaps li { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; font-size: .92rem; }
.gaps li a { margin-inline-start: auto; white-space: nowrap; font-weight: 600; font-size: .85rem; }
.gaps li .ic { color: var(--warn); align-self: center; }
.group-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.group-sum > div { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; background: var(--surface); }
.group-sum b { font-family: var(--font-display); font-size: 1.05rem; } .group-sum small { color: var(--ink-2); }
.group-sum .mono { font-size: 1.2rem; font-weight: 700; color: var(--primary); }

.w-demo { width: auto; max-width: 290px; }
.bd-main img.lowres { width: auto; height: auto; max-width: 100%; max-height: 100%; min-height: 62%; }
.side .brand-text b, .topbar .brand-text b { white-space: normal; line-height: 1.3; }
@media (max-width: 520px) { .topbar .brand-text small { display: none; } .topbar .brand-logo { width: 36px; height: 36px; } }

/* ============ طبقة التلميع: ظلال ناعمة، تدرّج الساتان، بطاقات أوضح ============ */
:root { --grad: linear-gradient(135deg, #8a2d6c 0%, #c4527a 100%); --shadow-sm: 0 1px 2px rgba(42, 21, 48, .05), 0 3px 10px rgba(42, 21, 48, .05); --shadow-lg: 0 14px 34px rgba(42, 21, 48, .13), 0 2px 6px rgba(42, 21, 48, .06); --r: 18px; }
body { background: radial-gradient(900px 420px at 100% -90px, var(--primary-soft), transparent 70%), radial-gradient(760px 380px at 0% -140px, var(--accent-soft), transparent 70%), var(--bg); background-attachment: fixed; }
.btn { background: var(--grad); color: #fff; border: 0; padding: 10px 18px; box-shadow: 0 6px 16px rgba(134, 47, 107, .26); }
.btn.ghost { background: var(--surface); color: var(--primary); border: 1.5px solid var(--line); box-shadow: none; padding: 8.5px 16px; }
.btn.small { padding: 5px 12px; box-shadow: none; } .btn.small.ghost { padding: 3.5px 11px; }
.btn.danger { background: var(--bad); box-shadow: none; } .btn.light, .hero .btn.light { background: #f8eef4; color: #2a1530; box-shadow: 0 6px 16px rgba(0, 0, 0, .22); }
.brand-logo { background: var(--grad); box-shadow: 0 4px 12px rgba(134, 47, 107, .3); }
.card, .block, .goal, .stat, .ucard { box-shadow: var(--shadow-sm); }
.bar i { background: var(--grad); }
.topbar { background: color-mix(in srgb, var(--surface) 84%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); padding-block: 10px; }

/* صفحة الدخول */
.hero-art { position: relative; display: grid; place-items: center; min-width: 0; }
.hero-art::before { content: ''; position: absolute; inset: 6% 4% 12%; background: radial-gradient(closest-side, rgba(240, 143, 176, .26), transparent 72%); }
.hero-art img { position: relative; width: 100%; max-width: 560px; height: auto; max-height: 70vh; object-fit: contain; display: block; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .3)); }
.chip3d { position: absolute; z-index: 2; display: inline-flex; gap: 6px; align-items: center; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .24); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font-size: .8rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.chip3d .ic { color: #f6a3bf; }
.chip3d.c1 { top: 9%; inset-inline-end: 10%; } .chip3d.c2 { top: 44%; inset-inline-start: 0; } .chip3d.c3 { bottom: 13%; inset-inline-end: 4%; }
.login-card { padding: 30px; border-radius: 24px; box-shadow: var(--shadow-lg); border-color: transparent; gap: 7px; }
.login-card h2 { font-size: 1.45rem; margin-bottom: 0; } .login-card .lead { color: var(--ink-2); font-size: .92rem; margin-bottom: 6px; }
.login-card input { border-radius: 14px; padding: 13px 14px; background: var(--surface-2); border-color: transparent; }
.login-card input:focus { background: var(--surface); }
@media (max-width: 900px) { .chip3d { display: none; } .hero-art img { max-height: 190px; } .hero-art::before { inset: 0; } }

/* الرئيسية */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding: 26px 28px; border-radius: 26px; box-shadow: var(--shadow-lg); min-height: 196px; }
.hero-text h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.ring { width: 104px; height: 104px; }
.hero-dancer { height: 236px; width: auto; align-self: end; margin-block: -26px -30px; margin-inline-end: -6px; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .3)); }
@media (max-width: 620px) { .hero { grid-template-columns: minmax(0, 1fr) auto; padding: 22px; min-height: 0; } .hero-dancer { display: none; } .ring { width: 88px; height: 88px; } }
.sec-title { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin-top: 4px; }
.sec-title span { background: var(--primary-soft); color: var(--primary); font-size: .8rem; padding: 1px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.unit-list { gap: 12px; }
.unit-card { padding: 12px; gap: 16px; border-radius: 22px; border: 1px solid transparent; box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .18s, border-color .18s; }
a.unit-card:hover { border-color: var(--brand-2); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.unit-card.locked { box-shadow: none; border-color: var(--line); }
.unit-pic { width: 88px; height: 96px; border-radius: 16px; background: linear-gradient(165deg, #fef1f5 0%, #f5d3e0 100%); }
.unit-pic img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; display: block; }
.unit-pic b { top: 5px; inset-inline-start: 5px; min-width: 22px; height: 22px; box-shadow: 0 2px 6px rgba(134, 47, 107, .35); }
.unit-info { gap: 6px; } .unit-info h3 { font-size: 1.08rem; } .unit-card .bar { height: 6px; }
.unit-side .pill { padding: 4px 12px; }
@media (max-width: 480px) { .unit-pic { width: 70px; height: 78px; } .unit-card { gap: 12px; } }

/* صفحة الوحدة */
.unit-head { display: flex; align-items: stretch; gap: 10px; background: radial-gradient(120% 150% at 0% 100%, #4a2242 0%, transparent 62%), #2a1530; color: #f8eef4; border-radius: 26px; padding: 22px 26px 0; overflow: hidden; box-shadow: var(--shadow-lg); }
.unit-head-text { flex: 1; min-width: 0; display: grid; gap: 8px; align-content: center; padding-bottom: 22px; }
.unit-head .unit-tags { color: #c9afc4; font-size: .8rem; } .unit-head h1 { font-size: clamp(1.3rem, 3.6vw, 1.9rem); }
.unit-head .bar { background: rgba(255, 255, 255, .16); } .unit-head .bar i { background: linear-gradient(90deg, #f08fb0, #f6c3d4); } .unit-head .unit-prog b { color: #f6b6cb; }
.unit-head-art { width: 132px; height: 142px; object-fit: contain; object-position: center bottom; align-self: flex-end; flex: none; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .3)); }
@media (max-width: 480px) { .unit-head { padding: 18px 18px 0; } .unit-head-art { width: 92px; height: 104px; } .unit-head-text { padding-bottom: 18px; } }
.goal { border-radius: 18px; padding: 14px; border-color: transparent; }
.goal-ic { width: 40px; height: 40px; border-radius: 12px; }
.goal:nth-child(1) .goal-ic { background: var(--primary-soft); color: var(--primary); } .goal:nth-child(3) .goal-ic { background: var(--warn-soft); color: var(--warn); }
.block { border-radius: 22px; border-color: transparent; }
.block-head { padding: 14px 16px; }
.block-num { width: 28px; height: 28px; background: var(--primary-soft); color: var(--primary); }
.block-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); place-items: center; }
.block-title h3 { font-size: 1.05rem; }
.block-status { background: var(--surface-2); padding: 3px 11px; border-radius: 999px; } .block-status.done { background: var(--ok-soft); } .block-status.part { background: var(--warn-soft); }
.block-body { padding: 16px; }

/* شعارا الجامعة والكلية */
.logos { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.logos img { height: 34px; width: auto; display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .18)); }
.logos.md img { height: 46px; }
.logos.lg { gap: 10px; }
.logos.lg img { height: 64px; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .35)); }
.unit-head-text > .logos { justify-self: start; }
@media (max-width: 520px) {
  .block-head .logos img { height: 26px; } .logos.md img { height: 38px; } .logos.lg img { height: 50px; }
}
@media (max-width: 380px) { .block-head .logos { display: none; } }
.prose { font-size: 1.01rem; } .prose p { font-weight: 600; color: var(--primary); margin-top: 6px; } .prose p:first-child { margin-top: 0; } .prose li::marker { color: var(--brand); }
.vid-frame { border-radius: 16px; margin-inline: auto; width: 100%; background: #120a15; }
.vid-frame.tall { width: auto; height: min(72vh, 600px); max-width: 100%; }
.vid-frame video { object-fit: contain; background: #120a15; }
.bd-main { border-radius: 16px; background: #fff; border: 1px solid var(--line); } .bd-thumb { background: #fff; border-color: var(--line); } .bd-thumb.on { border-color: var(--accent); }
.opt { border-radius: 14px; padding: 11px 14px; transition: border-color .12s, background .12s; } .opt:hover { border-color: var(--brand-2); }
.done-box, .survey-card { border-radius: 20px; }
.v3d-stage, .v3d-poster { border-radius: 18px; }
.v3d-play { background: var(--grad); color: #fff; box-shadow: 0 6px 14px rgba(134, 47, 107, .3); }
details.more { font-size: .9rem; } details.more summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.vid-frame { position: relative; } .vid-err { position: absolute; inset: auto 0 0 0; height: auto !important; background: rgba(18, 10, 21, .85); color: #f8eef4; font-size: .85rem; padding: 8px 12px; text-align: center; }
