/* ==========================================================================
   Salam BI v7 (معاينة) — الإطار الجديد
   قائمة جانبية متحركة بمجموعات وقوائم فرعية + انتقالات بين الشاشات + ثيم واحد ثابت
   (الأزرق الكحلي والقرمزي، خط IBM Plex Sans Arabic). يُحمَّل بعد كل ملفات الثيمات.
   ========================================================================== */
:root {
  --v7-navy: #0b2a5b;
  --v7-navy-2: #0b3d91;
  --v7-navy-3: #2563c7;
  --v7-accent: #d7263d;
  --v7-accent-soft: rgba(215, 38, 61, .12);
  --v7-bg: #f4f7fc;
  --v7-card: #ffffff;
  --v7-line: #dde6f3;
  --v7-ink: #0f2d5b;
  --v7-ink-2: #4b5b75;
  --v7-good: #1baf7a;
  --v7-bad: #d7263d;
  --v7-s1: #2a78d6;
  --v7-s2: #eb6834;
  --v7-s3: #1baf7a;
  --v7-side-w: 268px;
  --v7-side-wc: 76px;
  --v7-ease: cubic-bezier(.2, .8, .2, 1);
  --v7-ease-out: cubic-bezier(.16, 1, .3, 1);
  --v7-font: 'IBM Plex Sans Arabic', 'Cairo', system-ui, sans-serif;
}

html.v7, html.v7 body { font-family: var(--v7-font) !important; }
html.v7 body { background: var(--v7-bg) !important; color: var(--v7-ink); }
html.v7 .font-mono, html.v7 .v7-num { font-family: var(--v7-font) !important; font-variant-numeric: tabular-nums; }

/* ---- الهيدر: نخفي شريط الوحدات القديم وأدوات الثيم (القائمة الجانبية مكانها) ---- */
html.v7 .v6-modules,
html.v7 #colorThemeMenuWrap,
html.v7 .v7-hide { display: none !important; }
html.v7 .v6-top {
  background: rgba(255, 255, 255, .86) !important;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--v7-line) !important;
  box-shadow: 0 1px 0 rgba(11, 42, 91, .03);
}
html.v7 .v6-brand-mark { background: linear-gradient(135deg, var(--v7-navy-2), var(--v7-accent)) !important; color: #fff !important; }
html.v7 .v6-brand-name { color: var(--v7-ink) !important; }

.v7-burger {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--v7-line); background: #fff; color: var(--v7-ink); cursor: pointer;
  transition: background .2s, transform .2s var(--v7-ease);
}
.v7-burger:hover { background: #eef3fb; }
.v7-burger:active { transform: scale(.94); }
.v7-burger svg { width: 18px; height: 18px; }

/* ---- القائمة الجانبية ---- */
.v7-side {
  flex: none; width: var(--v7-side-w); height: 100%;
  background: linear-gradient(180deg, #0b2a5b 0%, #0a2350 60%, #081c41 100%);
  color: #c9d6ee; display: flex; flex-direction: column;
  transition: width .38s var(--v7-ease-out);
  position: relative; z-index: 30;
  box-shadow: -1px 0 0 rgba(255, 255, 255, .04) inset;
}
.v7-side-scroll { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 14px 12px 10px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.v7-side-scroll::-webkit-scrollbar { width: 6px; }
.v7-side-scroll::-webkit-scrollbar-track { background: transparent; border: 0; }
.v7-side-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border: 0; }
.v7-side-scroll::-webkit-scrollbar-button { display: none; }

.v7-nav { position: relative; display: flex; flex-direction: column; gap: 2px; }
.v7-nav-h { font-size: 11px; font-weight: 600; letter-spacing: .02em; color: #8ea3c8; padding: 14px 12px 6px; white-space: nowrap; transition: opacity .25s; }
.v7-nav-h:first-child { padding-top: 2px; }

/* المؤشر المنزلق خلف العنصر النشط */
.v7-ind {
  position: absolute; inset-inline: 0; top: 0; height: 40px; border-radius: 11px;
  background: rgba(255, 255, 255, .12); pointer-events: none; opacity: 0;
  transition: transform .45s var(--v7-ease-out), height .45s var(--v7-ease-out), opacity .25s;
}
.v7-ind::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: 3px; height: 20px; margin-top: -10px;
  border-radius: 3px; background: var(--v7-accent); box-shadow: 0 0 12px rgba(215, 38, 61, .7);
}
.v7-ind.on { opacity: 1; }

.v7-a, .v7-gh {
  position: relative; z-index: 1; width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 11px; border: 0; background: none; color: inherit;
  font: inherit; font-size: 14px; text-align: start; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: color .25s, background .25s, padding .3s var(--v7-ease);
}
.v7-a:hover, .v7-gh:hover { background: rgba(255, 255, 255, .06); color: #fff; padding-inline-start: 16px; }
.v7-a.on { color: #fff; font-weight: 600; }
.v7-ico { width: 19px; height: 19px; flex: none; display: grid; place-items: center; opacity: .9; }
.v7-ico svg { width: 19px; height: 19px; }
.v7-txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; transition: opacity .2s; }
.v7-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--v7-accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.v7-chev { width: 16px; height: 16px; flex: none; opacity: .55; transition: transform .45s var(--v7-ease-out), opacity .2s; }
.v7-g.open > .v7-gh .v7-chev { transform: rotate(180deg); opacity: .9; }
.v7-g.open > .v7-gh, .v7-g.has-on > .v7-gh { color: #fff; }
.v7-g.has-on > .v7-gh { font-weight: 600; }
.v7-count { font-size: 11px; color: #8ea3c8; font-weight: 500; }

/* فتح/غلق المجموعة بارتفاع متحرك (0fr → 1fr) */
.v7-gb { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--v7-ease-out); }
.v7-g.open > .v7-gb { grid-template-rows: 1fr; }
.v7-gi { overflow: hidden; min-height: 0; position: relative; padding-inline-start: 14px; visibility: hidden; transition: visibility 0s .45s; }
.v7-g.open > .v7-gb > .v7-gi { visibility: visible; transition: visibility 0s; }
.v7-gi::before {
  content: ""; position: absolute; inset-inline-start: 21px; top: 4px; bottom: 8px; width: 1px;
  background: rgba(255, 255, 255, .14); transform: scaleY(0); transform-origin: top; transition: transform .5s var(--v7-ease-out);
}
.v7-g.open > .v7-gb > .v7-gi::before { transform: scaleY(1); }
.v7-gi > .v7-a, .v7-gi > .v7-g {
  opacity: 0; transform: translateX(14px);
  transition: opacity .3s, transform .4s var(--v7-ease-out), color .25s, background .25s, padding .3s var(--v7-ease);
}
.v7-g.open > .v7-gb > .v7-gi > .v7-a, .v7-g.open > .v7-gb > .v7-gi > .v7-g { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 45ms + 40ms), calc(var(--i, 0) * 45ms + 40ms), 0s, 0s, 0s; }
.v7-gi .v7-a { font-size: 13.5px; padding-top: 8px; padding-bottom: 8px; padding-inline-start: 22px; }
.v7-gi .v7-a:hover { padding-inline-start: 26px; }
.v7-gi .v7-gh { font-size: 13.5px; padding-inline-start: 22px; }
.v7-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .45; flex: none; transition: transform .3s, opacity .3s, background .3s; }
.v7-a.on .v7-dot { opacity: 1; transform: scale(1.45); background: var(--v7-accent); box-shadow: 0 0 0 3px rgba(215, 38, 61, .28); }
/* المستوى الثالث (تقارير القسم) */
.v7-gi .v7-gi { padding-inline-start: 10px; }
.v7-gi .v7-gi .v7-a { font-size: 12.5px; color: #b5c4e0; white-space: normal; line-height: 1.45; }
.v7-gi .v7-gi .v7-a.on { color: #fff; }
.v7-gi .v7-gi::before { inset-inline-start: 25px; }

.v7-side-foot { flex: none; padding: 10px 12px 14px; border-top: 1px solid rgba(255, 255, 255, .07); display: flex; align-items: center; gap: 8px; }
.v7-collapse {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; border: 0;
  background: rgba(255, 255, 255, .05); color: #c9d6ee; font: inherit; font-size: 13px; cursor: pointer; transition: background .2s;
}
.v7-collapse:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.v7-collapse svg { width: 18px; height: 18px; transition: transform .4s var(--v7-ease-out); }
.v7-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #8ea3c8; padding: 0 12px 8px; white-space: nowrap; }
.v7-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--v7-good); box-shadow: 0 0 0 0 rgba(27, 175, 122, .6); animation: v7pulse 2s infinite; }
@keyframes v7pulse { 0% { box-shadow: 0 0 0 0 rgba(27, 175, 122, .55); } 70% { box-shadow: 0 0 0 8px rgba(27, 175, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(27, 175, 122, 0); } }

/* القائمة المطوية (أيقونات فقط) — على الكمبيوتر */
@media (min-width: 1024px) {
  html.v7-collapsed .v7-side { width: var(--v7-side-wc); }
  html.v7-collapsed .v7-txt, html.v7-collapsed .v7-chev, html.v7-collapsed .v7-count,
  html.v7-collapsed .v7-nav-h, html.v7-collapsed .v7-live span { opacity: 0; pointer-events: none; }
  html.v7-collapsed .v7-nav-h { height: 10px; padding: 0; overflow: hidden; }
  html.v7-collapsed .v7-gb { grid-template-rows: 0fr !important; }
  html.v7-collapsed .v7-gb > .v7-gi { visibility: hidden !important; }
  html.v7-collapsed .v7-collapse svg { transform: rotate(180deg); }
  html.v7-collapsed .v7-a:hover, html.v7-collapsed .v7-gh:hover { padding-inline-start: 12px; }
  html.v7-collapsed .v7-badge { position: absolute; top: 3px; inset-inline-start: 26px; min-width: 16px; height: 16px; font-size: 10px; }
  .v7-burger.v7-desk-hide { display: none; }
}

/* موبايل وتابلت: القائمة درج منزلق من اليمين */
.v7-scrim { display: none; }
@media (max-width: 1023px) {
  .v7-side {
    position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(86vw, 300px); z-index: 70;
    transform: translateX(105%); transition: transform .42s var(--v7-ease-out); box-shadow: -18px 0 40px rgba(8, 28, 65, .35);
  }
  html.v7-drawer .v7-side { transform: none; }
  .v7-scrim {
    display: block; position: fixed; inset: 0; z-index: 65; background: rgba(8, 20, 45, .45);
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  html.v7-drawer .v7-scrim { opacity: 1; pointer-events: auto; }
  .v7-collapse { display: none; }
  html.v7 .v6-main { padding-bottom: 74px; }
}

/* ---- شريط التنقل السفلي (موبايل) ---- */
.v7-bnav { display: none; }
@media (max-width: 767px) {
  .v7-bnav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; bottom: 0; inset-inline: 0; z-index: 60;
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--v7-line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .v7-bnav a, .v7-bnav button {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 0; background: none;
    font: inherit; font-size: 11px; color: var(--v7-ink-2); text-decoration: none; cursor: pointer; z-index: 1; transition: color .25s;
  }
  .v7-bnav svg { width: 21px; height: 21px; transition: transform .35s var(--v7-ease-out); }
  .v7-bnav .on { color: var(--v7-accent); font-weight: 600; transform: translateY(-2px); }
  .v7-bnav .on svg { transform: translateY(-2px); }
  .v7-bnav-ind { position: absolute; top: 4px; height: 3px; border-radius: 3px; background: var(--v7-accent); transition: transform .45s var(--v7-ease-out), width .45s var(--v7-ease-out); }
}

/* ---- شريط التحميل أعلى الشاشة ---- */
.v7-loadbar {
  position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 90; pointer-events: none;
  background: linear-gradient(90deg, var(--v7-accent), #ff8a5b, var(--v7-s1));
  transform-origin: right; transform: scaleX(0); opacity: 0;
}
.v7-loadbar.run { opacity: 1; animation: v7load 1.6s var(--v7-ease) forwards; }
.v7-loadbar.done { animation: v7loaddone .8s var(--v7-ease) forwards; }
@keyframes v7loaddone { 0% { opacity: 1; transform: scaleX(0); } 60% { opacity: 1; transform: scaleX(.85); } 100% { opacity: 0; transform: scaleX(1); } }
@keyframes v7load { 0% { transform: scaleX(0); } 30% { transform: scaleX(.55); } 100% { transform: scaleX(.92); } }

/* ---- الانتقال بين الشاشات (نفس حركة معرض التصميم) ----
   الخروج: المحتوى بيتزحلق ناحية الاتجاه مع blur، والدخول من الناحية التانية.
   الاتجاه (fwd/back/same) بيتحدد من ترتيب الشاشة في القائمة ويتحفظ قبل الانتقال. */
html.v7.v7-pre .v6-page { opacity: 0; }
html.v7.v7-in .v6-page { animation: v7-in-f .6s var(--v7-ease-out) backwards; }
html.v7.v7-in[data-v7dir="back"] .v6-page { animation-name: v7-in-b; }
html.v7.v7-in[data-v7dir="same"] .v6-page { animation: v7-fade-in .4s ease backwards; }
html.v7.v7-out .v6-page { animation: v7-out-f .32s var(--v7-ease) both; }
html.v7.v7-out[data-v7out="back"] .v6-page { animation-name: v7-out-b; }
html.v7.v7-out[data-v7out="same"] .v6-page { animation: v7-fade-out .25s ease both; }
@keyframes v7-out-f { to { opacity: 0; transform: translateX(60px) scale(.97); filter: blur(6px); } }
@keyframes v7-in-f { from { opacity: 0; transform: translateX(-80px) scale(.98); filter: blur(8px); } }
@keyframes v7-out-b { to { opacity: 0; transform: translateX(-60px) scale(.97); filter: blur(6px); } }
@keyframes v7-in-b { from { opacity: 0; transform: translateX(80px) scale(.98); filter: blur(8px); } }
@keyframes v7-fade-out { to { opacity: 0; } }
@keyframes v7-fade-in { from { opacity: 0; transform: translateY(8px); } }
html.v7 .v6-main { overflow-x: hidden; }

/* ---- ظهور متتابع للكروت ---- */
html.v7.v7-in .v7-rise { animation: v7rise .7s var(--v7-ease-out) backwards; animation-delay: calc(var(--i, 0) * 55ms + 80ms); }
@keyframes v7rise { from { opacity: 0; transform: translateY(22px) scale(.985); } }
html.v7.v7-in .v7-hero.v7-rise { animation-name: v7cover; }
@keyframes v7cover { from { opacity: 0; transform: translateY(16px); clip-path: inset(0 0 100% 0 round 20px); } to { clip-path: inset(0 0 0 0 round 20px); } }
.v7-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .18) 45%, transparent 60%);
  transform: translateX(100%); animation: v7shine 2.4s 1s var(--v7-ease) both;
}
@keyframes v7shine { to { transform: translateX(-100%); } }
html.v7.v7-in .v7-hero .v7-chip { animation: v7pop .5s var(--v7-ease-out) both; animation-delay: calc(var(--j, 0) * 70ms + .45s); }
@keyframes v7pop { from { opacity: 0; transform: scale(.8) translateY(6px); } }

/* أشرطة التقدم وصفوف الترتيب */
.v7-bar > i, .v7-lbar > i { transition: width 1.1s var(--v7-ease-out); transition-delay: calc(var(--k, 0) * 55ms + .3s); }
html.v7.v7-in .v7-lrow:not(.head) { animation: v7slide .6s var(--v7-ease-out) both; animation-delay: calc(var(--k, 0) * 45ms + .25s); }
@keyframes v7slide { from { opacity: 0; transform: translateX(-16px); } }
html.v7.v7-in .v7-li, html.v7.v7-in .v7-kpi { animation: v7row .45s var(--v7-ease-out) both; animation-delay: calc(var(--r, 0) * 28ms + .35s); }
@keyframes v7row { from { opacity: 0; transform: translateY(8px); } }

/* تفاعلات صغيرة */
.v7-card, .v7-tile, html.v7 .co-card { transition: transform .35s var(--v7-ease-out), box-shadow .35s, border-color .35s; }
.v7-card:hover, html.v7 .co-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(16, 24, 40, .10) !important; border-color: #d3d9e2 !important; }
.v7-btn, .v7-chip, .v7-pill { position: relative; overflow: hidden; }
.v7-ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .25; animation: v7ripple .6s ease-out forwards; pointer-events: none; }
@keyframes v7ripple { to { transform: scale(4); opacity: 0; } }
.v7-hero .v7-btn:hover { transform: translateY(-1px); }
.v7-hero .v7-btn.primary:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.v7-flash { animation: v7flash 1.1s .5s 2 ease-out !important; }
@keyframes v7flash { 0% { box-shadow: 0 0 0 0 rgba(42, 120, 214, .55); } 100% { box-shadow: 0 0 0 16px rgba(42, 120, 214, 0); } }

/* تعطيل الحركة في أول رسم للقائمة (علشان متتحركش مع كل صفحة) */
html.v7-noanim .v7-side, html.v7-noanim .v7-side * { transition: none !important; }

/* ---- الكروت العامة داخل الإطار الجديد ---- */
html.v7 .v6-page .rounded-2xl.border { border-color: var(--v7-line) !important; box-shadow: 0 1px 2px rgba(11, 42, 91, .04), 0 8px 24px rgba(11, 42, 91, .05) !important; }
html.v7 .v6-crumbs { background: transparent !important; border: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  html.v7 *, html.v7 *::before, html.v7 *::after { animation: none !important; transition: none !important; }
  html.v7.v7-pre .v6-page { opacity: 1; }
}
@media print { .v7-side, .v7-bnav, .v7-scrim, .v7-loadbar { display: none !important; } }

/* ==========================================================================
   مكونات اللوحات (الرئيسية + التنفيذية)
   ========================================================================== */
.v7-hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 22px 24px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, rgba(215, 38, 61, .35) 0%, rgba(215, 38, 61, 0) 45%),
              linear-gradient(135deg, #0b2a5b 0%, #0b3d91 58%, #1c4fa8 100%);
  box-shadow: 0 18px 40px -18px rgba(11, 42, 91, .55);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.v7-hero::after {
  content: ""; position: absolute; inset-inline-end: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 0 0 40px rgba(255, 255, 255, .03), 0 0 0 80px rgba(255, 255, 255, .02); pointer-events: none;
}
.v7-hero h1 { font-size: clamp(20px, 2.4vw, 28px); font-weight: 700; margin: 6px 0 2px; display: flex; align-items: center; gap: 10px; }
.v7-hero p { color: #c9d6ee; font-size: 13.5px; margin: 0; }
.v7-hero .v7-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.v7-hero-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: relative; z-index: 1; }
.v7-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 500;
  background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .16); white-space: nowrap;
}
.v7-chip svg { width: 14px; height: 14px; }
.v7-chip.warn { background: rgba(242, 169, 0, .2); border-color: rgba(242, 169, 0, .35); }
.v7-chip.reset { background: var(--v7-accent); border-color: transparent; cursor: pointer; }
.v7-chip .v7-pulse { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: v7pulse 2s infinite; }
.v7-hero select, .v7-hero .v7-btn {
  height: 38px; border-radius: 11px !important; font: inherit; font-size: 13px; font-weight: 600; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .22) !important; background: rgba(255, 255, 255, .1) !important; color: #fff !important; cursor: pointer;
}
.v7-hero select option { color: var(--v7-ink); background: #fff; }
.v7-hero .v7-btn { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; transition: background .2s, transform .2s var(--v7-ease); }
.v7-hero .v7-btn:hover { background: rgba(255, 255, 255, .2) !important; }
.v7-hero .v7-btn:active { transform: scale(.96); }
.v7-hero .v7-btn.primary { background: #fff !important; color: var(--v7-navy-2) !important; border-color: #fff !important; }
.v7-hero .v7-btn svg { width: 16px; height: 16px; }

.v7-card { background: var(--v7-card); border: 1px solid var(--v7-line); border-radius: 18px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(11, 42, 91, .04), 0 10px 28px -14px rgba(11, 42, 91, .14); min-width: 0; }
.v7-card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.v7-card-h h3 { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--v7-ink); display: flex; align-items: center; gap: 8px; }
.v7-card-h h3 svg { width: 18px; height: 18px; color: var(--v7-navy-3); }
.v7-card-h p { margin: 2px 0 0; font-size: 12.5px; color: var(--v7-ink-2); }
.v7-pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 600; background: #eef3fb; color: var(--v7-navy-2); white-space: nowrap; }
.v7-pill svg { width: 14px; height: 14px; }

.v7-grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.v7-span-12 { grid-column: span 12; } .v7-span-8 { grid-column: span 8; } .v7-span-7 { grid-column: span 7; }
.v7-span-6 { grid-column: span 6; } .v7-span-5 { grid-column: span 5; } .v7-span-4 { grid-column: span 4; }
@media (max-width: 1180px) { .v7-span-8, .v7-span-7, .v7-span-5, .v7-span-4 { grid-column: span 12; } }
@media (max-width: 760px) { .v7-span-6 { grid-column: span 12; } }

/* بطاقة المبيعات الكبيرة + حلقة المستهدف */
.v7-today { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.v7-today .lbl { font-size: 13px; color: var(--v7-ink-2); font-weight: 500; }
.v7-big { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; color: var(--v7-ink); line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.v7-big small { font-size: 15px; font-weight: 500; color: var(--v7-ink-2); margin-inline-start: 4px; }
.v7-sub { font-size: 12.5px; color: var(--v7-ink-2); margin-top: 6px; }
.v7-sub b { color: var(--v7-ink); font-weight: 600; }
.v7-ring { position: relative; width: 132px; height: 132px; flex: none; }
.v7-ring svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.v7-ring .trk { stroke: #e8eef8; }
.v7-ring .val { stroke: url(#v7RingGrad); stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--v7-ease-out) .3s; }
.v7-ring .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.v7-ring .mid b { font-size: 24px; font-weight: 700; color: var(--v7-ink); font-variant-numeric: tabular-nums; }
.v7-ring .mid span { font-size: 11.5px; color: var(--v7-ink-2); }
.v7-bar { height: 8px; border-radius: 4px; background: #e8eef8; overflow: hidden; }
.v7-bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--v7-navy-3), var(--v7-navy-2)); width: 0; transition: width 1s var(--v7-ease-out); }
.v7-bar > i.done { background: linear-gradient(90deg, #22c493, var(--v7-good)); }

/* المربعات الصغيرة */
.v7-tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); height: 100%; }
@media (min-width: 1400px) { .v7-tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) { .v7-tiles { grid-template-columns: minmax(0, 1fr); } }
.v7-tile {
  position: relative; overflow: hidden; background: var(--v7-card); border: 1px solid var(--v7-line); border-radius: 16px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: transform .25s var(--v7-ease), box-shadow .25s;
}
.v7-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -16px rgba(11, 42, 91, .3); }
.v7-tile .t-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--v7-ink-2); font-weight: 500; }
.v7-tile .t-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.v7-tile .t-ic svg { width: 18px; height: 18px; }
.v7-tile .t-v { font-size: 24px; font-weight: 700; color: var(--v7-ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.v7-tile .t-v small { font-size: 12px; font-weight: 500; color: var(--v7-ink-2); margin-inline-start: 4px; }
.v7-tile .t-s { font-size: 12px; color: var(--v7-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic-blue { background: rgba(42, 120, 214, .12); color: var(--v7-s1); }
.ic-green { background: rgba(27, 175, 122, .12); color: var(--v7-good); }
.ic-red { background: rgba(215, 38, 61, .1); color: var(--v7-accent); }
.ic-orange { background: rgba(235, 104, 52, .12); color: var(--v7-s2); }
.ic-navy { background: rgba(11, 61, 145, .1); color: var(--v7-navy-2); }

/* مؤشرات التجزئة */
.v7-kpis { display: grid; gap: 10px; }
.v7-kpi { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 13px; background: #f5f8fd; border: 1px solid #e6edf7; }
.v7-kpi .k-l b { display: block; font-size: 13px; color: var(--v7-ink); font-weight: 600; }
.v7-kpi .k-l span { font-size: 11.5px; color: var(--v7-ink-2); }
.v7-kpi .k-v { font-size: 19px; font-weight: 700; color: var(--v7-navy-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v7-kpi .k-v small { font-size: 11.5px; color: var(--v7-ink-2); font-weight: 500; margin-inline-start: 3px; }

/* ترتيب الفروع (اللوحة التنفيذية) */
.v7-league { display: flex; flex-direction: column; gap: 4px; }
.v7-lrow { display: grid; grid-template-columns: 28px minmax(0, 1.4fr) minmax(0, 2fr) 92px 64px; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; transition: background .2s; }
.v7-lrow:hover { background: #f3f7fd; }
.v7-lrow.head { font-size: 11.5px; color: var(--v7-ink-2); font-weight: 600; padding-top: 0; padding-bottom: 6px; border-bottom: 1px solid var(--v7-line); border-radius: 0; }
.v7-lrow.head:hover { background: none; }
.v7-lrow .rk { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #eef3fb; color: var(--v7-navy-2); }
.v7-lrow:nth-child(2) .rk { background: var(--v7-navy-2); color: #fff; }
.v7-lrow .nm { font-size: 13.5px; font-weight: 600; color: var(--v7-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.v7-lrow a.nm:hover { color: var(--v7-navy-3); }
.v7-lrow .sv { font-size: 13.5px; font-weight: 700; color: var(--v7-ink); text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v7-lrow .pc { font-size: 12.5px; font-weight: 700; text-align: left; font-variant-numeric: tabular-nums; }
.v7-lrow .pc.good { color: var(--v7-good); } .v7-lrow .pc.mid { color: #c98a00; } .v7-lrow .pc.low { color: var(--v7-accent); } .v7-lrow .pc.na { color: var(--v7-ink-2); font-weight: 500; }
.v7-lbar { position: relative; height: 10px; border-radius: 5px; background: #edf2f9; overflow: hidden; }
.v7-lbar > i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 5px; background: linear-gradient(90deg, #4a8fe0, var(--v7-navy-2)); width: 0; transition: width 1s var(--v7-ease-out); }
@media (max-width: 640px) {
  .v7-lrow { grid-template-columns: 26px minmax(0, 1fr) 84px 54px; }
  .v7-lrow .v7-lbar, .v7-lrow.head .hb { display: none; }
}
.v7-empty { padding: 26px 10px; text-align: center; font-size: 13px; color: var(--v7-ink-2); }
.v7-skel { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #edf2f9 25%, #f7f9fd 50%, #edf2f9 75%); background-size: 200% 100%; animation: v7sk 1.2s infinite; }
@keyframes v7sk { to { background-position: -200% 0; } }

/* قوائم صغيرة (آخر التشغيلات / المفضلة) */
.v7-list { display: flex; flex-direction: column; }
.v7-li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #eef2f8; font-size: 13px; min-width: 0; }
.v7-li:last-child { border-bottom: 0; }
.v7-li a { color: var(--v7-ink); font-weight: 600; text-decoration: none; min-width: 0; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v7-li a:hover { color: var(--v7-navy-3); }
.v7-li .m { color: var(--v7-ink-2); font-size: 12px; white-space: nowrap; }
.v7-st { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.v7-st.ok { background: var(--v7-good); } .v7-st.err { background: var(--v7-accent); }

/* v7: أثناء تجهيز الشاشة في الخلفية الأشرطة والدايرة بتستنى، وتكبر لما الشاشة تظهر */
html.v7-pre .v7-bar > i, html.v7-pre .v7-lbar > i { width: 0 !important; transition: none !important; }
html.v7-pre .v7-ring .val { stroke-dashoffset: 351.86 !important; transition: none !important; }

/* مركز التقارير: القائمة الجانبية الجديدة بقت هي قائمة التقارير، فنشيل القائمة القديمة وزرار «التقارير/الأقسام» الجانبي */
html.v7 .v6-page .v6-back-tab { display: none !important; }

/* ==========================================================================
   مطابقة المعرض (design-preview): الإطار والقوائم
   القائمة الجانبية بارتفاع الشاشة وفوقها العلامة، والمحتوى عمود فيه شريط علوي (.top) والصفحة.
   ========================================================================== */
:root {
  --v7-bg: #f5f6f8; --v7-line: #e3e6eb; --v7-ink: #101828; --v7-ink-2: #475467; --v7-ink-3: #8a94a6;
  --v7-navy: #0b2a5b; --v7-navy-2: #123b7a; --v7-side-ink: #c9d4e8;
  --v7-side-w: 248px;
  --topbar-h: 57px;
}
html.v7, html.v7 body { height: 100%; }
html.v7 body { background: var(--v7-bg) !important; font-size: 14px; line-height: 1.55; color: var(--v7-ink); }
html.v7 body > .v6-body { flex: 1 1 auto; height: 100vh; min-height: 0; }

/* القائمة الجانبية: كحلي ثابت زي .side */
.v7-side { background: var(--v7-navy); color: var(--v7-side-ink); padding: 18px 14px 10px; box-shadow: none; }
.v7-side-scroll { padding: 0; margin: 0 -4px; padding-inline: 4px; }
.v7-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; text-decoration: none; color: inherit; flex: none; white-space: nowrap; }
.v7-mk { width: 36px; height: 36px; border-radius: 10px; background: var(--v7-accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none; }
.v7-brand b { color: #fff; font-size: 16px; display: block; line-height: 1.3; }
.v7-brand small { font-size: 11px; opacity: .75; display: block; overflow: hidden; text-overflow: ellipsis; }
.v7-a, .v7-gh { padding: 9px 10px; border-radius: 10px; font-size: 14px; gap: 10px; color: var(--v7-side-ink); }
.v7-a:hover, .v7-gh:hover { padding-inline-start: 14px; }
.v7-ico, .v7-ico svg { width: 18px; height: 18px; }
.v7-ind { border-radius: 10px; }
.v7-ind::before { height: 18px; margin-top: -9px; box-shadow: 0 0 12px var(--v7-accent); }
.v7-gi { padding-inline-start: 14px; }
.v7-gi::before { inset-inline-start: 19px; }
.v7-gi .v7-a { font-size: 13.5px; padding: 8px 10px; padding-inline-start: 20px; }
.v7-gi .v7-a:hover { padding-inline-start: 24px; }
.v7-gi .v7-gh { font-size: 13.5px; padding-inline-start: 20px; }
.v7-gi .v7-gi .v7-a { font-size: 12.5px; opacity: .85; }
.v7-gi .v7-gi .v7-a.on { opacity: 1; }
.v7-side-foot { border-top: 0; padding: 6px 0 4px; flex-direction: column; align-items: stretch; gap: 6px; }
.v7-live { font-size: 12px; opacity: .7; color: inherit; padding: 4px 10px; }
.v7-live i { width: 7px; height: 7px; border-radius: 50%; background: #1baf7a; flex: none; }

/* عمود المحتوى + الشريط العلوي */
.v7-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; height: 100%; }
.v7-top {
  flex: none; position: relative; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 24px;
  background: color-mix(in srgb, var(--v7-bg) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--v7-line);
}
.v7-crumb { font-size: 13px; color: var(--v7-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.v7-crumb b { color: var(--v7-ink); font-weight: 600; }
.v7-search {
  margin-inline-start: auto; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--v7-line);
  border-radius: 10px; padding: 7px 12px; min-width: 260px; color: var(--v7-ink-3); font: inherit; font-size: 13px; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.v7-search:hover { border-color: #cfd5de; box-shadow: 0 2px 8px rgba(16, 24, 40, .06); }
.v7-search svg { width: 16px; height: 16px; flex: none; }
.v7-search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v7-search kbd { margin-inline-start: auto; font-size: 11px; border: 1px solid var(--v7-line); border-radius: 6px; padding: 0 6px; font-family: inherit; }
.v7-icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--v7-line); background: #fff; display: grid; place-items: center;
  cursor: pointer; color: var(--v7-ink-2); flex: none; position: relative; text-decoration: none;
  transition: transform .2s var(--v7-ease-out), background .25s, border-color .25s;
}
.v7-icon-btn:hover { background: #f9fafb; border-color: #cfd5de; }
.v7-icon-btn:active { transform: scale(.94); }
.v7-icon-btn svg { width: 18px; height: 18px; }
.v7-icon-btn .hidden { display: none; }
.v7-bell-dot { position: absolute; top: 7px; inset-inline-end: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--v7-accent); box-shadow: 0 0 0 2px #fff; }
.v7-me { display: flex; align-items: center; gap: 8px; font-size: 13px; flex: none; }
.v7-av { width: 32px; height: 32px; border-radius: 50%; background: var(--v7-navy); color: #fff; display: grid; place-items: center; font-weight: 700; }
.v7-me-t b { display: block; font-weight: 600; color: var(--v7-ink); line-height: 1.3; }
.v7-me-t small { font-size: 11px; color: var(--v7-ink-3); }
.v7-burger { display: none; border-color: var(--v7-line); }

html.v7 .v6-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; background: var(--v7-bg); }
html.v7 .v6-page { padding: 22px 24px 48px !important; max-width: 1440px; }

/* الكروت بنفس مقاس .card في المعرض */
.v7-card, .v7-tile { border-radius: 14px; border-color: var(--v7-line); box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06); }
.v7-card:hover, .v7-tile:hover { box-shadow: 0 12px 28px rgba(16, 24, 40, .10); border-color: #d3d9e2; }

@media (max-width: 1023px) {
  .v7-burger { display: grid; }
  .v7-side { padding-top: 18px; }
}
@media (max-width: 760px) {
  .v7-top { padding: 10px 16px; }
  .v7-search { min-width: 0; flex: 1; }
  .v7-search kbd, .v7-crumb, .v7-me-t, .v7-bell, #fullscreenToggleBtn { display: none; }
  html.v7 .v6-page { padding: 16px 16px 90px !important; }
}
@media (min-width: 1024px) {
  html.v7-collapsed .v7-brand { padding-inline: 4px; }
  html.v7-collapsed .v7-live { padding-inline: 14px; }
}
html.v7 .v6-page > svg:first-child + * { margin-top: 0 !important; }
.v7-mk { background: #fff !important; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.v7-mk img { width: 26px; height: 26px; object-fit: contain; display: block; }
