/* =========================================================
   كورساتك — نظام التصميم «الكوفي الحديث»
   حبر أخضر عميق، ورق عاجي، وذهب مُذهَّب. خطوط: Reem Kufi للعناوين،
   IBM Plex Sans Arabic للنصوص، Amiri للمقتطفات.
   ========================================================= */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* الألوان */
  --ink: #0a241b;
  --ink-2: #0d3327;
  --primary: #0e4d3a;
  --primary-dark: #0a3a2c;
  --primary-soft: #e7efe9;
  --accent: #c9a227;
  --accent-light: #e6cf7f;
  --accent-dark: #8c6d12;
  --accent-soft: #f6eed3;
  --green: #1d7a4c;
  --green-dark: #155c39;
  --green-soft: #e3f1e7;
  --red: #a8261d;
  --red-soft: #f8e9e6;
  --dark: #0a241b;
  --text: #1c2a24;
  --gray: #5d6a62;
  --light: #f4efe2;
  --paper: #f8f4ea;
  --surface: #fffdf8;
  --border: #e2d8bf;
  --rule: #cdbf9c;

  /* الشكل */
  --radius-sm: 3px;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 0 rgba(10, 36, 27, .04);
  --shadow: 0 10px 30px -12px rgba(10, 36, 27, .18);
  --shadow-lg: 0 30px 60px -24px rgba(10, 36, 27, .32);
  --ring: 0 0 0 3px rgba(201, 162, 39, .35);
  --nav-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* الخطوط */
  --font-head: 'Reem Kufi', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-serif: 'Amiri', 'Traditional Arabic', serif;

  /* زخرفة النجمة الثمانية (خاتم سليمان) */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23c9a227' stroke-width='1'%3E%3Crect x='26' y='26' width='36' height='36'/%3E%3Crect x='26' y='26' width='36' height='36' transform='rotate(45 44 44)'/%3E%3Ccircle cx='44' cy='44' r='6'/%3E%3Cpath d='M0 44h8M80 44h8M44 0v8M44 80v8'/%3E%3C/g%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > .footer { margin-top: auto; }
h1, h2, h3, h4 { color: var(--dark); line-height: 1.3; font-weight: 600; font-family: var(--font-head); }
img { max-width: 100%; }
a { text-decoration: none; color: inherit; transition: color .2s var(--ease); }
::selection { background: var(--accent); color: var(--ink); }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.skip-link { position: absolute; top: -60px; right: 16px; z-index: 200; background: var(--ink); color: var(--accent-light); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- الأزرار ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 24px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  font-family: inherit; line-height: 1.4; border: 1px solid transparent; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .arr { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(-5px); }
.btn-primary { background: var(--primary); color: var(--paper); border-color: var(--primary); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.btn-gold { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.btn-gold:hover { background: var(--accent-light); border-color: var(--accent-light); }
.btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.btn-green:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-outline { border-color: var(--rule); color: var(--dark); background: transparent; }
.btn-outline:hover { border-color: var(--dark); background: var(--dark); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--dark); }
.btn-ghost:hover { color: var(--accent-dark); }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { background: var(--accent-light); border-color: var(--accent-light); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #861d16; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-block { width: 100%; text-align: center; white-space: normal; }

/* ---------- شريط التنقل ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 244, 234, .9);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.navbar::after { content: ''; position: absolute; inset: auto 0 -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent); opacity: .55; }
.nav-inner { display: flex; align-items: center; gap: 36px; min-height: var(--nav-h); }
.logo { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: var(--dark); display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; letter-spacing: 0; }
.logo-icon { height: 40px; width: 40px; display: block; border-radius: var(--radius-sm); }
.cert-logo { height: 46px; width: auto; display: block; margin-left: 4px; }
.nav-menu { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex: 1; }
.nav-links { display: flex; gap: 6px; list-style: none; }
.nav-links a { position: relative; display: block; font-size: 15px; font-weight: 500; color: var(--gray); padding: 8px 12px; }
.nav-links a::after { content: ''; position: absolute; right: 12px; left: 12px; bottom: 2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.nav-links a:hover { color: var(--dark); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--dark); font-weight: 600; }
.nav-links a.active::after { transform: scaleX(1); height: 2px; }
.nav-auth { display: flex; align-items: center; gap: 10px; }
.nav-auth form { display: inline-flex; margin: 0; }
.nav-name { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text); padding: 4px 4px 4px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); }
.nav-name:hover { border-color: var(--accent); color: var(--dark); }
.nav-avatar { width: 30px; height: 30px; border-radius: 2px; background: var(--ink); color: var(--accent-light); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; font-family: var(--font-head); }
.nav-toggle { display: none; margin-inline-start: auto; width: 46px; height: 46px; border-radius: var(--radius-sm); border: 1px solid var(--rule); background: transparent; cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 6px; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--dark); transition: transform .3s var(--ease), opacity .2s; }
.navbar.open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.navbar.open .nav-toggle span:nth-child(2) { opacity: 0; }
.navbar.open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 900px) {
  :root { --nav-h: 66px; }
  .nav-inner { flex-wrap: wrap; gap: 0; }
  .logo { font-size: 23px; }
  .nav-toggle { display: inline-flex; }
  .nav-menu { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 14px; padding: 8px 0 22px; }
  .navbar.open .nav-menu { display: flex; animation: nav-drop .35s var(--ease); }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { padding: 14px 4px; font-size: 18px; font-family: var(--font-head); border-bottom: 1px solid var(--border); }
  .nav-links a::after { display: none; }
  .nav-links a.active { color: var(--accent-dark); }
  .nav-auth { flex-wrap: wrap; padding-top: 6px; }
  .nav-auth > * { flex: 1; }
  .nav-auth .btn { width: 100%; }
}
@keyframes nav-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- رسائل التنبيه ---------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--radius-sm); margin: 18px 0 0; font-size: 14.5px; font-weight: 500; border: 1px solid transparent; border-inline-start-width: 3px; }
.flash-success { background: var(--green-soft); color: #134a2f; border-color: #b9dcc5; border-inline-start-color: var(--green); }
.flash-error { background: var(--red-soft); color: #7a1c15; border-color: #ecc8c2; border-inline-start-color: var(--red); }
.flash-info { background: #eef4fb; color: #1d3f66; border-color: #c9dbef; border-inline-start-color: #2f6db5; }
.flash a { text-decoration: underline; }

/* ---------- عناصر تحريرية مشتركة ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; letter-spacing: .4px; color: var(--accent-dark); }
.eyebrow::before { content: ''; width: 36px; height: 1px; background: currentColor; }
.ornament { display: flex; align-items: center; gap: 14px; color: var(--accent); }
.ornament::before, .ornament::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor); }
.ornament::after { background: linear-gradient(270deg, transparent, currentColor); }
.ornament i { width: 9px; height: 9px; border: 1px solid currentColor; transform: rotate(45deg); }

/* ---------- الواجهة الرئيسية (Hero) ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #c9d3cc; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: var(--pattern); background-size: 88px; opacity: .09; z-index: -1; -webkit-mask-image: radial-gradient(120% 90% at 0% 0%, #000 20%, transparent 75%); mask-image: radial-gradient(120% 90% at 0% 0%, #000 20%, transparent 75%); }
.hero::after { content: ''; position: absolute; width: 760px; height: 760px; left: -260px; top: -320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(201, 162, 39, .16), transparent); z-index: -1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 64px; align-items: end; padding-top: 88px; padding-bottom: 64px; }
.hero .eyebrow { color: var(--accent-light); }
.hero-title { color: #f6f1e3; font-size: clamp(42px, 6.4vw, 88px); font-weight: 600; line-height: 1.12; margin: 22px 0 26px; letter-spacing: -.5px; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; animation: rise 1s var(--ease) both; }
.hero-title .line:nth-child(2) > span { animation-delay: .12s; }
.hero-title .line:nth-child(3) > span { animation-delay: .24s; }
.hero-title em { font-style: normal; color: var(--accent); position: relative; }
.hero-title em::after { content: ''; position: absolute; right: 0; left: 0; bottom: .02em; height: .08em; background: var(--accent); transform-origin: right; animation: draw 1s .9s var(--ease) both; }
.hero-lead { font-size: 18.5px; color: #b7c4bc; max-width: 520px; margin-bottom: 34px; animation: fade-up .9s .35s var(--ease) both; }
.hero-search { display: flex; align-items: center; gap: 12px; max-width: 560px; border-bottom: 1px solid rgba(230, 207, 127, .45); padding: 4px 0 10px; transition: border-color .3s; animation: fade-up .9s .45s var(--ease) both; }
.hero-search:focus-within { border-color: var(--accent); }
.hero-search .ico { color: var(--accent); display: inline-flex; }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-family: inherit; font-size: 18px; padding: 10px 0; color: #f6f1e3; }
.hero-search input::placeholder { color: #7f9187; }
.hero-search input:focus-visible { outline: none; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 30px; animation: fade-up .9s .55s var(--ease) both; }
.hero .btn-ghost { color: #e8e1cc; padding-inline: 0; }
.hero .btn-ghost:hover { color: var(--accent-light); }

/* فهرس المختارات */
.hero-index { position: relative; background: rgba(246, 241, 227, .03); border: 1px solid rgba(230, 207, 127, .22); padding: 26px 28px 18px; animation: fade-up 1s .5s var(--ease) both; }
.hero-index::before { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(230, 207, 127, .1); pointer-events: none; }
.index-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid rgba(230, 207, 127, .3); }
.index-head b { font-family: var(--font-head); color: var(--accent-light); font-size: 22px; font-weight: 600; }
.index-head span { font-size: 12.5px; color: #8fa197; }
.hero-index ol { list-style: none; }
.hero-index li + li { border-top: 1px solid rgba(246, 241, 227, .08); }
.hero-index li a { position: relative; z-index: 1; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 14px 0; color: #e8e1cc; }
.hero-index .num { font-family: var(--font-head); font-size: 15px; color: var(--accent); }
.hero-index .t { font-size: 15.5px; font-weight: 500; line-height: 1.5; }
.hero-index .t small { display: block; font-size: 12.5px; color: #8fa197; font-weight: 400; }
.hero-index .arr { color: var(--accent); opacity: 0; transform: translateX(8px); transition: opacity .3s, transform .3s var(--ease); }
.hero-index li a:hover .t { color: #fff; }
.hero-index li a:hover .arr { opacity: 1; transform: none; }
.index-foot { display: flex; justify-content: space-between; padding-top: 14px; margin-top: 4px; border-top: 1px solid rgba(230, 207, 127, .3); font-size: 14px; color: var(--accent-light); font-weight: 500; }
.index-foot:hover { color: #fff; }

/* شريط الأرقام */
.hero-ledger { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(230, 207, 127, .22); }
.hero-ledger div { padding: 22px 0 26px; padding-inline-end: 18px; display: flex; flex-direction: column; gap: 2px; }
.hero-ledger div + div { border-inline-start: 1px solid rgba(230, 207, 127, .14); padding-inline-start: 24px; }
.hero-ledger b { font-family: var(--font-head); font-size: clamp(24px, 2.6vw, 32px); font-weight: 500; color: #f6f1e3; line-height: 1.2; }
.hero-ledger span { font-size: 13.5px; color: #8fa197; }

@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; padding-top: 56px; padding-bottom: 44px; }
  .hero-ledger { grid-template-columns: 1fr 1fr; }
  .hero-ledger div:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .hero-ledger div:nth-child(n+3) { border-top: 1px solid rgba(230, 207, 127, .14); }
}
@media (max-width: 520px) {
  .hero-index { padding: 20px 18px 14px; }
  .hero-lead { font-size: 16.5px; }
  .hero-actions .btn-gold { width: 100%; }
}

/* ---------- الأقسام ---------- */
.section { margin: 104px 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px 32px; margin-bottom: 40px; padding-bottom: 22px; border-bottom: 1px solid var(--rule); }
.section-head h2, .section > h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.2; }
.section > h2 { margin-bottom: 22px; }
.section-head p { color: var(--gray); margin-top: 10px; max-width: 560px; }
.section-kicker { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--accent-dark); letter-spacing: .4px; margin-bottom: 10px; }
.section-kicker::before { content: attr(data-n); font-family: var(--font-head); color: var(--accent); }
.section-kicker:not([data-n])::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.link-more { font-weight: 600; color: var(--dark); display: inline-flex; align-items: center; gap: 8px; padding-bottom: 2px; border-bottom: 1px solid var(--accent); transition: gap .3s var(--ease), color .2s; }
.link-more:hover { gap: 14px; color: var(--accent-dark); }
@media (max-width: 640px) { .section { margin: 72px 0; } .section-head { grid-template-columns: 1fr; } }

/* ---------- الفهرس الموضوعي (التصنيفات) ---------- */
.toc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; list-style: none; counter-reset: toc; }
.toc a { display: grid; grid-template-columns: 44px auto 1fr auto 20px; align-items: baseline; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--border); transition: padding .35s var(--ease); }
.toc .n { font-family: var(--font-head); font-size: 15px; color: var(--accent-dark); }
.toc .name { font-family: var(--font-head); font-size: clamp(20px, 2.2vw, 26px); font-weight: 500; color: var(--dark); transition: color .25s; }
.toc .leader { border-bottom: 1px dotted var(--rule); transform: translateY(-6px); }
.toc .cnt { font-size: 14px; color: var(--gray); }
.toc .arr { color: var(--accent); opacity: 0; transform: translateX(8px); transition: opacity .3s, transform .3s var(--ease); }
.toc a:hover { padding-inline-start: 10px; }
.toc a:hover .name { color: var(--primary); }
.toc a:hover .arr { opacity: 1; transform: none; }
@media (max-width: 760px) { .toc { grid-template-columns: 1fr; } .toc a { grid-template-columns: 36px auto 1fr auto; } .toc .arr { display: none; } }

/* بلاطات (صفحة اتصل بنا) */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.cat-tile { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .25s, transform .3s var(--ease); }
.cat-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat-tile .ic { width: 46px; height: 46px; flex-shrink: 0; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--accent-soft); }
.cat-tile b { display: block; font-size: 15.5px; color: var(--dark); }
.cat-tile small { color: var(--gray); font-size: 13px; }

/* ---------- البطاقات ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 28px; }
.card { position: relative; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--rule); }
.card-thumb { position: relative; background: var(--ink); color: var(--accent-light); height: 168px; display: flex; align-items: flex-end; justify-content: flex-start; padding: 16px 18px; overflow: hidden; isolation: isolate; }
.card-thumb::before { content: ''; position: absolute; inset: 0; background-image: var(--pattern); background-size: 66px; opacity: .14; z-index: -1; transition: transform 1.2s var(--ease); }
.card:hover .card-thumb::before { transform: scale(1.08) rotate(2deg); }
.card-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 36, 27, .55), transparent 70%); z-index: -1; }
.card-thumb > * { position: relative; z-index: 1; }
.card-thumb .thumb-word { font-family: var(--font-head); font-size: 34px; font-weight: 600; line-height: 1; color: inherit; opacity: .95; }
.card-thumb .thumb-emoji { position: absolute; top: 14px; left: 16px; font-size: 26px; filter: grayscale(.2); opacity: .9; }
.card-thumb .thumb-cat { position: absolute; top: 14px; right: 16px; color: rgba(246, 241, 227, .75); font-size: 12px; font-weight: 500; letter-spacing: .3px; }
.thumb-c0 { background: linear-gradient(160deg, #0e4d3a, #0a241b); }
.thumb-c1 { background: linear-gradient(160deg, #123a30, #06180f); }
.thumb-c2 { background: linear-gradient(160deg, #6e5410, #2f2306); color: #fbefc4; }
.thumb-c3 { background: linear-gradient(160deg, #1b5a43, #0b2a20); }
.thumb-c4 { background: linear-gradient(160deg, #2b3d35, #10201a); }
.thumb-c5 { background: linear-gradient(160deg, #7a5e14, #3b2c08); color: #fbefc4; }
.thumb-c6 { background: linear-gradient(160deg, #0d3327, #031510); }
.thumb-c7 { background: linear-gradient(160deg, #154a3d, #0a2a22); }
.card-body { padding: 20px 20px 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-family: var(--font-body); font-size: 17px; margin-bottom: 8px; line-height: 1.55; font-weight: 600; }
.card-body h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card-body h3 a:hover { color: var(--primary); }
.card-body p { font-size: 14px; color: var(--gray); margin-bottom: 16px; }
.card-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body .btn, .card-body form { position: relative; z-index: 2; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--gray); margin-top: auto; }
.card-meta .rating { margin-inline-start: auto; font-weight: 600; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--gray); }
.card-foot .link-more { border-bottom: 0; font-size: 13.5px; }
.card:hover .card-foot .link-more { gap: 12px; color: var(--accent-dark); }

/* شبكة المجلّة: البطاقة الأولى بارزة */
.cards-grid.magazine { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; }
.cards-grid.magazine > .card:first-child { grid-column: span 2; grid-row: span 2; }
.cards-grid.magazine > .card:first-child .card-thumb { height: auto; flex: 1; min-height: 300px; padding: 28px; }
.cards-grid.magazine > .card:first-child .thumb-word { font-size: clamp(44px, 5vw, 68px); }
.cards-grid.magazine > .card:first-child .card-body { flex: 0; padding: 24px 26px 22px; }
.cards-grid.magazine > .card:first-child h3 { font-size: 24px; }
@media (max-width: 1100px) { .cards-grid.magazine { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .cards-grid.magazine { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cards-grid.magazine > .card:first-child { grid-row: auto; } }
@media (max-width: 560px) { .cards-grid.magazine { grid-template-columns: 1fr; } .cards-grid.magazine > .card:first-child { grid-column: auto; } .cards-grid.magazine > .card:first-child .card-thumb { min-height: 200px; } }

/* شريط أفقي قابل للتمرير */
.cards-grid.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 18px; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
.cards-grid.rail > .card { scroll-snap-align: start; }
@media (min-width: 1100px) { .cards-grid.rail { grid-auto-columns: calc((100% - 3 * 28px) / 4); } }

.badge { display: inline-flex; align-items: center; gap: 4px; background: transparent; color: var(--primary); border: 1px solid var(--border); border-radius: 2px; padding: 1px 9px; font-size: 12px; font-weight: 500; line-height: 1.7; }
.badge-green { color: var(--green-dark); border-color: #c7dfcf; background: var(--green-soft); }
.badge-orange { background: var(--accent-soft); color: #6b4f0b; border-color: #ecdca8; }
.rating { color: var(--accent-dark); }

/* ---------- المنهج (الخطوات) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: step; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.step { position: relative; padding: 40px 32px 44px; }
.step + .step { border-inline-start: 1px solid var(--rule); }
.step::before { counter-increment: step; content: counter(step, arabic-indic); display: block; font-family: var(--font-head); font-size: 96px; font-weight: 500; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--accent); margin-bottom: 26px; transition: color .5s var(--ease); }
.step:hover::before { color: var(--accent-soft); }
.step .ic { display: none; }
.step h3 { font-size: 22px; margin-bottom: 10px; }
.step p { color: var(--gray); font-size: 15px; max-width: 320px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } .step + .step { border-inline-start: 0; border-top: 1px solid var(--rule); } .step { padding: 32px 4px; } .step::before { font-size: 72px; } }

/* ---------- لوحة الاشتراك (CTA) ---------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; padding: 64px 56px; background: var(--ink); color: #c9d3cc; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 48px; }
.cta-band::before { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(230, 207, 127, .35); pointer-events: none; }
.cta-band::after { content: ''; position: absolute; inset: 0; background-image: var(--pattern); background-size: 88px; opacity: .07; z-index: -1; -webkit-mask-image: linear-gradient(270deg, #000, transparent 70%); mask-image: linear-gradient(270deg, #000, transparent 70%); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #f6f1e3; font-size: clamp(30px, 4vw, 48px); margin: 12px 0 14px; }
.cta-band p { color: #b7c4bc; }
.cta-band .eyebrow { color: var(--accent-light); }
.price-sheet { list-style: none; border-top: 1px solid rgba(230, 207, 127, .3); }
.price-sheet li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(230, 207, 127, .14); }
.price-sheet li span { color: #b7c4bc; font-size: 15px; }
.price-sheet li b { font-family: var(--font-head); font-size: 26px; font-weight: 500; color: #f6f1e3; }
.price-sheet li b small { font-family: var(--font-body); font-size: 13px; color: var(--accent-light); margin-inline-start: 4px; }
.cta-band .price-tag { font-weight: 700; color: var(--accent-light); }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.cta-band .btn-outline { background: transparent; color: #f6f1e3; border-color: rgba(246, 241, 227, .35); }
.cta-band .btn-outline:hover { background: #f6f1e3; border-color: #f6f1e3; color: var(--ink); }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; padding: 48px 28px; gap: 28px; } }
@media (max-width: 520px) { .cta-actions, .cta-actions .btn { width: 100%; } }

/* ---------- كشف تدريجي عند التمرير ---------- */
.reveal-pending { opacity: 0; transform: translateY(24px); }
.reveal-in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }

/* ---------- حركات تفاعلية خفيفة تناسب كل الأعمار ---------- */
/* ظهور متتابع للبطاقات (ui.js يضع --i لكل عنصر) */
.pop-in { animation: pop-in .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes pop-in { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
/* أشرطة التقدم تمتلئ عند الظهور */
.progress-fill { transform-origin: right center; animation: fill-grow 1s var(--ease) both; }
@keyframes fill-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* ضغطة الأزرار */
.btn { transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.btn:active { transform: scale(.96); }
.btn-gold:hover, .btn-green:hover, .btn-primary:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
/* اختيار إجابة في الاختبار */
.quiz-option:has(input:checked) span { animation: tick-pop .3s var(--ease); }
@keyframes tick-pop { 50% { transform: scale(1.04); } }
/* بطاقات الوحدات تتفاعل مع المؤشر */
.stage-card { transition: transform .25s var(--ease), box-shadow .25s; }
.stage-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
/* علامة إكمال الدرس */
.lesson-complete > span { display: inline-block; animation: tick-pop .5s var(--ease); }
/* لمعة ختم الشهادة */
.cert-seal { position: relative; overflow: hidden; }
.cert-seal::after { content: ''; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .7) 50%, transparent 60%); transform: translateX(-100%); animation: seal-shine 3.5s 1s ease-in-out infinite; }
@keyframes seal-shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@media print { .cert-seal::after { display: none; } }
/* احتفال (قصاصات ملونة) عند النجاح — ui.js ينشئها ثم يزيلها */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; opacity: .95; animation: confetti-fall var(--d, 2.6s) cubic-bezier(.25, .6, .45, 1) forwards; }
@keyframes confetti-fall { to { transform: translate3d(var(--x, 0), 105vh, 0) rotate(var(--r, 540deg)); opacity: .9; } }
/* ---------- مسار الإنجليزية ---------- */
.en-lead { max-width: 720px; color: var(--gray); font-size: 16px; margin: -10px 0 20px; }
.en-sub { display: block; font-size: 13.5px; color: var(--gray); margin-top: 4px; }
.en-cta { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 26px; }
.en-cta-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.en-path { list-style: none; padding: 0; margin: 0; position: relative; }
.en-path::before { content: ''; position: absolute; top: 18px; bottom: 18px; inset-inline-start: 21px; width: 3px; background: var(--border); border-radius: 3px; }
.en-level { position: relative; display: flex; gap: 16px; padding: 12px 0; }
.en-step { position: relative; z-index: 1; flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface); border: 3px solid var(--border); color: var(--gray); }
.en-body { flex: 1; min-width: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: transform .25s var(--ease), box-shadow .25s; }
.en-body:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.en-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.en-head h3 { font-size: 17px; margin: 0; }
.en-courses { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.en-current .en-step { background: var(--green); border-color: var(--green); color: #fff; animation: en-pulse 2s ease-in-out infinite; }
.en-current .en-body { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16, 185, 129, .15); }
.en-passed .en-step { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.en-passed .en-body { opacity: .8; }
@keyframes en-pulse { 50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, .18); } }
.en-test-part { font-weight: 700; color: var(--primary); margin: 18px 0 6px; }

/* ملاحظة الترجمة تحت المشغّل */
.kp-subs-note { font-size: 12.5px; color: var(--gray); margin: 8px 2px 0; }

@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal-pending { opacity: 1; transform: none; }
}

/* ---------- عناوين الصفحات ---------- */
.page-head { padding: 56px 0 12px; }
.page-title { font-size: clamp(30px, 4vw, 44px); margin: 44px 0 26px; }
.page-head .page-title { margin: 0 0 8px; }
.page-sub { color: var(--gray); font-size: 16.5px; }


/* ---------- قائمة الدورات: البحث والتصفية ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin: 22px 0 18px; box-shadow: var(--shadow-sm); }
.toolbar .field { position: relative; flex: 1; min-width: 200px; }
.toolbar .field .ico { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--gray); pointer-events: none; }
.toolbar input[type="text"], .toolbar input[type="search"], .toolbar select { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 15px; background: var(--light); color: var(--text); transition: border-color .15s, box-shadow .15s, background .15s; }
.toolbar .field input { padding-right: 40px; }
.toolbar select { width: auto; min-width: 170px; cursor: pointer; }
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: var(--ring); }
.toolbar .btn { height: 46px; }
.results-count { color: var(--gray); font-size: 14px; margin-bottom: 16px; }
.results-count b { color: var(--dark); }

.category-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.category-filter a { padding: 8px 16px; border-radius: 2px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 500; color: var(--text); transition: all .15s; }
.category-filter a:hover { border-color: var(--primary); color: var(--primary); }
.category-filter a.active { background: var(--dark); color: #fff; border-color: var(--dark); }
@media (max-width: 700px) {
  .category-filter { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; }
  .category-filter::-webkit-scrollbar { display: none; }
  .category-filter a { flex-shrink: 0; }
  .toolbar select { flex: 1; }
}

.pagination { display: flex; gap: 6px; justify-content: center; margin: 36px 0; flex-wrap: wrap; }
.pagination a { min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-weight: 700; color: var(--text); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination a.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- نجوم التقييم ---------- */
.star-input { direction: rtl; }
.star-input .star-btn { display: inline-block; color: #dcd3bd; transition: color .15s, transform .15s; }
.star-input input:checked ~ .star-btn,
.star-input input:checked + .star-btn { color: #f59e0b; }
.star-input label:hover .star-btn { color: #fbbf24; transform: scale(1.12); }

/* ---------- صفحة الدورة ---------- */
.course-hero { background: linear-gradient(135deg, #0f172a 0%, #0a3a2c 100%); color: #cbd5e1; padding: 40px 0 44px; }
.course-hero h1 { color: #fff; font-size: clamp(26px, 4vw, 38px); margin: 12px 0 10px; }
.course-hero p { max-width: 720px; font-size: 16.5px; }
.course-hero .badge { background: rgba(255, 255, 255, .1); color: #e3efe8; }
.course-hero .badge-green { background: rgba(16, 185, 129, .18); color: #a7f3d0; }
.crumbs { font-size: 13.5px; color: #94a3b8; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: #fff; }
.course-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: 14.5px; }
.course-hero-meta strong { color: #fff; }
.course-hero-meta .rating { font-weight: 800; }

.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; margin: 32px 0; align-items: start; }
.course-layout.overlap { margin-top: -24px; }
@media (max-width: 900px) { .course-layout { grid-template-columns: 1fr; } .course-layout.overlap { margin-top: 24px; } }
.video-placeholder { background: linear-gradient(135deg, #1e293b, #072a1f); color: #94a3b8; aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: var(--radius); font-size: 15px; margin-bottom: 22px; }
.video-frame { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: var(--radius); border: none; margin-bottom: 20px; }
.course-content { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
main > .course-content + .course-content { margin-top: 22px; }
.course-content h3 { font-size: 19px; }
.course-info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; height: fit-content; position: sticky; top: calc(var(--nav-h) + 16px); box-shadow: var(--shadow); }
.price-big { font-size: 34px; font-weight: 800; color: var(--dark); line-height: 1.2; }
.price-period { color: var(--gray); font-size: 14px; }
.price-alts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 6px; }
.price-alts div { background: var(--light); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px; color: var(--gray); text-align: center; }
.price-alts strong { display: block; color: var(--dark); font-size: 15px; }
.price-note { font-size: 13px; color: #92400e; background: var(--accent-soft); border-radius: var(--radius-sm); padding: 8px 12px; text-align: center; font-weight: 600; margin: 10px 0 16px; }
.info-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.info-row:last-child { border-bottom: 0; }
.info-row span:first-child { color: var(--gray); }
.info-row span:last-child { font-weight: 700; color: var(--dark); text-align: left; }
.lessons-list { list-style: none; margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.lessons-list li { padding: 13px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14.5px; transition: background .15s; }
.lessons-list li:last-child { border-bottom: 0; }
.lessons-list li:hover { background: var(--light); }
.lesson-n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 800; margin-inline-end: 10px; flex-shrink: 0; }
.lessons-list li > span:first-child { display: flex; align-items: center; }
.rating-summary { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 18px; padding: 18px; background: var(--light); border-radius: var(--radius); }
.rating-big { font-size: 48px; font-weight: 800; color: var(--dark); line-height: 1; }

/* المشغّل الداخلي */
.kp-player { margin-bottom: 22px; }
.kp-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0b0f19; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.kp-stage .kp-video, .kp-stage .kp-yt, .kp-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kp-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: #cbd5e1; font-size: 14px; pointer-events: none; }
.kp-spinner { width: 24px; height: 24px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: kp-spin .8s linear infinite; }
@keyframes kp-spin { to { transform: rotate(360deg); } }
.kp-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; background: rgba(11, 15, 25, .88); color: #fff; z-index: 2; }
.kp-overlay h3, .kp-overlay strong { color: #fff; }
.kp-overlay[hidden] { display: none; }
.kp-overlay p { color: #cbd5e1; font-size: 14px; }
/* إشعار الدرس التالي تحت المشغّل (لا يغطي شاشة نهاية YouTube وروابطها) */
.kp-next-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: var(--light, #f1f5f9); font-size: 14px; }
.kp-next-banner[hidden] { display: none; }
.kp-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 2px 0; font-size: 13px; color: var(--gray); }
.kp-speed { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.kp-speed-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius-sm); padding: 4px 9px; font-size: 12px; font-family: inherit; cursor: pointer; direction: ltr; transition: all .15s; }
.kp-speed-btn:hover { border-color: var(--primary); }
.kp-speed-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.kp-auto { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.kp-auto input { accent-color: var(--primary); }
.watch-fallback { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: var(--accent-soft); border: 1px solid #fde68a; border-radius: var(--radius-sm); padding: 10px 14px; margin: -8px 0 18px; font-size: 13.5px; color: #92400e; }

/* ---------- النماذج ---------- */
.auth-wrap { display: flex; align-items: center; justify-content: center; padding: 48px 0 64px; }
.form-box { width: 100%; max-width: 440px; margin: 48px auto; background: var(--surface); padding: 34px 30px; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.auth-wrap .form-box { margin: 0 auto; }
.form-box-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--primary-soft); }
.form-box h1 { font-size: 25px; margin-bottom: 6px; text-align: center; }
.form-box .form-sub { text-align: center; color: var(--gray); font-size: 14.5px; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; margin-bottom: 7px; font-weight: 700; color: var(--dark); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; background: var(--light); color: var(--text); transition: border-color .15s, box-shadow .15s, background .15s; }
.form-group textarea { resize: vertical; min-height: 96px; }
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: #dcd3bd; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: var(--ring); }
.form-group input[type="checkbox"], .form-group input[type="radio"] { width: auto; accent-color: var(--primary); }
.form-hint { font-size: 14px; color: var(--gray); margin-top: 16px; text-align: center; }
.form-hint a { color: var(--primary); font-weight: 700; }
.form-divider { height: 1px; background: var(--border); margin: 22px 0 4px; }
.form-foot { font-size: 12px; color: var(--gray); text-align: center; margin-top: 18px; opacity: .85; }

/* ---------- خطط الاشتراك ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 34px; align-items: stretch; }
.plan { position: relative; background: var(--surface); border-radius: var(--radius-lg); padding: 30px 24px; text-align: center; border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan > form, .plan > .btn { margin-top: auto; }
.plan.featured { border: 2px solid var(--primary); box-shadow: 0 20px 50px rgba(14, 77, 58, .18); background: linear-gradient(180deg, #fdfbf5 0%, #fff 40%); }
.plan.featured::before { content: 'الأكثر اختياراً'; position: absolute; top: -14px; right: 50%; transform: translateX(50%); background: linear-gradient(135deg, var(--primary), #0a3a2c); color: #fff; font-size: 12.5px; font-weight: 800; padding: 5px 18px; border-radius: 2px; box-shadow: 0 6px 16px rgba(14, 77, 58, .3); white-space: nowrap; }
.plan h3 { font-size: 18px; margin-bottom: 12px; color: var(--gray); font-weight: 700; }
.plan .price { font-size: 42px; font-weight: 800; color: var(--dark); line-height: 1.2; }
.plan ul { list-style: none; margin: 22px 0; text-align: right; display: flex; flex-direction: column; gap: 10px; }
.plan ul li { font-size: 14.5px; }
.plan .form-group label { font-weight: 500; color: var(--gray); }
.plan .form-group input { background: var(--light); }

/* ---------- لوحة المشترك ---------- */
.dashboard-greeting { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 28px; margin: 32px 0 22px; box-shadow: var(--shadow-sm); }
.dashboard-greeting.hello { background: linear-gradient(135deg, var(--primary) 0%, #0a3a2c 100%); color: #e3efe8; border: 0; position: relative; overflow: hidden; }
.dashboard-greeting.hello::after { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .08); left: -60px; top: -120px; }
.dashboard-greeting.hello > * { position: relative; z-index: 1; }
.dashboard-greeting.hello h1 { color: #fff; }
.dashboard-greeting.hello .btn-outline { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }
.dashboard-greeting.hello .btn-outline:hover { background: #fff; color: var(--primary); }
.dashboard-greeting h1 { font-size: 26px; }
.sub-badge { display: inline-flex; align-items: center; background: var(--green-soft); color: #065f46; border-radius: 2px; padding: 3px 12px; font-size: 13px; font-weight: 700; }
.hello .sub-badge { background: rgba(255, 255, 255, .18); color: #fff; }
.course-stats { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--gray); margin-top: 4px; }
.course-stats strong { color: var(--dark); }
.card-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.card-actions form { margin: 0; }

/* ---------- مشاهدة الدرس ---------- */
.watch-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 22px 0 0; }
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; margin: 20px 0 32px; align-items: start; }
@media (max-width: 900px) { .watch-layout { grid-template-columns: 1fr; } }
.watch-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; height: fit-content; position: sticky; top: calc(var(--nav-h) + 16px); max-height: calc(100vh - var(--nav-h) - 32px); overflow-y: auto; box-shadow: var(--shadow-sm); }
@media (max-width: 900px) { .watch-side { position: static; max-height: none; } }
.watch-side .lesson-item { display: block; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 4px; transition: background .15s; }
.watch-side .lesson-item:hover { background: var(--light); }
.watch-side .lesson-item.active { background: var(--primary); color: #fff; box-shadow: 0 6px 14px rgba(14, 77, 58, .25); }
.stage-card { margin-bottom: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--light); }
.note-box { margin-top: 20px; padding: 16px; border-radius: var(--radius); background: var(--green-soft); border: 1px solid #b7ebd5; }
.note-box.info { background: var(--primary-soft); border-color: #d5e5db; }

/* مقاطع الدرس */
.clip-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 4px; max-height: 220px; overflow-y: auto; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--light); }
.clip-item { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--radius-sm); font-size: 13px; border: 1px solid var(--border); background: var(--surface); transition: all .15s; }
.clip-item:hover { border-color: var(--primary); color: var(--primary); }
.clip-item.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.clip-num { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 50%; background: var(--light); font-size: 12px; font-weight: 700; }
.clip-item.active .clip-num { background: rgba(255, 255, 255, .25); }

.stage-group { margin-bottom: 14px; }
.stage-group-head { font-size: 13px; font-weight: 800; color: var(--primary); padding: 7px 12px; border-right: 3px solid var(--primary); background: var(--primary-soft); border-radius: var(--radius-sm); margin-bottom: 6px; }

/* ---------- تقدم ---------- */
.progress-bar { background: #efe9da; border-radius: 99px; height: 8px; margin: 8px 0 14px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, var(--green), #34d399); height: 100%; border-radius: 99px; transition: width .4s; }

/* ---------- حالة فارغة ---------- */
.empty-state { text-align: center; color: var(--gray); padding: 64px 20px; font-size: 16px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-state .big { font-size: 52px; display: block; margin-bottom: 12px; }

/* ---------- صفحة الخطأ ---------- */
.error-page { text-align: center; padding: 80px 20px; }
.error-code { font-size: clamp(80px, 14vw, 140px); font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--primary), #c9a227); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- صفحات المحتوى (الشروط/الخصوصية) ---------- */
.prose { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.prose h2 { font-size: 20px; margin: 22px 0 8px; }
.prose p, .prose li { color: var(--text); }

/* ---------- لوحة الإدارة: التخطيط ---------- */
.container.admin-page { max-width: 1440px; }
.admin-page { display: grid; grid-template-columns: 250px minmax(0, 1fr); column-gap: 28px; align-items: start; padding-top: 28px; padding-bottom: 48px; }
.admin-page > * { grid-column: 2; min-width: 0; }
.admin-page > .admin-nav { grid-column: 1; grid-row: 1 / span 40; align-self: start; position: sticky; top: calc(var(--nav-h) + 20px); }
.admin-page > .page-title { margin: 4px 0 22px; font-size: clamp(22px, 2.6vw, 28px); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* الشريط الجانبي */
.admin-nav { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 12px; box-shadow: var(--shadow-sm); }
.admin-nav-head { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.admin-nav-head .ic { width: 38px; height: 38px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), #0a3a2c); color: #fff; font-size: 18px; flex-shrink: 0; }
.admin-nav-head b { display: block; color: var(--dark); font-size: 15px; line-height: 1.3; }
.admin-nav-head small { color: var(--gray); font-size: 12px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 500; color: var(--text); white-space: nowrap; transition: background .15s, color .15s; }
.admin-nav a .nav-ic { width: 32px; height: 32px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; background: var(--light); font-size: 15px; flex-shrink: 0; transition: background .15s; }
.admin-nav a:hover { background: var(--light); color: var(--dark); }
.admin-nav a:hover .nav-ic { background: #fff; }
.admin-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.admin-nav a.active .nav-ic { background: var(--primary); box-shadow: 0 4px 10px rgba(14, 77, 58, .3); }
.admin-nav-count { margin-inline-start: auto; min-width: 22px; padding: 0 7px; border-radius: 2px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; text-align: center; line-height: 20px; }
.admin-nav-sep { height: 1px; background: var(--border); margin: 8px 6px; }
.admin-nav a.admin-nav-site { color: var(--gray); font-size: 13.5px; }

@media (max-width: 960px) {
  .admin-page { display: flex; flex-direction: column; align-items: stretch; padding-top: 18px; }
  .admin-chart { overflow-x: auto; }
  .admin-chart-col { min-width: 38px; }
  .admin-chart-val { display: none; }
  .admin-page > .admin-nav { order: -1; align-self: stretch; }
  .admin-nav { position: static; flex-direction: row; overflow-x: auto; padding: 6px; border-radius: var(--radius); margin-bottom: 18px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav-head, .admin-nav-sep, .admin-nav a.admin-nav-site { display: none; }
  .admin-nav a { flex: 0 0 auto; padding: 7px 12px 7px 8px; }
  .admin-nav a .nav-ic { width: 28px; height: 28px; }
  .admin-page > .page-title { margin-top: 0; }
}

/* البطاقات والإحصاءات */
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.admin-card-title { font-size: 17px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.admin-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.admin-card-head .admin-card-title { margin-bottom: 0; }
.admin-card-head + .table-scroll, .admin-card-head + .admin-muted { margin-top: 16px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
.stat > :not(.stat-ic) { grid-column: 2; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-ic { grid-row: 1 / span 2; width: 46px; height: 46px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 21px; background: var(--primary-soft); }
.stat-ic.green { background: var(--green-soft); }
.stat-ic.amber { background: var(--accent-soft); }
.stat-ic.red { background: var(--red-soft); }
.stat-ic.violet { background: #f8f1dc; }
.stat-ic.sky { background: #eaf3ee; }
.stat h3 { font-size: 13.5px; color: var(--gray); font-weight: 600; }
.stat p { font-size: 26px; font-weight: 800; margin-top: 2px; color: var(--dark); line-height: 1.3; }
.stat p small { font-size: 13px; font-weight: 500; color: var(--gray); }
.stat-primary { background: linear-gradient(135deg, var(--primary), #0a3a2c); border: 0; color: #e3efe8; }
.stat-primary h3, .stat-primary p small { color: #c9dccf; }
.stat-primary p { color: #fff !important; }
.stat-primary .stat-ic { background: rgba(255, 255, 255, .18); }

.admin-quick { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.admin-quick .btn { background: var(--surface); }

/* الأدوات والجداول */
.admin-muted { color: var(--gray); font-size: 13.5px; }
.admin-sub { font-size: 12.5px; color: var(--gray); font-weight: 400; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; padding: 8px; background: var(--light); border-radius: var(--radius); }
.admin-toolbar input[type="search"] { flex: 1; min-width: 200px; height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; background: #fff; }
.admin-toolbar input[type="search"]:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.admin-toolbar select, .admin-inline-form select { height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; background: #fff; color: var(--text); cursor: pointer; }
.admin-inline-form select { height: 32px; padding: 0 8px; font-size: 13px; }
.admin-toolbar .btn { height: 40px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin-actions form, .admin-inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.admin-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.admin-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; font-size: 13px; color: var(--gray); align-items: center; }
.admin-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; font-size: 13px; color: var(--gray); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--border); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table-scroll .admin-table { min-width: 640px; }
.admin-table th, .admin-table td { padding: 13px 16px; text-align: right; font-size: 14px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table th { background: #fdfbf5; font-weight: 700; color: var(--gray); font-size: 12.5px; }
.admin-table tbody tr { transition: background .12s; }
.admin-table tbody tr:hover td { background: #fdfbf5; }
.admin-table-compact th, .admin-table-compact td { padding: 10px 14px; }
.table-scroll .admin-table-compact { min-width: 0; }
.admin-table code, .admin-card code { background: var(--primary-soft); color: var(--primary-dark); padding: 2px 8px; border-radius: 6px; font-size: 12px; display: inline-block; }
.admin-table .btn-danger, .admin-message .btn-danger { background: var(--red-soft); color: #b91c1c; box-shadow: none; }
.admin-table .btn-danger:hover, .admin-message .btn-danger:hover { background: var(--red); color: #fff; }
.admin-user { display: flex; align-items: center; gap: 10px; }
.admin-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; color: #fff; background: linear-gradient(135deg, var(--primary), #c9a227); }
.admin-avatar.alt { background: linear-gradient(135deg, #0ea5e9, #10b981); }

.admin-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 22px; }
.badge-admin { background: #fef3c7; color: #92400e; }
.status-paid { background: var(--green-soft); color: #065f46; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-failed { background: var(--red-soft); color: #b91c1c; }
.c-green { color: var(--green) !important; }
.c-amber { color: #b45309 !important; }
.c-red { color: var(--red) !important; }

/* الهدف والمخطط */
.admin-goal { position: relative; overflow: hidden; background: linear-gradient(135deg, #072a1f, #0a3a2c); color: #c9dccf; border: 0; }
.admin-goal::after { content: ''; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, .06); left: -60px; top: -110px; }
.admin-goal > * { position: relative; z-index: 1; }
.admin-goal strong { color: #fff; }
.admin-goal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14.5px; }
.admin-goal-pct { font-size: 28px; font-weight: 800; color: #fff; }
.admin-goal-bar { background: rgba(255, 255, 255, .14); border-radius: 99px; height: 12px; overflow: hidden; }
.admin-goal-bar div { background: linear-gradient(90deg, #22c55e, #a3e635); height: 100%; border-radius: 99px; }
.admin-chart { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding: 10px 4px 0; border-bottom: 1px solid var(--border); background: repeating-linear-gradient(to top, transparent 0, transparent 46px, #efe9da 46px, #efe9da 47px); }
.admin-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.admin-chart-bar { width: 100%; max-width: 30px; background: linear-gradient(#c9a227, var(--primary)); border-radius: var(--radius-sm) 8px 2px 2px; transition: opacity .15s; }
.admin-chart-col:hover .admin-chart-bar { opacity: .8; }
.admin-chart-val { font-size: 10px; color: var(--primary); font-weight: 700; white-space: nowrap; }
.admin-chart-label { font-size: 10px; color: var(--gray); white-space: nowrap; padding-bottom: 4px; }

/* الدروس والرسائل */
.admin-collapsible summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.admin-collapsible summary::-webkit-details-marker { display: none; }
.admin-collapsible summary .admin-card-title { margin: 0; }
.admin-collapsible summary::after { content: '+'; width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }
.admin-collapsible[open] summary::after { content: '−'; }
.admin-lesson-add { display: grid; grid-template-columns: 2fr 1fr 2fr auto; gap: 10px; align-items: end; padding: 14px; background: var(--light); border-radius: var(--radius); }
.admin-lesson .admin-lesson-add { background: transparent; padding: 0; }
.admin-lesson-add .form-group { margin-bottom: 0; }
.admin-lesson-add .btn { height: 46px; }
.admin-lessons { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.admin-lesson { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; background: var(--surface); transition: box-shadow .15s; }
.admin-lesson:hover { box-shadow: var(--shadow-sm); }
.admin-lesson[open] { box-shadow: var(--shadow); border-color: #d5e5db; }
.admin-lesson summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.admin-lesson summary::-webkit-details-marker { display: none; }
.admin-lesson[open] summary { margin-bottom: 14px; }
.admin-lesson-num { flex: 0 0 auto; width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.admin-lesson-title { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-messages { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.admin-message { margin-bottom: 0; display: flex; flex-direction: column; gap: 12px; }
.admin-message header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.admin-message p { flex: 1; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; background: var(--light); border-radius: var(--radius-sm); padding: 12px 14px; }
.admin-status-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.admin-status-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--light); font-size: 14px; }
.admin-danger-zone { border: 1px solid #fecaca; background: linear-gradient(180deg, #fff, #fff8f8); }
.admin-danger-zone .admin-card-title { color: #b91c1c; }
@media (max-width: 600px) {
  .admin-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { grid-template-columns: 1fr; padding: 14px; }
  .stat > :not(.stat-ic) { grid-column: 1; }
  .stat-ic { grid-row: auto; width: 38px; height: 38px; font-size: 18px; margin-bottom: 8px; }
  .stat p { font-size: 20px; }
}
@media (max-width: 700px) {
  .admin-lesson-add { grid-template-columns: 1fr; }
  .admin-card { padding: 18px; }
}

/* ---------- التذييل ---------- */
.footer { position: relative; overflow: hidden; isolation: isolate; background: var(--ink); color: #9fb0a6; margin-top: 120px; }
.footer::before { content: ''; position: absolute; inset: 0; background-image: var(--pattern); background-size: 88px; opacity: .06; z-index: -1; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; padding-top: 72px; padding-bottom: 48px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; padding-top: 56px; } .footer-brand { grid-column: 1 / -1; } }
.footer-brand .logo { color: #f6f1e3; margin-bottom: 16px; }
.footer-brand p { font-size: 14.5px; max-width: 380px; }
.footer-org { color: var(--accent-light); font-size: 13px; font-weight: 500; margin-top: 10px; }
.footer-phone { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 8px 14px; border: 1px solid rgba(230, 207, 127, .3); border-radius: var(--radius-sm); color: #e8e1cc; font-size: 14px; direction: ltr; transition: border-color .2s, color .2s; }
.footer-phone:hover { border-color: var(--accent); color: #fff; }
.footer h4 { color: var(--accent-light); margin-bottom: 16px; font-size: 14px; font-weight: 500; font-family: var(--font-body); letter-spacing: .4px; }
.footer ul { list-style: none; }
.footer li { margin: 10px 0; font-size: 15px; }
.footer a:hover { color: #fff; }
.footer-mark { font-family: var(--font-head); font-size: clamp(72px, 17vw, 230px); line-height: .82; font-weight: 600; text-align: center; color: transparent; -webkit-text-stroke: 1px rgba(230, 207, 127, .22); user-select: none; padding-top: 8px; margin-bottom: -.12em; white-space: nowrap; overflow: hidden; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-top: 20px; padding-bottom: 22px; font-size: 13px; position: relative; }
.footer-bottom::before { content: ''; position: absolute; top: 0; right: 24px; left: 24px; height: 1px; background: rgba(230, 207, 127, .16); }

/* ============ الشهادات المصدقة ============ */
.cert-wrap { padding-bottom: 20px; }
.cert-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 26px auto 22px; max-width: 980px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.cert-actions-info, .cert-actions-btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cert-actions-status { font-size: 13.5px; font-weight: 700; color: #065f46; background: var(--green-soft); padding: 5px 12px; border-radius: 2px; }
.cert-actions-status code { font-weight: 800; background: transparent; }

.cert-paper {
  --c-navy: #0a241b;
  --c-gold: #c9a227;
  --c-gold-d: #9c7a12;
  position: relative;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .06) 0 25%, transparent 25% 50%, rgba(255, 255, 255, .06) 50% 75%, transparent 75%) 0 0 / 18px 18px,
    linear-gradient(135deg, #0e4d3a 0%, #0a241b 100%);
  border-radius: var(--radius);
  padding: 16px;
  max-width: 980px;
  margin: 0 auto 44px;
  box-shadow: 0 30px 70px rgba(15, 29, 61, .35);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.cert-page {
  position: relative;
  background:
    repeating-radial-gradient(circle at 50% 120%, transparent 0 22px, rgba(201, 162, 39, .05) 22px 23px),
    radial-gradient(circle at 50% -10%, rgba(201, 162, 39, .16), transparent 60%),
    linear-gradient(180deg, #fffefa 0%, #fbf6e8 100%);
  border: 2px solid var(--c-gold);
  outline: 1px solid rgba(201, 162, 39, .55);
  outline-offset: -10px;
  border-radius: var(--radius-sm);
  padding: 52px 60px 40px;
  text-align: center;
  min-height: 600px;
  overflow: hidden;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.cert-page > * { position: relative; }
.cert-corner { position: absolute !important; width: 54px; height: 54px; }
.cert-corner.tl { top: 18px; left: 18px; border-top: 3px solid var(--c-gold); border-left: 3px solid var(--c-gold); }
.cert-corner.tr { top: 18px; right: 18px; border-top: 3px solid var(--c-gold); border-right: 3px solid var(--c-gold); }
.cert-corner.bl { bottom: 18px; left: 18px; border-bottom: 3px solid var(--c-gold); border-left: 3px solid var(--c-gold); }
.cert-corner.br { bottom: 18px; right: 18px; border-bottom: 3px solid var(--c-gold); border-right: 3px solid var(--c-gold); }
.cert-corner::after { content: ''; position: absolute; width: 8px; height: 8px; background: var(--c-gold); transform: rotate(45deg); }
.cert-corner.tl::after { top: 6px; left: 6px; }
.cert-corner.tr::after { top: 6px; right: 6px; }
.cert-corner.bl::after { bottom: 6px; left: 6px; }
.cert-corner.br::after { bottom: 6px; right: 6px; }

.cert-brand { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.cert-logo { height: 44px; width: 44px; display: block; border-radius: var(--radius-sm); }
.cert-org { font-size: 15px; font-weight: 800; color: var(--c-navy); letter-spacing: .3px; }
.cert-org-sep { color: var(--c-gold); font-size: 14px; }
.cert-title-en { font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif; font-size: 18px; font-weight: 700; letter-spacing: 6px; text-transform: uppercase; color: var(--c-gold-d); margin-bottom: 6px; }
.cert-title-ar { font-size: 40px; font-weight: 800; color: var(--c-navy); margin-bottom: 18px; line-height: 1.3; }
.cert-into { color: #6b5f45; font-size: 16.5px; margin: 12px 0 2px; }
.cert-meta strong { color: var(--c-navy); }
.cert-hl { color: var(--primary); }
.cert-student { font-family: 'Amiri', 'Traditional Arabic', 'Segoe UI', serif; font-size: 56px; font-weight: 700; color: var(--c-navy); line-height: 1.25; margin: 4px auto 0; max-width: 760px; overflow-wrap: break-word; }
.cert-name-line { height: 2px; width: 300px; max-width: 80%; margin: 6px auto 0; background: linear-gradient(90deg, transparent, var(--c-gold), transparent); }
.cert-course { display: inline-block; font-size: 28px; font-weight: 800; color: #fff; padding: 9px 32px; margin: 12px 0 4px; border-radius: 2px; background: linear-gradient(135deg, var(--c-navy), #0e4d3a); box-shadow: 0 0 0 3px #fffefa, 0 0 0 5px var(--c-gold); print-color-adjust: exact; -webkit-print-color-adjust: exact; }

.cert-signs { display: flex; justify-content: space-between; align-items: center; margin-top: 44px; gap: 20px; flex-wrap: wrap; }
.cert-sign { width: 210px; }
.sign-line { border-bottom: 1.5px solid var(--c-navy); margin-bottom: 8px; opacity: .6; }
.cert-sign span { font-size: 13px; color: #6b5f45; font-weight: 600; }
.cert-seal { width: 128px; height: 128px; border-radius: 50%; background: radial-gradient(circle, #fff6d6 0%, #f1d27a 45%, #d1a634 75%, #a47f1c 100%); border: 3px solid #fff; box-shadow: 0 0 0 3px var(--c-gold), 0 0 0 7px rgba(201, 162, 39, .25), 0 10px 24px rgba(95, 64, 0, .3); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #4d3800; transform: rotate(-6deg); line-height: 1.3; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.seal-star { font-size: 30px; color: #7a5a0e; line-height: 1; }
.cert-seal strong { font-size: 13px; }
.cert-seal small { font-size: 9px; font-weight: 800; letter-spacing: 2px; color: #7a5a0e; }

.cert-foot { margin-top: 30px; display: flex; align-items: center; justify-content: center; gap: 36px; flex-wrap: wrap; }
.cert-foot-mid { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cert-stamp { width: 84px; height: 84px; opacity: .85; pointer-events: none; transform: rotate(-8deg); }
.cert-stamp img { width: 100%; height: auto; display: block; }
.cert-qr { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cert-qr img { width: 88px; height: 88px; background: #fff; border: 2px solid var(--c-gold); border-radius: var(--radius-sm); padding: 4px; }
.cert-qr-hint { font-size: 10px; color: #6b5f45; font-weight: 600; }
.cert-code { background: var(--c-navy); color: #f4e3a6; border-radius: var(--radius-sm); padding: 8px 20px; font-size: 13.5px; font-weight: 700; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.cert-code code { font-weight: 800; letter-spacing: 1px; direction: ltr; display: inline-block; font-family: inherit; color: #fff; }
.cert-verify-badge { background: #e6f7ec; color: #0f7a3d; font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: var(--radius); border: 1px solid #8fd3a7; }
.cert-verify { font-size: 12.5px; color: #6b5f45; margin-top: 16px; }
.cert-verify a { color: var(--primary); font-weight: 700; }

/* الشهادة على الشاشات الصغيرة: مقاسات مصغّرة بدل السحب الأفقي */
@media (max-width: 760px) {
  .cert-actions-btns { width: 100%; }
  .cert-actions-btns .btn { flex: 1; }
  .cert-paper { padding: 8px; border-radius: var(--radius); }
  .cert-page { padding: 34px 18px 24px; min-height: 0; outline-offset: -6px; }
  .cert-corner { width: 30px; height: 30px; }
  .cert-corner.tl, .cert-corner.tr { top: 10px; }
  .cert-corner.bl, .cert-corner.br { bottom: 10px; }
  .cert-corner.tl, .cert-corner.bl { left: 10px; }
  .cert-corner.tr, .cert-corner.br { right: 10px; }
  .cert-corner::after { display: none; }
  .cert-brand { gap: 8px; margin-bottom: 14px; }
  .cert-logo { width: 34px; height: 34px; }
  .cert-org { font-size: 12.5px; }
  .cert-title-en { font-size: 11px; letter-spacing: 3px; }
  .cert-title-ar { font-size: 25px; margin-bottom: 10px; }
  .cert-into { font-size: 14px; }
  .cert-student { font-size: 34px; }
  .cert-course { font-size: 18px; padding: 6px 18px; }
  .cert-signs { margin-top: 26px; justify-content: center; gap: 14px; }
  .cert-sign { width: 40%; order: 2; }
  .cert-seal { width: 96px; height: 96px; order: 1; flex-basis: 100%; max-width: 96px; margin: 0 calc(50% - 48px); }
  .cert-seal strong { font-size: 11px; }
  .seal-star { font-size: 22px; }
  .cert-foot { gap: 16px; margin-top: 20px; }
  .cert-stamp { width: 64px; height: 64px; }
  .cert-qr img { width: 74px; height: 74px; }
}

.cert-invalid { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 56px 24px; text-align: center; color: var(--gray); max-width: 620px; margin: 0 auto 50px; box-shadow: var(--shadow); }
.cert-invalid .big { font-size: 46px; display: block; }
.cert-invalid h2 { color: var(--dark); margin-top: 6px; }
.cert-search-form form { display: flex; gap: 10px; max-width: 420px; margin: 16px auto 0; }
.cert-search-form input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; direction: ltr; text-align: center; font-family: inherit; background: var(--light); letter-spacing: 1px; }

/* ============ صفحة التحقق ============ */
.verify-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 44px 32px; text-align: center; max-width: 660px; margin: 44px auto 60px; box-shadow: var(--shadow-lg); }
.verify-icon { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 34px; background: linear-gradient(135deg, var(--primary-soft), #f8f1dc); }
.verify-box h1 { font-size: 28px; color: var(--dark); }
.verify-sub { color: var(--gray); margin: 10px auto 24px; font-size: 15px; max-width: 500px; }
.verify-form { display: flex; gap: 10px; max-width: 500px; margin: 0 auto; flex-wrap: wrap; }
.verify-form input { flex: 1; min-width: 200px; padding: 13px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 18px; font-weight: 700; direction: ltr; text-align: center; font-family: inherit; letter-spacing: 2px; background: var(--light); text-transform: uppercase; }
.verify-form input::placeholder { font-weight: 500; color: #a3abbd; }
.verify-form input:focus, .cert-search-form input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: var(--ring); }
.verify-hint { font-size: 13px; color: var(--gray); margin-top: 12px; }
.verify-result { margin-top: 30px; border-radius: var(--radius); text-align: right; overflow: hidden; border: 1px solid transparent; }
.verify-status { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.verify-status .big { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: #fff; }
.verify-result h2 { color: var(--dark); font-size: 19px; margin-bottom: 2px; }
.verify-result p { color: var(--gray); font-size: 14px; }
.verify-ok { background: #fff; border-color: #b7ebd5; }
.verify-ok .verify-status { background: var(--green-soft); }
.verify-ok .verify-status .big { background: var(--green); }
.verify-bad { border-color: #f9caca; }
.verify-bad .verify-status { background: var(--red-soft); }
.verify-bad .verify-status .big { background: var(--red); }
.verify-details { padding: 8px 20px; }
.verify-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.verify-row:last-child { border-bottom: 0; }
.verify-row span { color: var(--gray); }
.verify-row strong { color: var(--dark); text-align: left; }
.verify-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px; background: var(--light); border-top: 1px solid var(--border); }
.verify-qr { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--gray); }
.verify-qr img { width: 64px; height: 64px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; background: #fff; }

/* صفحة الاختبار */
.quiz-list { text-align: right; margin-top: 10px; }
.quiz-question { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.quiz-q { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--light); cursor: pointer; transition: border-color .15s, background .15s; }
.quiz-option:hover { border-color: var(--primary); background: var(--primary-soft); }
.quiz-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: var(--ring); }
.quiz-option input { accent-color: var(--primary); width: 18px; height: 18px; }
.quiz-option span { font-size: 14.5px; }

/* ============ مراحل الدفع ============ */
.pay-steps { list-style: none; display: flex; align-items: center; justify-content: center; gap: 0; margin: 30px auto 6px; max-width: 520px; counter-reset: none; }
.pay-steps li { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--gray); }
.pay-steps li:not(:last-child)::after { content: ''; width: 56px; height: 2px; margin: 0 6px; border-radius: 2px; background: var(--border); }
.pay-steps li.done:not(:last-child)::after { background: var(--green); }
.pay-steps .n { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; background: var(--surface); border: 2px solid var(--border); color: var(--gray); position: relative; z-index: 1; }
.pay-steps li.done .n { background: var(--green); border-color: var(--green); color: #fff; }
.pay-steps li.current { color: var(--dark); }
.pay-steps li.current:not(.done) .n { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--ring); }
@media (max-width: 520px) { .pay-steps li { font-size: 12.5px; gap: 6px; } .pay-steps li:not(:last-child)::after { width: 18px; margin: 0 2px; } }

/* ============ صفحة الدفع ============ */
.payment-page { padding: 0 0 48px; }
.pay-head { text-align: center; }
.pay-head .page-title { margin: 22px 0 6px; }
.pay-subtitle { text-align: center; color: var(--gray); margin-bottom: 28px; font-size: 14.5px; }
.pay-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; max-width: 960px; margin: 0 auto; }
.pay-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pay-methods-head { font-size: 13px; font-weight: 800; color: var(--gray); margin-bottom: -4px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-method { display: flex; align-items: center; gap: 10px; width: 100%; text-align: right; padding: 14px; border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: all .15s ease; font-family: inherit; color: var(--text); }
.pay-method:hover { border-color: #c9dccf; }
.pay-method-active { border-color: var(--primary); background: #fdfbf5; box-shadow: var(--ring); }
.pm-radio { width: 18px; height: 18px; min-width: 18px; border-radius: 50%; border: 2px solid var(--border); background: #fff; display: inline-flex; align-items: center; justify-content: center; transition: all .15s ease; }
.pay-method-active .pm-radio { border-color: var(--primary); }
.pay-method-active .pm-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.pm-ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; font-size: 19px; background: var(--primary-soft); }
.pm-ic.qaseh { background: #0f766e; color: #fff; font-weight: 800; font-size: 17px; }
.pm-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-title { font-size: 14.5px; font-weight: 800; color: var(--dark); }
.pm-sub { font-size: 12px; color: var(--gray); }
@media (max-width: 560px) { .pay-methods { grid-template-columns: 1fr; } }

.pay-summary, .pay-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.pay-card { box-shadow: var(--shadow); }
.pay-summary { position: sticky; top: calc(var(--nav-h) + 16px); background: linear-gradient(180deg, #fdfbf5 0%, #fff 30%); }
.pay-summary-label { font-size: 12.5px; font-weight: 800; color: var(--primary); margin-bottom: 14px; }
.pay-summary-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.pay-plan-ic { width: 46px; height: 46px; border-radius: var(--radius); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; background: linear-gradient(135deg, var(--primary), #0a3a2c); }
.pay-panel-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: var(--dark); margin-bottom: 18px; }
.pay-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.pay-dot-green { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.pay-dot-qaseh { background: #0f766e; box-shadow: 0 0 0 4px #ccfbf1; }
.pay-legal { text-align: center; font-size: 12px; color: var(--gray); margin-top: 14px; line-height: 1.8; }
.pay-legal a { color: var(--primary); font-weight: 600; }
.pay-price { font-size: 24px; font-weight: 800; color: var(--primary); }
.pay-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 14.5px; color: var(--text); border-bottom: 1px dashed var(--border); }
.pay-row-discount { color: var(--green); font-weight: 700; }
.pay-row-total { border-bottom: none; font-size: 16px; padding-top: 14px; }
.pay-total-num { color: var(--dark); font-size: 26px; font-weight: 800; }
.pay-total-num small { font-size: 14px; color: var(--gray); font-weight: 600; }
.pay-tiny { list-style: none; font-size: 13px; color: var(--gray); line-height: 2; margin-top: 12px; padding: 12px 14px; background: var(--light); border-radius: var(--radius-sm); }
.pay-secure { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; font-size: 12px; color: var(--gray); }
.pay-lock { background: var(--green-soft); color: var(--green); padding: 3px 10px; border-radius: 2px; font-weight: 700; }
.pay-method-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 2px; font-size: 12.5px; font-weight: 700; background: var(--primary-soft); color: var(--primary); margin-top: 4px; }
.pay-method-chip::before { content: 'الوسيلة:'; font-weight: 500; color: var(--gray); }
.pay-input-wrap { position: relative; }
.pay-input-wrap input { padding-left: 110px !important; }
.pay-brand { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 12.5px; font-weight: 800; letter-spacing: 1px; color: var(--primary); direction: ltr; }
.pay-col2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pay-email { direction: ltr; text-align: left; color: var(--gray) !important; cursor: default; }
.pay-error { color: var(--red); font-size: 12.5px; min-height: 0; margin-top: 4px; }
.pay-error:empty { display: none; }
.pay-submit { margin-top: 8px; }
form .form-group input#cardNumber, form .form-group input#expiry, form .form-group input#cvv { font-family: 'Courier New', monospace; font-size: 16px; letter-spacing: 1px; }

/* معاينة البطاقة */
.cc-preview { direction: ltr; position: relative; overflow: hidden; color: #fff; border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; aspect-ratio: 1.75 / 1; max-height: 210px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 85% 0%, rgba(255, 255, 255, .25), transparent 45%), linear-gradient(135deg, #0a3a2c 0%, var(--primary) 55%, #0a3a2c 100%); box-shadow: 0 14px 30px rgba(14, 77, 58, .3); font-family: 'Courier New', monospace; }
.cc-preview::after { content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; border: 30px solid rgba(255, 255, 255, .06); right: -70px; bottom: -110px; }
.cc-top { display: flex; justify-content: space-between; align-items: center; }
.cc-chip { width: 42px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #fde68a, #d4a017); }
.cc-brand { font-family: 'Tajawal', sans-serif; font-weight: 800; letter-spacing: 1.5px; font-size: 15px; opacity: .95; }
.cc-number { font-size: clamp(16px, 3.4vw, 21px); letter-spacing: 2px; white-space: nowrap; }
.cc-bottom { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; text-transform: uppercase; }
.cc-bottom > div { display: flex; flex-direction: column; min-width: 0; }
.cc-bottom > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.cc-bottom small { font-size: 9px; opacity: .7; letter-spacing: 1px; }

/* بوابة القاصة */
.qaseh-panel { max-width: 100%; }
.qaseh-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.qaseh-logo { background: #0f766e; color: #fff; padding: 10px 18px; border-radius: var(--radius-sm); font-weight: 800; font-size: 16px; }
.qaseh-meta { display: flex; flex-direction: column; gap: 3px; }
.qaseh-name { font-weight: 800; color: var(--dark); font-size: 15px; direction: ltr; text-align: right; }
.qaseh-badge { font-size: 11.5px; color: #0f766e; background: #f0fdfa; border: 1px solid #99f6e4; padding: 2px 10px; border-radius: 2px; width: fit-content; }
.qaseh-steps { list-style: none; counter-reset: q; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: #f0fdfa; border: 1px solid #ccfbf1; border-radius: var(--radius); font-size: 13.5px; color: var(--text); }
.qaseh-steps li { counter-increment: q; display: flex; gap: 10px; align-items: flex-start; }
.qaseh-steps li::before { content: counter(q); width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: #0f766e; color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }

@media (max-width: 820px) {
  .pay-grid { grid-template-columns: 1fr; }
  .pay-summary { position: static; order: -1; }
}
@media (max-width: 480px) { .pay-col2 { grid-template-columns: 1fr 1fr; gap: 10px; } .pay-card, .pay-summary { padding: 18px; } }

/* ============ الإيصال ============ */
.receipt-wrap { padding: 0 0 48px; }
.receipt { max-width: 560px; margin: 24px auto 0; }
.receipt-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.receipt-top { text-align: center; padding: 32px 26px 26px; background: linear-gradient(180deg, var(--green-soft) 0%, #fff 100%); }
.receipt-card.is-pending .receipt-top { background: linear-gradient(180deg, #fff4e0 0%, #fff 100%); }
.receipt-top h1 { font-size: 24px; margin-bottom: 6px; }
.receipt-top p { color: var(--gray); font-size: 14.5px; max-width: 420px; margin: 0 auto; }
.receipt-check { width: 72px; height: 72px; border-radius: 50%; background: var(--green); color: #fff; font-size: 34px; font-weight: 800; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 10px rgba(5, 150, 105, .12); }
.receipt-card.is-pending .receipt-check { background: #f59e0b; box-shadow: 0 0 0 10px rgba(245, 158, 11, .15); }
.receipt-amount { font-size: 34px; font-weight: 800; color: var(--dark); margin-top: 14px; }
.receipt-amount small { font-size: 15px; color: var(--gray); font-weight: 600; }
.receipt-perf { position: relative; height: 0; border-top: 2px dashed var(--border); margin: 0 18px; }
.receipt-perf::before, .receipt-perf::after { content: ''; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--light); border: 1px solid var(--border); }
.receipt-perf::before { right: -31px; }
.receipt-perf::after { left: -31px; }
.receipt-body { padding: 20px 26px 24px; }
.receipt-row-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; margin-bottom: 4px; }
.receipt-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; font-size: 14.5px; border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap; }
.receipt-row:last-of-type { border-bottom: 0; }
.receipt-row > span:first-child { color: var(--gray); }
.receipt-wa { margin-top: 16px; padding: 16px; border-radius: var(--radius); background: #f0fdf4; border: 1px solid #bbf7d0; }
.receipt-wa-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.receipt-wa-form input { flex: 1; min-width: 160px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 15px; background: #fff; }
.receipt-wa-form input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(5, 150, 105, .15); }
.receipt-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }

/* ============ لوحة المعاملات ============ */
.pay-stats { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 6px; }
.pay-chip { background: var(--light); border: 1px solid var(--border); padding: 4px 12px; border-radius: 2px; }

/* ============ الطباعة ============ */
@page { size: A4 landscape; margin: 10mm; }
@media print {
  nav.navbar, .footer, .cert-actions, .no-print, .flash { display: none !important; }
  body { background: #fff !important; display: block; }
  .container { max-width: 100%; padding: 0; }
  .cert-scroll { overflow: visible; }
  .cert-paper { min-width: 0; padding: 8px; max-width: 100%; margin: 0; box-shadow: none; border-radius: var(--radius-sm); }
  .cert-page { min-height: 0; padding: 30px 36px 24px; }
  .cert-title-ar { font-size: 32px; }
  .cert-student { font-size: 42px; }
  .cert-course { font-size: 23px; }
  .cert-signs { margin-top: 28px; }
  .cert-seal { transform: none; }
  .cert-foot { margin-top: 16px; gap: 26px; page-break-inside: avoid; break-inside: avoid; }
  .cert-stamp { position: static !important; transform: none !important; width: 70px; height: 70px; }
  .cert-qr img { width: 70px; height: 70px; }
  .receipt-card { box-shadow: none; }
}

/* =========================================================
   طبقة الهوية للصفحات الداخلية
   ========================================================= */
.course-hero, .dashboard-greeting.hello { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: #b7c4bc; }
.course-hero::before, .dashboard-greeting.hello::before { content: ''; position: absolute; inset: 0; background-image: var(--pattern); background-size: 88px; opacity: .08; z-index: -1; -webkit-mask-image: linear-gradient(90deg, #000, transparent 65%); mask-image: linear-gradient(90deg, #000, transparent 65%); }
.dashboard-greeting.hello::after { display: none; }
.course-hero { padding: 56px 0 64px; border-bottom: 1px solid rgba(230, 207, 127, .3); }
.course-hero h1 { color: #f6f1e3; font-size: clamp(30px, 4.4vw, 50px); }
.course-hero .badge { background: transparent; color: var(--accent-light); border-color: rgba(230, 207, 127, .35); }
.course-hero .badge-green { color: #bfe0cb; border-color: rgba(191, 224, 203, .3); }
.crumbs { color: #8fa197; }
.course-hero-meta strong { color: #f6f1e3; }
.course-content, .course-info, .watch-side, .prose, .admin-nav { box-shadow: none; }
.course-info { border-top: 3px solid var(--accent); }
.price-big, .plan .price, .rating-big { font-family: var(--font-head); font-weight: 500; }
.lesson-n { font-family: var(--font-head); background: transparent; border: 1px solid var(--rule); color: var(--accent-dark); font-weight: 500; }
.lessons-list li:hover, .watch-side .lesson-item:hover { background: var(--accent-soft); }
.watch-side .lesson-item.active { background: var(--ink); color: #f6f1e3; box-shadow: inset -3px 0 0 var(--accent); }
.stage-group-head { background: transparent; border-right-color: var(--accent); color: var(--dark); border-radius: 0; }
.progress-bar { background: var(--light); height: 6px; }
.progress-fill { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.plan { box-shadow: none; }
.plan:hover { box-shadow: var(--shadow-lg); }
.plan.featured { background: var(--ink); color: #c9d3cc; border: 1px solid var(--accent); box-shadow: var(--shadow-lg); }
.plan.featured h3, .plan.featured .form-group label { color: var(--accent-light); }
.plan.featured .price { color: #f6f1e3; }
.plan.featured .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.plan.featured .btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); box-shadow: none; }
.plan.featured::before { background: var(--accent); color: var(--ink); border-radius: 2px; box-shadow: none; }
.plan.featured .form-group input { background: rgba(246, 241, 227, .06); border-color: rgba(230, 207, 127, .3); color: #f6f1e3; }
.form-box { box-shadow: var(--shadow); border-top: 3px solid var(--accent); }
.form-box-icon { background: var(--ink); color: var(--accent-light); }
.form-group input, .form-group select, .form-group textarea, .toolbar input[type="text"], .toolbar input[type="search"], .toolbar select { background: var(--surface); }
.toolbar { box-shadow: none; }
.category-filter a.active, .pagination a.active { background: var(--ink); border-color: var(--ink); color: var(--accent-light); }
.category-filter a:hover, .pagination a:hover { border-color: var(--accent); color: var(--dark); }
.empty-state { background: transparent; border-color: var(--rule); }
.error-code { font-family: var(--font-head); background: none; color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.page-head { border-bottom: 1px solid var(--rule); padding-bottom: 28px; margin-bottom: 8px; }
.page-head.text-center .section-kicker { justify-content: center; }
.admin-goal { background: var(--ink); isolation: isolate; }
.admin-goal::after { display: none; }
.admin-goal::before { content: ''; position: absolute; inset: 0; background-image: var(--pattern); background-size: 88px; opacity: .08; z-index: -1; -webkit-mask-image: linear-gradient(90deg, #000, transparent 60%); mask-image: linear-gradient(90deg, #000, transparent 60%); }
.admin-goal-bar div { background: linear-gradient(90deg, var(--accent-dark), var(--accent-light)); }
.admin-avatar.alt { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); }
/* الكوفي للعناوين الكبيرة فقط؛ التسميات الصغيرة بخط النص لوضوح القراءة */
.admin-page h3, .admin-page h4, .admin-page .stat-label, .watch-side h3, .watch-side h4, .stage-card h3, .stage-card h4, .course-content h4 { font-family: var(--font-body); font-weight: 600; }
.admin-page .stat p { font-family: var(--font-head); font-weight: 500; }
.admin-chart-bar { border-radius: 2px 2px 0 0; }
@media (max-width: 600px) { .admin-chart-col { min-width: 38px; } }
