/* ═══════════════════════════════════════════════════════════════
   كيان · style.css — v3 (Final Poster Edition)
   Epic Loader + Navbar + Poster + Footer + Wizard + Shell
   Themes: Orange (main) · Aqua · Light
   Languages: Arabic (RTL) · English (LTR)
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   §1 · ROOT VARIABLES — THEME: MAIN (Orange)
   ═══════════════════════════════════════════════════════════════ */
:root,
[data-theme="main"] {
  /* Primary */
  --primary:        #FF7A00;
  --primary-2:      #E85D04;
  --primary-3:      #FF9F45;
  --primary-soft:   rgba(255, 122, 0, 0.10);
  --primary-glow:   rgba(255, 122, 0, 0.35);
  --primary-deep:   rgba(255, 122, 0, 0.06);

  /* Backgrounds */
  --bg:             #0E0E0E;
  --bg-2:           #141414;
  --bg-3:           #1A1A1A;
  --card:           #1A1A1A;
  --card-2:         #222222;
  --card-hover:     #2A2A2A;
  --line:           #2A2A2A;
  --line-2:         #333333;

  /* Text */
  --text:           #F5F5F0;
  --text-2:         #D4D4CE;
  --muted:          #8B8B85;
  --muted-2:        #5C5C58;

  /* Accents */
  --gold:           #D4AF37;
  --red:            #D62828;
  --green:          #22C55E;
  --blue:           #60A5FA;
  --purple:         #A855F7;
  --cyan:           #22D3EE;

  /* Effects */
  --grid-opacity:   0.045;
  --overlay-opacity: 1;
  --glow-strength:  1;
}

/* ═══ THEME: AQUA ═══ */
[data-theme="aqua"] {
  --primary:        #06B6D4;
  --primary-2:      #0891B2;
  --primary-3:      #22D3EE;
  --primary-soft:   rgba(6, 182, 212, 0.10);
  --primary-glow:   rgba(6, 182, 212, 0.40);
  --primary-deep:   rgba(6, 182, 212, 0.06);

  --bg:             #0A1014;
  --bg-2:           #0E161B;
  --bg-3:           #121C22;
  --card:           #121C22;
  --card-2:         #18242C;
  --card-hover:     #1F2E38;
  --line:           #1F2E38;
  --line-2:         #263845;

  --text:           #E8F4F8;
  --text-2:         #B8D4DC;
  --muted:          #6E8A96;
  --muted-2:        #4A616C;

  --grid-opacity:   0.06;
}

/* ═══ THEME: LIGHT ═══ */
[data-theme="light"] {
  --primary:        #EA580C;
  --primary-2:      #C2410C;
  --primary-3:      #F97316;
  --primary-soft:   rgba(234, 88, 12, 0.08);
  --primary-glow:   rgba(234, 88, 12, 0.30);
  --primary-deep:   rgba(234, 88, 12, 0.05);

  --bg:             #F5F5F0;
  --bg-2:           #EDEDE7;
  --bg-3:           #E5E5DF;
  --card:           #FFFFFF;
  --card-2:         #F8F8F5;
  --card-hover:     #EFEFE9;
  --line:           #D8D8D0;
  --line-2:         #C4C4BC;

  --text:           #1A1A1A;
  --text-2:         #333333;
  --muted:          #6E6E68;
  --muted-2:        #9A9A94;

  --grid-opacity:   0.08;
  --overlay-opacity: 0.55;
  --glow-strength:  0.6;
}

/* ═══ SHARED TOKENS ═══ */
:root {
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-2xl: 36px;

  --shadow-sm:   0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md:   0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg:   0 24px 64px rgba(0, 0, 0, 0.55);
  --shadow-xl:   0 40px 100px rgba(0, 0, 0, 0.70);
  --shadow-glow: 0 0 40px var(--primary-glow);
  --shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.06);

  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:    0.18s var(--ease);
  --t-base:    0.28s var(--ease);
  --t-slow:    0.55s var(--ease-out);

  --z-bg:       0;
  --z-content:  10;
  --z-sticky:   50;
  --z-modal:    100;
  --z-shell:    7000;
  --z-onboard:  8000;
  --z-loader:   9000;
  --z-toast:    10000;

  --font-ar:    'Cairo', system-ui, sans-serif;
  --font-en:    'Poppins', 'Inter', system-ui, sans-serif;
  --font-quran: 'Amiri', serif;
  --font-mono:  'Inter', ui-monospace, monospace;
  --font-tech:  'Orbitron', 'Inter', sans-serif;
}


/* ═══════════════════════════════════════════════════════════════
   §2 · RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ar);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  overscroll-behavior: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

body.is-locked { overflow: hidden; }

html[dir="ltr"] body {
  font-family: var(--font-en);
}

img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

input, select, textarea {
  font: inherit;
  color: inherit;
  font-family: inherit;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--primary); color: #000; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 99px;
  border: 2px solid var(--bg);
  transition: background var(--t-fast);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-2); }

* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }


/* ═══════════════════════════════════════════════════════════════
   §3 · BACKGROUND LAYERS
   ═══════════════════════════════════════════════════════════════ */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  transition: opacity 0.8s var(--ease-out);
}

#bg-grid {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 122, 0, var(--grid-opacity)) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 122, 0, var(--grid-opacity)) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(circle at center, #000 25%, transparent 80%);
          mask-image: radial-gradient(circle at center, #000 25%, transparent 80%);
  transition: opacity 0.6s var(--ease);
}

#bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(1200px 800px at 20% 0%, var(--primary-soft), transparent 55%),
    radial-gradient(1000px 700px at 90% 100%, rgba(214, 40, 40, 0.06), transparent 55%),
    radial-gradient(800px 600px at 50% 50%, var(--primary-soft), transparent 70%),
    linear-gradient(180deg, rgba(14, 14, 14, 0.35) 0%, rgba(14, 14, 14, 0.85) 100%);
  opacity: var(--overlay-opacity);
  transition: opacity 0.6s var(--ease);
}

[data-theme="light"] #bg-overlay {
  background:
    radial-gradient(1200px 800px at 20% 0%, var(--primary-soft), transparent 55%),
    radial-gradient(800px 600px at 50% 50%, var(--primary-soft), transparent 70%),
    linear-gradient(180deg, rgba(245, 245, 240, 0.4) 0%, rgba(245, 245, 240, 0.85) 100%);
}


/* ═══════════════════════════════════════════════════════════════
   §4 · STAGE SYSTEM
   ═══════════════════════════════════════════════════════════════ */
.stage {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

.stage.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.stage[hidden] { display: none !important; }
.stage.is-active[hidden] { display: block !important; }

.stage-loader { display: flex !important; }
.stage-onboarding { display: flex !important; }
.stage-shell { display: flex !important; }


/* ═══════════════════════════════════════════════════════════════
   §5 · ═══ EPIC LOADER ═══
   ═══════════════════════════════════════════════════════════════ */
.stage-loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1000px 800px at 50% 40%, #1A1005 0%, transparent 60%),
    radial-gradient(600px 500px at 20% 80%, #0F0508 0%, transparent 55%),
    radial-gradient(600px 500px at 80% 20%, #10080A 0%, transparent 55%),
    linear-gradient(180deg, #0A0A0A 0%, #12080A 60%, #0A0505 100%);
  overflow: hidden;
  perspective: 1200px;
}

/* ═══ Background Orbs ═══ */
.loader-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  pointer-events: none;
  will-change: transform;
}

.loader-orb.o1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -150px;
  right: -120px;
  animation: orbFloat1 10s ease-in-out infinite;
}

.loader-orb.o2 {
  width: 400px;
  height: 400px;
  background: var(--red);
  bottom: -120px;
  left: -100px;
  animation: orbFloat2 12s ease-in-out infinite;
}

.loader-orb.o3 {
  width: 320px;
  height: 320px;
  background: var(--gold);
  top: 35%;
  left: 55%;
  opacity: 0.20;
  animation: orbFloat3 14s ease-in-out infinite;
}

/* ═══ Matrix Numbers ═══ */
.loader-matrix {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.12;
  font-family: var(--font-tech);
  font-size: 12px;
  line-height: 1.6;
  color: var(--primary);
  letter-spacing: 3px;
  user-select: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 80%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 80%, transparent 100%);
}

.loader-matrix.left { left: 30px; }
.loader-matrix.right { right: 30px; }

.loader-matrix::before {
  content: '01 10 1 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 01 10 1 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 01 10 1 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0';
  display: block;
  white-space: pre-wrap;
  word-spacing: 10px;
  animation: matrixScroll 8s linear infinite;
}

@keyframes matrixScroll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* ═══ Scanning Line ═══ */
.loader-scan {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
  box-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary-glow);
  opacity: 0.7;
  animation: scanDown 3.5s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes scanDown {
  0%   { top: -2px; opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.7; }
  100% { top: 100%; opacity: 0; }
}

/* ═══ Loader Inner ═══ */
.loader-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 24px;
  text-align: center;
  max-width: 620px;
  width: 100%;
}

/* ═══ Orbit System ═══ */
.loader-orbit {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  animation: orbitFloat 6s ease-in-out infinite;
}

@keyframes orbitFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* Rings */
.orbit-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.ring-1 {
  inset: 40px;
  border: 1.5px solid rgba(255, 122, 0, 0.35);
  animation: orbitSpin 6s linear infinite;
}

.ring-2 {
  inset: 20px;
  border: 1.5px dashed rgba(255, 122, 0, 0.55);
  animation: orbitSpinReverse 9s linear infinite;
}

.ring-3 {
  inset: 0;
  border: 1px solid rgba(212, 175, 55, 0.30);
  animation: orbitSpin 14s linear infinite;
}

.ring-4 {
  inset: -20px;
  border: 1px dotted rgba(255, 122, 0, 0.20);
  animation: orbitSpinReverse 20s linear infinite;
}

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes orbitSpinReverse {
  to { transform: rotate(-360deg); }
}

/* Orbit dots */
.orbit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 16px var(--primary), 0 0 32px var(--primary-glow);
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
}

.orbit-dot.dot-2 {
  background: var(--gold);
  box-shadow: 0 0 16px var(--gold), 0 0 32px rgba(212, 175, 55, 0.5);
  top: auto;
  bottom: -5px;
}

.orbit-dot.dot-3 {
  background: var(--red);
  box-shadow: 0 0 16px var(--red), 0 0 32px rgba(214, 40, 40, 0.5);
  top: 50%;
  left: auto;
  right: -5px;
  transform: translateY(-50%);
}

/* Energy arcs */
.orbit-arcs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.arc {
  transform-origin: center;
}

.arc-1 {
  stroke-dasharray: 80 550;
  animation: arcDash 3s linear infinite;
}

.arc-2 {
  stroke-dasharray: 40 460;
  animation: arcDash 4.5s linear infinite reverse;
}

@keyframes arcDash {
  to { stroke-dashoffset: -630; }
}

/* Center */
.orbit-center {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.orbit-glow {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 0, 0.65), transparent 65%);
  filter: blur(24px);
  animation: glowPulse 2.6s ease-in-out infinite;
  z-index: -1;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.9; transform: scale(1.15); }
}

/* Multi-pulse rings */
.orbit-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  animation: pulseRing 3s ease-out infinite;
}

.orbit-pulse.p1 { animation-delay: 0s; }
.orbit-pulse.p2 { animation-delay: 1s; }
.orbit-pulse.p3 { animation-delay: 2s; }

@keyframes pulseRing {
  0%   { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

.orbit-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 18px;
  filter: drop-shadow(0 0 28px rgba(255, 122, 0, 0.85));
  animation: logoBreath 3s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.orbit-logo-fallback {
  display: none;
  font-family: var(--font-ar);
  font-size: 72px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(255, 122, 0, 0.85));
  animation: logoBreath 3s ease-in-out infinite;
}

.orbit-center.no-logo .orbit-logo { display: none; }
.orbit-center.no-logo .orbit-logo-fallback { display: block; }

@keyframes logoBreath {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* ═══ Brand Name with Glitch ═══ */
.loader-name {
  position: relative;
  font-family: var(--font-ar);
  font-size: clamp(56px, 13vw, 100px);
  font-weight: 900;
  letter-spacing: -4px;
  line-height: 1;
  margin: 8px 0;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-3) 35%, var(--gold) 60%, var(--primary) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientFlow 4s ease infinite;
  filter: drop-shadow(0 0 40px var(--primary-glow));
}

.loader-name::before,
.loader-name::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: inherit;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  pointer-events: none;
}

.loader-name::before {
  animation: glitchA 4s infinite;
  color: var(--cyan);
  -webkit-text-fill-color: var(--cyan);
}

.loader-name::after {
  animation: glitchB 4s infinite;
  color: var(--red);
  -webkit-text-fill-color: var(--red);
}

@keyframes glitchA {
  0%, 90%, 100% { opacity: 0; transform: translate(0); }
  92%           { opacity: 0.8; transform: translate(-3px, 2px); }
  94%           { opacity: 0.6; transform: translate(2px, -2px); }
  96%           { opacity: 0.8; transform: translate(-2px, 3px); }
}

@keyframes glitchB {
  0%, 90%, 100% { opacity: 0; transform: translate(0); }
  93%           { opacity: 0.7; transform: translate(3px, -2px); }
  95%           { opacity: 0.5; transform: translate(-2px, 2px); }
  97%           { opacity: 0.7; transform: translate(2px, -3px); }
}

/* ═══ Welcome Text ═══ */
.loader-welcome {
  font-family: var(--font-quran);
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 1px;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.5);
  margin: 4px 0 8px;
  opacity: 0;
  animation: welcomeFade 1s ease-out 1s forwards;
}

@keyframes welcomeFade {
  to { opacity: 1; }
}

/* ═══ Progress ═══ */
.loader-progress-wrap {
  width: min(380px, 85vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

/* Segments */
.loader-segments {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 0 2px;
}

.seg {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 99px;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.seg.is-active {
  background: linear-gradient(90deg, var(--primary), var(--primary-3));
  box-shadow: 0 0 12px var(--primary-glow);
}

.seg.is-done {
  background: var(--primary);
}

/* Track */
.loader-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--bg-3);
  border-radius: 99px;
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6);
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-2) 100%);
  border-radius: 99px;
  box-shadow: 0 0 22px var(--primary-glow);
  transition: width 0.28s var(--ease-out);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.loader-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: shimmer 1.5s linear infinite;
}

.loader-bar-glow {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--primary);
  filter: blur(10px);
  opacity: 0.8;
  transition: width 0.28s var(--ease-out);
  z-index: 1;
}

/* Meta */
.loader-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.loader-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  transition: opacity 0.3s;
}

.loader-msg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
  animation: pulse 1s infinite;
  flex-shrink: 0;
}

.loader-pct {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary);
  font-size: 13px;
  letter-spacing: 1px;
}

/* ═══ Credits ═══ */
.loader-credits {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  opacity: 0;
  animation: creditsFade 1.2s ease-out 1.6s forwards;
}

@keyframes creditsFade {
  to { opacity: 1; }
}

.loader-credit-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.loader-credit-row svg {
  width: 13px;
  height: 13px;
  color: var(--primary);
}

.loader-credit-row.powered {
  padding: 4px 12px;
  background: var(--primary-deep);
  border: 1px solid rgba(255, 122, 0, 0.20);
  border-radius: 99px;
  color: var(--primary);
  font-size: 10.5px;
}

.loader-credit-row.powered svg {
  animation: sparkleRotate 3s linear infinite;
}

@keyframes sparkleRotate {
  0%, 100% { transform: rotate(0) scale(1); }
  50%      { transform: rotate(180deg) scale(1.15); }
}

/* ═══ Corner Decorations ═══ */
.loader-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary);
  pointer-events: none;
  opacity: 0.4;
}

.loader-corner.c-tl {
  top: 24px;
  left: 24px;
  border-right: none;
  border-bottom: none;
  animation: cornerFade 2s ease-in-out infinite;
}

.loader-corner.c-tr {
  top: 24px;
  right: 24px;
  border-left: none;
  border-bottom: none;
  animation: cornerFade 2s ease-in-out infinite 0.5s;
}

.loader-corner.c-bl {
  bottom: 24px;
  left: 24px;
  border-right: none;
  border-top: none;
  animation: cornerFade 2s ease-in-out infinite 1s;
}

.loader-corner.c-br {
  bottom: 24px;
  right: 24px;
  border-left: none;
  border-top: none;
  animation: cornerFade 2s ease-in-out infinite 1.5s;
}

@keyframes cornerFade {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.05); }
}


/* ═══════════════════════════════════════════════════════════════
   §6 · NAVBAR
   ═══════════════════════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(14, 14, 14, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

[data-theme="light"] .navbar {
  background: rgba(245, 245, 240, 0.85);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: transform var(--t-fast);
}

.nav-brand:hover { transform: scale(1.02); }

.nav-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: contain;
  box-shadow: 0 0 20px var(--primary-glow);
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.nav-brand-text b {
  font-family: var(--font-ar);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.8px;
  background: linear-gradient(90deg, var(--primary), var(--primary-3));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-brand-text span {
  font-family: var(--font-en);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 2px;
  margin-top: 4px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  margin: 0 auto;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .nav-links {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

.nav-link {
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: all var(--t-fast);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-widgets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  transition: all var(--t-fast);
  cursor: pointer;
  white-space: nowrap;
}

.nav-widget:hover {
  background: var(--primary-soft);
  border-color: rgba(255, 122, 0, 0.3);
  color: var(--primary);
}

.nav-widget svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
  flex-shrink: 0;
}

.ww-temp { font-family: var(--font-mono); font-weight: 700; color: var(--text); }
.ww-city { color: var(--muted); font-size: 11.5px; }
.wc-day { font-weight: 700; color: var(--text); }
.wc-month { color: var(--muted); font-size: 11.5px; }
.wck-time {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
}
.wm-label { color: inherit; }

.nav-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  transition: all var(--t-fast);
  flex-shrink: 0;
  position: relative;
}

.nav-icon-btn:hover {
  background: var(--primary-soft);
  border-color: rgba(255, 122, 0, 0.3);
  color: var(--primary);
  transform: translateY(-1px);
}

.nav-icon-btn svg { width: 17px; height: 17px; }

.nav-control-group {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.theme-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-fast);
}

.theme-btn:hover { transform: scale(1.1); }

.theme-btn.is-active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 12px var(--primary-glow);
}

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.dot-main   { background: linear-gradient(135deg, #FF7A00, #E85D04); }
.dot-aqua   { background: linear-gradient(135deg, #06B6D4, #0891B2); }
.dot-light  { background: linear-gradient(135deg, #F5F5F0, #D4D4CE); }

.nav-lang-wrap { position: relative; }

.lang-btn {
  width: auto !important;
  padding: 0 12px !important;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.lang-current {
  color: var(--primary);
  font-family: var(--font-mono);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: var(--z-modal);
  min-width: 180px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.25s var(--ease-out);
}

.lang-menu[hidden] { display: none; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--t-fast);
  text-align: start;
}

.lang-option:hover,
.lang-option.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.lang-flag { font-size: 18px; line-height: 1; }
.lang-text { flex: 1; }

.nav-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #0A0A0A;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 24px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all var(--t-base);
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.nav-start-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.3), transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease);
}

.nav-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.nav-start-btn:hover::before { transform: translateX(100%); }

.nav-start-btn svg { width: 16px; height: 16px; }

.nav-burger { display: none; }

@media (max-width: 1100px) {
  .wm-label { display: none; }
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 68px;
    inset-inline: 12px;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-modal);
    margin: 0;
  }

  .nav-links.is-open {
    display: flex;
    animation: popIn 0.3s var(--ease-out);
  }

  .nav-burger { display: flex !important; }
}

@media (max-width: 720px) {
  .navbar { padding: 10px 14px; gap: 8px; }
  .nav-brand-text { display: none; }
  .nav-widget span { display: none; }
  .nav-widget { padding: 8px 10px; }
  .nav-control-group { display: none; }
  .nav-start-btn { padding: 10px 14px; }
  .nav-start-btn span { display: none; }
  .nav-start-btn svg { width: 18px; height: 18px; }
}


/* ═══════════════════════════════════════════════════════════════
   §7 · BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--r-sm);
  font-family: var(--font-ar);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  transition: all var(--t-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.btn svg { width: 18px; height: 18px; }

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #0A0A0A;
  box-shadow: 0 10px 32px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.25), transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease);
  pointer-events: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn-primary:hover:not(:disabled)::before { transform: translateX(100%); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--primary-soft);
  border-color: rgba(255, 122, 0, 0.35);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn.is-loading { pointer-events: none; opacity: 0.85; }
.btn.is-loading svg { animation: spin 0.8s linear infinite; }


/* ═══════════════════════════════════════════════════════════════
   §8 · STAGE 2 · POSTER
   ═══════════════════════════════════════════════════════════════ */
.stage-poster {
  position: relative;
  z-index: var(--z-content);
  display: block;
  padding-bottom: 40px;
}

/* ═══ HERO ═══ */
.hero-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
  padding: 60px 60px 40px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px);
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-left > * { opacity: 0; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--primary-soft);
  border: 1px solid rgba(255, 122, 0, 0.28);
  border-radius: 99px;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
  width: max-content;
  letter-spacing: 0.3px;
}

.hero-badge svg { width: 15px; height: 15px; }

/* Hero Logo + Greeting */
.hero-logo-greeting {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--primary-soft), transparent);
  border: 1px solid rgba(255, 122, 0, 0.20);
  border-radius: var(--r-lg);
  width: max-content;
  max-width: 100%;
  position: relative;
  overflow: hidden;
}

.hero-logo-greeting::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(255, 122, 0, 0.15), transparent 65%);
  pointer-events: none;
}

.hero-logo {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  object-fit: contain;
  box-shadow: 0 0 24px var(--primary-glow);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  animation: logoBreath 3s ease-in-out infinite;
}

.hero-greeting-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero-greeting-sub {
  font-family: var(--font-quran);
  font-size: 15px;
  color: var(--gold);
  letter-spacing: 0.5px;
  font-weight: 700;
}

.hero-greeting-main {
  font-family: var(--font-tech);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-3));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.hero-title {
  font-family: var(--font-ar);
  font-size: clamp(42px, 6.5vw, 78px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2.5px;
  color: var(--text);
}

.hero-title-accent {
  background: linear-gradient(120deg, var(--primary), var(--primary-3), var(--gold));
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientFlow 4s ease infinite;
}

.hero-sub {
  font-size: clamp(15px, 1.4vw, 17.5px);
  color: var(--muted);
  line-height: 1.85;
  max-width: 620px;
}

.hero-sub strong { color: var(--primary); font-weight: 700; }

.hero-verse {
  font-family: var(--font-quran);
  font-size: 19px;
  color: var(--gold);
  padding: 16px 22px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.06), transparent);
  border-inline-end: 3px solid var(--gold);
  border-radius: 4px;
  line-height: 1.9;
  margin-top: 6px;
  max-width: 620px;
  font-style: normal;
}

html[dir="ltr"] .hero-verse {
  border-inline-end: none;
  border-inline-start: 3px solid var(--gold);
}

.hero-verse cite {
  display: block;
  font-family: var(--font-ar);
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  font-style: normal;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.hero-actions .btn { opacity: 0; }

/* Hero right — feature cards */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-card {
  background: linear-gradient(160deg, var(--card), var(--bg-3));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
  opacity: 0;
}

[data-theme="light"] .feature-card {
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow-sm);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle at top right, var(--primary-soft), transparent 60%);
  opacity: 0;
  transition: opacity var(--t-base);
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 122, 0, 0.3);
  box-shadow: var(--shadow-md), 0 0 30px var(--primary-soft);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--primary-soft);
  border: 1px solid rgba(255, 122, 0, 0.22);
  color: var(--primary);
  transition: transform var(--t-base);
}

.feature-card:hover .feature-icon-wrap { transform: scale(1.08) rotate(-4deg); }

.feature-icon-wrap svg { width: 21px; height: 21px; }

.feature-card.f-blue .feature-icon-wrap {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.22);
  color: var(--blue);
}

.feature-card.f-green .feature-icon-wrap {
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.22);
  color: var(--green);
}

.feature-card.f-purple .feature-icon-wrap {
  background: rgba(168, 85, 247, 0.10);
  border-color: rgba(168, 85, 247, 0.22);
  color: var(--purple);
}

.feature-card.f-red .feature-icon-wrap {
  background: rgba(214, 40, 40, 0.10);
  border-color: rgba(214, 40, 40, 0.22);
  color: #EF4444;
}

.feature-text { flex: 1; min-width: 0; }

.feature-text b {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.feature-text p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

/* ═══ SECTION HEAD ═══ */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 0 24px;
  margin-bottom: 44px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: var(--primary-soft);
  border: 1px solid rgba(255, 122, 0, 0.28);
  border-radius: 99px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.section-badge svg { width: 14px; height: 14px; }

.section-title {
  font-family: var(--font-ar);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.2;
  color: var(--text);
  max-width: 720px;
}

.section-sub {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 620px;
}

/* ═══ SERVICES ═══ */
.services-section {
  padding: 80px 60px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.service-card {
  position: relative;
  padding: 24px 22px;
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: start;
  cursor: pointer;
  transition: all var(--t-base);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, var(--primary-soft), transparent 65%);
  opacity: 0;
  transition: opacity var(--t-base);
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 122, 0, 0.4);
  box-shadow: var(--shadow-md), 0 0 32px var(--primary-soft);
}

.service-card:hover::before { opacity: 1; }

.sc-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-soft);
  border: 1px solid rgba(255, 122, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: transform var(--t-base);
  position: relative;
  z-index: 1;
}

.service-card:hover .sc-icon { transform: scale(1.08) rotate(-5deg); }

.sc-icon svg { width: 26px; height: 26px; }

.service-card h3 {
  font-family: var(--font-ar);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  position: relative;
  z-index: 1;
}

.service-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.sc-arrow {
  position: absolute;
  top: 22px;
  inset-inline-end: 22px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  opacity: 0;
  transform: translateX(8px);
  transition: all var(--t-base);
}

.service-card:hover .sc-arrow {
  opacity: 1;
  transform: translateX(0);
}

.sc-arrow svg { width: 15px; height: 15px; }

/* ═══ SERVICE DETAIL MODAL ═══ */
.service-detail {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.service-detail.is-open {
  opacity: 1;
  visibility: visible;
}

.sd-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sd-panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 40px 36px 32px;
  box-shadow: var(--shadow-xl);
  animation: popIn 0.4s var(--ease-out);
  z-index: 1;
}

.sd-panel::before {
  content: '';
  position: absolute;
  top: -1px;
  inset-inline: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.6;
  pointer-events: none;
}

.sd-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  cursor: pointer;
}

.sd-close:hover {
  background: rgba(214, 40, 40, 0.15);
  border-color: rgba(214, 40, 40, 0.4);
  color: #F87171;
  transform: rotate(90deg);
}

.sd-close svg { width: 18px; height: 18px; }

.sd-head {
  text-align: center;
  margin-bottom: 26px;
}

.sd-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  margin: 0 auto 16px;
  background: var(--primary-soft);
  border: 1px solid rgba(255, 122, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: 0 0 32px var(--primary-soft);
}

.sd-icon svg { width: 34px; height: 34px; }

.sd-title {
  font-family: var(--font-ar);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 8px;
}

.sd-desc {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.sd-features { margin-bottom: 26px; }

.sd-subtitle {
  font-family: var(--font-ar);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.sd-feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sd-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  transition: all var(--t-fast);
}

.sd-feature-list li:hover {
  background: var(--primary-soft);
  border-color: rgba(255, 122, 0, 0.25);
  color: var(--text);
  transform: translateX(-3px);
}

html[dir="ltr"] .sd-feature-list li:hover { transform: translateX(3px); }

.sd-feature-list svg {
  width: 16px;
  height: 16px;
  color: var(--green);
  flex-shrink: 0;
  margin-top: 2px;
}

.sd-cta { text-align: center; }
.sd-cta .btn { width: 100%; }

@media (max-width: 620px) {
  .sd-panel { padding: 32px 22px 24px; }
  .sd-feature-list { grid-template-columns: 1fr; }
  .sd-title { font-size: 22px; }
}

/* ═══ FEATURES ═══ */
.features-section {
  padding: 80px 60px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.feature-tile {
  padding: 22px 18px;
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  transition: all var(--t-base);
  cursor: default;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.5s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 30ms);
}

.feature-tile::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity var(--t-base);
}

.feature-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 122, 0, 0.35);
  box-shadow: var(--shadow-md);
}

.feature-tile:hover::before { opacity: 1; }

.ft-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  border: 1px solid rgba(255, 122, 0, 0.22);
  color: var(--primary);
  transition: transform var(--t-base);
}

.feature-tile:hover .ft-icon { transform: scale(1.1) rotate(-5deg); }

.ft-icon svg { width: 22px; height: 22px; }

.ft-title {
  font-family: var(--font-ar);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

/* Feature color variants */
.feature-tile.fc-blue .ft-icon {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.25);
  color: var(--blue);
}

.feature-tile.fc-green .ft-icon {
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.25);
  color: var(--green);
}

.feature-tile.fc-purple .ft-icon {
  background: rgba(168, 85, 247, 0.10);
  border-color: rgba(168, 85, 247, 0.25);
  color: var(--purple);
}

.feature-tile.fc-gold .ft-icon {
  background: rgba(212, 175, 55, 0.10);
  border-color: rgba(212, 175, 55, 0.25);
  color: var(--gold);
}

.feature-tile.fc-red .ft-icon {
  background: rgba(214, 40, 40, 0.10);
  border-color: rgba(214, 40, 40, 0.25);
  color: #EF4444;
}


/* ═══════════════════════════════════════════════════════════════
   §9 · ═══ MEGA FOOTER (About + Contact merged) ═══
   ═══════════════════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.4), rgba(5, 5, 5, 0.98));
  border-top: 1px solid var(--line);
  padding: 56px 60px 28px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .site-footer {
  background: linear-gradient(180deg, rgba(230, 230, 225, 0.5), rgba(225, 225, 220, 1));
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.4;
  pointer-events: none;
}

.site-footer[hidden] { display: none !important; }

/* ═══ Top: Verses + Wisdom ═══ */
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.footer-verse {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fv-item {
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.06), transparent);
  border-inline-end: 3px solid var(--gold);
  border-radius: 4px;
}

html[dir="ltr"] .fv-item {
  border-inline-end: none;
  border-inline-start: 3px solid var(--gold);
}

.fv-ar {
  display: block;
  font-family: var(--font-quran);
  font-size: 17px;
  color: var(--gold);
  line-height: 1.9;
  font-weight: 700;
}

.fv-item cite {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 600;
}

.footer-wisdom {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fw-item {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  position: relative;
  transition: all var(--t-fast);
}

.fw-item:hover {
  background: var(--primary-soft);
  border-color: rgba(255, 122, 0, 0.22);
}

.fw-mark {
  position: absolute;
  top: -6px;
  inset-inline-start: 14px;
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 1;
  color: var(--primary);
  opacity: 0.5;
}

.fw-item p {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.7;
  font-weight: 600;
  padding-inline-start: 16px;
}

/* ═══ Middle: Merged (About Mini + Contact Mini + Countdown) ═══ */
.footer-merged {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.1fr;
  gap: 28px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

/* ─── About Mini ─── */
.footer-about-mini {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.fam-avatar-wrap {
  position: relative;
  width: 82px;
  height: 82px;
  flex-shrink: 0;
}

.fam-avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 122, 0, 0.4);
  box-shadow: 0 0 24px var(--primary-glow);
}

.fam-status {
  position: absolute;
  bottom: 2px;
  inset-inline-end: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--card);
  box-shadow: 0 0 12px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

.fam-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.fam-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: var(--primary-soft);
  border: 1px solid rgba(255, 122, 0, 0.28);
  border-radius: 99px;
  color: var(--primary);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  width: max-content;
}

.fam-name {
  font-family: var(--font-ar);
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.fam-role {
  color: var(--primary);
  font-family: var(--font-en);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.fam-bio {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
  margin-top: 2px;
}

.fam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.fam-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.fam-meta-item svg {
  width: 11px;
  height: 11px;
  color: var(--primary);
}

.fam-socials {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.social-chip {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  transition: all var(--t-fast);
}

.social-chip svg { width: 15px; height: 15px; }

.social-chip:hover { transform: translateY(-3px) scale(1.05); color: #fff; }

.social-chip.wa:hover   { background: linear-gradient(135deg, #25D366, #128C7E); border-color: #25D366; }
.social-chip.mail:hover { background: linear-gradient(135deg, #EA4335, #C5221F); border-color: #EA4335; }
.social-chip.gh:hover   { background: linear-gradient(135deg, #333, #000); border-color: #555; }
.social-chip.li:hover   { background: linear-gradient(135deg, #0A66C2, #004182); border-color: #0A66C2; }
.social-chip.pf:hover   { background: linear-gradient(135deg, #FF7A00, #E85D04); border-color: #FF7A00; }

/* ─── Contact Mini ─── */
.footer-contact-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fcm-title {
  font-family: var(--font-ar);
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.fcm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: all var(--t-fast);
  cursor: pointer;
}

.fcm-item:hover {
  background: var(--primary-soft);
  border-color: rgba(255, 122, 0, 0.25);
  transform: translateX(-3px);
}

html[dir="ltr"] .fcm-item:hover { transform: translateX(3px); }

.fcm-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary-soft);
  border: 1px solid rgba(255, 122, 0, 0.22);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fcm-icon svg { width: 14px; height: 14px; }

.fcm-icon.wa {
  background: rgba(37, 211, 102, 0.10);
  border-color: rgba(37, 211, 102, 0.25);
  color: #25D366;
}

.fcm-icon.mail {
  background: rgba(234, 67, 53, 0.10);
  border-color: rgba(234, 67, 53, 0.25);
  color: #EA4335;
}

.fcm-icon.site {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.25);
  color: var(--blue);
}

.fcm-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.fcm-label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.fcm-value {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Countdown ─── */
.footer-countdown {
  padding: 18px 20px;
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}

.footer-countdown::before {
  content: '';
  position: absolute;
  top: -50%;
  inset-inline-end: -30%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15), transparent 65%);
  pointer-events: none;
}

.fc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.fc-head svg { width: 16px; height: 16px; }

.fc-date {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.fc-date > .en {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 1px;
}

.fc-date small {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.fc-timer {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.fc-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.fc-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 7px;
  min-width: 44px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.fc-unit small {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.fc-sep {
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
  opacity: 0.5;
}

/* ═══ Bottom: Links + Copyright ═══ */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.fl-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 110px;
}

.fl-col h5 {
  font-family: var(--font-ar);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.fl-col a {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: all var(--t-fast);
  width: max-content;
  position: relative;
}

.fl-col a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  inset-inline-start: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width var(--t-base);
}

.fl-col a:hover { color: var(--primary); }
.fl-col a:hover::after { width: 100%; }

.footer-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-copy .fc-sep {
  opacity: 0.4;
  font-size: 11px;
}

.footer-powered {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: var(--primary-deep);
  border: 1px solid rgba(255, 122, 0, 0.20);
  border-radius: 99px;
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 700;
}

.footer-powered svg {
  width: 11px;
  height: 11px;
  animation: sparkleRotate 3s linear infinite;
}

/* Responsive footer */
@media (max-width: 1024px) {
  .footer-merged {
    grid-template-columns: 1fr 1fr;
  }

  .footer-countdown {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .site-footer { padding: 40px 22px 24px; gap: 28px; }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 24px;
  }

  .footer-merged {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-bottom: 24px;
  }

  .footer-countdown { grid-column: auto; }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    gap: 30px;
    justify-content: center;
  }

  .fl-col { min-width: auto; align-items: center; }
}

@media (max-width: 480px) {
  .footer-about-mini {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .fam-info { align-items: center; }
  .fam-socials { justify-content: center; }
  .fam-meta { justify-content: center; }

  .fc-timer { flex-wrap: wrap; gap: 4px; }
  .fc-sep { display: none; }
  .fc-unit { flex: 0 0 calc(50% - 4px); margin-bottom: 6px; }
}


/* ═══════════════════════════════════════════════════════════════
   §10 · STAGE 3 · ONBOARDING
   ═══════════════════════════════════════════════════════════════ */
.stage-onboarding {
  position: fixed;
  inset: 0;
  z-index: var(--z-onboard);
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 700px at 50% 30%, var(--primary-soft), transparent 60%),
    rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow-y: auto;
}

.wizard {
  width: 100%;
  max-width: 660px;
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-2xl);
  padding: 36px 40px 32px;
  box-shadow: var(--shadow-xl), var(--shadow-inner);
  position: relative;
  overflow: hidden;
  animation: popIn 0.55s var(--ease-out);
}

.wizard::before {
  content: '';
  position: absolute;
  top: -1px;
  inset-inline: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.6;
  pointer-events: none;
}

.wizard::after {
  content: '';
  position: absolute;
  top: -40%;
  inset-inline-end: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--primary-soft), transparent 60%);
  pointer-events: none;
}

/* Brand in wizard */
.wizard-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.wizard-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 0 20px var(--primary-glow);
  flex-shrink: 0;
}

.wizard-brand-greeting {
  font-family: var(--font-quran);
  font-size: 15px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Wizard screens */
.wizard-screen {
  display: none;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.wizard-screen.is-active { display: flex; }
.wizard-screen[hidden] { display: none !important; }

.wizard-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.wizard-title {
  font-family: var(--font-ar);
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.25;
  color: var(--text);
}

.wizard-title .accent {
  background: linear-gradient(120deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wizard-subtitle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* Role picker */
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 6px;
}

.role-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 24px 22px;
  background: var(--bg-3);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  text-align: start;
  transition: all var(--t-base);
  overflow: hidden;
  cursor: pointer;
  min-height: 170px;
}

.role-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top left, var(--primary-soft), transparent 60%);
  opacity: 0;
  transition: opacity var(--t-base);
  pointer-events: none;
}

.role-card:hover {
  border-color: rgba(255, 122, 0, 0.45);
  background: var(--bg-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 24px var(--primary-soft);
}

.role-card:hover::before { opacity: 1; }

.role-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  border: 1px solid rgba(255, 122, 0, 0.25);
  color: var(--primary);
  flex-shrink: 0;
  transition: all var(--t-base);
}

.role-card-icon svg { width: 26px; height: 26px; }

.role-card-icon-admin {
  background: rgba(214, 40, 40, 0.10);
  border-color: rgba(214, 40, 40, 0.25);
  color: var(--red);
}

.role-card:hover .role-card-icon { transform: scale(1.08); }

.role-card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.role-card-text b {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.role-card-text small {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
}

.role-card-arrow {
  position: absolute;
  top: 22px;
  inset-inline-end: 22px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  opacity: 0;
  transform: translateX(8px);
  transition: all var(--t-base);
}

html[dir="ltr"] .role-card-arrow { transform: translateX(-8px); }

.role-card:hover .role-card-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--primary);
}

/* ═══ Steps indicator (with labels) ═══ */
.steps-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 0;
}

.step-dot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: var(--bg-3);
  border: 1.5px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: all var(--t-base);
  flex-shrink: 0;
}

.sd-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  transition: all var(--t-base);
  flex-shrink: 0;
}

.sd-label {
  white-space: nowrap;
}

.step-dot.is-active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.step-dot.is-active .sd-num {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #0A0A0A;
  box-shadow: 0 0 16px var(--primary-glow);
}

.step-dot.is-done {
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--green);
}

.step-dot.is-done .sd-num {
  background: var(--green);
  color: #fff;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  min-width: 20px;
}

.step-line::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--t-slow);
  border-radius: 2px;
}

html[dir="ltr"] .step-line::before { transform-origin: left center; }

.step-line.is-done::before { transform: scaleX(1); }

@media (max-width: 620px) {
  .sd-label { display: none; }

  .step-dot {
    padding: 6px;
    gap: 0;
  }

  .step-dot .sd-num {
    width: 28px;
    height: 28px;
  }
}

/* ═══ Forms ═══ */
#studentForm,
#adminForm {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-panel {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.form-panel.is-active { display: flex; }
.form-panel[hidden] { display: none !important; }

.form-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
}

.form-title {
  font-family: var(--font-ar);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.form-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-label .req { color: var(--primary); font-weight: 700; }
.field-label .opt { color: var(--muted); font-size: 11px; font-weight: 400; }

.field-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-3);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0 16px;
  height: 52px;
  transition: all var(--t-fast);
  position: relative;
}

.field-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  background: var(--bg-2);
}

.field-input-wrap.error {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(214, 40, 40, 0.10);
  animation: shakeX 0.4s var(--ease);
}

.field-input-wrap.valid { border-color: rgba(34, 197, 94, 0.5); }

.field-input-wrap > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
  transition: color var(--t-fast);
}

.field-input-wrap:focus-within > svg { color: var(--primary); }

.field-input-wrap input,
.field-input-wrap select {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14.5px;
  width: 100%;
  min-width: 0;
}

.field-input-wrap input::placeholder { color: var(--muted-2); }

.field-input-wrap input[type="date"] { color-scheme: dark; }
[data-theme="light"] .field-input-wrap input[type="date"] { color-scheme: light; }

.field-input-wrap input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
}

.field-err {
  font-size: 12px;
  color: var(--red);
  min-height: 0;
  padding-inline-start: 4px;
  transition: all var(--t-fast);
  font-weight: 500;
}

.field-err:not(:empty) { min-height: 18px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-input-code { padding-inline-start: 8px; }

.btn-toggle-pass {
  width: 36px;
  height: 36px;
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all var(--t-fast);
  flex-shrink: 0;
  cursor: pointer;
}

.btn-toggle-pass:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.btn-toggle-pass svg { width: 18px; height: 18px; }

/* Level grid */
.level-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.level-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  background: var(--bg-3);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  text-align: start;
  transition: all var(--t-fast);
  cursor: pointer;
  color: var(--text-2);
  position: relative;
}

.level-btn svg {
  width: 22px;
  height: 22px;
  color: var(--muted);
  flex-shrink: 0;
  transition: color var(--t-fast);
}

.level-btn:hover {
  border-color: rgba(255, 122, 0, 0.4);
  background: var(--primary-soft);
}

.level-btn.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.level-btn.is-active svg { color: var(--primary); }

.level-btn-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.level-btn-text b {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.level-btn-text small {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 400;
  font-family: var(--font-en);
  letter-spacing: 0.5px;
}

@media (max-width: 500px) {
  .level-grid { grid-template-columns: 1fr; }
}

/* Avatar upload */
.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px dashed var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}

.avatar-preview:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: scale(1.03);
}

.avatar-preview.has-image {
  border-style: solid;
  border-color: var(--primary);
  box-shadow: 0 0 32px var(--primary-glow);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-icon {
  width: 36px;
  height: 36px;
  color: var(--muted);
  transition: color var(--t-fast);
}

.avatar-preview:hover .avatar-icon { color: var(--primary); }

.avatar-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

/* Form actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  align-items: center;
}

.form-actions .btn-primary { flex: 1; }
.form-actions .btn-submit[hidden] { display: none !important; }
.form-actions .btn-next[hidden] { display: none !important; }

.btn-back {
  flex: 0 0 auto;
  padding: 14px 20px;
  color: var(--muted);
}

.btn-back[hidden] { display: none !important; }

.btn-back:hover:not(:disabled) {
  color: var(--primary);
  border-color: rgba(255, 122, 0, 0.35);
}

/* Admin guard icon */
.admin-guard-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 4px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(214, 40, 40, 0.12), rgba(214, 40, 40, 0.04));
  border: 1px solid rgba(214, 40, 40, 0.3);
  color: var(--red);
  box-shadow: 0 0 32px rgba(214, 40, 40, 0.18);
}

.admin-guard-icon svg { width: 36px; height: 36px; }

/* Success screen */
.success-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  border: 2px solid rgba(34, 197, 94, 0.4);
  color: var(--green);
  box-shadow: 0 0 44px rgba(34, 197, 94, 0.35);
  animation: successPop 0.6s var(--ease-back);
}

.success-icon svg { width: 46px; height: 46px; }

.success-title {
  font-family: var(--font-ar);
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
}

.success-title .accent {
  background: linear-gradient(120deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.success-sub {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.success-loader {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.success-loader span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  animation: bounce 1.2s ease-in-out infinite;
}

.success-loader span:nth-child(2) { animation-delay: 0.15s; }
.success-loader span:nth-child(3) { animation-delay: 0.3s; }

@media (max-width: 620px) {
  .stage-onboarding { padding: 16px; align-items: flex-start; }
  .wizard { padding: 26px 22px 22px; border-radius: var(--r-xl); margin: 8px 0; }
  .field-row { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .role-card {
    min-height: auto;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 18px;
  }
  .role-card-text b { font-size: 17px; }
  .role-card-arrow {
    position: static;
    opacity: 0.5;
    transform: none;
    margin-inline-start: auto;
    align-self: center;
  }
  .role-card:hover .role-card-arrow { transform: none; opacity: 1; }
}

@media (max-width: 480px) {
  .wizard { padding: 22px 18px 18px; }
  .wizard-title { font-size: 22px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn,
  .form-actions .btn-back { width: 100%; justify-content: center; }
  .avatar-preview { width: 100px; height: 100px; }
  .avatar-icon { width: 30px; height: 30px; }
}


/* ═══════════════════════════════════════════════════════════════
   §11 · STAGE 4 · APP SHELL
   ═══════════════════════════════════════════════════════════════ */
.stage-shell {
  position: fixed;
  inset: 0;
  z-index: var(--z-shell);
  background: var(--bg);
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  overflow-y: auto;
}

.app-shell-inner {
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: popIn 0.6s var(--ease-out);
}

.app-shell-icon {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary-soft), rgba(214, 40, 40, 0.08));
  border: 1px solid rgba(255, 122, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.app-shell-icon svg { width: 40px; height: 40px; }

.app-shell-title {
  font-family: var(--font-ar);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
}

.app-shell-sub {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.8;
}

.app-shell-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--primary-soft);
  border: 1px solid rgba(255, 122, 0, 0.22);
  border-radius: 99px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  max-width: 100%;
}

.app-shell-user svg { width: 14px; height: 14px; flex-shrink: 0; }

.app-shell-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}


/* ═══════════════════════════════════════════════════════════════
   §12 · TOAST
   ═══════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
  width: calc(100% - 48px);
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.35s var(--ease-back);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}

html[dir="rtl"] .toast { transform: translateX(-120%); }

.toast.is-show {
  transform: translateX(0);
  opacity: 1;
}

.toast::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.toast svg { width: 18px; height: 18px; flex-shrink: 0; }

.toast-success::before { background: var(--green); }
.toast-success svg { color: var(--green); }
.toast-error::before { background: var(--red); }
.toast-error svg { color: var(--red); }
.toast-warning::before { background: #F59E0B; }
.toast-warning svg { color: #F59E0B; }
.toast-info::before { background: var(--primary); }
.toast-info svg { color: var(--primary); }

.toast span { flex: 1; line-height: 1.4; }

@media (max-width: 620px) {
  .toast-container {
    bottom: 16px;
    inset-inline: 16px;
    width: auto;
    max-width: none;
  }
}


/* ═══════════════════════════════════════════════════════════════
   §13 · ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.6; }
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.94) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes successPop {
  0%   { opacity: 0; transform: scale(0.5) rotate(-20deg); }
  60%  { transform: scale(1.15) rotate(6deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50%      { transform: translateY(-10px); opacity: 1; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-40px, 30px) scale(1.1); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(50px, -30px) scale(1.15); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-30px, -40px) scale(0.9); }
}


/* ═══════════════════════════════════════════════════════════════
   §14 · RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .hero-section {
    grid-template-columns: 1fr;
    padding: 40px 22px;
    gap: 44px;
    min-height: auto;
    text-align: center;
  }

  .hero-left { align-items: center; }
  .hero-badge { margin-inline: auto; }
  .hero-sub,
  .hero-verse,
  .hero-logo-greeting { margin-inline: auto; }

  .hero-verse {
    border-inline-end: none;
    border-inline-start: none;
    border-bottom: 3px solid var(--gold);
    border-radius: 0 0 4px 4px;
    text-align: center;
  }

  .hero-actions { justify-content: center; }

  .services-section,
  .features-section { padding: 60px 22px; }
}

@media (max-width: 620px) {
  .hero-title { font-size: 38px; letter-spacing: -1.5px; }
  .hero-section { padding: 30px 16px; }

  .hero-logo-greeting {
    padding: 12px 16px;
    gap: 12px;
  }

  .hero-logo { width: 48px; height: 48px; }
  .hero-greeting-main { font-size: 22px; }
  .hero-greeting-sub { font-size: 13px; }

  .services-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }

  .section-head { margin-bottom: 32px; }

  .hero-right .feature-card { padding: 16px 18px; }
  .feature-icon-wrap { width: 42px; height: 42px; }
  .feature-icon-wrap svg { width: 19px; height: 19px; }
  .feature-text b { font-size: 13.5px; }
  .feature-text p { font-size: 11.5px; }

  .loader-orbit { width: 220px; height: 220px; }
  .orbit-logo { width: 78px; height: 78px; }
  .orbit-center { width: 110px; height: 110px; }
  .loader-matrix { display: none; }
}

@media (max-width: 400px) {
  .features-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════
   §15 · REDUCED MOTION
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .loader-bar::after,
  .orbit-logo,
  .orbit-glow,
  .orbit-pulse,
  .loader-orb,
  .loader-matrix::before,
  .loader-scan,
  .loader-name::before,
  .loader-name::after {
    animation: none !important;
  }

  .hero-left > *,
  .hero-actions .btn,
  .feature-card,
  .feature-tile {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* ═══════════════════════════════════════════════════════════════
   §16 · UTILITIES
   ═══════════════════════════════════════════════════════════════ */
[hidden] { display: none !important; }
.no-scroll { overflow: hidden !important; }
.text-center { text-align: center; }
.en { font-family: var(--font-en); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}/* ═══════════════════════════════════════════════════════════════
   §17 · FOOTER UPGRADES v4
   ═══════════════════════════════════════════════════════════════ */

/* Footer buttons (links style) */
.fl-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: start;
  transition: all var(--t-fast);
  width: max-content;
  position: relative;
}

.fl-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  inset-inline-start: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width var(--t-base);
}

.fl-btn:hover { color: var(--primary); }
.fl-btn:hover::after { width: 100%; }

/* Tech chips */
.footer-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 220px;
}

.tech-chip {
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.3px;
  transition: all var(--t-fast);
}

.tech-chip:hover {
  background: var(--primary-soft);
  border-color: rgba(255, 122, 0, 0.3);
  color: var(--primary);
  transform: translateY(-1px);
}

/* Dev button in copy */
.footer-dev-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
  position: relative;
}

.footer-dev-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  inset-inline-start: 0;
  width: 100%;
  height: 1px;
  background: var(--primary);
  opacity: 0.4;
  transition: all var(--t-fast);
}

.footer-dev-btn:hover {
  color: var(--primary-3);
  text-shadow: 0 0 16px var(--primary-glow);
}

.footer-dev-btn:hover::after {
  opacity: 1;
  box-shadow: 0 0 8px var(--primary);
}

/* Footer socials row */
.footer-socials-real {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.social-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  transition: all var(--t-base);
  cursor: pointer;
}

.social-icon-btn svg {
  transition: transform var(--t-base);
}

.social-icon-btn:hover {
  transform: translateY(-3px) scale(1.06);
  color: #fff;
}

.social-icon-btn:hover svg {
  transform: scale(1.15);
}

.social-icon-btn.wa:hover   { background: linear-gradient(135deg, #25D366, #128C7E); border-color: #25D366; box-shadow: 0 10px 24px rgba(37, 211, 102, 0.35); }
.social-icon-btn.mail:hover { background: linear-gradient(135deg, #EA4335, #C5221F); border-color: #EA4335; box-shadow: 0 10px 24px rgba(234, 67, 53, 0.35); }
.social-icon-btn.gh:hover   { background: linear-gradient(135deg, #333, #000); border-color: #555; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5); }
.social-icon-btn.li:hover   { background: linear-gradient(135deg, #0A66C2, #004182); border-color: #0A66C2; box-shadow: 0 10px 24px rgba(10, 102, 194, 0.35); }
.social-icon-btn.pf:hover   { background: linear-gradient(135deg, #FF7A00, #E85D04); border-color: #FF7A00; box-shadow: 0 10px 24px rgba(255, 122, 0, 0.35); }

/* ═══ DEV CARD MODAL ═══ */
.dev-card-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s var(--ease-out);
}

.dev-card-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.dev-card-modal[hidden] { display: none !important; }

.dev-card-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dev-card-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 38px 32px 32px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 60px var(--primary-soft);
  animation: popIn 0.5s var(--ease-out);
  z-index: 1;
}

.dev-card-panel::before {
  content: '';
  position: absolute;
  top: -1px;
  inset-inline: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.7;
  pointer-events: none;
}

.dev-card-glow {
  position: absolute;
  top: -40%;
  inset-inline-end: -30%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--primary-soft), transparent 65%);
  pointer-events: none;
}

.dev-card-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  cursor: pointer;
  z-index: 2;
}

.dev-card-close:hover {
  background: rgba(214, 40, 40, 0.15);
  border-color: rgba(214, 40, 40, 0.4);
  color: #F87171;
  transform: rotate(90deg);
}

.dev-card-close svg { width: 18px; height: 18px; }

/* Avatar */
.dev-avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--line);
  box-shadow: 0 0 40px var(--primary-glow);
  position: relative;
  z-index: 2;
}

.dev-avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed var(--primary);
  opacity: 0.4;
  animation: spin 12s linear infinite;
}

.dev-avatar-status {
  position: absolute;
  bottom: 8px;
  inset-inline-end: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--card);
  box-shadow: 0 0 16px var(--green);
  z-index: 3;
  animation: pulse 2s ease-in-out infinite;
}

/* Name + role */
.dev-card-name {
  font-family: var(--font-ar);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1px;
  text-align: center;
  color: var(--text);
  margin-bottom: 6px;
}

.dev-card-role {
  text-align: center;
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 22px;
}

/* Info items */
.dev-card-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.dev-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all var(--t-fast);
}

.dev-info-row:hover {
  background: var(--primary-soft);
  border-color: rgba(255, 122, 0, 0.22);
  transform: translateX(-3px);
}

html[dir="ltr"] .dev-info-row:hover { transform: translateX(3px); }

.dev-info-row > svg,
.dev-info-row i {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.dev-info-row > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dev-info-row span {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.dev-info-row small {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  font-family: var(--font-en);
}

/* QR */
.dev-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  margin-bottom: 20px;
}

.dev-qr-frame {
  position: relative;
  width: 160px;
  height: 160px;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-qr-code {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-qr-code img {
  width: 100%;
  height: 100%;
  display: block;
}

.dev-qr-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--primary);
  pointer-events: none;
}

.dev-qr-corner.qr-tl { top: -3px; left: -3px; border-right: none; border-bottom: none; border-radius: 4px 0 0 0; }
.dev-qr-corner.qr-tr { top: -3px; right: -3px; border-left: none; border-bottom: none; border-radius: 0 4px 0 0; }
.dev-qr-corner.qr-bl { bottom: -3px; left: -3px; border-right: none; border-top: none; border-radius: 0 0 0 4px; }
.dev-qr-corner.qr-br { bottom: -3px; right: -3px; border-left: none; border-top: none; border-radius: 0 0 4px 0; }

.dev-qr-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

/* Links row */
.dev-links-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.dev-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--primary-soft);
  border: 1px solid rgba(255, 122, 0, 0.28);
  border-radius: 12px;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
  text-decoration: none;
}

.dev-link-btn:hover {
  background: rgba(255, 122, 0, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--primary-soft);
}

.dev-link-btn svg { width: 15px; height: 15px; }

.dev-link-btn.copy-btn.copied {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--green);
}

/* Contact mini row */
.dev-contact-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 18px;
}

.dcm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-2);
  font-weight: 600;
}

.dcm-item svg, .dcm-item i {
  width: 13px;
  height: 13px;
  color: var(--primary);
  flex-shrink: 0;
}

/* Socials */
.dev-socials-real {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.dev-soc {
  aspect-ratio: 1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  transition: all var(--t-base);
  cursor: pointer;
}

.dev-soc:hover {
  transform: translateY(-4px) scale(1.08);
  color: #fff;
}

.dev-soc.wa:hover   { background: linear-gradient(135deg, #25D366, #128C7E); border-color: #25D366; box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4); }
.dev-soc.mail:hover { background: linear-gradient(135deg, #EA4335, #C5221F); border-color: #EA4335; box-shadow: 0 8px 24px rgba(234, 67, 53, 0.4); }
.dev-soc.gh:hover   { background: linear-gradient(135deg, #333, #000); border-color: #555; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); }
.dev-soc.li:hover   { background: linear-gradient(135deg, #0A66C2, #004182); border-color: #0A66C2; box-shadow: 0 8px 24px rgba(10, 102, 194, 0.4); }
.dev-soc.pf:hover   { background: linear-gradient(135deg, #FF7A00, #E85D04); border-color: #FF7A00; box-shadow: 0 8px 24px rgba(255, 122, 0, 0.4); }

/* ═══ LEGAL MODAL ═══ */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s var(--ease-out);
}

.legal-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.legal-modal[hidden] { display: none !important; }

.legal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.legal-panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popIn 0.45s var(--ease-out);
  z-index: 1;
}

.legal-progress-bar {
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 5;
}

.legal-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-3));
  box-shadow: 0 0 12px var(--primary-glow);
  transition: width 0.1s linear;
}

.legal-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  cursor: pointer;
  z-index: 10;
}

.legal-close:hover {
  background: rgba(214, 40, 40, 0.15);
  border-color: rgba(214, 40, 40, 0.4);
  color: #F87171;
  transform: rotate(90deg);
}

.legal-close svg { width: 18px; height: 18px; }

.legal-tabs {
  display: flex;
  gap: 4px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  padding-inline-end: 60px;
  background: var(--bg-2);
  flex-shrink: 0;
}

.legal-tab {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
  white-space: nowrap;
}

.legal-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.legal-tab.is-active {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: rgba(255, 122, 0, 0.28);
}

.legal-content {
  padding: 26px 30px 30px;
  overflow-y: auto;
  flex: 1;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.9;
}

.legal-content h4 {
  font-family: var(--font-ar);
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  margin: 20px 0 10px;
  padding-inline-start: 12px;
  border-inline-start: 3px solid var(--primary);
  letter-spacing: -0.3px;
}

.legal-content h4:first-child { margin-top: 0; }

.legal-content p {
  margin-bottom: 14px;
  color: var(--text-2);
}

.legal-content ul {
  margin: 10px 0 16px;
  padding-inline-start: 22px;
  list-style: none;
}

.legal-content li {
  position: relative;
  padding-inline-start: 16px;
  margin-bottom: 8px;
  color: var(--text-2);
}

.legal-content li::before {
  content: '◆';
  position: absolute;
  inset-inline-start: 0;
  top: 4px;
  color: var(--primary);
  font-size: 9px;
}

.legal-content strong {
  color: var(--text);
  font-weight: 700;
}

.legal-content .legal-meta {
  padding: 12px 16px;
  background: var(--primary-soft);
  border: 1px solid rgba(255, 122, 0, 0.22);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

@media (max-width: 620px) {
  .dev-card-panel { padding: 30px 22px 24px; }
  .dev-card-name { font-size: 22px; }
  .dev-socials-real { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .dev-soc svg { width: 16px !important; height: 16px !important; }
  .legal-content { padding: 20px 20px 24px; }
  .legal-tabs { padding-inline-end: 56px; }
  .legal-tab { padding: 7px 12px; font-size: 11.5px; }
}