/* ==========================================================================
   أكواد نسك — v8.0 «الطفرة»
   نظام تصميم فاخر: خطوط أوضح وأكبر، تباين أقوى، طبقات زجاجية، حركة راقية
   الخطوط: Cairo للعناوين · Tajawal للنصوص · IBM Plex Mono للأكواد
   ملاحظة: لا نستخدم letter-spacing على النص العربي إطلاقًا (يكسر اتصال الحروف)
   ========================================================================== */

/* ============ 1) رموز التصميم — الوضع الليلي (الأساس) ============ */
:root {
  /* الطباعة */
  --font: 'Tajawal', 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --font-head: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  --mono: 'IBM Plex Mono', 'Consolas', 'Courier New', monospace;

  /* النصوص — سطوع أعلى لوضوح قصوى على كل الشاشات */
  --txt: #f3faf6;
  --muted: #b9cbbf;
  --faint: #90a597;

  /* الأسطح */
  --bg: #0a110d;
  --bg-2: #0d1611;
  --card: #111c15;
  --card-2: #17251d;
  --card-hi: #1e3025;
  --line: rgba(255, 255, 255, .13);
  --line-strong: rgba(255, 255, 255, .22);
  --line-soft: rgba(255, 255, 255, .07);
  --inset: rgba(0, 0, 0, .34);
  --glass: rgba(17, 28, 21, .72);

  /* الهوية */
  --brand: #35d389;
  --brand-strong: #22b871;
  --brand-deep: #0f7a4d;
  --brand-ink: #072e1e;
  --brand-soft: rgba(53, 211, 137, .14);
  --gold: #f5cd63;
  --gold-strong: #ffe08d;
  --gold-deep: #d9a936;
  --gold-grad: linear-gradient(135deg, #ffefb0 0%, #f7d066 45%, #e3b23c 100%);
  --gold-soft: rgba(245, 205, 99, .14);
  --danger: #ff7b76;
  --danger-soft: rgba(255, 123, 118, .15);
  --ok: #47d48f;
  --info: #7cb8ff;
  --info-soft: rgba(124, 184, 255, .13);
  --amber: #ffb454;
  --amber-soft: rgba(255, 180, 84, .14);

  /* تدرجات جاهزة */
  --grad-brand: linear-gradient(135deg, #35d389 0%, #0f9e63 100%);
  --grad-hero: linear-gradient(145deg, #0b3d28 0%, #0f6a44 55%, #083522 100%);
  --grad-card: linear-gradient(180deg, var(--card-2) 0%, var(--card) 100%);

  /* أشكال */
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --shadow: 0 18px 44px rgba(0, 0, 0, .45);
  --shadow-soft: 0 8px 22px rgba(0, 0, 0, .30);
  --shadow-gold: 0 10px 26px rgba(217, 169, 54, .32);
  --wrap: 1240px;
  --header-h: 72px;
  --ease: cubic-bezier(.22, .8, .35, 1);
}

/* ============ الوضع النهاري — ورقي دافئ بتباين قوي ============ */
html[data-theme="light"] {
  --txt: #14201a;
  --muted: #46584d;
  --faint: #6a7d70;
  --bg: #f4f6f2;
  --bg-2: #eaf0e9;
  --card: #ffffff;
  --card-2: #f5f9f4;
  --card-hi: #e9f2ea;
  --line: #d8e3d6;
  --line-strong: #bccfbc;
  --line-soft: #e5ede4;
  --inset: rgba(11, 45, 30, .06);
  --glass: rgba(255, 255, 255, .78);
  --brand: #0e8a55;
  --brand-strong: #0b6f44;
  --brand-deep: #095c38;
  --brand-ink: #093421;
  --brand-soft: rgba(14, 138, 85, .10);
  --gold: #9a6d0a;
  --gold-strong: #7d5807;
  --gold-deep: #c9962b;
  --gold-soft: rgba(154, 109, 10, .10);
  --danger: #bb2d31;
  --danger-soft: rgba(187, 45, 49, .10);
  --ok: #0e8a55;
  --info: #1c6ec2;
  --info-soft: rgba(28, 110, 194, .10);
  --amber: #a35c00;
  --amber-soft: rgba(163, 92, 0, .10);
  --grad-hero: linear-gradient(145deg, #0c4f32 0%, #12734b 55%, #0a4128 100%);
  --shadow: 0 18px 44px rgba(23, 48, 34, .12);
  --shadow-soft: 0 6px 18px rgba(23, 48, 34, .08);
  --shadow-gold: 0 10px 26px rgba(154, 109, 10, .22);
}

/* ============ 1-b) الهويات الجلدية — تُختار من اللوحة ← الهوية ============ */
body[data-skin="royal"] {
  --brand: #5f9bff; --brand-strong: #3f82f5; --brand-deep: #2456c4; --brand-ink: #0b1f44;
  --brand-soft: rgba(95, 155, 255, .14);
  --grad-brand: linear-gradient(135deg, #5f9bff 0%, #2456c4 100%);
  --grad-hero: linear-gradient(145deg, #0c2350 0%, #143a80 55%, #0a1e44 100%);
}
html[data-theme="light"] body[data-skin="royal"] {
  --brand: #1c5fd0; --brand-strong: #174fae; --brand-deep: #123f8c; --brand-soft: rgba(28, 95, 208, .10);
  --grad-hero: linear-gradient(145deg, #123a7d 0%, #1c5fd0 55%, #0f2f66 100%);
}
body[data-skin="henna"] {
  --brand: #ef8f6b; --brand-strong: #e2734c; --brand-deep: #c25531; --brand-ink: #3d150a;
  --brand-soft: rgba(239, 143, 107, .14);
  --grad-brand: linear-gradient(135deg, #ef8f6b 0%, #c25531 100%);
  --grad-hero: linear-gradient(145deg, #58200e 0%, #8a3c1e 55%, #481a0b 100%);
}
html[data-theme="light"] body[data-skin="henna"] {
  --brand: #b04a26; --brand-strong: #933c1d; --brand-deep: #7a3117; --brand-soft: rgba(176, 74, 38, .10);
  --grad-hero: linear-gradient(145deg, #7d3117 0%, #b04a26 55%, #6b2a13 100%);
}
body[data-skin="night"] {
  --brand: #a98ef5; --brand-strong: #9373ee; --brand-deep: #7250d4; --brand-ink: #221349;
  --brand-soft: rgba(169, 142, 245, .14);
  --grad-brand: linear-gradient(135deg, #a98ef5 0%, #7250d4 100%);
  --grad-hero: linear-gradient(145deg, #241354 0%, #3c2691 55%, #1d0f45 100%);
}
html[data-theme="light"] body[data-skin="night"] {
  --brand: #6a48d7; --brand-strong: #5838bd; --brand-deep: #482c9e; --brand-soft: rgba(106, 72, 215, .10);
  --grad-hero: linear-gradient(145deg, #372170 0%, #6a48d7 55%, #2c1a5c 100%);
}

/* ============ 2) الأساس والطباعة — الوضوح أولًا ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 14px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.9;
  color: var(--txt);
  background:
    radial-gradient(1100px 500px at 90% -8%, var(--brand-soft), transparent 60%),
    radial-gradient(900px 420px at -10% 30%, var(--brand-soft), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; transition: color .15s var(--ease); }
html[data-theme="light"] a:not(.btn) { color: var(--brand-strong); }
a:not(.btn):hover { color: var(--gold); }
html[data-theme="light"] a:not(.btn):hover { color: var(--brand-deep); }

/* هرم العناوين — أكبر وأثقل ليقرأه العين فورًا */
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--txt); margin: 0 0 .55em; line-height: 1.55; }
h1 { font-size: clamp(1.85rem, 4vw, 2.9rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 2.7vw, 1.95rem); font-weight: 800; }
h3 { font-size: clamp(1.08rem, 1.7vw, 1.25rem); font-weight: 800; }
h4 { font-size: 1.02rem; font-weight: 800; }
p { margin: .5em 0 1em; color: var(--muted); }
strong { color: var(--txt); font-weight: 800; }
ul, ol { color: var(--muted); padding-inline-start: 1.35em; margin: .5em 0 1em; }
li { margin: .45em 0; }
li::marker { color: var(--brand); }
hr { border: 0; border-top: 1px solid var(--line-soft); }
code {
  font-family: var(--mono); font-size: .92em; direction: ltr; unicode-bidi: embed;
  background: var(--inset); border: 1px solid var(--line-soft); border-radius: 7px; padding: 2px 8px; color: var(--gold);
}
::selection { background: var(--brand); color: #062015; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* الحاوية والأقسام */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.section { padding: 48px 0 18px; }
main { padding-bottom: 56px; display: block; }
.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 300;
  background: var(--brand); color: #062015; font-weight: 800; font-family: var(--font-head);
  padding: 10px 18px; border-radius: 0 0 var(--radius-xs) var(--radius-xs); transition: top .2s;
}
.skip-link:focus { top: 0; }

/* شريط تقدم القراءة أعلى الصفحة */
.scroll-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 260; background: transparent; pointer-events: none; }
.scroll-progress i { display: block; height: 100%; width: 0; background: var(--grad-brand); border-radius: 0 3px 3px 0; }

/* الظهور المتدرج — html.js فقط حتى لا يفقد بلا جافاسكربت محتواه */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
html.js .rvl { opacity: 0; }
html.js .rvl.in { animation: rise .7s var(--ease) both; animation-delay: var(--d, 0ms); }
html.js .rvl.in.noanim { animation: none; opacity: 1; }
@keyframes popIn { 0% { transform: scale(1); } 45% { transform: scale(1.14); color: var(--gold-strong); } 100% { transform: scale(1); } }
.pop { animation: popIn .55s var(--ease); }

/* ============ 3) الترويسة — زجاج عائم ============ */
.site-header {
  position: sticky; top: 0; z-index: 120;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.35); -webkit-backdrop-filter: blur(16px) saturate(1.35);
  border-bottom: 1px solid var(--line-soft);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, .22); border-bottom-color: var(--line); }
.site-header.hid { transform: translateY(-100%); }
.header-in { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--txt); }
.brand:hover { color: var(--txt); }
.brand img { width: 46px; height: 46px; filter: drop-shadow(0 4px 10px rgba(53, 211, 137, .35)); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.4; }
.brand-txt strong { font-family: var(--font-head); font-weight: 900; font-size: 1.12rem; color: var(--txt); }
.brand-txt small { font-size: .72rem; color: var(--muted); font-weight: 700; }
.main-nav { margin-inline-start: auto; }
.main-nav ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 9px 15px; border-radius: 999px;
  color: var(--muted); font-family: var(--font-head); font-weight: 800; font-size: .93rem;
  transition: color .15s, background .15s;
}
.main-nav a:hover { color: var(--txt); background: var(--card-2); }
.main-nav a.on { color: var(--brand); background: var(--brand-soft); }
.nav-toggle {
  display: none; margin-inline-start: auto;
  background: var(--card-2); border: 1px solid var(--line); color: var(--txt);
  border-radius: var(--radius-xs); padding: 9px 14px; cursor: pointer;
  font-family: var(--font-head); font-weight: 800; font-size: .9rem;
}
.theme-toggle {
  background: var(--card-2); border: 1px solid var(--line); cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.15rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .2s var(--ease), border-color .15s;
}
.theme-toggle:hover { transform: rotate(18deg) scale(1.06); border-color: var(--brand); }

/* مسار التنقل */
.crumbs { padding: 16px 0 0; font-size: .86rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; color: var(--faint); }
.crumbs li + li::before { content: '‹'; margin-inline-end: 8px; color: var(--faint); }
.crumbs a { color: var(--muted); font-weight: 700; }
.crumbs [aria-current] { color: var(--brand); font-weight: 800; }

/* ============ 4) الهيرو — لوحة فخمة ============ */
.hero { position: relative; }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: center; }
.hero.center, .hero.slim { display: block; }
.hero.slim { padding: 38px 0 10px; }
.hero.center { padding: 48px 0 12px; }

.hero-v4 {
  position: relative; display: block; margin-top: 26px; padding: clamp(28px, 4.5vw, 54px);
  border-radius: calc(var(--radius) + 10px); overflow: hidden;
  background: var(--grad-hero);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
  isolation: isolate;
}
.hero-v4::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(640px 320px at 6% -12%, rgba(255, 255, 255, .12), transparent 55%),
    radial-gradient(620px 340px at 106% 120%, rgba(245, 205, 99, .16), transparent 58%);
}
.hero-v4 h1 { color: #ffffff; text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.hero-v4 h1 em { font-style: normal; color: var(--gold-strong); }
.hero-v4 .hero-sub { color: rgba(240, 249, 243, .92); font-size: 1.06rem; max-width: 58ch; }
.hero-v4 .hero-badge { color: var(--gold-strong); }
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.aurora { position: absolute; border-radius: 50%; filter: blur(64px); opacity: .38; pointer-events: none; }
.aurora.a1 { width: 360px; height: 360px; background: rgba(53, 211, 137, .32); top: -130px; inset-inline-start: -110px; }
.aurora.a2 { width: 320px; height: 320px; background: rgba(245, 205, 99, .24); bottom: -130px; inset-inline-end: -90px; }
.aurora.a3 { width: 260px; height: 260px; background: rgba(255, 255, 255, .10); top: 30%; inset-inline-end: 24%; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .16);
  color: var(--gold-strong); font-family: var(--font-head); font-weight: 800; font-size: .85rem;
  border-radius: 999px; padding: 7px 16px; backdrop-filter: blur(6px);
}
html[data-theme="light"] .hero-badge { background: rgba(255, 255, 255, .14); }
.hero-badge b { font-weight: 900; }
.hero-txt > h1 { margin: 16px 0 10px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(240, 249, 243, .95); font-size: .8rem; font-weight: 700; font-family: var(--font-head);
  border-radius: 999px; padding: 6px 13px;
}
html[data-theme="light"] .chip { background: rgba(255, 255, 255, .12); }

/* بطاقة الكود المميز — جوهرة الهيرو */
.featured-code {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: calc(var(--radius) + 4px); padding: 24px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 54px rgba(0, 0, 0, .35);
  transition: transform .25s var(--ease); will-change: transform;
}
.featured-code.fc-verified { border-color: rgba(245, 205, 99, .45); background: rgba(245, 205, 99, .07); }
.fc-ring {
  position: absolute; inset: -7px; border-radius: inherit; pointer-events: none; z-index: -1;
  background: conic-gradient(from 0deg, rgba(245,205,99,.55), rgba(53,211,137,.35), rgba(245,205,99,.55));
  opacity: .5; filter: blur(14px);
}
.featured-code.fc-verified .fc-ring { opacity: .85; }
.fc-label { font-size: .82rem; font-weight: 800; font-family: var(--font-head); color: var(--gold-strong); display: inline-flex; align-items: center; gap: 6px; }
.fc-value {
  font-family: var(--mono); font-weight: 700; direction: ltr; text-align: center;
  font-size: clamp(1.5rem, 3.4vw, 2.05rem); letter-spacing: .04em; color: #ffffff;
  background: rgba(0, 0, 0, .30); border: 1px dashed rgba(255, 255, 255, .22); border-radius: var(--radius-sm);
  padding: 16px 12px; cursor: copy; text-shadow: 0 2px 12px rgba(0, 0, 0, .3);
  transition: border-color .15s, transform .15s;
}
.fc-value:hover { border-color: var(--gold-strong); transform: scale(1.015); }
.featured-code.fc-verified .fc-value { color: var(--gold-strong); border-color: rgba(245, 205, 99, .4); }
.fc-sub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fc-tile {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .10); border-radius: var(--radius-xs);
  padding: 10px 6px;
}
.fc-tile b { font-family: var(--font-head); font-weight: 900; font-size: 1.06rem; color: #fff; font-variant-numeric: tabular-nums; }
.fc-tile span { font-size: .68rem; color: rgba(240, 249, 243, .75); font-weight: 700; }
.fc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fc-note { font-size: .74rem; color: rgba(240, 249, 243, .66); text-align: center; margin: 0; }

/* ============ 5) الأزرار — نظام موحد ============ */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-family: var(--font-head); font-weight: 800; font-size: .95rem; line-height: 1.5;
  cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s, background .15s, border-color .15s, color .15s;
  user-select: none; text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-gold { background: var(--gold-grad); color: #241a04; box-shadow: var(--shadow-gold); }
.btn-gold:hover { box-shadow: 0 14px 32px rgba(217, 169, 54, .45); }
.btn-ghost { background: var(--card-2); border-color: var(--line); color: var(--txt); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-open { background: var(--grad-brand); color: #062015; box-shadow: 0 8px 22px rgba(53, 211, 137, .30); }
html[data-theme="light"] .btn-open { color: #fff; }
.btn-copy { background: var(--card-hi); border-color: var(--line); color: var(--txt); }
.btn-copy:hover, .btn-copy.done { border-color: var(--brand); color: var(--brand); }
.btn-copy.done { background: var(--brand-soft); }
.btn-hero { padding: 15px 30px; font-size: 1.04rem; border-radius: 16px; }
.btn-primary { background: var(--grad-brand); color: #062015; font-weight: 800; }
html[data-theme="light"] .btn-primary { color: #fff; }
.btn.mini { padding: 7px 14px; font-size: .82rem; border-radius: var(--radius-xs); }
.btn.mini.gold { background: var(--gold-grad); color: #241a04; border-color: transparent; }
.btn.mini.warn { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0);
  background: rgba(255, 255, 255, .35); animation: rippleGo .6s ease-out forwards;
}
html[data-theme="light"] .btn-ghost .ripple, html[data-theme="light"] .ctab .ripple { background: rgba(11, 45, 30, .18); }
@keyframes rippleGo { to { transform: scale(2.6); opacity: 0; } }

/* ============ 6) الشريط الحي (التِكر) ============ */
.ticker {
  display: flex; align-items: center; gap: 0; margin: 22px auto 0; max-width: var(--wrap);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); overflow: hidden;
}
.ticker-label {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-soft); color: var(--gold-strong); border-inline-end: 1px solid var(--line);
  font-family: var(--font-head); font-weight: 800; font-size: .82rem; padding: 10px 16px;
}
.ticker-view { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: inline-flex; align-items: center; gap: 26px; width: max-content; padding: 10px 0; animation: tickerMove 42s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { font-size: .85rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.ticker-item b { color: var(--brand); font-family: var(--mono); font-weight: 700; }
.ticker-dot { color: var(--gold-deep); font-size: .5rem; }
@keyframes tickerMove { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ============ 7) تنبيه الاستقلالية + الإحصائيات ============ */
.disclaimer {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--amber-soft); border: 1px solid rgba(255, 180, 84, .22); border-radius: var(--radius-sm);
  padding: 14px 18px; margin: 22px 0 0; font-size: .88rem; color: var(--muted);
}
html[data-theme="light"] .disclaimer { background: rgba(163, 92, 0, .07); border-color: rgba(163, 92, 0, .20); }
.disclaimer strong { color: var(--amber); }
.disclaimer .d-ic { font-size: 1.15rem; line-height: 1.7; }

.stats-bar {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 22px;
}
.stat {
  background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 10px; text-align: center; position: relative; overflow: hidden;
}
.stat::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: var(--grad-brand); opacity: .8; }
.stat:nth-child(2)::before { background: var(--gold-grad); }
.stat strong { display: block; font-family: var(--font-head); font-weight: 900; font-size: 1.55rem; line-height: 1.3; color: var(--txt); font-variant-numeric: tabular-nums; }
.stat span { font-size: .74rem; color: var(--faint); font-weight: 700; }
.stats-note { margin: 12px 0 0; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--card); }
.stats-note summary {
  cursor: pointer; padding: 11px 16px; font-size: .82rem; font-weight: 800; font-family: var(--font-head); color: var(--faint);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.stats-note summary::-webkit-details-marker { display: none; }
.stats-note summary::before { content: '▸'; transition: transform .2s; color: var(--brand); }
.stats-note[open] summary::before { transform: rotate(90deg); }
.stats-note-body { padding: 0 16px 14px; }
.stats-note-body p { font-size: .82rem; margin: .4em 0; }

/* ============ 8) عناوين الأقسام — شارة ذهبية جانبية ============ */
.section h2, .guide-box h2, .faq h2 { position: relative; padding-inline-start: 18px; }
.section h2::before, .guide-box h2::before, .faq h2::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .35em; bottom: .35em; width: 5px;
  border-radius: 99px; background: var(--gold-grad);
}
.sec-cta {
  font-size: .78rem; font-weight: 800; font-family: var(--font-head);
  color: var(--gold); border: 1px dashed var(--gold-deep); border-radius: 999px;
  padding: 6px 14px; margin-inline-start: 10px; white-space: nowrap; vertical-align: middle;
  display: inline-block; transition: background .15s, color .15s;
}
.sec-cta:hover { background: var(--gold-soft); color: var(--gold-strong); }

/* ============ 9) فلاتر الأكواد + البحث ============ */
.ctabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.ctab {
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
  font-family: var(--font-head); font-weight: 800; font-size: .88rem;
  border-radius: 999px; padding: 9px 18px; cursor: pointer; position: relative; overflow: hidden;
  transition: all .18s var(--ease);
}
.ctab:hover { color: var(--txt); border-color: var(--brand); }
.ctab.on { background: var(--grad-brand); color: #062015; border-color: transparent; box-shadow: 0 6px 16px rgba(53, 211, 137, .28); }
html[data-theme="light"] .ctab.on { color: #fff; }
.search-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 18px; }
.search-bar input[type="search"] {
  flex: 1; min-width: 220px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 18px; color: var(--txt); font-family: var(--font); font-size: .98rem; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-bar input[type="search"]:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.search-count { font-size: .8rem; font-weight: 800; font-family: var(--font-head); color: var(--gold); }

/* ============ 10) شريط الأكثر طلبًا ============ */
.top-strip-wrap { margin: 6px 0 20px; }
.ts-title { font-size: 1rem; font-weight: 800; margin-bottom: 10px; }
.top-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.ts-card {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 8px 7px 16px;
  padding-inline-start: 16px;
}
.ts-code {
  background: none; border: 0; cursor: copy; color: var(--gold); font-family: var(--mono);
  font-weight: 700; font-size: .95rem; direction: ltr; padding: 4px 2px;
}
.ts-code:hover { color: var(--gold-strong); }
.ts-v { color: var(--gold-strong); font-style: normal; font-weight: 900; font-size: .85rem; }
.ts-n { font-size: .72rem; color: var(--faint); font-weight: 800; background: var(--card-2); border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px 10px; font-style: normal; }
.ts-note { font-size: .74rem; color: var(--faint); margin: 6px 0 0; }

/* ============ 11) شبكة بطاقات الأكواد — القلب ============ */
.codes-wrap { margin-top: 6px; }
.codes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.code-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.code-card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow-soft); }
.code-card.verified { border-color: rgba(245, 205, 99, .5); background: linear-gradient(180deg, rgba(245, 205, 99, .07), var(--card) 55%); }
.code-card.expired { opacity: .58; filter: saturate(.5); }
.code-card.cdead { opacity: .78; }
.code-top { position: relative; }
.save-code {
  position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card-2); border: 1px solid var(--line); color: var(--faint);
  font-size: 1rem; transition: all .18s var(--ease); user-select: none;
}
.save-code:hover { color: var(--gold); border-color: var(--gold); transform: scale(1.1); }
.save-code.saved { color: var(--gold); border-color: var(--gold-deep); background: var(--gold-soft); }
.code-val {
  display: block; width: 100%; font-family: var(--mono); font-weight: 700;
  font-size: 1.22rem; text-align: center; direction: ltr;
  color: var(--txt); background: var(--inset); border: 1px solid var(--line);
  border-radius: var(--radius-xs); padding: 14px 10px; cursor: copy;
  transition: border-color .15s, color .15s, transform .15s;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.code-card.verified .code-val { color: var(--gold-strong); border-color: rgba(245, 205, 99, .4); }
.code-val:hover { border-color: var(--brand); transform: scale(1.01); }
.code-badge {
  position: absolute; top: -9px; inset-inline-end: 10px;
  font-size: .66rem; font-weight: 800; font-family: var(--font-head);
  padding: 3px 10px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
}
.badge-verified { background: var(--gold-grad); color: #241a04; box-shadow: 0 4px 10px rgba(217, 169, 54, .3); }
.badge-proven { background: var(--info-soft); color: var(--info); border-color: rgba(124, 184, 255, .3); }
.badge-top { background: var(--danger-soft); color: var(--danger); }
.badge-fresh { background: var(--brand-soft); color: var(--brand); }
.badge-new { background: var(--card-hi); color: var(--faint); border-color: var(--line); }
.badge-expired, .badge-cdead { background: var(--danger-soft); color: var(--danger); }
.code-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .76rem; color: var(--faint); font-weight: 700; min-height: 1.4em; }
.code-name { color: var(--muted); }
.code-time { color: var(--faint); }
.code-uses, .code-ratio { color: var(--brand); }
.code-ratio.pop { display: inline-block; }
.code-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.code-actions .btn { font-size: .86rem; padding: 11px 8px; border-radius: var(--radius-xs); }
.code-report {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  background: var(--card-2); border: 1px solid var(--line-soft); border-radius: var(--radius-xs);
  padding: 7px 10px;
}
.code-report.vp-hint { animation: hintPulse 1.1s ease-in-out 3; border-color: var(--gold-deep); }
@keyframes hintPulse { 50% { box-shadow: 0 0 0 4px var(--gold-soft); } }
.rp-label { font-size: .72rem; color: var(--faint); font-weight: 800; }
.rpt {
  background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  font-size: .74rem; font-weight: 800; font-family: var(--font-head); color: var(--muted);
  padding: 5px 11px; transition: all .15s;
}
.rpt-ok:hover { color: var(--ok); border-color: var(--ok); background: var(--brand-soft); }
.rpt-bad:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.rpt.done { opacity: .55; cursor: default; }
.code-share { display: flex; align-items: center; gap: 7px; }
.cs-label { font-size: .72rem; color: var(--faint); font-weight: 800; margin-inline-end: 2px; }
.shr {
  width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--card-2); border: 1px solid var(--line); color: var(--muted);
  transition: all .15s var(--ease);
}
.shr:hover { transform: translateY(-2px); color: #fff; }
.shr-wa:hover { background: #25d366; border-color: #25d366; }
.shr-tw:hover { background: #111; border-color: #111; }
.shr-tg:hover { background: #2aa5e0; border-color: #2aa5e0; }
.shr-more:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.more-link { text-align: center; margin-top: 22px; }
.empty-note {
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius-sm);
  color: var(--muted); text-align: center; padding: 28px 18px; font-size: .92rem; font-weight: 700;
}

/* ============ 12) نموذج التبادل — لوحة ذهبية ============ */
.exchange { margin-top: 30px; }
.ex-card {
  background:
    radial-gradient(600px 240px at 100% 0%, var(--gold-soft), transparent 55%),
    var(--card);
  border: 1px solid rgba(245, 205, 99, .30); border-radius: calc(var(--radius) + 6px);
  padding: clamp(20px, 3.4vw, 34px); box-shadow: var(--shadow-soft);
}
.ex-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.ex-ic {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 18px; font-size: 1.6rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-grad); box-shadow: var(--shadow-gold);
}
.ex-head h2 { margin-bottom: 4px; }
.ex-head p { margin: 0; font-size: .92rem; }
.ex-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.ex-step {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--card-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 12px 14px;
}
.ex-step span {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-brand); color: #062015; font-weight: 900; font-family: var(--font-head); font-size: .85rem;
}
html[data-theme="light"] .ex-step span { color: #fff; }
.ex-step strong { font-size: .88rem; display: block; line-height: 1.5; }
.ex-step small { font-size: .74rem; color: var(--faint); display: block; }
.ex-form { margin-top: 4px; }
.ex-fields { display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 10px; }
.ex-fields input {
  background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 16px; color: var(--txt); font-family: var(--font); font-size: .96rem; outline: none;
  transition: border-color .15s, box-shadow .15s; min-width: 0;
}
.ex-fields input:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 4px var(--gold-soft); }
.ex-fields input[dir="ltr"] { font-family: var(--mono); font-weight: 600; text-align: center; letter-spacing: .03em; }
.hp { position: absolute; inset-inline-start: -9999px; opacity: 0; height: 0; overflow: hidden; }
.ex-msg { min-height: 1.5em; margin-top: 10px; font-size: .88rem; font-weight: 700; font-family: var(--font-head); }
.ex-msg.ok { color: var(--ok); }
.ex-msg.err { color: var(--danger); }
.ex-benefits { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; font-size: .8rem; color: var(--muted); font-weight: 700; }
.ex-note { font-size: .74rem; color: var(--faint); margin: 10px 0 0; }

/* ============ 13) صف المشاركة ============ */
.share-row { display: flex; align-items: center; gap: 9px; margin: 26px 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.sr-share-label { font-size: .8rem; font-weight: 800; font-family: var(--font-head); color: var(--faint); }
.home-share { justify-content: center; }

/* ============ 14) الخطوات والميزات ============ */
.steps-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.step-card {
  position: relative; background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 6px;
  transition: transform .2s var(--ease), border-color .2s;
}
.step-card:hover { transform: translateY(-4px); border-color: var(--brand); }
.st-num {
  position: absolute; top: -16px; inset-inline-start: 18px;
  width: 38px; height: 38px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-grad); color: #241a04; font-weight: 900; font-family: var(--font-head); font-size: 1.1rem;
  box-shadow: var(--shadow-gold);
}
.step-card strong { font-size: 1rem; margin-top: 8px; }
.step-card p { font-size: .88rem; margin: 0; }
ol.steps li { margin: .7em 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; }
.feat-card { background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 6px; transition: transform .2s var(--ease), border-color .2s; }
.feat-card:hover { transform: translateY(-4px); border-color: var(--gold-deep); }
.fc-ic {
  width: 46px; height: 46px; border-radius: 14px; font-size: 1.3rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); margin-bottom: 4px;
}
.feat-card strong { font-size: .98rem; }
.feat-card p { font-size: .86rem; margin: 0; }

/* أعمدة رباعية (صفحات الدليل) */
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 18px 0; }
.pillar-card {
  background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  transition: transform .2s var(--ease), border-color .2s;
}
.pillar-card:hover { transform: translateY(-4px); border-color: var(--brand); }
.pillar-card strong { font-size: .96rem; }
.pillar-card a { font-weight: 800; }
.pc-ic { width: 44px; height: 44px; border-radius: 13px; font-size: 1.25rem; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); }
.pc-desc { font-size: .82rem; color: var(--faint); line-height: 1.8; }

/* نصائح */
ul.tips { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 18px 18px 34px; }
ul.tips li::marker { color: var(--gold); }

/* ============ 15) فاحص الصيغة ============ */
.checker-sec .checker {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px;
}
.checker input[type="text"] {
  flex: 1; min-width: 220px;
  background: var(--inset); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 18px; color: var(--txt); font-family: var(--mono); font-weight: 600; font-size: 1.05rem;
  text-align: center; letter-spacing: .04em; outline: none; transition: border-color .15s, box-shadow .15s;
}
.checker input[type="text"]:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.checker-msg { width: 100%; min-height: 1.6em; margin: 6px 0 0; font-size: .88rem; font-weight: 800; font-family: var(--font-head); }
.checker-msg.ok { color: var(--ok); }
.checker-msg.bad { color: var(--danger); }
.checker-note { font-size: .8rem; color: var(--faint); }

/* ============ 16) جدول المقارنة ============ */
.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-top: 16px; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.cmp-table th, .cmp-table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); text-align: start; }
.cmp-table thead th { background: var(--card-2); font-family: var(--font-head); font-weight: 800; color: var(--txt); position: sticky; top: 0; }
.cmp-table td:first-child { font-weight: 700; color: var(--muted); }
.cmp-table .c-y { color: var(--ok); font-weight: 900; text-align: center; }
.cmp-table .c-m { color: var(--amber); font-weight: 800; text-align: center; }
.cmp-table .c-n { color: var(--danger); font-weight: 800; text-align: center; }
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table tbody tr:hover td { background: var(--card-2); }

/* ============ 17) الأسئلة الشائعة ============ */
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.faq-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; transition: border-color .2s;
}
.faq-item[open] { border-color: var(--brand); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; padding: 16px 20px; list-style: none;
  font-family: var(--font-head); font-weight: 800; font-size: 1rem; color: var(--txt);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 1rem; line-height: 1.6; }
.faq-item .chev { flex-shrink: 0; color: var(--gold); transition: transform .25s var(--ease); font-size: .9rem; }
.faq-item[open] .chev { transform: rotate(180deg); }
.faq-a { padding: 0 20px 16px; }
.faq-a p { margin: 0; font-size: .92rem; }

/* صندوق الدليل السفلي */
.guide-box {
  background: linear-gradient(140deg, var(--brand-ink), var(--card)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; margin: 30px 0 0;
}
.guide-box .steps { margin: 8px 0 0; }

/* روابط ذات صلة */
.mesh-links { margin: 26px 0 0; }
.mesh-links ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.mesh-links a {
  display: inline-block; background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px; font-weight: 800; font-size: .86rem; font-family: var(--font-head); color: var(--muted);
  transition: all .15s var(--ease);
}
.mesh-links a:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-2px); }

/* ============ 18) الفوتر ============ */
.site-footer {
  margin-top: 40px; border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), var(--bg)); 
}
.footer-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; padding: 38px 22px 26px; }
.f-col h3 { font-size: 1rem; margin-bottom: 12px; color: var(--txt); }
.f-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.f-col a { color: var(--muted); font-size: .88rem; font-weight: 700; }
.f-col a:hover { color: var(--brand); }
.f-about p { font-size: .86rem; margin: .3em 0; }
.f-tagline { color: var(--faint); font-size: .8rem; font-weight: 700; }
.f-ksa { font-size: .84rem; }
.footer-bottom { border-top: 1px solid var(--line-soft); padding: 18px 22px 24px; display: flex; flex-direction: column; gap: 4px; }
.footer-bottom p { margin: 0; font-size: .8rem; color: var(--faint); }
.f-upd strong { color: var(--muted); font-weight: 800; }
.f-credit a { color: var(--gold); font-weight: 800; }
.disclaimer { margin-bottom: 0; }

/* ============ 19) شريط التبويبات السفلي (الجوال) ============ */
.tabbar {
  display: none; position: fixed; bottom: 0; inset-inline: 0; z-index: 110;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--line);
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px; border-radius: 12px; color: var(--faint);
  font-size: .68rem; font-weight: 800; font-family: var(--font-head);
  background: none; border: 0; cursor: pointer; transition: color .15s;
}
.tabbar .tab.on { color: var(--brand); }
.tabbar .tab.on svg { stroke-width: 2.6; }
.tabbar .tab:hover { color: var(--txt); }

/* ============ 20) الأزرار العائمة ============ */
.myfab {
  position: fixed; inset-inline-start: 18px; bottom: 92px; z-index: 105;
  width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--gold);
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-soft); transition: transform .18s var(--ease);
}
.myfab:hover { transform: scale(1.08); }
.myfab-badge {
  position: absolute; top: -4px; inset-inline-end: -4px;
  background: var(--gold-grad); color: #241a04; border-radius: 999px;
  font-size: .68rem; font-weight: 900; min-width: 19px; height: 19px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.share-fab {
  position: fixed; inset-inline-start: 18px; bottom: 150px; z-index: 105;
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--gold-grad); color: #241a04; border: 0; border-radius: 999px;
  padding: 12px 20px; font-family: var(--font-head); font-weight: 900; font-size: .92rem;
  box-shadow: 0 10px 26px rgba(217, 169, 54, .42); transition: transform .18s var(--ease);
}
.share-fab:hover { transform: scale(1.05); }
.sf-ic { font-size: 1.05rem; }
.totop {
  position: fixed; inset-inline-end: 18px; bottom: 92px; z-index: 105;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  background: var(--grad-brand); color: #062015; border: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-soft); opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: all .25s var(--ease);
}
html[data-theme="light"] .totop { color: #fff; }
.totop.show { opacity: 1; visibility: visible; transform: none; }
.totop i { font-style: normal; font-size: 1.15rem; }

/* ============ 21) لوحة «أكوادي» ============ */
.mypanel {
  position: fixed; inset-inline-start: 18px; bottom: 208px; z-index: 115;
  width: min(370px, calc(100vw - 36px)); max-height: 420px; overflow: auto;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: all .25s var(--ease);
}
.mypanel.open { opacity: 1; transform: none; pointer-events: auto; }
.mypanel[hidden] { display: block; visibility: hidden; }
.mypanel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.mypanel-head strong { font-family: var(--font-head); font-size: .95rem; }
.myclose { cursor: pointer; background: none; border: 0; color: var(--faint); font-size: 1rem; padding: 4px; }
.myclose:hover { color: var(--danger); }
.myp-note { font-size: .78rem; color: var(--faint); margin: 0 0 10px; }
.myc-list { display: flex; flex-direction: column; gap: 8px; }
.myc-item { display: flex; align-items: center; gap: 8px; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 8px 10px; }
.myc-code {
  flex: 1; cursor: pointer; font-family: var(--mono); font-weight: 700; font-size: .95rem;
  color: var(--txt); background: var(--inset); border: 1px dashed var(--line);
  border-radius: 8px; padding: 8px 9px; direction: ltr; text-align: center; letter-spacing: .02em;
  transition: border-color .15s, color .15s;
}
.myc-code:hover { color: var(--brand); border-color: var(--brand); }
.myc-del { cursor: pointer; background: none; border: 0; color: var(--faint); font-size: .9rem; padding: 4px; }
.myc-del:hover { color: var(--danger); }
.myc-empty { font-size: .82rem; color: var(--faint); text-align: center; padding: 14px 0 4px; }

/* ============ 22) لوحة المشاركة السفلية ============ */
.sheet-back { position: fixed; inset: 0; z-index: 130; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .25s; }
.sheet-back.show { opacity: 1; }
.share-sheet {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 131;
  margin: 0 auto; max-width: 560px;
  background: var(--card); border: 1px solid var(--line-strong); border-bottom: 0;
  border-radius: 24px 24px 0 0; padding: 18px 24px calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateY(105%); transition: transform .3s var(--ease);
  box-shadow: var(--shadow);
}
.share-sheet.open { transform: none; }
.sheet-bar { display: block; width: 46px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 0 auto 14px; }
.sheet-x {
  position: absolute; top: 14px; inset-inline-end: 14px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--muted);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1rem;
}
.sheet-x:hover { color: var(--danger); border-color: var(--danger); }
.share-sheet h3 { margin: 4px 0 6px; font-size: 1.18rem; }
.share-sheet p { font-size: .88rem; margin-bottom: 14px; }
.sheet-form { display: flex; flex-direction: column; gap: 9px; position: relative; }
.sheet-form input {
  background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 16px; font-family: var(--font); font-size: .98rem; color: var(--txt); outline: none;
  transition: border-color .15s, box-shadow .15s; min-width: 0;
}
.sheet-form input:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 4px var(--gold-soft); }
.sheet-form input[dir="ltr"] { font-family: var(--mono); font-weight: 600; letter-spacing: .03em; text-align: center; }
.sheet-go { width: 100%; justify-content: center; border-radius: var(--radius-sm); padding: 14px; font-size: 1rem; }
.sheet-bene { display: flex; justify-content: space-between; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.sheet-bene span { font-size: .76rem; color: var(--faint); font-weight: 800; }
body.sheet-lock { overflow: hidden; }

/* ============ 23) التوست + دعوة التثبيت ============ */
.toast {
  position: fixed; bottom: 110px; left: 50%; transform: translate(-50%, 16px); z-index: 240;
  background: var(--brand-ink); color: #fff; font-weight: 800; font-size: .9rem; font-family: var(--font-head);
  padding: 13px 24px; border-radius: 999px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all .25s var(--ease); max-width: calc(100vw - 40px); text-align: center;
}
html[data-theme="light"] .toast { background: #17221c; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.instpill {
  position: fixed; bottom: 92px; inset-inline-end: 18px; z-index: 105;
  background: var(--card); color: var(--txt); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 11px 18px; font-family: var(--font-head); font-weight: 800; font-size: .84rem;
  cursor: pointer; box-shadow: var(--shadow-soft);
  opacity: 0; transform: translateY(12px); transition: all .3s var(--ease); pointer-events: none;
}
.instpill.show { opacity: 1; transform: none; pointer-events: auto; }

/* ============ 24) المواقع الإعلانية ============ */
.ad-slot { margin: 20px 0; text-align: center; min-height: 0; }
.ad-tag { display: inline-block; font-size: .68rem; color: var(--faint); border: 1px solid var(--line); border-radius: 4px; padding: 1px 9px; margin-bottom: 6px; letter-spacing: .02em; }

/* ==========================================================================
   25) لوحة التحكم v8.0 — تصميم كامل جديد: شريط جانبي + شريط علوي + محتوى
   ========================================================================== */
.admin-body {
  font-size: 15px; line-height: 1.85;
  background:
    radial-gradient(900px 420px at 92% -6%, var(--brand-soft), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.admin-body h1, .admin-body h2, .admin-body h3 { line-height: 1.6; }

/* الهيكل: شريط جانبي ثابت + منطقة محتوى */
.adm-shell { display: flex; min-height: 100vh; }

/* — الشريط الجانبي (يمين الشاشة في RTL) — */
.adm-side {
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 160;
  width: 268px; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0d1811 0%, #0a120d 100%);
  border-inline-end: 1px solid var(--line);
  overflow-y: auto; scrollbar-width: thin;
  transition: transform .3s var(--ease);
}
html[data-theme="light"] .adm-side { background: linear-gradient(180deg, #10220f 0%, #0b180b 100%); }
.adm-brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px; border-bottom: 1px solid var(--line-soft); }
.adm-brand img { width: 42px; height: 42px; filter: drop-shadow(0 4px 10px rgba(53, 211, 137, .35)); }
.adm-brand-txt { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.adm-brand-txt strong { font-family: var(--font-head); font-weight: 900; font-size: 1.02rem; color: #f3faf6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-brand-txt small { font-size: .7rem; color: #90a597; font-weight: 700; }
.adm-brand-txt small b { color: var(--gold); }

.adm-nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 3px; }
.adm-group {
  font-size: .72rem; font-weight: 800; font-family: var(--font-head);
  color: var(--faint); margin: 14px 10px 5px; display: flex; align-items: center; gap: 8px;
}
.adm-group::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.adm-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border-radius: 12px;
  color: var(--muted); font-family: var(--font-head); font-weight: 800; font-size: .92rem;
  border: 1px solid transparent; position: relative;
  transition: all .16s var(--ease);
}
.adm-nav a .ic { width: 22px; text-align: center; font-size: 1.05rem; }
.adm-nav a:hover { background: var(--card-2); color: var(--txt); }
.adm-nav a.on {
  background: var(--brand-soft); color: var(--brand); border-color: rgba(53, 211, 137, .22);
}
.adm-nav a.on::before {
  content: ''; position: absolute; inset-inline-start: -12px; top: 20%; bottom: 20%; width: 3px;
  border-radius: 99px; background: var(--grad-brand);
}
.n-badge {
  margin-inline-start: auto; background: var(--gold-grad); color: #241a04;
  font-size: .7rem; font-weight: 900; border-radius: 999px; padding: 2px 9px; min-width: 22px; text-align: center;
}
.adm-side-foot { padding: 14px 12px 16px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 6px; }
.adm-side-foot a {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 10px;
  color: var(--muted); font-weight: 800; font-size: .86rem; font-family: var(--font-head);
  transition: all .15s;
}
.adm-side-foot a:hover { background: var(--card-2); color: var(--txt); }
.adm-side-foot a.adm-out { color: var(--danger); }
.adm-side-foot a.adm-out:hover { background: var(--danger-soft); }

/* — منطقة المحتوى — */
.adm-main { flex: 1; margin-inline-start: 268px; min-width: 0; display: flex; flex-direction: column; }
.adm-top {
  position: sticky; top: 0; z-index: 150;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 26px;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line-soft);
}
.adm-top h1 { margin: 0; font-size: 1.3rem; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.adm-top .adm-top-sub { font-size: .78rem; color: var(--faint); font-weight: 700; display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.adm-top .adm-top-sub b { color: var(--brand); }
.adm-burger {
  display: none; background: var(--card-2); border: 1px solid var(--line); color: var(--txt);
  border-radius: var(--radius-xs); padding: 8px 13px; cursor: pointer; font-size: 1.05rem; line-height: 1;
}
.adm-top-actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.adm-content { padding: 26px; max-width: 1320px; width: 100%; margin: 0 auto; }
.adm-backdrop { position: fixed; inset: 0; z-index: 155; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .25s; }
.adm-backdrop.show { opacity: 1; pointer-events: auto; }

/* — بطاقات المؤشرات (KPI) — */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi {
  display: flex; align-items: center; gap: 13px;
  background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 15px 16px; position: relative; overflow: hidden;
  transition: transform .18s var(--ease), border-color .18s;
}
.kpi:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.kpi-ic {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px; font-size: 1.3rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.kpi-body { min-width: 0; }
.kpi strong { display: block; font-family: var(--font-head); font-weight: 900; font-size: 1.42rem; line-height: 1.35; color: var(--txt); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi span { font-size: .74rem; color: var(--faint); font-weight: 800; line-height: 1.5; }
.kpi-green .kpi-ic { background: var(--brand-soft); color: var(--brand); }
.kpi-gold  .kpi-ic { background: var(--gold-soft); color: var(--gold); }
.kpi-red   .kpi-ic { background: var(--danger-soft); color: var(--danger); }
.kpi-blue  .kpi-ic { background: var(--info-soft); color: var(--info); }
.kpi-amber .kpi-ic { background: var(--amber-soft); color: var(--amber); }
.kpi-green::after, .kpi-gold::after, .kpi-red::after, .kpi-blue::after, .kpi-amber::after {
  content: ''; position: absolute; top: 0; inset-inline-start: 0; width: 3px; height: 100%;
}
.kpi-green::after { background: var(--grad-brand); }
.kpi-gold::after  { background: var(--gold-grad); }
.kpi-red::after   { background: var(--danger); }
.kpi-blue::after  { background: var(--info); }
.kpi-amber::after { background: var(--amber); }

/* — صف إجراءات سريعة — */
.act-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 22px; }
.act-card {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px;
}
.act-card h3 { margin: 0; font-size: .95rem; }
.act-card p { margin: 0; font-size: .78rem; color: var(--faint); min-height: 2.7em; }
.act-card .btn { width: 100%; }

/* — أقسام اللوحة — */
.admin-wrap { max-width: 1320px; margin: 0; padding: 0; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-head h1 { margin: 0; font-size: 1.4rem; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-links { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-links a {
  padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: .84rem; font-family: var(--font-head);
  color: var(--muted); background: var(--card); border: 1px solid var(--line);
}
.admin-links a:hover { color: var(--txt); border-color: var(--brand); }
.admin-sec {
  background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 20px;
}
.admin-sec h2 {
  margin-top: 0; font-size: 1.12rem; font-weight: 900;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px dashed var(--line);
}
.admin-sec h2 small { font-size: .76rem; font-weight: 700; color: var(--faint); }
.admin-sec h2 .muted { font-size: .82rem; }

/* — الجداول — */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.admin-tbl { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 640px; }
.admin-tbl th, .admin-tbl td { padding: 11px 13px; border-bottom: 1px solid var(--line-soft); text-align: start; vertical-align: middle; white-space: nowrap; }
.admin-tbl td.wrap-cell { white-space: normal; }
.admin-tbl th {
  font-family: var(--font-head); font-weight: 800; font-size: .78rem; color: var(--muted);
  background: var(--card-2); position: sticky; top: 0; z-index: 2;
  letter-spacing: 0;
}
.admin-tbl tbody tr { transition: background .12s; }
.admin-tbl tbody tr:hover td { background: var(--card-2); }
.admin-tbl tbody tr:last-child td { border-bottom: 0; }
.admin-tbl .cv-cell { font-variant-numeric: tabular-nums; }
.admin-tbl strong[dir="ltr"] { font-family: var(--mono); letter-spacing: .02em; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* — الشارات — */
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 800;
  padding: 4px 12px; border-radius: 999px; font-family: var(--font-head); border: 1px solid transparent;
}
.b-verified { background: var(--gold-soft); color: var(--gold); border-color: rgba(217, 169, 54, .35); }
.b-none { background: var(--card-hi); color: var(--faint); }
.b-expired { background: var(--danger-soft); color: var(--danger); }
.b-active { background: var(--brand-soft); color: var(--brand); }
.b-hidden { background: var(--info-soft); color: var(--info); }

/* — التنبيهات — */
.alert { border-radius: var(--radius-sm); padding: 13px 18px; margin: 0 0 16px; font-weight: 800; font-size: .9rem; font-family: var(--font-head); border: 1px solid; }
.alert.ok { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.alert.err { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.alert.warn { background: var(--gold-soft); border-color: transparent; color: var(--gold); }

/* — النماذج — */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.settings-form label, .admin-sec label {
  display: block; font-size: .8rem; font-weight: 800; color: var(--muted); margin: 12px 0 6px; font-family: var(--font-head);
}
.admin-sec input[type="text"], .admin-sec input[type="password"], .admin-sec input[type="url"],
.admin-sec input[type="number"], .admin-sec input[type="search"], .admin-sec textarea, .admin-sec select,
.settings-form input, .settings-form textarea, .settings-form select {
  width: 100%; background: var(--inset); border: 1px solid var(--line); border-radius: var(--radius-xs);
  padding: 11px 14px; color: var(--txt); font-family: var(--font); font-size: .92rem; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.admin-sec textarea { resize: vertical; line-height: 1.7; }
.admin-sec input:focus, .admin-sec textarea:focus, .admin-sec select:focus,
.settings-form input:focus, .settings-form textarea:focus, .settings-form select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack .btn { width: 100%; justify-content: center; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters input[type="search"] { flex: 1; min-width: 180px; max-width: 320px; }
.filters select { width: auto; min-width: 130px; }
.row-form { display: flex; gap: 6px; flex-wrap: wrap; }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 9px; }
.chk {
  display: flex; align-items: center; gap: 9px; font-size: .88rem; font-weight: 700; color: var(--muted);
  background: var(--card-2); border: 1px solid var(--line-soft); border-radius: var(--radius-xs); padding: 10px 12px;
  margin: 0 !important; cursor: pointer; transition: border-color .15s, color .15s;
}
.chk:hover { border-color: var(--brand); color: var(--txt); }
.chk input { accent-color: var(--brand); width: 17px; height: 17px; }
.link-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-bottom: 8px; }

/* — صفوف سيو الصفحات — */
.seo-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start;
  background: var(--card-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 10px;
}
.sr-name { font-weight: 900; font-family: var(--font-head); font-size: .92rem; display: flex; flex-direction: column; gap: 3px; }
.sr-slug { font-size: .74rem; color: var(--faint); font-weight: 700; font-family: var(--mono); }
.sr-fields { display: flex; flex-direction: column; gap: 8px; }
.sr-fields input { font-size: .86rem; }

/* — مقياس قوة كلمة المرور — */
.pw-meter { height: 6px; background: var(--inset); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .3s, background .3s; }

/* — فحص الصحة + السجل — */
.health { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0; }
.h-item {
  display: flex; align-items: center; gap: 9px; width: calc(50% - 4px);
  background: var(--card-2); border: 1px solid var(--line-soft); border-radius: var(--radius-xs);
  padding: 10px 13px; font-size: .85rem;
}
.h-item .ok, .h-item .bad { font-weight: 900; font-size: .95rem; }
.h-item .ok { color: var(--ok); }
.h-item .bad { color: var(--danger); }
.h-item strong { color: var(--txt); }
.h-item span:last-child { color: var(--muted); }
.log-view {
  background: var(--inset); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 14px; max-height: 300px; overflow: auto; font-size: .82rem; font-family: var(--mono);
  direction: ltr; text-align: left; scrollbar-width: thin;
}
.log-line { padding: 5px 0; border-bottom: 1px dashed var(--line-soft); display: flex; gap: 12px; align-items: baseline; }
.log-line span { color: var(--faint); white-space: nowrap; font-size: .74rem; }
.log-line.lv-warn { color: var(--amber); }
.log-line.lv-err { color: var(--danger); }
.log-line:last-child { border-bottom: 0; }

/* — ترقيم الصفحات — */
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.pager .pg {
  min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 9px;
  font-weight: 800; font-size: .84rem; color: var(--muted); font-family: var(--font-head);
  transition: all .14s;
}
.pager .pg:hover { color: var(--txt); border-color: var(--brand); }
.pager .pg.on { background: var(--grad-brand); color: #062015; border-color: transparent; }
html[data-theme="light"] .pager .pg.on { color: #fff; }

/* — عناصر مساعدة — */
.muted { color: var(--faint); font-weight: 700; }
.muted-sm { color: var(--faint); font-size: .78rem; font-weight: 700; }
.card { background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.empty-note {
  background: var(--card-2); border: 1px dashed var(--line); border-radius: var(--radius-sm);
  color: var(--faint); text-align: center; padding: 26px 18px; font-size: .88rem; font-weight: 700;
}
.srcs { gap: 8px; }
.cron-box {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--inset); border: 1px dashed var(--line); border-radius: var(--radius-xs);
  padding: 10px 14px; font-size: .8rem; color: var(--muted); margin-top: 12px;
}
.cron-box code { word-break: break-all; }

/* — صفحة التحديث update.php — */
.up-sec { background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.up-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card-2); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 16px; }
.up-mini { font-size: .82rem; color: var(--faint); }
.up-note { background: var(--info-soft); border-radius: var(--radius-xs); padding: 10px 14px; font-size: .82rem; color: var(--info); font-weight: 700; }
.up-ok { color: var(--ok); font-weight: 800; }
.up-bad { color: var(--danger); font-weight: 800; }

/* — صفحة الدخول — */
.login-card {
  max-width: 440px; margin: 9vh auto; position: relative;
  background: var(--grad-card); border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 6px); padding: 34px 30px 30px; box-shadow: var(--shadow);
  text-align: center; overflow: hidden;
}
.login-card::before { content: ''; position: absolute; top: 0; inset-inline: 0; height: 4px; background: var(--gold-grad); }
.login-card label { display: block; text-align: start; font-size: .82rem; font-weight: 800; color: var(--muted); margin: 16px 0 7px; font-family: var(--font-head); }
.login-card input {
  width: 100%; background: var(--inset); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 16px; color: var(--txt); font-family: var(--font); font-size: 1rem; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.login-card .btn { margin-top: 18px; min-width: 150px; justify-content: center; padding: 13px 26px; font-size: 1rem; }
.login-logo { margin-bottom: 10px; }
.login-logo img { width: 62px; height: 62px; filter: drop-shadow(0 6px 16px rgba(53, 211, 137, .4)); }
.login-card h1 { font-size: 1.35rem; margin-bottom: 4px; }
.login-sub { font-size: .84rem; color: var(--faint); margin: 0 0 6px; }
.login-hint { font-size: .78rem; color: var(--faint); margin-top: 16px; }
.login-stats {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 0;
  font-size: .78rem; color: var(--muted);
  background: var(--card-2); border: 1px solid var(--line-soft); border-radius: var(--radius-xs); padding: 8px 12px;
}
.login-stats strong { color: var(--brand); }
.alert { margin: 14px 0 0; }

/* ============ 25-b) بطاقات تحميل المتاجر الرسمية ============ */
.store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 16px; }
.store-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; color: var(--txt);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.store-card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow-soft); color: var(--txt); }
.store-ic {
  flex-shrink: 0; width: 54px; height: 54px; border-radius: 15px;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.store-android { background: linear-gradient(135deg, #3ddc84, #0f9d58); }
.store-ios { background: linear-gradient(135deg, #5b6bff, #2d3bd1); }
.store-txt { display: flex; flex-direction: column; line-height: 1.5; flex: 1; min-width: 0; }
.store-txt small { font-size: .74rem; color: var(--faint); font-weight: 700; }
.store-txt strong { font-family: var(--font-head); font-weight: 900; font-size: 1.08rem; }
.store-note { flex-shrink: 0; font-size: .72rem; font-weight: 800; color: var(--muted); background: var(--card-2); border: 1px solid var(--line-soft); border-radius: 999px; padding: 5px 12px; }

/* ==========================================================================
   26) التجاوب الشامل
   ========================================================================== */
@media (max-width: 1100px) {
  .hero-in { grid-template-columns: 1fr; gap: 28px; }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .ex-fields { grid-template-columns: 1fr 1fr; }
  .ex-fields .btn { grid-column: span 2; }
}
@media (max-width: 980px) {
  /* الشريط الجانبي يتحول لدرج منزلق */
  .adm-side { transform: translateX(105%); box-shadow: var(--shadow); }
  .adm-side.open { transform: none; }
  .adm-main { margin-inline-start: 0; }
  .adm-burger { display: inline-flex; }
  .adm-content { padding: 18px 16px; }
  .adm-top { padding: 12px 16px; }
  .h-item { width: 100%; }
  .seo-row { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  body { font-size: 16px; line-height: 1.85; }
  .wrap { padding: 0 16px; }
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: calc(100% + 10px); inset-inline: 16px; display: none; }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: 10px; box-shadow: var(--shadow);
  }
  .main-nav a { border-radius: var(--radius-xs); padding: 12px 15px; font-size: .95rem; }
  .brand-txt small { display: none; }
  .brand img { width: 40px; height: 40px; }
  .section { padding: 34px 0 14px; }
  .hero-v4 { margin-top: 14px; padding: 24px 18px; border-radius: var(--radius); }
  .fc-sub { grid-template-columns: repeat(3, 1fr); }
  .fc-tile b { font-size: .95rem; }
  .fc-tile span { font-size: .62rem; }
  .fc-actions { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: repeat(3, 1fr); gap: 9px; }
  .stat strong { font-size: 1.2rem; }
  .stat span { font-size: .66rem; }
  .codes-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
  .code-val { font-size: 1.1rem; padding: 13px 8px; }
  .code-actions .btn { font-size: .84rem; padding: 10px 6px; }
  .ex-steps { grid-template-columns: 1fr; }
  .ex-fields { grid-template-columns: 1fr; }
  .ex-fields .btn { grid-column: auto; }
  .cmp-table { font-size: .84rem; }
  .steps-cards { grid-template-columns: 1fr; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .ticker { border-radius: var(--radius-xs); }
  .ticker-label { font-size: .74rem; padding: 8px 10px; }

  /* شريط التبويبات السفلي + الأزرار العائمة — ترتيب مصحح */
  .tabbar { display: flex; }
  .myfab { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; }
  .share-fab {
    /* الإصلاح: كان الزر مخفيًا نهائيًا على الجوال — يظهر الآن فوق شريط التبويبات */
    display: flex;
    bottom: calc(134px + env(safe-area-inset-bottom, 0px));
    inset-inline-start: 14px;
    padding: 10px 16px; font-size: .86rem;
    box-shadow: 0 8px 22px rgba(217, 169, 54, .45);
  }
  .totop { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 14px; width: 44px; height: 44px; }
  .toast { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  .mypanel { inset-inline-start: 14px; bottom: calc(190px + env(safe-area-inset-bottom, 0px)); }
  .instpill { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 14px; }
  .footer-in { grid-template-columns: 1fr; gap: 22px; padding: 30px 16px 22px; }

  /* اللوحة على الجوال */
  .adm-content { padding: 14px 12px; }
  .admin-sec { padding: 16px 14px; border-radius: var(--radius-sm); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .kpi { padding: 11px 12px; gap: 9px; }
  .kpi-ic { width: 38px; height: 38px; font-size: 1.05rem; border-radius: 10px; }
  .kpi strong { font-size: 1.15rem; }
  .kpi span { font-size: .66rem; }
  .act-row { grid-template-columns: 1fr; }
  .adm-top h1 { font-size: 1.05rem; }
  .adm-top-actions { display: none; }
  .adm-top-sub { display: none; }
  .admin-tbl { font-size: .8rem; }
  .admin-tbl th, .admin-tbl td { padding: 9px 10px; }
}
@media (max-width: 420px) {
  .codes-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .code-actions { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .rp-label { display: none; }
  .code-report { gap: 6px; padding: 6px 8px; }
  .rpt { flex: 1; text-align: center; white-space: nowrap; font-size: .68rem; padding: 5px 7px; }
  .rpt-n { display: none; }
  .code-val { font-size: 1rem; padding: 11px 5px; letter-spacing: 0; }
  .save-code { width: 28px; height: 28px; font-size: .85rem; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .share-fab { padding: 10px 13px; font-size: .82rem; }
  .sf-tx { font-size: .8rem; }
}

/* ============ 27) حركة مخفضة ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ticker-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== v9.0 — تباين الهيرو في الوضع النهاري: الهيرو أخضر دائمًا فيحتاج الذهبي الساطع لا البني ===== */
html[data-theme="light"] .hero-v4 { --gold: #f5cd63; --gold-strong: #ffe08d; }
html[data-theme="light"] .hero-v4 .fc-value { color: #fff3c4; text-shadow: 0 1px 10px rgba(0,0,0,.25); }
html[data-theme="light"] .hero-v4 .fc-note, html[data-theme="light"] .hero-v4 .fc-tile span { color: rgba(255,255,255,.82); }
/* مرساة بطاقة الكود (روابط ItemList الداخلية) — لا تختفي تحت الهيدر الثابت */
.code-card[id] { scroll-margin-top: 90px; }
.code-card:target { outline: 3px solid var(--gold-strong); outline-offset: 3px; }
/* v9.0 — معاينة نتيجة البحث في تبويب السيو */
.serp { display: grid; gap: 2px; background: #fff; color: #202124; border-radius: 10px; padding: 10px 12px; margin-bottom: 4px; font-family: arial, "Tajawal", sans-serif; direction: rtl; }
.serp-url { font-size: 12px; color: #4d5156; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.serp-t { font-size: 18px; color: #1a0dab; line-height: 1.35; }
.serp-d { font-size: 13px; color: #4d5156; line-height: 1.55; }
.serp-c { font-size: .74rem; margin: -4px 2px 4px; display: block; }
.serp-c.ok { color: #7fe0ac; } .serp-c.warn { color: #ffd28a; }
html[data-theme="light"] .hero-v4 .hero-sub, html[data-theme="light"] .hero-v4 .hero-sub strong { color: #f3fbf6; }

/* ===== v10 — شريط البحث والفرز + شريط الثقة + زر النسخ والفتح ===== */
.code-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 4px; }
.code-toolbar input[type="search"] {
  flex: 1; min-width: 200px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 16px; color: var(--txt); font-family: var(--font); font-size: .95rem; outline: none;
}
.code-toolbar input[type="search"]:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.sort-lbl { font-size: .82rem; font-weight: 800; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.sort-lbl select { background: var(--card); color: var(--txt); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font-family: var(--font); }
.code-actions .btn-copyopen { grid-column: 1 / -1; font-size: .95rem; padding: 13px 10px; }
.code-vat { color: var(--gold); }
.trust { position: relative; height: 22px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line-soft); overflow: hidden; }
.trust i { position: absolute; inset-block: 0; inset-inline-start: 0; display: block; opacity: .55; }
.trust i.hi { background: var(--brand); } .trust i.mid { background: var(--gold-deep, #b8860b); } .trust i.lo { background: var(--danger); }
.trust span { position: relative; z-index: 1; display: block; text-align: center; font-size: .72rem; font-weight: 800; line-height: 22px; color: var(--txt); }

/* ===== v10 — قسم ما يبحث عنه الزوار ===== */
.kw-sub { color: var(--muted); font-size: .9rem; }
.kw-chips, .kw-q { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kw-chips a, .kw-q a {
  display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--txt); font-size: .86rem; font-weight: 700; text-decoration: none; transition: border-color .15s, background .15s;
}
.kw-chips a:hover, .kw-q a:hover { border-color: var(--brand); background: var(--brand-soft); }
.kw-qh { font-size: 1rem; margin: 16px 0 4px; }
.b-review { background: rgba(245, 205, 99, .18); color: #a67c00; }

.code-actions .btn-copyopen + .btn-copy { grid-column: 1 / -1; }
