/* ===== واجهة الموقع — ألوان هادئة مريحة للعين ===== */
:root {
  --bg: #f3f5f7; --card: #ffffff; --ink: #27323d; --muted: #6b7783; --line: #e2e7ec;
  --c: #2e7d74; --c2: #256860; --soft: #e7f2f0; --soft2: #f4f9f8; --warn: #b7791f; --bad: #c0563f; --good: #2f855a;
  --r: 14px; --shadow: 0 1px 2px rgba(20, 40, 60, .04), 0 4px 16px rgba(20, 40, 60, .05);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "IBM Plex Sans Arabic", "Tajawal", system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 15.5px; line-height: 1.75; }
[hidden] { display: none !important; }
a { color: var(--c); }
h1, h2, h3 { line-height: 1.4; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 14px; margin: 4px 0 12px; }
.note { background: #fff8e6; border: 1px solid #f1dca6; padding: 10px 14px; border-radius: 10px; }

/* الأزرار */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; background: var(--c); color: #fff; border: 0; padding: 11px 22px; border-radius: 11px; font: inherit; font-weight: 600; cursor: pointer; transition: background .15s, box-shadow .15s; }
.btn:hover { background: var(--c2); }
.btn:focus-visible { outline: 3px solid #b9ddd7; outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--c); box-shadow: inset 0 0 0 1.5px #bfdcd7; }
.btn.ghost:hover { background: var(--soft2); }
.btn.sm { padding: 6px 14px; font-size: 14px; border-radius: 9px; }
.btn.big { font-size: 19px; padding: 15px 44px; border-radius: 14px; }

/* الشريط العلوي */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { font-size: 21px; color: var(--ink); text-decoration: none; font-weight: 500; }
.brand b { color: var(--c); font-weight: 700; }
.credits { background: var(--soft); color: var(--c2); padding: 4px 14px; border-radius: 20px; font-weight: 600; font-size: 13.5px; }

/* الصفحة الرئيسية والدفع */
.view { max-width: 980px; margin: 0 auto; padding: 28px 20px 70px; }
.view.narrow { max-width: 480px; }
.view h1 { color: var(--ink); }
.hero { text-align: center; padding: 34px 0 8px; }
.hero h1 { font-size: 34px; margin: 0 0 12px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 34px 0; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; text-align: center; position: relative; box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--c); }
.plan .tag { position: absolute; top: -13px; right: 50%; transform: translateX(50%); background: var(--c); color: #fff; padding: 2px 16px; border-radius: 20px; font-size: 13px; }
.plan h2 { margin: 0; font-size: 21px; }
.plan .price { font-size: 18px; margin: 6px 0 12px; color: var(--muted); }
.plan .price span { font-size: 42px; font-weight: 700; color: var(--ink); }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; color: var(--muted); }
.plan li { padding: 4px 0; }
.plan .btn { width: 100%; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: center; color: var(--muted); }
.steps div { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.steps b { display: block; font-size: 24px; color: var(--c); }

/* ===== المحرر: قائمة جانبية + أقسام ===== */
.view.editor { max-width: 1320px; padding: 22px 20px 60px; }
.shell { display: grid; grid-template-columns: 270px 1fr; gap: 22px; align-items: start; }
.side { position: sticky; top: 76px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: var(--shadow); }
#nav { display: flex; flex-direction: column; gap: 3px; }
.nav-i { display: flex; align-items: center; gap: 10px; width: 100%; text-align: right; background: none; border: 0; padding: 10px 12px; border-radius: 11px; font: inherit; color: var(--ink); cursor: pointer; transition: background .15s; }
.nav-i:hover { background: var(--soft2); }
.nav-i .n { width: 26px; height: 26px; flex: none; border-radius: 50%; background: #eef1f4; color: var(--muted); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.nav-i .t { flex: 1; }
.nav-i .ok { color: var(--good); font-weight: 700; opacity: 0; }
.nav-i.done .ok { opacity: 1; }
.nav-i.done .n { background: #e3f2ea; color: var(--good); }
.nav-i.on { background: var(--soft); color: var(--c2); font-weight: 700; }
.nav-i.on .n { background: var(--c); color: #fff; }
.nav-i.final { margin-top: 8px; background: var(--c); color: #fff; font-weight: 700; }
.nav-i.final .n { background: rgba(255,255,255,.2); color: #fff; }
.nav-i.final:hover, .nav-i.final.on { background: var(--c2); color: #fff; }
.nav-i:disabled { opacity: .4; cursor: not-allowed; }
.side-foot { border-top: 1px solid var(--line); margin-top: 12px; padding: 12px 4px 2px; }
.mylink-l { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.mylink { display: flex; gap: 6px; }
.mylink input { margin: 0; direction: ltr; font-size: 12px; padding: 6px 8px; }
.save-state { font-size: 12.5px; color: var(--good); margin-top: 8px; min-height: 18px; }

.main { min-width: 0; }
.panel { display: none; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 30px; box-shadow: var(--shadow); }
.panel.on { display: block; animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.panel-head { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 22px; color: var(--ink); }
.panel-head h2 small { font-size: 14px; color: var(--muted); font-weight: 400; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
.panel-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.panel-foot .btn { min-width: 150px; }
.p-final { background: transparent; border: 0; box-shadow: none; padding: 0; }
.p-final .final-top { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 30px; box-shadow: var(--shadow); margin-bottom: 20px; }

/* الحقول */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.grid.three { grid-template-columns: 1fr 1.4fr 1fr; gap: 6px 10px; }
label { display: block; font-size: 14px; font-weight: 600; color: #46525e; margin-bottom: 12px; }
input, textarea, select { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-weight: 400; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--c); box-shadow: 0 0 0 3px #dcefeb; }
input:disabled, textarea:disabled, select:disabled { background: #f6f7f8; color: #9aa4ad; }
textarea { resize: vertical; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
label.check input { width: auto; margin: 0; accent-color: var(--c); }
.upload { font-size: 14px; font-weight: 600; color: #46525e; margin-bottom: 12px; }
.upload input { font-size: 13px; margin-top: 6px; }
.upload img { max-height: 70px; margin-top: 6px; border-radius: 8px; border: 1px solid var(--line); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.thumbs div { position: relative; }
.thumbs img { height: 70px; border-radius: 8px; border: 1px solid var(--line); }
.thumbs button { position: absolute; top: -6px; left: -6px; background: var(--bad); color: #fff; border: 0; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; line-height: 1; }
h3 { font-size: 16px; margin: 18px 0 8px; }

/* الاستيراد من مصمم الكشوف */
.import-box { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: var(--soft2); border: 1px dashed #bfdcd7; border-radius: var(--r); padding: 12px 16px; margin-bottom: 18px; }
.import-box small { display: block; color: var(--muted); font-size: 13px; }
.file-btn { cursor: pointer; margin: 0; }
.import-state { width: 100%; font-size: 13.5px; color: var(--good); }
.import-state:empty { display: none; }
.import-state button { background: none; border: 0; color: var(--bad); cursor: pointer; font: inherit; text-decoration: underline; }

.imp-sum { background: #fff; border: 1px solid #d8ebe7; border-radius: 12px; padding: 12px 14px; color: var(--ink); margin-top: 6px; }
.imp-sum ul { margin: 8px 0; padding: 0 18px 0 0; }
.imp-sum li { margin-bottom: 4px; }
.imp-sum details summary { cursor: pointer; color: var(--c2); font-weight: 600; }
.imp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
.imp-table th { background: var(--soft); color: var(--c2); padding: 5px; }
.imp-table td { border-top: 1px solid var(--line); padding: 5px; vertical-align: top; }
.src-badge { flex: none; background: #e3f2ea; color: var(--good); border-radius: 20px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; }

/* نوع الملف */
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.track { display: block; border: 1.5px solid var(--line); border-radius: 16px; padding: 20px; cursor: pointer; margin: 0; background: #fff; font-weight: 400; transition: border-color .15s, background .15s; }
.track:hover { border-color: #bfdcd7; }
.track input { display: none; }
.track .ic { font-size: 30px; display: block; margin-bottom: 4px; }
.track b { font-size: 18px; color: var(--ink); }
.track small { display: block; color: var(--muted); margin-top: 6px; font-size: 14px; line-height: 1.7; }
.track:has(input:checked) { border-color: var(--c); background: var(--soft2); box-shadow: 0 0 0 3px #dcefeb; }

/* المساعدة والاقتراحات */
.assist { background: linear-gradient(135deg, #f1f8f6, #f3f6fb); border: 1px solid #d8ebe7; border-radius: var(--r); padding: 14px 16px; margin-bottom: 18px; }
.assist-text { font-size: 14.5px; margin-bottom: 10px; }
.assist-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.assist .hint { margin: 8px 0 0; }
.assist .hint:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 16px; }
.chips:empty { display: none; }
[data-chips="goals"] { margin-top: 10px; }
.chips .lbl { font-size: 12.5px; color: var(--muted); width: 100%; }
.chip { background: #fff; border: 1.5px dashed #c8d3dc; color: #4b5763; border-radius: 20px; padding: 5px 13px; font: inherit; font-size: 13.5px; cursor: pointer; text-align: right; line-height: 1.55; transition: all .15s; }
.chip:hover { border-style: solid; border-color: var(--c); color: var(--c2); background: var(--soft2); }
.chip.ai { border-color: #c9bfe6; background: #faf8ff; }
.chip.ai::before { content: "✨ "; }
.chip.more { border: 0; background: none; color: var(--c); font-weight: 600; text-decoration: underline; }

/* أهداف الإداري */
.goal-head, .goal { display: grid; grid-template-columns: 1fr 72px 72px 190px 32px; gap: 8px; align-items: start; }
.goal { margin-bottom: 8px; }
.goal-head { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.goal textarea, .goal input { margin: 0; }
.goal input.num { text-align: center; padding: 10px 4px; }
.goal .rm { background: none; border: 0; color: var(--bad); font-size: 22px; cursor: pointer; padding: 6px; }
.goal-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.goal-check { font-size: 13.5px; font-weight: 600; }
.goal-check.ok { color: var(--good); } .goal-check.bad { color: var(--warn); }
.bank-search input { margin: 4px 0 8px; }

/* عناصر المعلم */
.el { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; background: #fbfcfd; }
.el > summary { cursor: pointer; padding: 13px 16px; font-weight: 700; display: flex; gap: 10px; align-items: center; list-style: none; }
.el > summary::-webkit-details-marker { display: none; }
.el > summary::before { content: "◂"; color: var(--c); transition: transform .2s; }
.el[open] > summary::before { transform: rotate(-90deg); }
.el[open] { background: #fff; box-shadow: var(--shadow); }
.el .w { background: var(--soft); color: var(--c2); border-radius: 20px; padding: 1px 10px; font-size: 12.5px; font-weight: 600; }
.el .cnt { margin-inline-start: auto; font-size: 13px; color: var(--muted); font-weight: 500; }
.el .cnt.has { color: var(--good); font-weight: 600; }
.el-body { padding: 0 16px 14px; }
.rep { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.rep-top { display: flex; gap: 8px; align-items: center; }
.rep-top input { font-weight: 600; margin: 0; }
.rep .grid { margin-top: 8px; align-items: start; }
.rep textarea, .rep input { margin-top: 0; }
.rep .rm { background: none; border: 0; color: var(--bad); font-size: 22px; cursor: pointer; }
.rep .thumbs img { height: 54px; }
.rep .upload { margin: 6px 0 0; font-weight: 500; font-size: 13px; }

/* الجدارات وجدول الحصص */
.comp { background: #fbfcfd; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.comp b { color: var(--c2); } .comp small { display: block; color: var(--muted); margin: 2px 0 8px; }
.comp textarea { margin: 0; }
.sched-grid { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 13px; }
.sched-grid th { background: var(--soft); color: var(--c2); padding: 6px; border-radius: 8px; font-weight: 600; }
.sched-grid input { margin: 0; padding: 8px 4px; font-size: 13px; text-align: center; border-radius: 8px; }

/* الشكل والتخصيص */
.themes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.theme { border: 2px solid transparent; border-radius: 14px; padding: 6px; cursor: pointer; text-align: center; background: #f4f6f8; transition: border-color .15s; }
.theme:hover { border-color: #cfe3df; }
.theme.on { border-color: var(--c); background: #fff; box-shadow: 0 0 0 3px #dcefeb; }
.theme .mini { width: 100%; aspect-ratio: 210/297; overflow: hidden; border-radius: 8px; position: relative; }
.theme .mini .pf-page { transform-origin: top right; position: absolute; top: 0; right: 0; }
.theme span { display: block; font-weight: 600; font-size: 13.5px; margin-top: 6px; }
.customize { margin-top: 18px; background: var(--soft2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; }
.cz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.cz-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0; }
.cz-l { font-weight: 600; font-size: 14px; color: #46525e; min-width: 90px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #cfd6dc; cursor: pointer; padding: 0; }
.swatches button.on { box-shadow: 0 0 0 2.5px var(--ink); }
.swatches .auto { width: auto; border-radius: 16px; padding: 0 12px; background: #fff; font: inherit; font-size: 13px; }
.swatches input[type=color] { width: 36px; height: 32px; padding: 0; border: 0; background: none; margin: 0; cursor: pointer; }
.sizes { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.sizes button { border: 0; background: #fff; padding: 6px 16px; font: inherit; cursor: pointer; }
.sizes button.on { background: var(--c); color: #fff; }

/* جهّز ملفي */
.summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 18px; }
.sum-i { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fbfcfd; cursor: pointer; }
.sum-i:hover { border-color: #cfe3df; }
.sum-i .ic { font-size: 18px; line-height: 1.4; }
.sum-i b { display: block; font-size: 14.5px; }
.sum-i small { color: var(--muted); font-size: 13px; }
.sum-i.ok .ic { color: var(--good); } .sum-i.warn .ic { color: var(--warn); } .sum-i.bad .ic { color: var(--bad); }
.actions { text-align: center; margin: 6px 0 4px; }
.actions .muted { display: block; margin-top: 8px; font-size: 14px; }
#result { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.result-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.result-bar h3 { margin: 0 0 0 auto; color: var(--good); font-size: 19px; }

/* المعاينة */
.pages { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 0 0 40px; }
.pages:empty { display: none; }
.pages .pf-page { box-shadow: 0 6px 24px rgba(20, 40, 60, .12); }
.pages[contenteditable="true"]:focus { outline: none; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #27323d; color: #fff; padding: 12px 22px; border-radius: 12px; z-index: 50; max-width: 90vw; box-shadow: 0 8px 30px rgba(0,0,0,.18); }
.loading { position: fixed; inset: 0; background: rgba(243, 245, 247, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 40; text-align: center; font-size: 18px; color: var(--c2); }
.spinner { width: 48px; height: 48px; border: 5px solid #d8ebe7; border-top-color: var(--c); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* إظهار حسب المسار */
#form[data-mode="teacher"] [data-track="admin"], #form[data-mode="admin"] [data-track="teacher"] { display: none !important; }
#form:not([data-mode]) [data-track] { display: none !important; }

/* الجوال: القائمة تتحول إلى شريط أعلى الصفحة */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .shell > * { min-width: 0; }
  .view.editor { padding: 12px 10px 40px; }
  .side { position: sticky; top: 58px; z-index: 10; padding: 8px; border-radius: 14px; }
  #nav { flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .nav-i { width: auto; white-space: nowrap; padding: 8px 10px; }
  .nav-i.final { margin-top: 0; }
  .side-foot { display: none; }
  .panel { padding: 18px; }
  .grid, .grid.three, .tracks, .plans, .cz-grid { grid-template-columns: 1fr; }
  .themes { grid-template-columns: 1fr 1fr 1fr; }
  .goal-head { display: none; }
  .goal { grid-template-columns: 1fr 1fr 32px; }
  .goal textarea { grid-column: 1 / -1; }
  .hero h1 { font-size: 26px; }
  .pages { zoom: .45; }
  .panel-foot .btn { min-width: 0; flex: 1; }
}

/* الطباعة: صفحات الملف فقط */
@page { size: A4; margin: 0; }
@media print {
  body { background: #fff; }
  .no-print, .topbar, .side, .panel-foot, .final-top, #toast, #loading, .panel:not(.p-final), #v-home, #v-pay { display: none !important; }
  .view.editor, .shell, .main, .p-final { display: block !important; padding: 0 !important; margin: 0 !important; max-width: none !important; border: 0 !important; box-shadow: none !important; background: none !important; }
  .pages { display: block; padding: 0; gap: 0; zoom: 1 !important; }
  .pages .pf-page { box-shadow: none; margin: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* المعاينة المجانية */
.pf-page.pv::after { content: "معاينة"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 800 110pt Tajawal, sans-serif; color: rgba(0, 0, 0, .07); transform: rotate(-28deg); pointer-events: none; z-index: 60; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0;
  background: #fff8e6; border: 1px solid #f0d58a; border-radius: 14px; padding: 12px 16px; }
.pv-bar span { color: #6b5a2a; }
body.is-preview #result { display: none !important; }
#preview { margin-left: 8px; }
.hero .btn.big { margin-top: 10px; }
.small { font-size: 13px; }
.pay-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.pp { display: flex; flex-direction: column; gap: 4px; border: 2px solid #e2e7ec; border-radius: 14px; padding: 14px; cursor: pointer; background: #fff; }
.pp input { display: none; } .pp span { color: #6b7783; font-size: 14px; }
.pp.on { border-color: var(--c); background: #f1f8f6; }
@media print { body.is-preview .pages { display: none !important; } }
.usage-note { background: #eef6ff; border: 1px dashed #9cc3e8; border-radius: 10px; padding: 8px 12px; font-size: 13px; color: #2b4a66; }
.code-box { background: #f1f8f6; border: 1px solid #cfe5e0; border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.code-row { display: flex; gap: 8px; margin: 8px 0 4px; } .code-row input { flex: 1; }
.home-code { max-width: 460px; margin: 18px auto 0; text-align: right; }

/* ===== الصفحة الرئيسية ===== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* ثلاث لوحات ألوان: الافتراضية زمرّدي وذهبي */
body.lp-body { --band: #0b4a45; --band2: #0f6359; --on-band: #e6f3ef; --accent: #f5b83d; --on-accent: #2a1c00;
  --paper: #f3f7f5; --ink2: #12302c; --tint: #e6f3ef; --tint-line: #7dbcae; --tint-ink: #0b4a45; }
body.lp-body.pal-b { --band: #241f5e; --band2: #332b80; --on-band: #ecebff; --accent: #ff6f9f; --on-accent: #fff;
  --paper: #f6f5fc; --ink2: #1d1a4a; --tint: #ecebfb; --tint-line: #a7a1e0; --tint-ink: #241f5e; }
body.lp-body.pal-c { --band: #3c1f66; --band2: #5a2f91; --on-band: #f2ecff; --accent: #34d399; --on-accent: #062b1d;
  --paper: #f7f5fb; --ink2: #2a1650; --tint: #f0eafa; --tint-line: #b49ad8; --tint-ink: #3c1f66; }
.lp { max-width: none; padding: 0 0 60px; background: var(--paper); overflow-x: clip; font-family: "IBM Plex Sans Arabic", sans-serif; }
.lp-wrap { max-width: 1120px; margin: 0 auto; padding-left: 22px; padding-right: 22px; }
.lp h1, .lp h2, .lp h3 { font-family: "Readex Pro", "IBM Plex Sans Arabic", sans-serif; font-weight: 700; letter-spacing: 0; }
/* الشريط العلوي الملوّن بنقش هندسي خفيف (نجمة ثمانية) */
.lp-band { color: var(--on-band); position: relative;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1.2'%3E%3Crect x='22' y='22' width='28' height='28'/%3E%3Crect x='22' y='22' width='28' height='28' transform='rotate(45 36 36)'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(1100px 520px at 15% 30%, var(--band2), transparent 70%), var(--band); }
.lp-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 70px; }
.lp-copy h1 { font-size: 42px; line-height: 1.5; margin: 0 0 18px; color: #fff; }
.lp-copy > p { font-size: 18px; color: var(--on-band); opacity: .86; margin: 0 0 30px; max-width: 34em; }
.lp-cta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.lp .btn { background: var(--band); color: #fff; }
.lp .btn:hover { background: var(--band2); }
.lp-cta .btn, .lp .plan.featured .btn { background: var(--accent); color: var(--on-accent); font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.lp-cta .btn:hover, .lp .plan.featured .btn:hover { filter: brightness(1.06); background: var(--accent); }
.lp-link { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 7px; }
.lp-facts { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14.5px; color: var(--on-band); opacity: .9; }
.lp-facts li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-left: 7px; }
.lp-stack { position: relative; height: 480px; }
.lp-pg { position: absolute; width: 272px; aspect-ratio: 210 / 297; overflow: hidden; border-radius: 6px; background: #fff;
  box-shadow: 0 3px 6px rgba(0,0,0,.2), 0 28px 60px rgba(0,0,0,.35); }
.lp-pg .pf-page { transform-origin: top right; position: absolute; top: 0; right: 0; }
.lp-pg.p2 { right: 4%; top: 40px; transform: rotate(5deg); z-index: 1; }
.lp-pg.p1 { right: 30%; top: 12px; transform: rotate(-1.5deg); z-index: 2; }
.lp-pg.p0 { right: 53%; top: 62px; transform: rotate(-7deg); z-index: 3; }
.lp-body { background: var(--paper); }
.lp-body .topbar { background: var(--band); border-bottom: 1px solid rgba(255,255,255,.08); box-shadow: none; }
.lp-body .brand { color: #fff; } .lp-body .brand b { color: var(--accent); }
/* الاختيار */
.lp-start { padding-top: 60px; }
.lp-start h2, .lp-steps h2 { font-size: 30px; margin: 0 0 8px; text-align: center; color: var(--ink2); }
.lp-sub { text-align: center; color: var(--muted); margin: 0 0 30px; }
.lp-choice { display: grid; grid-template-columns: 2fr auto 1fr; gap: 22px; align-items: stretch; }
.lp-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lp .plan { display: flex; flex-direction: column; border-radius: 20px; border: 1px solid #e3e8e6; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.lp .plan ul { flex: 1; }
.lp .plan h3 { margin: 0; font-size: 21px; color: var(--ink2); }
.lp .plan .price span { color: var(--ink2); font-family: "Readex Pro", sans-serif; }
.lp .plan.featured { background: var(--band); border: 0; color: var(--on-band); box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.lp .plan.featured h3, .lp .plan.featured .price span { color: #fff; }
.lp .plan.featured .price, .lp .plan.featured ul { color: var(--on-band); opacity: .9; }
.lp .plan.featured .tag { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.lp .plan:not(.featured) .btn { background: #fff; color: var(--ink2); box-shadow: inset 0 0 0 1.5px #cfd8d5; }
.lp .plan:not(.featured) .btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink2); }
.lp-or { display: flex; align-items: center; justify-content: center; position: relative; }
.lp-or::before { content: ""; position: absolute; top: 8%; bottom: 8%; width: 1px; background: #d9e0dd; }
.lp-or span { position: relative; background: var(--paper); color: var(--muted); padding: 6px 0; }
.lp-code { background: var(--tint); border: 2px dashed var(--tint-line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.lp-code h3 { margin: 0; font-size: 21px; color: var(--tint-ink); display: flex; align-items: center; gap: 10px; }
.lp-code h3::before { content: ""; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a1c00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='M10.8 12.2 20 3M17 6l3 3M15 8l2 2'/%3E%3C/svg%3E") center / 18px no-repeat; }
.lp-code p { margin: 0 0 4px; color: var(--muted); font-size: 14.5px; }
.lp-code input { background: #fff; }
.lp-code .btn { background: var(--tint-ink); }
.lp-code .btn:hover { background: var(--tint-ink); filter: brightness(1.1); }
.lp-code small { min-height: 1.5em; color: var(--bad); }
.lp-code .lp-fine { margin-top: auto; font-size: 13px; color: var(--muted); }
/* بعد الدخول */
.lp-steps { padding-top: 56px; }
.lp-steps ol { list-style: none; counter-reset: s; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-steps li { counter-increment: s; background: #fff; border: 1px solid #e3e8e6; border-radius: 18px; padding: 22px; }
.lp-steps li::before { content: counter(s, arabic-indic); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--band); color: var(--accent); font-weight: 700; font-family: "Readex Pro", sans-serif; margin-bottom: 10px; }
.lp-steps li b { display: block; font-size: 17px; margin-bottom: 4px; color: var(--ink2); font-family: "Readex Pro", sans-serif; }
.lp-steps li span { color: var(--muted); font-size: 14.5px; }
.lp-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 24px; }
:focus-visible { outline: 3px solid var(--accent, #9fd0c7); outline-offset: 2px; }
@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; padding-top: 34px; padding-bottom: 40px; }
  .lp-copy h1 { font-size: 30px; }
  .lp-stack { height: 330px; } .lp-pg { width: 46%; } .lp-pg.p0 { right: 50%; } .lp-pg.p1 { right: 27%; } .lp-pg.p2 { right: 4%; }
  .lp-choice { grid-template-columns: 1fr; }
  .lp-or { height: 30px; } .lp-or::before { top: 50%; bottom: auto; left: 10%; right: 10%; width: auto; height: 1px; }
  .lp-plans, .lp-steps ol { grid-template-columns: 1fr; }
}

/* الحساب في الشريط العلوي */
.topbar { display: flex; align-items: center; gap: 14px; }
.acct { margin-right: auto; display: flex; align-items: center; }
.acct-in { font: inherit; font-weight: 700; border: 1.5px solid currentColor; background: none; color: var(--c); border-radius: 10px; padding: 6px 16px; cursor: pointer; }
.acct-me { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.acct-me a { font-weight: 700; text-decoration: none; }
.acct-me small { color: var(--muted); direction: ltr; }
.acct-me button { font: inherit; font-size: 13px; background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; }
.lp-body .acct-in { color: #fff; border-color: rgba(255,255,255,.55); }
.lp-body .acct-me a { color: var(--accent); } .lp-body .acct-me small, .lp-body .acct-me button { color: rgba(255,255,255,.75); }
@media (max-width: 620px) { .acct-me small { display: none; } }
/* نافذة الدخول */
.login-ov { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 30, 28, .55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; }
.login-box { position: relative; width: min(420px, 100%); background: #fff; border-radius: 20px; padding: 28px 26px 22px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.login-box h2 { margin: 0 0 6px; font-family: "Readex Pro", sans-serif; font-size: 22px; color: #12302c; }
.login-box p { margin: 0 0 16px; font-size: 14.5px; }
.login-box input { width: 100%; margin-bottom: 12px; font-size: 16px; }
.login-box .btn { width: 100%; background: #0b4a45; }
.login-box .otp { text-align: center; font-size: 30px; letter-spacing: 12px; font-weight: 700; padding: 10px; }
.login-x { position: absolute; top: 10px; left: 12px; border: 0; background: none; font-size: 24px; color: var(--muted); cursor: pointer; }
.login-alt { display: flex; justify-content: space-between; margin-top: 12px; }
.login-alt button { font: inherit; font-size: 14px; background: none; border: 0; color: var(--c); cursor: pointer; text-decoration: underline; }
.login-alt button:disabled { color: var(--muted); text-decoration: none; cursor: default; }
#login-msg { display: block; min-height: 1.4em; margin-top: 10px; color: var(--bad); font-size: 14px; }
#login-msg.ok { color: var(--c); }
/* ملفاتي */
.mine-head { display: flex; align-items: center; justify-content: space-between; }
.mine-head h1 { font-family: "Readex Pro", sans-serif; margin: 0; }
.mine-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.mine-i { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; text-decoration: none; color: inherit; }
.mine-i:hover { border-color: var(--c); }
.mine-i b { display: block; font-size: 16.5px; } .mine-i small { color: var(--muted); font-size: 13.5px; }
.mine-m { text-align: left; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mine-go { color: var(--c); font-weight: 700; }
.pill { display: inline-block; font-size: 12.5px; padding: 1px 10px; border-radius: 20px; background: #eef1f3; color: #55606b; }
.pill.ok { background: #e3f4ec; color: #22744a; } .pill.warn { background: #fff3dc; color: #8a5a00; }
.mine-empty { text-align: center; background: #fff; border: 1px dashed var(--line); border-radius: 16px; padding: 30px; }
.mylink-l.sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
@media (max-width: 620px) { .mine-i { grid-template-columns: 1fr; } .mine-m { align-items: flex-start; text-align: right; } }

/* خزنة الجهاز */
.vault { background: #f1f8f6; border: 1px solid #cfe5e0; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.vault-h { font-weight: 700; font-size: 14px; color: #0b4a45; }
.vault-s { font-size: 12.5px; color: var(--muted); } .vault-s.warn { color: #9a5b00; font-weight: 600; }
.vault .btn.sm { width: 100%; }
.vault-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.lnk { font: inherit; font-size: 12.5px; background: none; border: 0; padding: 0; color: var(--c); text-decoration: underline; cursor: pointer; }
.lnk.danger { color: var(--bad); }
.nodata { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; background: #fff7e6; border: 1px solid #f0d58a; border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; }
.nodata span { color: #6b5a2a; font-size: 14px; flex: 1; min-width: 220px; }
.vault-modal { width: min(560px, 100%); max-height: 92vh; overflow: auto; }
.vault-modal p { font-size: 14.5px; line-height: 1.85; }
.vm-warn { background: #fff7e6; border: 1px solid #f0d58a; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.vm-warn ul { margin: 6px 0 0; padding-right: 18px; } .vm-warn li { margin-bottom: 3px; }
.vm-ok { background: #e6f3ef; border-radius: 12px; padding: 10px 14px; }
.vault-modal label.check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 12px; font-weight: 600; font-size: 14.5px; }
.vault-modal label.check input { width: auto; margin-top: 6px; }

/* ثلاث باقات + شريط الكود تحتها */
.lp-choice { grid-template-columns: 1fr; }
.lp-plans { grid-template-columns: repeat(3, 1fr); }
.lp-or { height: 34px; } .lp-or::before { top: 50%; bottom: auto; left: 20%; right: 20%; width: auto; height: 1px; }
.lp-code { display: grid; grid-template-columns: 1.2fr 1fr auto; grid-template-areas: "h in go" "p msg msg" "fine fine fine"; align-items: center; gap: 8px 14px; }
.lp-code h3 { grid-area: h; } .lp-code > p:not(.lp-fine) { grid-area: p; margin: 0; } .lp-code input { grid-area: in; margin: 0; }
.lp-code .btn { grid-area: go; } .lp-code small { grid-area: msg; } .lp-code .lp-fine { grid-area: fine; margin: 0; }
.lp-cta .lp-link + .lp-link { margin-right: -6px; }
.free-lock { background: #eef6ff; border-color: #b8d4f0; } .free-lock span { color: #2b4a66; }
@media (max-width: 900px) { .lp-plans { grid-template-columns: 1fr; } .lp-code { grid-template-columns: 1fr; grid-template-areas: "h" "p" "in" "go" "msg" "fine"; } }

.logo-pick .seg { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 6px; font-size: 14px; }
.logo-pick .seg label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.logo-pick .seg input { width: auto; margin: 0; accent-color: var(--c); }
.logo-pick img { max-height: 60px; object-fit: contain; }

.free-note { background: #eef6ff; border: 1px solid #b8d4f0; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; color: #2b4a66; }
.theme.locked { opacity: .55; } .theme.locked:hover { opacity: .8; }
.customize.off { opacity: .5; pointer-events: none; }

.up-box { text-align: center; }
.up-badge { display: inline-block; background: #fff3d6; color: #7a5200; font-size: 12.5px; font-weight: 700; border-radius: 20px; padding: 2px 12px; margin-bottom: 8px; }
.up-list { list-style: none; padding: 0; margin: 4px 0 12px; text-align: right; display: grid; gap: 4px; font-size: 14.5px; }
.up-list li::before { content: "✓"; color: var(--c); font-weight: 700; margin-left: 8px; }

.qr-field { display: flex; flex-direction: column; gap: 4px; }
.qr-prev { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--good); min-height: 0; }
.qr-prev svg { width: 54px; height: 54px; background: #fff; padding: 3px; border: 1px solid var(--line); border-radius: 6px; }
.qr-bad { color: var(--bad); }

.theme-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.theme-cats button { font: inherit; font-size: 13.5px; border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 4px 12px; cursor: pointer; }
.theme-cats button small { color: var(--muted); }
.theme-cats button.on { background: var(--c); border-color: var(--c); color: #fff; } .theme-cats button.on small { color: #e6f3ef; }

/* النسخة المجانية: الطباعة من المتصفح مباشرة لا تُخرج الملف إلا عبر زر التحميل (مرة واحدة) */
.print-locked-msg { display: none; }
@media print {
  body.print-lock .pages, body.print-lock #pages { display: none !important; }
  body.print-lock .print-locked-msg { display: block !important; text-align: center; font: 700 20pt Tajawal, sans-serif; margin-top: 80mm; }
}

.custom-note { background: #f5f8ff; border: 1px dashed #b8c8ea; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 13.5px; color: #33415c; }
.theme.custom-up .mini.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed #b8c8ea; background: #f8faff; color: #33415c; }
.theme.custom-up .mini.add b { font-size: 34px; line-height: 1; color: var(--c); }
.theme.custom-up .mini.add small { font-size: 11.5px; text-align: center; padding: 0 6px; }

.ct-pick { border: 1px solid #e3e8ef; border-radius: 12px; padding: 12px 14px; margin: 10px 0 14px; background: #fbfcfd; }
.ct-pick .ct-h { display: block; font-weight: 700; margin-bottom: 6px; }
.ct-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 14px; margin: 4px 0; }
.ct-row label, .ct-vp label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.ct-vp { display: inline-flex; gap: 14px; }
.ct-row input { width: auto; margin: 0; accent-color: var(--c); }
.ct-prev { margin: 10px 0 4px; padding: 12px 16px; background: #fff; border: 1px dashed #d5dce6; border-radius: 10px; font-family: "Tajawal", sans-serif; }
.ct-prev .pf-cover-top { font-size: 13px; }
.ct-prev .pf-cover-top img { max-height: 54px; max-width: 80px; }

/* العرض بخصم */
.plan .price s { font-size: 20px; color: var(--muted); margin-left: 4px; }
.lp .plan.featured .price s { color: inherit; opacity: .7; }
.sale-badge { display: inline-block; background: #c08a2b; color: #fff; font-size: 13px; font-weight: 600; border-radius: 8px; padding: 2px 10px; margin-top: 4px; }

/* ===== لوحة الجاهزية والشواهد الذكية ===== */
.ready { background: linear-gradient(160deg, #173a36, #24574f); color: #e4f1ee; border-radius: 18px; padding: 20px 22px; margin-bottom: 16px; }
.rb-top { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.rb-ring { position: relative; width: 132px; height: 132px; flex: none; }
.rb-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rb-ring circle { fill: none; stroke-width: 10; }
.rb-ring .bg { stroke: rgba(255, 255, 255, .12); }
.rb-ring .fg { stroke: #8fe0c9; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.rb-ring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rb-ring b { font-size: 30px; line-height: 1.1; color: #fff; }
.rb-ring span { font-size: 12px; opacity: .8; }
.rb-stats { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 10px; }
.rb-stats > div { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); border-radius: 13px; padding: 10px 14px; position: relative; }
.rb-stats b { display: block; font-size: 24px; color: #fff; line-height: 1.3; font-variant-numeric: tabular-nums; }
.rb-stats span { font-size: 12.5px; opacity: .8; }
.rb-stats i { position: absolute; top: 9px; left: 10px; font-style: normal; font-size: 11px; color: #fff; padding: 0 8px; border-radius: 20px; }
.rb-tip { margin: 14px 0 12px; font-size: 14px; color: #cfe7e1; }
.rb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.rb-card { text-align: right; background: #fff; color: var(--ink); border: 0; border-radius: 12px; padding: 9px 11px 10px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 5px; border-top: 3px solid transparent; transition: transform .12s; }
.rb-card:hover { transform: translateY(-2px); }
.rb-card:focus-visible { outline: 3px solid #8fe0c9; }
.rb-card.need { border-top-color: #e39b3a; }
.rb-h { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; font-weight: 700; line-height: 1.5; }
.rb-h .w { background: var(--soft); color: var(--c2); border-radius: 20px; padding: 0 7px; font-size: 11.5px; flex: none; }
.rb-m { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 11.5px; color: var(--muted); align-items: center; }
.rb-m .lv { color: #fff; border-radius: 20px; padding: 0 8px; margin-inline-start: auto; }
.rb-m .lv.none { background: #eef1f3; color: var(--muted); }
.rb-bar { height: 6px; background: #e8eef0; border-radius: 9px; overflow: hidden; }
.rb-bar i { display: block; height: 100%; background: var(--c); border-radius: 9px; }
.rb-card.need .rb-bar i { background: #e39b3a; }
.rb-card em { font-style: normal; font-size: 11.5px; color: #b8741d; font-weight: 600; }

.ev-tabs, .el-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.ev-tabs button, .el-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.ev-tabs button.on, .el-tabs button.on { color: var(--c); border-bottom-color: var(--c); }
.el-tabs { margin-top: -4px; }
.el .slv { color: #fff; border-radius: 20px; padding: 0 9px; font-size: 12px; font-weight: 600; }

/* السحب والإفلات */
.drop { border: 2px dashed #b7d3cd; background: #f4faf8; border-radius: 14px; padding: 18px; text-align: center; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; margin-bottom: 12px; transition: background .15s, border-color .15s, transform .15s; }
.drop b { font-size: 15.5px; color: var(--c2); }
.drop b::before { content: "⇪ "; }
.drop span { font-size: 13px; color: var(--muted); }
.drop:hover, .drop:focus-visible { background: #eaf5f2; border-color: var(--c); outline: none; }
.drop.over, .mini-drop.over { background: #dff1ec; border-color: var(--c); border-style: solid; transform: scale(1.01); }
.mini-drop { border: 1.5px dashed #cbdcd8; border-radius: 12px; padding: 8px 10px; cursor: pointer; background: #fff; }
.mini-drop > span { font-size: 13px; color: var(--muted); }
.thumbs .is-pdf img { outline: 2px solid #c0392b; outline-offset: -2px; }
.thumbs .is-pdf img { min-width: 54px; object-fit: cover; }
.pdf-tag { white-space: nowrap; position: absolute; bottom: 4px; right: 4px; background: #c0392b; color: #fff; font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 5px; text-decoration: none; }

/* معايير التحقق */
.crit { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.crit li { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; font-size: 14px; }
.crit li > span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #eef1f3; color: var(--muted); font-size: 12px; flex: none; }
.crit li.ok > span { background: var(--c); color: #fff; }
.crit li .lnk { margin-inline-start: auto; font-size: 13px; }

/* سلّم التقييم الذاتي */
.rubric { display: grid; gap: 7px; margin-bottom: 14px; }
.lvl { display: flex; gap: 12px; align-items: center; text-align: right; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; cursor: pointer; color: var(--ink); }
.lvl b { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--lc) 14%, #fff); color: var(--lc); font-size: 16px; flex: none; }
.lvl span { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.lvl strong { display: block; color: var(--ink); font-size: 14.5px; }
.lvl:hover { border-color: var(--lc); }
.lvl.on { border-color: var(--lc); background: color-mix(in srgb, var(--lc) 7%, #fff); box-shadow: 0 0 0 1px var(--lc); }
.lvl.on b { background: var(--lc); color: #fff; }
.na { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--muted); }

/* المراجعة المرحلية */
.rv-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rv { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
.rv th { background: #f5f8f9; color: var(--muted); font-weight: 600; padding: 9px 10px; text-align: right; font-size: 12.5px; white-space: nowrap; }
.rv td { padding: 8px 10px; border-top: 1px solid #eef1f3; vertical-align: middle; }
.rv td.g { font-weight: 600; }
.rv select, .rv input { padding: 5px 8px; font-size: 13px; width: 100%; }
.rv td:last-child { min-width: 220px; }
.rv-p { display: flex; align-items: center; gap: 6px; min-width: 110px; } .rv-p .rb-bar { flex: 1; }
.self-page { margin-top: 14px; background: #f5f8ff; border: 1px solid #d9e2f5; border-radius: 12px; padding: 10px 14px; font-size: 14px; }

@media (max-width: 760px) {
  .rb-stats { grid-template-columns: repeat(2, 1fr); }
  .rb-ring { width: 110px; height: 110px; } .rb-ring b { font-size: 24px; }
  .rb-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; padding-bottom: 6px; margin: 0 -6px; }
  .rb-card { flex: 0 0 62%; scroll-snap-align: start; }
  .ready { padding: 16px 14px; }
}
@media (prefers-reduced-motion: reduce) { .rb-ring .fg, .rb-card, .drop { transition: none; } }

/* رابط المدير */
.share-card { margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: linear-gradient(180deg, #fbfdfc, #f4f9f7); }
.sc-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.sc-head h3 { margin: 0 0 4px; font-size: 17px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sc-head p { margin: 0; color: var(--muted); font-size: 14px; }
.sc-ico { width: 44px; height: 44px; border-radius: 12px; background: #e9eef0; display: grid; place-items: center; font-size: 22px; flex: none; }
.sc-ico.on { background: var(--soft); }
.sc-st { font-size: 12px; font-weight: 600; border-radius: 20px; padding: 1px 10px; background: #eef1f3; color: var(--muted); }
.sc-st.on { background: #e1f3ea; color: var(--good); }
.sc-where { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; font-size: 14px; }
.sc-where label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.sc-where input { width: auto; margin: 0; accent-color: var(--c); }
.sc-pub { display: flex; flex-direction: column; gap: 10px; }
.sc-pin { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--muted); max-width: 260px; }
.sc-pin input { letter-spacing: 4px; }
.sc-link { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.sc-qr { width: 112px; height: 112px; background: #fff; border-radius: 10px; padding: 6px; border: 1px solid var(--line); flex: none; }
.sc-qr svg { width: 100%; height: 100%; }
.sc-l { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 10px; }
.sc-row { display: flex; gap: 6px; } .sc-row input { flex: 1; font-size: 13.5px; }
.sc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sc-stats div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.sc-stats b { display: block; font-size: 15px; } .sc-stats span { font-size: 12px; color: var(--muted); }
.sc-rv { margin-top: 14px; } .sc-rv h4 { margin: 0 0 8px; font-size: 14.5px; }
.sc-r { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; }
.sc-r > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.sc-r .lv { color: #fff; border-radius: 20px; padding: 0 9px; font-size: 12px; } .sc-r small { color: var(--muted); margin-inline-start: auto; }
.sc-r p { margin: 4px 0 0; font-size: 14px; white-space: pre-wrap; }
.sc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn.ghost.danger { color: var(--bad); box-shadow: inset 0 0 0 1.5px #ecc9c0; }
.sc-prog { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.sc-prog > div { flex: 1; height: 8px; background: #e6eeec; border-radius: 9px; overflow: hidden; }
.sc-prog i { display: block; height: 100%; width: 0; background: var(--c); transition: width .2s; }
@media (max-width: 760px) { .sc-stats { grid-template-columns: 1fr 1fr; } }

.free-days { background: #fff8ea; border: 1px solid #f0dcb0; color: #6b5212; border-radius: 12px; padding: 9px 14px; margin-bottom: 12px; font-size: 14px; }
.mine-empty.expired { text-align: center; } .mine-empty.expired h2 { margin: 0 0 8px; }

/* تصفّح ككتاب داخل الموقع */
.book-ov { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 40%, #f4f0ea 0%, #e9e4dc 70%); }
.bo-bar { display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: #173a36; color: #e4f1ee; }
.bo-bar > b { flex: 1; } .bo-act { flex: 1; display: flex; gap: 8px; justify-content: flex-end; }
.bo-nav { display: flex; align-items: center; gap: 10px; } #bo-count { min-width: 130px; text-align: center; font-size: 14px; }
.book-ov .ib { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.book-ov .ib:disabled { opacity: .3; cursor: default; }
.book-ov .vb { border: 1px solid rgba(255,255,255,.25); background: transparent; color: inherit; padding: 7px 14px; border-radius: 10px; cursor: pointer; font: inherit; }
.bo-stage { flex: 1; display: grid; place-items: center; overflow: hidden; min-height: 0; }
@media (max-width: 900px) { .bo-bar { flex-wrap: wrap; } .bo-bar > b { display: none; } }

/* تثبيت التطبيق */
.install { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 80; width: min(560px, calc(100% - 24px)); background: #173a36; color: #e4f1ee; border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; box-shadow: 0 14px 40px rgba(10, 30, 26, .35); }
.install img { border-radius: 11px; flex: none; }
.install div { flex: 1; display: flex; flex-direction: column; font-size: 13.5px; } .install b { color: #fff; font-size: 15px; }
.install .btn { background: #e0b65a; color: #2a210c; } .install .x { background: none; border: 0; color: #cfe3de; font-size: 22px; cursor: pointer; }
@media (display-mode: standalone) { .topbar { padding-top: max(12px, env(safe-area-inset-top)); } }

/* تحليل ملف قديم */
.rb-an { display: flex; gap: 12px; align-items: center; margin-top: 14px; border: 1.5px dashed rgba(255,255,255,.3); border-radius: 13px; padding: 10px 14px; cursor: pointer; transition: background .15s; }
.rb-an:hover, .rb-an:focus-visible, .rb-an.over { background: rgba(255,255,255,.08); outline: none; border-color: #8fe0c9; }
.rb-an .ic { font-size: 24px; } .rb-an div { display: flex; flex-direction: column; font-size: 13px; color: #cfe7e1; } .rb-an b { color: #fff; font-size: 14.5px; }
.an-box { background: #fff; border-radius: 18px; width: min(760px, 94vw); max-height: 88vh; overflow-y: auto; padding: 24px 26px; position: relative; }
.an-box h2 { margin: 0 0 10px; font-size: 20px; } .an-box h3 { margin: 18px 0 8px; font-size: 16px; }
.an-x { position: absolute; top: 12px; left: 14px; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--muted); }
.an-mock { background: #fff8ea; border: 1px solid #f0dcb0; color: #6b5212; border-radius: 10px; padding: 7px 12px; font-size: 13.5px; }
.an-sum { display: flex; gap: 16px; align-items: center; background: var(--soft2); border-radius: 14px; padding: 12px 16px; }
.an-big { text-align: center; flex: none; } .an-big b { display: block; font-size: 28px; color: var(--c); } .an-big span { font-size: 12px; color: var(--muted); }
.an-sum p { margin: 0; }
.an-ul { margin: 0; padding-inline-start: 20px; } .an-ul li { margin-bottom: 4px; }
.an-els { display: grid; gap: 8px; }
.an-el { border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; } .an-el.miss { border-color: #f0d3a8; background: #fffaf2; }
.an-h { display: flex; gap: 8px; align-items: center; } .an-h small { margin-inline-start: auto; color: var(--muted); }
.an-h span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: #fff; background: var(--good); flex: none; }
.an-el.miss .an-h span { background: #e39b3a; }
.an-el p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.an-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.sc-mgr { margin-top: 12px; } .sc-mgr label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--muted); }
