/* إعادة تصميم القائمة الجانبية (كمبيوتر) وشريط الموبايل السفلي — CSS فقط + ac6-nav.js */
.nav-icon{font-size:0!important;line-height:0!important}
#sidebar .nav-icon::before{content:"";display:block;width:20px;height:20px;background:currentColor;-webkit-mask:var(--ac6-ic) center/contain no-repeat;mask:var(--ac6-ic) center/contain no-repeat}
#sidebar .nav button[data-view="dashboard"] .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='9' rx='1'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1'/%3E%3C/svg%3E")}
#sidebar .nav button[data-view="offers"] .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6zM14 3v4h4M9 13h6M9 17h6'/%3E%3C/svg%3E")}
#sidebar .nav button[data-view="licenses"] .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M7 10h6M7 14h4M16 10h1'/%3E%3C/svg%3E")}
#sidebar .nav button[data-view="follow"] .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 1112 0c0 7 3 8 3 8H3s3-1 3-8M10 20a2 2 0 004 0'/%3E%3C/svg%3E")}
#sidebar .nav button[data-view="available"] .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-8 9 8M5 10v10h14V10'/%3E%3C/svg%3E")}
#sidebar .nav button[data-view="availableIndicators"] .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E")}
#sidebar .nav button[data-view="availableArchive"] .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='5' rx='1'/%3E%3Cpath d='M5 9v10h14V9M10 13h4'/%3E%3C/svg%3E")}
#sidebar .nav button[data-view="availableActivity"] .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l4-1 11-11-3-3L5 16zM14 6l3 3'/%3E%3C/svg%3E")}
#sidebar .nav button[data-view="monthlyRentalActivity"] .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l4-1 11-11-3-3L5 16zM14 6l3 3'/%3E%3C/svg%3E")}
#sidebar .nav button[data-view="projects"] .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V7l7-4 7 4v14M9 21v-6h6v6'/%3E%3C/svg%3E")}
#sidebar .nav button[data-view="monthlyRentals"] .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='M11 12l9-9M16 7l3 3'/%3E%3C/svg%3E")}
#sidebar .nav button[data-view="permissions"] .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 018 0v4'/%3E%3C/svg%3E")}
#sidebar .nav button[data-view="form"] .nav-icon,#sidebar .ac6-add .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")}
#sidebar #logoutBtn .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5V3h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E")}
#sidebar .ac6-more .nav-icon{--ac6-ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5' cy='12' r='1.6'/%3E%3Ccircle cx='12' cy='12' r='1.6'/%3E%3Ccircle cx='19' cy='12' r='1.6'/%3E%3C/svg%3E")}

.ac6-more,.ac6-add{display:none}
#ac6Sheet{display:none}

/* ===== الكمبيوتر ===== */
@media(min-width:1051px){
  #appView #sidebar .nav{padding:4px 6px 12px}
  #appView #sidebar .nav .ac6-more{display:none!important}
  #appView #sidebar .nav .saken-nav-group{margin:0 0 4px;padding:0!important;background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important}
  #sidebar .nav .saken-nav-group-label[data-sidebar-section-toggle]{cursor:default;min-height:0;padding:12px 12px 4px!important;font-size:11px;font-weight:800;letter-spacing:.3px;opacity:.62;background:none!important}
  #sidebar .nav .saken-nav-group-label[data-sidebar-section-toggle]::after{display:none!important}
  #sidebar .nav .saken-nav-group-label[data-sidebar-section-toggle]:hover{background:none}
  #appView #sidebar .nav .saken-nav-group[data-sidebar-section-closed="true"]>button{display:flex!important}
  #appView #sidebar .nav .saken-nav-group[data-sidebar-section-closed="true"]>button[hidden],#appView #sidebar .nav .saken-nav-group[data-sidebar-section-closed="true"]>button.hidden{display:none!important}
  #appView #sidebar .nav button[data-view]{display:flex;align-items:center;gap:12px;width:100%;padding:11px 12px;margin:1px 0;border:0;border-radius:12px;background:transparent;color:#e7f4f4;font-size:14px;font-weight:700;text-align:start;box-shadow:none;transition:background .15s}
  #appView #sidebar .nav button[data-view]:hover{background:rgba(255,255,255,.12)}
  #appView #sidebar .nav button[data-view].active{background:#fff;color:#0f4f56;box-shadow:0 6px 16px rgba(0,0,0,.18)}
  #appView #sidebar .nav button[data-view] .nav-icon{flex:none;display:grid;place-items:center;width:22px;height:22px;min-width:22px;background:none;opacity:.9}
  #appView #sidebar .nav button.saken-nav-sub{margin-inline-start:16px;width:calc(100% - 16px);padding:8px 10px;font-size:13px;font-weight:600;border-radius:10px}
  #appView #sidebar .nav button.saken-nav-sub.active{background:rgba(255,255,255,.2);color:#fff;box-shadow:none}
  #appView #sidebar #logoutBtn{display:flex;align-items:center;justify-content:center;gap:10px;border-radius:14px;font-weight:800}
  #appView #sidebar #logoutBtn .nav-icon{display:grid;place-items:center}
  .app.sidebar-collapsed #sidebar .nav button[data-view]{justify-content:center;padding:12px 0}
  .app.sidebar-collapsed #sidebar .nav .saken-nav-group-label{display:none}
}

/* ===== الموبايل: شريط عائم أسفل الشاشة ===== */
@media(max-width:760px){
  main{padding-bottom:calc(112px + env(safe-area-inset-bottom))!important}
  .app aside,.app.sidebar-collapsed aside{inset:auto 12px calc(12px + env(safe-area-inset-bottom)) 12px!important;display:block!important;min-height:0;height:72px!important;padding:0 6px!important;background:#fff!important;border:1px solid #e1ecec;border-radius:26px;box-shadow:0 10px 30px rgba(15,79,86,.28)!important;backdrop-filter:none;overflow:visible!important}
  .app aside .nav{height:72px;overflow:visible!important;justify-content:space-around;align-items:center;gap:0!important;scroll-snap-type:none}
  .app aside .nav>button,.app aside .nav button[data-view],.app aside .ac6-more{display:none!important}
  .app aside .nav button[data-view="available"]:not([hidden]):not(.hidden),
  .app aside .nav button[data-view="availableIndicators"]:not([hidden]):not(.hidden),
  .app aside .nav button[data-view="availableActivity"]:not([hidden]):not(.hidden),
  .app aside .nav .ac6-add,
  .app aside .nav .ac6-more{display:flex!important}
  .app aside .nav button[data-view="available"]{order:1}
  .app aside .nav button[data-view="availableIndicators"]{order:2}
  .app aside .nav .ac6-add{order:3}
  .app aside .nav button[data-view="availableActivity"]{order:4}
  .app aside .nav .ac6-more{order:5}
  .app aside .nav button[data-view],.app aside .nav .ac6-more,.app aside .nav .ac6-add{flex:1 1 0;width:auto!important;min-width:0!important;height:60px;min-height:0!important;padding:0!important;margin:0 3px;position:relative;flex-direction:column!important;align-items:center;justify-content:center;gap:4px!important;border:0;border-radius:18px!important;background:transparent!important;color:#6b8589!important;font:inherit;font-size:10.5px!important;font-weight:800;line-height:1.1!important;box-shadow:none!important}
  .app aside .nav button[data-view].active,.app aside .nav .ac6-more.on{background:linear-gradient(135deg,#155d65,#2a8d94)!important;color:#fff!important;box-shadow:0 6px 14px rgba(21,93,101,.35)!important}
  .app aside .nav .nav-icon{display:grid!important;place-items:center;width:24px;height:24px;font-size:0!important}
  .app aside .nav .nav-icon::before{width:24px;height:24px}
  .app aside .nav .nav-mobile-label{display:block!important}
  .app aside .nav .ac6-add{flex:0 0 58px;width:58px!important;height:58px;margin:-30px 6px 0;border-radius:50%!important;background:linear-gradient(135deg,#f5a524,#e38a00)!important;color:#fff!important;border:4px solid #f2f7f7;box-shadow:0 8px 18px rgba(227,138,0,.45)!important}
  .app aside .nav .ac6-add.active{background:linear-gradient(135deg,#f5a524,#e38a00)!important;box-shadow:0 8px 18px rgba(227,138,0,.45)!important}
  .app aside .nav .ac6-add .nav-mobile-label{display:none!important}
  .app aside .nav .ac6-add .nav-icon::before{width:26px;height:26px;-webkit-mask-size:contain}
  .app aside #logoutBtn,.app.sidebar-collapsed aside #logoutBtn{display:none!important}

  #ac6Sheet{display:none;position:fixed;inset:0;z-index:999}
  #ac6Sheet.open{display:block}
  #ac6Sheet .ac6-dim{position:absolute;inset:0;background:rgba(10,30,34,.45)}
  #ac6Sheet .ac6-panel{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:28px 28px 0 0;padding:10px 16px calc(112px + env(safe-area-inset-bottom));box-shadow:0 -10px 30px rgba(0,0,0,.25);max-height:80vh;overflow:auto}
  #ac6Sheet .ac6-grip{width:44px;height:5px;border-radius:9px;background:#cfdcdd;margin:0 auto 14px}
  #ac6Sheet h5{margin:4px 4px 10px;color:#155d65;font-size:14px}
  #ac6Sheet .ac6-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  #ac6Sheet .ac6-tile{display:flex;flex-direction:column;align-items:center;gap:7px;min-height:84px;padding:14px 4px 10px;border:1px solid #e1ecec;border-radius:16px;background:#f2f7f7;color:#33565b;font:inherit;font-size:11.5px;font-weight:800;text-align:center;cursor:pointer}
  #ac6Sheet .ac6-tile i{display:block;width:26px;height:26px;background:#2a8d94;-webkit-mask:var(--ac6-ic) center/contain no-repeat;mask:var(--ac6-ic) center/contain no-repeat}
  #ac6Sheet .ac6-tile.cur{border-color:#2a8d94;background:#e3f1f1}
  #ac6Sheet .ac6-tile.out{background:#fdecec;border-color:#f3c9cb;color:#b3262b}
  #ac6Sheet .ac6-tile.out i{background:#b3262b}
}

/* زر إضافة عرض: يظهر فقط لمن عنده صلاحية إنشاء العروض */
html[data-perm-available-create="0"] .app aside .nav .ac6-add{display:none!important}

/* لوحة التحكم: الرقم والعنوان في منتصف كل مربع */
#dashboardView .summary-chip,
#dashboardView .metric-card{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
#dashboardView .summary-chip .k,#dashboardView .summary-chip .v,
#dashboardView .metric-card .label,#dashboardView .metric-card .value{width:100%;text-align:center}
