/* ═══════════════════════════════
   APP LAYOUT FIX (IMPORTANT)
═══════════════════════════════ */

.site-layout{
  display: flex;
  min-height: 100vh;
}

/* المساحة الأساسية للمحتوى */
@media (min-width: 769px){
  .site-main{
  /* مساحة الـ sidebar */
    flex: 1;
  }
}

/* ═══════════════════════════════
   SIDEBAR FINAL FIXED VERSION
═══════════════════════════════ */

.site-sidebar { 
  display: none; 
}

@media (min-width: 769px) {

  .site-sidebar {
    display: flex;
    flex-direction: column;
    left:0;
    position: fixed;
    top: 15px;
    bottom: 15px;
    right: 15px;

    width: 230px;

    /* Glass UI */
    background: var(--color-block);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);

    overflow: hidden;

    z-index: 200;

    transition: all 0.3s ease;
  }

  /* LOGO */
  .sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
  }

  .sidebar-logo img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.15));
  }

  /* NAV */
  .sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 18px 12px;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .sidebar-nav::-webkit-scrollbar{
    display: none;
  }

  /* ITEM */
  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 14px;
    border-radius: 16px;

    color: var(--color-text-subtle);
    text-decoration: none;

    transition: all 0.25s ease;
    border: 1px solid transparent;
  }

  /* HOVER */
  .sidebar-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--color-heading);
    transform: scale(1.02);
  }

  /* ACTIVE */
  .sidebar-item--active {
    background: rgba(0,188,212,0.12);
    border: 1px solid rgba(0,188,212,0.3);
    color: var(--color-heading);
    box-shadow: 0 0 20px rgba(0,188,212,0.15);
  }

  .sidebar-item--active .sidebar-icon svg {
    stroke: #00BCD4;
  }

  /* ICON */
  .sidebar-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-icon svg {
    stroke: var(--color-text-subtle);
    fill: none !important;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: 0.3s;
  }

  .sidebar-item:hover .sidebar-icon svg {
    stroke: var(--color-heading);
  }

  .sidebar-label {
    font-size: 0.92rem;
    font-weight: 600;
  }

  /* BOTTOM */
  .sidebar-bottom {
    padding: 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.05);
  }
}

/* ═══════════════════════════════
   MOBILE FIX
═══════════════════════════════ */

@media (max-width: 768px){
  .site-sidebar{
    display: none !important;
  }

  .site-main{
    margin-right: 0;
    padding-bottom: 80px; /* مهم للـ bottom nav */
  }
}