/* لوحة التحكم — رأس متجاوب ومقاييس مريحة للجوال */
body.mj-admin-v2{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}
body.mj-admin-v2>header{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  flex-wrap:wrap!important;
  gap:12px 20px!important;
  padding:14px clamp(14px,3vw,28px)!important;
  box-sizing:border-box!important;
}
body.mj-admin-v2>header>h1{
  margin:0!important;
  color:#fff!important;
  font-size:clamp(18px,2vw,24px)!important;
  line-height:1.45!important;
}
body.mj-admin-v2>header .hdr-r{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex:1 1 620px!important;
  gap:6px!important;
  min-width:0!important;
  max-width:100%!important;
  flex-wrap:wrap!important;
  overflow:visible!important;
}
body.mj-admin-v2>header .hdr-r>a,
body.mj-admin-v2>header .hdr-r>.who,
body.mj-admin-v2>header .hdr-r>form{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  flex:0 0 auto!important;
  min-height:36px!important;
  max-width:100%!important;
  padding:7px 9px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.1)!important;
  color:#fff!important;
  font-size:12px!important;
  line-height:1.35!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}
body.mj-admin-v2>header .hdr-r>form{padding:0!important;border:0!important;background:transparent!important}
body.mj-admin-v2>header .hdr-r>form button{min-height:36px!important;padding:7px 11px!important}
body.mj-admin-v2>header .hdr-r>a svg.mj-ei,
body.mj-admin-v2>header .hdr-r svg.mj-ei{
  display:block!important;
  flex:0 0 20px!important;
  width:20px!important;
  height:20px!important;
  max-width:20px!important;
  max-height:20px!important;
  margin:0!important;
  vertical-align:middle!important;
}
body.mj-admin-v2>main{
  width:min(1150px,calc(100% - 24px))!important;
  min-width:0!important;
  margin-inline:auto!important;
}
body.mj-admin-v2 .stats{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr))!important;
  gap:10px!important;
  min-width:0!important;
}
body.mj-admin-v2 .stat{
  min-width:0!important;
  min-height:104px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  padding:16px 12px!important;
}
body.mj-admin-v2 .stat>b{
  max-width:100%!important;
  color:#155066!important;
  font-size:clamp(24px,3vw,32px)!important;
  line-height:1.2!important;
  overflow-wrap:anywhere!important;
}
body.mj-admin-v2 .stat>small{
  max-width:100%!important;
  color:#5e6b66!important;
  font-size:12px!important;
  line-height:1.55!important;
  overflow-wrap:anywhere!important;
}
body.mj-admin-v2 .stat.live>b{display:flex!important;align-items:center!important;gap:8px!important}
body.mj-admin-v2 .stat.live>b i{width:10px!important;height:10px!important;flex:0 0 10px!important}
@media(max-width:760px){
  body.mj-admin-v2>header{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:9px!important;
    padding:13px 14px!important;
  }
  body.mj-admin-v2>header>h1{font-size:19px!important}
  body.mj-admin-v2>header .hdr-r{
    width:100%!important;
    flex:0 1 auto!important;
    flex-wrap:nowrap!important;
    justify-content:flex-start!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    padding:0 0 4px!important;
    scrollbar-width:none!important;
    overscroll-behavior-inline:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body.mj-admin-v2>header .hdr-r::-webkit-scrollbar{display:none!important}
  body.mj-admin-v2>header .hdr-r>a,
  body.mj-admin-v2>header .hdr-r>.who,
  body.mj-admin-v2>header .hdr-r>form{flex:0 0 auto!important}
  body.mj-admin-v2>main{width:calc(100% - 20px)!important;padding:12px 0 60px!important}
  body.mj-admin-v2 .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  body.mj-admin-v2 .stat{min-height:100px!important;padding:14px 9px!important}
  body.mj-admin-v2 .stat>b{font-size:clamp(22px,6vw,28px)!important}
  body.mj-admin-v2 .stat>small{font-size:11.5px!important}
  body.mj-admin-v2 .panel{max-width:100%!important;min-width:0!important;padding:14px!important}
  body.mj-admin-v2 .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.mj-admin-v2 input,
  body.mj-admin-v2 select,
  body.mj-admin-v2 textarea{max-width:100%!important;min-width:0}
}
@media(max-width:380px){
  body.mj-admin-v2>header .hdr-r>a,
  body.mj-admin-v2>header .hdr-r>.who,
  body.mj-admin-v2>header .hdr-r>form{font-size:11px!important;padding-inline:8px!important}
  body.mj-admin-v2 .stats{grid-template-columns:1fr!important}
  body.mj-admin-v2 .kpis{grid-template-columns:1fr!important}
}
@media(prefers-reduced-motion:reduce){body.mj-admin-v2 *{scroll-behavior:auto!important}}

/* Prevent phone form focus zoom and retain visible keyboard navigation. */
@media(max-width:760px){
 body.mj-admin-v2 :is(input,select,textarea){font-size:16px!important;box-sizing:border-box}
 body.mj-admin-v2 .panel{box-sizing:border-box}
}
body.mj-admin-v2 :is(a,button,input,select,textarea):focus-visible{outline:3px solid #159b87;outline-offset:3px}
