/* =========================================================
   AYAN EXECUTIVE DASHBOARD V5
   ========================================================= */

#ayanExecutiveDashboard{
  display:none;
  min-height:100vh;
  direction:rtl;
  color:#10213e;
  background:
    radial-gradient(circle at 100% 0%,rgba(64,149,255,.13),transparent 25%),
    linear-gradient(135deg,#f8fbff,#edf5ff 65%,#f9fbff);
}

#ayanExecutiveDashboard.active{
  display:block;
}

.exec-v5{
  min-height:100vh;
  position:relative;
  overflow:hidden;
}

/* ---------- TOPBAR ---------- */

.exec-v5-topbar{
  min-height:68px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:22px;
  padding:0 28px;
  color:#fff;
  background:
    linear-gradient(90deg,#071831,#0b2448 55%,#0b1934);
  box-shadow:0 8px 25px rgba(6,24,54,.18);
  position:sticky;
  top:0;
  z-index:5000;
}

.exec-v5-brand{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  line-height:1;
  text-align:right;
}

/* شعار أيان: أبيض أحادي خافت ليتناسق مع الخلفية الداكنة */
.exec-v5-logo{
  display:block;
  height:46px;
  width:auto;
  max-width:100%;
  object-fit:contain;
  filter:brightness(0) invert(1);
  opacity:.82;
}

.exec-v5-brand strong{
  font-size:27px;
  letter-spacing:1px;
}

.exec-v5-brand span{
  font-size:9px;
  letter-spacing:3px;
  opacity:.75;
  margin-top:4px;
}

.exec-v5-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
}

.exec-v5-nav-btn{
  min-height:42px;
  padding:0 17px;
  border-radius:var(--bt-r,6px);
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
  color:#fff;
  font-weight:600;
  cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease;
}

.exec-v5-nav-btn:hover{
  border-color:rgba(255,255,255,.3);
  background:rgba(255,255,255,.13);
}

.exec-v5-nav-btn.active{
  background:#2563eb;
  border-color:#2563eb;
}

.exec-v5-nav-btn.danger{
  background:#dc2626;
  border-color:#dc2626;
}

.exec-v5-user{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:155px;
}

.exec-v5-user>div:nth-child(2){
  display:flex;
  flex-direction:column;
}

.exec-v5-user strong{
  font-size:13px;
}

.exec-v5-user span{
  font-size:9px;
  opacity:.6;
  margin-top:3px;
}

.exec-v5-user i{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#21db92;
  box-shadow:0 0 10px #21db92;
}

.exec-v5-avatar{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#fff;
  color:#1d70ea;
  font-size:18px;
}

/* ---------- PAGE ---------- */

.exec-v5-page{
  display:grid;
  grid-template-columns:190px minmax(0,1fr);
  max-width:1740px;
  margin:auto;
}

/* ---------- ASIDE ---------- */

.exec-v5-aside{
  min-height:calc(100vh - 68px);
  padding:28px 18px;
  position:relative;
  overflow:hidden;
  border-left:1px solid rgba(70,126,194,.12);
  background:
    linear-gradient(180deg,rgba(237,246,255,.4),rgba(239,247,255,.8));
}

.exec-v5-time{
  text-align:center;
  color:#3b6caa;
}

.exec-v5-time span{
  display:block;
  font-size:11px;
  line-height:1.7;
}

.exec-v5-time strong{
  display:block;
  font-size:18px;
  margin-top:3px;
}

.exec-v5-quote{
  text-align:center;
  margin-top:55px;
  color:#6e8aaf;
  line-height:1.9;
  font-size:16px;
}

.exec-v5-quote small{
  display:block;
  margin-top:14px;
  font-size:9px;
  letter-spacing:2px;
  color:#9dbce3;
}

.exec-v5-city{
  height:280px;
  margin:55px -18px 0;
  opacity:.33;
  position:relative;
  background:
    linear-gradient(180deg,transparent,#91b9e9 90%);
  clip-path:polygon(
    0 100%,
    0 68%,
    6% 68%,
    8% 45%,
    12% 45%,
    15% 75%,
    21% 75%,
    23% 25%,
    27% 25%,
    29% 72%,
    36% 72%,
    39% 55%,
    43% 55%,
    47% 70%,
    55% 70%,
    59% 15%,
    62% 15%,
    66% 72%,
    72% 72%,
    76% 48%,
    80% 48%,
    84% 80%,
    91% 80%,
    94% 62%,
    98% 62%,
    100% 100%
  );
}

.exec-v5-tomorrow{
  margin-top:12px;
  text-align:center;
  font-size:18px;
  line-height:1.55;
  font-weight:900;
  color:#5678aa;
}

/* ---------- MAIN ---------- */

.exec-v5-main{
  padding:26px 26px 90px;
  min-width:0;
}

.exec-v5-title{
  display:flex;
  justify-content:flex-end;
  margin-bottom:14px;
}

.exec-v5-title>div{
  display:flex;
  gap:15px;
  align-items:center;
}

.exec-v5-title>div>span{
  width:52px;
  height:52px;
  border-radius:13px;
  display:grid;
  place-items:center;
  font-size:25px;
  background:
    linear-gradient(135deg,#ecf6ff,#ddecff);
  box-shadow:0 8px 22px rgba(43,110,200,.12);
}

.exec-v5-title h1{
  margin:0;
  font-size:30px;
  font-weight:950;
  letter-spacing:-.6px;
}

.exec-v5-title p{
  margin:5px 0 0;
  color:#67809f;
  font-size:13px;
}

/* ---------- WELCOME ---------- */

.exec-v5-welcome{
  display:flex;
  align-items:center;
  gap:16px;
  padding:17px 26px;
  margin-bottom:16px;
  min-height:84px;
  border:1px solid #d5e6fb;
  border-radius:14px;
  background:
    linear-gradient(90deg,#eaf6ff,#f3fbff 55%,#fff);
  overflow:hidden;
  position:relative;
}

.exec-v5-welcome::after{
  content:"";
  position:absolute;
  width:260px;
  height:260px;
  left:8%;
  top:-180px;
  border-radius:50%;
  background:
    radial-gradient(circle,rgba(76,167,255,.12),transparent 68%);
}

.exec-v5-welcome-icon{
  font-size:27px;
  position:relative;
  z-index:1;
}

.exec-v5-welcome h2{
  margin:0;
  font-size:18px;
}

.exec-v5-welcome p{
  margin:4px 0 0;
  color:#65809f;
  font-size:11px;
}

/* ---------- KPIS ---------- */

.exec-v5-kpis{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}

.exec-v5-kpi{
  position:relative;
  display:flex;
  gap:12px;
  min-height:116px;
  padding:16px;
  border:1px solid #dce6f3;
  border-radius:15px;
  background:#fff;
  box-shadow:
    0 10px 24px rgba(31,70,120,.055);
  overflow:hidden;
  transition:.2s ease;
}

.exec-v5-kpi:hover{
  transform:translateY(-4px);
  box-shadow:
    0 16px 30px rgba(31,70,120,.10);
}

.exec-v5-kpi-icon{
  width:42px;
  height:42px;
  flex:none;
  display:grid;
  place-items:center;
  border-radius:10px;
  font-size:19px;
}

.exec-v5-kpi.purple .exec-v5-kpi-icon{
  background:#f0e9ff;
}
.exec-v5-kpi.cyan .exec-v5-kpi-icon{
  background:#e1f8ff;
}
.exec-v5-kpi.pink .exec-v5-kpi-icon{
  background:#ffe9ef;
}
.exec-v5-kpi.blue .exec-v5-kpi-icon{
  background:#e8f2ff;
}
.exec-v5-kpi.orange .exec-v5-kpi-icon{
  background:#fff1d9;
}
.exec-v5-kpi.green .exec-v5-kpi-icon{
  background:#e3f8ef;
}
.exec-v5-kpi.violet .exec-v5-kpi-icon{
  background:#eee8ff;
}

.exec-v5-kpi-copy{
  min-width:0;
}

.exec-v5-kpi-copy span{
  display:block;
  color:#7286a0;
  font-size:10px;
}

.exec-v5-kpi-copy strong{
  display:block;
  margin:8px 0 5px;
  font-size:20px;
  color:#0e203d;
  white-space:nowrap;
}

.exec-v5-kpi-copy small{
  font-size:8px;
  color:#95a4b7;
}

/* ---------- CARDS ---------- */

.exec-v5-card{
  background:#fff;
  border:1px solid #dbe6f3;
  border-radius:15px;
  box-shadow:0 9px 22px rgba(36,75,123,.05);
  padding:16px;
  min-width:0;
  transition:.2s ease;
}

.exec-v5-card:hover{
  box-shadow:0 15px 30px rgba(36,75,123,.08);
}

.exec-v5-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}

.exec-v5-card-head h3{
  margin:0;
  font-size:14px;
  font-weight:900;
}

/* ---------- MAIN CHART ROW ---------- */

.exec-v5-row-main{
  display:grid;
  grid-template-columns:
    minmax(0,1.7fr)
    minmax(280px,.9fr)
    minmax(280px,.9fr);
  gap:12px;
  margin-bottom:14px;
}

.exec-v5-sales{
  min-height:305px;
}

.exec-line-svg{
  width:100%;
  height:235px;
  overflow:visible;
}

.exec-svg-label{
  font-size:10px;
  fill:#7387a1;
}

.exec-sales-path{
  stroke-dasharray:1400;
  stroke-dashoffset:1400;
  animation:execDrawLine 1.4s ease forwards;
}

/* ---------- SOURCE DONUT ---------- */

.exec-source-layout{
  min-height:240px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:25px;
}

.exec-source-donut{
  width:145px;
  height:145px;
  flex:none;
  display:grid;
  place-items:center;
  border-radius:50%;
  position:relative;
  box-shadow:
    0 10px 24px rgba(35,94,174,.14);
  animation:execDonutOpen .8s ease both;
}

.exec-source-donut::after{
  content:"";
  position:absolute;
  inset:28px;
  border-radius:50%;
  background:#fff;
  box-shadow:
    inset 0 0 0 1px #e4ebf4;
}

.exec-source-donut>div{
  position:relative;
  z-index:2;
  text-align:center;
}

.exec-source-donut strong{
  display:block;
  font-size:20px;
}

.exec-source-donut span{
  color:#71839a;
  font-size:9px;
}

.exec-source-legend{
  display:grid;
  gap:12px;
  min-width:140px;
}

.exec-source-legend>div{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:8px;
  font-size:10px;
}

.exec-source-legend i{
  width:9px;
  height:9px;
  border-radius:50%;
}

.exec-source-legend span{
  color:#647d9c;
}

.exec-source-legend strong{
  font-size:10px;
}

/* ---------- DEAL BARS ---------- */

.exec-deal-bars{
  height:240px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap:24px;
  padding-top:15px;
}

.exec-deal-col{
  height:100%;
  min-width:42px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
}

.exec-deal-col>strong{
  font-size:12px;
}

.exec-deal-track{
  width:42px;
  height:145px;
  display:flex;
  align-items:flex-end;
  background:
    linear-gradient(180deg,#f9fbfd,#f1f5f9);
  border-radius:8px 8px 4px 4px;
  overflow:hidden;
}

.exec-deal-fill{
  width:100%;
  border-radius:8px 8px 4px 4px;
  transform-origin:bottom;
  animation:execBarRise .8s ease both;
}

.exec-deal-fill.green{
  background:
    linear-gradient(180deg,#57d99a,#26bd78);
}

.exec-deal-fill.blue{
  background:
    linear-gradient(180deg,#41c0ff,#1c92ef);
}

.exec-deal-fill.orange{
  background:
    linear-gradient(180deg,#ffc554,#f59e0b);
}

.exec-deal-fill.gray{
  background:#d7dfea;
}

.exec-deal-col>span{
  color:#6d829d;
  font-size:9px;
}

/* ---------- BOTTOM ROW ---------- */

.exec-v5-row-bottom{
  display:grid;
  grid-template-columns:
    minmax(0,1fr)
    minmax(0,1.4fr)
    minmax(0,1fr);
  gap:12px;
}

/* ---------- OPS LIST ---------- */

.exec-v5-ops-list{
  display:grid;
  gap:7px;
}

.exec-v5-ops-list>div{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:9px;
  min-height:38px;
  padding:0 10px;
  border:1px solid #e4ebf3;
  border-radius:8px;
  background:#fbfdff;
}

.exec-v5-ops-list i{
  font-style:normal;
}

.exec-v5-ops-list span{
  font-size:10px;
  color:#516b8c;
}

.exec-v5-ops-list strong{
  font-size:11px;
}

/* ---------- PROJECTS ---------- */

.exec-project-row{
  display:grid;
  grid-template-columns:28px 1fr;
  gap:8px;
  margin-bottom:10px;
}

.exec-project-rank{
  width:24px;
  height:24px;
  border-radius:6px;
  display:grid;
  place-items:center;
  background:#eff4fb;
  font-size:9px;
  font-weight:900;
}

.exec-project-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:4px;
  font-size:9px;
}

.exec-project-track{
  height:6px;
  overflow:hidden;
  border-radius:999px;
  background:#edf1f6;
}

.exec-project-track>div{
  height:100%;
  border-radius:999px;
  background:
    linear-gradient(90deg,#172d56,#3b6fb1);
  animation:execProjectGrow .85s ease both;
}

/* ---------- ALERTS ---------- */

.exec-v5-alerts{
  display:grid;
  gap:7px;
}

.exec-v5-alert{
  min-height:38px;
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:9px;
  padding:0 10px;
  border-radius:8px;
  border:1px solid #e4ebf3;
  background:#fbfdff;
}

.exec-v5-alert i{
  font-style:normal;
}

.exec-v5-alert span{
  font-size:9px;
  color:#4f6683;
}

.exec-v5-alert.critical{
  border-color:#ffd7d7;
  background:#fffafa;
}

/* ---------- FLOATING G ---------- */

.exec-v5-g{
  position:fixed;
  left:18px;
  bottom:18px;
  z-index:8000;
  display:flex;
  align-items:center;
  gap:10px;
  border:0;
  background:none;
  cursor:pointer;
}

.exec-v5-g>strong{
  width:62px;
  height:62px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#57c7ff;
  font-size:31px;
  background:
    radial-gradient(circle,#102b5b,#06152d 68%);
  border:4px solid #1b8dff;
  box-shadow:
    0 0 0 5px rgba(29,126,255,.16),
    0 0 28px rgba(0,137,255,.52);
}

.exec-v5-g>span{
  padding:8px 12px;
  border-radius:9px;
  color:#fff;
  background:
    linear-gradient(135deg,#0b2144,#142c54);
  text-align:right;
  font-size:10px;
  box-shadow:0 10px 24px rgba(5,25,55,.20);
}

.exec-v5-g small{
  display:block;
  margin-top:2px;
  opacity:.72;
}

/* ---------- RETURN BUTTON ---------- */

.ayan-exec-return{
  position:fixed!important;
  right:18px!important;
  left:auto!important;
  bottom:18px!important;
  z-index:7900!important;
  display:none;
  align-items:center;
  gap:7px;
  border:0!important;
  color:#fff!important;
  padding:11px 15px!important;
  border-radius:12px!important;
  background:
    linear-gradient(135deg,#0b2144,#142c54)!important;
  box-shadow:
    0 10px 25px rgba(5,25,55,.2)!important;
  font-weight:850!important;
}

/* ---------- ANIMATIONS ---------- */

@keyframes execDrawLine{
  to{
    stroke-dashoffset:0;
  }
}

@keyframes execDonutOpen{
  from{
    opacity:0;
    transform:scale(.75) rotate(-45deg);
  }
  to{
    opacity:1;
    transform:scale(1) rotate(0);
  }
}

@keyframes execBarRise{
  from{
    transform:scaleY(0);
  }
  to{
    transform:scaleY(1);
  }
}

@keyframes execProjectGrow{
  from{
    transform:scaleX(0);
    transform-origin:right;
  }
  to{
    transform:scaleX(1);
    transform-origin:right;
  }
}

@keyframes execGPulse{
  0%,100%{
    transform:scale(1);
    box-shadow:
      0 0 0 5px rgba(29,126,255,.16),
      0 0 28px rgba(0,137,255,.42);
  }
  50%{
    transform:scale(1.04);
    box-shadow:
      0 0 0 9px rgba(29,126,255,.09),
      0 0 38px rgba(0,137,255,.65);
  }
}

/* ---------- RESPONSIVE ---------- */

@media(max-width:1400px){

  .exec-v5-kpis{
    grid-template-columns:
      repeat(4,minmax(0,1fr));
  }

  .exec-v5-row-main{
    grid-template-columns:
      1.5fr 1fr;
  }

  .exec-v5-row-main>article:last-child{
    grid-column:1/-1;
  }
}

@media(max-width:1080px){

  .exec-v5-topbar{
    grid-template-columns:1fr;
    padding:12px;
  }

  .exec-v5-user{
    display:none;
  }

  .exec-v5-nav{
    flex-wrap:wrap;
  }

  .exec-v5-page{
    grid-template-columns:1fr;
  }

  .exec-v5-aside{
    display:none;
  }

  .exec-v5-row-main,
  .exec-v5-row-bottom{
    grid-template-columns:1fr;
  }

  .exec-v5-row-main>article:last-child{
    grid-column:auto;
  }
}

@media(max-width:700px){

  .exec-v5-main{
    padding:15px 12px 100px;
  }

  .exec-v5-nav{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }

  .exec-v5-nav-btn{
    width:100%;
    min-width:0;
    padding:0 8px;
    font-size:10px;
  }

  .exec-v5-title h1{
    font-size:22px;
  }

  .exec-v5-kpis{
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }

  .exec-source-layout{
    flex-direction:column;
  }

  .exec-v5-g{
    left:10px;
    bottom:10px;
  }

  .ayan-exec-return{
    right:10px!important;
    bottom:10px!important;
  }
}

@media(max-width:430px){

  .exec-v5-nav{
    grid-template-columns:1fr;
  }

  .exec-v5-kpis{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   EXECUTIVE V5 — KPI CARD CONTENT FIT
   ========================================================= */

/* Prevent grid items from forcing cards wider */
.exec-v5-kpis > *,
.exec-v5-kpi,
.exec-kpi{
  min-width:0 !important;
  box-sizing:border-box !important;
}

/* KPI cards */
.exec-v5-kpi,
.exec-kpi{
  overflow:hidden !important;
}

/* Text area inside KPI cards */
.exec-v5-kpi > div,
.exec-kpi > div{
  min-width:0 !important;
}

/* Main KPI value */
.exec-v5-kpi strong,
.exec-kpi strong{
  display:block !important;
  max-width:100% !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;

  font-size:clamp(18px,1.35vw,27px) !important;
  line-height:1.25 !important;
  letter-spacing:-0.5px !important;
}

/* Large financial values get slightly more room */
.exec-v5-kpi strong{
  font-variant-numeric:tabular-nums;
}

/* KPI labels */
.exec-v5-kpi small,
.exec-v5-kpi span,
.exec-kpi small,
.exec-kpi span{
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

/* Keep icon from squeezing the number */
.exec-v5-kpi .exec-v5-kpi-icon,
.exec-v5-kpi .kpi-icon,
.exec-kpi .kpi-icon{
  flex:0 0 auto !important;
}

/* Desktop: slightly reduce value size when seven cards share one row */
@media (min-width:1200px){
  .exec-v5-kpi strong,
  .exec-kpi strong{
    font-size:clamp(17px,1.15vw,24px) !important;
  }
}

/* Tablet */
@media (max-width:900px){
  .exec-v5-kpi strong,
  .exec-kpi strong{
    font-size:22px !important;
  }
}

/* Mobile */
@media (max-width:600px){
  .exec-v5-kpi,
  .exec-kpi{
    min-height:120px !important;
  }

  .exec-v5-kpi strong,
  .exec-kpi strong{
    font-size:21px !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }
}


/* ===== GLOBAL FLOATING BUTTON SEPARATION ===== */

#ayanExecutiveReturnBtn,
.ayan-exec-return{
  right:18px !important;
  left:auto !important;
  bottom:18px !important;
  z-index:8500 !important;
}

/* Operations G and Executive G stay on the opposite side */
#operationsGFloatingButton,
#ayanOpsGFloatingButton,
.ayan-ops-g-floating,
.ops-g-floating,
#execGlobalGButton,
.exec-v5-g{
  left:18px !important;
  right:auto !important;
  bottom:18px !important;
}

@media(max-width:700px){
  #ayanExecutiveReturnBtn,
  .ayan-exec-return{
    right:10px !important;
    left:auto !important;
    bottom:10px !important;
  }

  #operationsGFloatingButton,
  #ayanOpsGFloatingButton,
  .ayan-ops-g-floating,
  .ops-g-floating,
  #execGlobalGButton,
  .exec-v5-g{
    left:10px !important;
    right:auto !important;
    bottom:10px !important;
  }
}

/* ===== EXECUTIVE PLATFORM ADMIN ===== */

.exec-platform-admin-btn{
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:9px 16px;
  border:1px solid rgba(17,196,180,.30);
  border-radius:16px;
  background:linear-gradient(135deg,#091e38,#0d4954);
  color:#fff;
  cursor:pointer;
  box-shadow:0 10px 28px rgba(8,35,58,.18);
  transition:.22s ease;
}

.exec-platform-admin-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 15px 34px rgba(8,35,58,.25);
}

.exec-platform-admin-btn > span:last-child{
  display:flex;
  flex-direction:column;
  text-align:right;
}

.exec-platform-admin-btn strong{
  font-size:13px;
}

.exec-platform-admin-btn small{
  margin-top:3px;
  font-size:10px;
  opacity:.68;
}

.exec-platform-admin-icon{
  width:35px;
  height:35px;
  display:grid;
  place-items:center;
  flex:0 0 35px;
  border-radius:11px;
  background:rgba(28,216,193,.13);
  border:1px solid rgba(70,240,217,.22);
  font-size:18px;
}

.exec-admin-overlay{
  display:none;
  position:absolute;
  inset:0;
  z-index:5000;
  min-height:100vh;
  padding:22px;
  background:
    radial-gradient(circle at 15% 5%,rgba(23,188,175,.10),transparent 30%),
    linear-gradient(180deg,#f4f9fb,#edf4f7);
}

.exec-admin-overlay.active{
  display:block;
}

.exec-admin-shell{
  width:min(1500px,100%);
  margin:auto;
}

.exec-admin-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:20px;
  padding:22px 24px;
  border-radius:22px;
  color:#fff;
  background:linear-gradient(135deg,#071a30,#0b3545);
  box-shadow:0 18px 45px rgba(7,26,48,.16);
}

.exec-admin-head small{
  color:#37d7c5;
  font-size:10px;
  letter-spacing:1.5px;
  font-weight:800;
}

.exec-admin-head h2{
  margin:5px 0 4px;
  font-size:24px;
}

.exec-admin-head p{
  margin:0;
  max-width:700px;
  color:rgba(255,255,255,.68);
  font-size:12px;
}

.exec-admin-close{
  min-height:44px;
  padding:9px 15px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:13px;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

#ayanExecutiveAdminMount #adminView{
  width:100%;
}

#ayanExecutiveAdminMount .m3-page{
  width:100%!important;
  max-width:none!important;
}

@media(max-width:700px){
  .exec-admin-overlay{padding:10px}

  .exec-admin-head{
    flex-direction:column;
    align-items:stretch;
    padding:16px;
  }

  .exec-admin-close,
  .exec-platform-admin-btn{
    width:100%;
  }
}


/* =========================================================
   EXECUTIVE ADMIN — FINAL LAYOUT FIX
   ========================================================= */

/* Administration becomes a true full executive view */
.exec-admin-overlay{
  position:fixed !important;
  inset:68px 0 0 0 !important;
  z-index:9000 !important;

  display:none;

  width:100% !important;
  height:calc(100dvh - 68px) !important;

  padding:20px !important;

  overflow-y:auto !important;
  overflow-x:hidden !important;

  box-sizing:border-box !important;

  background:
    radial-gradient(circle at 90% 0%,
      rgba(35,170,190,.08),
      transparent 28%),
    linear-gradient(180deg,#f5f9fc,#edf3f7) !important;
}

.exec-admin-overlay.active{
  display:block !important;
}

/* Main admin container */
.exec-admin-shell{
  width:min(1500px,100%) !important;
  max-width:1500px !important;

  margin:0 auto !important;

  box-sizing:border-box !important;
}

/* Premium header */
.exec-admin-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:20px !important;

  width:100% !important;

  margin:0 0 18px !important;
  padding:20px 22px !important;

  box-sizing:border-box !important;

  border-radius:18px !important;

  background:
    radial-gradient(circle at 12% 10%,
      rgba(44,222,202,.15),
      transparent 30%),
    linear-gradient(135deg,#07192f,#0c3a48) !important;

  color:#fff !important;

  box-shadow:
    0 18px 45px rgba(7,25,47,.14) !important;
}

.exec-admin-head > div{
  min-width:0 !important;
}

.exec-admin-head h2{
  margin:5px 0 !important;
  color:#fff !important;
}

.exec-admin-head p{
  color:rgba(255,255,255,.68) !important;
}

.exec-admin-close{
  flex:0 0 auto !important;

  min-height:42px !important;
  padding:8px 14px !important;

  border:1px solid rgba(255,255,255,.17) !important;
  border-radius:11px !important;

  background:rgba(255,255,255,.09) !important;
  color:#fff !important;

  font-weight:800 !important;
  cursor:pointer !important;
}

/* Mount */
#ayanExecutiveAdminMount{
  width:100% !important;
  min-width:0 !important;

  box-sizing:border-box !important;
}

/*
  adminView was originally a CRM view.
  Force it to behave like a standalone Executive page.
*/
#ayanExecutiveAdminMount #adminView{
  display:block !important;

  position:relative !important;

  width:100% !important;
  max-width:none !important;
  min-width:0 !important;

  margin:0 !important;
  padding:0 !important;

  background:transparent !important;

  box-sizing:border-box !important;
}

#ayanExecutiveAdminMount #adminView.ayan-view{
  display:block !important;
}

/* M3 page */
#ayanExecutiveAdminMount .m3-page{
  display:block !important;

  width:100% !important;
  max-width:none !important;
  min-width:0 !important;

  margin:0 !important;
  padding:0 !important;

  box-sizing:border-box !important;
}

/* Main blocks */
#ayanExecutiveAdminMount .m3-admin-block{
  width:100% !important;

  margin:0 0 16px !important;
  padding:18px !important;

  box-sizing:border-box !important;

  border:1px solid #dce5ee !important;
  border-radius:16px !important;

  background:#fff !important;

  box-shadow:
    0 8px 22px rgba(32,68,105,.05) !important;
}

/* Heading inside old M3 page */
#ayanExecutiveAdminMount .m3-head{
  width:100% !important;

  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;

  gap:12px !important;

  padding:16px 18px !important;
  margin:0 0 16px !important;

  box-sizing:border-box !important;

  border:1px solid #dce5ee !important;
  border-radius:16px !important;

  background:#fff !important;
}

#ayanExecutiveAdminMount .m3-head h2,
#ayanExecutiveAdminMount .m3-head h3{
  color:#10213e !important;
}

/* Buttons */
#ayanExecutiveAdminMount button{
  visibility:visible !important;
  opacity:1 !important;
}

#ayanExecutiveAdminMount .m3-tools{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;

  flex-wrap:wrap !important;
}

/* Tables */
#ayanExecutiveAdminMount .m3-table-wrap{
  width:100% !important;
  max-width:100% !important;

  overflow-x:auto !important;
  overflow-y:visible !important;

  border-radius:12px !important;
}

#ayanExecutiveAdminMount .m3-table:not(.ayan-mobile-cards){
  width:100% !important;
  min-width:760px !important;

  border-collapse:collapse !important;
}

/* Do not allow CRM mobile overrides to wreck desktop admin */
@media(min-width:801px){

  #ayanExecutiveAdminMount .m3-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  #ayanExecutiveAdminMount .m3-permissions{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }

}

/* Mobile */
@media(max-width:800px){

  .exec-admin-overlay{
    inset:0 !important;

    height:100dvh !important;

    padding:10px !important;
  }

  .exec-admin-head{
    flex-direction:column !important;
    align-items:stretch !important;

    padding:15px !important;
  }

  .exec-admin-close{
    width:100% !important;
  }

  #ayanExecutiveAdminMount .m3-head{
    flex-direction:column !important;
    align-items:stretch !important;
  }

  #ayanExecutiveAdminMount .m3-tools{
    width:100% !important;
  }

  #ayanExecutiveAdminMount .m3-tools > *{
    width:100% !important;
  }

  #ayanExecutiveAdminMount .m3-grid,
  #ayanExecutiveAdminMount .m3-permissions{
    grid-template-columns:1fr !important;
  }

}


/* =========================================================
   AYAN PLATFORM GLOBAL THEME — EXECUTIVE
   ========================================================= */

.exec-theme-btn{
  min-width:118px;
}

/* =========================================================
   DARK MODE — EXECUTIVE DASHBOARD
   Default AYAN dark mode = body without .theme-light
   ========================================================= */

body:not(.theme-light) #ayanExecutiveDashboard{
  color:#e8eef8 !important;

  background:
    radial-gradient(circle at 100% 0%,
      rgba(38,128,255,.12),
      transparent 27%),
    linear-gradient(135deg,#07111f,#0a1627 65%,#07111f) !important;
}

body:not(.theme-light) .exec-v5-main{
  color:#e8eef8;
}

body:not(.theme-light) .exec-v5-title h1,
body:not(.theme-light) .exec-v5-welcome h2,
body:not(.theme-light) .exec-v5-kpi-copy strong,
body:not(.theme-light) .exec-v5-card h3{
  color:#f1f5f9 !important;
}

body:not(.theme-light) .exec-v5-title p,
body:not(.theme-light) .exec-v5-welcome p,
body:not(.theme-light) .exec-v5-kpi-copy span,
body:not(.theme-light) .exec-v5-kpi-copy small{
  color:#94a3b8 !important;
}

/* Welcome */
body:not(.theme-light) .exec-v5-welcome{
  border-color:#1d3554 !important;

  background:
    linear-gradient(90deg,#0b1a2e,#0c2238 60%,#0c192a) !important;
}

/* KPI */
body:not(.theme-light) .exec-v5-kpi{
  border-color:#203652 !important;

  background:
    linear-gradient(180deg,#0d1b2e,#0a1728) !important;

  box-shadow:
    0 12px 30px rgba(0,0,0,.17) !important;
}

/* Analysis cards */
body:not(.theme-light) .exec-v5-card{
  border-color:#203652 !important;

  background:#0b192b !important;

  box-shadow:
    0 10px 26px rgba(0,0,0,.16) !important;
}

/* SVG charts */
body:not(.theme-light) .exec-line-svg line{
  stroke:#1e334e !important;
}

body:not(.theme-light) .exec-svg-label{
  fill:#94a3b8 !important;
}

/* Donut middle */
body:not(.theme-light) .exec-source-donut::after{
  background:#0b192b !important;
  box-shadow:inset 0 0 0 1px #263c59 !important;
}

body:not(.theme-light) .exec-source-donut strong{
  color:#fff !important;
}

body:not(.theme-light) .exec-source-legend span{
  color:#a8bad1 !important;
}

/* Deal chart */
body:not(.theme-light) .exec-deal-track{
  background:#14243a !important;
}

body:not(.theme-light) .exec-deal-col>strong{
  color:#f1f5f9 !important;
}

body:not(.theme-light) .exec-deal-col>span{
  color:#94a3b8 !important;
}

/* Operations */
body:not(.theme-light) .exec-v5-ops-list>div{
  border-color:#203652 !important;
  background:#0e1e32 !important;
}

body:not(.theme-light) .exec-v5-ops-list span{
  color:#b2c2d6 !important;
}

body:not(.theme-light) .exec-v5-ops-list strong{
  color:#fff !important;
}

/* Projects */
body:not(.theme-light) .exec-project-rank{
  background:#152a45 !important;
  color:#fff !important;
}

body:not(.theme-light) .exec-project-head{
  color:#c1cddd !important;
}

body:not(.theme-light) .exec-project-track{
  background:#17283d !important;
}

/* Alerts */
body:not(.theme-light) .exec-v5-alert{
  border-color:#203652 !important;
  background:#0e1e32 !important;
}

body:not(.theme-light) .exec-v5-alert span{
  color:#c2cfdf !important;
}

body:not(.theme-light) .exec-v5-alert.critical{
  background:#2a151b !important;
  border-color:#5c2833 !important;
}

/* Left executive strip */
body:not(.theme-light) .exec-v5-aside{
  border-left-color:#172d48 !important;

  background:
    linear-gradient(180deg,#081525,#0a192b) !important;
}

body:not(.theme-light) .exec-v5-time,
body:not(.theme-light) .exec-v5-tomorrow{
  color:#8bb7ef !important;
}

body:not(.theme-light) .exec-v5-quote{
  color:#849bb9 !important;
}

/* =========================================================
   DARK MODE — PLATFORM ADMINISTRATION
   ========================================================= */

body:not(.theme-light) .exec-admin-overlay{
  background:
    radial-gradient(circle at 90% 0%,
      rgba(22,196,181,.08),
      transparent 28%),
    linear-gradient(180deg,#07111f,#091827) !important;
}

body:not(.theme-light) #ayanExecutiveAdminMount,
body:not(.theme-light) #ayanExecutiveAdminMount #adminView,
body:not(.theme-light) #ayanExecutiveAdminMount .m3-page{
  color:#e5edf7 !important;
  background:transparent !important;
}

/* Admin cards */
body:not(.theme-light) #ayanExecutiveAdminMount .m3-admin-block,
body:not(.theme-light) #ayanExecutiveAdminMount .m3-head{
  border-color:#213852 !important;

  background:#0c1b2d !important;

  color:#e8eef8 !important;

  box-shadow:
    0 10px 25px rgba(0,0,0,.16) !important;
}

body:not(.theme-light) #ayanExecutiveAdminMount .m3-head h2,
body:not(.theme-light) #ayanExecutiveAdminMount .m3-head h3,
body:not(.theme-light) #ayanExecutiveAdminMount .m3-admin-block h3{
  color:#f1f5f9 !important;
}

body:not(.theme-light) #ayanExecutiveAdminMount .m3-muted,
body:not(.theme-light) #ayanExecutiveAdminMount p{
  color:#94a3b8 !important;
}

/* Admin tables */
body:not(.theme-light) #ayanExecutiveAdminMount .m3-table{
  color:#e2e8f0 !important;
}

body:not(.theme-light) #ayanExecutiveAdminMount .m3-table thead{
  background:#10243b !important;
}

body:not(.theme-light) #ayanExecutiveAdminMount .m3-table th{
  color:#9eb2cc !important;
  border-color:#233a55 !important;
}

body:not(.theme-light) #ayanExecutiveAdminMount .m3-table td{
  color:#dce6f2 !important;
  border-color:#1f344d !important;
}

body:not(.theme-light) #ayanExecutiveAdminMount .m3-table tbody tr{
  background:#0d1d30 !important;
}

body:not(.theme-light) #ayanExecutiveAdminMount .m3-table tbody tr:hover{
  background:#122740 !important;
}

/* Inputs / selects */
body:not(.theme-light) #ayanExecutiveAdminMount input,
body:not(.theme-light) #ayanExecutiveAdminMount select,
body:not(.theme-light) #ayanExecutiveAdminMount textarea{
  border-color:#29415e !important;

  background:#091827 !important;

  color:#e7eef8 !important;
}

body:not(.theme-light) #ayanExecutiveAdminMount input::placeholder,
body:not(.theme-light) #ayanExecutiveAdminMount textarea::placeholder{
  color:#667b95 !important;
}

/* Permission cards */
body:not(.theme-light) #ayanExecutiveAdminMount .m3-permission-section{
  border-color:#243b56 !important;

  background:#0a192b !important;

  color:#e8eef8 !important;
}

body:not(.theme-light) #ayanExecutiveAdminMount .m3-permission{
  border-color:#243b56 !important;

  background:#102238 !important;

  color:#dce7f3 !important;
}

/* Modal itself */
body:not(.theme-light) .m3-modal{
  background:rgba(2,8,18,.82) !important;
}

body:not(.theme-light) .m3-modal-card{
  border-color:#29415e !important;

  background:#0c1b2d !important;

  color:#e7eef8 !important;
}

body:not(.theme-light) .m3-modal-head h3{
  color:#fff !important;
}

/* buttons */
body:not(.theme-light) #ayanExecutiveAdminMount button:not(.green):not(.red),
body:not(.theme-light) .m3-modal button:not(.green):not(.red){
  border-color:#2a4565 !important;

  background:#132842 !important;

  color:#e4edf8 !important;
}

/* =========================================================
   LIGHT MODE — keep current Executive design
   ========================================================= */

body.theme-light .exec-theme-btn{
  background:#fff !important;
  color:#10213e !important;
  border-color:#d7e1ee !important;
}


/* =========================================================
   PLATFORM ADMIN BUTTON — PROFESSIONAL RECTANGULAR STYLE
   ========================================================= */

#execPlatformAdminButton.exec-platform-admin-btn{
  position:relative !important;
  overflow:hidden !important;

  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:11px !important;

  width:auto !important;
  min-width:190px !important;
  min-height:52px !important;

  margin:0 !important;
  padding:8px 14px !important;

  border:1px solid rgba(45,205,190,.48) !important;
  border-radius:12px !important;

  background:
    linear-gradient(
      135deg,
      rgba(10,34,57,.98),
      rgba(10,66,75,.96)
    ) !important;

  color:#fff !important;

  box-shadow:
    0 6px 18px rgba(6,31,49,.15),
    inset 0 0 0 1px rgba(255,255,255,.035) !important;

  cursor:pointer !important;
  transition:
    transform .2s ease,
    border-color .2s ease,
    box-shadow .2s ease !important;
}

/* subtle top highlight */
#execPlatformAdminButton.exec-platform-admin-btn::before{
  content:"" !important;
  position:absolute !important;
  top:0 !important;
  right:12px !important;
  left:12px !important;
  height:1px !important;

  background:linear-gradient(
    90deg,
    transparent,
    rgba(80,235,216,.65),
    transparent
  ) !important;
}

/* Hover */
#execPlatformAdminButton.exec-platform-admin-btn:hover{
  transform:translateY(-2px) !important;

  border-color:rgba(62,230,210,.78) !important;

  box-shadow:
    0 10px 25px rgba(4,41,58,.22),
    0 0 0 3px rgba(38,205,190,.07) !important;
}

/* Icon box */
#execPlatformAdminButton .exec-platform-admin-icon{
  width:34px !important;
  height:34px !important;
  min-width:34px !important;

  display:grid !important;
  place-items:center !important;

  border:1px solid rgba(77,229,211,.28) !important;
  border-radius:9px !important;

  background:rgba(46,207,190,.11) !important;

  font-size:17px !important;
  line-height:1 !important;
}

/* Text */
#execPlatformAdminButton > span:last-child{
  min-width:0 !important;

  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;

  line-height:1.25 !important;
  text-align:right !important;
}

#execPlatformAdminButton strong{
  display:block !important;
  color:#fff !important;

  font-size:13px !important;
  font-weight:800 !important;

  white-space:nowrap !important;
}

#execPlatformAdminButton small{
  display:block !important;

  margin-top:3px !important;

  color:rgba(220,245,243,.67) !important;

  font-size:9.5px !important;
  font-weight:500 !important;

  white-space:nowrap !important;
}

/* LIGHT MODE */
body.theme-light #execPlatformAdminButton.exec-platform-admin-btn{
  border-color:#b8d9d8 !important;

  background:
    linear-gradient(
      135deg,
      #ffffff,
      #f1f9f9
    ) !important;

  color:#10213e !important;

  box-shadow:
    0 5px 15px rgba(28,67,88,.08),
    inset 0 0 0 1px rgba(255,255,255,.8) !important;
}

body.theme-light #execPlatformAdminButton strong{
  color:#10213e !important;
}

body.theme-light #execPlatformAdminButton small{
  color:#64748b !important;
}

body.theme-light #execPlatformAdminButton .exec-platform-admin-icon{
  border-color:#c4e3e0 !important;
  background:#e9f7f5 !important;
  color:#087f78 !important;
}

body.theme-light #execPlatformAdminButton:hover{
  border-color:#54bbb1 !important;

  box-shadow:
    0 9px 22px rgba(24,90,94,.12),
    0 0 0 3px rgba(37,181,169,.07) !important;
}

/* MOBILE */
@media(max-width:700px){

  #execPlatformAdminButton.exec-platform-admin-btn{
    width:100% !important;
    min-width:0 !important;
    min-height:50px !important;

    justify-content:flex-start !important;
  }

}


/* =========================================================
   MOBILE POLISH — EXECUTIVE ADMIN + SOCIAL CLIENTS
   ========================================================= */

@media(max-width:700px){

  /* =======================================================
     EXECUTIVE ADMINISTRATION
     ======================================================= */

  .exec-admin-overlay{
    padding:8px !important;
  }

  .exec-admin-shell{
    width:100% !important;
    max-width:none !important;
  }

  .exec-admin-head{
    padding:14px !important;
    margin-bottom:10px !important;
    border-radius:15px !important;
    gap:10px !important;
  }

  .exec-admin-head h2{
    font-size:18px !important;
    line-height:1.35 !important;
  }

  .exec-admin-head p{
    font-size:10px !important;
    line-height:1.7 !important;
  }

  .exec-admin-head small{
    font-size:8px !important;
  }

  .exec-admin-close{
    min-height:40px !important;
    padding:8px 10px !important;
    font-size:11px !important;
    border-radius:10px !important;
  }

  #ayanExecutiveAdminMount .m3-head{
    padding:12px !important;
    margin-bottom:10px !important;
    border-radius:13px !important;
  }

  #ayanExecutiveAdminMount .m3-head h2,
  #ayanExecutiveAdminMount .m3-head h3{
    font-size:16px !important;
    line-height:1.35 !important;
  }

  #ayanExecutiveAdminMount .m3-head p{
    font-size:10px !important;
    line-height:1.6 !important;
  }

  #ayanExecutiveAdminMount .m3-admin-block{
    padding:11px !important;
    margin-bottom:10px !important;
    border-radius:13px !important;
  }

  #ayanExecutiveAdminMount .m3-admin-block h3{
    font-size:14px !important;
    margin-bottom:10px !important;
  }

  /* Admin tools */
  #ayanExecutiveAdminMount .m3-tools{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:6px !important;
  }

  #ayanExecutiveAdminMount .m3-tools > *{
    width:100% !important;
    min-width:0 !important;
    min-height:38px !important;
    font-size:10px !important;
    padding:6px 8px !important;
    border-radius:9px !important;
  }

  /* Tables */
  #ayanExecutiveAdminMount .m3-table-wrap{
    margin-top:6px !important;
    border-radius:10px !important;
    overflow-x:auto !important;
  }

  #ayanExecutiveAdminMount .m3-table:not(.ayan-mobile-cards){
    min-width:690px !important;
    font-size:10px !important;
  }

  #ayanExecutiveAdminMount .m3-table:not(.ayan-mobile-cards) th{
    padding:8px 7px !important;
    white-space:nowrap !important;
    font-size:9px !important;
  }

  #ayanExecutiveAdminMount .m3-table:not(.ayan-mobile-cards) td{
    padding:8px 7px !important;
    font-size:10px !important;
    vertical-align:middle !important;
  }

  #ayanExecutiveAdminMount .m3-table button{
    min-height:32px !important;
    padding:5px 7px !important;
    font-size:9px !important;
  }

  /* Permission cards */
  #ayanExecutiveAdminMount .m3-permission-list,
  #ayanExecutiveAdminMount .m3-permissions{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:6px !important;
  }

  #ayanExecutiveAdminMount .m3-permission-section{
    padding:10px !important;
    border-radius:11px !important;
  }

  #ayanExecutiveAdminMount .m3-permission{
    min-height:42px !important;
    padding:8px 10px !important;
    font-size:10px !important;
    border-radius:9px !important;
  }

  /* User modal */
  .m3-user-modal-card{
    padding:12px !important;
    max-height:94dvh !important;
    border-radius:16px 16px 0 0 !important;
  }

  .m3-user-modal-card .m3-grid{
    grid-template-columns:1fr !important;
    gap:8px !important;
  }

  .m3-user-modal-card input,
  .m3-user-modal-card select{
    min-height:40px !important;
    font-size:11px !important;
  }

  /* =======================================================
     SOCIAL CLIENTS DASHBOARD
     ======================================================= */

  #socialClientsSubView{
    width:100% !important;
    overflow-x:hidden !important;
  }

  #socialClientsSubView .page{
    width:100% !important;
    max-width:none !important;
    padding:8px !important;
    margin:0 !important;
  }

  /* Dashboard KPI cards */
  #socialClientsSubView .analytics-dashboard,
  #socialClientsSubView .management-cards,
  #socialClientsSubView .stats-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:7px !important;
  }

  #socialClientsSubView .dash-card,
  #socialClientsSubView .mgmt-card{
    min-width:0 !important;
    min-height:92px !important;
    padding:10px !important;
    border-radius:12px !important;
    overflow:hidden !important;
  }

  #socialClientsSubView .dash-label,
  #socialClientsSubView .mgmt-card small{
    display:block !important;
    font-size:9px !important;
    line-height:1.35 !important;
    white-space:normal !important;
  }

  #socialClientsSubView .dash-value,
  #socialClientsSubView .mgmt-card strong{
    display:block !important;
    margin-top:6px !important;
    font-size:18px !important;
    line-height:1.2 !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }

  #socialClientsSubView .dash-percent{
    margin-top:4px !important;
    font-size:8px !important;
  }

  /* Filters / toolbar */
  #socialClientsSubView .toolbar,
  #socialClientsSubView .filters,
  #socialClientsSubView .search-row{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:6px !important;
    width:100% !important;
  }

  #socialClientsSubView .toolbar > *,
  #socialClientsSubView .filters > *,
  #socialClientsSubView .search-row > *{
    width:100% !important;
    min-width:0 !important;
  }

  #socialClientsSubView input,
  #socialClientsSubView select,
  #socialClientsSubView textarea{
    min-height:40px !important;
    padding:7px 9px !important;
    font-size:11px !important;
    border-radius:9px !important;
  }

  #socialClientsSubView button{
    min-height:38px !important;
    padding:6px 9px !important;
    font-size:10px !important;
    border-radius:9px !important;
  }

  /* Client table */
  #socialClientsSubView .table-wrap,
  #socialClientsSubView .management-table{
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    border-radius:10px !important;
  }

  #socialClientsSubView table{
    min-width:760px !important;
    font-size:10px !important;
  }

  #socialClientsSubView table th{
    padding:8px 7px !important;
    font-size:9px !important;
    white-space:nowrap !important;
  }

  #socialClientsSubView table td{
    padding:8px 7px !important;
    font-size:10px !important;
  }

}


/* Extra small phones */
@media(max-width:430px){

  #socialClientsSubView .analytics-dashboard,
  #socialClientsSubView .management-cards,
  #socialClientsSubView .stats-grid{
    grid-template-columns:1fr 1fr !important;
  }

  #socialClientsSubView .dash-card,
  #socialClientsSubView .mgmt-card{
    min-height:86px !important;
    padding:8px !important;
  }

  #socialClientsSubView .dash-value,
  #socialClientsSubView .mgmt-card strong{
    font-size:16px !important;
  }

}


/* =========================================================
   MOBILE COMPACT V2
   Admin cards + Executive Return Button
   ========================================================= */

@media(max-width:700px){

  /* =======================================================
     EXECUTIVE ADMIN — ULTRA COMPACT
     ======================================================= */

  #ayanExecutiveAdminMount{
    padding:0 !important;
    margin:0 !important;
  }

  #ayanExecutiveAdminMount .m3-page{
    padding:0 !important;
    margin:0 !important;
  }

  /* Kill oversized cards */
  #ayanExecutiveAdminMount .m3-admin-block,
  #ayanExecutiveAdminMount .m3-card{
    min-height:0 !important;
    height:auto !important;

    padding:8px !important;
    margin:0 0 8px !important;

    border-radius:10px !important;

    box-shadow:
      0 4px 12px rgba(15,23,42,.05) !important;
  }

  #ayanExecutiveAdminMount .m3-head{
    min-height:0 !important;
    height:auto !important;

    padding:9px !important;
    margin:0 0 8px !important;

    border-radius:10px !important;
  }

  #ayanExecutiveAdminMount .m3-head h2{
    font-size:15px !important;
    margin:0 !important;
  }

  #ayanExecutiveAdminMount .m3-head h3,
  #ayanExecutiveAdminMount .m3-admin-block h3{
    font-size:13px !important;
    margin:0 0 7px !important;
  }

  #ayanExecutiveAdminMount .m3-head p,
  #ayanExecutiveAdminMount .m3-muted{
    margin:3px 0 0 !important;

    font-size:9px !important;
    line-height:1.45 !important;
  }

  /* =======================================================
     ADMIN TOOLS
     ======================================================= */

  #ayanExecutiveAdminMount .m3-tools{
    display:flex !important;
    flex-wrap:wrap !important;

    gap:5px !important;

    width:100% !important;
  }

  #ayanExecutiveAdminMount .m3-tools > *{
    width:auto !important;
    flex:1 1 120px !important;

    min-width:0 !important;
    min-height:34px !important;

    padding:5px 7px !important;

    font-size:9px !important;

    border-radius:8px !important;
  }

  /* =======================================================
     USERS TABLE / AUDIT
     ======================================================= */

  #ayanExecutiveAdminMount .m3-table-wrap{
    margin-top:4px !important;

    border-radius:8px !important;

    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch !important;
  }

  #ayanExecutiveAdminMount .m3-table:not(.ayan-mobile-cards){
    min-width:620px !important;

    font-size:9px !important;
  }

  #ayanExecutiveAdminMount .m3-table:not(.ayan-mobile-cards) th,
  #ayanExecutiveAdminMount .m3-table:not(.ayan-mobile-cards) td{
    padding:6px !important;

    font-size:9px !important;
    line-height:1.35 !important;
  }

  #ayanExecutiveAdminMount .m3-table button{
    min-height:28px !important;

    padding:4px 6px !important;

    font-size:8px !important;
  }

  /* =======================================================
     PERMISSION CARDS — THIS IS THE BIG ONE
     ======================================================= */

  #ayanExecutiveAdminMount .m3-permission-list{
    display:grid !important;

    grid-template-columns:1fr !important;

    gap:5px !important;
  }

  #ayanExecutiveAdminMount .m3-permission-section{
    min-height:0 !important;
    height:auto !important;

    padding:7px !important;

    margin:0 !important;

    border-radius:9px !important;
  }

  #ayanExecutiveAdminMount .m3-permissions{
    display:grid !important;

    grid-template-columns:1fr 1fr !important;

    gap:4px !important;

    padding:0 !important;
  }

  #ayanExecutiveAdminMount .m3-permission{
    min-height:34px !important;
    height:auto !important;

    padding:5px 6px !important;

    margin:0 !important;

    border-radius:7px !important;

    font-size:8.5px !important;
    line-height:1.25 !important;
  }

  #ayanExecutiveAdminMount .m3-permission input{
    width:14px !important;
    height:14px !important;

    flex:0 0 14px !important;

    margin:0 !important;
  }

  /* =======================================================
     USER EDIT MODAL
     ======================================================= */

  .m3-user-modal-card{
    padding:9px !important;

    max-height:96dvh !important;
  }

  .m3-user-modal-card .m3-grid{
    gap:6px !important;
  }

  .m3-user-modal-card .m3-field{
    margin:0 !important;
  }

  .m3-user-modal-card label{
    margin-bottom:3px !important;

    font-size:9px !important;
  }

  .m3-user-modal-card input,
  .m3-user-modal-card select{
    min-height:35px !important;

    padding:5px 7px !important;

    font-size:10px !important;
  }

  /* =======================================================
     EXECUTIVE RETURN BUTTON
     Prevent overlap with G
     ======================================================= */

  #ayanExecutiveReturnBtn,
  .ayan-exec-return{
    position:fixed !important;

    right:10px !important;
    left:auto !important;

    bottom:12px !important;

    width:46px !important;
    min-width:46px !important;
    max-width:46px !important;

    height:46px !important;
    min-height:46px !important;

    padding:0 !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    overflow:hidden !important;

    border-radius:50% !important;

    font-size:20px !important;

    z-index:9200 !important;
  }

  /* Hide long text on mobile */
  #ayanExecutiveReturnBtn span,
  .ayan-exec-return span{
    display:none !important;
  }

  /* =======================================================
     G stays on the opposite side
     ======================================================= */

  #opsGlobalG{
    left:10px !important;
    right:auto !important;

    bottom:10px !important;

    max-width:calc(100vw - 80px) !important;
  }

  #opsGlobalGButton{
    max-width:150px !important;
  }

}


/* Very small phones */
@media(max-width:420px){

  #ayanExecutiveAdminMount .m3-permissions{
    grid-template-columns:1fr !important;
  }

  #ayanExecutiveAdminMount .m3-permission{
    min-height:32px !important;
  }

}

/* =========================================================
   AYAN G — MOBILE FINAL POSITION FIX
   ========================================================= */

@media(max-width:700px){

  #opsGlobalG.ops-global-g{
    position:fixed !important;

    left:14px !important;
    right:auto !important;

    bottom:86px !important;

    width:56px !important;
    min-width:56px !important;
    max-width:56px !important;

    z-index:9998 !important;
  }

  #opsGlobalGButton.ops-global-g-button{
    width:56px !important;
    min-width:56px !important;
    max-width:56px !important;

    height:56px !important;
    min-height:56px !important;
    max-height:56px !important;

    padding:4px !important;
    margin:0 !important;

    border-radius:50% !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    overflow:hidden !important;
  }

  #opsGlobalGButton .ops-global-g-button-text{
    display:none !important;
  }

  #opsGlobalGButton img{
    display:block !important;

    width:46px !important;
    height:46px !important;

    min-width:46px !important;
    max-width:46px !important;

    object-fit:cover !important;

    margin:0 !important;
  }

  /* مساحة آمنة أسفل الصفحات */
  #taxonomyView,
  #controlView,
  #operationsView,
  #socialClientsSubView{
    padding-bottom:120px !important;
  }

}

