/* ============================================================
   KAFD — نظام جودة الخدمات · هوية سينمائية ليلية
   العرض التسويقي وهو حي: زجاج HUD، نيون بنفسجي، ذهب، مدينة متوهجة
   ============================================================ */
:root {
  --bg0: #07051a;
  --bg1: #140e33;
  --bg2: #1d1442;
  --ink: #f5f2ff;
  --muted: #a99ddb;
  --faint: #6f64a8;

  --violet: #8b5cf6;
  --violet-hi: #b8a3ff;
  --violet-deep: #5b34d6;
  --gold: #d8ab4a;
  --gold-hi: #f0d490;

  --ok: #3ddc97;
  --warn: #ffc24b;
  --danger: #ff6b6b;

  --glass: rgba(18, 12, 40, .58);
  --glass-edge: rgba(167, 139, 250, .18);
  --radius: 18px;
  --radius-sm: 12px;

  --font-display: "Alexandria", "IBM Plex Sans Arabic", sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Alexandria", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #3d2f6e transparent; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg0);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- طبقات الخلفية السينمائية ---------- */
.bg-scene {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(139, 92, 246, .22), transparent 62%),
    radial-gradient(800px 420px at 12% 8%, rgba(91, 52, 214, .16), transparent 60%),
    radial-gradient(1400px 700px at 50% 118%, rgba(216, 171, 74, .10), transparent 55%),
    linear-gradient(172deg, var(--bg0) 4%, #0c0826 38%, var(--bg1) 72%, #221552 100%);
}
/* نجوم خافتة */
.bg-stars {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 32% 9%,  rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.4px 1.4px at 55% 14%, rgba(216,171,74,.8), transparent 60%),
    radial-gradient(1px 1px at 71% 7%,  rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.2px 1.2px at 86% 21%, rgba(184,163,255,.8), transparent 60%),
    radial-gradient(1px 1px at 44% 27%, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1.3px 1.3px at 92% 38%, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1px 1px at 6% 42%,  rgba(184,163,255,.6), transparent 60%);
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: .65; } }

/* أفق المدينة */
.bg-skyline {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: -1; pointer-events: none;
  opacity: .8;
}
.bg-skyline svg { display: block; width: 100%; height: clamp(120px, 22vh, 260px); }
.bg-vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(4, 2, 14, .55) 100%);
}

/* ============================================================
   الهيكل العام
   ============================================================ */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 26px;
  background: linear-gradient(180deg, rgba(10, 6, 28, .85), rgba(10, 6, 28, .55));
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(167, 139, 250, .14);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-size: 20px;
  background: linear-gradient(140deg, rgba(216,171,74,.22), rgba(139,92,246,.18));
  border: 1px solid rgba(216, 171, 74, .35);
  box-shadow: 0 0 18px -4px rgba(216, 171, 74, .5);
}
.brand .b-name {
  font-family: var(--font-display); font-weight: 700; font-size: 15.5px; line-height: 1.25;
}
.brand .b-name .gold { color: var(--gold-hi); }
.brand small { color: var(--muted); font-weight: 400; display: block; font-size: 11px; letter-spacing: .2px; }

.topbar .nav { display: flex; gap: 4px; flex-wrap: wrap; }
.topbar .nav a {
  color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 8px 15px; border-radius: 999px; border: 1px solid transparent;
  transition: all .2s;
}
.topbar .nav a:hover { color: var(--ink); background: rgba(139, 92, 246, .12); }
.topbar .nav a.active {
  color: #fff; border-color: rgba(167, 139, 250, .35);
  background: linear-gradient(135deg, rgba(139, 92, 246, .3), rgba(91, 52, 214, .18));
  box-shadow: 0 0 16px -6px rgba(139, 92, 246, .8);
}

main { padding: 26px clamp(14px, 3vw, 34px) 60px; max-width: 1560px; margin: 0 auto; position: relative; }
.footer { text-align: center; color: var(--faint); font-size: 11.5px; padding: 10px 18px 26px; }

/* ============================================================
   اللوحات الزجاجية
   ============================================================ */
.card {
  position: relative;
  background:
    linear-gradient(165deg, rgba(139, 92, 246, .10), transparent 42%),
    var(--glass);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 24px 50px -28px rgba(0, 0, 0, .8),
    0 0 40px -22px rgba(139, 92, 246, .45);
}
.card h3 {
  margin: 0 0 14px; font-size: 13px; color: var(--muted); font-weight: 600;
  display: flex; align-items: center; gap: 9px; letter-spacing: .3px;
}
.card h3::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px 1px rgba(216, 171, 74, .7);
  flex-shrink: 0;
}

/* ظهور متدرج */
.reveal { opacity: 0; transform: translateY(22px); animation: rise .8s cubic-bezier(.18, .8, .25, 1) forwards; }
.reveal.d1 { animation-delay: .08s; } .reveal.d2 { animation-delay: .18s; }
.reveal.d3 { animation-delay: .28s; } .reveal.d4 { animation-delay: .38s; }
.reveal.d5 { animation-delay: .5s; }  .reveal.d6 { animation-delay: .62s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ============================================================
   الأزرار
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  color: #fff; border: 1px solid rgba(184, 163, 255, .35);
  border-radius: 14px; padding: 13px 22px;
  font-family: var(--font-body); font-size: 15px; font-weight: 700; cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 26px -12px rgba(139, 92, 246, .8), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .12s, box-shadow .2s, filter .2s;
}
.btn:hover { filter: brightness(1.12); box-shadow: 0 14px 32px -12px rgba(139, 92, 246, .95), inset 0 1px 0 rgba(255,255,255,.18); }
.btn:active { transform: scale(.965); }
.btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: default; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, #a97e22);
  color: #221302; border-color: rgba(240, 212, 144, .6);
  box-shadow: 0 12px 30px -12px rgba(216, 171, 74, .85), inset 0 1px 0 rgba(255,255,255,.5);
  text-shadow: 0 1px 0 rgba(255,255,255,.25);
}
.btn-gold:hover { box-shadow: 0 16px 38px -12px rgba(216, 171, 74, 1), inset 0 1px 0 rgba(255,255,255,.5); }
.btn-success { background: linear-gradient(135deg, #34c98a, #128a5c); border-color: rgba(61,220,151,.4); box-shadow: 0 10px 26px -12px rgba(61,220,151,.7), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-danger { background: linear-gradient(135deg, #ee6c6c, #b03030); border-color: rgba(255,107,107,.4); box-shadow: 0 10px 26px -12px rgba(255,107,107,.6), inset 0 1px 0 rgba(255,255,255,.15); }
.btn-ghost { background: rgba(139, 92, 246, .07); border: 1px solid rgba(167, 139, 250, .25); color: var(--muted); box-shadow: none; }
.btn-ghost:hover { color: var(--ink); background: rgba(139, 92, 246, .14); }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 26px; font-size: 17px; border-radius: 16px; }

/* ============================================================
   الشارات
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 4px 13px; font-size: 11.5px; font-weight: 700;
  border: 1px solid transparent; letter-spacing: .2px;
}
.pill.low      { background: rgba(139, 92, 246, .14); color: var(--violet-hi); border-color: rgba(139, 92, 246, .3); }
.pill.medium   { background: rgba(255, 194, 75, .12); color: var(--warn); border-color: rgba(255, 194, 75, .35); }
.pill.high     { background: rgba(255, 107, 107, .13); color: var(--danger); border-color: rgba(255, 107, 107, .4); }
.pill.critical {
  background: rgba(255, 107, 107, .22); color: #ffc4c4; border-color: rgba(255, 107, 107, .65);
  box-shadow: 0 0 14px -3px rgba(255, 107, 107, .8);
  animation: critGlow 1.6s ease-in-out infinite alternate;
}
@keyframes critGlow { to { box-shadow: 0 0 20px -2px rgba(255, 107, 107, 1); } }
.pill.ok   { background: rgba(61, 220, 151, .12); color: var(--ok); border-color: rgba(61, 220, 151, .35); }
.pill.gold { background: rgba(216, 171, 74, .12); color: var(--gold-hi); border-color: rgba(216, 171, 74, .4); }

/* ============================================================
   صف البطولة: العداد الدائري + العدادات
   ============================================================ */
.hero-row { display: grid; grid-template-columns: 340px 1fr; gap: 18px; margin-bottom: 18px; }
.gauge-card { display: flex; align-items: center; gap: 20px; padding: 22px; }
.gauge-wrap { position: relative; width: 168px; height: 168px; flex-shrink: 0; }
.gauge-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: rgba(139, 92, 246, .14); stroke-width: 11; }
.gauge-val {
  fill: none; stroke: url(#gaugeGrad); stroke-width: 11; stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, .9));
  transition: stroke-dashoffset 1.6s cubic-bezier(.25, .8, .25, 1);
}
.gauge-num {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
}
.gauge-num .v {
  font-family: var(--font-display); font-weight: 800; font-size: 38px; line-height: 1;
  background: linear-gradient(180deg, #fff, var(--violet-hi));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 30px rgba(139, 92, 246, .6);
}
.gauge-num .u { font-size: 13px; color: var(--muted); margin-top: 3px; }
.gauge-side .g-t { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.gauge-side .g-d { color: var(--muted); font-size: 12.5px; line-height: 1.7; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat {
  text-align: center; padding: 20px 12px; overflow: hidden; position: relative;
}
.stat::after {
  content: ""; position: absolute; inset-inline: 18%; bottom: 0; height: 2px; border-radius: 2px;
  background: currentColor; opacity: .55; filter: blur(.5px);
}
.stat .num {
  font-family: var(--font-display); font-size: 52px; font-weight: 800; line-height: 1.05;
  transition: transform .25s;
}
.stat .num.bump { transform: scale(1.22); }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }
.stat.ok { color: var(--ok); } .stat.ok .num { color: var(--ok); text-shadow: 0 0 26px rgba(61, 220, 151, .45); }
.stat.warn { color: var(--warn); } .stat.warn .num { color: var(--warn); text-shadow: 0 0 26px rgba(255, 194, 75, .45); }
.stat.danger { color: var(--danger); } .stat.danger .num { color: var(--danger); text-shadow: 0 0 26px rgba(255, 107, 107, .5); }
.stat.overall { color: var(--violet-hi); } .stat.overall .num { color: var(--violet-hi); text-shadow: 0 0 26px rgba(139, 92, 246, .55); }

/* ============================================================
   التنبيهات الحية
   ============================================================ */
.alerts { display: flex; flex-direction: column; gap: 11px; max-height: 600px; overflow-y: auto; padding-inline-start: 2px; }
.alerts::-webkit-scrollbar { width: 5px; }
.alerts::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, .35); border-radius: 4px; }

.alert-card {
  border: 1px solid rgba(167, 139, 250, .16);
  border-inline-start: 3px solid var(--violet);
  border-radius: var(--radius-sm); padding: 13px 14px;
  background: linear-gradient(165deg, rgba(139, 92, 246, .08), rgba(14, 9, 32, .5));
  animation: slideIn .5s cubic-bezier(.2, .8, .3, 1);
}
.alert-card.problem {
  border-inline-start-color: var(--danger);
  box-shadow: 0 0 26px -14px rgba(255, 107, 107, .8);
}
.alert-card.fresh {
  border-color: rgba(216, 171, 74, .65);
  box-shadow: 0 0 0 1px rgba(216, 171, 74, .5), 0 0 34px -8px rgba(216, 171, 74, .55);
}
.alert-card .t1 { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.alert-card .t2 { color: var(--muted); font-size: 12px; margin-top: 5px; }
.alert-card .rec {
  font-size: 12.5px; margin-top: 9px; color: var(--ink); line-height: 1.65;
  background: rgba(139, 92, 246, .1);
  border: 1px solid rgba(139, 92, 246, .2);
  border-inline-start: 3px solid var(--violet);
  padding: 8px 11px; border-radius: 10px;
}
.alert-card .llm {
  font-size: 12.5px; margin-top: 7px; color: var(--gold-hi); line-height: 1.6;
  padding: 7px 11px; border-radius: 10px;
  background: rgba(216, 171, 74, .08);
  border: 1px dashed rgba(216, 171, 74, .4);
  animation: llmIn .6s ease;
}
@keyframes llmIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(-16px) scale(.98); } to { opacity: 1; transform: none; } }

/* ============================================================
   الخريطة
   ============================================================ */
.map-wrap { padding: 16px 16px 10px; }
.map-canvas {
  border-radius: 14px; overflow: hidden; position: relative;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(139, 92, 246, .12), transparent 70%),
    linear-gradient(180deg, rgba(10, 6, 28, .5), rgba(16, 10, 38, .8));
  border: 1px solid rgba(139, 92, 246, .14);
}
.map-wrap svg { width: 100%; height: auto; display: block; }
/* مخطط المدينة — طراز التوأم الرقمي */
.map-bound {
  fill: rgba(139, 92, 246, .045);
  stroke: rgba(167, 139, 250, .55); stroke-width: 2.4;
  filter: drop-shadow(0 0 16px rgba(139, 92, 246, .35));
}
.ring-soft { fill: none; stroke: rgba(139, 92, 246, .13); stroke-width: 9; }
.road { fill: none; stroke: rgba(167, 139, 250, .3); stroke-width: 2; stroke-linecap: round; }
.road-soft { fill: none; stroke: rgba(139, 92, 246, .12); stroke-width: 5.5; stroke-linecap: round; }
.hwy { fill: none; stroke: rgba(216, 171, 74, .35); stroke-width: 2.2; stroke-linecap: round; }
.hwy-soft { fill: none; stroke: rgba(216, 171, 74, .12); stroke-width: 8; }
.blk {
  fill: rgba(139, 92, 246, .12);
  stroke: rgba(184, 163, 255, .42); stroke-width: 1;
}
.blk-land {
  fill: rgba(216, 171, 74, .13);
  stroke: rgba(216, 171, 74, .75); stroke-width: 1.3;
  filter: drop-shadow(0 0 10px rgba(216, 171, 74, .5));
}
.wadi-band { fill: none; stroke: rgba(61, 220, 151, .1); stroke-width: 30; stroke-linecap: round; }
.wadi-line { fill: none; stroke: rgba(61, 220, 151, .35); stroke-width: 1.4; stroke-dasharray: 6 9; animation: dashMove 18s linear infinite; }
.map-lbl { fill: #b9aae6; font-size: 12.5px; font-weight: 600; }
.map-lbl-soft { fill: #7d70b8; font-size: 11px; }
.map-chip-bg { fill: rgba(9, 5, 25, .82); stroke: rgba(167, 139, 250, .42); stroke-width: 1; rx: 10; }
.map-chip-name { fill: #ece5ff; font-size: 14px; font-weight: 700; }
.map-chip-score { fill: var(--gold-hi); font-size: 12.5px; font-weight: 700; font-family: var(--font-display); }
.gate-mark { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(216,171,74,.7)); }
@keyframes dashMove { to { stroke-dashoffset: -200; } }

.asset-dot { stroke: rgba(255, 255, 255, .5); stroke-width: 1; cursor: pointer; }
.asset-dot.good { fill: var(--ok); filter: drop-shadow(0 0 4px rgba(61, 220, 151, .9)); }
.asset-dot.warning { fill: var(--warn); filter: drop-shadow(0 0 5px rgba(255, 194, 75, 1)); }
.asset-dot.problem { fill: var(--danger); filter: drop-shadow(0 0 6px rgba(255, 107, 107, 1)); }
.ripple {
  fill: none; stroke: var(--danger); stroke-width: 1.6; opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation: rippleAnim 2.1s ease-out infinite;
}
.ripple.warnR { stroke: var(--warn); animation-duration: 2.8s; }
@keyframes rippleAnim {
  0% { opacity: .85; transform: scale(.4); }
  100% { opacity: 0; transform: scale(2.6); }
}

/* ============================================================
   أشرطة التوزيع
   ============================================================ */
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 118px 1fr 46px; gap: 12px; align-items: center; font-size: 13px; }
.bar-track { background: rgba(255, 255, 255, .05); border: 1px solid rgba(167,139,250,.1); border-radius: 999px; height: 11px; overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--violet-deep), var(--violet) 60%, var(--violet-hi));
  box-shadow: 0 0 12px rgba(139, 92, 246, .55);
  transition: width .9s cubic-bezier(.25, .8, .25, 1);
}
.bar-fill.goldF { background: linear-gradient(90deg, #9a7222, var(--gold) 60%, var(--gold-hi)); box-shadow: 0 0 12px rgba(216,171,74,.5); }
.bar-row .pct { color: var(--gold-hi); text-align: left; font-family: var(--font-display); font-weight: 700; font-size: 13.5px; }

/* ============================================================
   نموذج الزائر
   ============================================================ */
.hero-asset {
  text-align: center; padding: 26px 18px 22px; position: relative; overflow: hidden;
}
.hero-asset .ha-ico {
  width: 74px; height: 74px; margin: 0 auto 10px; border-radius: 22px;
  display: grid; place-items: center; font-size: 36px;
  background: linear-gradient(150deg, rgba(139, 92, 246, .25), rgba(91, 52, 214, .1));
  border: 1px solid rgba(167, 139, 250, .4);
  box-shadow: 0 0 34px -8px rgba(139, 92, 246, .8), inset 0 1px 0 rgba(255,255,255,.15);
}
.hero-asset .ha-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.hero-asset .ha-zone { color: var(--muted); font-size: 13px; margin-top: 3px; }

.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.cat-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cat-opt label {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  border: 1.5px solid rgba(167, 139, 250, .2); border-radius: 16px; padding: 17px 8px 14px;
  cursor: pointer; background: rgba(139, 92, 246, .05);
  font-weight: 700; font-size: 14px;
  transition: all .18s cubic-bezier(.2, .8, .3, 1);
}
.cat-opt label .ico { font-size: 30px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); transition: transform .18s; }
.cat-opt label:hover { transform: translateY(-2px); border-color: rgba(167, 139, 250, .45); }
.cat-opt label:hover .ico { transform: scale(1.12); }
.cat-opt input:checked + label {
  border-color: var(--gold); background: linear-gradient(160deg, rgba(216, 171, 74, .16), rgba(216, 171, 74, .05));
  box-shadow: 0 0 0 1px var(--gold), 0 8px 28px -10px rgba(216, 171, 74, .7);
  transform: translateY(-2px);
}
.cat-opt input:focus-visible + label { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

textarea, input[type="tel"], input[type="text"] {
  width: 100%; background: rgba(10, 6, 28, .55); border: 1.5px solid rgba(167, 139, 250, .22);
  border-radius: 14px; color: var(--ink); font-family: var(--font-body); font-size: 15px;
  padding: 13px 15px; resize: vertical; transition: border-color .2s, box-shadow .2s;
}
textarea::placeholder, input::placeholder { color: var(--faint); }
textarea:focus, input:focus {
  outline: none; border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .18);
}
.file-pick {
  border: 1.5px dashed rgba(167, 139, 250, .35); border-radius: 14px; padding: 14px;
  text-align: center; color: var(--muted); cursor: pointer; font-size: 14px;
  transition: all .2s; background: rgba(139, 92, 246, .04);
}
.file-pick:hover { border-color: var(--violet-hi); color: var(--ink); }
.file-pick.has { border-color: var(--ok); border-style: solid; color: var(--ok); background: rgba(61, 220, 151, .06); }

/* نجاح الإرسال */
.success-burst { text-align: center; padding: 34px 22px 26px; }
.check-ring {
  width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: radial-gradient(circle, rgba(61, 220, 151, .16), transparent 70%);
}
.check-ring svg { width: 96px; height: 96px; position: absolute; inset: 0; }
.check-ring .ring { fill: none; stroke: var(--ok); stroke-width: 3; stroke-dasharray: 290; stroke-dashoffset: 290; animation: drawRing .9s .1s cubic-bezier(.3,.8,.3,1) forwards; filter: drop-shadow(0 0 10px rgba(61,220,151,.8)); }
.check-ring .tick { fill: none; stroke: #d9ffe9; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: drawRing .5s .75s cubic-bezier(.3,.8,.3,1) forwards; }
@keyframes drawRing { to { stroke-dashoffset: 0; } }
.success-burst h2 { font-family: var(--font-display); font-weight: 800; font-size: 23px; margin: 6px 0 4px; }
.report-no {
  font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: 1px;
  color: var(--gold-hi); text-shadow: 0 0 22px rgba(216, 171, 74, .55);
}
.zone-score-box {
  margin-top: 16px; padding: 16px; border-radius: 16px;
  background: linear-gradient(160deg, rgba(139, 92, 246, .14), rgba(14, 9, 32, .4));
  border: 1px solid rgba(167, 139, 250, .25);
}
.zone-score-box .zs-v {
  font-family: var(--font-display); font-weight: 800; font-size: 42px; line-height: 1.1;
  background: linear-gradient(180deg, #fff, var(--violet-hi));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ============================================================
   مسار التتبع
   ============================================================ */
.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 15px; position: relative; padding-bottom: 28px; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; right: 15px; top: 32px; bottom: 2px;
  width: 2px; background: rgba(167, 139, 250, .2);
}
.step.done::before { background: linear-gradient(180deg, var(--ok), rgba(61, 220, 151, .25)); }
.step:last-child::before { display: none; }
.step .dot {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(20, 13, 45, .8); border: 2px solid rgba(167, 139, 250, .3);
  font-size: 13px; z-index: 1; color: var(--muted); font-weight: 700;
  transition: all .35s;
}
.step.done .dot {
  background: linear-gradient(150deg, var(--ok), #128a5c); border-color: var(--ok); color: #04140d;
  box-shadow: 0 0 16px -3px rgba(61, 220, 151, .8);
}
.step.now .dot {
  border-color: var(--gold); color: var(--gold-hi);
  box-shadow: 0 0 0 5px rgba(216, 171, 74, .12), 0 0 18px -2px rgba(216, 171, 74, .7);
  animation: nowPulse 1.6s ease-in-out infinite;
}
@keyframes nowPulse { 50% { box-shadow: 0 0 0 9px rgba(216, 171, 74, .07), 0 0 22px -2px rgba(216, 171, 74, .9); } }
.step .s-t { font-weight: 700; font-size: 15px; padding-top: 4px; }
.step.done .s-t { color: #d6ffe9; }
.step .s-d { color: var(--muted); font-size: 12.5px; margin-top: 3px; line-height: 1.6; }

/* ============================================================
   التحليلات
   ============================================================ */
.spark-line { filter: drop-shadow(0 0 8px rgba(139, 92, 246, .7)); }
.trend-anim { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: drawTrend 1.8s .3s cubic-bezier(.3,.7,.3,1) forwards; }
@keyframes drawTrend { to { stroke-dashoffset: 0; } }
.improve-card {
  text-align: center; padding: 16px 10px; border-radius: 14px;
  background: linear-gradient(165deg, rgba(61, 220, 151, .1), rgba(14, 9, 32, .4));
  border: 1px solid rgba(61, 220, 151, .25);
}
.improve-card .iv { font-family: var(--font-display); font-size: 27px; font-weight: 800; color: var(--ok); text-shadow: 0 0 18px rgba(61,220,151,.5); }
.improve-card .in { color: var(--muted); font-size: 12px; margin-top: 3px; }
.decision-box {
  margin-top: 16px; padding: 15px 17px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(216, 171, 74, .1), rgba(216, 171, 74, .02));
  border: 1px solid rgba(216, 171, 74, .35);
}
.decision-box .dt { font-weight: 700; color: var(--gold-hi); display: flex; align-items: center; gap: 8px; }
.decision-box ul { color: var(--muted); font-size: 13px; margin: 9px 0 0; padding-inline-start: 20px; line-height: 2; }

/* ============================================================
   QR
   ============================================================ */
.qr-card {
  background: #fff !important; border-radius: 18px; text-align: center;
  border: 1px solid #e8e2f5;
  box-shadow: 0 18px 40px -22px rgba(20, 10, 50, .5);
  overflow: hidden; padding: 0;
}
.qr-card .qr-head {
  background: linear-gradient(135deg, #1a1133, #2c1b5e);
  color: #fff; padding: 13px 10px 11px;
}
.qr-card .qr-head .qh-brand { color: var(--gold-hi); font-size: 10.5px; font-weight: 700; letter-spacing: .4px; }
.qr-card .qr-head .qh-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin-top: 3px; }
.qr-card .qr-head .qh-zone { color: #b6a9e0; font-size: 11px; margin-top: 2px; }
.qr-card .qr-body { padding: 14px 14px 6px; }
.qr-card img { width: 82%; border-radius: 8px; border: 4px solid #efeafc; }
.qr-card .qr-cta { font-weight: 800; font-size: 14px; color: #1a1133; padding: 4px 10px 14px; }
.qr-card .qr-cta small { display: block; font-weight: 500; color: #777; font-size: 11px; margin-top: 2px; }
.qr-big { max-width: 430px; margin: 0 auto; }
.qr-big .qr-head { padding: 20px 14px 16px; }
.qr-big .qh-name { font-size: 22px !important; }
.qr-big img { width: 88%; }
.qr-big .qr-cta { font-size: 18px; padding-bottom: 20px; }

/* ============================================================
   شبكات + جوال
   ============================================================ */
.grid { display: grid; gap: 18px; }
.grid-dash { grid-template-columns: 1.85fr 1fr; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.mt { margin-top: 18px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.page-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 2.4vw, 27px); line-height: 1.35; }
.page-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.phone-page main { max-width: 500px; }

@media (max-width: 980px) {
  .hero-row { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .grid-dash, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .topbar { padding: 10px 14px; }
  .topbar .nav a { padding: 7px 11px; font-size: 12px; }
  main { padding: 16px 12px 50px; }
  .stat .num { font-size: 38px; }
  .gauge-card { justify-content: center; }
}
@media (max-width: 520px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   طباعة
   ============================================================ */
@media print {
  body { background: #fff !important; }
  .bg-scene, .bg-stars, .bg-skyline, .bg-vignette, .topbar, .footer, .no-print { display: none !important; }
  main { padding: 0; max-width: none; }
  .grid-3 { grid-template-columns: repeat(3, 1fr) !important; gap: 8mm; }
  .qr-card { box-shadow: none; border: 1px solid #ddd !important; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; }
}
