/* ==========================================================================
   Bo-WebSystem — Design System v2
   Direction: "Workshop spec-sheet" — warm black, brand yellow, mono details
   ========================================================================== */


:root {
  --bg: #0a0b0d;
  --bg-2: #0e1013;
  --surface: #13161a;
  --surface-2: #191c21;
  --surface-3: #20242a;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #eceef1;
  --text-2: #b4bac3;
  --muted: #7d848e;

  --accent: #8b5cf6;
  --accent-text: #b197fc;
  --accent-2: #7c3aed;
  --accent-ink: #ffffff;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-line: rgba(139, 92, 246, 0.45);

  --ok: #3ddc97;
  --ok-soft: rgba(61, 220, 151, 0.12);
  --bad: #ff5d5d;
  --bad-soft: rgba(255, 93, 93, 0.12);
  --info: #6bb2ff;
  --info-soft: rgba(107, 178, 255, 0.12);
  --warn: #f0b429;
  --warn-soft: rgba(240, 180, 41, 0.14);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;

  --font: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-display: "Readex Pro", "IBM Plex Sans Arabic", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* منحنيات "شبيهة بالسبرينغ" — مستوحاة من أسلوب أبل بالحركة: دخول سريع واستقرار
     ناعم بدون ارتداد (critically damped) للعناصر العادية، ومنحنى فيه ارتداد خفيف
     للعناصر اللي فيها زخم/لمسة (فتح شيت، توست). */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --header-h: 72px;
  --sidebar-w: 270px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.mono { font-family: var(--font-mono); font-size: 0.86em; letter-spacing: 0; direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }

/* ---------- Hazard stripe (brand signature) ---------- */
.hazard {
  height: 6px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 12px, #0a0b0d 12px 24px);
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  --btn-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  height: 44px; padding: 0 1.2rem;
  border-radius: var(--r-sm);
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-weight: 600; font-size: 0.93rem; white-space: nowrap;
  transition: transform 0.1s ease-out, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:hover { background: var(--surface-3); border-color: rgba(255,255,255,.2); }
/* استجابة فورية وقت الضغط (مش وقت الإفراج) — إحساس "مباشر" بدل تأخير */
.btn:active { transform: scale(0.96); transition-duration: 0.08s; }
@media (prefers-reduced-motion: reduce) { .btn:active { transform: none; opacity: .85; } }
.btn i { font-size: 0.95em; }
.btn-primary { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); --btn-bd: var(--accent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.6); }
.btn-ghost { --btn-bg: transparent; }
.btn-danger { --btn-bg: var(--bad-soft); --btn-fg: var(--bad); --btn-bd: rgba(255, 93, 93, 0.3); }
.btn-danger:hover { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn-discord { --btn-bg: #5865f2; --btn-fg: #fff; --btn-bd: #5865f2; }
.btn-discord:hover { background: #4752c4; border-color: #4752c4; }
.btn-sm { height: 34px; padding: 0 0.8rem; font-size: 0.84rem; border-radius: 7px; }
.btn-lg { height: 52px; padding: 0 1.6rem; font-size: 1rem; }
.btn-icon { width: 40px; padding: 0; }
.btn-block { width: 100%; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  height: 26px; padding: 0 0.65rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.no-dot::before { display: none; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-accent { background: var(--accent-soft); color: var(--accent-text); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em;
  color: var(--accent-text); text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); }

/* ==========================================================================
   SITE HEADER
   ========================================================================== */
.site-header {
  position: sticky; top: 14px; z-index: 50;
  height: var(--header-h);
  width: min(1180px, calc(100% - 2rem)); margin-inline: auto;
  background: rgba(14, 15, 19, 0.72);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  box-shadow: 0 24px 50px -26px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.04);
  transition: box-shadow .3s var(--ease-spring), border-color .3s;
}
.site-header:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line-2)); }
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: #0e0f13; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.site-header .container { max-width: none; height: 100%; display: flex; align-items: center; gap: 2rem; padding-inline: 1.5rem; }
.hazard { position: relative; z-index: 51; }

.brand { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.brand img { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; line-height: 1.35; }
.brand-name small { display: block; margin-top: 1px; line-height: 1.2; font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); font-weight: 400; letter-spacing: 0.06em; }

.site-nav { display: flex; align-items: center; gap: 0.25rem; margin-inline-end: auto; }
.site-nav a {
  position: relative; padding: 0.5rem 0.9rem; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; font-size: 0.93rem;
  transition: color 0.2s, background 0.2s, transform 0.08s ease-out;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a:active { transform: scale(0.95); }
.site-nav a.active {
  color: #fff; background: linear-gradient(95deg, var(--accent), var(--accent-2nd));
  box-shadow: 0 6px 18px -6px var(--glow-purple);
}

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

/* user menu */
.user-menu { position: relative; }
.user-trigger {
  display: flex; align-items: center; gap: 0.6rem;
  height: 44px; padding: 0 0.4rem 0 0.9rem;
  padding-inline: 0.4rem 0.9rem;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface);
  transition: background 0.2s;
}
.user-trigger:hover { background: var(--surface-2); }
.user-trigger img { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); }
.user-trigger span { font-weight: 600; font-size: 0.9rem; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-trigger i { font-size: 0.7rem; color: var(--muted); transition: transform 0.2s; }
.user-menu.open .user-trigger i { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0;
  min-width: 230px; padding: 0.4rem;
  background: rgba(23, 25, 30, 0.82);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--shadow);
  /* يتولّد من زاوية الزر اللي فتحه (نفس المكان يلي طلع منه) — مش من النص */
  transform-origin: top left;
  opacity: 0; visibility: hidden; transform: scale(0.94) translateY(-6px);
  transition: 0.22s var(--ease-spring);
}
.user-menu.open .dropdown { opacity: 1; visibility: visible; transform: none; }
@media (prefers-reduced-transparency: reduce) {
  .dropdown { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.dropdown-head { padding: 0.6rem 0.75rem 0.7rem; border-bottom: 1px solid var(--line); margin-bottom: 0.3rem; }
.dropdown-head b { display: block; font-size: 0.92rem; }
.dropdown-head small { color: var(--muted); }
.dropdown a {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0.75rem; border-radius: var(--r-sm); font-size: 0.9rem; color: var(--text-2);
}
.dropdown a:hover { background: var(--surface-2); color: var(--text); }
.dropdown a i { width: 18px; text-align: center; color: var(--muted); }
.dropdown a.danger, .dropdown a.danger i { color: var(--bad); }

.nav-toggle { display: none; }

/* mobile drawer — شيت زجاجي شفاف، بيدخل ويخرج من نفس الجهة (مسار متماثل) */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: 0.3s var(--ease);
}
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 100;
  width: min(320px, 85vw); padding: 1.2rem;
  background: rgba(14, 16, 19, 0.78);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-inline-end: 1px solid var(--line-2);
  transform: translateX(100%); transition: transform 0.38s var(--ease-spring);
  display: flex; flex-direction: column; gap: 1.5rem;
}
.drawer-open .drawer { transform: none; }
.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
@media (prefers-reduced-transparency: reduce) {
  .drawer { background: var(--bg-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer nav { display: flex; flex-direction: column; gap: 0.25rem; }
.drawer nav a {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 0.9rem;
  border-radius: var(--r-sm); color: var(--text-2); font-weight: 500;
}
.drawer nav a i { width: 20px; text-align: center; color: var(--muted); }
.drawer nav a:hover, .drawer nav a.active { background: var(--surface); color: var(--text); }
.drawer nav a.active i { color: var(--accent-text); }
.drawer-foot { margin-top: auto; }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header .container { gap: 0.75rem; justify-content: space-between; }
  .user-trigger span { display: none; }
  .header-actions .btn-discord span { display: none; }
  .header-actions .btn-discord { width: 44px; padding: 0; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; width: 640px; height: 640px; border-radius: 50%;
  inset-inline-end: -180px; top: -240px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22), transparent 65%);
  pointer-events: none;
}
.hero .container {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3.5rem; align-items: center;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 5.6vw, 4.4rem); line-height: 1.06; letter-spacing: -0.025em;
  margin: 1.1rem 0 1.2rem;
}
.hero h1 em { font-style: normal; color: var(--accent-text); }
.hero p.lead { color: var(--text-2); font-size: 1.06rem; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.stats { display: flex; gap: 2.5rem; margin-top: 2.8rem; padding-top: 1.6rem; border-top: 1px dashed var(--line-2); }
.stat b { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1; }
.stat span { color: var(--muted); font-size: 0.85rem; }

/* Terminal card */
.terminal {
  background: #07080a; border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow), 0 0 0 6px rgba(255, 255, 255, 0.02);
  overflow: hidden; direction: ltr; text-align: left;
}
.terminal-bar {
  display: flex; align-items: center; gap: 0.45rem; padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-3); }
.terminal-bar i:first-child { background: #ff5f57; } .terminal-bar i:nth-child(2) { background: #febc2e; } .terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span { margin-left: auto; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.terminal-body { padding: 1.2rem 1.2rem 1.4rem; font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.9; min-height: 250px; }
.terminal-body .ln { white-space: pre-wrap; opacity: 0; transform: translateY(4px); transition: 0.3s; }
.terminal-body .ln.on { opacity: 1; transform: none; }
.t-mut { color: #5d646e; } .t-acc { color: var(--accent-text); } .t-ok { color: var(--ok); } .t-info { color: var(--info); } .t-bad { color: var(--bad); }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; gap: 2.5rem; }
  .stats { gap: 1.6rem; flex-wrap: wrap; }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; margin-top: 0.6rem; line-height: 1.2; letter-spacing: -0.015em; }
.section-head p { color: var(--muted); max-width: 560px; margin-top: 0.5rem; }

/* page header for inner pages */
.page-head { padding-block: 3rem 2rem; position: relative; }
.page-head h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; margin-top: 0.6rem; line-height: 1.2; letter-spacing: -0.015em; }
.page-head p { color: var(--muted); max-width: 640px; margin-top: 0.5rem; }

/* ---------- Tabs ---------- */
.tabs { display: inline-flex; gap: 0.25rem; padding: 0.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 0.5rem;
  height: 38px; padding: 0 1rem; border-radius: 9px;
  color: var(--text-2); font-weight: 600; font-size: 0.9rem; transition: 0.2s;
}
.tab:hover { color: var(--text); }
.tab .count { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); background: var(--surface-3); padding: 0 0.45rem; border-radius: 6px; }
.tab.active { background: var(--accent); color: var(--accent-ink); }
.tab.active .count { background: rgba(255, 255, 255, 0.2); color: var(--accent-ink); }

/* ---------- Product grid — staged art panel + solid label plate ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.card {
  --tint: var(--accent); --tint-text: var(--accent-text); --tint-soft: var(--accent-soft);
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: 0 1px 0 var(--line-2) inset;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card[data-type="web"]   { --tint: var(--info);  --tint-text: var(--info);  --tint-soft: var(--info-soft); }
.card[data-type="bot"]   { --tint: var(--warn);  --tint-text: var(--warn);  --tint-soft: var(--warn-soft); }
.card[data-type=""]      { --tint: var(--ok);    --tint-text: var(--ok);    --tint-soft: var(--ok-soft); } /* free items: no type attr */
.card:hover { border-color: color-mix(in srgb, var(--tint) 45%, var(--line-2)); box-shadow: 0 28px 54px -24px rgba(0,0,0,.65); }
.card.no-tilt:hover { transform: translateY(-5px); }
.card:focus-within { box-shadow: 0 0 0 2px var(--tint); }

/* art is "staged" on its own tinted backdrop and never cropped — logos, screenshots,
   portrait or landscape art all sit centered with breathing room instead of being
   force-cropped to fill the tile (which mangled badge-style logos). */
.card-media {
  position: relative; aspect-ratio: 16 / 11; overflow: hidden;
  background:
    radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--tint) 16%, transparent), transparent 65%),
    var(--surface-2);
  border-bottom: 1px solid var(--line-2);
}
.card-media::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 48%; pointer-events: none;
  background: linear-gradient(0deg, rgba(5,6,8,.5), transparent);
}
.card-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: center; padding: 10%; box-sizing: border-box;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
  transition: transform 0.45s var(--ease), opacity 0.3s;
}
.card:hover .card-media img { transform: scale(1.045); }
/* shimmer placeholder while الصورة بتحمّل (JS بتشيل الكلاس لما تخلص) */
.card-media.loading img { opacity: 0; }
.card-media.loading::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, var(--surface-2) 38%, var(--surface-3) 50%, var(--surface-2) 62%);
  background-size: 220% 100%; animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }

/* شارة "جديد" لآخر المنتجات المضافة */
.card-ribbon {
  position: absolute; bottom: .65rem; inset-inline-start: .65rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .28rem .6rem; border-radius: 999px; font-size: .7rem; font-weight: 700;
  background: var(--ok-soft); color: var(--ok); border: 1px solid rgba(61,220,151,.35);
  backdrop-filter: blur(6px);
}
.card-ribbon i { font-size: .62rem; }

.card-type {
  position: absolute; top: .65rem; inset-inline-start: .65rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .6rem; border-radius: 999px;
  background: var(--surface); backdrop-filter: blur(8px);
  border: 1px solid color-mix(in srgb, var(--tint) 45%, transparent);
  color: var(--tint-text); font-size: .7rem; font-weight: 600;
}
.card-type i { font-size: .66rem; }

.card-tag {
  position: absolute; top: .65rem; inset-inline-end: .65rem; z-index: 2;
  font-family: var(--font-mono); font-weight: 700; font-size: .8rem;
  padding: .3rem .6rem; border-radius: 999px; color: #06070a;
  background: var(--tint); box-shadow: 0 4px 12px -4px rgba(0,0,0,.5);
}

.card-body {
  flex: 1; padding: .9rem .95rem 1rem; display: flex; flex-direction: column; gap: .8rem;
  position: relative; z-index: 1; /* فوق الـ spotlight overlay */
}
.card-body h3 {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; line-height: 1.3;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.card-actions { display: flex; gap: .5rem; margin-top: auto; }
.card-actions .btn-primary { flex: 1; --btn-bg: var(--tint); --btn-fg: #06070a; --btn-bd: var(--tint); }
.card-actions .btn-primary:hover { background: var(--tint); border-color: var(--tint); filter: brightness(1.1); box-shadow: 0 10px 26px -10px var(--tint); }
.card-actions .icon-btn {
  width: 2.3rem; height: 2.3rem; flex: 0 0 auto; padding: 0; display: grid; place-items: center;
  border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--text); font-size: .95rem; transition: background .2s, border-color .2s, transform .25s var(--ease-spring);
}
.card-actions .icon-btn:hover { background: var(--surface-3); border-color: var(--tint); transform: translateY(-2px); }
.card-actions .icon-btn:active { transform: translateY(-2px) scale(0.92); transition-duration: .08s; }

/* ---------- Cards: spotlight يتبع الماوس + 3D tilt (JS بيحدّث الـ custom properties) ---------- */
.card {
  --mx: 50%; --my: 50%;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)) scale(var(--sc, 1));
  transition: transform 0.12s linear, box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card.no-tilt { transition: transform 0.4s var(--ease-spring), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease); }
.card::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(280px circle at var(--mx) var(--my), rgba(255,255,255,.075), transparent 62%);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover::after { opacity: 1; }
@media (hover: none) { .card { transform: none !important; } .card::after { display: none; } }

/* price/price.free kept for other panels (kpis, etc.) that still reuse the class */
.price { font-family: var(--font-mono); font-weight: 600; color: var(--accent-text); font-size: 1rem; white-space: nowrap; }
.price.free { color: var(--ok); }

.empty {
  grid-column: 1 / -1; text-align: center; padding: 3.5rem 1rem; color: var(--muted);
  border: 1px dashed var(--line-2); border-radius: var(--r-lg);
}
.empty i { font-size: 1.8rem; margin-bottom: 0.8rem; color: var(--surface-3); display: block; }

@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .card-media { aspect-ratio: 1 / 1; }
  .card-body { padding: .7rem .65rem .75rem; gap: .6rem; }
  .card-body h3 { font-size: 0.86rem; }
  .card-actions { gap: .4rem; }
  .card-actions .icon-btn { width: 2rem; height: 2rem; font-size: .82rem; }
  .card-type, .card-tag { font-size: .62rem; padding: .24rem .5rem; }
  .tabs { width: 100%; }
  .tab { flex: 1; justify-content: center; padding: 0 0.5rem; }
}

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.feature { padding: 2rem 1.8rem; background: var(--bg-2); position: relative; }
.feature + .feature { border-inline-start: 1px solid var(--line); }
.feature .num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.feature .ico {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-text); font-size: 1.2rem; margin: 1.3rem 0 1.1rem;
  border: 1px solid var(--accent-line);
}
.feature h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: 0.4rem; }
.feature p { color: var(--muted); font-size: 0.93rem; }
@media (max-width: 860px) {
  .features { grid-template-columns: 1fr; }
  .feature + .feature { border-inline-start: 0; border-top: 1px solid var(--line); }
}

.features.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1200px) { .features.four { grid-template-columns: repeat(2, 1fr); } .features.four .feature:nth-child(3) { border-inline-start: 0; } .features.four .feature:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 860px) { .features.four { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  padding: 2rem 2.2rem; border-radius: var(--r-lg);
  background: linear-gradient(120deg, #6d28d9, #8b5cf6 60%, #a78bfa); color: #fff; position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 200px; height: 200px; opacity: 0.12;
  background: repeating-linear-gradient(-45deg, #000 0 10px, transparent 10px 20px); border-radius: 50%;
}
.cta-band h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.cta-band p { opacity: 0.75; }
.cta-band .btn { --btn-bg: #0a0b0d; --btn-fg: #fff; --btn-bd: #0a0b0d; position: relative; z-index: 1; }
.cta-band .btn:hover { background: #000; }

/* ---------- Redeem ticket (activation code) ---------- */
.redeem-ticket {
  position: relative; display: flex; align-items: center; gap: 1.5rem;
  margin-bottom: 1.25rem; padding: 1.3rem 1.7rem;
  background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 55%), var(--surface);
  border: 1px solid var(--accent-line); border-radius: var(--r-lg);
}
.ticket-stub {
  flex: 0 0 auto; width: 3.1rem; height: 3.1rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 1.2rem;
  position: relative;
}
.ticket-stub::after {
  content: ""; position: absolute; top: -.9rem; bottom: -.9rem; inset-inline-end: -1.5rem;
  border-inline-end: 2px dashed var(--line-2);
}
.ticket-main { flex: 1; min-width: 0; padding-inline-start: .6rem; }
.ticket-main h2 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.ticket-main p { color: var(--muted); font-size: 0.85rem; margin-top: .2rem; }
.ticket-main form { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.ticket-main form .input { flex: 1; min-width: 200px; }
@media (max-width: 640px) {
  .redeem-ticket { flex-direction: column; align-items: stretch; gap: 1rem; }
  .ticket-stub { align-self: flex-start; }
  .ticket-stub::after { inset-inline-end: auto; inset-inline-start: 1.55rem; bottom: -1.9rem; top: auto; height: 0; width: calc(100% - 1.55rem); border-inline-end: 0; border-top: 2px dashed var(--line-2); }
  .ticket-main { padding-inline-start: 0; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative; margin-top: 5rem; overflow: hidden;
  border-top: 1px solid var(--line); background: var(--bg-2);
}
.footer-glow {
  position: absolute; inset-inline: 0; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2nd), transparent);
}
.footer-glow::after {
  content: ""; position: absolute; top: -140px; left: 50%; translate: -50% 0;
  width: 60%; max-width: 640px; height: 220px;
  background: radial-gradient(closest-side, var(--glow-purple), transparent 70%);
  filter: blur(10px); opacity: .5;
}
.site-footer p { color: var(--muted); font-size: 0.86rem; }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--accent-text); }

.footer-top {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.2rem;
  padding-block: 3rem 2.2rem;
}
.footer-brand p { margin-top: .9rem; max-width: 320px; line-height: 1.8; font-size: .88rem; }
.footer-brand .btn { margin-top: 1.1rem; }
.footer-col h4 {
  font-family: var(--font-display); font-size: .92rem; font-weight: 700; color: var(--text);
  margin-bottom: 1rem;
}
.footer-col { display: flex; flex-direction: column; gap: .65rem; font-size: .88rem; }
.footer-col a { display: flex; align-items: center; gap: .45rem; transition: gap .2s, color .2s; }
.footer-col a:hover { gap: .65rem; }
.footer-col a i { font-size: .62rem; color: var(--accent-text); }
.footer-cta {
  padding: 1.1rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2);
}
.footer-cta p { font-size: .84rem; margin-bottom: .9rem; color: var(--text-2); }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-block: 1.3rem; border-top: 1px solid var(--line);
}
.made-by { opacity: .75; }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PANELS / TABLES / FORMS (shared site + admin)
   ========================================================================== */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--line);
}
.panel-head h2, .panel-head h3 { font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; display: flex; align-items: center; gap: 0.6rem; }
.panel-head h2 .pill, .panel-head h3 .pill { font-family: var(--font-mono); }
.panel-body { padding: 1.4rem 1.25rem; }

.search {
  position: relative; display: flex; align-items: center;
}
.search i { position: absolute; inset-inline-start: 0.85rem; color: var(--muted); font-size: 0.85rem; pointer-events: none; }
.search input {
  height: 38px; width: 240px; padding-inline: 2.3rem 0.9rem;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: 0.88rem;
}
.search input:focus { outline: none; border-color: var(--accent-line); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
  text-align: start; font-weight: 600; font-size: 0.8rem; color: var(--muted);
  padding: 0.8rem 1.25rem; background: var(--bg-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.table td.strong { color: var(--text); font-weight: 600; }
.table td.actions { text-align: end; white-space: nowrap; }
.table td.actions .btn + .btn { margin-inline-start: 0.35rem; }
.table .avatar-cell { display: flex; align-items: center; gap: 0.7rem; }
.table .avatar-cell .ava {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface-3); font-weight: 700; font-size: 0.8rem; color: var(--text);
}
.table .avatar-cell small { display: block; color: var(--muted); font-size: 0.78rem; }
.truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }

.copy {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.25rem 0.6rem; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--text); direction: ltr; transition: 0.15s;
}
.copy:hover { border-color: var(--accent-line); }
.copy i { color: var(--muted); font-size: 0.75rem; }
.copy.done i { color: var(--ok); }

/* secret values (license keys) — blurred at rest, revealed on hover/focus */
.copy .secret-text { filter: blur(5px); transition: filter 0.2s; user-select: none; }
.copy:hover .secret-text, .copy:focus-visible .secret-text { filter: blur(0); user-select: text; }
.copy .reveal-ico { transition: opacity 0.2s; }
.copy:hover .reveal-ico, .copy:focus-visible .reveal-ico { opacity: 0; width: 0; }

/* mobile table → cards */
@media (max-width: 760px) {
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack tr { padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); }
  .table.stack tr:last-child { border-bottom: 0; }
  .table.stack td { border: 0; padding: 0.3rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
  .table.stack td::before { content: attr(data-label); font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
  .table.stack td.actions { justify-content: flex-start; padding-top: 0.6rem; }
  .table.stack td.actions::before { display: none; }
  .search input { width: 100%; }
  .search { flex: 1; }
}

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 1.25rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field label { font-weight: 600; font-size: 0.88rem; color: var(--text); display: flex; align-items: center; gap: 0.4rem; }
.field label .opt { color: var(--muted); font-weight: 400; font-size: 0.78rem; }
.field .hint { font-size: 0.78rem; color: var(--muted); }
.input {
  width: 100%; height: 46px; padding: 0 0.95rem;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-size: 0.93rem; transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.input { height: auto; min-height: 140px; padding: 0.8rem 0.95rem; resize: vertical; font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.6; direction: ltr; text-align: left; }
.input::placeholder { color: #5b616a; }
.input:hover { border-color: rgba(255, 255, 255, 0.18); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input.ltr { direction: ltr; text-align: left; font-family: var(--font-mono); font-size: 0.86rem; }
select.input {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d848e' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 0.95rem center; padding-inline-end: 0.95rem; padding-inline-start: 2.4rem;
}
select.input option { background: var(--surface); }
.form-actions {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 1rem 1.25rem; border-top: 1px solid var(--line); background: var(--bg-2);
}
.form-actions .spacer { flex: 1; }

.note {
  display: flex; gap: 0.8rem; padding: 0.9rem 1rem; border-radius: var(--r);
  background: var(--info-soft); color: var(--text-2); font-size: 0.88rem; border: 1px solid rgba(107, 178, 255, 0.2);
}
.note i { color: var(--info); margin-top: 0.3rem; }

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1rem;
  background: rgba(5, 6, 8, 0.55);
  backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px);
  opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0.3s, backdrop-filter 0.35s var(--ease-spring), -webkit-backdrop-filter 0.35s var(--ease-spring);
}
/* الخلفية "تتجسّم" (بلور يكبر) مع ظهور البطاقة، مش بس فيد شفافية */
.modal.open { opacity: 1; visibility: visible; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal-card {
  width: min(560px, 100%); max-height: calc(100vh - 2rem); overflow: auto;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow); transform: translateY(16px) scale(0.96); transition: 0.32s var(--ease-spring);
}
.modal.open .modal-card { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .modal-card { transform: none; transition: opacity .2s; }
}
.modal-media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-close {
  position: absolute; top: 0.8rem; inset-inline-end: 0.8rem; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(10, 11, 13, 0.75); border: 1px solid var(--line-2); color: var(--text);
}
.modal-close:hover { background: var(--bad); border-color: var(--bad); }
.modal-body { padding: 1.4rem 1.5rem 1.5rem; }
.modal-body h3 { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; direction: ltr; text-align: right; }
.modal-meta { display: flex; align-items: center; gap: 0.6rem; margin: 0.4rem 0 1rem; }
.modal-body p { color: var(--muted); font-size: 0.93rem; }
.modal-list { margin: 1.1rem 0 1.4rem; display: grid; gap: 0.55rem; }
.modal-list li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; color: var(--text-2); }
.modal-list li i { color: var(--ok); font-size: 0.8rem; }
.modal-actions { display: flex; gap: 0.6rem; }
.modal-actions .btn { flex: 1; }
body.lock { overflow: hidden; }

/* ==========================================================================
   TOAST
   ========================================================================== */
.toast {
  position: fixed; bottom: 1.4rem; left: 50%; z-index: 300;
  display: flex; align-items: center; gap: 0.8rem;
  min-width: 280px; max-width: calc(100vw - 2rem); padding: 0.85rem 1rem;
  background: rgba(25, 28, 33, 0.85);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden;
  transform: translate(-50%, 20px) scale(0.95); opacity: 0; transition: 0.4s var(--ease-spring-bounce);
}
.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
@media (prefers-reduced-transparency: reduce) {
  .toast { background: var(--surface-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity .25s ease; transform: translate(-50%, 0) !important; }
}
.toast .t-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--info-soft); color: var(--info); flex-shrink: 0; }
.toast.success .t-ico { background: var(--ok-soft); color: var(--ok); }
.toast.error .t-ico { background: var(--bad-soft); color: var(--bad); }
.toast b { font-weight: 600; font-size: 0.92rem; }
.toast .t-bar { position: absolute; bottom: 0; inset-inline: 0; height: 2px; background: var(--accent); transform-origin: right; animation: tbar 5s linear forwards; }
@keyframes tbar { to { transform: scaleX(0); } }

/* ==========================================================================
   ADMIN LAYOUT
   ========================================================================== */
.admin { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, #0c0e12 0%, var(--bg-2) 40%);
  border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 1.1rem 0.85rem;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar .brand {
  padding: 0.5rem 0.6rem 1.1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem;
}
.sidebar .brand img { box-shadow: 0 6px 18px -8px rgba(139, 92, 246, 0.55); }
.side-label {
  font-size: 0.68rem; font-weight: 700; color: var(--muted); padding: 0 0.7rem;
  margin: 1.15rem 0 0.45rem; letter-spacing: 0.09em; text-transform: uppercase; opacity: .85;
}
.side-label:first-of-type { margin-top: 0.3rem; }
.side-nav a {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.7rem; border-radius: 10px;
  color: var(--text-2); font-size: 0.9rem; font-weight: 500; position: relative;
  transition: background 0.16s, color 0.16s, transform 0.12s; margin-bottom: 2px;
}
.side-nav a i {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--surface); color: var(--muted);
  font-size: 0.85rem; transition: 0.16s; flex-shrink: 0;
}
.side-nav a:hover { background: var(--surface); color: var(--text); }
.side-nav a:hover i { color: var(--text-2); background: var(--surface-2); }
.side-nav a.active {
  background: linear-gradient(90deg, var(--accent-soft), transparent 90%);
  color: #fff; font-weight: 600;
}
.side-nav a.active i { color: #fff; background: var(--accent); box-shadow: 0 6px 16px -6px rgba(139, 92, 246, 0.8); }
.side-nav a.active::before {
  content: ""; position: absolute; inset-inline-start: -0.85rem; top: 7px; bottom: 7px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.side-foot {
  margin-top: auto; padding: 0.7rem; margin-top: 1rem; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); display: flex; align-items: center; gap: 0.7rem;
}
.side-foot img { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-3); }
.side-foot div { flex: 1; min-width: 0; line-height: 1.35; }
.side-foot b { display: block; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot small { color: var(--accent-text); font-family: var(--font-mono); font-size: 0.7rem; }

.admin-main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: 68px; padding: 0 2rem;
  display: flex; align-items: center; gap: 1rem;
  background: rgba(10, 11, 13, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.crumbs { font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 0.5rem; }
.crumbs b { color: var(--text); font-weight: 600; }
.crumbs i { font-size: 0.6rem; }
.topbar .spacer { flex: 1; }
.admin-content { padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; max-width: 1280px; width: 100%; }
.admin-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.admin-title h1 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; line-height: 1.3; }
.admin-title p { color: var(--muted); max-width: 640px; font-size: 0.93rem; margin-top: 0.3rem; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, 1fr); gap: .7rem; } .kpi b { font-size: 1.5rem; } }
.kpi { padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.kpi span { color: var(--muted); font-size: 0.82rem; display: flex; align-items: center; gap: 0.5rem; }
.kpi b { display: block; font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; margin-top: 0.3rem; line-height: 1.2; }
.kpi.accent b { color: var(--accent-text); } .kpi.ok b { color: var(--ok); } .kpi.bad b { color: var(--bad); }

.side-toggle { display: none; }
@media (max-width: 1000px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 100; inset-inline-start: 0; top: 0; width: min(290px, 85vw);
    transform: translateX(100%); transition: transform 0.3s var(--ease);
  }
  .drawer-open .sidebar { transform: none; }
  .side-toggle { display: inline-flex; }
  .topbar { padding: 0 1rem; }
  .admin-content { padding: 1.25rem 1rem 2rem; }
}

/* ==========================================================================
   STATUS PAGES (404 / ban)
   ========================================================================== */
.status-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; position: relative; overflow: hidden; }
.status-page::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, #000 10%, transparent 65%);
  -webkit-mask-image: radial-gradient(circle at center, #000 10%, transparent 65%);
}
.status-box { position: relative; text-align: center; max-width: 520px; display: flex; flex-direction: column; align-items: center; }
.status-code {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(6rem, 22vw, 11rem); line-height: 0.9;
  color: transparent; -webkit-text-stroke: 2px var(--accent-text); letter-spacing: -0.03em;
}
.status-icon { width: 92px; height: 92px; border-radius: 26px; display: grid; place-items: center; font-size: 2.3rem; background: var(--bad-soft); color: var(--bad); border: 1px solid rgba(255,93,93,.3); }
.status-box h1 { font-family: var(--font-display); font-size: 1.8rem; margin: 1.4rem 0 0.5rem; }
.status-box p { color: var(--muted); margin-bottom: 1.8rem; }
.status-box .hazard { width: 140px; border-radius: 3px; margin-top: 2.5rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   DESIGN SYSTEM v3 — عمق وحركة إضافية فوق v2 (نفس الألوان والهيكل، بس أغنى)
   ========================================================================== */
:root {
  --accent-2nd: #22d3ee;           /* سماوي نيون — تباين مع البنفسجي، لمسات بس */
  --accent-2nd-soft: rgba(34, 211, 238, 0.14);
  --glow-purple: rgba(139, 92, 246, 0.35);
  --glow-cyan: rgba(34, 211, 238, 0.22);
}

/* خلفية "أورورا" خافتة وهادية (بلوبات متوهّجة بطيئة الحركة) + Grain خفيف —
   ثابتة بالخلفية وما بتأثر على أي كليك (pointer-events: none، z-index سلبي) */
body::before, body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
body::before {
  background:
    radial-gradient(640px 640px at 8% -8%, var(--glow-purple), transparent 60%),
    radial-gradient(560px 560px at 100% 18%, var(--glow-cyan), transparent 62%),
    radial-gradient(520px 520px at 20% 100%, rgba(139, 92, 246, 0.18), transparent 60%);
  filter: blur(10px) saturate(130%);
  opacity: 0.9;
  animation: auroraShift 26s ease-in-out infinite alternate;
}
body::after {
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes auroraShift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-1.5%, 1.5%, 0) scale(1.04); }
  100% { transform: translate3d(1.5%, -1%, 0) scale(1.02); }
}
@media (max-width: 760px), (prefers-reduced-motion: reduce) {
  body::before { animation: none; filter: blur(16px) saturate(120%); opacity: 0.6; }
}

/* ---------- Glow text utility ---------- */
.glow-text { text-shadow: 0 0 24px var(--glow-purple), 0 0 2px rgba(255,255,255,.25); }
.hero h1 em { background: linear-gradient(95deg, var(--accent-text), var(--accent-2nd)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Button shine sweep ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.22) 48%, transparent 66%);
  transform: translateX(-120%); transition: transform 0.55s var(--ease);
}
.btn:hover::before { transform: translateX(120%); }
.btn-primary { box-shadow: 0 0 0 0 var(--glow-purple); transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.3s; }
.btn-primary:hover { box-shadow: 0 10px 34px -8px var(--glow-purple), 0 0 0 1px var(--accent-line); }

/* ---------- Product cards: animated glow border on hover ---------- */
.card { isolation: isolate; }
.card::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit;
  background: conic-gradient(from 0deg, var(--tint), transparent 25%, transparent 75%, var(--tint));
  opacity: 0; transition: opacity 0.4s var(--ease);
  animation: cardSpin 5s linear infinite paused;
}
.card:hover::before { opacity: 0.55; animation-play-state: running; }
@keyframes cardSpin { to { transform: rotate(360deg); } }
.card:hover { box-shadow: 0 30px 60px -22px rgba(0,0,0,.7), 0 0 40px -18px var(--tint); }

/* ---------- Panels / KPIs: top accent line + lift ---------- */
.panel, .kpi, .feature, .terminal {
  position: relative; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.kpi::after {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 2px; border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2nd), transparent); opacity: 0.7;
}
.kpi:hover { transform: translateY(-3px); border-color: var(--accent-line); box-shadow: 0 20px 40px -22px rgba(139,92,246,.45); }

/* ---------- Terminal: scanline + glow ---------- */
.terminal { box-shadow: var(--shadow), 0 0 0 6px rgba(255,255,255,.02), 0 0 60px -20px var(--glow-purple); }
.terminal-body { position: relative; overflow: hidden; }
.terminal-body::after {
  content: ""; position: absolute; inset-inline: 0; height: 40%; top: -40%;
  background: linear-gradient(180deg, rgba(139,92,246,.09), transparent);
  animation: scan 6s linear infinite;
}
@keyframes scan { to { top: 100%; } }

/* ---------- Hazard stripe: subtle animated drift (brand signature, kept static color) ---------- */
.hazard {
  background-size: 34px 34px; animation: hazardDrift 2.4s linear infinite;
}
@keyframes hazardDrift { to { background-position: 34px 0; } }

/* ---------- Sidebar active glow pulse ---------- */
.side-nav a.active i { animation: sidePulse 2.4s ease-in-out infinite; }
@keyframes sidePulse { 0%, 100% { box-shadow: 0 6px 16px -6px rgba(139,92,246,.8); } 50% { box-shadow: 0 6px 22px -4px rgba(139,92,246,1); } }

/* ---------- Trust badge chips (used on hero) ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.8rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line-2); color: var(--text-2);
  backdrop-filter: blur(6px);
}
.chip i { color: var(--ok); font-size: 0.75rem; }

@media (prefers-reduced-motion: reduce) {
  .card::before, .terminal-body::after, .hazard, .side-nav a.active i { animation: none !important; }
}

/* ==========================================================================
   صفحة "رخصي" — تصميم "الترسانة" (Vault) — شبكة مش جدول، وليس عامودي بالكامل
   ========================================================================== */
.vault-hero {
  position: relative; text-align: center; overflow: hidden;
  padding: 3.4rem 1.2rem 2.6rem; margin-bottom: 2.4rem;
  border-radius: var(--r-xl, 22px); border: 1px solid var(--line-2);
  background: var(--bg-2);
}
.vault-hero-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(380px 240px at 18% 0%, var(--glow-purple), transparent 70%),
    radial-gradient(380px 240px at 82% 15%, var(--glow-cyan), transparent 70%);
  filter: blur(8px);
}
.vault-hero > * { position: relative; z-index: 1; }
.vault-hero .eyebrow { justify-content: center; }
.vault-emblem {
  width: 74px; height: 74px; margin: 0 auto 1.1rem; border-radius: 22px;
  display: grid; place-items: center; font-size: 1.8rem; color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2nd));
  box-shadow: 0 20px 44px -16px var(--glow-purple);
}
.vault-hero h1 { margin: .5rem 0 .6rem; }
.vault-hero > p { max-width: 460px; margin-inline: auto; color: var(--text-2); }

.rank-badge {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.3rem;
  padding: .5rem 1.15rem; border-radius: 999px; font-weight: 700; font-size: .86rem;
  background: var(--surface); border: 1px solid var(--line-2);
}
.rank-badge.tier-0 { color: var(--muted); }
.rank-badge.tier-1 { color: var(--info); border-color: rgba(96,165,250,.35); }
.rank-badge.tier-2 { color: var(--accent-text); border-color: var(--accent-line); }
.rank-badge.tier-3 { color: #facc15; border-color: rgba(250,204,21,.4); }
.rank-badge.tier-4 {
  color: #fff; border-color: transparent;
  background: linear-gradient(95deg, var(--accent), var(--accent-2nd));
  box-shadow: 0 12px 26px -10px var(--glow-purple);
}

.vault-stats { display: flex; justify-content: center; gap: 2.4rem; margin-top: 1.9rem; flex-wrap: wrap; }
.vstat { text-align: center; }
.vstat b { display: block; font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; }
.vstat span { font-size: .78rem; color: var(--muted); }
.vstat.ok b { color: var(--ok); }
.vstat.bad b { color: var(--bad); }

/* ---------- تخطيط غير عامودي: شريط جانبي ثابت + شبكة رخص ---------- */
.vault-layout { display: grid; grid-template-columns: 300px 1fr; gap: 1.7rem; align-items: start; }
.vault-side { position: sticky; top: calc(14px + var(--header-h) + 20px); display: flex; flex-direction: column; gap: 1.1rem; }
@media (max-width: 980px) {
  .vault-layout { grid-template-columns: 1fr; }
  .vault-side { position: static; }
}

.vault-terminal { padding: 1.3rem; }
.vault-terminal h3 { font-family: var(--font-display); font-size: 1rem; display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.vault-terminal h3 i { color: var(--accent-text); }
.vault-terminal > p { font-size: .84rem; color: var(--text-2); margin-bottom: 1rem; }
.vault-terminal form { display: flex; flex-direction: column; gap: .65rem; }

.vault-note { padding: 1.15rem; display: flex; gap: .7rem; font-size: .8rem; color: var(--text-2); line-height: 1.85; }
.vault-note i { color: var(--accent-text); margin-top: .2rem; flex-shrink: 0; }

.vault-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 1.1rem; align-content: start; }

.license-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease), opacity .25s;
}
.license-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; }
.license-card.is-active::before { background: linear-gradient(90deg, var(--accent), var(--accent-2nd)); }
.license-card.is-locked::before { background: var(--line-2); }
.license-card.is-active:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: 0 26px 52px -26px var(--glow-purple); }
.license-card.is-locked { opacity: .68; }
.license-card.is-locked:hover { opacity: .95; }

.lc-head { padding: 1.15rem 1.15rem .2rem; }
.lc-status {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .7rem; font-weight: 700;
  padding: .26rem .6rem; border-radius: 999px; margin-bottom: .6rem;
}
.is-active .lc-status { color: var(--ok); background: var(--ok-soft); }
.is-locked .lc-status { color: var(--bad); background: var(--bad-soft); }
.lc-head h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; line-height: 1.35; }

.lc-body { padding: .65rem 1.15rem 1rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.lc-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-size: .83rem; }
.lc-row > span:first-child { color: var(--muted); flex-shrink: 0; }
.lc-row > b { font-weight: 600; color: var(--text); max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-row .copy { width: 100%; justify-content: space-between; }
.lc-row .copy .secret-text { overflow: hidden; text-overflow: ellipsis; max-width: 120px; }

.lc-actions { padding: 0 1.15rem 1.15rem; margin-top: auto; }
.lc-actions .btn { width: 100%; }

.vault-empty { grid-column: 1 / -1; }
