/* =====================================================================
   v2.55.0 — التصميم الجديد: لوحة التحكم (bento) + الصفحة الرئيسية + لمسات القايمة.
   بيتحمّل آخر ملف، وكله على متغيرات الثيم فبيشتغل في الداكن تلقائيًا.
   ===================================================================== */

/* ---------- لوحة التحكم: الهيدر ---------- */
.dx-top { background: #10231D; color: #EAF2EC; border: 0; border-radius: 18px; padding: 18px 22px; position: relative; overflow: hidden; box-shadow: none; }
.dx-top::after { content: ""; position: absolute; inset-inline-end: -70px; top: -90px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(198,242,74,.2), transparent 65%); pointer-events: none; }
.dx-top > * { position: relative; z-index: 1; }
.dx-top__date, .dx-top__sub, .dx-top__sub .small { color: #9FB5AB; }
.dx-top__title { color: #fff; font-size: 26px; }
.dx-top__title span { color: #C6F24A; }
.dx-top__sub b { color: #EAF2EC; }
.dx-chip { background: rgba(255,255,255,.09); border-color: transparent; color: #EAF2EC; }
.dx-chip--kind { background: #C6F24A; color: #10231D; }
.dx-stat { background: rgba(255,255,255,.07); border-color: transparent; color: #EAF2EC; }
.dx-stat span { color: #9FB5AB; }
.dx-stat b { color: #fff; }
.dx-stat--warn b { color: #F5C26B; }
a.dx-stat:hover { background: rgba(255,255,255,.13); border-color: transparent; }
.dx-ring2 { background: conic-gradient(#C6F24A calc(var(--p) * 1%), rgba(255,255,255,.14) 0); }
.dx-ring2 > div { background: #10231D; }
.dx-ring2 b { color: #fff; }
.dx-ring2 span { color: #9FB5AB; }
.dx-top__acts .btn--ghost { background: transparent; color: #EAF2EC; border-color: rgba(255,255,255,.25); }
.dx-top__acts .btn--ghost:hover { background: rgba(255,255,255,.1); }
.dx-top__acts .btn--primary { background: #C6F24A; color: #10231D; border-color: #C6F24A; }

/* ---------- فلتر الفترة ---------- */
.dx-per { gap: 6px; margin: 2px 0 14px; }
.dx-per__i { padding: 5px 14px; }

/* ---------- كروت الأرقام ---------- */
.dx2-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 14px; }
.dx2-kpi { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: inherit; text-decoration: none; min-width: 0; position: relative; transition: transform .15s, box-shadow .15s, border-color .15s; }
.dx2-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(16,35,29,.08); border-color: var(--ink-3); text-decoration: none; }
.dx2-kpi__l { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dx2-kpi__l i { font-style: normal; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--canvas); font-size: 15px; }
.dx2-kpi__v { font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: -.01em; }
.dx2-kpi__f:not(:has(svg)):not(:has(em)) { display: none; }
.dx2-kpi__f { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.dx2-spark { width: 96px; height: 34px; flex: none; }
.dx2-d { font-style: normal; font-size: 12.5px; font-weight: 700; padding: 1px 9px; border-radius: 99px; background: var(--canvas); color: var(--ink-2); }
.dx2-d--good { background: #E1F3E9; color: #1E8E5A; }
.dx2-d--bad { background: #FBE4DE; color: #C2381B; }
.dx2-kpi--bad { border-color: #F2C3B8; } .dx2-kpi--warn { border-color: #F0D9A6; }
.dx2-kpi--bad::after, .dx2-kpi--warn::after { content: ""; position: absolute; inset-inline-start: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: #C2381B; }
.dx2-kpi--warn::after { background: #E5A02F; }

/* ---------- شبكة bento ---------- */
.dx2 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; grid-auto-flow: row dense; align-items: stretch; margin-bottom: 14px; }
.dx2-c { margin: 0; padding: 16px 18px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.dx2-s4 { grid-column: span 4; } .dx2-s5 { grid-column: span 5; } .dx2-s7 { grid-column: span 7; } .dx2-s6 { grid-column: span 6; } .dx2-s8 { grid-column: span 8; }
.dx2-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dx2-h h2 { margin: 0; font-size: 15px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.dx2-h a { font-size: 12.5px; font-weight: 600; color: var(--link, var(--brand)); }
.dx2-c .empty { padding: 8px 0; }
.dx2-c .empty__title { font-size: 14px; } .dx2-c .empty__text { margin: 2px 0 0; font-size: 12.5px; }
.dx2-c .row-link { padding-block: 8px; }
.dx2-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dx2-big b { font-size: 28px; font-weight: 700; line-height: 1.1; }
.dx2-big small { color: var(--ink-3); }
.dx2-mrr { display: flex; flex-direction: column; gap: 8px; }
.dx2-mrr > div { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; }
.dx2-mrr span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx2-new { background: #10231D; color: #EAF2EC; border-color: transparent; }
.dx2-new h2, .dx2-new b { color: #fff; } .dx2-new .dash-new__row span, .dx2-new .small { color: #9FB5AB; } .dx2-new a { color: #C6F24A; }
.dx2 .dx-act__row { padding: 10px 12px; }

@media (max-width: 1200px) { .dx2-s4 { grid-column: span 6; } .dx2-s5, .dx2-s7 { grid-column: span 12; } .dx2-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .dx2-s4, .dx2-s5, .dx2-s6, .dx2-s7, .dx2-s8 { grid-column: span 12; } .dx2-kpi__v { font-size: 24px; } }
@media (max-width: 420px) { .dx2-kpis { grid-template-columns: 1fr; } }

/* ---------- القايمة الجانبية: لمسات ---------- */
.nav__item { border-radius: 10px; }
.nav__item.is-active { font-weight: 700; }

/* ---------- الصفحة الرئيسية ---------- */
.land-hero { position: relative; overflow: hidden; }
.land-hero::before { content: ""; position: absolute; inset-inline-start: -140px; bottom: -180px; width: 540px; height: 540px; border-radius: 50%; background: radial-gradient(circle, rgba(198,242,74,.16), transparent 68%); pointer-events: none; }
.land-hero__in { position: relative; z-index: 1; }
.land-hero__card { display: flex; flex-direction: column; gap: 12px; }
.lp-dash { background: var(--surface, #fff); color: #10231D; border-radius: 18px; padding: 14px; box-shadow: 0 30px 60px rgba(0,0,0,.35); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.lp-dash__k { grid-column: span 3; background: #F4F1EA; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.lp-dash__k small { color: #4B5A54; font-size: 12px; }
.lp-dash__k b { font-size: 21px; line-height: 1.15; }
.lp-dash__k em { font-style: normal; font-size: 12px; font-weight: 700; color: #1E8E5A; }
.lp-dash__c { grid-column: span 4; background: #F4F1EA; border-radius: 12px; padding: 10px 12px; }
.lp-dash__c small { color: #4B5A54; font-size: 12px; display: block; margin-bottom: 4px; }
.lp-dash__bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; }
.lp-dash__bars i { flex: 1; border-radius: 5px 5px 2px 2px; background: #0F5C4A; }
.lp-dash__bars i:nth-child(odd) { background: #E8836B; }
.lp-dash__s { grid-column: span 2; background: #F4F1EA; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.lp-dash__s small { color: #4B5A54; font-size: 12px; }
.lp-dash__st { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; }
.lp-dash__st i { display: block; height: 100%; }
.lp-float { display: flex; gap: 10px; align-items: center; align-self: flex-start; background: var(--surface, #fff); color: #10231D; border-radius: 14px; padding: 10px 14px; box-shadow: 0 14px 30px rgba(0,0,0,.28); font-size: 13px; }
.lp-float b { display: block; }
.lp-float span { color: #4B5A54; }
.land-card, .land-mod { border-radius: 16px; }
.land-sec { padding-block: 56px; }
.land-h { text-wrap: balance; }
@media (max-width: 640px) { .lp-dash__k { grid-column: span 6; } .lp-dash__c { grid-column: span 6; } .lp-dash__s { grid-column: span 6; } .lp-float { display: none; } }

/* ---------- داكن ---------- */
html[data-theme="dark"] .dx2-kpi:hover { box-shadow: 0 8px 22px rgba(0,0,0,.4); }
html[data-theme="dark"] .dx2-d--good { background: #163326; color: #4FD39A; }
html[data-theme="dark"] .dx2-d--bad { background: #3C1C15; color: #F2866C; }
html[data-theme="dark"] .dx2-kpi--bad { border-color: #5a2a20; } html[data-theme="dark"] .dx2-kpi--warn { border-color: #5a4720; }
html[data-theme="dark"] .dx2-new { background: #12201B; }
