/* ╔══════════════════════════════════════════════════════════╗
   ║  SIA — التصميم. أسود · كحلي · فضّي · أزرق كهربائي.        ║
   ║  قاعدة البيت: لا شيء يُحشر في النص — كل صفحة بعرض الشاشة ║
   ║  كاملة بأعمدة وشبكات.                                     ║
   ╚══════════════════════════════════════════════════════════╝ */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
svg { width: 18px; height: 18px; flex-shrink: 0; }

:root, [data-theme="dark"] {
  --bg: #03070e; --bg2: #071121;
  --panel: rgba(8, 16, 30, .80); --panel2: rgba(13, 25, 45, .90);
  --plate: rgba(5, 11, 22, .88); --plate-up: rgba(12, 24, 44, .95);
  --line: rgba(120, 170, 255, .13); --line2: rgba(120, 170, 255, .26); --line3: rgba(120, 170, 255, .42);
  --ink: #eaf1fb; --ink2: #b7c6db; --mute: #8193ad; --dim: #5a6b84;
  --blue: #3fa9ff; --blue2: #1f7cff; --cyan: #36e0ff; --silver: #c9d3e0;
  --red: #ff4d5e; --red-bg: rgba(255, 77, 94, .12); --amber: #ffb020; --green: #22d3a6; --gold: #f2c14e; --violet: #a78bfa;
  --on-blue: #fff;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, .8);
  --glow: 0 0 0 1px rgba(63, 169, 255, .28), 0 12px 40px -12px rgba(31, 124, 255, .55);
  --vig: radial-gradient(ellipse at 50% 40%, transparent 35%, rgba(0, 0, 0, .62) 100%);
  --base: radial-gradient(1200px 700px at 78% -10%, #0c2140 0%, transparent 60%), radial-gradient(900px 600px at 0% 110%, #0a1a33 0%, transparent 60%), #03070e;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #e7ecf4; --bg2: #f2f5fa;
  --panel: rgba(255, 255, 255, .84); --panel2: rgba(255, 255, 255, .95);
  --plate: rgba(250, 252, 255, .93); --plate-up: #fff;
  --line: rgba(16, 52, 120, .13); --line2: rgba(16, 52, 120, .22); --line3: rgba(16, 52, 120, .38);
  --ink: #0a1628; --ink2: #273a57; --mute: #57698a; --dim: #8796ae;
  --blue: #1063dc; --blue2: #0a4fbd; --cyan: #0889ad; --silver: #44546d;
  --red: #d61f37; --red-bg: rgba(214, 31, 55, .09); --amber: #b97400; --green: #0f9a76; --gold: #a87a10; --violet: #6d4fd6;
  --shadow: 0 16px 40px -20px rgba(20, 40, 80, .35);
  --glow: 0 0 0 1px rgba(16, 99, 220, .25), 0 12px 32px -14px rgba(16, 99, 220, .45);
  --vig: radial-gradient(ellipse at 50% 40%, transparent 50%, rgba(120, 140, 175, .25) 100%);
  --base: radial-gradient(1200px 700px at 78% -10%, #d3e2fb 0%, transparent 60%), radial-gradient(900px 600px at 0% 110%, #dbe5f5 0%, transparent 60%), #e7ecf4;
  color-scheme: light;
}
:root {
  --r: 14px; --rail: 262px; --top: 74px;
  --f: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --fl: 'Rajdhani', 'IBM Plex Sans Arabic', sans-serif;
  --fm: 'JetBrains Mono', Consolas, monospace;
}

html { background: var(--bg); -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; font-family: var(--f); font-size: 15.5px; line-height: 1.6; font-weight: 500;
  color: var(--ink); background: var(--base); background-attachment: fixed; overflow-x: clip;
}
#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#vig { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--vig); }
#root { position: relative; z-index: 1; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(63, 169, 255, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.mono { font-family: var(--fm); letter-spacing: .02em; }
.lat { font-family: var(--fl); letter-spacing: .06em; }
.num { font-family: var(--fl); font-variant-numeric: tabular-nums; }
[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }

.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.boot-ring { width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--blue); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────────────────────── أزرار وحقول ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 11px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink);
  font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: .18s; position: relative; overflow: hidden;
}
.btn:hover { border-color: var(--line3); background: var(--plate-up); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: linear-gradient(180deg, #4cb2ff, #1f74f0); border-color: rgba(140, 200, 255, .55); color: #fff; box-shadow: 0 8px 26px -10px rgba(31, 124, 255, .9); }
.btn.primary:hover { background: linear-gradient(180deg, #62bdff, #2a80ff); }
.btn.danger { background: linear-gradient(180deg, #ff6271, #d8283c); border-color: rgba(255, 140, 150, .5); color: #fff; }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.shine::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%); transform: translateX(-120%); animation: shine 3.4s ease-in-out infinite; }
@keyframes shine { 0%, 60% { transform: translateX(120%); } 100% { transform: translateX(-120%); } }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 11px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink2); transition: .16s; position: relative;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line3); background: var(--plate-up); }
.icon-btn.active { color: var(--blue); border-color: var(--blue); background: rgba(63, 169, 255, .12); }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13.5px; color: var(--ink2); font-weight: 600; }
.inp, .field input, .field select, .field textarea {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line2);
  background: rgba(0, 0, 0, .22); color: var(--ink); outline: none; transition: .15s; font-weight: 500;
}
[data-theme="light"] .inp, [data-theme="light"] .field input, [data-theme="light"] .field select, [data-theme="light"] .field textarea { background: #fff; }
.field textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.7; }
.inp:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(63, 169, 255, .18); }
.field select option { background: var(--bg2); color: var(--ink); }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; } .row.end { justify-content: flex-end; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
[data-theme="light"] .seg { background: rgba(255, 255, 255, .6); }
.seg button { height: 36px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; color: var(--mute); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; }
.seg button.on { background: var(--blue); color: #fff; box-shadow: 0 6px 18px -8px rgba(31, 124, 255, .9); }
.seg button:not(.on):hover { color: var(--ink); }

.tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; border: 1px solid currentColor; white-space: nowrap; }
.tag svg { width: 14px; height: 14px; }
.tag.red { color: var(--red); background: var(--red-bg); }
.tag.amber { color: var(--amber); background: rgba(255, 176, 32, .12); }
.tag.green { color: var(--green); background: rgba(34, 211, 166, .12); }
.tag.blue { color: var(--blue); background: rgba(63, 169, 255, .12); }
.tag.mute { color: var(--mute); background: rgba(127, 145, 171, .1); }
.tag.violet { color: var(--violet); background: rgba(167, 139, 250, .12); }

/* ───────────────────────── شاشة الدخول ───────────────────────── */
.gate { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; overflow: auto; }
.gate-hud { position: fixed; font-family: var(--fm); font-size: 11.5px; color: var(--blue); opacity: .75; letter-spacing: .08em; line-height: 1.9; pointer-events: none; direction: ltr; text-align: left; }
.gate-hud.tl { top: 22px; left: 26px; } .gate-hud.tr { top: 22px; right: 26px; text-align: right; }
.gate-hud.bl { bottom: 22px; left: 26px; } .gate-hud.br { bottom: 22px; right: 26px; text-align: right; }
.gate-hud b { color: var(--cyan); font-weight: 700; }
.gate-hud .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-inline-end: 6px; box-shadow: 0 0 10px var(--green); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.gate-box {
  position: relative; width: min(470px, 100%); padding: 34px 36px 26px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(8, 18, 34, .80), rgba(3, 8, 16, .86)); border: 1px solid var(--line2);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(63, 169, 255, .08) inset, 0 0 60px -20px rgba(31, 124, 255, .55);
  animation: rise .7s cubic-bezier(.2, .8, .2, 1) both;
}
[data-theme="light"] .gate-box { background: linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(240, 245, 252, .92)); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.corners::before, .corners::after, .corners > .c3, .corners > .c4 { content: ''; position: absolute; width: 22px; height: 22px; border: 2px solid var(--blue); pointer-events: none; }
.corners::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.corners::after { top: -1px; right: -1px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.corners > .c3 { bottom: -1px; left: -1px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.corners > .c4 { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.gate-logo { display: grid; place-items: center; margin: -4px 0 12px; position: relative; }
.gate-logo .logo { width: 116px; height: 116px; filter: drop-shadow(0 8px 26px rgba(31, 124, 255, .45)); }
.gate-logo::before { content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%; border: 1px dashed var(--line3); animation: spin 22s linear infinite; }
.gate h1 { margin: 0; text-align: center; font-family: var(--fl); font-weight: 700; font-size: 22px; letter-spacing: .26em; color: var(--ink); direction: ltr; }
.gate .sub { text-align: center; color: var(--mute); font-size: 14px; margin: 4px 0 24px; }
.gate .sub b { color: var(--blue); }
.gate form { display: grid; gap: 14px; }
.gfield { position: relative; }
.gfield svg { position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%); color: var(--mute); width: 19px; height: 19px; pointer-events: none; }
.gfield input { width: 100%; height: 52px; padding-inline: 46px 16px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(0, 0, 0, .3); color: var(--ink); outline: none; font-size: 16px; font-weight: 600; transition: .15s; }
[data-theme="light"] .gfield input { background: #fff; }
.gfield input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(63, 169, 255, .2); }
.gfield input:focus + svg, .gfield:focus-within svg { color: var(--blue); }
.gfield .eye-t { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; color: var(--mute); display: grid; place-items: center; border-radius: 8px; }
.gfield .eye-t svg { position: static; transform: none; }
.gate .btn.primary { height: 52px; font-size: 16px; letter-spacing: .02em; margin-top: 4px; }
.gate-err { min-height: 22px; font-size: 14px; font-weight: 700; color: var(--red); text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px; }
.gate-err svg { width: 17px; height: 17px; }
.gate-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: var(--mute); }
.gate-foot .mono { color: var(--blue); direction: ltr; }
.gate-box.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }

/* دخول مقبول */
.granted { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, rgba(6, 18, 36, .9), rgba(1, 4, 9, .97)); animation: fadein .25s both; }
[data-theme="light"] .granted { background: radial-gradient(circle at 50% 50%, rgba(240, 246, 255, .94), rgba(220, 230, 245, .98)); }
.granted.out { animation: fadeout .45s both; }
@keyframes fadein { from { opacity: 0; } } @keyframes fadeout { to { opacity: 0; visibility: hidden; } }
.gr-in { display: grid; justify-items: center; gap: 14px; }
.gr-logo { position: relative; width: 200px; height: 200px; display: grid; place-items: center; }
.gr-logo .logo { width: 150px; height: 150px; animation: grpop .6s cubic-bezier(.2, 1.4, .3, 1) both; }
.gr-logo::before, .gr-logo::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--cyan); border-bottom-color: var(--blue); animation: spin 1s linear infinite; }
.gr-logo::after { inset: 14px; border-top-color: transparent; border-left-color: var(--blue); border-right-color: var(--cyan); animation-duration: .7s; animation-direction: reverse; }
@keyframes grpop { from { transform: scale(.4); opacity: 0; } }
.gr-t { font-family: var(--fl); font-weight: 700; font-size: 26px; letter-spacing: .32em; color: var(--green); direction: ltr; text-shadow: 0 0 22px rgba(34, 211, 166, .6); }
.gr-n { font-size: 17px; color: var(--ink2); }
.gr-n b { color: var(--ink); }
.gr-bar { width: 280px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.gr-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--cyan)); animation: grbar 1s cubic-bezier(.4, 0, .2, 1) forwards; box-shadow: 0 0 12px var(--cyan); }
@keyframes grbar { to { width: 100%; } }

/* ───────────────────────── الهيكل ───────────────────────── */
#app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; animation: fadein .5s both; }
#rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px;
  background: linear-gradient(180deg, rgba(4, 10, 20, .86), rgba(3, 7, 14, .92)); border-inline-end: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 30; overflow-y: auto; overflow-x: hidden;
}
[data-theme="light"] #rail { background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(244, 247, 252, .94)); }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 16px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.brand .logo { width: 56px; height: 56px; filter: drop-shadow(0 4px 14px rgba(31, 124, 255, .45)); }
.brand b { display: block; font-family: var(--fl); font-size: 24px; letter-spacing: .3em; line-height: 1.05; color: var(--ink); direction: ltr; text-align: start; }
.brand small { display: block; font-family: var(--fl); font-size: 10.5px; letter-spacing: .12em; color: var(--blue); font-weight: 700; direction: ltr; text-align: start; white-space: nowrap; }
.nav-h { font-size: 11.5px; letter-spacing: .1em; color: var(--dim); font-weight: 700; padding: 12px 12px 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; border-radius: 11px; color: var(--ink2);
  font-weight: 600; font-size: 15px; position: relative; transition: .15s; border: 1px solid transparent;
}
.nav a svg { width: 20px; height: 20px; color: var(--mute); transition: .15s; }
.nav a:hover { background: rgba(63, 169, 255, .07); color: var(--ink); }
.nav a:hover svg { color: var(--blue); }
.nav a.on { background: linear-gradient(90deg, rgba(63, 169, 255, .04), rgba(63, 169, 255, .16)); border-color: rgba(63, 169, 255, .3); color: var(--ink); }
.nav a.on svg { color: var(--blue); }
.nav a.on::before { content: ''; position: absolute; inset-inline-start: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--blue); box-shadow: 0 0 14px var(--blue); }
.nav a .cnt { margin-inline-start: auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; font-family: var(--fl); }
.rail-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.me-card .badge { width: 38px; height: 38px; }
.me-card b { display: block; font-size: 14.5px; line-height: 1.25; }
.me-card small { display: block; font-size: 12px; color: var(--mute); line-height: 1.3; }

#main { min-width: 0; display: flex; flex-direction: column; }
#top {
  position: sticky; top: 0; z-index: 25; height: var(--top); display: flex; align-items: center; gap: 16px;
  padding: 0 clamp(16px, 2.2vw, 36px); background: linear-gradient(180deg, rgba(3, 8, 16, .88), rgba(3, 8, 16, .70));
  border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
[data-theme="light"] #top { background: linear-gradient(180deg, rgba(246, 249, 253, .92), rgba(246, 249, 253, .78)); }
.menu-btn { display: none; }
.crumbs { display: flex; flex-direction: column; min-width: 0; }
.crumbs small { font-size: 12px; color: var(--mute); font-weight: 600; display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.crumbs small svg { width: 13px; height: 13px; }
.crumbs h2 { margin: 0; font-size: 21px; line-height: 1.25; font-weight: 700; white-space: nowrap; overflow: hidden; }
.top-search { flex: 1 1 auto; max-width: 560px; margin-inline: auto; position: relative; }
.top-search input { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); padding-inline: 44px 70px; color: var(--ink); outline: none; font-weight: 500; }
[data-theme="light"] .top-search input { background: #fff; }
.top-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(63, 169, 255, .16); }
.top-search > svg { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--mute); }
.top-search kbd { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-family: var(--fm); font-size: 11px; color: var(--mute); border: 1px solid var(--line2); border-radius: 6px; padding: 2px 7px; direction: ltr; }
.search-pop { position: absolute; top: calc(100% + 8px); inset-inline: 0; background: var(--plate-up); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; max-height: 60vh; overflow: auto; z-index: 40; }
.sr-g { font-size: 12px; color: var(--mute); font-weight: 700; padding: 8px 10px 4px; }
.sr { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; }
.sr:hover, .sr.sel { background: rgba(63, 169, 255, .1); }
.sr .sr-ic { width: 38px; height: 38px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); flex-shrink: 0; color: var(--blue); }
.sr .sr-ic img, .sr .sr-ic .silh { width: 100%; height: 100%; object-fit: cover; }
.sr b { display: block; font-size: 14.5px; } .sr small { color: var(--mute); font-size: 12.5px; }
.top-end { display: flex; align-items: center; gap: 10px; }
.clock { font-family: var(--fl); font-weight: 700; font-size: 17px; letter-spacing: .06em; color: var(--ink2); direction: ltr; white-space: nowrap; }
.clock small { color: var(--mute); font-size: 12px; margin-inline-start: 6px; }

#view { padding: 26px clamp(16px, 2.2vw, 36px) 30px; flex: 1; min-width: 0; }
.page-in { animation: pagein .35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pagein { from { opacity: 0; transform: translateY(10px); } }

/* ───────────────────────── مشغّل الموسيقى ───────────────────────── */
.mu { display: flex; align-items: center; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); padding: 3px; gap: 2px; position: relative; max-width: 270px; }
.mu.open { border-color: var(--blue); }
.mu-pp { width: 38px; height: 36px; border-radius: 9px; border: 0; display: grid; place-items: center; background: rgba(63, 169, 255, .14); color: var(--blue); flex-shrink: 0; }
.mu-pp svg { width: 16px; height: 16px; }
.mu.on .mu-pp { background: var(--blue); color: #fff; }
.mu-open { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; height: 36px; padding: 0 10px; min-width: 0; color: var(--ink2); font-weight: 600; font-size: 13.5px; }
.mu-t { white-space: nowrap; overflow: hidden; max-width: 160px; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; width: 18px; flex-shrink: 0; }
.eq i { width: 3px; height: 4px; background: var(--mute); border-radius: 2px; }
.mu.on .eq i { background: var(--cyan); animation: eq .9s ease-in-out infinite; }
.mu.on .eq i:nth-child(2) { animation-delay: -.3s; } .mu.on .eq i:nth-child(3) { animation-delay: -.6s; } .mu.on .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
.mu-wait { display: none; position: absolute; top: calc(100% + 6px); inset-inline-start: 0; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--blue); padding: 3px 10px; border-radius: 99px; white-space: nowrap; animation: blink 1.2s infinite; }
.mu.wait .mu-wait { display: block; }

.mu-panel {
  position: fixed; top: calc(var(--top) + 8px); left: clamp(16px, 2.2vw, 36px); z-index: 60; width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - var(--top) - 24px); overflow: auto; background: var(--plate-up); border: 1px solid var(--line2);
  border-radius: 18px; box-shadow: var(--shadow), var(--glow); padding: 16px;
  opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none; transition: .2s;
}
.mu-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.np { display: flex; align-items: center; gap: 12px; }
.np-art { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, #0d2a52, #061226); color: var(--cyan); flex-shrink: 0; border: 1px solid var(--line2); }
.np-art svg { width: 28px; height: 28px; }
.np-art img { width: 100%; height: 100%; object-fit: cover; }
.np-txt { flex: 1; min-width: 0; }
.np-title { display: block; font-size: 15.5px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.np-sub { color: var(--mute); font-size: 12.5px; }
.np-ctl { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; }
.big-pp { width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; background: linear-gradient(180deg, #4cb2ff, #1f74f0); color: #fff; box-shadow: 0 8px 22px -8px rgba(31, 124, 255, .9); flex-shrink: 0; }
.big-pp svg { width: 20px; height: 20px; }
.np-vol { flex: 1; min-width: 60px; }
.np-vn { font-family: var(--fl); font-size: 15px; width: 30px; text-align: center; }
.mu-panel.empty .np-ctl { opacity: .45; pointer-events: none; }
#ytWrap { margin: 8px 0 4px; border-radius: 12px; overflow: hidden; height: 0; transition: height .2s; }
.mu-panel:not(.empty) #ytWrap:has(iframe) { height: 124px; width: 220px; }
#ytWrap iframe { display: block; border: 0; pointer-events: none; }
.mu-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0 10px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); }
[data-theme="light"] .mu-tabs { background: var(--bg2); }
.mu-tabs button { height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--mute); font-weight: 600; font-size: 13.5px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.mu-tabs button.on { background: var(--panel2); color: var(--ink); box-shadow: 0 0 0 1px var(--line2); }
.mu-s { display: flex; gap: 8px; }
.mu-s input { flex: 1; height: 44px; border-radius: 11px; border: 1px solid var(--line2); background: rgba(0, 0, 0, .22); padding: 0 14px; outline: none; color: var(--ink); }
[data-theme="light"] .mu-s input { background: #fff; }
.mu-s input:focus { border-color: var(--blue); }
.mu-s .btn { width: 46px; padding: 0; height: 44px; }
.mu-res { margin-top: 10px; display: grid; gap: 6px; }
.mu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px; border-radius: 12px; border: 1px solid transparent; background: transparent; text-align: start; }
.mu-item:hover { background: rgba(63, 169, 255, .08); border-color: var(--line2); }
.mi-txt { flex: 1; min-width: 0; }
.mi-txt b { display: block; font-size: 13.5px; line-height: 1.4; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mi-txt small { color: var(--mute); font-size: 12px; }
.mi-art { width: 112px; height: 63px; border-radius: 9px; overflow: hidden; flex-shrink: 0; position: relative; background: #061226; display: grid; place-items: center; color: var(--cyan); }
.mi-art img { width: 100%; height: 100%; object-fit: cover; }
.mi-art em { position: absolute; bottom: 4px; left: 4px; font-style: normal; font-family: var(--fl); font-size: 11.5px; font-weight: 700; background: rgba(0, 0, 0, .78); color: #fff; padding: 0 5px; border-radius: 4px; }
.mu-empty, .mu-note { color: var(--mute); font-size: 13.5px; text-align: center; padding: 10px; margin: 0; }
.mu-note { text-align: start; padding: 0 0 10px; }
.mu-load { display: flex; justify-content: center; gap: 6px; padding: 20px; }
.mu-load i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); animation: blink .9s infinite; }
.mu-load i:nth-child(2) { animation-delay: .2s; } .mu-load i:nth-child(3) { animation-delay: .4s; }
.np-recent { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.np-recent h5 { margin: 0 0 6px; font-size: 13px; color: var(--mute); display: flex; gap: 6px; align-items: center; }
.np-recent .mi-art { width: 70px; height: 40px; }
.trim { margin-top: 12px; display: grid; gap: 12px; }
.tr-name { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2); }
.tr-name b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; direction: ltr; }
.tr-wave { position: relative; height: 84px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line2); overflow: hidden; direction: ltr; }
.tr-wave canvas { width: 100%; height: 100%; display: block; }
.tr-sel { position: absolute; top: 0; bottom: 0; border-inline: 2px solid var(--cyan); background: rgba(54, 224, 255, .08); pointer-events: none; }
.tr-wave input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; pointer-events: none; }
.tr-wave input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 14px; height: 84px; background: var(--cyan); border-radius: 4px; cursor: ew-resize; box-shadow: 0 0 12px var(--cyan); }
.tr-wave input[type=range]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 84px; background: var(--cyan); border: 0; border-radius: 4px; cursor: ew-resize; }
.tr-wave input[type=range]::-webkit-slider-runnable-track { background: transparent; }
.tr-times { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--mute); }
.tr-times b { color: var(--ink); font-family: var(--fl); font-size: 14px; }
.tr-prog { height: 30px; border-radius: 8px; background: var(--line); position: relative; overflow: hidden; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.tr-prog i { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--blue2), var(--cyan)); transition: width .2s; }
.tr-prog span { position: relative; }
input[type=range] { accent-color: var(--blue); }

/* ───────────────────────── عناصر الصفحات ───────────────────────── */
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; align-items: start; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; }
.s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s9 { grid-column: span 9; } .s12 { grid-column: 1 / -1; }
.stretch { align-self: stretch; }
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; }
.card.tight { padding: 16px; }
.sec-h { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.sec-h .sh-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: rgba(63, 169, 255, .12); color: var(--blue); border: 1px solid rgba(63, 169, 255, .3); flex-shrink: 0; }
.sec-h .sh-ic.red { background: var(--red-bg); color: var(--red); border-color: rgba(255, 77, 94, .35); }
.sec-h .sh-ic svg { width: 21px; height: 21px; }
.sec-h h3 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; }
.sec-h p { margin: 0; color: var(--mute); font-size: 13.5px; }
.sec-h .acts { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kicker { font-family: var(--fl); font-weight: 700; letter-spacing: .22em; font-size: 12px; color: var(--blue); direction: ltr; display: inline-block; }
.muted { color: var(--mute); }
.empty {
  display: grid; justify-items: center; gap: 10px; padding: 34px 20px; text-align: center; border-radius: 14px;
  border: 1.5px dashed var(--line2); background: rgba(63, 169, 255, .04); color: var(--ink2);
}
.empty .e-ic { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: rgba(63, 169, 255, .12); color: var(--blue); }
.empty .e-ic svg { width: 28px; height: 28px; }
.empty b { font-size: 17px; color: var(--ink); }
.empty p { margin: 0; color: var(--mute); max-width: 460px; font-size: 14px; }

/* البطل */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: center; padding: 34px 36px; min-height: 300px; background: radial-gradient(600px 300px at 15% 50%, rgba(31, 124, 255, .22), transparent 70%), linear-gradient(90deg, transparent, rgba(63, 169, 255, .04)), var(--panel); }
.hero-txt { position: relative; }
.hero h1 { margin: 8px 0 4px; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.15; font-weight: 700; }
.hero .en { font-family: var(--fl); font-weight: 700; font-size: clamp(16px, 1.5vw, 21px); letter-spacing: .3em; color: var(--silver); direction: ltr; text-align: end; display: block; }
.hero .motto { margin: 16px 0 24px; font-size: clamp(17px, 1.5vw, 21px); color: var(--ink2); display: flex; align-items: center; gap: 12px; }
.hero .motto::before { content: ''; width: 34px; height: 2px; background: var(--blue); box-shadow: 0 0 10px var(--blue); }
.hero .row { flex-wrap: wrap; gap: 12px; }
.hero .btn { height: 48px; padding: 0 22px; font-size: 15px; }
.hero-mark { position: relative; width: clamp(180px, 17vw, 270px); aspect-ratio: 1; display: grid; place-items: center; }
.hero-mark .logo { width: 100%; height: 100%; filter: drop-shadow(0 14px 40px rgba(31, 124, 255, .5)); position: relative; z-index: 1; }
.hero-mark::before { content: ''; position: absolute; inset: -16px; border-radius: 50%; border: 1px dashed var(--line3); animation: spin 40s linear infinite; }
.hero-mark::after { content: ''; position: absolute; inset: -34px; border-radius: 50%; border: 2px solid transparent; border-top-color: rgba(63, 169, 255, .5); border-left-color: rgba(54, 224, 255, .25); animation: spin 9s linear infinite reverse; }

/* لوحة الحالة */
.status { display: grid; gap: 14px; height: 100%; }
.st-clock { display: flex; align-items: baseline; gap: 10px; direction: ltr; justify-content: flex-end; }
.st-clock b { font-family: var(--fl); font-size: 46px; line-height: 1; letter-spacing: .04em; }
.st-clock small { font-family: var(--fl); font-size: 15px; color: var(--mute); }
.st-date { text-align: end; color: var(--mute); font-size: 13.5px; margin-top: -8px; }
.threat { padding: 14px 16px; border-radius: 12px; border: 1px solid; display: flex; align-items: center; gap: 14px; }
.threat .lv { font-family: var(--fl); font-weight: 700; font-size: 30px; line-height: 1; }
.threat b { display: block; font-size: 15px; } .threat small { color: var(--mute); font-size: 12.5px; }
.threat.l1 { color: var(--green); border-color: rgba(34, 211, 166, .35); background: rgba(34, 211, 166, .08); }
.threat.l2 { color: var(--blue); border-color: rgba(63, 169, 255, .35); background: rgba(63, 169, 255, .08); }
.threat.l3 { color: var(--amber); border-color: rgba(255, 176, 32, .4); background: rgba(255, 176, 32, .08); }
.threat.l4 { color: var(--red); border-color: rgba(255, 77, 94, .45); background: var(--red-bg); }
.threat .bars { display: flex; gap: 4px; margin-inline-start: auto; }
.threat .bars i { width: 8px; height: 26px; border-radius: 3px; background: currentColor; opacity: .2; }
.threat .bars i.on { opacity: 1; box-shadow: 0 0 10px currentColor; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ms { padding: 12px 14px; border-radius: 12px; background: rgba(63, 169, 255, .06); border: 1px solid var(--line); }
.ms b { display: block; font-family: var(--fl); font-size: 26px; line-height: 1.1; }
.ms small { color: var(--mute); font-size: 12.5px; }
.ms.red b { color: var(--red); } .ms.green b { color: var(--green); }

/* الإحصائيات */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.stat { display: flex; align-items: center; gap: 16px; padding: 20px; }
.stat .st-ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: rgba(63, 169, 255, .12); color: var(--blue); border: 1px solid rgba(63, 169, 255, .28); flex-shrink: 0; }
.stat .st-ic svg { width: 26px; height: 26px; }
.stat b { display: block; font-family: var(--fl); font-size: 34px; line-height: 1; }
.stat small { color: var(--mute); font-size: 13.5px; font-weight: 600; }
.stat.red .st-ic { background: var(--red-bg); color: var(--red); border-color: rgba(255, 77, 94, .35); }
.stat.cyan .st-ic { background: rgba(54, 224, 255, .1); color: var(--cyan); border-color: rgba(54, 224, 255, .3); }
.stat.gold .st-ic { background: rgba(242, 193, 78, .1); color: var(--gold); border-color: rgba(242, 193, 78, .3); }
.stat.violet .st-ic { background: rgba(167, 139, 250, .1); color: var(--violet); border-color: rgba(167, 139, 250, .3); }

/* ───────────────────────── المطلوبون ───────────────────────── */
.wanted-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.wanted-grid.strip { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.wcard {
  position: relative; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; cursor: pointer;
  background: linear-gradient(180deg, rgba(30, 6, 12, .55), var(--plate) 40%); border: 1px solid rgba(255, 77, 94, .28);
  box-shadow: var(--shadow); transition: .2s; text-align: center;
}
[data-theme="light"] .wcard { background: linear-gradient(180deg, rgba(255, 228, 232, .8), var(--plate) 40%); }
.wcard:hover { transform: translateY(-4px); border-color: var(--red); box-shadow: var(--shadow), 0 0 0 1px rgba(255, 77, 94, .3), 0 16px 40px -14px rgba(255, 77, 94, .5); }
.w-band { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 12px; background: linear-gradient(90deg, #a5101f, #e3263a 50%, #a5101f); color: #fff; font-family: var(--fl); font-weight: 700; font-size: 13px; letter-spacing: .24em; }
.w-band span { direction: ltr; }
.w-band .dz { display: flex; gap: 3px; }
.w-band .dz i { width: 6px; height: 12px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
.w-band .dz i.on { background: #fff; }
.w-photo { position: relative; margin: 14px 14px 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 4.4; background: #050a14; border: 1px solid rgba(255, 77, 94, .25); }
.w-photo img, .w-photo .silh { width: 100%; height: 100%; object-fit: cover; display: block; }
.w-photo::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px); pointer-events: none; }
.wcard.f-circle .w-photo { width: 76%; aspect-ratio: 1; border-radius: 50%; margin: 18px auto 2px; border: 3px solid var(--red); box-shadow: 0 0 0 5px rgba(255, 77, 94, .15); }
.wcard.f-tall .w-photo { aspect-ratio: 3 / 4.2; }
.w-photo .xh { position: absolute; inset: 10%; border: 1px solid rgba(255, 77, 94, .35); pointer-events: none; }
.w-photo .xh::before, .w-photo .xh::after { content: ''; position: absolute; background: rgba(255, 77, 94, .35); }
.w-photo .xh::before { left: 50%; top: -10%; bottom: -10%; width: 1px; } .w-photo .xh::after { top: 50%; left: -10%; right: -10%; height: 1px; }
.wcard.f-circle .xh { display: none; }
.w-body { padding: 12px 14px 16px; display: grid; gap: 6px; justify-items: center; }
.w-name { font-size: 19px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.w-alias { color: var(--mute); font-size: 13px; margin-top: -4px; }
.w-days { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.w-days .tag { height: 28px; font-size: 13px; }
.w-stamp { position: absolute; top: 34%; left: 50%; width: 82%; transform: translate(-50%, -50%) rotate(-14deg); z-index: 3; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); pointer-events: none; }
.w-stamp .stamp { width: 100%; height: auto; }
.wcard.caught, .wcard.closed { border-color: var(--line2); background: var(--plate); }
.wcard.caught .w-band { background: linear-gradient(90deg, #0b6e55, #14a37f 50%, #0b6e55); }
.wcard.closed .w-band { background: linear-gradient(90deg, #3a4558, #5a6880 50%, #3a4558); }
.wcard.caught .w-photo, .wcard.closed .w-photo { filter: grayscale(.8) brightness(.8); }
.wcard.add { border: 2px dashed rgba(255, 77, 94, .4); background: rgba(255, 77, 94, .04); display: grid; place-items: center; min-height: 300px; color: var(--red); gap: 8px; align-content: center; }
.wcard.add:hover { background: rgba(255, 77, 94, .09); }
.wcard.add .e-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; border: 2px solid currentColor; }
.wcard.add .e-ic svg { width: 30px; height: 30px; }
.wcard.add b { font-size: 16px; }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .inp { max-width: 340px; height: 44px; }
.toolbar .acts { margin-inline-start: auto; display: flex; gap: 10px; }

/* تفاصيل المطلوب */
.wd { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; }
.wd-photo { border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 3.8; border: 2px solid var(--red); position: relative; background: #050a14; }
.wd-photo img, .wd-photo .silh { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd h2 { margin: 0; font-size: 30px; line-height: 1.2; }
.wd .alias { color: var(--mute); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.kv > div { padding: 12px 14px; border-radius: 12px; background: rgba(63, 169, 255, .05); border: 1px solid var(--line); }
.kv small { display: block; color: var(--mute); font-size: 12.5px; font-weight: 600; }
.kv b { font-size: 17px; }
.wd .reason { white-space: pre-wrap; line-height: 1.9; color: var(--ink2); padding: 14px 16px; border-radius: 12px; border-inline-start: 3px solid var(--red); background: var(--red-bg); margin: 0 0 18px; }

/* محرّر الصورة في نموذج المطلوب */
.pick-photo { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; align-items: start; }
.pp-prev { aspect-ratio: 4 / 4.6; border-radius: 12px; overflow: hidden; border: 2px dashed var(--line3); background: #050a14; display: grid; place-items: center; cursor: pointer; position: relative; }
.pp-prev img, .pp-prev .silh { width: 100%; height: 100%; object-fit: cover; }
.pp-prev .pp-hint { position: absolute; bottom: 8px; inset-inline: 8px; font-size: 12px; font-weight: 700; background: rgba(0, 0, 0, .7); color: #fff; padding: 4px; border-radius: 6px; text-align: center; }
.frames { display: flex; gap: 8px; flex-wrap: wrap; }
.frames button { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink2); font-weight: 600; font-size: 13.5px; }
.frames button i { display: block; width: 18px; height: 18px; border: 2px solid currentColor; }
.frames button[data-f=circle] i { border-radius: 50%; } .frames button[data-f=tall] i { width: 13px; height: 20px; border-radius: 2px; } .frames button[data-f=card] i { border-radius: 3px; }
.frames button.on { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.danger-pick { display: flex; gap: 8px; }
.danger-pick button { flex: 1; height: 40px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); font-weight: 700; font-size: 13.5px; color: var(--mute); }
.danger-pick button.on[data-d="1"] { color: var(--green); border-color: var(--green); background: rgba(34, 211, 166, .1); }
.danger-pick button.on[data-d="2"] { color: var(--blue); border-color: var(--blue); background: rgba(63, 169, 255, .1); }
.danger-pick button.on[data-d="3"] { color: var(--amber); border-color: var(--amber); background: rgba(255, 176, 32, .1); }
.danger-pick button.on[data-d="4"] { color: var(--red); border-color: var(--red); background: var(--red-bg); }

/* ───────────────────────── الإدارات والأفراد ───────────────────────── */
.div-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.dcard { position: relative; padding: 20px; border-radius: 14px; background: var(--plate); border: 1px solid var(--line); overflow: hidden; transition: .2s; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.dcard::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--dc); box-shadow: 0 0 16px var(--dc); }
.dcard:hover { border-color: var(--dc); transform: translateY(-3px); }
.dcard .d-ic { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; color: var(--dc); background: color-mix(in srgb, var(--dc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--dc) 40%, transparent); }
.dcard .d-ic svg { width: 25px; height: 25px; }
.dcard h4 { margin: 0; font-size: 17px; line-height: 1.35; }
.dcard .code { font-family: var(--fl); font-weight: 700; letter-spacing: .2em; font-size: 12px; color: var(--dc); direction: ltr; }
.dcard p { margin: 0; color: var(--mute); font-size: 13.5px; line-height: 1.75; }
.dcard .d-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink2); }
.dcard .d-top { display: flex; align-items: center; gap: 12px; }

.ppl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pcard { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--plate); border: 1px solid var(--line); cursor: pointer; transition: .18s; position: relative; }
.pcard:hover { border-color: var(--line3); transform: translateY(-2px); }
.av { width: 58px; height: 58px; border-radius: 14px; overflow: hidden; flex-shrink: 0; position: relative; background: #050a14; border: 1px solid var(--line2); }
.av img, .av .silh { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.sm { width: 40px; height: 40px; border-radius: 10px; }
.av.lg { width: 120px; height: 120px; border-radius: 22px; }
.av .on-dot { position: absolute; bottom: 4px; inset-inline-end: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2px solid var(--bg); }
.pcard .p-txt { min-width: 0; flex: 1; }
.pcard b { display: block; font-size: 15.5px; line-height: 1.35; }
.rank-line { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.rank-line .badge { width: 24px; height: 24px; }
.pcard small { display: block; color: var(--mute); font-size: 12.5px; }
.pcard .agent { position: absolute; top: 10px; inset-inline-end: 12px; font-family: var(--fm); font-size: 11px; color: var(--dim); direction: ltr; }

/* السلّم التنظيمي */
.ladder { display: grid; gap: 10px; position: relative; }
.ladder::before { content: ''; position: absolute; top: 30px; bottom: 30px; inset-inline-start: 41px; width: 2px; background: linear-gradient(180deg, var(--gold), var(--blue), var(--silver)); opacity: .4; }
.rung { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 16px 10px 10px; border-radius: 14px; background: var(--plate); border: 1px solid var(--line); cursor: pointer; transition: .18s; position: relative; }
.rung:hover, .rung.sel { border-color: var(--tc); background: var(--plate-up); }
.rung.sel { box-shadow: 0 0 0 1px var(--tc), 0 10px 30px -14px var(--tc); }
.rung .badge { width: 62px; height: 62px; justify-self: center; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.rung .r-n { font-family: var(--fl); font-weight: 700; color: var(--tc); font-size: 13px; letter-spacing: .1em; direction: ltr; text-align: end; }
.rung h4 { margin: 0; font-size: 17px; line-height: 1.3; }
.rung small { color: var(--mute); font-size: 12.5px; }
.rung .faces { display: flex; }
.rung .faces .av { width: 32px; height: 32px; border-radius: 50%; margin-inline-start: -8px; border: 2px solid var(--bg); }
.rung .cnt { font-family: var(--fl); font-size: 22px; font-weight: 700; min-width: 34px; text-align: center; color: var(--ink2); }
.rank-detail { position: sticky; top: calc(var(--top) + 20px); }
.rd-head { display: flex; align-items: center; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.rd-head .badge { width: 110px; height: 110px; filter: drop-shadow(0 10px 26px rgba(0, 0, 0, .5)); }
.rd-head h3 { margin: 0; font-size: 24px; line-height: 1.3; }
.rd-head .en { font-family: var(--fl); color: var(--mute); letter-spacing: .1em; font-size: 14px; direction: ltr; text-align: end; display: block; }
.perm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.perm-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(63, 169, 255, .05); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.6; }
.perm-list li svg { color: var(--green); margin-top: 3px; }
.perm-list li.no svg { color: var(--red); }
.perm-list li.inh { background: transparent; border-style: dashed; color: var(--mute); }
.perm-list li.inh svg { color: var(--blue); }

/* ───────────────────────── التقنيات / عن الوكالة ───────────────────────── */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.tcard { padding: 22px; border-radius: 14px; background: var(--plate); border: 1px solid var(--line); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.tcard::after { content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; inset-inline-end: -90px; top: -90px; border: 1px dashed var(--line2); }
.tcard .t-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(63, 169, 255, .2), rgba(54, 224, 255, .06)); color: var(--cyan); border: 1px solid var(--line2); }
.tcard .t-ic svg { width: 26px; height: 26px; }
.tcard h4 { margin: 0; font-size: 18px; }
.tcard p { margin: 0; color: var(--mute); font-size: 14px; line-height: 1.8; }
.tcard ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tcard li { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--ink2); }
.tcard li::before { content: ''; width: 6px; height: 6px; border-radius: 1px; background: var(--cyan); transform: rotate(45deg); flex-shrink: 0; }
.tcard .live { position: absolute; top: 18px; inset-inline-end: 18px; font-family: var(--fl); font-weight: 700; font-size: 11px; letter-spacing: .2em; color: var(--green); display: flex; align-items: center; gap: 6px; direction: ltr; z-index: 1; }
.tcard .live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 1.6s infinite; }

.about-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 34px; align-items: center; }
.about-hero .logo { width: 220px; height: 220px; }
.big-p { font-size: 17px; line-height: 2; color: var(--ink2); margin: 0; }
.mv { display: grid; gap: 14px; }
.mv > div { padding: 18px 20px; border-radius: 14px; background: var(--plate); border: 1px solid var(--line); border-inline-start: 4px solid var(--blue); }
.mv small { color: var(--blue); font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.mv p { margin: 6px 0 0; font-size: 16px; line-height: 1.8; }
.values { display: flex; flex-wrap: wrap; gap: 10px; }
.values span { padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line2); background: var(--plate); font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.values span svg { color: var(--cyan); }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--plate); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 10px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { transition: .2s; color: var(--mute); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 16px 16px; color: var(--ink2); line-height: 1.9; }
.timeline { position: relative; padding-inline-start: 26px; display: grid; gap: 16px; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--blue), transparent); }
.timeline > div { position: relative; }
.timeline > div::before { content: ''; position: absolute; inset-inline-start: -25px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--blue); box-shadow: 0 0 10px var(--blue); }
.timeline b { font-family: var(--fl); color: var(--blue); font-size: 15px; letter-spacing: .1em; }
.timeline p { margin: 2px 0 0; color: var(--ink2); }

/* ───────────────────────── الإعدادات ───────────────────────── */
.set-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 22px; align-items: start; }
.set-nav { position: sticky; top: calc(var(--top) + 20px); display: grid; gap: 6px; padding: 10px; }
.set-nav button { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 11px; border: 1px solid transparent; background: transparent; color: var(--ink2); font-weight: 600; text-align: start; }
.set-nav button:hover { background: rgba(63, 169, 255, .07); }
.set-nav button.on { background: rgba(63, 169, 255, .12); border-color: rgba(63, 169, 255, .3); color: var(--ink); }
.set-nav button svg { color: var(--blue); }
.set-sec { display: grid; gap: 18px; }
.opt { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 14px; background: var(--plate); border: 1px solid var(--line); flex-wrap: wrap; }
.opt .o-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(63, 169, 255, .1); color: var(--blue); flex-shrink: 0; }
.opt .o-txt { flex: 1; min-width: 200px; }
.opt b { display: block; font-size: 15.5px; } .opt small { color: var(--mute); font-size: 13px; }
.theme-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.theme-card { border-radius: 14px; border: 2px solid var(--line2); background: var(--plate); padding: 10px; cursor: pointer; display: grid; gap: 10px; transition: .15s; }
.theme-card.on { border-color: var(--blue); box-shadow: var(--glow); }
.theme-card .tc-prev { height: 120px; border-radius: 10px; position: relative; overflow: hidden; display: grid; grid-template-columns: 30% 1fr; gap: 6px; padding: 8px; }
.theme-card .tc-prev i { border-radius: 6px; display: block; }
.theme-card .tc-prev .col { display: grid; gap: 6px; grid-template-rows: 18px 1fr 1fr; }
.theme-card.dark .tc-prev { background: #050b16; } .theme-card.dark .tc-prev i { background: #0f1f38; border: 1px solid #1d3558; }
.theme-card.light .tc-prev { background: #e7ecf4; } .theme-card.light .tc-prev i { background: #fff; border: 1px solid #cdd8ea; }
.theme-card .tc-prev i.acc { background: #2a8cff !important; }
.theme-card b { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 15px; }
.switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line2); transition: .2s; }
.switch i::after { content: ''; position: absolute; top: 4px; inset-inline-start: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch input:checked + i { background: var(--blue); }
.switch input:checked + i::after { inset-inline-start: 26px; }
.audit-list { display: grid; gap: 6px; }
.audit-row { display: grid; grid-template-columns: 150px 170px minmax(0, 1fr) 120px; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--plate); border: 1px solid var(--line); font-size: 14px; }
.audit-row .mono { font-size: 12px; color: var(--mute); direction: ltr; text-align: end; }
.perm-table { display: grid; gap: 8px; }
.perm-table .pt { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--plate); border: 1px solid var(--line); }
.perm-table select { height: 40px; }

/* ───────────────────────── النوافذ والإشعارات ───────────────────────── */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(1, 4, 10, .66); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); opacity: 0; transition: .22s; overflow: auto; }
[data-theme="light"] .modal-wrap { background: rgba(40, 60, 100, .3); }
.modal-wrap.in { opacity: 1; }
.modal { width: min(640px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--plate-up); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow), var(--glow); transform: translateY(14px) scale(.98); transition: .25s cubic-bezier(.2, .8, .2, 1); }
.modal-wrap.in .modal { transform: none; }
.modal.wide { width: min(1080px, 100%); }
.modal.small { width: min(440px, 100%); }
.m-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--plate-up); }
.m-head h3 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.m-head h3 svg { color: var(--blue); width: 21px; height: 21px; }
.m-body { padding: 20px; }
.m-foot { display: flex; gap: 10px; justify-content: flex-end; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.m-foot .left { margin-inline-end: auto; }
.confirm-t { font-size: 16px; margin: 0 0 18px; line-height: 1.8; }
#toasts { position: fixed; top: 18px; left: 18px; z-index: 100; display: grid; gap: 10px; width: min(380px, calc(100vw - 36px)); }
.toast { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--plate-up); border: 1px solid var(--line2); box-shadow: var(--shadow); font-weight: 600; font-size: 14.5px; overflow: hidden; animation: toastin .35s cubic-bezier(.2, 1.2, .3, 1) both; }
.toast.out { animation: toastout .35s both; }
@keyframes toastin { from { opacity: 0; transform: translateX(-30px); } }
@keyframes toastout { to { opacity: 0; transform: translateX(-30px); } }
.toast .ti { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: rgba(34, 211, 166, .14); color: var(--green); }
.toast.err .ti { background: var(--red-bg); color: var(--red); }
.toast.info .ti { background: rgba(63, 169, 255, .14); color: var(--blue); }
.toast.err { border-color: rgba(255, 77, 94, .45); }
.toast .tb { position: absolute; bottom: 0; inset-inline-start: 0; height: 3px; width: 100%; background: var(--green); transform-origin: left; animation: tbar linear forwards; }
.toast.err .tb { background: var(--red); } .toast.info .tb { background: var(--blue); }
@keyframes tbar { to { transform: scaleX(0); } }

/* التذييل */
.foot { margin-top: 34px; padding: 26px clamp(16px, 2.2vw, 36px); border-top: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 26px; align-items: center; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .25)); }
[data-theme="light"] .foot { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .5)); }
.foot .logo { width: 70px; height: 70px; }
.foot b { font-family: var(--fl); letter-spacing: .24em; font-size: 15px; direction: ltr; display: block; text-align: end; }
.foot p { margin: 4px 0 0; color: var(--mute); font-size: 13px; line-height: 1.8; }
.foot .links { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: flex-end; }
.foot .links a { color: var(--ink2); font-size: 14px; font-weight: 600; }
.foot .links a:hover { color: var(--blue); }
.foot .copy { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--dim); }

.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.notfound .code { font-family: var(--fl); font-size: 120px; line-height: 1; font-weight: 700; color: var(--blue); text-shadow: 0 0 40px rgba(63, 169, 255, .5); letter-spacing: .1em; }

/* ───────────────────────── الشاشات ───────────────────────── */
@media (max-width: 1500px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats .stat:nth-child(n+4) { grid-column: span 1; }
}
@media (max-width: 1280px) {
  .s3, .s4, .s5 { grid-column: span 6; } .s7, .s8, .s9 { grid-column: 1 / -1; }
  .hero-mark { width: 180px; }
  .audit-row { grid-template-columns: 130px 140px minmax(0, 1fr); } .audit-row .mono { display: none; }
}
@media (max-width: 1100px) {
  :root { --rail: 0px; }
  #app { grid-template-columns: minmax(0, 1fr); }
  #rail { position: fixed; inset-block: 0; right: 0; width: 280px; transform: translateX(100%); transition: transform .25s; box-shadow: var(--shadow); }
  body.rail-open #rail { transform: none; }
  body.rail-open::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 29; }
  .menu-btn { display: inline-grid; }
  .set-layout, .wd { grid-template-columns: minmax(0, 1fr); }
  .set-nav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .rank-detail { position: static; }
}
@media (max-width: 860px) {
  .s2, .s3, .s4, .s5, .s6 { grid-column: 1 / -1; }
  .grid12 { gap: 16px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 26px; }
  .hero-mark { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-search { display: none; }
  .clock { display: none; }
  .about-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .pick-photo { grid-template-columns: 130px minmax(0, 1fr); }
  .foot { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
  .foot .links { justify-content: center; } .foot b { text-align: center; }
  .gate-hud.bl, .gate-hud.br { display: none; }
  .perm-table .pt { grid-template-columns: minmax(0, 1fr); }
  .audit-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  #view { padding: 18px 14px 24px; }
  .wanted-grid, .wanted-grid.strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .w-name { font-size: 16px; }
  .mu-t { display: none; }
  .crumbs h2 { font-size: 18px; }
  .gate-hud { display: none; }
  .gate-box { padding: 28px 22px 22px; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .stat { padding: 14px; } .stat b { font-size: 26px; } .stat .st-ic { width: 44px; height: 44px; }
  .rung { grid-template-columns: 64px minmax(0, 1fr) auto; } .rung .badge { width: 50px; height: 50px; } .rung .faces { display: none; }
  .ladder::before { inset-inline-start: 31px; }
}

/* إطفاء الموسيقى بالكامل */
.np-kill { width: 100%; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 11px; border: 1px solid rgba(255, 77, 94, .55); background: rgba(255, 77, 94, .12); color: #ff6b7a; font: inherit; font-weight: 700; cursor: pointer; }
.np-kill svg { width: 18px; height: 18px; }
.np-kill:hover { background: rgba(255, 77, 94, .2); }
.np-kill.on { border-color: var(--green); background: rgba(46, 204, 113, .14); color: var(--green); }
.np-kill-note { display: block; margin: 6px 2px 4px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.mu-panel.killed #ytWrap, .mu-panel.killed .mu-tabs, .mu-panel.killed .mu-pane, .mu-panel.killed .np-recent { display: none !important; }
.mu.killed .mu-pp { background: rgba(255, 77, 94, .16); color: #ff6b7a; }
.mu.killed .mu-t { color: #ff6b7a; }
.mu.killed .eq { opacity: .3; }

/* ── خفّة: الضبابية خلف البطاقات تُعاد حسبتها مع كل إطار من الخلفية المتحرّكة،
   وهي سبب الثقل. نشيلها داخل الموقع ونعوّضها بلوح أكثف. ── */
#app, #app *, .mu-panel { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
:root:not([data-theme="light"]) #app { --panel: rgba(8, 16, 30, .93); }
[data-theme="light"] #app { --panel: rgba(255, 255, 255, .95); }
#rail { background: linear-gradient(180deg, rgb(5, 11, 21), rgb(3, 7, 14)); }
#top { background: rgba(3, 8, 16, .96); }
#bg { will-change: auto; contain: strict; }
