/* ==========================================================================
   1000 عشبة — لوحة التحكم
   ========================================================================== */
.db{
  --rv-esp:#072a1b; --rv-ink:#0b462c; --rv-brown:#156743; --rv-gold:#b8925a; --rv-gold-2:#d9bd8c;
  --db-line:#ece4d8; --db-card:#fff; --db-soft:#faf6f0;
  display:flex; flex-direction:column; gap:16px; padding-top:6px;
}

/* ---------- البانر (مضغوط) ---------- */
.db-banner{
  position:relative; overflow:hidden; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:20px;
  min-height:92px; padding:12px 22px; border-radius:20px; color:#fff;
  background:
    radial-gradient(380px 160px at 50% -30%,rgba(217,189,140,.22),transparent 70%),
    linear-gradient(120deg,#093623 0%,var(--rv-esp) 55%,#041b11 100%);
  box-shadow:0 16px 34px -24px rgba(7,42,27,.8);
}
.db-banner::before{content:''; position:absolute; inset:0; pointer-events:none; opacity:.5;
  background:repeating-linear-gradient(90deg,transparent 0 40px,rgba(217,189,140,.035) 40px 41px)}
.db-banner::after{content:''; position:absolute; inset:6px; border:1px solid rgba(217,189,140,.13); border-radius:15px; pointer-events:none}
.db-banner > *{position:relative; z-index:1}
.db-b-logo{height:52px; width:auto; display:block; filter:drop-shadow(0 6px 14px rgba(0,0,0,.35))}
.db-b-ic{display:none}
.db-b-mid{text-align:center; min-width:0}
.db-b-mid h1{margin:0; font-family:'Readex Pro',var(--font); font-weight:600; font-size:23px; line-height:1.3; color:#fff; display:inline-flex; align-items:center; gap:12px}
.db-b-mid h1 i{font-style:normal; color:var(--rv-gold); font-size:17px}
.db-b-mid h1::before,.db-b-mid h1::after{content:''; width:clamp(20px,8vw,120px); height:1px; background:linear-gradient(90deg,transparent,rgba(217,189,140,.55))}
.db-b-mid h1::after{transform:scaleX(-1)}
.db-b-mid p{margin:2px 0 0; font-size:12px; color:rgba(247,241,232,.6)}
.db-b-act{display:flex; gap:8px; align-items:center}
.db-btn{display:inline-flex; align-items:center; gap:7px; height:38px; padding:0 13px; border-radius:11px; cursor:pointer; font:600 13px/1 var(--font);
  color:#f7f1e8; background:rgba(255,255,255,.06); border:1px solid rgba(217,189,140,.28); text-decoration:none; transition:background .15s,border-color .15s}
.db-btn:hover{background:rgba(255,255,255,.12); border-color:rgba(217,189,140,.5); color:#fff}
.db-btn svg.i{width:17px; height:17px}
.db-btn.gold{background:linear-gradient(180deg,#d2b07a,#a8814a); border-color:transparent; color:#072a1b; box-shadow:0 8px 18px -10px rgba(184,146,90,.9)}
.db-btn.gold:hover{filter:brightness(1.07); color:#072a1b}
.db-new{position:relative}
.db-menu{position:absolute; top:calc(100% + 8px); left:0; z-index:30; min-width:210px; padding:6px; border-radius:14px; background:#fff; border:1px solid var(--db-line);
  box-shadow:0 22px 50px -18px rgba(7,42,27,.45)}
.db-menu[hidden]{display:none}
.db-menu a{display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; color:var(--rv-ink); font-size:13.5px; font-weight:600}
.db-menu a:hover{background:#f6efe4}
.db-menu a svg.i{color:var(--rv-gold); width:17px; height:17px}

/* ---------- الفلتر ---------- */
.db-filter{display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:12px 14px; background:var(--db-card); border:1px solid var(--db-line); border-radius:18px}
.db-f-lbl{display:inline-flex; align-items:center; gap:8px; font-size:14px; color:var(--rv-ink)}
.db-f-lbl svg.i{width:34px; height:34px; padding:8px; border-radius:10px; background:var(--rv-ink); color:var(--rv-gold-2)}
.db-seg{display:flex; gap:4px; padding:4px; border-radius:13px; background:#f5efe6; overflow-x:auto; scrollbar-width:none}
.db-seg::-webkit-scrollbar{display:none}
.db-seg button{flex:none; height:34px; padding:0 14px; border:0; border-radius:10px; background:transparent; color:var(--text-2); font:600 13px var(--font); cursor:pointer; white-space:nowrap; transition:.15s}
.db-seg button:hover{color:var(--rv-ink); background:rgba(255,255,255,.7)}
.db-seg button.on{background:var(--rv-ink); color:#fff; box-shadow:0 6px 14px -8px rgba(7,42,27,.8)}
.db-dates{display:flex; align-items:center; gap:8px; margin-inline-start:auto}
.db-dates label{display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-3)}
.db-dates .inp{height:38px; width:150px; border-radius:10px; border:1px solid var(--db-line); background:var(--db-soft); font-size:13px}
.db-dates .inp:focus{border-color:var(--rv-gold)!important; box-shadow:0 0 0 3px rgba(184,146,90,.15)}
.db-dsep{color:var(--text-3)}

/* ---------- المؤشرات ---------- */
.db-kpis{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px}
.db-kpi{
  --tc:#156743; --tt:#f3ebe2; --tg:rgba(21,103,67,.10);
  position:relative; overflow:hidden; isolation:isolate; display:flex; flex-direction:column; gap:14px;
  padding:18px 20px 16px; border-radius:20px; min-height:158px;
  background:#fff; border:1px solid var(--db-line); color:var(--text); text-decoration:none!important;
  box-shadow:0 1px 2px rgba(7,42,27,.04);
  transition:transform .18s,box-shadow .22s,border-color .22s;
}
.db-kpi::before{ /* هالة لون خفيفة في الركن */
  content:''; position:absolute; z-index:-1; width:220px; height:220px; top:-120px; left:-90px; border-radius:50%;
  background:radial-gradient(circle,var(--tg),transparent 70%);
}
.db-kpi::after{ /* خط علوي رفيع بلون الكارت */
  content:''; position:absolute; top:0; right:20px; left:20px; height:3px; border-radius:0 0 4px 4px;
  background:linear-gradient(90deg,transparent,var(--tc) 30%,var(--tc) 70%,transparent); opacity:.85;
}
.db-kpi[href]:hover{transform:translateY(-3px); border-color:#dccdb8; box-shadow:0 22px 40px -28px rgba(7,42,27,.6)}
.db-kpi.t-green{--tc:#27855c; --tt:#e7f3ed; --tg:rgba(39,133,92,.13)}
.db-kpi.t-gold{--tc:#a8814a; --tt:#f7efe1; --tg:rgba(184,146,90,.16)}
.db-kpi.t-red{--tc:#c0473a; --tt:#fcebe8; --tg:rgba(192,71,58,.11)}
.db-kpi.t-blue{--tc:#489d92; --tt:#ebf7f6; --tg:rgba(72,157,146,.12)}
.db-kpi.t-teal{--tc:#1f8a8a; --tt:#e4f4f3; --tg:rgba(31,138,138,.12)}
.dk-top{display:flex; align-items:center; gap:12px}
.dk-lbl{flex:1; min-width:0; font-size:13.5px; font-weight:600; color:var(--text-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.dk-ico{width:42px; height:42px; flex:none; border-radius:13px; display:grid; place-items:center; background:var(--tt); color:var(--tc);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.6)}
.dk-ico svg.i{width:20px; height:20px; stroke-width:1.9}
.dk-mid{display:flex; align-items:flex-end; justify-content:space-between; gap:12px; min-width:0}
.dk-val{font-family:'Readex Pro',var(--font); font-size:30px; font-weight:600; letter-spacing:-.6px; color:var(--rv-ink); line-height:1; white-space:nowrap; min-width:0; overflow:hidden; text-overflow:ellipsis}
.dk-val small{font-size:13px; font-weight:500; color:var(--text-3); margin-inline-start:6px; letter-spacing:0}
.dk-spark{width:120px; height:40px; flex:none; overflow:visible}
.dk-spark polyline{fill:none; stroke:var(--tc); stroke-width:2; stroke-linejoin:round; stroke-linecap:round; vector-effect:non-scaling-stroke}
.dk-spark polygon{fill:var(--tc); opacity:.10}
.dk-spark.flat line{stroke:var(--tc); stroke-width:2; stroke-dasharray:4 5; opacity:.35; vector-effect:non-scaling-stroke}
.dk-split{display:flex; gap:3px; width:120px; height:8px; flex:none; margin-bottom:6px}
.dk-split i{display:block; height:100%; border-radius:4px; min-width:6px}
.dk-split i.none{flex:1; background:repeating-linear-gradient(90deg,#ece4d8 0 6px,transparent 6px 10px)}
.dk-sub{margin-top:auto; padding-top:12px; border-top:1px dashed #ece4d8; font-size:12px; color:var(--text-3); line-height:1.5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.dk-sub .num{color:var(--text-2); font-weight:600}
.dk-k{display:inline-block; width:8px; height:8px; border-radius:2px; background:var(--k); margin-inline-end:5px; vertical-align:middle}
.dk-k + .num{margin-inline-end:8px}

/* الكارت الأساسي (المبيعات) غامق ببراند Rovy */
.db-kpi.t-esp{background:linear-gradient(150deg,#0b452c 0%,#072a1b 60%,#051f14 100%); border-color:#083220; color:#fff;
  box-shadow:0 20px 40px -26px rgba(7,42,27,.9)}
.db-kpi.t-esp{--tc:#d9bd8c; --tt:rgba(217,189,140,.14); --tg:rgba(217,189,140,.22)}
.db-kpi.t-esp .dk-lbl{color:rgba(247,241,232,.75)}
.db-kpi.t-esp .dk-ico{color:#d9bd8c; box-shadow:inset 0 0 0 1px rgba(217,189,140,.25)}
.db-kpi.t-esp .dk-val{color:#fff}
.db-kpi.t-esp .dk-val small{color:rgba(247,241,232,.55)}
.db-kpi.t-esp .dk-sub{color:rgba(247,241,232,.55); border-top-color:rgba(217,189,140,.2)}
.dk-sub .dk-pend{display:block; margin-top:3px; white-space:normal; color:#d99a2b; font-size:11.5px; line-height:1.45}
.db-kpi.t-esp .dk-sub .dk-pend{color:#f0c06a}
.dk-sub .dk-pend .num{color:inherit}
.db-kpi.t-esp .dk-sub .num{color:#f7f1e8}
.db-kpi.t-esp[href]:hover{border-color:#115437}

/* ---------- الكروت ---------- */
.db-grid{display:grid; gap:14px}
.db-grid.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
.db-grid.g-tbl{grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr)}
.db-grid.g-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.db-span2{grid-column:span 2}
.db-card{background:var(--db-card); border:1px solid var(--db-line); border-radius:20px; box-shadow:0 1px 2px rgba(7,42,27,.04); display:flex; flex-direction:column; min-width:0}
.db-ch{display:flex; align-items:center; gap:12px; padding:16px 18px 12px; margin:0 0 4px; border-bottom:1px solid #f3ede4}
.db-ch > div{min-width:0}
.db-ch h3{margin:0; font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:700; color:var(--rv-ink); font-family:'Readex Pro',var(--font); display:flex; align-items:center; gap:8px}
.db-ch small{display:block; font-size:11.5px; color:var(--text-3); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.db-ci{width:36px; height:36px; flex:none; border-radius:11px; display:grid; place-items:center; background:linear-gradient(145deg,#f7efe3,#efe3d1); color:var(--rv-brown)}
.db-ci svg.i{width:17px; height:17px}
.db-cr{margin-inline-start:auto}
.db-more{border:0; background:#f6efe4; color:var(--rv-brown); font:600 12px var(--font); padding:6px 10px; border-radius:8px; cursor:pointer}
.db-more:hover{background:#efe3d1}
.db-cb{padding:10px 18px 18px; flex:1; display:flex; flex-direction:column; min-width:0}
.db-badge{font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px; background:#fbe9e6; color:#c0473a}

/* الدايرة */
.dbd{display:flex; flex-direction:column; align-items:center; gap:14px; flex:1; justify-content:center}
.dbd-svg{position:relative; line-height:0}
.dbd-pct{font:700 11px var(--font); fill:#fff; paint-order:stroke; stroke:rgba(0,0,0,.18); stroke-width:2px}
.dbd-c{position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; line-height:1.3; padding:0 52px}
.dbd-c b{font-family:'Readex Pro',var(--font); font-size:17px; color:var(--rv-ink)}
.dbd-c small{font-size:11px; color:var(--text-3)}
.dbd-leg{display:flex; flex-wrap:wrap; justify-content:center; gap:6px 14px; font-size:12px; color:var(--text-2)}
.dbd-leg span,.db-legend span{display:inline-flex; align-items:center; gap:6px}
.dbd-leg i,.db-legend i{width:10px; height:10px; border-radius:3px; flex:none}

/* الأعمدة */
.dbb{position:relative}
.dbb svg{display:block; overflow:visible}
.dbb .g{stroke:#efe8de; stroke-dasharray:3 4} .dbb .g0{stroke:#e2d8ca}
.dbb .ax{font:11px var(--font); fill:#9a8a78}
.dbb rect{transition:opacity .15s} .dbb svg:hover rect{opacity:.75} .dbb svg rect:hover{opacity:1}
.dbb-empty{position:absolute; inset:0 46px 26px 0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; color:var(--text-3); font-size:12.5px; pointer-events:none}
.dbb-empty svg.i{width:26px; height:26px; color:#d6c8b4}
.db-legend{display:flex; justify-content:center; gap:16px; margin-top:8px; font-size:12px; color:var(--text-2)}

/* أعمدة أفقية */
.dbh{display:flex; flex-direction:column; gap:12px}
.dbh-r{display:grid; grid-template-columns:minmax(70px,34%) 1fr auto; align-items:center; gap:10px; font-size:12.5px}
.dbh-l{color:var(--text-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.dbh-t{height:10px; border-radius:6px; background:#f3ece2; overflow:hidden}
.dbh-t i{display:block; height:100%; border-radius:6px}
.dbh-r b{font-size:12.5px; color:var(--rv-ink)}

/* حالة فاضية */
.db-empty{flex:1; min-height:170px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; color:var(--text-3); font-size:13px; text-align:center}
.db-empty svg.i{width:34px; height:34px; padding:7px; border-radius:12px; background:#f6efe4; color:#b8a387}
.db-empty.tall{min-height:220px}

/* حركات المخزون */
.db-moves{display:flex; flex-direction:column}
.db-mv{display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px dashed var(--db-line)}
.db-mv:last-child{border-bottom:0}
.db-mv-i{width:32px; height:32px; flex:none; border-radius:10px; display:grid; place-items:center}
.db-mv-i svg.i{width:15px; height:15px}
.db-mv-i.in{background:#e6f2ec; color:#27855c} .db-mv-i.out{background:#fbe9e6; color:#c0473a}
.db-mv-t{flex:1; min-width:0}
.db-mv-t b{display:block; font-size:13px; color:var(--rv-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.db-mv-t small{font-size:11px; color:var(--text-3)}
.db-mv-v{text-align:end}
.db-mv-v b{display:block; font-size:13px} .db-mv-v b.in{color:#27855c} .db-mv-v b.out{color:#c0473a}
.db-mv-v small{font-size:11px; color:var(--text-3)}

/* الجدول */
.db-tw{overflow-x:auto; margin:0 -18px; padding:0 18px}
.db-t{width:100%; border-collapse:separate; border-spacing:0; font-size:13px; min-width:620px}
.db-t th{background:#f7f1e8; color:var(--text-2); font-weight:600; font-size:12px; text-align:start; padding:10px 12px; white-space:nowrap}
.db-t th:first-child{border-radius:0 10px 10px 0} .db-t th:last-child{border-radius:10px 0 0 10px}
.db-t td{padding:12px; border-bottom:1px solid #f1ebe2; white-space:nowrap; color:var(--text)}
.db-t td.b{font-weight:700; color:var(--rv-ink)}
.db-t tfoot td{border-bottom:0; font-weight:700; color:var(--rv-ink); background:#fcf9f4}
.db-dot{display:inline-block; width:9px; height:9px; border-radius:3px; margin-inline-end:8px; vertical-align:middle}

/* الخزن */
.db-acc{display:flex; flex-direction:column; gap:8px}
.db-ac{display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:13px; background:var(--db-soft); border:1px solid #f1e9dd}
.db-ac > div{flex:1; min-width:0}
.db-ac b{font-size:13px; color:var(--rv-ink)} .db-ac b.neg{color:#c0473a}
.db-ac small{display:block; font-size:11px; color:var(--text-3)}
.db-ac-i{width:34px; height:34px; flex:none; border-radius:10px; display:grid; place-items:center; background:#e3f3f2; color:#1f8a8a}
.db-ac-i svg.i{width:17px; height:17px}
.db-ac.tot{background:var(--rv-ink); border-color:var(--rv-ink); justify-content:space-between; margin-top:4px}
.db-ac.tot span{color:var(--rv-gold-2); font-size:12.5px; font-weight:600} .db-ac.tot b{color:#fff; font-size:15px}

/* المؤشرات الصغيرة */
.db-rings{display:flex; justify-content:space-around; gap:10px; margin-bottom:14px}
.db-mini{display:grid; grid-template-columns:1fr 1fr; gap:8px}
.db-mini div{padding:10px 12px; border-radius:12px; background:var(--db-soft); border:1px solid #f1e9dd}
.db-mini span{display:block; font-size:11.5px; color:var(--text-3)}
.db-mini b{font-size:14px; color:var(--rv-ink)}
.db-alerts{max-height:330px; overflow:auto}

/* ---------- مقاسات الشاشة ---------- */
@media (min-width:1880px){ .db-kpis{grid-template-columns:repeat(6,minmax(0,1fr))} .dk-spark,.dk-split{width:84px} .dk-val{font-size:26px} }
@media (max-width:1680px){ .db-grid.g4{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:1440px){
  .db-grid.g-tbl{grid-template-columns:repeat(2,minmax(0,1fr))}
  .db-grid.g-tbl .db-span2{grid-column:1 / -1; order:-1}
}
@media (max-width:1100px){
  .db-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .db-b-mid h1::before,.db-b-mid h1::after{width:24px}
  .db-grid.g-3{grid-template-columns:1fr}
  .db-grid.g-3 .db-span2{grid-column:auto}
}
@media (max-width:760px){
  .db{gap:12px}
  .db-banner{grid-template-columns:auto 1fr auto; gap:12px; min-height:0; padding:12px 12px 12px 10px; border-radius:18px; text-align:start}
  .db-banner::after{inset:5px; border-radius:13px}
  .db-b-logo{display:none}
  .db-b-ic{display:grid; place-items:center; width:44px; height:44px; border-radius:13px; background:rgba(217,189,140,.14); color:var(--rv-gold-2); border:1px solid rgba(217,189,140,.22)}
  .db-b-ic svg.i{width:21px; height:21px}
  .db-b-mid{text-align:start}
  .db-b-mid h1{font-size:18px; gap:6px}
  .db-b-mid h1 i,.db-b-mid h1::before,.db-b-mid h1::after{display:none}
  .db-b-mid p{font-size:11.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
  .db-b-act{gap:6px}
  .db-new{display:none}
  .db-btn{width:40px; height:40px; padding:0; justify-content:center; border-radius:12px}
  .db-btn span{display:none}
  .db-filter{padding:10px; gap:10px; border-radius:16px}
  .db-f-lbl{display:none}
  .db-seg{width:100%}
  .db-seg button{flex:1 0 auto; padding:0 12px}
  .db-dates{width:100%; margin:0}
  .db-dates label{flex:1}
  .db-dates label span{display:none}
  .db-dates .inp{width:100%}
  .db-kpis{grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px}
  .db-kpi{padding:14px 14px 12px; border-radius:18px; gap:10px; min-height:0}
  .db-kpi::after{right:14px; left:14px}
  .db-kpi.t-esp{grid-column:1 / -1; padding:16px 16px 14px}
  .db-kpi.t-esp .dk-val{font-size:28px}
  .db-kpi.t-esp .dk-spark{display:block; width:110px}
  .dk-top{gap:8px}
  .dk-ico{width:34px; height:34px; border-radius:10px; order:-1} .dk-ico svg.i{width:17px; height:17px}
  .dk-lbl{font-size:12.5px}
  .dk-val{font-size:21px; letter-spacing:-.3px}
  .dk-val small{font-size:11px; margin-inline-start:4px}
  .dk-spark,.dk-split{display:none}
  .db-kpi:last-child{grid-column:1 / -1}
  .db-kpi:last-child .dk-split{display:flex; width:96px}
  .dk-sub{padding-top:9px; font-size:11px}
  .db-grid.g4,.db-grid.g-tbl{grid-template-columns:1fr}
  .db-grid.g-tbl .db-span2{grid-column:auto; order:0}
  .db-card{border-radius:18px}
  .db-ch{padding:14px 14px 4px} .db-cb{padding:8px 14px 14px}
  .db-tw{margin:0 -14px; padding:0 14px}
}
@media (max-width:380px){ .dk-val{font-size:18px} .db-seg button{padding:0 10px; font-size:12.5px} }

/* ---------- الطباعة ---------- */
@media print{
  .db-b-act,.db-filter .db-seg,.db-more{display:none!important}
  .db-banner{-webkit-print-color-adjust:exact; print-color-adjust:exact}
  .db-kpi,.db-card{break-inside:avoid}
}

/* مؤشر «مباشر» — التحديثات بتوصل لحظياً */
.db-b-mid p{display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap}
.db-live{display:inline-flex; align-items:center; gap:6px; height:20px; padding:0 8px; border-radius:999px; font-size:10.5px; font-weight:700;
  color:#bfe8d3; background:rgba(41,164,111,.16); border:1px solid rgba(41,164,111,.35)}
.db-live i{width:6px; height:6px; border-radius:50%; background:#3ecf8e; box-shadow:0 0 0 0 rgba(62,207,142,.6); animation:dbPulse 1.8s infinite}
.db-live.off{color:#e8d6bf; background:rgba(217,189,140,.12); border-color:rgba(217,189,140,.3)}
.db-live.off i{background:#d9bd8c; animation:none}
@keyframes dbPulse{0%{box-shadow:0 0 0 0 rgba(62,207,142,.6)}70%{box-shadow:0 0 0 6px rgba(62,207,142,0)}100%{box-shadow:0 0 0 0 rgba(62,207,142,0)}}
@media (max-width:760px){ .db-b-mid p{justify-content:flex-start; gap:6px} .db-live{height:18px; font-size:10px; padding:0 6px} }
html[data-live="off"] .tb-on{background:#c9b79c}
@media (prefers-reduced-motion:reduce){ .db-live i{animation:none} }

/* ===== كروت المؤشرات: أصغر وأنضف ===== */
.db-kpis{gap:12px}
.db-kpi{gap:10px; padding:14px 16px 12px; border-radius:18px; min-height:0}
.db-kpi::before{width:170px; height:170px; top:-100px; left:-80px}
.dk-lbl{font-size:12.5px}
.dk-ico{width:34px; height:34px; border-radius:11px} .dk-ico svg.i{width:17px; height:17px}
.dk-val{font-size:24px; letter-spacing:-.4px}
.dk-val small{font-size:11.5px; margin-inline-start:4px}
.dk-spark{width:96px; height:30px}
.dk-split{width:96px; height:7px; margin-bottom:4px}
.dk-sub{padding-top:9px; font-size:11.5px}
@media (min-width:1600px){ .db-kpis{grid-template-columns:repeat(6,minmax(0,1fr))} .dk-spark,.dk-split{width:72px} .dk-val{font-size:21px} }
@media (max-width:1100px){ .dk-val{font-size:22px} }
@media (max-width:760px){ .dk-val{font-size:20px} .dk-spark,.dk-split{width:72px} }

/* ===== بطاقة التفاصيل على الرسومات ===== */
.dbt{position:fixed; z-index:100200; pointer-events:none; min-width:150px; max-width:260px; padding:10px 12px; border-radius:14px; background:#082317; color:#f7f1e8;
  box-shadow:0 18px 40px -16px rgba(0,0,0,.55),0 0 0 1px rgba(217,189,140,.18); opacity:0; transform:translateY(4px); transition:opacity .12s, transform .12s; font-family:var(--font)}
.dbt.on{opacity:1; transform:none}
.dbt-h{display:flex; align-items:center; gap:7px; font-size:12px; color:#cdb48f; margin-bottom:4px} .dbt-h i{width:10px; height:10px; border-radius:3px; flex:none}
.dbt-h span{white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.dbt-v{font:700 19px 'Readex Pro',var(--font); color:#fff; line-height:1.25}
.dbt-s{margin-top:3px; font-size:11.5px; color:#cdb48f}
.dbt-r{display:flex; align-items:center; gap:7px; padding:3px 0; font-size:12.5px} .dbt-r i{width:9px; height:9px; border-radius:3px; flex:none} .dbt-r span{flex:1; color:#e6d8c3} .dbt-r b{font:700 13.5px 'Readex Pro',var(--font); color:#fff}
.dbt-r + .dbt-r{border-top:1px dashed rgba(217,189,140,.18)}
/* الدايرة */
.dbd-s{cursor:pointer; transition:opacity .15s, stroke-width .15s}
.dbd.hov .dbd-s:not(.on){opacity:.3}
.dbd.hov .dbd-pct{opacity:.35}
.dbd-c b{transition:color .15s}
.dbd-leg span{cursor:pointer; padding:3px 8px; border-radius:999px; transition:background .15s, opacity .15s}
.dbd-leg em{font-style:normal; font-size:11px; color:var(--text-3); margin-inline-start:2px}
.dbd-leg span.on{background:#f3ebdf}
.dbd.hov .dbd-leg span:not(.on){opacity:.45}
/* الأعمدة */
.dbb-col{fill:transparent; transition:fill .12s} .dbb-col.on{fill:rgba(184,146,90,.10)}
.dbb-hit{cursor:pointer}
.dbb-b{transition:opacity .12s} svg.hov .dbb-b:not(.on){opacity:.35}
/* الأعمدة الأفقية */
.dbh-r{cursor:pointer; border-radius:10px; transition:background .12s} .dbh-r.on{background:#faf6f0}
/* الخط (core chart.line) بنفس الشكل */
.db .chart .tip{background:#082317; border-radius:12px; padding:9px 12px; box-shadow:0 18px 40px -16px rgba(0,0,0,.55),0 0 0 1px rgba(217,189,140,.18); font-size:12.5px}

/* ===== الكروت المضغوطة: أيقونة | الاسم والرقم | رسم صغير ===== */
.db-kpi.dk2{flex-direction:row; align-items:center; gap:12px; padding:12px 14px; border-radius:16px; min-height:0}
.db-kpi.dk2::after{right:14px; left:14px; height:2px}
.dk2 .dk-ico{width:40px; height:40px; border-radius:12px; align-self:flex-start}
.dk2 .dk-ico svg.i{width:18px; height:18px}
.dk-body{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px}
.dk2 .dk-lbl{font-size:12px; font-weight:600}
.dk2 .dk-val{font-size:21px; line-height:1.15}
.dk2 .dk-val small{font-size:11px}
.dk2 .dk-sub{margin:0; padding:0; border:0; font-size:11px; line-height:1.5}
.dk-ex{flex:none; align-self:flex-end; display:flex; align-items:flex-end}
.dk2 .dk-spark{width:74px; height:30px}
.dk2 .dk-split{width:64px; height:6px; margin:0 0 4px}
.db-kpi.dk2[href]:hover{transform:translateY(-2px)}
@media (min-width:1600px){ .dk2 .dk-val{font-size:19px} .dk2 .dk-spark{width:56px} .dk2 .dk-split{width:50px} }
@media (max-width:760px){ .dk2 .dk-val{font-size:19px} .dk2 .dk-spark{width:56px} .dk2 .dk-split{width:48px} .dk2 .dk-ico{width:34px; height:34px} }
/* الوقوف على الدايرة: النص اللي في النص مايغطيش الأجزاء */
.dbd-c{pointer-events:none}
/* ===== الوارد مقابل المنصرف ===== */
.dbp-sum{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-bottom:12px}
.dbp-sum > div{position:relative; padding:9px 12px 9px 12px; border-radius:12px; background:#faf6f0; border:1px solid #efe6d9; display:flex; flex-direction:column; line-height:1.35}
.dbp-sum > div::before{content:''; position:absolute; top:10px; bottom:10px; right:0; width:3px; border-radius:3px; background:var(--c,#8a7764)}
.dbp-sum small{font-size:11px; color:var(--text-3)} .dbp-sum b{font:700 15px 'Readex Pro',var(--font); color:var(--rv-ink,#0e4a30)}
.dbp-sum .up b{color:#27855c} .dbp-sum .down b{color:#c0473a} .dbp-sum .up::before{background:#27855c} .dbp-sum .down::before{background:#c0473a}
.dbp{display:flex; flex-direction:column; gap:4px; max-height:330px; overflow:auto; padding-inline-end:2px}
.dbp-r{padding:8px 10px; border-radius:12px; cursor:pointer; transition:background .12s}
.dbp-r:hover,.dbp-r.on{background:#faf6f0}
.dbp-n{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:5px}
.dbp-n b{font-size:13px; font-weight:600; color:#0b462c; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.dbp-n span{flex:none; font-size:11.5px; font-weight:700; padding:1px 8px; border-radius:999px} .dbp-n .up{background:#e7f3ed; color:#27855c} .dbp-n .down{background:#fcebe8; color:#c0473a}
.dbp-bars{display:flex; flex-direction:column; gap:4px}
.dbp-l{display:flex; align-items:center; gap:8px} .dbp-l i{display:block; height:7px; border-radius:4px; min-width:0; transition:width .3s}
.dbp-l em{flex:none; font-style:normal; font-size:11px; color:var(--text-3)}
/* ===== الموظفين النهارده ===== */
.hrd{margin-bottom:16px}
.hrd-t{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px}
.hrd-i{position:relative; overflow:hidden; display:flex; align-items:center; gap:10px; padding:11px 12px 14px; border-radius:14px; border:1px solid #efe6d9; background:#fff; text-decoration:none; color:inherit; transition:transform .15s, box-shadow .15s}
.hrd-i:hover{transform:translateY(-2px); box-shadow:0 14px 26px -20px rgba(7,42,27,.6)}
.hrd-ic{flex:none; width:34px; height:34px; border-radius:11px; display:grid; place-items:center} .hrd-ic svg.i{width:16px; height:16px}
.hrd-i > div{display:flex; flex-direction:column; line-height:1.25} .hrd-i b{font:700 20px 'Readex Pro',var(--font); color:#0e4a30} .hrd-i small{font-size:11.5px; color:var(--text-3)}
.hrd-i em{position:absolute; right:12px; left:12px; bottom:6px; height:3px; border-radius:3px; background:#f3ece2} .hrd-i em i{display:block; height:100%; border-radius:3px}
.hrd-i.k-ok .hrd-ic{background:#e7f3ed; color:#27855c} .hrd-i.k-ok em i{background:#27855c}
.hrd-i.k-bad .hrd-ic{background:#fcebe8; color:#c0473a} .hrd-i.k-bad em i{background:#c0473a}
.hrd-i.k-info .hrd-ic{background:#ebf7f6; color:#489d92} .hrd-i.k-info em i{background:#489d92}
.hrd-i.k-warn .hrd-ic{background:#fdf3e3; color:#b5651d} .hrd-i.k-warn em i{background:#d4a24c}
.hrd-p{margin-top:12px; padding:12px 14px; border-radius:14px; background:#fcf9f4; border:1px solid #efe6d9}
.hrd-ph{display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12.5px; color:#2a6e51} .hrd-ph span{display:flex; align-items:center; gap:6px; font-weight:600} .hrd-ph svg.i{width:15px; height:15px; color:#a8814a}
.hrd-ph b{font:700 16px 'Readex Pro',var(--font); color:#0e4a30} .hrd-ph b small{font-size:11px; color:var(--text-3)}
.hrd-pb{height:8px; border-radius:6px; background:#efe6d9; overflow:hidden; margin:9px 0 7px} .hrd-pb i{display:block; height:100%; border-radius:6px; background:linear-gradient(90deg,#b8925a,#9c7540)}
.hrd-pf{display:flex; justify-content:space-between; gap:8px; font-size:11.5px; color:var(--text-3)} .hrd-pf b{color:#0b462c}
@media (max-width:760px){ .hrd-t{grid-template-columns:repeat(2,minmax(0,1fr))} .dbp-sum{grid-template-columns:1fr 1fr 1fr} .dbp-sum b{font-size:13px} }
.dbd-pct{pointer-events:none}

/* ===== لوحة التحكم: أعمدة ودواير ===== */
.db-grid.g1{grid-template-columns:1fr}
/* أعمدة واقفة بالأسماء */
.dbc{display:flex; align-items:stretch; gap:8px; height:250px; padding-top:6px}
.dbc-c{flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; gap:6px; cursor:pointer; border-radius:12px; padding:4px 2px; transition:background .12s, opacity .12s}
.dbc-c em{font-style:normal; font-size:11px; font-weight:700; color:#28684c}
.dbc-b{flex:1; width:100%; max-width:44px; display:flex; align-items:flex-end; justify-content:center}
.dbc-b i{display:block; width:100%; border-radius:8px 8px 3px 3px; transition:height .4s cubic-bezier(.2,.8,.2,1), filter .12s}
.dbc-c span{width:100%; text-align:center; font-size:11.5px; line-height:1.35; color:var(--text-2); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:31px}
.dbc-c.on{background:#faf6f0} .dbc-c.on .dbc-b i{filter:brightness(1.08) saturate(1.1)}
.dbc.hov .dbc-c:not(.on){opacity:.45}
/* الخزن: عهد المناديب تحت الدايرة */
.db-rc{display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin-top:12px; padding:9px 12px; border-radius:12px; background:#f6f9f9; border:1px solid #dcebea; font-size:12px; color:#43625e; text-decoration:none}
.db-rc > span{display:flex; align-items:center; gap:5px; width:100%; font-weight:600} .db-rc svg.i{width:14px; height:14px}
.db-rc b{font-weight:600; color:#284642} .db-rc b i{font-style:normal; color:#1f8a8a; margin-inline-start:3px}
.db-rc.pend{background:#fdf6ec; border-color:#f0dcbc; color:#17734b} .db-rc.pend b{color:#156743}
/* الموظفين: دايرة + حلقة الرواتب */
.hrd-pay{display:flex; align-items:center; gap:12px; margin-top:12px; padding:10px 12px; border-radius:14px; background:#fcf9f4; border:1px solid #efe6d9}
.hrd-pay .kring{gap:0} .hrd-pay .rg-t{display:none}
.hrd-pt{flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.45}
.hrd-pt small{font-size:11.5px; color:var(--text-3)} .hrd-pt > b{font:700 16px 'Readex Pro',var(--font); color:#0e4a30} .hrd-pt > b i{font-style:normal; font-size:11px; color:var(--text-3)}
.hrd-pt span{font-size:11.5px; color:var(--text-3)} .hrd-pt span b{color:#0b462c}
@media (max-width:760px){ .dbc{height:220px; gap:4px} .dbc-c span{font-size:10.5px} }

/* تفصيل مبيعات الفترة: متسوّي / مستني التسوية / التحصيل / الإجمالي — كل الكلاسات بادئة dbs- عشان ماتتلخبطش مع باقي الصفحات */
.dbs-sp{background:var(--db-card); border:1px solid var(--db-line); border-radius:20px; padding:18px 20px 20px; margin:14px 0}
.dbs-h{display:flex; align-items:center; gap:10px; margin-bottom:14px; flex-wrap:wrap}
.dbs-h > div:nth-child(2){flex:1; min-width:200px}
.dbs-h b{display:block; font-size:15px}
.dbs-h small{color:var(--text-3); font-size:12px}
.dbs-lg{display:flex; gap:14px; font-size:12px; color:var(--text-2)}
.dbs-lg span{display:inline-flex; align-items:center; gap:6px}
.dbs-lg i{width:10px; height:10px; border-radius:3px; background:var(--k)}
.dbs-bar{display:flex; height:10px; border-radius:99px; overflow:hidden; background:var(--db-line); gap:3px; margin-bottom:16px}
.dbs-bar i{display:block; height:100%}
.dbs-b1{background:#3f9d6c} .dbs-b2{background:#d99a2b} .dbs-b0{flex:1}
.dbs-g{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px}
.dbs-c{display:flex; flex-direction:column; padding:14px 16px; border-radius:16px; border:1px solid var(--db-line); color:inherit; text-decoration:none; min-width:0; position:relative; overflow:hidden; transition:border-color .15s, box-shadow .15s}
.dbs-c::before{content:''; position:absolute; inset-inline-start:0; top:0; bottom:0; width:4px; background:var(--ka)}
a.dbs-c:hover{box-shadow:0 4px 14px rgba(7,42,27,.07)}
.dbs-k1{--ka:#3f9d6c; background:linear-gradient(180deg, rgba(63,157,108,.07), transparent 70%)}
.dbs-k2{--ka:#d99a2b; background:linear-gradient(180deg, rgba(217,154,43,.09), transparent 70%)}
.dbs-k3{--ka:#489d92; background:linear-gradient(180deg, rgba(72,157,146,.06), transparent 70%)}
.dbs-k4{--ka:#186644; background:linear-gradient(180deg, rgba(24,102,68,.06), transparent 70%)}
.dbs-ct{display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:var(--text-2)}
.dbs-ci{width:26px; height:26px; border-radius:8px; display:grid; place-items:center; background:color-mix(in srgb, var(--ka) 14%, transparent); color:var(--ka); flex:none}
.dbs-ci svg{width:15px; height:15px}
.dbs-cv{font-size:24px; font-weight:800; margin:10px 0 2px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.dbs-cv small{font-size:12px; font-weight:600; color:var(--text-3); margin-inline-start:4px}
.dbs-cs{font-size:12px; color:var(--text-3); min-height:18px}
.dbs-cf{display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; padding-top:10px; border-top:1px dashed var(--db-line)}
.dbs-cf div{display:flex; flex-direction:column; gap:2px; min-width:0}
.dbs-cf small{font-size:11.5px; color:var(--text-3)}
.dbs-cf b{font-size:14px; font-weight:700; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.dbs-cf b.dbs-vok{color:#259363} .dbs-cf b.dbs-vdue{color:#c0392b} .dbs-cf b.dbs-vwarn{color:#b7791f}
@media (max-width:1280px){ .dbs-g{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:520px){ .dbs-g{grid-template-columns:1fr} .dbs-cv{font-size:21px} .dbs-sp{padding:14px} }

/* v274: نافذة «كل الأصناف المباعة» */
.dbtp-q{width:100%; margin-bottom:10px}
.dbtp-l{display:flex; flex-direction:column; gap:2px; max-height:62vh; overflow:auto}
.dbtp-r{display:flex; align-items:center; gap:10px; padding:8px 6px; border-bottom:1px solid #f1e9dd}
.dbtp-r:last-child{border-bottom:0}
.dbtp-i{flex:0 0 26px; height:26px; border-radius:8px; background:#f6efe4; color:#156743; font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center}
.dbtp-n{flex:1; min-width:0}
.dbtp-n b{display:block; font-size:13.5px; color:var(--text); line-height:1.5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.dbtp-t{height:6px; border-radius:4px; background:#f3ece2; margin-top:4px; overflow:hidden}
.dbtp-t i{display:block; height:100%; border-radius:4px; background:#b8925a}
.dbtp-v{flex:0 0 auto; text-align:left; display:flex; flex-direction:column; align-items:flex-end}
.dbtp-v b{font-size:13.5px; color:var(--text)}
.dbtp-v small{font-size:11.5px; color:var(--text-2); line-height:1.5; white-space:nowrap}
