/* Container สำหรับกรอบเมนู */
.sidebar-menu-container {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 10px;
}

/* หัวข้อเมนู */
.menu-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    margin: -16px -16px 16px -16px;
    border-radius: 6px 6px 0 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-header::before {
    content: "📊";
    font-size: 1.2em;
}

.page-menu-item {
    margin-bottom: 8px;
    margin-left: 20px; /* ขยับไปทางขวา */
    position: relative;
}

/* ลบเส้นเชื่อมออก */

.page-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #495057;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    margin-left: -5px;
    margin-right: 15px;
}

.page-menu-link:hover {
    background-color: #e3f2fd;
    color: #1976d2;
    text-decoration: none;
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.2);
    border-color: #1976d2;
}

/* หมายเลขใน circle */
.menu-number {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

/* ข้อความและจำนวน */
.menu-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.menu-text {
    flex: 1;
}

.menu-count {
    background-color: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-left: 8px;
}

.page-submenu {
    margin-left: 40px; /* เพิ่มระยะห่างจากขอบซ้าย */
    margin-top: 5px;
    padding-left: 15px;
    border-left: 2px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 6px 6px 0;
}

.page-submenu-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #6c757d;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

.page-submenu-link:hover {
    background-color: #ffffff;
    color: #495057;
    text-decoration: none;
    transform: translateX(3px);
}

.page-list-item {
    padding: 8px 0;
    border-bottom: 1px solid #f1f1f1;
    margin-left: 20px; /* ขยับไปทางขวา */
}

.page-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.page-title-link:hover {
    color: #1976d2 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-menu-item {
        margin-left: 15px;
    }
    
    .page-submenu {
        margin-left: 30px;
        padding-left: 10px;
    }
    
    .page-menu-link,
    .page-submenu-link {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .sidebar-menu-container {
        margin: 5px;
        padding: 12px;
    }
}

/* Animation enhancements */
.page-menu-item {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInRight 0.4s ease forwards;
}

.page-menu-item:nth-child(1) { animation-delay: 0.1s; }
.page-menu-item:nth-child(2) { animation-delay: 0.2s; }
.page-menu-item:nth-child(3) { animation-delay: 0.3s; }
.page-menu-item:nth-child(4) { animation-delay: 0.4s; }
.page-menu-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hover effects for better UX */
.page-menu-link {
    position: relative;
    overflow: hidden;
}

.page-menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(25, 118, 210, 0.1), transparent);
    transition: left 0.5s;
}

.page-menu-link:hover::before {
    left: 100%;
}

/* เพิ่มเอฟเฟกต์เงา */
.sidebar-menu-container:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: box-shadow 0.3s ease;
}